pub struct Window(/* private fields */);
Implementations§
source§impl Window
impl Window
pub fn from_xdg_toplevel(toplevel: &XdgToplevel) -> Option<Window>
pub fn from_xdg_surface(surface: &XdgSurface) -> Option<Window>
pub fn from_toplevel_decoration( decoration: &ZxdgToplevelDecorationV1, ) -> Option<Window>
pub fn set_title(&self, title: impl Into<String>)
pub fn set_app_id(&self, app_id: impl Into<String>)
pub fn set_parent(&self, parent: Option<&Window>)
pub fn set_maximized(&self)
pub fn unset_maximized(&self)
pub fn set_minimized(&self)
pub fn set_fullscreen(&self, output: Option<&WlOutput>)
pub fn unset_fullscreen(&self)
sourcepub fn request_decoration_mode(&self, mode: Option<DecorationMode>)
pub fn request_decoration_mode(&self, mode: Option<DecorationMode>)
Requests the window should use the specified decoration mode.
A mode of None
indicates that the window does not care what type of decorations are used.
The compositor will respond with a configure
. The configure will
indicate whether the window’s decoration mode has changed.
§Configure loops
You should avoid sending multiple decoration mode requests to ensure you do not enter a configure loop.
pub fn move_(&self, seat: &WlSeat, serial: u32)
pub fn resize(&self, seat: &WlSeat, serial: u32, edges: ResizeEdge)
pub fn set_min_size(&self, min_size: Option<(u32, u32)>)
sourcepub fn set_max_size(&self, max_size: Option<(u32, u32)>)
pub fn set_max_size(&self, max_size: Option<(u32, u32)>)
§Protocol errors
The maximum size of the window may not be smaller than the minimum size.
sourcepub fn xdg_toplevel(&self) -> &XdgToplevel
pub fn xdg_toplevel(&self) -> &XdgToplevel
Returns the underlying xdg toplevel wrapped by this window.
Trait Implementations§
source§impl PartialEq for Window
impl PartialEq for Window
source§impl WaylandSurface for Window
impl WaylandSurface for Window
source§fn wl_surface(&self) -> &WlSurface
fn wl_surface(&self) -> &WlSurface
The underlying
WlSurface
.fn attach(&self, buffer: Option<&WlBuffer>, x: u32, y: u32)
fn set_opaque_region(&self, region: Option<&WlRegion>)
fn set_input_region(&self, region: Option<&WlRegion>)
fn set_buffer_transform(&self, transform: Transform) -> Result<(), Unsupported>
fn set_buffer_scale(&self, scale: u32) -> Result<(), Unsupported>
fn offset(&self, x: u32, y: u32) -> Result<(), Unsupported>
source§impl XdgSurface for Window
impl XdgSurface for Window
source§fn xdg_surface(&self) -> &XdgSurface
fn xdg_surface(&self) -> &XdgSurface
The underlying
XdgSurface
.fn set_window_geometry(&self, x: u32, y: u32, width: u32, height: u32)
Auto Trait Implementations§
impl Freeze for Window
impl !RefUnwindSafe for Window
impl Send for Window
impl Sync for Window
impl Unpin for Window
impl !UnwindSafe for Window
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.