Trait wayland_client::Dispatch
source · [−]pub trait Dispatch<I: Proxy, UserData>: Sized {
fn event(
&mut self,
proxy: &I,
event: I::Event,
data: &UserData,
conn: &Connection,
qhandle: &QueueHandle<Self>
);
fn event_created_child(
opcode: u16,
_qhandle: &QueueHandle<Self>
) -> Arc<dyn ObjectData> { ... }
}
Expand description
A trait which provides an implementation for handling events from the server on a proxy with some type of associated user data.
Required Methods
fn event(
&mut self,
proxy: &I,
event: I::Event,
data: &UserData,
conn: &Connection,
qhandle: &QueueHandle<Self>
)
fn event(
&mut self,
proxy: &I,
event: I::Event,
data: &UserData,
conn: &Connection,
qhandle: &QueueHandle<Self>
)
Called when an event from the server is processed.
The implementation of this function may vary depending on protocol requirements. Typically the client will respond to the server by sending requests to the proxy.
Provided Methods
fn event_created_child(
opcode: u16,
_qhandle: &QueueHandle<Self>
) -> Arc<dyn ObjectData>
fn event_created_child(
opcode: u16,
_qhandle: &QueueHandle<Self>
) -> Arc<dyn ObjectData>
Method used to initialize the user-data of objects created by events
If the interface does not have any such event, you can ignore it. If not, the
event_created_child!
macro is provided for overriding it.