Use an event struct to pass axis events around. This helps dealing with the
upcoming axis discrete changes.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
It shows ivi applications at screensa randomly.
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
It shows ivi applications in fullscreen per screen like,
The first screen: Application 1,4,5,6,,,,
The seconed screen: Application 2,
The third screen: Application 3
Thie mode assigns one application to each screen at first. And remaind
applications more than screens will be assigned to the first screen.
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
It shows 2 ivi application in a screen at side-by-side. It moves
additinal application more than 2xN to next screen N+1.
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
It shows 8 ivi applications in a screen at tiling. It moves additional
application more than 8xN to next screen N+1.
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
To locate surfaces of application on multi screens, multi layers are
created baseod on application-layer-id + base-layer-id-offset x N.
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
A surface ID for layer of background/panel image is set by key: background-id
or panel-id at weston.ini. To support multi screens, it also support offset,
surface-id-offset, to offset the surface ID to next ID for a layer on next
screen.
According to the above key, hmi-controller and ivi-shell-user-interface
who increments the number of screens per notification of wl_output.
crate surface and draw background/panel image on multi surface on screens.
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
A layer ID for screen is set by key: base-layer-id at weston.ini. To
support multi screens. It also support offset to offset the layer ID
to next ID for next screen.
For example,
base-layer-id=1000
base-layer-id-offset=10000
Layer id for screen 0: 1000
Layer id for screen 1: 11000
Layer id for screen 2: 21000
To support multi screen, create layers for background and panel bar which
located in the below per screens. At the moment, it is only layers.
Surfaces to be created at next patch in the patch set.
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
- get screens from weston core
- provide screens as internel method
- the iviscn is stored in array inverse order in index.
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Instead of only passing absolute pointer coordinates, effectively
loosing motion event data, pass a struct that can potentially contain
different types of motion events, currently being absolute and relative.
A helper function to get resulting absolute coordinates was added for
when previous callbacks simply used the (x, y) coordinates.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Don't only send motions and buttons but also axis events through the
pointer grab interface.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
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>
A layer for workspace is used to display icons for invoking applications
in several pages. These pages are swapped from one to next page. The
width of the layer was decided as a size of screen before reading
weston.ini. This worked correctly because there was no feature of
clipping of layer so the width of layer was not taken account.
Now clipping feature is supported. So the width shall be set to correct
one after reading weston.ini.
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Keyboards and pointers aren't freed when devices are removed, so we should
really be testing keyboard_device_count and pointer_device_count in most
cases, not the actual pointers. Otherwise we end up with different
behaviour after removing a device than we had before it was inserted.
This commit renames the touch/keyboard/pointer pointers and adds helper
functions to get them that hide this complexity and return NULL when
*_device_count is 0.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Removed duplicate definitions of the container_of() macro and
refactored sources to use the single implementation.
Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
When application changes the size of its content, UI shall fit the source
rectangle, view area, to the size of its content to show whole content.
Signed-off-by: Nobuhiko Tanibata <nobuhiko_tanibata@xddp.denso.co.jp>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
of application launching. This is because cancel callback is mistakenly
set to weston_touch_grab_interface. To fix this issue, add a
callback, touch_move_workspace_grab_frame and set it to the
weston_touch_grab_interface like desktop-shell.
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
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_transition_layer_render_order is not necesary called. Remove
the method and methods called by it.
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
- hmi-controller.so
- introduces hmi-controller.so
The library is used to manage layout of surfaces/layers. Layout change
is triggered by ivi-hmi-controller protocol, ivi-hmi-controller.xml. A
reference how to use the protocol, see ivi-shell-user-interface.c.
In-Vehicle Infotainment system usually manages properties of
surfaces/layers by only a central component which decide where
surfaces/layers shall be. This is differenct use case from desktop
style; each application can request property of its window via xdg-shell
protocol, like fullscreen and set its to top level. In-Vehicle
Infortainment system doesn't allow each application to chagen them from
its application because of safty reasons. The concept of layer is
simillar with a use case of cursor layer of Destop. For In-Vehicle
Infortainment system, it is extended to all applications. For example,
rearview camera application is assigned to a layer to group several
surfaces, e.g. captured image and drawing lines separately. Central
manaegr can control property of the layer of rearview camera.
This reference show examples to implement the central component as a
module of weston.
Default Scene graph of UI is defined in hmi_controller_create. It
consists of
- In the bottom, a base layer to group surfaces of background, panel,
and buttons
- Next, a application layer to show application surfaces.
- Workspace background layer to show a surface of background image.
- Workspace layer to show launcher to launch application with icons.
Paths to binary and icon are defined in weston.ini. The width of
this layer is longer than the size of screen because a workspace
has several pages and is controlled by motion of input.
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>