cosmetic: replace boolean function return values with bool

For functions that test if something is true/valid and return a 1
or 0, it makes sense to switch to bool.

Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
data_device : change version while initializing data_device_manager interface and data_device interface

[Pekka Paalanen: split long lines, dropped MIN().]

Signed-off-by: kabeer khan <kabeer.khan@samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
window : compare version and call appropriate destructor

[Pekka Paalanen: removed trailing space, split long line.]

Signed-off-by: kabeer khan <kabeer.khan@samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
compositor: Fix weston_subsurface_is_synchronized() return value.

Commit 280e7dd918f1717c7d677676384a9cd991097741 introduced a bug in the
return value of weston_subsurface_is_synchronized().

Signed-off-by: Carlos Olmedo Escobar <carlos.olmedo.e@gmail.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
compositor: Refactor weston_output_mode_switch()

This breaks weston_output_mode_switch() into 3 functions:
weston_output_mode_set_native()
weston_output_mode_switch_to_temporary()
weston_output_mode_switch_to_native()

Differences from previous behaviour:
SET_NATIVE didn't set current_scale (now it does)
SET_TEMPORARY could set mode and scale independently - now it can't.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Pekka Paalanen <pekka.paalanen@collabora.co.uk>
input: allow to destroy bindings in their handler

use wl_list_for_each_safe to iterate on the bindings list when
firing them, this way a binding can safely be destroyed in its
function handler.

Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
compositor: introduce struct weston_backend

This is a preliminary change for libweston, with no functional modifications.
Separate the backends and the core weston_compositor struct, by creating
the weston_compositor in the main(), and having the various backends extend
the weston_backend struct, an instance of which is returned by the backend
entry point.
don't use weston_config in the backends code

This is to make them usable by future libweston users, since they will
not use weston_config.
weston_config is still used in the backends entry points, which will
later on live in their own files.
compositor: remove the weston_config field from weston_compositor

Instead of the central weston_config pointer we now store it in some
module-specific pointers. This way we can remove them one by one.
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 still internally uses those functions, so it is not linkable
yet by other compositors.
libweston: handle the screenshoot and record bindings in weston.c

Move the code launching the screenshooter client and implementing
the screenshot protocol out of libweston, and make screenshooter.c
a generic way to hook screenshoot protocols into weston.
text: build the text-backend in weston

It uses the weston_client_launch API, which is not available in
libweston.
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