summaryrefslogtreecommitdiff
path: root/ivi-shell
AgeCommit message (Collapse)AuthorFilesLines
2017-11-27libweston: Use struct timespec for touch motion eventsAlexandros Frantzis1-2/+3
Change code related to touch motion events to use struct timespec to represent time. This commit is part of a larger effort to transition the Weston codebase to struct timespec. Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-11-27libweston: Use struct timespec for touch up eventsAlexandros Frantzis1-1/+2
Change code related to touch up events to use struct timespec to represent time. This commit is part of a larger effort to transition the Weston codebase to struct timespec. Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-11-27libweston: Use struct timespec for touch down eventsAlexandros Frantzis2-2/+4
Change code related to touch down events to use struct timespec to represent time. This commit is part of a larger effort to transition the Weston codebase to struct timespec. Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-11-27libweston: Use struct timespec for key eventsAlexandros Frantzis1-1/+1
Change code related to key events to use struct timespec to represent time. This commit is part of a larger effort to transition the Weston codebase to struct timespec. Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-11-27libweston: Use struct timespec for axis eventsAlexandros Frantzis1-1/+1
Change code related to axis events to use struct timespec to represent time. This commit is part of a larger effort to transition the Weston codebase to struct timespec. Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-11-27libweston: Use struct timespec for button eventsAlexandros Frantzis2-2/+3
Change code related to button events to use struct timespec to represent time. This commit is part of a larger effort to transition the Weston codebase to struct timespec. Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-11-27libweston: Use struct timespec for motion eventsAlexandros Frantzis1-1/+2
Change code related to motion events to use struct timespec to represent time. This commit is part of a larger effort to transition the Weston codebase to struct timespec. Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-11-24ivi-shell: Fix incorrect use of logical instead of bitwise operatorAlexandros Frantzis1-1/+1
Fix the code to use the correct bitwise AND operator '&', instead of the currently used logical AND operator '&&', to check the value of a bit flag in a bit mask. This problem was reported as a warning when building with clang. Reviewed-by: Emre Ucan <eucan@de.adit-jv.com>
2017-07-25libweston: introduce weston_output_from_resource()Pekka Paalanen1-1/+1
This is a simple wrapper for casting the user data of a wl_resource into a struct weston_output pointer. Using the wrapper clearly marks all the places where a wl_output protocol object is used. Replace ALL wl_output related calls to wl_resource_get_user_data() with a call to weston_output_from_resource(). v2: add type assert in weston_output_from_resource(). Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Armin Krezović <krezovic.armin@gmail.com>
2017-07-25ivi-shell: Fixed broken link to wiki page in ivi-layout header fileMichael Teyfel1-1/+1
Signed-off-by: Michael Teyfel <mteyfel@de.adit-jv.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-07-24ivi-shell: remove orientation calculationUcan, Emre (ADITG/SW1)1-76/+4
Dead code as orientation cannot be changed anymore, see patches: ivi-shell: remove layer_set_orientation API ivi-shell: remove surface_set_orientation API Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> [Pekka: added commit message] Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-07-24ivi-shell: remove layer_set_orientation APIUcan, Emre (ADITG/SW1)2-32/+0
This API is used to rotate the contents of application's buffer, which are in the render order list of the layer. But this API is not needed because an application can rotate its buffers with set_buffer_transform request of wl_surface interface Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-07-24ivi-shell: remove surface_set_orientation APIUcan, Emre (ADITG/SW1)2-32/+0
This API is used to rotate the contents of application's buffer. But it is not needed because an application can rotate its buffers with set_buffer_transform request of wl_surface interface. Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-07-24ivi-shell: add_screen_remove_layer APIUcan, Emre (ADITG/SW1)2-0/+32
It is analagous to layer_remove_surface API. The API removes a layer from the render order of the screen. v3: add the new vfunc at the end of the ivi_layout_interface struct. Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> Reviewed-by: Eugen Friedrich <friedrix@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-03-31ivi-layout: Add missing free() in ivi_view_createRaúl Peñacoba1-0/+1
Signed-off-by: Raúl Peñacoba <raul.mikaop.zelda@gmail.com> Reviewed-by: Emre Ucan <eucan@de.adit-jv.com> Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2017-02-07ivi-shell: Damage view below after unmappingUcan, Emre (ADITG/SW1)1-1/+12
If ivilayer or ivisurf of ivi_view is made invisible in the commit_changes call, we have to damage the weston_view below this ivi_view. Otherwise content of this ivi_view will stay visible. Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-02-06ivi-shell: simplify commit_changes functionUcan, Emre (ADITG/SW1)1-20/+21
It is a better idea to use one for loop instead of using three nested for loops. We do not need to update the transformation of views according to the scenegraph. The important thing is that every visible view is updated before commit_changes function returns. The first if statement checks, if the view is on the currently rendered scenegraph. The second if statement checks, if the view's layer or surface is visible. These checks ensure that we do not update the transformation matrix of a view, which is not visible on the screen. Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> [Pekka: minor whitespace fix] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-02-06ivi-shell: pass only ivi_view to update_propUcan, Emre (ADITG/SW1)1-9/+5
We can get ivisurf, ivilayer and iviscreen easily from ivi_view. Then, we do not need to check, if ivi_view's layer is the same as the given ivilayer. Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-01-27ivi-shell: don't check layer is already on the screenUcan, Emre (ADITG/SW1)1-5/+0
If a layer is removed from a screen's render order list, but the changes are not commited. Then, the layer could not be added to the same screen. Because on_screen property of the layer is only changed in ivi_layout_commit_changes API, when active render order of the screen is changed. It is not possible to change the order of layers in a screen without clearing and commiting the changes before. This patch fixes this issue. After this patch, the pending render order list of a screen is always modified regardless of its active render order list. Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-01-27ivi-shell: don't check view is rendered before adding surfaceUcan, Emre (ADITG/SW1)1-2/+0
If a surface is removed from a layer's render order list, but the changes are not commited. Then, the surface could not be added to the same layer. Because ivi_view of the surface is still in the render order list of the layer. It is not possible to change the order of surfaces in a layer without clearing and commiting the changes before. This patch fixes this issue. After this patch, the pending render order list of a layer is always modified regardless of its active render order list. Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-01-27ivi-shell: fix typo in layer_destroy APIUcan, Emre (ADITG/SW1)1-1/+1
Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-01-17weston: Make the shell entrypoint specificQuentin Glidic1-2/+2
This avoids loading a shell as a module, so we are sure to have only one shell loaded at a time. Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net> Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-01-17weston: Properly namespace modules entrypointQuentin Glidic2-3/+5
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net> Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-01-17libweston: Position layers in an absolute wayQuentin Glidic3-5/+7
Currently, layers’ order depends on the module loading order and it does not survive runtime modifications (like shell locking/unlocking). With this patch, modules can safely add their own layer at the expected position in the stack, with runtime persistence. v4 Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com> Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net> Acked-by: Daniel Stone <daniels@collabora.com> [Pekka: fix three whitespace issues] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-01-03ivi-shell: fix minor typosAbdur Rehman2-5/+5
- ivi-shell/hmi-controller.c:41: a to an - ivi-shell/hmi-controller.c:1296: Duplicated 'a' - ivi-shell/ivi-layout-export.h:28: An to A Signed-off-by: Abdur Rehman <arehmanq199@gmail.com> Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
2016-11-09ivi-shell: describe members of type wl_listUcan, Emre (ADITG/SW1)3-11/+15
I wrote comments on which list they are used with Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> [Pekka: fix surface_list to layer_list, add ivi_layout_transition_set::transition_list] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-11-09ivi-shell: clear unused struct membersUcan, Emre (ADITG/SW1)2-17/+0
I removed unused members of ivi_layout* data structs. Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-08-14libweston: Rename weston_surface::configure to ::committedQuentin Glidic2-16/+16
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net> Reviewed-by: Jonas Ådahl <jadahl@gmail.com> Acked-by: Giulio Camuffo <giulio.camuffo@kdab.com> Differential Revision: https://phabricator.freedesktop.org/D1246
2016-07-26include stdint.h for int32_t/uint32_tJussi Kukkonen8-0/+10
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
2016-07-12Include space in 'if ('Bryce Harrington1-1/+1
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-07-01ivi-shell: update for manual surface/view mappingArmin Krezović2-0/+4
This is a follow up for ivi-shell to manually set mapped status for views/surfaces it controls v2: - Updated for changes in git master Signed-off-by: Armin Krezović <krezovic.armin@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-06-30input: Rename weston_surface_activate to weston_seat_set_keyboard_focusBryce Harrington1-1/+1
The name suggests that it activates surfaces, but the code says it rather just assigns keyboard focus. Rename it for clarity, and so the original function name could be used for something more appropriate later. Switch order of parameters since keyboard focus is a property of the seat. Update all callers as appropriate. Change was asked for by pq, May 26, 2016: "This should be called weston_seat_set_keyboard_focus(seat, surface). Keyboard focus is a property of the seat." Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-06-29ivi-shell: introduce ivi_layout_viewUcan, Emre (ADITG/SW1)2-117/+191
This patch introduces ivi_layout_view data struct, which is a wrapper of weston_view. There is always only one ivi_layout_view for an ivi_layout_surface and ivi_layout_layer pair. A surface could have many views with different geometry and transformations, so that a surface can be shown on: 1. On many screens 2. On the same screen with different positions The geometry of a view is modified, when properties of its layer are changed through ivi_layout_interface. Users of ivi_layout_interface does not have direct access to ivi_layout_view structure. v2 changes: 1. Use ivi_view_is_rendered function instead of active member 2. Add descriptions to introduced members of structs Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> [Natsume: add empty line] Reviewed-by: Wataru Natsume <wnatsume@jp.adit-jv.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-06-29ivi-shell: add surface_created listener after launchersUcan, Emre (ADITG/SW1)1-3/+7
Add surface_created listener after the initialization of launchers. Otherwise, surfaces of the launchers will be added to the application layer too. This does create a race where we might miss some surfaces that get created before the UI client signals ready, but it was agreed the race is not significant. You cannot use the launchers before the UI is ready, and someone using systemd integration to launch clients in parallel to Weston with ivi-shell and hmi-controller is unlikely. After all, hmi-controller is just a demo. Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> [Pekka: added extra commit message notes] Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-06-23Move weston source to compositor/Pekka Paalanen3-3/+3
This is the start of separating weston-the-compositor source files from libweston source files. This is moving all the files related to the 'weston' binary. Also the CMS and systemd plugins are moved. xwayland plugin is not moved, because it will be turned into a libweston feature. To avoid breaking the build, #includes for weston.h are fixed to use compositor/weston.h. This serves as a reminder that such files may need further attention: moving to the right directory, or maybe using the proper -I flags instead. v2: Move also screen-share.c, and add a note about weston-launch. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Yong Bakos <ybakos@humanoriented.com> Acked-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net> Tested-by: Quentin Glidic <sardemff7+git@sardemff7.net> Tested-by: Benoit Gschwind <gschwind@gnu-log.net> Acked-by: Benoit Gschwind <gschwind@gnu-log.net> [Pekka: rebased]
2016-06-13ivi-shell: remove ivi_layout_get_weston_viewUcan, Emre (ADITG/SW1)3-19/+0
A surface could have more than one views. Therefore, it is not possible to map a surface to a specific view. The implementation of the API iterates the list of views of the surface, and returns the first found view. It is not necessary to have this API to found a view of the surface. Therefore, I removed the API. Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-06-03Split the modules and include files between weston and libwestonGiulio Camuffo1-1/+2
The backends are now installed in lib/libweston-0, and the include files that will be used by libweston in include/libweston-0. The other modules and weston-specific include files are kept in the old paths. A new wet_load_module() is added to load plugins in the old path, which is not part of libweston, but weston only and defined in main.c. To allow that to be used by out of tree weston plugins, the function is declared in a new weston.h, installed in include/weston. The -0 in the paths is the abi version of libweston, and it will also be used by the libweston .so. If the abi changes the number will need to be increased. Signed-off-by: Giulio Camuffo <giuliocamuffo@gmail.com> Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net> Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-06-03compositor: remove the weston_config field in weston_compositorGiulio Camuffo2-4/+5
The config can now be retrieved with a new function defined in weston.h, wet_get_config(weston_compositor*). Signed-off-by: Giulio Camuffo <giuliocamuffo@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2016-06-03Move the functions launching clients to main.cGiulio Camuffo1-0/+1
They belong in the compositor rather than libweston since they set signals handlers, and a library should not do that behind its user's back. Besides, they were using functions in main.c already so they were not usable by other compositors. Signed-off-by: Giulio Camuffo <giuliocamuffo@gmail.com> Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-06-01ivi-shell: add API for weston_surface -> ivi_layout_surfacePekka Paalanen4-0/+27
Add ivi-layout API for getting an ivi_layout_surface from a weston_surface if it exists. This can be used by controllers that hook up to core Weston callbacks and get handed a weston_surface, but need to use ivi-layout API to manipulate it. The only ways ivi-layout itself would be able to go from weston_surface to ivi_layout_surface are either searching through the list of all ivi_layout_surfaces or adding a dummy destroy listener to the weston_surface. Therefore the implementation is delegated to ivi-shell.c. Ivi-shell.c can easily look up the ivi_shell_surface for a weston_surface, and that will map 1:1 to an ivi_layout_surface. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Emre Ucan <eucan@de.adit-jv.com>
2016-05-19ivi: Fix spellings in commentsBryce Harrington1-14/+14
2016-05-12ivi-layout: clarify get_layers_under_surface docPekka Paalanen1-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>
2016-04-29ivi-layout: Correct coordinate adjective grammar, misspellingsYong Bakos1-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>
2016-04-12ivi-layout: clear on_layer when layer_destroyWataru Natsume1-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>
2016-04-05ivi-shell: rework configure_surface notificationUcan, Emre (ADITG/SW1)3-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>
2016-04-05ivi-shell: rework remove_surface notificationUcan, Emre (ADITG/SW1)3-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>
2016-04-05ivi-shell: rework remove_layer notificationUcan, Emre (ADITG/SW1)2-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>
2016-04-05ivi-shell: rework create_layer_notificationUcan, Emre (ADITG/SW1)2-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>
2016-04-05ivi-shell: rework create_surface notificationUcan, Emre (ADITG/SW1)3-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>
2016-04-05ivi-shell: rework layer_add_notification APIUcan, Emre (ADITG/SW1)2-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>