Struct wayland_window::DecoratedSurface
[−]
[src]
pub struct DecoratedSurface<H: Handler> { /* 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<H: Handler> DecoratedSurface<H>
[src]
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>,
decorate: bool)
-> Result<DecoratedSurface<H>, ()>
width: i32,
height: i32,
compositor: &WlCompositor,
subcompositor: &WlSubcompositor,
shm: &WlShm,
shell: &WlShell,
seat: Option<WlSeat>,
decorate: bool)
-> Result<DecoratedSurface<H>, ()>
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.
fn set_decorate(&mut self, decorate: bool)
Turn on or off decoration of this surface
Automatically disables fullscreen mode if it was set.
fn set_fullscreen(&mut self,
method: FullscreenMethod,
framerate: u32,
output: Option<&WlOutput>)
method: FullscreenMethod,
framerate: u32,
output: Option<&WlOutput>)
Sets this surface as fullscreen (see wl_shell_surface
for details)
Automatically disables decorations.
fn handler(&mut self) -> &mut Option<H>
Trait Implementations
impl<H: Handler + Any + Send + 'static> Init for DecoratedSurface<H>
[src]
impl<H: Handler> Handler for DecoratedSurface<H>
[src]
fn enter(&mut self,
_: &mut EventQueueHandle,
_: &WlPointer,
serial: u32,
surface: &WlSurface,
x: f64,
y: f64)
_: &mut EventQueueHandle,
_: &WlPointer,
serial: u32,
surface: &WlSurface,
x: f64,
y: f64)
enter event Read more
fn leave(&mut self,
_: &mut EventQueueHandle,
_: &WlPointer,
serial: u32,
_: &WlSurface)
_: &mut EventQueueHandle,
_: &WlPointer,
serial: u32,
_: &WlSurface)
leave event Read more
fn motion(&mut self,
_: &mut EventQueueHandle,
_: &WlPointer,
_: u32,
x: f64,
y: f64)
_: &mut EventQueueHandle,
_: &WlPointer,
_: u32,
x: f64,
y: f64)
pointer motion event Read more
pointer button event Read more
fn axis(&mut self,
evqh: &mut EventQueueHandle,
proxy: &WlPointer,
time: u32,
axis: Axis,
value: f64)
evqh: &mut EventQueueHandle,
proxy: &WlPointer,
time: u32,
axis: Axis,
value: f64)
axis event Read more
fn frame(&mut self, evqh: &mut EventQueueHandle, proxy: &WlPointer)
end of a pointer event sequence Read more
fn axis_source(&mut self,
evqh: &mut EventQueueHandle,
proxy: &WlPointer,
axis_source: AxisSource)
evqh: &mut EventQueueHandle,
proxy: &WlPointer,
axis_source: AxisSource)
axis source event Read more
fn axis_stop(&mut self,
evqh: &mut EventQueueHandle,
proxy: &WlPointer,
time: u32,
axis: Axis)
evqh: &mut EventQueueHandle,
proxy: &WlPointer,
time: u32,
axis: Axis)
axis stop event Read more
fn axis_discrete(&mut self,
evqh: &mut EventQueueHandle,
proxy: &WlPointer,
axis: Axis,
discrete: i32)
evqh: &mut EventQueueHandle,
proxy: &WlPointer,
axis: Axis,
discrete: i32)
axis click event Read more
impl<H: Handler> Handler<WlPointer> for DecoratedSurface<H>
[src]
unsafe fn message(&mut self,
evq: &mut EventQueueHandle,
proxy: &WlPointer,
opcode: u32,
args: *const wl_argument)
-> Result<(), ()>
evq: &mut EventQueueHandle,
proxy: &WlPointer,
opcode: u32,
args: *const wl_argument)
-> Result<(), ()>
Dispatch a message.
impl<H: Handler> Handler for DecoratedSurface<H>
[src]
fn ping(&mut self, _: &mut EventQueueHandle, me: &WlShellSurface, serial: u32)
ping client Read more
fn configure(&mut self,
evqh: &mut EventQueueHandle,
_: &WlShellSurface,
edges: Resize,
width: i32,
height: i32)
evqh: &mut EventQueueHandle,
_: &WlShellSurface,
edges: Resize,
width: i32,
height: i32)
suggest resize Read more
fn popup_done(&mut self, evqh: &mut EventQueueHandle, proxy: &WlShellSurface)
popup interaction is done Read more