Function input_sys::libinput_event_tablet_pad_get_mode [] [src]

pub unsafe extern "C" fn libinput_event_tablet_pad_get_mode(
    event: *mut libinput_event_tablet_pad
) -> c_uint

@ingroup event_tablet_pad

Returns the mode the button, ring, or strip that triggered this event is in, at the time of the event.

The mode is a virtual grouping of functionality, usually based on some visual feedback like LEDs on the pad. See @ref tablet-pad-modes for details. Mode indices start at 0, a device that does not support modes always returns 0.

Mode switching is controlled by libinput and more than one mode may exist on the tablet. This function returns the mode that this event's button, ring or strip is logically in. If the button is a mode toggle button and the button event caused a new mode to be toggled, the mode returned is the new mode the button is in.

Note that the returned mode is the mode valid as of the time of the event. The returned mode may thus be different to the mode returned by libinput_tablet_pad_mode_group_get_mode(). See libinput_tablet_pad_mode_group_get_mode() for details.

@param event The libinput tablet pad event @return the 0-indexed mode of this button, ring or strip at the time of the event

@see libinput_tablet_pad_mode_group_get_mode