From 89e9b9a00ca8829e535dc7243e51fb31a34de5cb Mon Sep 17 00:00:00 2001 From: "U. Artie Eoff" Date: Thu, 17 Jan 2013 14:34:55 -0800 Subject: [PATCH] Include real weston compositor header(s) 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 --- README | 13 +++++++++++++ configure.ac | 1 + src/extensions/weston/Makefile.am | 6 +++++- src/extensions/weston/README | 13 +++++++++++++ src/extensions/weston/weston-wfits.c | 20 ++++++++------------ 5 files changed, 40 insertions(+), 13 deletions(-) create mode 100644 README create mode 100644 src/extensions/weston/README diff --git a/README b/README new file mode 100644 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. diff --git a/configure.ac b/configure.ac index 6e04132..ab8cdc0 100644 --- a/configure.ac +++ b/configure.ac @@ -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... diff --git a/src/extensions/weston/Makefile.am b/src/extensions/weston/Makefile.am index 6fa1e31..04b9cf7 100644 --- a/src/extensions/weston/Makefile.am +++ b/src/extensions/weston/Makefile.am @@ -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 index 0000000..6ddf0d5 --- /dev/null +++ b/src/extensions/weston/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. diff --git a/src/extensions/weston/weston-wfits.c b/src/extensions/weston/weston-wfits.c index 813aace..0964b77 100644 --- a/src/extensions/weston/weston-wfits.c +++ b/src/extensions/weston/weston-wfits.c @@ -22,17 +22,12 @@ #include #include -// #include "../src/compositor.h" -#include "wayland-server.h" +#include +#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; -- 2.7.4