Product SiteDocumentation Site

Wayland Protocol Specification


    Copyright © 2008-2011 Kristian Høgsberg
    Copyright © 2010-2011 Intel Corporation

    Permission to use, copy, modify, distribute, and sell this
    software and its documentation for any purpose is hereby granted
    without fee, provided that the above copyright notice appear in
    all copies and that both that copyright notice and this permission
    notice appear in supporting documentation, and that the name of
    the copyright holders not be used in advertising or publicity
    pertaining to distribution of the software without specific,
    written prior permission.  The copyright holders make no
    representations about the suitability of this software for any
    purpose.  It is provided "as is" without express or implied
    warranty.

    THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
    SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
    FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
    SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
    WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
    AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
    ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
    THIS SOFTWARE.

A.1. wl_display - core global object

The core global object. This is a special singleton object. It is used for internal Wayland protocol features.

A.1.1. Requests provided by wl_display

A.1.1.1. wl_display::sync - 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 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.
wl_display::sync arguments
callback
Type: new_id

A.1.1.2. wl_display::get_registry - 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.
wl_display::get_registry arguments
callback
Type: new_id

A.1.2. Events provided by wl_display

A.1.2.1. wl_display::error - fatal error event

The error event is sent out when a fatal (non-recoverable) error has occurred. The object_id argument is the object where the error occurred, most often in response to a request to that object. The code identifies the error and is defined by the object interface. As such, each interface defines its own set of error codes. The message is an brief description of the error, for (debugging) convenience.
wl_display::error arguments
object_id
Type: object
code
Type: uint
message
Type: string

A.1.2.2. wl_display::delete_id - acknowledge object ID deletion

This event is used internally by the object ID management logic. When a client deletes an object, the server will send this event to acknowledge that it has seen the delete request. When the client receive this event, it will know that it can safely reuse the object ID.
wl_display::delete_id arguments
id
Type: uint

A.1.3. Enums provided by wl_display

A.1.3.1. wl_display::error - global error values

These errors are global and can be emitted in response to any server request.
wl_display::error values
invalid_object
Value: 0
server couldn't find object
invalid_method
Value: 1
method doesn't exist on the specified interface
no_memory
Value: 2
server is out of memory