[clutter/clutter-1.18] evdev: Add a conditional define guard to expose API



commit 133f95fd0d5ec3a4ec8c6f5db5be5331a1d328f2
Author: Rui Matos <tiagomatos gmail com>
Date:   Mon Feb 24 14:22:19 2014 +0100

    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(+), 0 deletions(-)
---
diff --git a/README.in b/README.in
index dac7343..30ef474 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 04b5958..5495161 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__ */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]