Struct smithay_client_toolkit::shell::xdg::XdgShell
source · pub struct XdgShell { /* private fields */ }
Expand description
The xdg shell globals.
Implementations§
source§impl XdgShell
impl XdgShell
sourcepub const API_VERSION_MAX: u32 = 6u32
pub const API_VERSION_MAX: u32 = 6u32
The maximum API version for XdgWmBase that this object will bind.
sourcepub fn bind<State>(
globals: &GlobalList,
qh: &QueueHandle<State>
) -> Result<Self, BindError>where
State: Dispatch<XdgWmBase, GlobalData, State> + Dispatch<ZxdgDecorationManagerV1, GlobalData, State> + 'static,
pub fn bind<State>(
globals: &GlobalList,
qh: &QueueHandle<State>
) -> Result<Self, BindError>where
State: Dispatch<XdgWmBase, GlobalData, State> + Dispatch<ZxdgDecorationManagerV1, GlobalData, State> + 'static,
sourcepub fn create_window<State>(
&self,
surface: impl Into<Surface>,
decorations: WindowDecorations,
qh: &QueueHandle<State>
) -> Windowwhere
State: Dispatch<XdgSurface, WindowData> + Dispatch<XdgToplevel, WindowData> + Dispatch<ZxdgToplevelDecorationV1, WindowData> + WindowHandler + 'static,
pub fn create_window<State>(
&self,
surface: impl Into<Surface>,
decorations: WindowDecorations,
qh: &QueueHandle<State>
) -> Windowwhere
State: Dispatch<XdgSurface, WindowData> + Dispatch<XdgToplevel, WindowData> + Dispatch<ZxdgToplevelDecorationV1, WindowData> + WindowHandler + 'static,
Creates a new, unmapped window.
Protocol errors
If the surface already has a role object, the compositor will raise a protocol error.
A surface is considered to have a role object if some other type of surface was created using the surface. For example, creating a window, popup, layer or subsurface all assign a role object to a surface.
This function takes ownership of the surface.
For more info related to creating windows, see the module documentation
.
pub fn xdg_wm_base(&self) -> &XdgWmBase
Trait Implementations§
source§impl<D> Dispatch<XdgSurface, WindowData, D> for XdgShell
impl<D> Dispatch<XdgSurface, WindowData, D> for XdgShell
source§fn event(
data: &mut D,
xdg_surface: &XdgSurface,
event: Event,
_: &WindowData,
conn: &Connection,
qh: &QueueHandle<D>
)
fn event( data: &mut D, xdg_surface: &XdgSurface, event: Event, _: &WindowData, conn: &Connection, qh: &QueueHandle<D> )
Called when an event from the server is processed Read more
source§fn event_created_child(
opcode: u16,
_qhandle: &QueueHandle<State>
) -> Arc<dyn ObjectData>
fn event_created_child( opcode: u16, _qhandle: &QueueHandle<State> ) -> Arc<dyn ObjectData>
Method used to initialize the user-data of objects created by events Read more
source§impl<D> Dispatch<XdgToplevel, WindowData, D> for XdgShell
impl<D> Dispatch<XdgToplevel, WindowData, D> for XdgShell
source§fn event(
data: &mut D,
toplevel: &XdgToplevel,
event: Event,
_: &WindowData,
conn: &Connection,
qh: &QueueHandle<D>
)
fn event( data: &mut D, toplevel: &XdgToplevel, event: Event, _: &WindowData, conn: &Connection, qh: &QueueHandle<D> )
Called when an event from the server is processed Read more
source§fn event_created_child(
opcode: u16,
_qhandle: &QueueHandle<State>
) -> Arc<dyn ObjectData>
fn event_created_child( opcode: u16, _qhandle: &QueueHandle<State> ) -> Arc<dyn ObjectData>
Method used to initialize the user-data of objects created by events Read more
source§impl<D> Dispatch<XdgWmBase, GlobalData, D> for XdgShell
impl<D> Dispatch<XdgWmBase, GlobalData, D> for XdgShell
source§fn event(
_state: &mut D,
xdg_wm_base: &XdgWmBase,
event: Event,
_data: &GlobalData,
_conn: &Connection,
_qh: &QueueHandle<D>
)
fn event( _state: &mut D, xdg_wm_base: &XdgWmBase, event: Event, _data: &GlobalData, _conn: &Connection, _qh: &QueueHandle<D> )
Called when an event from the server is processed Read more
source§fn event_created_child(
opcode: u16,
_qhandle: &QueueHandle<State>
) -> Arc<dyn ObjectData>
fn event_created_child( opcode: u16, _qhandle: &QueueHandle<State> ) -> Arc<dyn ObjectData>
Method used to initialize the user-data of objects created by events Read more
source§impl<D> Dispatch<ZxdgDecorationManagerV1, GlobalData, D> for XdgShell
impl<D> Dispatch<ZxdgDecorationManagerV1, GlobalData, D> for XdgShell
source§fn event(
_: &mut D,
_: &ZxdgDecorationManagerV1,
_: Event,
_: &GlobalData,
_: &Connection,
_: &QueueHandle<D>
)
fn event( _: &mut D, _: &ZxdgDecorationManagerV1, _: Event, _: &GlobalData, _: &Connection, _: &QueueHandle<D> )
Called when an event from the server is processed Read more
source§fn event_created_child(
opcode: u16,
_qhandle: &QueueHandle<State>
) -> Arc<dyn ObjectData>
fn event_created_child( opcode: u16, _qhandle: &QueueHandle<State> ) -> Arc<dyn ObjectData>
Method used to initialize the user-data of objects created by events Read more
source§impl<D> Dispatch<ZxdgToplevelDecorationV1, WindowData, D> for XdgShell
impl<D> Dispatch<ZxdgToplevelDecorationV1, WindowData, D> for XdgShell
source§fn event(
_: &mut D,
decoration: &ZxdgToplevelDecorationV1,
event: Event,
_: &WindowData,
_: &Connection,
_: &QueueHandle<D>
)
fn event( _: &mut D, decoration: &ZxdgToplevelDecorationV1, event: Event, _: &WindowData, _: &Connection, _: &QueueHandle<D> )
Called when an event from the server is processed Read more
source§fn event_created_child(
opcode: u16,
_qhandle: &QueueHandle<State>
) -> Arc<dyn ObjectData>
fn event_created_child( opcode: u16, _qhandle: &QueueHandle<State> ) -> Arc<dyn ObjectData>
Method used to initialize the user-data of objects created by events Read more
source§impl ProvidesBoundGlobal<XdgWmBase, { XdgShell::API_VERSION_MAX }> for XdgShell
impl ProvidesBoundGlobal<XdgWmBase, { XdgShell::API_VERSION_MAX }> for XdgShell
fn bound_global(&self) -> Result<XdgWmBase, GlobalError>
fn with_min_version(&self, version: u32) -> Result<I, GlobalError>
source§impl ProvidesBoundGlobal<XdgWmBase, 5> for XdgShell
impl ProvidesBoundGlobal<XdgWmBase, 5> for XdgShell
fn bound_global(&self) -> Result<XdgWmBase, GlobalError>
fn with_min_version(&self, version: u32) -> Result<I, GlobalError>
source§impl ProvidesBoundGlobal<ZxdgDecorationManagerV1, 1> for XdgShell
impl ProvidesBoundGlobal<ZxdgDecorationManagerV1, 1> for XdgShell
fn bound_global(&self) -> Result<ZxdgDecorationManagerV1, GlobalError>
fn with_min_version(&self, version: u32) -> Result<I, GlobalError>
Auto Trait Implementations§
impl !RefUnwindSafe for XdgShell
impl Send for XdgShell
impl Sync for XdgShell
impl Unpin for XdgShell
impl !UnwindSafe for XdgShell
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§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
.source§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
.source§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.source§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.