Enum wayland_protocols::unstable::xdg_shell::v5::client::xdg_surface::Event[][src]

#[non_exhaustive]
pub enum Event {
    Configure {
        width: i32,
        height: i32,
        states: Vec<u8>,
        serial: u32,
    },
    Close,
}

Variants (Non-exhaustive)

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Configure

suggest a surface change

The configure event asks the client to resize its surface or to change its state.

The width and height arguments specify a hint to the window about how its surface should be resized in window geometry coordinates. See set_window_geometry.

If the width or height arguments are zero, it means the client should decide its own window dimension. This may happen when the compositor need to configure the state of the surface but doesn’t have any information about any previous or expected dimension.

The states listed in the event specify how the width/height arguments should be interpreted, and possibly how it should be drawn.

Clients should arrange their surface for the new size and states, and then send a ack_configure request with the serial sent in this configure event at some point before committing the new surface.

If the client receives multiple configure events before it can respond to one, it is free to discard all but the last event it received.

Fields of Configure

width: i32height: i32states: Vec<u8>serial: u32
Close

surface wants to be closed

The close event is sent by the compositor when the user wants the surface to be closed. This should be equivalent to the user clicking the close button in client-side decorations, if your application has any…

This is only a request that the user intends to close your window. The client may choose to ignore this request, or show a dialog to ask the user to save their data…

Trait Implementations

Formats the value using the given formatter. Read more

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

The minimal object version for which this message exists

Retrieve the child Object associated with this message if any

Construct a message from its raw representation

Turn this message into its raw representation

Construct a message of this group from its C representation Read more

Build a C representation of this message Read more

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

Performs the conversion.

Performs the conversion.

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.