Trait wayland_client::internals::Bind
[−]
[src]
pub trait Bind<R>: FFI { fn interface() -> &'static wl_interface; unsafe fn wrap(ptr: *mut Self::Ptr, parent: R) -> Self; }
A trait for structure representing global objects that can be bound by the registry.
Normal use of the library does not require using this trait, it is only provided for special situations like implementing custom protocol extentions.
Required Methods
fn interface() -> &'static wl_interface
The wl_interface
used to create this object in the registry.
unsafe fn wrap(ptr: *mut Self::Ptr, parent: R) -> Self
Create the object by wraping the pointer returned by the registry.
parent
is a reference to the registry, its primary role is to allow
the newly created object to keep a clone of the regitry, in order
to keep the wayland connexion alive.