[][src]Trait wayland_protocols::xdg_shell::client::xdg_toplevel::EventHandler

pub trait EventHandler {
    fn configure(
        &mut self,
        object: XdgToplevel,
        width: i32,
        height: i32,
        states: Vec<u8>
    ) { ... }
fn close(&mut self, object: XdgToplevel) { ... } }

An interface for handling events.

Provided methods

fn configure(
    &mut self,
    object: XdgToplevel,
    width: i32,
    height: i32,
    states: Vec<u8>
)

suggest a surface change

This configure event asks the client to resize its toplevel surface or to change its state. The configured state should not be applied immediately. See xdg_surface.configure for details.

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 needs 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 must send an ack_configure in response to this event. See xdg_surface.configure and xdg_surface.ack_configure for details.

fn close(&mut self, object: XdgToplevel)

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 the window. The client may choose to ignore this request, or show a dialog to ask the user to save their data, etc.

Loading content...

Implementors

Loading content...