Signed-off-by: Emre Ucan <eu...@de.adit-jv.com>
Acked-by: Pekka Paalanen <pekka.paala...@collabora.co.uk>
---
 ivi-shell/ivi-layout-export.h | 13 +++++++++++++
 ivi-shell/ivi-layout.c        |  6 ++++++
 ivi-shell/ivi-shell.c         |  2 --
 3 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/ivi-shell/ivi-layout-export.h b/ivi-shell/ivi-layout-export.h
index 277ac59..c15c7f8 100644
--- a/ivi-shell/ivi-layout-export.h
+++ b/ivi-shell/ivi-layout-export.h
@@ -59,6 +59,7 @@ extern "C" {
 
 #include "stdbool.h"
 #include "compositor.h"
+#include "plugin-registry.h"
 
 #define IVI_SUCCEEDED (0)
 #define IVI_FAILED (-1)
@@ -140,6 +141,8 @@ enum ivi_layout_transition_type{
        IVI_LAYOUT_TRANSITION_MAX,
 };
 
+#define IVI_LAYOUT_API_NAME "ivi_layout_api_v1"
+
 struct ivi_layout_interface {
 
        /**
@@ -572,6 +575,16 @@ struct ivi_layout_interface {
                                       struct ivi_layout_layer *removelayer);
 };
 
+static inline const struct ivi_layout_interface *
+ivi_layout_get_api(struct weston_compositor *compositor)
+{
+       const void *api;
+       api = weston_plugin_api_get(compositor, IVI_LAYOUT_API_NAME,
+                                   sizeof(struct ivi_layout_interface));
+
+       return (const struct ivi_layout_interface *)api;
+}
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */
diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c
index 394179b..a11b658 100644
--- a/ivi-shell/ivi-layout.c
+++ b/ivi-shell/ivi-layout.c
@@ -1906,6 +1906,8 @@ ivi_layout_surface_create(struct weston_surface 
*wl_surface,
        return ivisurf;
 }
 
+static struct ivi_layout_interface ivi_layout_interface;
+
 void
 ivi_layout_init_with_compositor(struct weston_compositor *ec)
 {
@@ -1934,6 +1936,10 @@ ivi_layout_init_with_compositor(struct weston_compositor 
*ec)
 
        layout->transitions = ivi_layout_transition_set_create(ec);
        wl_list_init(&layout->pending_transition_list);
+
+       weston_plugin_api_register(ec, IVI_LAYOUT_API_NAME,
+                                  &ivi_layout_interface,
+                                  sizeof(struct ivi_layout_interface));
 }
 
 static struct ivi_layout_interface ivi_layout_interface = {
diff --git a/ivi-shell/ivi-shell.c b/ivi-shell/ivi-shell.c
index 766a1fd..c096954 100644
--- a/ivi-shell/ivi-shell.c
+++ b/ivi-shell/ivi-shell.c
@@ -425,8 +425,6 @@ ivi_shell_setting_create(struct ivi_shell_setting *dest,
        if (!dest->ivi_module &&
            weston_config_section_get_string(section, "ivi-module",
                                             &dest->ivi_module, NULL) < 0) {
-               weston_log("Error: ivi-shell: No ivi-module set\n");
-               result = -1;
        }
 
        weston_config_section_get_bool(section, "developermode",
-- 
2.7.4

_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to