diff --git a/clutter/clutter-device-manager-private.h b/clutter/clutter-device-manager-private.h index 3e09288e1..9c42450ae 100644 --- a/clutter/clutter-device-manager-private.h +++ b/clutter/clutter-device-manager-private.h @@ -145,6 +145,26 @@ struct _ClutterInputDeviceClass guint *evdev_keycode); }; +/* Platform-dependent interface */ +typedef struct _ClutterEventExtender ClutterEventExtender; +typedef struct _ClutterEventExtenderInterface ClutterEventExtenderInterface; + +#define CLUTTER_TYPE_EVENT_EXTENDER (clutter_event_extender_get_type ()) +#define CLUTTER_EVENT_EXTENDER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), CLUTTER_TYPE_EVENT_EXTENDER, ClutterEventExtender)) +#define CLUTTER_IS_EVENT_EXTENDER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), CLUTTER_TYPE_EVENT_EXTENDER)) +#define CLUTTER_EVENT_EXTENDER_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), CLUTTER_TYPE_EVENT_EXTENDER, ClutterEventExtenderInterface)) + +struct _ClutterEventExtenderInterface +{ + void (* copy_event_data) (ClutterEventExtender *event_extender, + const ClutterEvent *src, + ClutterEvent *dest); + void (* free_event_data) (ClutterEventExtender *event_extender, + ClutterEvent *event); +}; + +GType clutter_event_extender_get_type (void) G_GNUC_CONST; + /* device manager */ void _clutter_device_manager_add_device (ClutterDeviceManager *device_manager, ClutterInputDevice *device); diff --git a/clutter/clutter-device-manager.c b/clutter/clutter-device-manager.c index 32a6e8a4a..597b0d1ad 100644 --- a/clutter/clutter-device-manager.c +++ b/clutter/clutter-device-manager.c @@ -79,6 +79,15 @@ G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (ClutterDeviceManager, clutter_device_manager, G_TYPE_OBJECT) +G_DEFINE_INTERFACE (ClutterEventExtender, + clutter_event_extender, + CLUTTER_TYPE_DEVICE_MANAGER) + +static void +clutter_event_extender_default_init (ClutterEventExtenderInterface *iface) +{ +} + static void clutter_device_manager_set_property (GObject *gobject, guint prop_id,