forked from AuroraMiddleware/gtk
gdk: Add gdk_event_get_seat()
It currently fetches the seat from the event device, will be changed in future commits.
This commit is contained in:
parent
6d2860efb7
commit
cf1fbdf8b5
@ -1185,6 +1185,22 @@ gdk_event_get_surface (GdkEvent *event)
|
||||
return event->surface;
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_event_get_seat:
|
||||
* @event: a #GdkEvent.
|
||||
*
|
||||
* Returns the seat that originated the event.
|
||||
*
|
||||
* Returns: (nullable) (transfer none): a #GdkSeat.
|
||||
*/
|
||||
GdkSeat *
|
||||
gdk_event_get_seat (GdkEvent *event)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_EVENT (event), NULL);
|
||||
|
||||
return event->device ? gdk_device_get_seat (event->device) : NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_event_get_device:
|
||||
* @event: a #GdkEvent.
|
||||
|
@ -344,6 +344,9 @@ GdkEventType gdk_event_get_event_type (GdkEvent *event);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkSurface * gdk_event_get_surface (GdkEvent *event);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkSeat * gdk_event_get_seat (GdkEvent *event);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkDevice * gdk_event_get_device (GdkEvent *event);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user