mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 09:30:45 -05:00
clutter: Add ClutterSeat::query_state() vmethod
This will query a device state; position and modifiers. Note that ClutterSeat subclasses don't implement the vmethod yet, so calling clutter_seat_query_state() may crash ATM. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1403>
This commit is contained in:
parent
f6db6cd203
commit
fba1122a3c
@ -776,3 +776,20 @@ clutter_seat_has_touchscreen (ClutterSeat *seat)
|
||||
|
||||
return has_touchscreen;
|
||||
}
|
||||
|
||||
gboolean
|
||||
clutter_seat_query_state (ClutterSeat *seat,
|
||||
ClutterInputDevice *device,
|
||||
ClutterEventSequence *sequence,
|
||||
graphene_point_t *coords,
|
||||
ClutterModifierType *modifiers)
|
||||
{
|
||||
g_return_val_if_fail (CLUTTER_IS_SEAT (seat), FALSE);
|
||||
g_return_val_if_fail (CLUTTER_IS_INPUT_DEVICE (device), FALSE);
|
||||
|
||||
return CLUTTER_SEAT_GET_CLASS (seat)->query_state (seat,
|
||||
device,
|
||||
sequence,
|
||||
coords,
|
||||
modifiers);
|
||||
}
|
||||
|
@ -113,6 +113,12 @@ struct _ClutterSeatClass
|
||||
int x,
|
||||
int y);
|
||||
|
||||
gboolean (* query_state) (ClutterSeat *seat,
|
||||
ClutterInputDevice *device,
|
||||
ClutterEventSequence *sequence,
|
||||
graphene_point_t *coords,
|
||||
ClutterModifierType *modifiers);
|
||||
|
||||
/* Event platform data */
|
||||
void (* copy_event_data) (ClutterSeat *seat,
|
||||
const ClutterEvent *src,
|
||||
@ -197,4 +203,11 @@ gboolean clutter_seat_get_touch_mode (ClutterSeat *seat);
|
||||
CLUTTER_EXPORT
|
||||
gboolean clutter_seat_has_touchscreen (ClutterSeat *seat);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
gboolean clutter_seat_query_state (ClutterSeat *seat,
|
||||
ClutterInputDevice *device,
|
||||
ClutterEventSequence *sequence,
|
||||
graphene_point_t *coords,
|
||||
ClutterModifierType *modifiers);
|
||||
|
||||
#endif /* CLUTTER_SEAT_H */
|
||||
|
Loading…
Reference in New Issue
Block a user