mirror of
https://github.com/brl/mutter.git
synced 2024-11-24 17:10:40 -05:00
clutter-seat-evdev: Add function to get device by id
This commit is contained in:
parent
ac20bf2000
commit
5f83d9a5c8
@ -858,6 +858,24 @@ clutter_seat_evdev_free (ClutterSeatEvdev *seat)
|
||||
g_free (seat);
|
||||
}
|
||||
|
||||
ClutterInputDevice *
|
||||
clutter_seat_evdev_get_device (ClutterSeatEvdev *seat,
|
||||
gint id)
|
||||
{
|
||||
ClutterInputDevice *device;
|
||||
GSList *l;
|
||||
|
||||
for (l = seat->devices; l; l = l->next)
|
||||
{
|
||||
device = l->data;
|
||||
|
||||
if (clutter_input_device_get_device_id (device) == id)
|
||||
return device;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void
|
||||
clutter_seat_evdev_set_stage (ClutterSeatEvdev *seat,
|
||||
ClutterStage *stage)
|
||||
|
@ -139,6 +139,9 @@ void clutter_seat_evdev_set_libinput_seat (ClutterSeatEvdev *seat,
|
||||
|
||||
void clutter_seat_evdev_sync_leds (ClutterSeatEvdev *seat);
|
||||
|
||||
ClutterInputDevice * clutter_seat_evdev_get_device (ClutterSeatEvdev *seat,
|
||||
gint id);
|
||||
|
||||
ClutterTouchState * clutter_seat_evdev_acquire_touch_state (ClutterSeatEvdev *seat,
|
||||
int device_slot);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user