macro_rules! delegate_registry {
($(@<$( $lt:tt $( : $clt:tt $(+ $dlt:tt )* )? ),+>)? $ty: ty) => { ... };
}Expand description
Delegates the handling of [wl_registry].
Anything which implements RegistryHandler may be used in the delegate.
ยงUsage
use smithay_client_toolkit::{
delegate_registry, registry_handlers,
shm::{ShmHandler, Shm},
};
struct ExampleApp {
shm_state: Shm,
}
impl ShmHandler for ExampleApp {
fn shm_state(&mut self) -> &mut Shm {
&mut self.shm_state
}
}
smithay_client_toolkit::delegate_dispatch2!(ExampleApp);