summaryrefslogtreecommitdiff
path: root/ivi-shell
Commit message (Collapse)AuthorAgeFilesLines
* ivi: Fix spellings in commentsBryce Harrington2016-05-191-14/+14
|
* ivi-layout: clarify get_layers_under_surface docPekka Paalanen2016-05-121-1/+4
| | | | | | | | This is derived from the implementation. I was not sure whether "under" referred to object relationships or region intersections. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Emre Ucan <eucan@de.adit-jv.com>
* ivi-layout: Correct coordinate adjective grammar, misspellingsYong Bakos2016-04-291-8/+8
| | | | | | | | | | Hyphenate 'multi screen' coordinates, and correct misspellings and grammar within changed lines. See https://lists.freedesktop.org/archives/wayland-devel/2016-April/028249.html. Signed-off-by: Yong Bakos <ybakos@humanoriented.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* ivi-layout: clear on_layer when layer_destroyWataru Natsume2016-04-121-0/+1
| | | | | | | | On_layer of ivi_layout_surface should be NULL in the layer_destroy. Previous code might access to removed ivilayer and cause SEGV. Signed-off-by: Wataru Natsume <wataru_natsume@xddp.denso.co.jp> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* ivi-shell: rework configure_surface notificationUcan, Emre (ADITG/SW1)2016-04-053-122/+22
| | | | | | | | | | | | | | | | | | | | The add_notification_configure_surface API accepts a simple wl_listener instead of a ivi-shell specific notification function. Therefore, the API is renamed to add_listener_configure_surface. This change has several advantages: 1. Code cleanup 2. No dynamic memory allocation. Listeners are allocated by controller plugins 3. Remove API is not needed. Controller plugins can easily remove the listener link. The remove API is removed too: - ivi_layout_remove_notification_configure_surface Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* ivi-shell: rework remove_surface notificationUcan, Emre (ADITG/SW1)2016-04-053-60/+22
| | | | | | | | | | | | | | | | | | | The add_notification_remove_surface API accepts a simple wl_listener instead of a ivi-shell specific notification function. Therefore, the API is renamed to add_listener_remove_surface. This change has several advantages: 1. Code cleanup 2. No dynamic memory allocation. Listeners are allocated by controller plugins 3. Remove API is not needed. Controller plugins can easily remove the listener link. The remove API is removed too: - ivi_layout_remove_notification_remove_surface Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* ivi-shell: rework remove_layer notificationUcan, Emre (ADITG/SW1)2016-04-052-54/+13
| | | | | | | | | | | | | | | | | | | The add_notification_remove_layer API accepts a simple wl_listener instead of a ivi-shell specific notification function. Therefore, the API is renamed to add_listener_remove_layer. This change has several advantages: 1. Code cleanup 2. No dynamic memory allocation. Listeners are allocated by controller plugins 3. Remove API is not needed. Controller plugins can easily remove the listener link. The remove API is removed too: - ivi_layout_remove_notification_remove_layer Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* ivi-shell: rework create_layer_notificationUcan, Emre (ADITG/SW1)2016-04-052-55/+13
| | | | | | | | | | | | | | | | | | | The add_notification_layer_surface API accepts a simple wl_listener instead of a ivi-shell specific notification function. Therefore, the API is renamed to add_listener_layer_surface. This change has several advantages: 1. Code cleanup 2. No dynamic memory allocation. Listeners are allocated by controller plugins 3. Remove API is not needed. Controller plugins can easily remove the listener link. The remove API is removed too: - ivi_layout_remove_notification_create_layer Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* ivi-shell: rework create_surface notificationUcan, Emre (ADITG/SW1)2016-04-053-60/+22
| | | | | | | | | | | | | | | | | | | | The add_notification_create_surface API accepts a simple wl_listener instead of a ivi-shell specific notification function. Therefore, the API is renamed to add_listener_create_surface. This change has several advantages: 1. Code cleanup 2. No dynamic memory allocation. Listeners are allocated by controller plugins 3. Remove API is not needed. Controller plugins can easily remove the listener link. The remove API is removed too: - ivi_layout_remove_notification_create_surface Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* ivi-shell: rework layer_add_notification APIUcan, Emre (ADITG/SW1)2016-04-052-110/+15
| | | | | | | | | | | | | | | | | | | | The layer_add_notification API accepts a simple wl_listener instead of a ivi-shell specific notification function. Therefore, the API is renamed to layer_add_listener. This change has several advantages: 1. Code cleanup 2. No dynamic memory allocation. Listeners are allocated by controller plugins 3. Remove API is not needed. Controller plugins can easily remove the listener link. This patch also remove two APIs which are not needed: - ivi_layout_layer_remove_notification - ivi_layout_layer_remove_notification_by_callback Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* ivi-shell: rework surface_add_notification APIUcan, Emre (ADITG/SW1)2016-04-052-96/+14
| | | | | | | | | | | | | | | | | | | | The surface_add_notification API accepts a simple wl_listener instead of a ivi-shell specific notification function. Therefore, the API is renamed to surface_add_listener. This change has several advantages: 1. Code cleanup 2. No dynamic memory allocation. Listeners are allocated by controller plugins 3. Remove API is not needed. Controller plugins can easily remove the listener link. This patch also remove two APIs which are not needed: - ivi_layout_surface_remove_notification - ivi_layout_surface_remove_notification_by_callback Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* ivi-shell: move event_mask to properties structUcan, Emre (ADITG/SW1)2016-04-013-37/+33
| | | | | | | | | I moved the event_mask to ivi_layout_*_properties struct, so that it is easily accessible with get_properties_of_* APIs. Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* ivi-shell: remove content_observer leftoverUcan, Emre (ADITG/SW1)2016-04-011-5/+0
| | | | | | | | | | content_observer_notification is removed by the commit: 193e301c740b582f20307e3e08f8373d26ea968f. Therefore, this callback function is unused. Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* ivi-shell: harden get_ivi_shell_surface()Pekka Paalanen2016-03-241-3/+9
| | | | | | | | | | | | Add more sanity checks to get_ivi_shell_surface() just in case. If the configure hook is set, we must always have non-NULL configure_private. Check the ivi_shell_surface matches the surface. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Eugen Friedrich <friedrix@gmail.com>
* ivi-shell: add sanity check in ivi_shell_surface_configurePekka Paalanen2016-03-241-1/+5
| | | | | | | This should not get called unless there is an ivi_shell_surface. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Eugen Friedrich <friedrix@gmail.com>
* ivi-shell: add input panel label funcPekka Paalanen2016-03-241-0/+8
| | | | | | | | | | | Copied from desktop-shell/input-panel.c, add a label function for the input panel. This patch strictly reduces the difference between input-panel.c and input-panel-ivi.c. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Eugen Friedrich <friedrix@gmail.com>
* ivi-shell: add shell surface labelsPekka Paalanen2016-03-241-0/+16
| | | | | | | | | To be used by the Weston timeline feature for identifying surfaces in a trace. The 'get_label' functionality can also be used by any debugging code, too. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Eugen Friedrich <friedrix@gmail.com>
* ivi-shell: remove ivi_layout_get_screen_output APIUcan, Emre (ADITG/SW1)2016-03-242-17/+0
| | | | | | | | | The controller plugins use IVI Layout API with weston outputs. Therefore, this API is not required. Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Acked-by: Wataru Natsume <wnatsume@jp.adit-jv.com>
* ivi-shell: remove ivi_layout_get_screen_from_id APIUcan, Emre (ADITG/SW1)2016-03-242-26/+1
| | | | | | | | | The controller plugins does not use ivi screens for IVI layout APIs. They use weston outputs directly. Therefore, this API is unnecessary. Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Acked-by: Wataru Natsume <wnatsume@jp.adit-jv.com>
* ivi-shell: implement get_screen_from_outputUcan, Emre (ADITG/SW1)2016-03-241-3/+17
| | | | | | | | | It is an internal API, which returns ivi_layout_screen for a pregiven weston_output. Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Acked-by: Wataru Natsume <wnatsume@jp.adit-jv.com>
* ivi-shell: use weston_output in public APIsUcan, Emre (ADITG/SW1)2016-03-243-55/+41
| | | | | | | | | IVI layout APIs now are called with weston_output pointers, instead of ivi_layout_screen pointers. Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Acked-by: Wataru Natsume <wnatsume@jp.adit-jv.com>
* ivi-shell: remove ivi_layout_get_screens APIUcan, Emre (ADITG/SW1)2016-03-243-67/+2
| | | | | | | | | The compositor data struct already has a list of weston outputs. Therefore, this API is not required. Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Acked-by: Wataru Natsume <wnatsume@jp.adit-jv.com>
* ivi-shell: remove ivi_layout_get_screen_resolution APIUcan, Emre (ADITG/SW1)2016-03-243-45/+11
| | | | | | | | | The controller plugins can get the screen resolution directly from weston output. Therefore, this API is not required. Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Acked-by: Wataru Natsume <wnatsume@jp.adit-jv.com>
* ivi-shell: remove ivi_layout_get_id_of_screen APIUcan, Emre (ADITG/SW1)2016-03-242-20/+1
| | | | | | | | | ivi-screen does not have an id. IVI layout implementation is using id of weston output. Therefore, this API is unnecessary. Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Acked-by: Wataru Natsume <wnatsume@jp.adit-jv.com>
* ivi-shell: remove id_screenUcan, Emre (ADITG/SW1)2016-03-241-7/+2
| | | | | | | | use output id instead Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Acked-by: Wataru Natsume <wnatsume@jp.adit-jv.com>
* hmi-controller: fix wrong panel widthUcan, Emre (ADITG/SW1)2016-03-181-5/+3
| | | | | | | | | | | The width of the first base layer is used for all panels. Every display has a base layer which is as big as the display. Therefore, it is wrong to use the width of the first base layer for all panels, because every display could have a different resolution. Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* hmi-controller: fix wrong background surface sizeUcan, Emre (ADITG/SW1)2016-03-181-9/+8
| | | | | | | | | | | | | | | In current implementation, the size of the first application layer is used for the background image of a display. This is wrong because: 1. The background surface should be fullscreen. 2. Each display could have different resolution. We should use the size of the base layer of each display for the background image. Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* clients & tests: Unify multiple definitions of x*alloc and related functionsBryce Harrington2016-03-171-11/+1
| | | | | | | | | | | | | Direct fail_on_null calls now produce output like: [weston-info] clients/weston-info.c:714: out of memory xmalloc, et al produce output on failure like: [weston-info] out of memory (-1) Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* ivi-shell: simplify ivi_layout_screen_set_render_orderUcan, Emre (ADITG/SW1)2016-03-171-13/+3
| | | | | | | | | | | | | It is not necessary check the ivi-id of pregiven objects (layer or surface). Traversing the list of all objects is sure to find the exact same pointer we start with, bugs aside. The controller modules are responsible for providing valid pointers. We cannot protect from invalid pointers anyway. Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> [Pekka: fix subject, add commit message] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* ivi-shell: simplify ivi_layout_screen_add_layerUcan, Emre (ADITG/SW1)2016-03-171-12/+2
| | | | | | | | | | | | | It is not necessary check the ivi-id of pregiven objects (layer or surface). Traversing the list of all objects is sure to find the exact same pointer we start with, bugs aside. The controller modules are responsible for providing valid pointers. We cannot protect from invalid pointers anyway. Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> [Pekka: commit message] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* ivi-shell: simplify ivi_layout_set_render_orderUcan, Emre (ADITG/SW1)2016-03-171-16/+3
| | | | | | | | | | | | | It is not necessary check the ivi-id of pregiven objects (layer or surface). Traversing the list of all objects is sure to find the exact same pointer we start with, bugs aside. The controller modules are responsible for providing valid pointers. We cannot protect from invalid pointers anyway. Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> [Pekka: commit message] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* ivi-shell: simplify ivi_layout_layer_add_surfaceUcan, Emre (ADITG/SW1)2016-03-171-12/+2
| | | | | | | | | | | | | It is not necessary check the ivi-id of pregiven objects (layer or surface). Traversing the list of all objects is sure to find the exact same pointer we start with, bugs aside. The controller modules are responsible for providing valid pointers. We cannot protect from invalid pointers anyway. Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> [Pekka: commit message] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* ivi-shell: simplify ivi_layout_remove_surfaceUcan, Emre (ADITG/SW1)2016-03-171-11/+2
| | | | | | | | | | | | | It is not necessary check the ivi-id of pregiven objects (layer or surface). Traversing the list of all objects is sure to find the exact same pointer we start with, bugs aside. The controller modules are responsible for providing valid pointers. We cannot protect from invalid pointers anyway. Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> [Pekka: commit message] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* ivi-shell: remove add_configured_listener left-overPekka Paalanen2016-03-161-4/+0
| | | | | | | | In all my rebases, this got accidentally left behind. The implementation was removed in 4a7503976b5d300a4474b149d877cf579c2a8c05 but 32ca791df8f855898e007512f3b996a66ffcb09c reintroduced it. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* ivi-shell: introduce ivi-layout-shell.hPekka Paalanen2016-03-164-20/+70
| | | | | | | | | | | This new header encapsulates the API that ivi-layout offers to ivi-shell.c to call. ivi-shell.c no longer uses ivi-layout-private.h. This limits the ivi-layout internal structures to just ivi-layout code. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Emre Ucan <eucan@de.adit-jv.com>
* ivi-shell: remove configured signal from ivi-layoutPekka Paalanen2016-03-163-30/+1
| | | | | | | | Now that ivi-layout calls directly into ivi-shell.c, this signal is no longer used. Remove it. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Emre Ucan <eucan@de.adit-jv.com>
* ivi-shell: call shell_surface_send_configure() directlyPekka Paalanen2016-03-164-26/+35
| | | | | | | | | | | | | | | | | | For some reason, it seems that ivi-layout.c has tried hard to avoid calling directly into ivi-shell.c. This means there is a jump through hoops just to get the configure event sent to the clients. Ivi-shell registers a listener for a ivi-layout signal for sending the event. Instead, let ivi-layout.c call directly into ivi-shell.c, and expose a function to send out the configure events. This reduces some confusion on who calls what. The main idea though is that this makes ivi-shell.c not depend on struct ivi_layout_surface fields directly anymore. In following patches, ivi_layout_surface can be made opaque for ivi-shell.c. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Emre Ucan <eucan@de.adit-jv.com>
* ivi-shell: add include guards on ivi-shell.hPekka Paalanen2016-03-151-0/+5
| | | | | | | | It's our standard practice. This file will get used a bit more in the future. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* ivi-shell: include config.h in ivi-layout-transition.cPekka Paalanen2016-03-151-0/+2
| | | | | | | Every .c file must include config.h as the first thing. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* ivi-shell: remove content_observer notificationUcan, Emre (ADITG/SW1)2016-03-153-32/+0
| | | | | | | | | The content observer notification struct and its set API (ivi_layout_surface_set_content_observer) are removed. Because they are unused. Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* ivi-shell: Remove all surface transitions when it is being removed.Mateusz Polrola2016-03-153-0/+21
| | | | | | | | | | | | | If surface transitions are not removed when surface is being removed, it can lead to crash later when transition will finish, as it will try to reference already freed memory. This change exposes function that can remove all existing transitions for given surface and it is being called during surface cleanup. Signed-off-by: Mateusz Polrola <mateuszx.potrola@intel.com> Reviewed-by: Emre Ucan <eucan@de.adit-jv.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* ivi-shell: remove ivi_layout_layer_set_dimension APIUcan, Emre \(ADITG/SW1\)2016-03-042-35/+0
| | | | | | Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> Acked-by: wataru_natsume <wataru_natsume@xddp.denso.co.jp> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* ivi-shell: remove ivi_layout_surface_set_dimension APIUcan, Emre \(ADITG/SW1\)2016-03-042-34/+0
| | | | | | Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> Acked-by: wataru_natsume <wataru_natsume@xddp.denso.co.jp> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* ivi-shell: remove ivi_layout_layer_set_position APIUcan, Emre \(ADITG/SW1\)2016-03-045-38/+11
| | | | | | Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> Acked-by: wataru_natsume <wataru_natsume@xddp.denso.co.jp> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* ivi-shell: remove ivi_layout_surface_set_position APIUcan, Emre \(ADITG/SW1\)2016-03-042-33/+0
| | | | | | Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> Acked-by: wataru_natsume <wataru_natsume@xddp.denso.co.jp> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* ivi-shell: remove ivi_layout_layer_get_orientation APIUcan, Emre \(ADITG/SW1\)2016-03-042-22/+0
| | | | | | Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> Acked-by: wataru_natsume <wataru_natsume@xddp.denso.co.jp> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* ivi-shell: remove ivi_layout_surface_get_orientation APIUcan, Emre \(ADITG/SW1\)2016-03-042-22/+0
| | | | | | Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> Acked-by: wataru_natsume <wataru_natsume@xddp.denso.co.jp> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* ivi-shell: remove ivi_layout_layer_get_dimension APIUcan, Emre \(ADITG/SW1\)2016-03-042-25/+0
| | | | | | Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> Acked-by: wataru_natsume <wataru_natsume@xddp.denso.co.jp> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* ivi-shell: remove ivi_layout_surface_get_dimension APIUcan, Emre \(ADITG/SW1\)2016-03-044-33/+2
| | | | | | Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> Acked-by: wataru_natsume <wataru_natsume@xddp.denso.co.jp> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* ivi-shell: remove ivi_layout_layer_get_position APIUcan, Emre \(ADITG/SW1\)2016-03-045-35/+10
| | | | | | Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> Acked-by: wataru_natsume <wataru_natsume@xddp.denso.co.jp> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>