downstream: ivi-shell/layout: add get_weston_surface() function to ivi_layout_interface
authorJanos Kovacs <jankovac503@gmail.com>
Wed, 23 Jul 2014 07:06:16 +0000 (10:06 +0300)
committerJanos Kovacs <jankovac503@gmail.com>
Wed, 10 Dec 2014 14:28:04 +0000 (16:28 +0200)
Change-Id: If6c60f71ccff184a485895511d50837a04e2658c
Signed-off-by: Janos Kovacs <jankovac503@gmail.com>
ivi-shell/ivi-layout-private.h
ivi-shell/ivi-layout.c

index 35cad2f..4113a93 100644 (file)
@@ -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);
 
index 6e90885..89908bb 100644 (file)
@@ -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,