From 133f95fd0d5ec3a4ec8c6f5db5be5331a1d328f2 Mon Sep 17 00:00:00 2001 From: Rui Matos Date: Mon, 24 Feb 2014 14:22:19 +0100 Subject: [PATCH] evdev: Add a conditional define guard to expose API The evdev backend has always been excluded from Clutter's API stability guarantee though in an informal way. This commit makes it explicit by forcing users to define CLUTTER_ENABLE_COMPOSITOR_API. https://bugzilla.gnome.org/show_bug.cgi?id=725102 --- README.in | 6 ++++++ clutter/evdev/clutter-evdev.h | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/README.in b/README.in index dac734311..30ef47430 100644 --- a/README.in +++ b/README.in @@ -326,6 +326,12 @@ Release Notes for Clutter 1.18 libevdev and libgudev directly, but relies on libinput for discovering, reading and processing input devices. +• The Clutter evdev input device backend was already considered + experimental and not subject to Clutter's API and ABI stabitility + guarantees. Starting from 1.18, users have to explicitly acknowldge + this by having to #define CLUTTER_ENABLE_COMPOSITOR_API to use its + public API. + Release Notes for Clutter 1.16 ------------------------------------------------------------------------------- diff --git a/clutter/evdev/clutter-evdev.h b/clutter/evdev/clutter-evdev.h index 04b5958f7..5495161c4 100644 --- a/clutter/evdev/clutter-evdev.h +++ b/clutter/evdev/clutter-evdev.h @@ -31,6 +31,10 @@ G_BEGIN_DECLS +#if !defined(CLUTTER_ENABLE_COMPOSITOR_API) && !defined(CLUTTER_COMPILATION) +#error "You need to define CLUTTER_ENABLE_COMPOSITOR_API before including clutter-evdev.h" +#endif + /** * ClutterOpenDeviceCallback: * @path: the device path @@ -81,6 +85,7 @@ void clutter_evdev_set_pointer_constrain_callback (ClutterDeviceManager void clutter_evdev_set_keyboard_map (ClutterDeviceManager *evdev, struct xkb_keymap *keymap); + G_END_DECLS #endif /* __CLUTTER_EVDEV_H__ */