Struct wayland_client::GlobalManager [−][src]
pub struct GlobalManager { /* fields omitted */ }
An utility to manage global objects
This utility provides an implemenation for the registry that track the list of globals for you, as well as utilities to bind them.
Methods
impl GlobalManager
[src]
impl GlobalManager
pub fn new(display: &Proxy<WlDisplay>) -> GlobalManager
[src]
pub fn new(display: &Proxy<WlDisplay>) -> GlobalManager
Create a global manager handling a registry
pub fn new_with_cb<Impl>(
display: &Proxy<WlDisplay>,
callback: Impl
) -> GlobalManager where
Impl: Implementation<Proxy<WlRegistry>, GlobalEvent> + Send + 'static,
[src]
pub fn new_with_cb<Impl>(
display: &Proxy<WlDisplay>,
callback: Impl
) -> GlobalManager where
Impl: Implementation<Proxy<WlRegistry>, GlobalEvent> + Send + 'static,
Create a global manager handling a registry with a callback
This global manager will track globals as a simple one, but will also forward the registry events to your callback.
This can be used if you want to handle specially certain globals, but want to use the default mechanism for the rest.
pub fn instantiate_auto<I: Interface, F>(
&self,
implementor: F
) -> Result<Proxy<I>, GlobalError> where
F: FnOnce(NewProxy<I>) -> Proxy<I>,
[src]
pub fn instantiate_auto<I: Interface, F>(
&self,
implementor: F
) -> Result<Proxy<I>, GlobalError> where
F: FnOnce(NewProxy<I>) -> Proxy<I>,
Instanciate a global with highest available version
This method is only appropriate for globals that are expected to
not exist with multiplicity (sur as wl_compositor
or wl_shm
),
as it will only bind a single one.
pub fn instantiate_exact<I: Interface, F>(
&self,
version: u32,
implementor: F
) -> Result<Proxy<I>, GlobalError> where
F: FnOnce(NewProxy<I>) -> Proxy<I>,
[src]
pub fn instantiate_exact<I: Interface, F>(
&self,
version: u32,
implementor: F
) -> Result<Proxy<I>, GlobalError> where
F: FnOnce(NewProxy<I>) -> Proxy<I>,
Instanciate a global with a specific version
Like instantiate_auto
, but will bind a specific version of
this global an not the highest available.
pub fn list(&self) -> Vec<(u32, String, u32)>
[src]
pub fn list(&self) -> Vec<(u32, String, u32)>
Retrieve the list of currently known globals
Trait Implementations
impl Clone for GlobalManager
[src]
impl Clone for GlobalManager
fn clone(&self) -> GlobalManager
[src]
fn clone(&self) -> GlobalManager
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl Send for GlobalManager
impl Send for GlobalManager
impl Sync for GlobalManager
impl Sync for GlobalManager