Struct wayland_window::DecoratedSurface
[−]
[src]
pub struct DecoratedSurface { /* fields omitted */ }
A wrapper for a decorated surface.
This is the main object of this crate. It 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
[src]
fn resize(&mut self, width: i32, height: i32)
[src]
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: &Shell,
seat: Option<WlSeat>,
decorate: bool
) -> Result<DecoratedSurface, ()>
[src]
surface: &WlSurface,
width: i32,
height: i32,
compositor: &WlCompositor,
subcompositor: &WlSubcompositor,
shm: &WlShm,
shell: &Shell,
seat: Option<WlSeat>,
decorate: bool
) -> Result<DecoratedSurface, ()>
Create a new DecoratedSurface
fn set_title(&self, title: String)
[src]
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)
[src]
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.
When using xdg-shell, this calls ZxdgTopLevelV6::set_app_id
.
When using wl-shell, this calls WlShellSurface::set_class
.
fn set_decorate(&mut self, decorate: bool)
[src]
Turn on or off decoration of this surface
Automatically disables fullscreen mode if it was set.
fn set_fullscreen(&mut self, output: Option<&WlOutput>)
[src]
Sets this surface as fullscreen (see wl_shell_surface
for details)
Automatically disables decorations.
When using wl-shell, this uses the default fullscreen method and framerate.
fn set_min_size(&mut self, size: Option<(i32, i32)>)
[src]
Sets the minimum possible size for this window
Provide either a tuple Some((width, height))
or None
to unset the
minimum size.
The provided size is the interior size, not counting decorations
fn set_max_size(&mut self, size: Option<(i32, i32)>)
[src]
Sets the maximum possible size for this window
Provide either a tuple Some((width, height))
or None
to unset the
maximum size.
The provided size is the interior size, not counting decorations