SDL  2.0
The wl_display interface

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

Data Structures

struct  wl_display_listener
 

Macros

#define WL_DISPLAY_ERROR_SINCE_VERSION   1
 
#define WL_DISPLAY_DELETE_ID_SINCE_VERSION   1
 
#define WL_DISPLAY_SYNC_SINCE_VERSION   1
 
#define WL_DISPLAY_GET_REGISTRY_SINCE_VERSION   1
 

Enumerations

enum  wl_display_error {
  WL_DISPLAY_ERROR_INVALID_OBJECT = 0,
  WL_DISPLAY_ERROR_INVALID_METHOD = 1,
  WL_DISPLAY_ERROR_NO_MEMORY = 2
}
 

Functions

static int wl_display_add_listener (struct wl_display *wl_display, const struct wl_display_listener *listener, void *data)
 
static void wl_display_set_user_data (struct wl_display *wl_display, void *user_data)
 
static voidwl_display_get_user_data (struct wl_display *wl_display)
 
static struct wl_callback * wl_display_sync (struct wl_display *wl_display)
 
static struct wl_registry * wl_display_get_registry (struct wl_display *wl_display)
 

Detailed Description

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

Macro Definition Documentation

◆ WL_DISPLAY_DELETE_ID_SINCE_VERSION

#define WL_DISPLAY_DELETE_ID_SINCE_VERSION   1

Definition at line 897 of file wayland-client-protocol.h.

◆ WL_DISPLAY_ERROR_SINCE_VERSION

#define WL_DISPLAY_ERROR_SINCE_VERSION   1

Definition at line 893 of file wayland-client-protocol.h.

◆ WL_DISPLAY_GET_REGISTRY_SINCE_VERSION

#define WL_DISPLAY_GET_REGISTRY_SINCE_VERSION   1

Definition at line 906 of file wayland-client-protocol.h.

◆ WL_DISPLAY_SYNC_SINCE_VERSION

#define WL_DISPLAY_SYNC_SINCE_VERSION   1

Definition at line 902 of file wayland-client-protocol.h.

Enumeration Type Documentation

◆ wl_display_error

global error values

These errors are global and can be emitted in response to any server request.

Enumerator
WL_DISPLAY_ERROR_INVALID_OBJECT 

server couldn't find object

WL_DISPLAY_ERROR_INVALID_METHOD 

method doesn't exist on the specified interface

WL_DISPLAY_ERROR_NO_MEMORY 

server is out of memory

Definition at line 821 of file wayland-client-protocol.h.

821  {
822  /**
823  * server couldn't find object
824  */
826  /**
827  * method doesn't exist on the specified interface
828  */
830  /**
831  * server is out of memory
832  */
834 };

Function Documentation

◆ wl_display_add_listener()

static int wl_display_add_listener ( struct wl_display *  wl_display,
const struct wl_display_listener listener,
void data 
)
inlinestatic

Definition at line 880 of file wayland-client-protocol.h.

882 {
883  return wl_proxy_add_listener((struct wl_proxy *) wl_display,
884  (void (**)(void)) listener, data);
885 }

◆ wl_display_get_registry()

static struct wl_registry* wl_display_get_registry ( struct wl_display *  wl_display)
inlinestatic

This request creates a registry object that allows the client to list and bind the global objects available from the compositor.

Definition at line 962 of file wayland-client-protocol.h.

963 {
964  struct wl_proxy *registry;
965 
966  registry = wl_proxy_marshal_constructor((struct wl_proxy *) wl_display,
968 
969  return (struct wl_registry *) registry;
970 }

References NULL, WL_DISPLAY_GET_REGISTRY, and wl_registry_interface.

◆ wl_display_get_user_data()

static void* wl_display_get_user_data ( struct wl_display *  wl_display)
inlinestatic

Definition at line 917 of file wayland-client-protocol.h.

918 {
919  return wl_proxy_get_user_data((struct wl_proxy *) wl_display);
920 }

◆ wl_display_set_user_data()

static void wl_display_set_user_data ( struct wl_display *  wl_display,
void user_data 
)
inlinestatic

Definition at line 910 of file wayland-client-protocol.h.

911 {
912  wl_proxy_set_user_data((struct wl_proxy *) wl_display, user_data);
913 }

◆ wl_display_sync()

static struct wl_callback* wl_display_sync ( struct wl_display *  wl_display)
inlinestatic

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.

Definition at line 944 of file wayland-client-protocol.h.

945 {
946  struct wl_proxy *callback;
947 
948  callback = wl_proxy_marshal_constructor((struct wl_proxy *) wl_display,
950 
951  return (struct wl_callback *) callback;
952 }

References callback(), NULL, wl_callback_interface, and WL_DISPLAY_SYNC.

NULL
#define NULL
Definition: begin_code.h:167
WL_DISPLAY_GET_REGISTRY
#define WL_DISPLAY_GET_REGISTRY
Definition: wayland-client-protocol.h:888
callback
static Uint32 callback(Uint32 interval, void *param)
Definition: testtimer.c:34
data
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: SDL_opengl.h:1974
WL_DISPLAY_SYNC
#define WL_DISPLAY_SYNC
Definition: wayland-client-protocol.h:887
WL_DISPLAY_ERROR_INVALID_METHOD
@ WL_DISPLAY_ERROR_INVALID_METHOD
Definition: wayland-client-protocol.h:829
WL_DISPLAY_ERROR_INVALID_OBJECT
@ WL_DISPLAY_ERROR_INVALID_OBJECT
Definition: wayland-client-protocol.h:825
WL_DISPLAY_ERROR_NO_MEMORY
@ WL_DISPLAY_ERROR_NO_MEMORY
Definition: wayland-client-protocol.h:833
wl_callback_interface
const struct wl_interface wl_callback_interface
Definition: wayland-protocol.c:184
wl_registry_interface
const struct wl_interface wl_registry_interface
Definition: wayland-protocol.c:174