From 7c6a0c1ae994fa9ee1cb93fe745ed7062cc31e7e Mon Sep 17 00:00:00 2001 From: Janos Kovacs Date: Wed, 23 Jul 2014 10:06:16 +0300 Subject: [PATCH] downstream: ivi-shell/layout: add get_weston_surface() function to ivi_layout_interface Change-Id: If6c60f71ccff184a485895511d50837a04e2658c Signed-off-by: Janos Kovacs --- ivi-shell/ivi-layout-private.h | 3 +++ ivi-shell/ivi-layout.c | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/ivi-shell/ivi-layout-private.h b/ivi-shell/ivi-layout-private.h index 35cad2f..4113a93 100644 --- a/ivi-shell/ivi-layout-private.h +++ b/ivi-shell/ivi-layout-private.h @@ -293,6 +293,9 @@ ivi_layout_surface_set_transition_duration( uint32_t duration); struct ivi_layout_interface { + struct weston_surface* (*get_weston_surface)( + struct ivi_layout_surface *surface); + struct weston_view *(*get_weston_view)( struct ivi_layout_surface *surface); diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c index 6e90885..89908bb 100644 --- a/ivi-shell/ivi-layout.c +++ b/ivi-shell/ivi-layout.c @@ -2629,6 +2629,12 @@ ivi_layout_commit_changes(void) } /***called from ivi-shell**/ +static struct weston_surface * +ivi_layout_get_weston_surface(struct ivi_layout_surface *surface) +{ + return (surface != NULL) ? surface->surface : NULL; +} + static struct weston_view * ivi_layout_get_weston_view(struct ivi_layout_surface *surface) { @@ -2803,7 +2809,9 @@ ivi_layout_surface_add_configured_listener(struct ivi_layout_surface* ivisurf, wl_signal_add(&ivisurf->configured, listener); } + WL_EXPORT struct ivi_layout_interface ivi_layout_interface = { + .get_weston_surface = ivi_layout_get_weston_surface, .get_weston_view = ivi_layout_get_weston_view, .surface_configure = ivi_layout_surface_configure, .surface_create = ivi_layout_surface_create, -- 2.7.4