pub struct XdgShell {
xdg_wm_base: XdgWmBase,
xdg_decoration_manager: GlobalProxy<ZxdgDecorationManagerV1>,
}Expand description
The xdg shell globals.
Fields§
§xdg_wm_base: XdgWmBase§xdg_decoration_manager: GlobalProxy<ZxdgDecorationManagerV1>Implementations§
Source§impl XdgShell
impl XdgShell
Sourcepub const API_VERSION_MAX: u32 = 6
pub const API_VERSION_MAX: u32 = 6
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 Freeze for XdgShell
impl !RefUnwindSafe for XdgShell
impl Send for XdgShell
impl Sync for XdgShell
impl Unpin for XdgShell
impl UnsafeUnpin 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.