ivi-shell: add API for weston_surface -> ivi_layout_surface
authorPekka Paalanen <pekka.paalanen@collabora.co.uk>
Tue, 12 Apr 2016 13:06:58 +0000 (16:06 +0300)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Wed, 1 Jun 2016 08:06:49 +0000 (11:06 +0300)
commiteaa43fc3103d67fe0182994032e851d10a2521a3
tree57825b33b4c07a10e34063304e66b5cd9f51f94b
parentf9d46ed2dd76adbf4da850d083c22634c383ba25
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>
ivi-shell/ivi-layout-export.h
ivi-shell/ivi-layout.c
ivi-shell/ivi-shell.c
ivi-shell/ivi-shell.h