SDL  2.0
The wl_display interface

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

◆ WL_DISPLAY_ERROR_SINCE_VERSION

#define WL_DISPLAY_ERROR_SINCE_VERSION   1

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

◆ WL_DISPLAY_GET_REGISTRY_SINCE_VERSION

#define WL_DISPLAY_GET_REGISTRY_SINCE_VERSION   1

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

◆ WL_DISPLAY_SYNC_SINCE_VERSION

#define WL_DISPLAY_SYNC_SINCE_VERSION   1

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

827  {
828  /**
829  * server couldn't find object
830  */
832  /**
833  * method doesn't exist on the specified interface
834  */
836  /**
837  * server is out of memory
838  */
840 };

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

888 {
889  return wl_proxy_add_listener((struct wl_proxy *) wl_display,
890  (void (**)(void)) listener, data);
891 }
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: SDL_opengl.h:1974

◆ wl_display_get_registry()

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

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

It should be noted that the server side resources consumed in response to a get_registry request can only be released when the client disconnects, not when the client side proxy is destroyed. Therefore, clients should invoke get_registry as infrequently as possible to avoid wasting memory.

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

References NULL, WL_DISPLAY_GET_REGISTRY, and wl_registry_interface.

975 {
976  struct wl_proxy *registry;
977 
978  registry = wl_proxy_marshal_constructor((struct wl_proxy *) wl_display,
980 
981  return (struct wl_registry *) registry;
982 }
const struct wl_interface wl_registry_interface
#define WL_DISPLAY_GET_REGISTRY
#define NULL
Definition: begin_code.h:164

◆ wl_display_get_user_data()

static void* wl_display_get_user_data ( struct wl_display *  wl_display)
inlinestatic

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

924 {
925  return wl_proxy_get_user_data((struct wl_proxy *) wl_display);
926 }

◆ wl_display_set_user_data()

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

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

917 {
918  wl_proxy_set_user_data((struct wl_proxy *) wl_display, user_data);
919 }

◆ wl_display_sync()

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

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

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

951 {
952  struct wl_proxy *callback;
953 
954  callback = wl_proxy_marshal_constructor((struct wl_proxy *) wl_display,
956 
957  return (struct wl_callback *) callback;
958 }
#define WL_DISPLAY_SYNC
const struct wl_interface wl_callback_interface
static Uint32 callback(Uint32 interval, void *param)
Definition: testtimer.c:34
#define NULL
Definition: begin_code.h:164