Struct wayland_client::protocol::wl_display::WlDisplay
[−]
[src]
pub struct WlDisplay { /* fields omitted */ }
Methods
impl WlDisplay
[src]
fn flush(&self) -> Result<i32>
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
Create a new EventQueue
No object is by default attached to it.
fn last_error(&self) -> Option<FatalError>
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.
fn get_fd(&self) -> RawFd
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.
impl WlDisplay
[src]
fn sync(&self) -> RequestResult<WlCallback>
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) -> RequestResult<WlRegistry>
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 Drop for WlDisplay
[src]
impl Send for WlDisplay
[src]
impl Sync for WlDisplay
[src]
impl Proxy for WlDisplay
[src]
fn ptr(&self) -> *mut wl_proxy
Pointer to the underlying wayland proxy object
unsafe fn from_ptr_new(ptr: *mut wl_proxy) -> WlDisplay
Create an instance from a wayland pointer Read more
unsafe fn from_ptr_initialized(ptr: *mut wl_proxy) -> WlDisplay
Create an instance from a wayland pointer Read more
fn interface_ptr() -> *const wl_interface
Pointer to the interface representation
fn interface_name() -> &'static str
Internal wayland name of this interface
fn supported_version() -> u32
Max version of this interface supported
fn version(&self) -> u32
Current version of the interface this proxy is instanciated with
fn is_alive(&self) -> bool
Check if the proxt behind this handle is actually still alive
fn equals(&self, other: &WlDisplay) -> bool
Check of two handles are actually the same wayland object Read more
fn set_user_data(&self, ptr: *mut ())
Set a pointer associated as user data on this proxy Read more
fn get_user_data(&self) -> *mut ()
Get the pointer associated as user data on this proxy Read more