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
This commit is contained in:
Carlos Garnacho 2015-11-17 17:40:30 +01:00
parent 4115f215ac
commit dfc749e576

View File

@ -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
*/