Commit ce9bc351 authored by eucan's avatar eucan Committed by Pekka Paalanen
Browse files

ivi-shell: register ivi_layout_interface


Signed-off-by: eucan's avatarEmre Ucan <eucan@de.adit-jv.com>
Reviewed-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
parent b809d79d
...@@ -59,6 +59,7 @@ extern "C" { ...@@ -59,6 +59,7 @@ extern "C" {
#include "stdbool.h" #include "stdbool.h"
#include "compositor.h" #include "compositor.h"
#include "plugin-registry.h"
#define IVI_SUCCEEDED (0) #define IVI_SUCCEEDED (0)
#define IVI_FAILED (-1) #define IVI_FAILED (-1)
...@@ -140,6 +141,8 @@ enum ivi_layout_transition_type{ ...@@ -140,6 +141,8 @@ enum ivi_layout_transition_type{
IVI_LAYOUT_TRANSITION_MAX, IVI_LAYOUT_TRANSITION_MAX,
}; };
#define IVI_LAYOUT_API_NAME "ivi_layout_api_v1"
struct ivi_layout_interface { struct ivi_layout_interface {
/** /**
...@@ -572,6 +575,16 @@ struct ivi_layout_interface { ...@@ -572,6 +575,16 @@ struct ivi_layout_interface {
struct ivi_layout_layer *removelayer); 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 #ifdef __cplusplus
} }
#endif /* __cplusplus */ #endif /* __cplusplus */
......
...@@ -1906,6 +1906,8 @@ ivi_layout_surface_create(struct weston_surface *wl_surface, ...@@ -1906,6 +1906,8 @@ ivi_layout_surface_create(struct weston_surface *wl_surface,
return ivisurf; return ivisurf;
} }
static struct ivi_layout_interface ivi_layout_interface;
void void
ivi_layout_init_with_compositor(struct weston_compositor *ec) ivi_layout_init_with_compositor(struct weston_compositor *ec)
{ {
...@@ -1934,6 +1936,10 @@ 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); layout->transitions = ivi_layout_transition_set_create(ec);
wl_list_init(&layout->pending_transition_list); 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 = { static struct ivi_layout_interface ivi_layout_interface = {
......
...@@ -425,8 +425,6 @@ ivi_shell_setting_create(struct ivi_shell_setting *dest, ...@@ -425,8 +425,6 @@ ivi_shell_setting_create(struct ivi_shell_setting *dest,
if (!dest->ivi_module && if (!dest->ivi_module &&
weston_config_section_get_string(section, "ivi-module", weston_config_section_get_string(section, "ivi-module",
&dest->ivi_module, NULL) < 0) { &dest->ivi_module, NULL) < 0) {
weston_log("Error: ivi-shell: No ivi-module set\n");
result = -1;
} }
weston_config_section_get_bool(section, "developermode", weston_config_section_get_bool(section, "developermode",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment