Struct wayland_window::DecoratedSurface
[−]
[src]
pub struct DecoratedSurface { // 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 DecoratedSurface
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(surface: &WlSurface, width: i32, height: i32, compositor: &WlCompositor, subcompositor: &WlSubcompositor, shm: &WlShm, shell: &WlShell, seat: Option<WlSeat>) -> Result<DecoratedSurface, ()>
Creates a new decorated window around given surface.
fn set_title(&self, title: String)
Set a short title for the surface.
This string may be used to identify the surface in a task bar, window list, or other user interface elements provided by the compositor.
fn set_class(&self, class: String)
Set a class for the surface.
The surface class identifies the general class of applications to which the surface belongs. A common convention is to use the file name (or the full path if it is a non-standard location) of the application's .desktop file as the class.