mirror of
https://github.com/brl/mutter.git
synced 2025-06-14 01:09:30 +00:00
evdev: add a way for applications to tweak how devices are opened
In some cases, applications (or actually, wayland compositors) don't have the required permissions to access evdev directly, but can do so with an external helper like weston-launch. Allow them to do so with a custom callback that replaces the regular open() path. https://bugzilla.gnome.org/show_bug.cgi?id=704269
This commit is contained in:
@ -30,6 +30,23 @@
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/**
|
||||
* ClutterOpenDeviceCallback:
|
||||
* @path: the device path
|
||||
* @flags: flags to be passed to open
|
||||
*
|
||||
* This callback will be called when Clutter needs to access an input
|
||||
* device. It should return an open file descriptor for the file at @path,
|
||||
* or -1 if opening failed.
|
||||
*/
|
||||
typedef int (*ClutterOpenDeviceCallback) (const char *path,
|
||||
int flags,
|
||||
gpointer user_data,
|
||||
GError **error);
|
||||
|
||||
void clutter_evdev_set_open_callback (ClutterOpenDeviceCallback callback,
|
||||
gpointer user_data);
|
||||
|
||||
void clutter_evdev_release_devices (void);
|
||||
void clutter_evdev_reclaim_devices (void);
|
||||
|
||||
|
Reference in New Issue
Block a user