pub enum Event {
    Down {
        serial: u32,
        time: u32,
        surface: Resource<WlSurface>,
        id: i32,
        x: f64,
        y: f64,
    },
    Up {
        serial: u32,
        time: u32,
        id: i32,
    },
    Motion {
        time: u32,
        id: i32,
        x: f64,
        y: f64,
    },
    Frame,
    Cancel,
}

Variants

Down

Fields

serial: u32
time: u32
surface: Resource<WlSurface>
id: i32
x: f64
y: f64

touch down event and beginning of a touch sequence

A new touch point has appeared on the surface. This touch point is assigned a unique ID. Future events from this touch point reference this ID. The ID ceases to be valid after a touch up event and may be reused in the future.

Up

Fields

serial: u32
time: u32
id: i32

end of a touch event sequence

The touch point has disappeared. No further events will be sent for this touch point and the touch point’s ID is released and may be reused in a future touch down event.

Motion

Fields

time: u32
id: i32
x: f64
y: f64

update of touch point coordinates

A touch point has changed coordinates.

Frame

end of touch frame event

Indicates the end of a contact point list.

Cancel

touch session cancelled

Sent if the compositor decides the touch stream is a global gesture. No further events are sent to the clients from that particular gesture. Touch cancellation applies to all touch points currently active on this client’s surface. The client is responsible for finalizing the touch points, future touch points on this surface may reuse the touch point ID.

Trait Implementations

Wire representation of this MessageGroup
The wrapper type for ObjectMap allowing the mapping of Object and NewId arguments to the object map during parsing. Read more
Whether this message is a destructor Read more
The opcode of this message
Retrieve the child Object associated with this message if any
Construct a message from its raw representation
Turn this message into its raw representation

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more
Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more
Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s. Read more
Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s. Read more
Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.