[][src]Trait wayland_protocols::unstable::tablet::v2::client::zwp_tablet_pad_v2::EventHandler

pub trait EventHandler {
    fn group(
        &mut self,
        object: ZwpTabletPadV2,
        pad_group: NewProxy<ZwpTabletPadGroupV2>
    ) { ... }
fn path(&mut self, object: ZwpTabletPadV2, path: String) { ... }
fn buttons(&mut self, object: ZwpTabletPadV2, buttons: u32) { ... }
fn done(&mut self, object: ZwpTabletPadV2) { ... }
fn button(
        &mut self,
        object: ZwpTabletPadV2,
        time: u32,
        button: u32,
        state: ButtonState
    ) { ... }
fn enter(
        &mut self,
        object: ZwpTabletPadV2,
        serial: u32,
        tablet: ZwpTabletV2,
        surface: WlSurface
    ) { ... }
fn leave(&mut self, object: ZwpTabletPadV2, serial: u32, surface: WlSurface) { ... }
fn removed(&mut self, object: ZwpTabletPadV2) { ... } }

An interface for handling events.

Provided methods

fn group(
    &mut self,
    object: ZwpTabletPadV2,
    pad_group: NewProxy<ZwpTabletPadGroupV2>
)

group announced

Sent on wp_tablet_pad initialization to announce available groups. One event is sent for each pad group available.

This event is sent in the initial burst of events before the wp_tablet_pad.done event. At least one group will be announced.

fn path(&mut self, object: ZwpTabletPadV2, path: String)

path to the device

A system-specific device path that indicates which device is behind this wp_tablet_pad. This information may be used to gather additional information about the device, e.g. through libwacom.

The format of the path is unspecified, it may be a device node, a sysfs path, or some other identifier. It is up to the client to identify the string provided.

This event is sent in the initial burst of events before the wp_tablet_pad.done event.

fn buttons(&mut self, object: ZwpTabletPadV2, buttons: u32)

buttons announced

Sent on wp_tablet_pad initialization to announce the available buttons.

This event is sent in the initial burst of events before the wp_tablet_pad.done event. This event is only sent when at least one button is available.

fn done(&mut self, object: ZwpTabletPadV2)

pad description event sequence complete

This event signals the end of the initial burst of descriptive events. A client may consider the static description of the pad to be complete and finalize initialization of the pad.

fn button(
    &mut self,
    object: ZwpTabletPadV2,
    time: u32,
    button: u32,
    state: ButtonState
)

physical button state

Sent whenever the physical state of a button changes.

fn enter(
    &mut self,
    object: ZwpTabletPadV2,
    serial: u32,
    tablet: ZwpTabletV2,
    surface: WlSurface
)

enter event

Notification that this pad is focused on the specified surface.

fn leave(&mut self, object: ZwpTabletPadV2, serial: u32, surface: WlSurface)

enter event

Notification that this pad is no longer focused on the specified surface.

fn removed(&mut self, object: ZwpTabletPadV2)

pad removed event

Sent when the pad has been removed from the system. When a tablet is removed its pad(s) will be removed too.

When this event is received, the client must destroy all rings, strips and groups that were offered by this pad, and issue wp_tablet_pad.destroy the pad itself.

Loading content...

Implementors

Loading content...