Trait wayland_server::GlobalHandler [] [src]

pub trait GlobalHandler<R: Resource> {
    fn bind(&mut self, evqh: &mut EventLoopHandle, client: &Client, global: R);
}

Trait to handle a global object.

Required Methods

Request to bind a global

This method is called each time a client binds this global object from the registry.

The global is instantiated as a Resource and provided to the callback, do whatever you need with it.

Letting it out of scope will not destroy the resource, and you'll still receive its events (as long as you've registered an appropriate handler).

Implementors