aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Antognolli <rafael.antognolli@intel.com>2013-10-11 14:10:30 -0300
committerRafael Antognolli <rafael.antognolli@intel.com>2013-10-11 14:26:34 -0300
commitc4f1e67686d05fa29215a173d40be6f973f91840 (patch)
tree0e23f0750b45867696c447435e9c05cd34815bdb
parentRevert "Revert "eina: use Eina_Spinlock for Eina_Chained_Mempool."" (diff)
downloadefl-c4f1e67686d05fa29215a173d40be6f973f91840.tar.gz
ecore/wayland: Do not generate subsurface source files.
Add them to the tree, so they don't need to be generated again on each build. Also remove the autofoo code used for generating them.
-rw-r--r--configure.ac1
-rw-r--r--src/Makefile_Ecore_Wayland.am18
-rw-r--r--src/lib/ecore_wayland/.gitignore2
-rw-r--r--src/lib/ecore_wayland/subsurface-client-protocol.h167
-rw-r--r--src/lib/ecore_wayland/subsurface-protocol.c71
5 files changed, 239 insertions, 20 deletions
diff --git a/configure.ac b/configure.ac
index 8938381bcc..74331770f9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1008,7 +1008,6 @@ AC_ARG_ENABLE([wayland],
if test "${want_wayland}" = "yes"; then
EFL_PKG_CHECK_STRICT([wayland-client])
- AC_PATH_PROG([wayland_scanner], [wayland-scanner], [AC_MSG_ERROR("wayland-scanner is needed to compile ecore_wayland protocol")])
fi
# Fb
diff --git a/src/Makefile_Ecore_Wayland.am b/src/Makefile_Ecore_Wayland.am
index b2c66a19cb..f11c3a5f74 100644
--- a/src/Makefile_Ecore_Wayland.am
+++ b/src/Makefile_Ecore_Wayland.am
@@ -15,29 +15,13 @@ lib/ecore_wayland/ecore_wl_input.c \
lib/ecore_wayland/ecore_wl_output.c \
lib/ecore_wayland/ecore_wl_window.c \
lib/ecore_wayland/ecore_wl_subsurf.c \
-lib/ecore_wayland/ecore_wl_private.h
-
-lib_ecore_wayland_libecore_wayland_la_BUILT_SOURCES = \
+lib/ecore_wayland/ecore_wl_private.h \
lib/ecore_wayland/subsurface-protocol.c \
lib/ecore_wayland/subsurface-client-protocol.h
-CLEANFILES += $(lib_ecore_wayland_libecore_wayland_la_BUILT_SOURCES)
-
-lib_ecore_wayland_libecore_wayland_la_SOURCES += $(lib_ecore_wayland_libecore_wayland_la_BUILT_SOURCES)
-
-BUILT_SOURCES += $(lib_ecore_wayland_libecore_wayland_la_BUILT_SOURCES)
-
lib_ecore_wayland_libecore_wayland_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl @ECORE_WAYLAND_CFLAGS@
lib_ecore_wayland_libecore_wayland_la_LIBADD = @ECORE_WAYLAND_LIBS@
lib_ecore_wayland_libecore_wayland_la_DEPENDENCIES = @ECORE_WAYLAND_INTERNAL_LIBS@
lib_ecore_wayland_libecore_wayland_la_LDFLAGS = @EFL_LTLIBRARY_FLAGS@
-wayland_protocoldir = $(top_srcdir)/data/ecore/ecore_wayland/protocol
-
-lib/ecore_wayland/subsurface-protocol.c: $(wayland_protocoldir)/subsurface.xml
- $(AM_V_GEN)$(wayland_scanner) code < $< > $@
-
-lib/ecore_wayland/subsurface-client-protocol.h: $(wayland_protocoldir)/subsurface.xml
- $(AM_V_GEN)$(wayland_scanner) client-header < $< > $@
-
endif
diff --git a/src/lib/ecore_wayland/.gitignore b/src/lib/ecore_wayland/.gitignore
deleted file mode 100644
index ce73befd85..0000000000
--- a/src/lib/ecore_wayland/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-subsurface-protocol.c
-subsurface-client-protocol.h
diff --git a/src/lib/ecore_wayland/subsurface-client-protocol.h b/src/lib/ecore_wayland/subsurface-client-protocol.h
new file mode 100644
index 0000000000..5161589552
--- /dev/null
+++ b/src/lib/ecore_wayland/subsurface-client-protocol.h
@@ -0,0 +1,167 @@
+/*
+ * Copyright © 2012-2013 Collabora, Ltd.
+ *
+ * Permission to use, copy, modify, distribute, and sell this
+ * software and its documentation for any purpose is hereby granted
+ * without fee, provided that the above copyright notice appear in
+ * all copies and that both that copyright notice and this permission
+ * notice appear in supporting documentation, and that the name of
+ * the copyright holders not be used in advertising or publicity
+ * pertaining to distribution of the software without specific,
+ * written prior permission. The copyright holders make no
+ * representations about the suitability of this software for any
+ * purpose. It is provided "as is" without express or implied
+ * warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
+ * THIS SOFTWARE.
+ */
+
+#ifndef SUBSURFACE_CLIENT_PROTOCOL_H
+#define SUBSURFACE_CLIENT_PROTOCOL_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stdint.h>
+#include <stddef.h>
+#include "wayland-client.h"
+
+struct wl_client;
+struct wl_resource;
+
+struct wl_subcompositor;
+struct wl_subsurface;
+
+extern const struct wl_interface wl_subcompositor_interface;
+extern const struct wl_interface wl_subsurface_interface;
+
+#ifndef WL_SUBCOMPOSITOR_ERROR_ENUM
+#define WL_SUBCOMPOSITOR_ERROR_ENUM
+enum wl_subcompositor_error {
+ WL_SUBCOMPOSITOR_ERROR_BAD_SURFACE = 0,
+};
+#endif /* WL_SUBCOMPOSITOR_ERROR_ENUM */
+
+#define WL_SUBCOMPOSITOR_DESTROY 0
+#define WL_SUBCOMPOSITOR_GET_SUBSURFACE 1
+
+static inline void
+wl_subcompositor_set_user_data(struct wl_subcompositor *wl_subcompositor, void *user_data)
+{
+ wl_proxy_set_user_data((struct wl_proxy *) wl_subcompositor, user_data);
+}
+
+static inline void *
+wl_subcompositor_get_user_data(struct wl_subcompositor *wl_subcompositor)
+{
+ return wl_proxy_get_user_data((struct wl_proxy *) wl_subcompositor);
+}
+
+static inline void
+wl_subcompositor_destroy(struct wl_subcompositor *wl_subcompositor)
+{
+ wl_proxy_marshal((struct wl_proxy *) wl_subcompositor,
+ WL_SUBCOMPOSITOR_DESTROY);
+
+ wl_proxy_destroy((struct wl_proxy *) wl_subcompositor);
+}
+
+static inline struct wl_subsurface *
+wl_subcompositor_get_subsurface(struct wl_subcompositor *wl_subcompositor, struct wl_surface *surface, struct wl_surface *parent)
+{
+ struct wl_proxy *id;
+
+ id = wl_proxy_create((struct wl_proxy *) wl_subcompositor,
+ &wl_subsurface_interface);
+ if (!id)
+ return NULL;
+
+ wl_proxy_marshal((struct wl_proxy *) wl_subcompositor,
+ WL_SUBCOMPOSITOR_GET_SUBSURFACE, id, surface, parent);
+
+ return (struct wl_subsurface *) id;
+}
+
+#ifndef WL_SUBSURFACE_ERROR_ENUM
+#define WL_SUBSURFACE_ERROR_ENUM
+enum wl_subsurface_error {
+ WL_SUBSURFACE_ERROR_BAD_SURFACE = 0,
+};
+#endif /* WL_SUBSURFACE_ERROR_ENUM */
+
+#define WL_SUBSURFACE_DESTROY 0
+#define WL_SUBSURFACE_SET_POSITION 1
+#define WL_SUBSURFACE_PLACE_ABOVE 2
+#define WL_SUBSURFACE_PLACE_BELOW 3
+#define WL_SUBSURFACE_SET_SYNC 4
+#define WL_SUBSURFACE_SET_DESYNC 5
+
+static inline void
+wl_subsurface_set_user_data(struct wl_subsurface *wl_subsurface, void *user_data)
+{
+ wl_proxy_set_user_data((struct wl_proxy *) wl_subsurface, user_data);
+}
+
+static inline void *
+wl_subsurface_get_user_data(struct wl_subsurface *wl_subsurface)
+{
+ return wl_proxy_get_user_data((struct wl_proxy *) wl_subsurface);
+}
+
+static inline void
+wl_subsurface_destroy(struct wl_subsurface *wl_subsurface)
+{
+ wl_proxy_marshal((struct wl_proxy *) wl_subsurface,
+ WL_SUBSURFACE_DESTROY);
+
+ wl_proxy_destroy((struct wl_proxy *) wl_subsurface);
+}
+
+static inline void
+wl_subsurface_set_position(struct wl_subsurface *wl_subsurface, int32_t x, int32_t y)
+{
+ wl_proxy_marshal((struct wl_proxy *) wl_subsurface,
+ WL_SUBSURFACE_SET_POSITION, x, y);
+}
+
+static inline void
+wl_subsurface_place_above(struct wl_subsurface *wl_subsurface, struct wl_surface *sibling)
+{
+ wl_proxy_marshal((struct wl_proxy *) wl_subsurface,
+ WL_SUBSURFACE_PLACE_ABOVE, sibling);
+}
+
+static inline void
+wl_subsurface_place_below(struct wl_subsurface *wl_subsurface, struct wl_surface *sibling)
+{
+ wl_proxy_marshal((struct wl_proxy *) wl_subsurface,
+ WL_SUBSURFACE_PLACE_BELOW, sibling);
+}
+
+static inline void
+wl_subsurface_set_sync(struct wl_subsurface *wl_subsurface)
+{
+ wl_proxy_marshal((struct wl_proxy *) wl_subsurface,
+ WL_SUBSURFACE_SET_SYNC);
+}
+
+static inline void
+wl_subsurface_set_desync(struct wl_subsurface *wl_subsurface)
+{
+ wl_proxy_marshal((struct wl_proxy *) wl_subsurface,
+ WL_SUBSURFACE_SET_DESYNC);
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/src/lib/ecore_wayland/subsurface-protocol.c b/src/lib/ecore_wayland/subsurface-protocol.c
new file mode 100644
index 0000000000..986c72a66c
--- /dev/null
+++ b/src/lib/ecore_wayland/subsurface-protocol.c
@@ -0,0 +1,71 @@
+/*
+ * Copyright © 2012-2013 Collabora, Ltd.
+ *
+ * Permission to use, copy, modify, distribute, and sell this
+ * software and its documentation for any purpose is hereby granted
+ * without fee, provided that the above copyright notice appear in
+ * all copies and that both that copyright notice and this permission
+ * notice appear in supporting documentation, and that the name of
+ * the copyright holders not be used in advertising or publicity
+ * pertaining to distribution of the software without specific,
+ * written prior permission. The copyright holders make no
+ * representations about the suitability of this software for any
+ * purpose. It is provided "as is" without express or implied
+ * warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
+ * THIS SOFTWARE.
+ */
+
+#include <stdlib.h>
+#include <stdint.h>
+#include "wayland-util.h"
+
+extern const struct wl_interface wl_subsurface_interface;
+extern const struct wl_interface wl_surface_interface;
+extern const struct wl_interface wl_surface_interface;
+extern const struct wl_interface wl_surface_interface;
+extern const struct wl_interface wl_surface_interface;
+
+static const struct wl_interface *types[] = {
+ NULL,
+ NULL,
+ &wl_subsurface_interface,
+ &wl_surface_interface,
+ &wl_surface_interface,
+ &wl_surface_interface,
+ &wl_surface_interface,
+};
+
+static const struct wl_message wl_subcompositor_requests[] = {
+ { "destroy", "", types + 0 },
+ { "get_subsurface", "noo", types + 2 },
+};
+
+WL_EXPORT const struct wl_interface wl_subcompositor_interface = {
+ "wl_subcompositor", 1,
+ 2, wl_subcompositor_requests,
+ 0, NULL,
+};
+
+static const struct wl_message wl_subsurface_requests[] = {
+ { "destroy", "", types + 0 },
+ { "set_position", "ii", types + 0 },
+ { "place_above", "o", types + 5 },
+ { "place_below", "o", types + 6 },
+ { "set_sync", "", types + 0 },
+ { "set_desync", "", types + 0 },
+};
+
+WL_EXPORT const struct wl_interface wl_subsurface_interface = {
+ "wl_subsurface", 1,
+ 6, wl_subsurface_requests,
+ 0, NULL,
+};
+