clutter/seat: Add gtkDoc comments for touch-mode property

It's not that easy to find out when the touch-mode is enabled without
reading the code, so document that.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1075
This commit is contained in:
Jonas Dreßler 2020-02-20 21:57:15 +01:00 committed by Carlos Garnacho
parent 41d72e86e0
commit d7c7311ceb

View File

@ -282,6 +282,12 @@ clutter_seat_class_init (ClutterSeatClass *klass)
CLUTTER_TYPE_BACKEND,
CLUTTER_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
/**
* ClutterSeat:touch-mode:
*
* The current touch-mode of the #ClutterSeat, it is set to %TRUE if the
* requirements documented in clutter_seat_get_touch_mode() are fulfilled.
**/
props[PROP_TOUCH_MODE] =
g_param_spec_boolean ("touch-mode",
P_("Touch mode"),
@ -569,6 +575,21 @@ clutter_seat_warp_pointer (ClutterSeat *seat,
CLUTTER_SEAT_GET_CLASS (seat)->warp_pointer (seat, x, y);
}
/**
* clutter_seat_get_touch_mode:
* @seat: a #ClutterSeat
*
* Gets the current touch-mode state of the #ClutterSeat @seat.
* The #ClutterSeat:touch-mode property is set to %TRUE if the following
* requirements are fulfilled:
*
* - A touchscreen is available
* - No external keyboard is attached to the device
* - A tablet mode switch, if present, is enabled
*
* Returns: %TRUE if the device is a tablet that doesn't have an external
* keyboard attached, %FALSE otherwise.
**/
gboolean
clutter_seat_get_touch_mode (ClutterSeat *seat)
{