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-private.h b/ivi-shell/ivi-layout-private.h
index df3ac98..4531748 100644
--- a/ivi-shell/ivi-layout-private.h
+++ b/ivi-shell/ivi-layout-private.h
@@ -159,140 +159,6 @@
 is_surface_transition(struct ivi_layout_surface *surface);
 
 /**
- * \brief get ivi_layout_layer from id of layer
- *
- * \return (struct ivi_layout_layer *)
- *              if the method call was successful
- * \return NULL if the method call was failed
- */
-struct ivi_layout_layer *
-ivi_layout_get_layer_from_id(uint32_t id_layer);
-
-/**
- * \brief Remove a surface
- */
-void
-ivi_layout_surface_remove(struct ivi_layout_surface *ivisurf);
-
-/**
- * \brief Get all Layers of the given screen
- *
- * \return IVI_SUCCEEDED if the method call was successful
- * \return IVI_FAILED if the method call was failed
- */
-int32_t
-ivi_layout_get_layers_on_screen(struct ivi_layout_screen *iviscrn,
-				int32_t *pLength,
-				struct ivi_layout_layer ***ppArray);
-
-/**
- * \brief Get all Surfaces which are currently registered to a given
- * layer and are managed by the services
- *
- * \return IVI_SUCCEEDED if the method call was successful
- * \return IVI_FAILED if the method call was failed
- */
-int32_t
-ivi_layout_get_surfaces_on_layer(struct ivi_layout_layer *ivilayer,
-				 int32_t *pLength,
-				 struct ivi_layout_surface ***ppArray);
-
-/**
- * \brief Get the visibility of a layer. If a layer is not visible,
- * the layer and its surfaces will not be rendered.
- *
- * \return true if layer is visible
- * \return false if layer is invisible or the method call was failed
- */
-bool
-ivi_layout_layer_get_visibility(struct ivi_layout_layer *ivilayer);
-
-/**
- * \brief Get the horizontal and vertical dimension of the layer.
- *
- * \return IVI_SUCCEEDED if the method call was successful
- * \return IVI_FAILED if the method call was failed
- */
-int32_t
-ivi_layout_layer_get_dimension(struct ivi_layout_layer *ivilayer,
-			       int32_t *dest_width, int32_t *dest_height);
-
-/**
- * \brief Set the horizontal and vertical dimension of the layer.
- *
- * \return IVI_SUCCEEDED if the method call was successful
- * \return IVI_FAILED if the method call was failed
- */
-int32_t
-ivi_layout_layer_set_dimension(struct ivi_layout_layer *ivilayer,
-			       int32_t dest_width, int32_t dest_height);
-
-/**
- * \brief Gets the orientation of a layer.
- *
- * \return (enum wl_output_transform)
- *              if the method call was successful
- * \return WL_OUTPUT_TRANSFORM_NORMAL if the method call was failed
- */
-enum wl_output_transform
-ivi_layout_layer_get_orientation(struct ivi_layout_layer *ivilayer);
-
-/**
- * \brief Set the horizontal and vertical dimension of the surface.
- *
- * \return IVI_SUCCEEDED if the method call was successful
- * \return IVI_FAILED if the method call was failed
- */
-int32_t
-ivi_layout_surface_set_dimension(struct ivi_layout_surface *ivisurf,
-				 int32_t dest_width, int32_t dest_height);
-
-/**
- * \brief Get the horizontal and vertical dimension of the surface.
- *
- * \return IVI_SUCCEEDED if the method call was successful
- * \return IVI_FAILED if the method call was failed
- */
-int32_t
-ivi_layout_surface_get_dimension(struct ivi_layout_surface *ivisurf,
-				 int32_t *dest_width, int32_t *dest_height);
-
-/**
- * \brief Sets the horizontal and vertical position of the surface.
- *
- * \return IVI_SUCCEEDED if the method call was successful
- * \return IVI_FAILED if the method call was failed
- */
-int32_t
-ivi_layout_surface_set_position(struct ivi_layout_surface *ivisurf,
-				int32_t dest_x, int32_t dest_y);
-
-/**
- * \brief Get the horizontal and vertical position of the surface.
- *
- * \return IVI_SUCCEEDED if the method call was successful
- * \return IVI_FAILED if the method call was failed
- */
-int32_t
-ivi_layout_surface_get_position(struct ivi_layout_surface *ivisurf,
-				int32_t *dest_x, int32_t *dest_y);
-
-/**
- * \brief Gets the orientation of a surface.
- *
- * \return (enum wl_output_transform)
- *              if the method call was successful
- * \return WL_OUTPUT_TRANSFORM_NORMAL if the method call was failed
- */
-enum wl_output_transform
-ivi_layout_surface_get_orientation(struct ivi_layout_surface *ivisurf);
-
-int32_t
-ivi_layout_surface_set_transition_duration(
-			struct ivi_layout_surface *ivisurf,
-			uint32_t duration);
-
-/**
  * methods of interaction between ivi-shell with ivi-layout
  */
 struct weston_view *
@@ -311,4 +177,50 @@
 void
 ivi_layout_surface_add_configured_listener(struct ivi_layout_surface* ivisurf,
 					   struct wl_listener* listener);
+/**
+ * methods of interaction between transition animation with ivi-layout
+ */
+int32_t
+ivi_layout_commit_changes(void);
+uint32_t
+ivi_layout_get_id_of_surface(struct ivi_layout_surface *ivisurf);
+int32_t
+ivi_layout_surface_set_destination_rectangle(struct ivi_layout_surface *ivisurf,
+					     int32_t x, int32_t y,
+					     int32_t width, int32_t height);
+int32_t
+ivi_layout_surface_set_opacity(struct ivi_layout_surface *ivisurf,
+			       wl_fixed_t opacity);
+wl_fixed_t
+ivi_layout_surface_get_opacity(struct ivi_layout_surface *ivisurf);
+int32_t
+ivi_layout_surface_set_visibility(struct ivi_layout_surface *ivisurf,
+				  bool newVisibility);
+bool
+ivi_layout_surface_get_visibility(struct ivi_layout_surface *ivisurf);
+struct ivi_layout_surface *
+ivi_layout_get_surface_from_id(uint32_t id_surface);
+int32_t
+ivi_layout_layer_set_opacity(struct ivi_layout_layer *ivilayer,
+			     wl_fixed_t opacity);
+wl_fixed_t
+ivi_layout_layer_get_opacity(struct ivi_layout_layer *ivilayer);
+int32_t
+ivi_layout_layer_set_visibility(struct ivi_layout_layer *ivilayer,
+				bool newVisibility);
+int32_t
+ivi_layout_layer_set_position(struct ivi_layout_layer *ivilayer,
+			      int32_t dest_x, int32_t dest_y);
+int32_t
+ivi_layout_layer_get_position(struct ivi_layout_layer *ivilayer,
+			      int32_t *dest_x, int32_t *dest_y);
+int32_t
+ivi_layout_layer_set_render_order(struct ivi_layout_layer *ivilayer,
+				  struct ivi_layout_surface **pSurface,
+				  int32_t number);
+void
+ivi_layout_transition_move_layer_cancel(struct ivi_layout_layer *layer);
+int
+load_controller_modules(struct weston_compositor *compositor, const char *modules,
+			int *argc, char *argv[]);
 #endif