Struct wayland_window::Frame
[−]
[src]
pub struct Frame { /* fields omitted */ }
A decorated frame for a window
This object allows you to interact with the shell_surface and frame.
You'll at least need to use it to resize the borders when you window is resized.
Dropping it will remove your window and unmap your wl_surface.
Methods
impl Frame
[src]
fn refresh(&mut self)
[src]
Refreshes the frame
Redraws the frame to match its requested state (dimensions, presence/ absence of decorations, ...)
If the frame does not need a redraw, this method will do nothing, so don't be afraid to call it frequently.
You need to call this method after every change to the dimensions or state of the decorations of your window, otherwise the drawn decorations may go out of sync with the state of your content.
fn set_title(&self, title: String)
[src]
Set a short title for the window.
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_app_id(&self, app_id: String)
[src]
Set an app id for the surface.
The surface class identifies the general class of applications to which the surface belongs.
Several wayland compositors will try to find a .desktop
file matching this name
to find metadata about your apps.
fn set_decorate(&mut self, decorate: bool)
[src]
Set wether the window should be decorated or not
You need to call refresh()
afterwards for this to properly
take effect.
fn resize(&mut self, w: i32, h: i32)
[src]
Resize the decorations
You should call this whenever you change the size of the contents of your window, with the new inner size of your window.
You need to call refresh()
afterwards for this to properly
take effect.
fn set_state(&mut self, state: State)
[src]
Sets the requested state of this surface
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