Commit graph

42 commits

Author SHA1 Message Date
Jussi Kukkonen 649bbce607 include stdint.h for int32_t/uint32_t
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
2016-07-26 16:26:08 -07:00
Pekka Paalanen eaa43fc310 ivi-shell: add API for weston_surface -> ivi_layout_surface
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-06-01 11:06:49 +03:00
Pekka Paalanen edcb312abb ivi-layout: clarify get_layers_under_surface doc
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-05-12 11:49:03 +03:00
Ucan, Emre (ADITG/SW1) c49aa5acad ivi-shell: rework configure_surface notification
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-05 11:53:48 +03:00
Ucan, Emre (ADITG/SW1) 67f0aa8767 ivi-shell: rework remove_surface notification
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-05 11:53:48 +03:00
Ucan, Emre (ADITG/SW1) 562f2ecb0c ivi-shell: rework remove_layer notification
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-05 11:53:48 +03:00
Ucan, Emre (ADITG/SW1) c98f2cf16b ivi-shell: rework create_layer_notification
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-05 11:53:48 +03:00
Ucan, Emre (ADITG/SW1) 970f831588 ivi-shell: rework create_surface notification
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-05 11:53:48 +03:00
Ucan, Emre (ADITG/SW1) 3750d1b270 ivi-shell: rework layer_add_notification API
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>
2016-04-05 11:53:48 +03:00
Ucan, Emre (ADITG/SW1) 706cb5aa7c ivi-shell: rework surface_add_notification API
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>
2016-04-05 11:53:48 +03:00
Ucan, Emre (ADITG/SW1) 0bd29b6a52 ivi-shell: move event_mask to properties struct
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>
2016-04-01 14:39:30 +03:00
Ucan, Emre (ADITG/SW1) 8e21e96795 ivi-shell: remove content_observer leftover
content_observer_notification is removed by the commit:
193e301c74.

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>
2016-04-01 14:38:01 +03:00
Ucan, Emre (ADITG/SW1) 1c04d7b897 ivi-shell: remove ivi_layout_get_screen_output API
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>
2016-03-24 11:10:07 +02:00
Ucan, Emre (ADITG/SW1) 6d89b1cdc4 ivi-shell: remove ivi_layout_get_screen_from_id API
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>
2016-03-24 11:10:07 +02:00
Ucan, Emre (ADITG/SW1) 273874e3c7 ivi-shell: use weston_output in public APIs
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>
2016-03-24 11:10:07 +02:00
Ucan, Emre (ADITG/SW1) 3a8521e005 ivi-shell: remove ivi_layout_get_screens API
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>
2016-03-24 11:10:07 +02:00
Ucan, Emre (ADITG/SW1) ff6a9f8474 ivi-shell: remove ivi_layout_get_screen_resolution API
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>
2016-03-24 11:10:07 +02:00
Ucan, Emre (ADITG/SW1) d56b90d948 ivi-shell: remove ivi_layout_get_id_of_screen API
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>
2016-03-24 11:10:07 +02:00
Ucan, Emre (ADITG/SW1) 193e301c74 ivi-shell: remove content_observer notification
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>
2016-03-15 14:25:09 +02:00
Ucan, Emre \(ADITG/SW1\) 16d1fa156a ivi-shell: remove ivi_layout_layer_set_dimension API
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>
2016-03-04 10:33:35 -08:00
Ucan, Emre \(ADITG/SW1\) 45d3942816 ivi-shell: remove ivi_layout_surface_set_dimension API
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>
2016-03-04 10:33:34 -08:00
Ucan, Emre \(ADITG/SW1\) e62bfd8d5e ivi-shell: remove ivi_layout_layer_set_position API
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>
2016-03-04 10:33:34 -08:00
Ucan, Emre \(ADITG/SW1\) 161da40b06 ivi-shell: remove ivi_layout_surface_set_position API
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>
2016-03-04 10:33:34 -08:00
Ucan, Emre \(ADITG/SW1\) 5bb068d16d ivi-shell: remove ivi_layout_layer_get_orientation API
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>
2016-03-04 10:33:34 -08:00
Ucan, Emre \(ADITG/SW1\) 4d9001bc49 ivi-shell: remove ivi_layout_surface_get_orientation API
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>
2016-03-04 10:33:34 -08:00
Ucan, Emre \(ADITG/SW1\) 18691f0310 ivi-shell: remove ivi_layout_layer_get_dimension API
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>
2016-03-04 10:33:34 -08:00
Ucan, Emre \(ADITG/SW1\) c507f67f9e ivi-shell: remove ivi_layout_surface_get_dimension API
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>
2016-03-04 10:33:34 -08:00
Ucan, Emre \(ADITG/SW1\) dfc2d76432 ivi-shell: remove ivi_layout_layer_get_position API
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>
2016-03-04 10:33:34 -08:00
Ucan, Emre \(ADITG/SW1\) b2ff255792 ivi-shell: remove ivi_layout_surface_get_position API
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>
2016-03-04 10:33:34 -08:00
Ucan, Emre \(ADITG/SW1\) c3aee1f67f ivi-shell: remove ivi_layout_layer_get_opacity API
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>
2016-03-04 10:33:34 -08:00
Ucan, Emre \(ADITG/SW1\) 995e6fbcd0 ivi-shell: remove ivi_layout_surface_get_opacity API
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>
2016-03-04 10:33:34 -08:00
Ucan, Emre \(ADITG/SW1\) 17610f240b ivi-shell: remove ivi_layout_layer_get_visibility API
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>
2016-03-04 10:33:34 -08:00
Ucan, Emre \(ADITG/SW1\) c6a138c6f0 ivi-shell: remove ivi_layout_surface_get_visibility API
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>
2016-03-04 10:33:27 -08:00
Ucan, Emre \(ADITG/SW1\) 0c0e51e096 ivi-shell: rename ivi_controller_interface
The name of ivi_controller_interface is changed to ivi_layout_interface
with this patch.

This name is better suited to the interface, because it is implemented
in ivi-layout.c and its methods are linked to ivi_layout* functions.

Furthermore, the controller modules (e.g. hmi-controller) are the users
of this interface and they have their own interfaces,
which are called *_controller_interface,
e.g.: ivi_hmi_controller_interface.

This causes confusion about the software architecture.

Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Tested-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
2015-10-29 13:55:16 -07:00
Nobuhiko Tanibata 3aa8aedb47 ivi-shell: rename to ivi_layout_layer_destroy()
"remove" is not proper name beacause it destorys a layer. The name of
the api is changed from layer_remove to layer_destroy.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-06-23 15:57:16 +03:00
Nobuhiko Tanibata 4d0116eb0d ivi-shell: add interface to get screen ID
This interface is required for user to manage screens per IDs.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-06-23 15:57:15 +03:00
Nobuhiko Tanibata db8efd1f26 ivi-shell: add new method to remove a callback to get notificaiton of ivi_layer property changes.
To get property changes of ivi_layer, callbacks can be registered.
However there was no API to remove a callback rather than removing all
callbacks by using layer_remove_notification.
layer_remove_notification_by_callback can do it.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-06-23 15:57:15 +03:00
Nobuhiko Tanibata 82051705b5 ivi-shell: add new method to remove a callback to get notification of ivi_surface property changes.
To get property changes of ivi_surface, callbacks can be registered.
However there was no API to remove a callback rather than remove all
callbacks by using surface_remove_notification.
surface_remove_notification_by_callback can do it.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-06-23 15:57:15 +03:00
Bryce Harrington af637c25f2 *-shell: Update boilerplate from MIT X11 license to MIT Expat licenses 2015-06-15 13:04:18 -07:00
Nobuhiko Tanibata c3fd624e29 ivi-shell: support surface screen shot of ivi_layout by using weston_surface_copy_content
The reason why the result is not output in the method is that it avoids
to have dependency on CAIRO. If user want to output it to file, user
shall link CAIRO on its controller.

ivi_layout_surface_get_size is also supported here because user needs
stride to call ivi_layout_surafce_dump.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-04-21 11:15:29 +03:00
Nobuhiko Tanibata ee8e5830be ivi-shell: rewrite controller API
This fixes the breakage caused by "ivi-shell: make ivi-layout.c as a
part of ivi-shell.so"

hmi-controller.c:
A reference implementation of controller module does not use the layout
functions directly. This get function pointers at controller_module_init
which called by ivi-shell.

ivi-layout-export.h:
Definition of interfaces in a struction: ivi_controller_interface.
function pointers are set at ivi-layout.c.

ivi-layout-private.h:
Definition of some interfaces are remove bucause it is implemented in
ivi-layout.c and set it as function pointer. Several interfaces are kept
here because they are implemented in ivi-layout.c/transition.c but used
in other files.

ivi-layout-transition.c:
remove WL_EXPORT because export is not needed anymore.
remove unnesesary unsed method.

ivi-shell.c:
call controller_module_init of hmi-controller to init it and set
function pointers. If the interface_version is equal or
greater than what hmi_controller was built with, things are pass.
If the interface_version is smaller than what the controller expects,
it has to fail because it cannot work. This is followed the manner,

- never remove a function pointer
- never modify an existing function signature
- additions are allowed at the end of struct ivi_controller_interface
- all function pointers must always be populated and working in
  ivi-shell.so (ivi-layout.c etc.)

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-12-15 16:50:48 +02:00
Nobuhiko Tanibata 6f9df656e0 ivi-shell: add IVI layout APIs
- ivi-layout.so
- introduces ivi-layout-export.h, ivi-layout.[ch]

API set of controlling properties of surface and layer which groups
surfaces. An unique ID whose type is integer is required to create
surface and layer. With the unique ID, surface and layer are identified
to control them. The API set consists of APIs to control properties of
surface and layers about followings,

- visibility.
- opacity.
- clipping (x,y,width,height).
- position and size of it to be displayed.
- orientation per 90 degree.
- add or remove surfaces to a layer.
- order of surfaces/layers in layer/screen to be displayed.
- commit to apply property changes.
- notifications of property change.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-12-04 17:13:41 +02:00