Struct wayland_window::DecoratedSurface [] [src]

pub struct DecoratedSurface<S: Surface> {
    // some fields omitted
}

A wrapper for a decorated surface.

This is the main object of this crate. It wraps a user provided wayland surface into a ShellSurface and gives you acces to it via the .get_shell() method.

It also handles the drawing of minimalistic borders allowing the resizing and moving of the window. See the root documentation of this crate for explanations about how to use it.

Methods

impl<S: Surface + Send + 'static> DecoratedSurface<S>

fn resize(&mut self, width: i32, height: i32)

Resizes the borders to given width and height.

These values should be the dimentions of the internal surface of the window (the decorated window will thus be a little larger).

fn new(user_surface: S, width: i32, height: i32, registry: &Registry, seat: Option<&Seat>) -> Result<DecoratedSurface<S>, S>

Creates a new decorated window around given surface.

If the creation failed (likely if the registry was not ready), hands back the surface.

fn get_shell(&self) -> SurfaceGuard<S>

Creates a guard giving you access to the shell surface wrapped in this object.

Calling for a processing of the events from the wayland server (via Display::dispatch() for example) while this guard is in scope may result in a deadlock.

fn destroy(self) -> S

Destroys the DecoratedSurface and returns the wrapped surface