Trait TabletPadEventTrait

Source
pub trait TabletPadEventTrait: AsRaw<libinput_event_tablet_pad> + Context {
    // Provided methods
    fn time(&self) -> u32 { ... }
    fn time_usec(&self) -> u64 { ... }
    fn mode(&self) -> u32 { ... }
    fn mode_group(&self) -> TabletPadModeGroup { ... }
    fn into_tablet_pad_event(self) -> TabletPadEvent
       where Self: Sized { ... }
}
Expand description

Common functions all TabletPad-Events implement.

Provided Methods§

Source

fn time(&self) -> u32

The event time for this event

Source

fn time_usec(&self) -> u64

The event time for this event in microseconds

Source

fn mode(&self) -> u32

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 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 TabletPadModeGroup::mode. See TabletPadModeGroup::mode for details.

Source

fn mode_group(&self) -> TabletPadModeGroup

Returns the mode group that the button, ring, or strip that triggered this event is considered in.

The mode is a virtual grouping of functionality, usually based on some visual feedback like LEDs on the pad. See Tablet pad modes for details.

Source

fn into_tablet_pad_event(self) -> TabletPadEvent
where Self: Sized,

Convert into a general TabletPadEvent again

Implementors§