Struct wayland_client::protocol::wl_display::WlDisplay
[−]
[src]
pub struct WlDisplay { /* fields omitted */ }
Methods
impl WlDisplay
[src]
fn flush(&self) -> Result<i32>
[src]
Non-blocking write to the server
Will write as many pending requests as possible to the server socket. Never blocks: if not all
requests coul be written, will return an io error WouldBlock
.
On success returns the number of written requests.
fn create_event_queue(&self) -> EventQueue
[src]
Create a new EventQueue
No object is by default attached to it.
fn last_error(&self) -> Option<FatalError>
[src]
Get the last error that occured on the session
Such errors are fatal, meaning that if this function does not
return None
, your session is not usable any longer.
As such, this function mostly provide diagnistics information. You can have a hint an error might have been generated if I/O methods of EventQueue start returning errors.
unsafe fn get_fd(&self) -> RawFd
[src]
Get the raw File Descriptor associated with the connection
This is provided to be used in conjunction with some polling mecanism,
if you want to manually control the flow with something like epoll
.
In this case, you'll most likely want to use EventQueue::prepare_read()
and
EventQueue::dispatch_pending()
rather than EventQueue::dispatch()
.
Reading or writing anything to this FD will corrupt the internal state of the lib.
unsafe fn disconnect(self)
[src]
Close the wayland connection
This is unsafe because you must ensure you do this only after all wayland objects are destroyed, as this will release the wayland shared state.
impl WlDisplay
[src]
fn sync(&self) -> WlCallback
[src]
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.
fn get_registry(&self) -> WlRegistry
[src]
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.
Trait Implementations
impl Send for WlDisplay
[src]
impl Sync for WlDisplay
[src]
impl Proxy for WlDisplay
[src]
fn ptr(&self) -> *mut wl_proxy
[src]
Pointer to the underlying wayland proxy object
unsafe fn from_ptr_new(ptr: *mut wl_proxy) -> WlDisplay
[src]
Create an instance from a wayland pointer Read more
unsafe fn from_ptr_initialized(ptr: *mut wl_proxy) -> WlDisplay
[src]
Create an instance from a wayland pointer Read more
fn interface_ptr() -> *const wl_interface
[src]
Pointer to the interface representation
fn interface_name() -> &'static str
[src]
Internal wayland name of this interface
fn supported_version() -> u32
[src]
Max version of this interface supported
fn version(&self) -> u32
[src]
Current version of the interface this proxy is instantiated with
fn status(&self) -> Liveness
[src]
Check if the proxy behind this handle is actually still alive
fn equals(&self, other: &WlDisplay) -> bool
[src]
Check of two handles are actually the same wayland object Read more
fn set_user_data(&self, ptr: *mut ())
[src]
Set a pointer associated as user data on this proxy Read more
fn get_user_data(&self) -> *mut ()
[src]
Get the pointer associated as user data on this proxy Read more
unsafe fn clone_unchecked(&self) -> WlDisplay
[src]
Unsafely clone this proxy handle Read more
fn clone(&self) -> Option<Self> where
Self: Sized,
[src]
Self: Sized,
Clone this proxy handle Read more