[RFC weston 00/15] libweston

This patchset makes a libweston.so out of the compositor core, thought to be used by many different users. The main() was moved out of compositor.c into a new weston.c, and so all weston-the-binary specific things, such as signal handling, child process handling, config, logging and the like. Some features, such as the rpi backend or the text backend, are usable by weston only, i plan to make them available to all libweston users in later patches. The backends are still in their .so modules as before, I'm unsure whether to move the non-weston specific code in them to a different libary going to $prefix/lib, to be linked by the .so modules, instead of the other compositors having to link to the .so modules in order to use the backend APIs defined in the backends' .h. Opinions? General comments on the patch set more than welcome :) Giulio Camuffo (15): compositor: introduce struct weston_backend don't use weston_config in the backends code compositor: remove the weston_config field from weston_compositor compositor: add API to manage compositor instances compositor: move the main() to a new weston.c file build a libweston.so used by the weston binary libweston: allow compositors to define the logging behavior libweston: move the child process launching and monitoring to weston libweston: handle the screenshoot and record bindings in weston.c text: build the text-backend in weston libweston: expose the X11 backend's API libweston: expose the drm backend's API libweston: make a shared library for compositor launchers libweston: expose the wayland backend API libweston: libweston-ify xwayland Makefile.am | 91 ++- desktop-shell/shell.c | 10 +- desktop-shell/shell.h | 1 + fullscreen-shell/fullscreen-shell.c | 3 +- src/cms-colord.c | 3 +- src/cms-static.c | 7 +- src/compositor-drm.c | 995 +++++++++++++++---------------- src/compositor-drm.h | 60 ++ src/compositor-fbdev.c | 180 +++--- src/compositor-headless.c | 89 +-- src/compositor-rdp.c | 157 ++--- src/compositor-rpi.c | 164 +++--- src/compositor-wayland.c | 404 +++++++------ src/compositor-wayland.h | 51 ++ src/compositor-x11.c | 616 ++++++++++---------- src/compositor-x11.h | 27 + src/compositor.c | 814 +------------------------- src/compositor.h | 41 +- src/input.c | 2 +- src/libinput-device.c | 29 +- src/libinput-device.h | 2 + src/libinput-seat.c | 29 +- src/libinput-seat.h | 8 + src/log.c | 69 +-- src/screenshooter.c | 176 +----- src/text-backend.c | 10 +- src/weston-launch.c | 698 +--------------------- src/weston-launcher.c | 769 ++++++++++++++++++++++++ src/weston-launcher.h | 45 ++ src/weston.c | 1102 +++++++++++++++++++++++++++++++++++ tests/surface-global-test.c | 3 +- tests/surface-test.c | 3 +- tests/weston-test.c | 3 +- xwayland/launcher.c | 155 +---- xwayland/xwayland-module.c | 185 ++++++ xwayland/xwayland.h | 25 +- 36 files changed, 3843 insertions(+), 3183 deletions(-) create mode 100644 src/compositor-drm.h create mode 100644 src/compositor-wayland.h create mode 100644 src/compositor-x11.h create mode 100644 src/weston-launcher.c create mode 100644 src/weston-launcher.h create mode 100644 src/weston.c create mode 100644 xwayland/xwayland-module.c -- 2.1.3