Struct wayland_client::EventQueueHandle [] [src]

pub struct EventQueueHandle { /* fields omitted */ }

Handle to an event queue

This handle gives you access to methods on an event queue that are safe to do from within a callback.

They are also available on an EventQueue object via Deref.

Methods

impl EventQueueHandle
[src]

[src]

Register a proxy to a handler of this event queue.

The H type must be provided and match the type of the targetted Handler, or it will panic.

This overwrites any precedently set Handler for this proxy.

Returns appropriately and does nothing if this proxy is dead or already managed by something else than this library.

[src]

Insert a new handler to this event queue

Returns the index of this handler in the internal array, which is needed to register proxies to it.

[src]

Insert a new handler with init

Allows you to insert handlers that require some interaction with the event loop in their initialization, like registering some objects to it.

The handler must implement the Init trait, and its init method will be called after its insertion.

[src]

Remove a handler previously inserted in this event loop and returns it.

Panics if the requested type does not match the type of the stored handler or if the specified index was already removed.

Unsafety This function is unsafe because removing a handler while some wayland objects are still registered to it can lead to access freed memory. Also, the index of this handler will be reused at next handler insertion.