[clutter] Add a 'null' input backend symbol



commit 1f8915d2c89cced191fbd94bdb5dd6833d942584
Author: Emmanuele Bassi <ebassi linux intel com>
Date:   Thu Nov 3 18:27:09 2011 +0000

    Add a 'null' input backend symbol
    
    We should have an input backend symbol that thoroughly disables all
    input event handling.

 clutter/clutter-backend.c |    8 +++++++-
 configure.ac              |    4 ++++
 2 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/clutter/clutter-backend.c b/clutter/clutter-backend.c
index 4891bff..0eb065e 100644
--- a/clutter/clutter-backend.c
+++ b/clutter/clutter-backend.c
@@ -64,6 +64,9 @@
 #ifdef CLUTTER_INPUT_OSX
 #include "osx/clutter-backend-osx.h"
 #endif
+#ifdef CLUTTER_INPUT_GDK
+#include "gdk/clutter-backend-gdk.h"
+#endif
 #ifdef CLUTTER_INPUT_EVDEV
 #include "evdev/clutter-device-manager-evdev.h"
 #endif
@@ -319,7 +322,10 @@ clutter_backend_real_init_events (ClutterBackend *backend)
   else
 #endif
   if (input_backend != NULL)
-    g_error ("Unrecognized input backend '%s'", input_backend);
+    {
+      if (input_backend != I_(CLUTTER_INPUT_NULL))
+        g_error ("Unrecognized input backend '%s'", input_backend);
+    }
   else
     g_error ("Unknown input backend");
 }
diff --git a/configure.ac b/configure.ac
index ea38f47..ea1ad40 100644
--- a/configure.ac
+++ b/configure.ac
@@ -501,6 +501,10 @@ AS_IF([test "x$SUPPORT_TSLIB" = "x1"],
       [CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
 #define CLUTTER_INPUT_TSLIB \"tslib\""])
 
+# the 'null' input backend is special
+CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
+#define CLUTTER_INPUT_NULL \"null\""
+
 AC_SUBST([CLUTTER_CONFIG_DEFINES])
 
 dnl === Clutter substitutions kept for backwards compatibility ================



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