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 963 of file wayland-client-protocol.h.

◆ WL_DISPLAY_ERROR_SINCE_VERSION

#define WL_DISPLAY_ERROR_SINCE_VERSION   1

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

◆ WL_DISPLAY_GET_REGISTRY_SINCE_VERSION

#define WL_DISPLAY_GET_REGISTRY_SINCE_VERSION   1

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

◆ WL_DISPLAY_SYNC_SINCE_VERSION

#define WL_DISPLAY_SYNC_SINCE_VERSION   1

Definition at line 968 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 887 of file wayland-client-protocol.h.

887  {
888  /**
889  * server couldn't find object
890  */
892  /**
893  * method doesn't exist on the specified interface
894  */
896  /**
897  * server is out of memory
898  */
900 };

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 946 of file wayland-client-protocol.h.

948 {
949  return wl_proxy_add_listener((struct wl_proxy *) wl_display,
950  (void (**)(void)) listener, data);
951 }

◆ 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 1028 of file wayland-client-protocol.h.

1029 {
1030  struct wl_proxy *registry;
1031 
1032  registry = wl_proxy_marshal_flags((struct wl_proxy *) wl_display,
1033  WL_DISPLAY_GET_REGISTRY, &wl_registry_interface, wl_proxy_get_version((struct wl_proxy *) wl_display), 0, NULL);
1034 
1035  return (struct wl_registry *) registry;
1036 }

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 983 of file wayland-client-protocol.h.

984 {
985  return wl_proxy_get_user_data((struct wl_proxy *) wl_display);
986 }

◆ wl_display_set_user_data()

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

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

977 {
978  wl_proxy_set_user_data((struct wl_proxy *) wl_display, user_data);
979 }

◆ 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 1010 of file wayland-client-protocol.h.

1011 {
1012  struct wl_proxy *callback;
1013 
1014  callback = wl_proxy_marshal_flags((struct wl_proxy *) wl_display,
1015  WL_DISPLAY_SYNC, &wl_callback_interface, wl_proxy_get_version((struct wl_proxy *) wl_display), 0, NULL);
1016 
1017  return (struct wl_callback *) callback;
1018 }

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:954
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:953
WL_DISPLAY_ERROR_INVALID_METHOD
@ WL_DISPLAY_ERROR_INVALID_METHOD
Definition: wayland-client-protocol.h:895
WL_DISPLAY_ERROR_INVALID_OBJECT
@ WL_DISPLAY_ERROR_INVALID_OBJECT
Definition: wayland-client-protocol.h:891
WL_DISPLAY_ERROR_NO_MEMORY
@ WL_DISPLAY_ERROR_NO_MEMORY
Definition: wayland-client-protocol.h:899
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