summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPekka Paalanen <pekka.paalanen@collabora.co.uk>2016-03-15 17:21:00 +0200
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>2016-03-16 13:11:20 +0200
commit32ca791df8f855898e007512f3b996a66ffcb09c (patch)
treeb4c1a0d74c46003c940874a4ca5163d217f10acb
parent4a7503976b5d300a4474b149d877cf579c2a8c05 (diff)
ivi-shell: introduce ivi-layout-shell.h
This new header encapsulates the API that ivi-layout offers to ivi-shell.c to call. ivi-shell.c no longer uses ivi-layout-private.h. This limits the ivi-layout internal structures to just ivi-layout code. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Emre Ucan <eucan@de.adit-jv.com>
-rw-r--r--Makefile.am1
-rw-r--r--ivi-shell/ivi-layout-private.h20
-rw-r--r--ivi-shell/ivi-layout-shell.h67
-rw-r--r--ivi-shell/ivi-layout.c1
-rw-r--r--ivi-shell/ivi-shell.c2
5 files changed, 71 insertions, 20 deletions
diff --git a/Makefile.am b/Makefile.am
index fe08d949..318a8376 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -893,6 +893,7 @@ ivi_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
ivi_shell_la_SOURCES = \
ivi-shell/ivi-layout-export.h \
ivi-shell/ivi-layout-private.h \
+ ivi-shell/ivi-layout-shell.h \
ivi-shell/ivi-layout.c \
ivi-shell/ivi-layout-transition.c \
ivi-shell/ivi-shell.h \
diff --git a/ivi-shell/ivi-layout-private.h b/ivi-shell/ivi-layout-private.h
index 118a6d6a..7bea2fac 100644
--- a/ivi-shell/ivi-layout-private.h
+++ b/ivi-shell/ivi-layout-private.h
@@ -155,20 +155,6 @@ void
ivi_layout_remove_all_surface_transitions(struct ivi_layout_surface *surface);
/**
- * methods of interaction between ivi-shell with ivi-layout
- */
-struct weston_view *
-ivi_layout_get_weston_view(struct ivi_layout_surface *surface);
-void
-ivi_layout_surface_configure(struct ivi_layout_surface *ivisurf,
- int32_t width, int32_t height);
-struct ivi_layout_surface*
-ivi_layout_surface_create(struct weston_surface *wl_surface,
- uint32_t id_surface);
-void
-ivi_layout_init_with_compositor(struct weston_compositor *ec);
-
-/**
* methods of interaction between transition animation with ivi-layout
*/
int32_t
@@ -203,9 +189,5 @@ ivi_layout_layer_set_render_order(struct ivi_layout_layer *ivilayer,
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[]);
-void
-ivi_layout_surface_destroy(struct ivi_layout_surface *ivisurf);
+
#endif
diff --git a/ivi-shell/ivi-layout-shell.h b/ivi-shell/ivi-layout-shell.h
new file mode 100644
index 00000000..caa7ff11
--- /dev/null
+++ b/ivi-shell/ivi-layout-shell.h
@@ -0,0 +1,67 @@
+/*
+ * Copyright (C) 2014 DENSO CORPORATION
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+#ifndef IVI_LAYOUT_SHELL_H
+#define IVI_LAYOUT_SHELL_H
+
+#include <stdint.h>
+
+/*
+ * This is the interface that ivi-layout exposes to ivi-shell.
+ * It is private to ivi-shell.so plugin.
+ */
+
+struct wl_listener;
+struct weston_compositor;
+struct weston_view;
+struct weston_surface;
+struct ivi_layout_surface;
+
+struct weston_view *
+ivi_layout_get_weston_view(struct ivi_layout_surface *surface);
+
+void
+ivi_layout_surface_configure(struct ivi_layout_surface *ivisurf,
+ int32_t width, int32_t height);
+
+struct ivi_layout_surface*
+ivi_layout_surface_create(struct weston_surface *wl_surface,
+ uint32_t id_surface);
+
+void
+ivi_layout_init_with_compositor(struct weston_compositor *ec);
+
+void
+ivi_layout_surface_add_configured_listener(struct ivi_layout_surface *ivisurf,
+ struct wl_listener *listener);
+
+void
+ivi_layout_surface_destroy(struct ivi_layout_surface *ivisurf);
+
+int
+load_controller_modules(struct weston_compositor *compositor, const char *modules,
+ int *argc, char *argv[]);
+
+#endif /* IVI_LAYOUT_SHELL_H */
diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c
index 204ead02..390617c6 100644
--- a/ivi-shell/ivi-layout.c
+++ b/ivi-shell/ivi-layout.c
@@ -64,6 +64,7 @@
#include "ivi-shell.h"
#include "ivi-layout-export.h"
#include "ivi-layout-private.h"
+#include "ivi-layout-shell.h"
#include "shared/helpers.h"
#include "shared/os-compatibility.h"
diff --git a/ivi-shell/ivi-shell.c b/ivi-shell/ivi-shell.c
index 7a537698..2ff37847 100644
--- a/ivi-shell/ivi-shell.c
+++ b/ivi-shell/ivi-shell.c
@@ -44,7 +44,7 @@
#include "ivi-shell.h"
#include "ivi-application-server-protocol.h"
#include "ivi-layout-export.h"
-#include "ivi-layout-private.h"
+#include "ivi-layout-shell.h"
#include "shared/helpers.h"
/* Representation of ivi_surface protocol object. */