ivi-shell: rewrite controller API
This fixes the breakage caused by "ivi-shell: make ivi-layout.c as a
part of ivi-shell.so"
hmi-controller.c:
A reference implementation of controller module does not use the layout
functions directly. This get function pointers at controller_module_init
which called by ivi-shell.
ivi-layout-export.h:
Definition of interfaces in a struction: ivi_controller_interface.
function pointers are set at ivi-layout.c.
ivi-layout-private.h:
Definition of some interfaces are remove bucause it is implemented in
ivi-layout.c and set it as function pointer. Several interfaces are kept
here because they are implemented in ivi-layout.c/transition.c but used
in other files.
ivi-layout-transition.c:
remove WL_EXPORT because export is not needed anymore.
remove unnesesary unsed method.
ivi-shell.c:
call controller_module_init of hmi-controller to init it and set
function pointers. If the interface_version is equal or
greater than what hmi_controller was built with, things are pass.
If the interface_version is smaller than what the controller expects,
it has to fail because it cannot work. This is followed the manner,
- never remove a function pointer
- never modify an existing function signature
- additions are allowed at the end of struct ivi_controller_interface
- all function pointers must always be populated and working in
ivi-shell.so (ivi-layout.c etc.)
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
diff --git a/ivi-shell/ivi-layout-transition.c b/ivi-shell/ivi-layout-transition.c
index 8b8261e..1e9ee23 100644
--- a/ivi-shell/ivi-layout-transition.c
+++ b/ivi-shell/ivi-layout-transition.c
@@ -76,7 +76,7 @@
return NULL;
}
-WL_EXPORT int32_t
+int32_t
is_surface_transition(struct ivi_layout_surface *surface)
{
struct ivi_layout *layout = get_instance();
@@ -156,7 +156,7 @@
return 1;
}
-WL_EXPORT struct ivi_layout_transition_set *
+struct ivi_layout_transition_set *
ivi_layout_transition_set_create(struct weston_compositor *ec)
{
struct ivi_layout_transition_set *transitions;
@@ -359,7 +359,7 @@
return transition;
}
-WL_EXPORT void
+void
ivi_layout_transition_move_resize_view(struct ivi_layout_surface *surface,
int32_t dest_x, int32_t dest_y,
int32_t dest_width, int32_t dest_height,
@@ -512,7 +512,7 @@
transition->user_data = NULL;
}
-WL_EXPORT void
+void
ivi_layout_transition_visibility_on(struct ivi_layout_surface *surface,
uint32_t duration)
{
@@ -577,7 +577,7 @@
transition->user_data= NULL;
}
-WL_EXPORT void
+void
ivi_layout_transition_visibility_off(struct ivi_layout_surface *surface,
uint32_t duration)
{
@@ -703,7 +703,7 @@
return transition;
}
-WL_EXPORT void
+void
ivi_layout_transition_move_layer(struct ivi_layout_layer *layer,
int32_t dest_x, int32_t dest_y,
uint32_t duration)
@@ -726,7 +726,7 @@
return;
}
-WL_EXPORT void
+void
ivi_layout_transition_move_layer_cancel(struct ivi_layout_layer *layer)
{
struct ivi_layout_transition *transition =
@@ -779,7 +779,7 @@
return data->layer == layer;
}
-WL_EXPORT void
+void
ivi_layout_transition_fade_layer(
struct ivi_layout_layer *layer,
uint32_t is_fade_in,