Whenever shell_surface_send_configure() is called
weston_desktop_surface_set_size() should be used instead for desktop
surfaces. It is already done for IVI_LAYOUT_TRANSITION_VIEW_FADE_ONLY, do
it everywhere else too.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
This too is a public installed header.
The public headers are moved under a new top-level directory include/ to make
them clearly stand out as special (public API).
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
The main idea is to make libweston users use the form
#include <libweston/libweston.h>
instead of the plain
#include <compositor.h>
which is prone to name conflicts. This is reflected both in the installed
files, and the internal header search paths so that Weston would use the exact
same form as an external project using libweston would.
The public headers are moved under a new top-level directory include/ to make
them clearly stand out as special (public API).
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Introduced signal configure_desktop_changed with interface. This signal
should be sent, when a desktop-surface is configured.
Signed-off-by: Michael Teyfel <mteyfel@de.adit-jv.com>
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>
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>
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>
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>
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>
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>
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>
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>
link_layer's sole purpose is to link a surface to multiple layers, if
the surface should be shown in multiple layers. This can be only
achieved, if the surface has multiple weston_views with different
transformation matrices.
Current implementation assumes in many places that a ivi_surface has
only one weston_view. Therefore, a surface can be only shown on one
layer.
Although this (a surface on multiple layers) is a nice to have feature
for ivi-shell, it is not very crucial. In any case, it is not an easy
task to implement this feature, because it has lot of corner cases.
I removed with this patch the link_layer data structure, because it does
not have any purpose in current implementation.
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>
[Pekka: Line-wrapped the commit message.]
link_screen's sole purpose is to link a layer to multiple screens, if
the layer should be shown in multiple screens. This can be only
achieved, if surfaces of the layer have multiple weston_views dedicated
to the different screens.
Current implementation assumes in many places that a ivi_surface has
only one weston_view. Therefore, a layer can be only shown on one
screen.
Although this (a layer on multiple screens) is a nice to have feature
for ivi-shell, it is not very crucial. In any case, it is not an easy
task to implement this feature, because it has lot of corner cases.
I removed with this patch the link_screen data structure, because it
does not have any purpose in current implementation.
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>
[Pekka: Line-wrapped commit message.]
It is only possible to remove a surface from the order.surface_list of a
layer, when ivi_layout_layer_set_render_order is called with an empty
array. Therefore, list of surfaces are cumulated if the API is called
many times with different list of surfaces.
Change how the flags are set:
- Introduce the dirty parameter for triggering the render order change.
- IVI_NOTIFICATION_REMOVE/ADD flags are set only at commit_layer_list.
Checking wl_list_empty() on a link offers no information: if it returns
true, wl_list_remove() is safe to do. If it returns false, you still do
not know if wl_list_remove() is safe; the link could be part of a list,
or the link could be "uninitialized" (e.g. just wl_list_remove()'d).
(From Pekka Paalanen's comment at
http://lists.freedesktop.org/archives/wayland-devel/2015-August/023987.html).
Calling wl_list_init just before wl_list_insert is redundant, because
the links of the list are not read before it is overwritten by
wl_list_insert.
Use assert to control if the ivilayer->order.surface_list is empty.
Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
[Pekka: wrapped the commit message]
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
[Earlier version Reviewed-by: Nobuhiko Tanibata
<NOBUHIKO_TANIBATA@xddp.denso.co.jp>]
Transform matrix for transforming a surface to global_matrix is
calculated from
* ivi_layout_surface_properties
* ivi_layout_layer_properties
This patch pareares sub-method like following,
1/ calc_surface_to_global_matrix()
calc_transformation_matrix() is called twice with
ivi_layout_surface/layer_properties respectively.
2/ calc_transformation_matrix()
This calcurates matrix from orientation, source rectangle and
destination rectangle.
2-1/ To calculate rotation, fit centor of source rectangle to (0,0)
temporarily. This is moved back in 2-4.
2-2/ Apply rotation variant
2-3/ Apply scale variant
2-4/ Apply positioning variant, taking account into 2-1 temporary
positioning.
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
To refactor transform of ivi_layout_surface and ivi_layout_surface to be
more readable logical flow.
Remove following parts once,
* definition of weston_transform in ivi_layout_surface
* update_layer_orientation
* update_layer_position
* update_surface_position
* update_surface_orientation
* update_scale
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
if a controller calls ivi_layout_layer_create_with_demenstion with a ID
which is already created before, the API returns exist ivi_layer.
However addtionally, it shall count up ref count to destroy ivi_layer
when ref count is 0. The previous code will destroy ivi_layer
immediately even if the other code still refers ivi_layer.
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
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>
ivi-layout.so is separately built and loaded by using dlopen with
RTLD_GLOBAL. This was because these apis defined in ivi-layout.so shall
be used by ivi-modules; e.g. hmi-controller. This shall be improved that
a struct ivi_layout_api contains the whole exported API as function
pointers to be exposed as module_init.
This patch alone builds, but loading controller modules at runtime
failes. This failure will be fixed by following patches.
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
- 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>