Add a 'null' input backend symbol

We should have an input backend symbol that thoroughly disables all
input event handling.
This commit is contained in:
Emmanuele Bassi 2011-11-03 18:27:09 +00:00
parent adb6ffbd0e
commit 1f8915d2c8
2 changed files with 11 additions and 1 deletions

View File

@ -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");
}

View File

@ -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 ================