evdev: Extend the device open callback with a close callback as well

We need to return the device to logind with ReleaseDevice().

https://bugzilla.gnome.org/show_bug.cgi?id=726199
This commit is contained in:
Jasper St. Pierre
2014-03-01 13:06:25 -05:00
parent aa5a4e9e3c
commit e23f77f1e6
2 changed files with 23 additions and 13 deletions

View File

@ -48,10 +48,13 @@ typedef int (*ClutterOpenDeviceCallback) (const char *path,
int flags,
gpointer user_data,
GError **error);
typedef void (*ClutterCloseDeviceCallback) (int fd,
gpointer user_data);
CLUTTER_AVAILABLE_IN_1_16
void clutter_evdev_set_open_callback (ClutterOpenDeviceCallback callback,
gpointer user_data);
void clutter_evdev_set_device_callbacks (ClutterOpenDeviceCallback open_callback,
ClutterCloseDeviceCallback close_callback,
gpointer user_data);
CLUTTER_AVAILABLE_IN_1_10
void clutter_evdev_release_devices (void);