ivi-shell: add API for weston_surface -> ivi_layout_surface

Graphics / Wayland / Weston - Pekka Paalanen [collabora.co.uk] - 1 June 2016 03:06 UTC

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.

eaa43fc ivi-shell: add API for weston_surface -> ivi_layout_surface
ivi-shell/ivi-layout-export.h | 9 +++++++++
ivi-shell/ivi-layout.c | 1 +
ivi-shell/ivi-shell.c | 12 ++++++++++++
ivi-shell/ivi-shell.h | 5 +++++
4 files changed, 27 insertions(+)

Upstream: cgit.freedesktop.org


  • Share