PKG_CHECK_MODULES([CHECK], [check >= 0.9.8])
PKG_CHECK_MODULES(CAIRO, [cairo >= 1.10.0])
PKG_CHECK_MODULES(WAYLAND, [wayland-client wayland-egl])
+PKG_CHECK_MODULES(WAYLAND_SERVER, [wayland-server])
PKG_CHECK_MODULES(EFL, [elementary ecore-wayland evas-wayland-egl evas-wayland-shm])
# TODO: Add support to conditionally build EFL suite, Core suite, etc...
+WAYLAND_SCANNER_RULES(['$(top_srcdir)/src/extensions/protocol'])
+
AC_CONFIG_FILES([Makefile
src/Makefile
src/common/Makefile
src/core/Makefile
- src/efl/Makefile])
+ src/efl/Makefile
+ src/extensions/Makefile
+ src/extensions/weston/Makefile
+ src/extensions/protocol/Makefile])
AC_OUTPUT
-SUBDIRS = common core efl
+SUBDIRS = common core efl extensions
TESTS = wfits
--- /dev/null
+SUBDIRS = protocol weston
--- /dev/null
+EXTRA_DIST = \
+ wayland-fits.xml
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<protocol name="wayland_fits">
+
+ <copyright>
+ Copyright © 2012 Intel Corporation
+
+ 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.
+ </copyright>
+
+ <interface name="wfits_uinput" version="1">
+ <request name="move_pointer">
+ <arg name="x" type="int"/>
+ <arg name="y" type="int"/>
+ </request>
+ </interface>
+</protocol>
\ No newline at end of file
--- /dev/null
+wayland-fits-client-protocol.h
+wayland-fits-protocol.c
+wayland-fits-server-protocol.h
+
--- /dev/null
+moduledir = @libdir@/weston
+module_LTLIBRARIES = \
+ $(weston_wfits)
+
+# AM_CFLAGS = $(GCC_CFLAGS)
+# AM_CPPFLAGS = -I$(top_srcdir)/src $(WAYLAND_SERVER_CFLAGS)
+# AM_LDFLAGS = -module -avoid-version -rpath $(libdir)
+
+weston_wfits = weston-wfits.la
+weston_wfits_la_CFLAGS = $(GCC_CFLAGS) $(WAYLAND_SERVER_CFLAGS)
+weston_wfits_la_LDFLAGS = -module -avoid-version
+weston_wfits_la_LIBADD = $(WAYLAND_SERVER_LIBS)
+weston_wfits_la_SOURCES = \
+ weston-wfits.c \
+ wayland-fits-protocol.c \
+ wayland-fits-server-protocol.h
+
+BUILT_SOURCES = \
+ wayland-fits-protocol.c \
+ wayland-fits-server-protocol.h \
+ wayland-fits-client-protocol.h
+
+CLEANFILES = $(BUILT_SOURCES)
+
+@wayland_scanner_rules@
--- /dev/null
+/*
+ * Copyright © 2012 Intel Corporation
+ *
+ * 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 <string.h>
+// #include "../src/compositor.h"
+#include "wayland-server.h"
+#include "wayland-fits-server-protocol.h"
+
+struct compositor {
+ struct wl_signal destroy_signal;
+ struct wl_display *wl_display;
+};
+
+struct wfits {
+ struct compositor *compositor;
+};
+
+static void
+move_pointer(struct wl_client *client, struct wl_resource *resource,
+ int32_t x, int32_t y)
+{
+ struct wfits *wfits = resource->data;
+}
+
+static const struct wfits_uinput_interface wfits_uinput_implementation = {
+ move_pointer,
+};
+
+static void
+bind_uinput(struct wl_client *client, void *data, uint32_t version, uint32_t id)
+{
+ struct wfits *wfits = data;
+ struct wl_resource *resource;
+
+ resource = wl_client_add_object(client, &wfits_uinput_interface,
+ &wfits_uinput_implementation, id, wfits);
+}
+
+WL_EXPORT int
+module_init(void *p)
+{
+ struct wfits *wfits;
+ struct compositor* ec = p;
+
+ wfits = malloc(sizeof *wfits);
+ if (wfits == NULL)
+ return -1;
+
+ memset(wfits, 0, sizeof *wfits);
+ wfits->compositor = ec;
+
+ if (wl_display_add_global(ec->wl_display, &wfits_uinput_interface,
+ wfits, bind_uinput) == NULL)
+ return -1;
+ return 0;
+}