Macro wayland_server::declare_handler [] [src]

macro_rules! declare_handler {
    ($handler_struct: ty, $handler_trait: path, $handled_type: ty) => { ... };
}

Registers a handler type so it can be used in event loops

After having implemented the appropriate Handler trait for your type, declare it via this macro, like this:

struct MyHandler;

impl wl_foo::Handler for MyHandler {
    ...
}

declare_handler!(MyHandler, wl_foo::Handler, wl_foo::WlFoo);Run