--- /dev/null
+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.
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...
# 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 = \
--- /dev/null
+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.
#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
}
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;