Trait runa_wayland_protocols::wayland::wl_display::v1::RequestDispatch
source · pub trait RequestDispatch<Ctx> {
type Error;
type SyncFut<'a>: Future<Output = Result<(), Self::Error>> + 'a
where Ctx: 'a;
type GetRegistryFut<'a>: Future<Output = Result<(), Self::Error>> + 'a
where Ctx: 'a;
// Required methods
fn sync<'a>(
ctx: &'a mut Ctx,
object_id: u32,
callback: NewId
) -> Self::SyncFut<'a>;
fn get_registry<'a>(
ctx: &'a mut Ctx,
object_id: u32,
registry: NewId
) -> Self::GetRegistryFut<'a>;
}
Required Associated Types§
type Error
sourcetype SyncFut<'a>: Future<Output = Result<(), Self::Error>> + 'a
where
Ctx: 'a
type SyncFut<'a>: Future<Output = Result<(), Self::Error>> + 'a where Ctx: 'a
Type of future returned by sync
sourcetype GetRegistryFut<'a>: Future<Output = Result<(), Self::Error>> + 'a
where
Ctx: 'a
type GetRegistryFut<'a>: Future<Output = Result<(), Self::Error>> + 'a where Ctx: 'a
Type of future returned by get_registry
Required Methods§
sourcefn sync<'a>(
ctx: &'a mut Ctx,
object_id: u32,
callback: NewId
) -> Self::SyncFut<'a>
fn sync<'a>( ctx: &'a mut Ctx, object_id: u32, callback: NewId ) -> Self::SyncFut<'a>
asynchronous roundtrip
The sync request asks the server to emit the ‘done’ event on the returned wl_callback object. Since requests are handled in-order and events are delivered in-order, this can be used as a barrier to ensure all previous requests and the resulting events have been handled.
The object returned by this request will be destroyed by the compositor after the callback is fired and as such the client must not attempt to use it after that point.
The callback_data passed in the callback is the event serial.
sourcefn get_registry<'a>(
ctx: &'a mut Ctx,
object_id: u32,
registry: NewId
) -> Self::GetRegistryFut<'a>
fn get_registry<'a>( ctx: &'a mut Ctx, object_id: u32, registry: NewId ) -> Self::GetRegistryFut<'a>
get global registry object
This request creates a registry object that allows the client to list and bind the global objects available from the compositor.
It should be noted that the server side resources consumed in response to a get_registry request can only be released when the client disconnects, not when the client side proxy is destroyed. Therefore, clients should invoke get_registry as infrequently as possible to avoid wasting memory.