Include real weston compositor header(s)
authorU. Artie Eoff <ullysses.a.eoff@intel.com>
Thu, 17 Jan 2013 22:34:55 +0000 (14:34 -0800)
committerU. Artie Eoff <ullysses.a.eoff@intel.com>
Thu, 17 Jan 2013 22:34:55 +0000 (14:34 -0800)
Weston does not install any headers to aid weston module
development.

Thus, the weston headers should be copied/symlinked from the
weston source tree to this source tree so we can build our
weston-wfits module/extension:

compositor.h -> src/extensions/weston/weston-headers/core/.
matrix.h -> src/extensions/weston/weston-headers/shared/.
config-parser.h -> src/extensions/weston-headers/shared/.

This is done automatically by the wayland-scripts build
hooks.  Otherwise, you will have to do it manually.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
README [new file with mode: 0644]
configure.ac
src/extensions/weston/Makefile.am
src/extensions/weston/README [new file with mode: 0644]
src/extensions/weston/weston-wfits.c

diff --git a/README b/README
new file mode 100644 (file)
index 0000000..6ddf0d5
--- /dev/null
+++ b/README
@@ -0,0 +1,13 @@
+Weston does not install any headers to aid weston module
+development.
+
+Thus, the weston headers should be copied/symlinked from the
+weston source tree to this source tree so we can build our
+weston-wfits module/extension:
+
+compositor.h -> src/extensions/weston/weston-headers/core/.
+matrix.h -> src/extensions/weston/weston-headers/shared/.
+config-parser.h -> src/extensions/weston-headers/shared/.
+
+This is done automatically by the wayland-scripts build
+hooks.  Otherwise, you will have to do it manually.
index 6e04132..ab8cdc0 100644 (file)
@@ -24,6 +24,7 @@ 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])
+PKG_CHECK_MODULES(PIXMAN, [pixman-1])
 
 # TODO: Add support to conditionally build EFL suite, Core suite, etc...
 
index 6fa1e31..04b9cf7 100644 (file)
@@ -7,7 +7,11 @@ module_LTLIBRARIES =                           \
 # AM_LDFLAGS = -module -avoid-version -rpath $(libdir)
 
 weston_wfits = weston-wfits.la
-weston_wfits_la_CFLAGS = $(GCC_CFLAGS) $(WAYLAND_SERVER_CFLAGS)
+weston_wfits_la_CFLAGS =                       \
+       $(GCC_CFLAGS)                           \
+       $(WAYLAND_SERVER_CFLAGS)                \
+       $(PIXMAN_CFLAGS)
+
 weston_wfits_la_LDFLAGS = -module -avoid-version
 weston_wfits_la_LIBADD = $(WAYLAND_SERVER_LIBS)
 weston_wfits_la_SOURCES =                      \
diff --git a/src/extensions/weston/README b/src/extensions/weston/README
new file mode 100644 (file)
index 0000000..6ddf0d5
--- /dev/null
@@ -0,0 +1,13 @@
+Weston does not install any headers to aid weston module
+development.
+
+Thus, the weston headers should be copied/symlinked from the
+weston source tree to this source tree so we can build our
+weston-wfits module/extension:
+
+compositor.h -> src/extensions/weston/weston-headers/core/.
+matrix.h -> src/extensions/weston/weston-headers/shared/.
+config-parser.h -> src/extensions/weston-headers/shared/.
+
+This is done automatically by the wayland-scripts build
+hooks.  Otherwise, you will have to do it manually.
index 813aace..0964b77 100644 (file)
 
 #include <stdlib.h>
 #include <string.h>
-// #include "../src/compositor.h"
-#include "wayland-server.h"
+#include <wayland-server.h>
+#include "weston-headers/core/compositor.h"
 #include "wayland-fits-server-protocol.h"
 
-struct compositor {
-       struct wl_signal destroy_signal;
-       struct wl_display *wl_display;
-};
-
 struct wfits {
-       struct compositor *compositor;
+       struct weston_compositor *compositor;
 };
 
 static void
@@ -57,19 +52,20 @@ bind_uinput(struct wl_client *client, void *data, uint32_t version, uint32_t id)
 }
 
 WL_EXPORT int
-module_init(void *p)
+module_init(struct weston_compositor *compositor)
 {
        struct wfits *wfits;
-       struct compositor* ec = p;
+
+       weston_log("in weston-wfits::module_init\n");
 
        wfits = malloc(sizeof *wfits);
        if (wfits == NULL)
                return -1;
 
        memset(wfits, 0, sizeof *wfits);
-       wfits->compositor = ec;
+       wfits->compositor = compositor;
 
-       if (wl_display_add_global(ec->wl_display, &wfits_uinput_interface,
+       if (wl_display_add_global(compositor->wl_display, &wfits_uinput_interface,
                                  wfits, bind_uinput) == NULL)
                return -1;
        return 0;