pub struct GlobalMapper { /* private fields */ }Expand description
A filter for globals advertised via wl_registry.
This type allows filtering globals sent by the server and advertising synthetic globals that are handled by the proxy.
Implementations§
Source§impl GlobalMapper
impl GlobalMapper
Sourcepub fn add_synthetic_global(
&mut self,
registry: &WlRegistry,
interface: ObjectInterface,
version: u32,
) -> u32
pub fn add_synthetic_global( &mut self, registry: &WlRegistry, interface: ObjectInterface, version: u32, ) -> u32
Announces a synthetic global and returns the global name.
This function is similar to GlobalMapper::try_add_synthetic_global but logs
a message instead of returning an error if the global could not be sent to the
client.
Sourcepub fn try_add_synthetic_global(
&mut self,
registry: &WlRegistry,
interface: ObjectInterface,
version: u32,
) -> Result<u32, ObjectError>
pub fn try_add_synthetic_global( &mut self, registry: &WlRegistry, interface: ObjectInterface, version: u32, ) -> Result<u32, ObjectError>
Tries to announce a synthetic global and returns the global name.
Sourcepub fn remove_synthetic_global(&mut self, registry: &WlRegistry, name: u32)
pub fn remove_synthetic_global(&mut self, registry: &WlRegistry, name: u32)
Removes a synthetic global.
This function is similar to GlobalMapper::try_remove_synthetic_global but logs
a message instead of returning an error if the global_remove event could not be
sent to the client.
Sourcepub fn try_remove_synthetic_global(
&mut self,
registry: &WlRegistry,
name: u32,
) -> Result<(), ObjectError>
pub fn try_remove_synthetic_global( &mut self, registry: &WlRegistry, name: u32, ) -> Result<(), ObjectError>
Tries to remove a synthetic global.
Sourcepub fn forward_global(
&mut self,
registry: &WlRegistry,
server_name: u32,
interface: ObjectInterface,
version: u32,
)
pub fn forward_global( &mut self, registry: &WlRegistry, server_name: u32, interface: ObjectInterface, version: u32, )
Handles a server-sent global event.
This function is similar to GlobalMapper::try_forward_global but logs
a message instead of returning an error if the global could not be sent to the
client.
Sourcepub fn try_forward_global(
&mut self,
registry: &WlRegistry,
server_name: u32,
interface: ObjectInterface,
version: u32,
) -> Result<(), ObjectError>
pub fn try_forward_global( &mut self, registry: &WlRegistry, server_name: u32, interface: ObjectInterface, version: u32, ) -> Result<(), ObjectError>
Tries to handle a server-sent global event.
Sourcepub fn ignore_global(&mut self, name: u32)
pub fn ignore_global(&mut self, name: u32)
Ignores a server-sent global.
This function should be used so that global_remove events can be filtered properly.
Sourcepub fn forward_global_remove(&mut self, registry: &WlRegistry, server_name: u32)
pub fn forward_global_remove(&mut self, registry: &WlRegistry, server_name: u32)
Handles a server-sent global_remove event.
This function is similar to GlobalMapper::try_forward_global_remove but
logs a message instead of returning an error if the event could not be sent to the
client.
Sourcepub fn try_forward_global_remove(
&mut self,
registry: &WlRegistry,
server_name: u32,
) -> Result<(), ObjectError>
pub fn try_forward_global_remove( &mut self, registry: &WlRegistry, server_name: u32, ) -> Result<(), ObjectError>
Tries to handle a server-sent global_remove event.
Sourcepub fn forward_bind(
&mut self,
registry: &WlRegistry,
client_name: u32,
object: &Rc<dyn Object>,
)
pub fn forward_bind( &mut self, registry: &WlRegistry, client_name: u32, object: &Rc<dyn Object>, )
Handles a client-sent bind request.
This function is similar to GlobalMapper::try_forward_bind but logs a
message instead of returning an error if the request could not be forwarded to the
server.
Sourcepub fn try_forward_bind(
&mut self,
registry: &WlRegistry,
client_name: u32,
object: &Rc<dyn Object>,
) -> Result<(), ObjectError>
pub fn try_forward_bind( &mut self, registry: &WlRegistry, client_name: u32, object: &Rc<dyn Object>, ) -> Result<(), ObjectError>
Tries to handle a client-sent bind request.