From dfc749e576584c9ea6ad0aac739683e8ac64ea84 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Tue, 17 Nov 2015 17:40:30 +0100 Subject: [PATCH] evdev: Implement the ClutterEventExtender interface This will allow the ClutterDeviceManagerEvdev to define evdev-specific event data. https://bugzilla.gnome.org/show_bug.cgi?id=758238 --- clutter/evdev/clutter-device-manager-evdev.c | 31 ++++++++++++++++++-- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/clutter/evdev/clutter-device-manager-evdev.c b/clutter/evdev/clutter-device-manager-evdev.c index ac5ea93ad..50df6f5ce 100644 --- a/clutter/evdev/clutter-device-manager-evdev.c +++ b/clutter/evdev/clutter-device-manager-evdev.c @@ -144,9 +144,14 @@ struct _ClutterDeviceManagerEvdevPrivate GSList *event_filters; }; -G_DEFINE_TYPE_WITH_PRIVATE (ClutterDeviceManagerEvdev, - clutter_device_manager_evdev, - CLUTTER_TYPE_DEVICE_MANAGER) +static void clutter_device_manager_evdev_event_extender_init (ClutterEventExtenderInterface *iface); + +G_DEFINE_TYPE_WITH_CODE (ClutterDeviceManagerEvdev, + clutter_device_manager_evdev, + CLUTTER_TYPE_DEVICE_MANAGER, + G_ADD_PRIVATE (ClutterDeviceManagerEvdev) + G_IMPLEMENT_INTERFACE (CLUTTER_TYPE_EVENT_EXTENDER, + clutter_device_manager_evdev_event_extender_init)) static ClutterOpenDeviceCallback device_open_callback; static ClutterCloseDeviceCallback device_close_callback; @@ -178,6 +183,26 @@ static const char *option_xkb_layout = "us"; static const char *option_xkb_variant = ""; static const char *option_xkb_options = ""; +static void +clutter_device_manager_evdev_copy_event_data (ClutterEventExtender *event_extender, + const ClutterEvent *src, + ClutterEvent *dest) +{ +} + +static void +clutter_device_manager_evdev_free_event_data (ClutterEventExtender *event_extender, + ClutterEvent *event) +{ +} + +static void +clutter_device_manager_evdev_event_extender_init (ClutterEventExtenderInterface *iface) +{ + iface->copy_event_data = clutter_device_manager_evdev_copy_event_data; + iface->free_event_data = clutter_device_manager_evdev_free_event_data; +} + /* * ClutterEventSource for reading input devices */