SDL  2.0
The wl_buffer interface

Data Structures

struct  wl_buffer_listener
 

Macros

#define WL_BUFFER_RELEASE_SINCE_VERSION   1
 
#define WL_BUFFER_DESTROY_SINCE_VERSION   1
 

Functions

static int wl_buffer_add_listener (struct wl_buffer *wl_buffer, const struct wl_buffer_listener *listener, void *data)
 
static void wl_buffer_set_user_data (struct wl_buffer *wl_buffer, void *user_data)
 
static voidwl_buffer_get_user_data (struct wl_buffer *wl_buffer)
 
static void wl_buffer_destroy (struct wl_buffer *wl_buffer)
 

Detailed Description

A buffer provides the content for a wl_surface. Buffers are created through factory interfaces such as wl_drm, wl_shm or similar. It has a width and a height and can be attached to a wl_surface, but the mechanism by which a client provides and updates the contents is defined by the buffer factory interface.

Macro Definition Documentation

◆ WL_BUFFER_DESTROY_SINCE_VERSION

#define WL_BUFFER_DESTROY_SINCE_VERSION   1

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

◆ WL_BUFFER_RELEASE_SINCE_VERSION

#define WL_BUFFER_RELEASE_SINCE_VERSION   1

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

Function Documentation

◆ wl_buffer_add_listener()

static int wl_buffer_add_listener ( struct wl_buffer *  wl_buffer,
const struct wl_buffer_listener listener,
void data 
)
inlinestatic

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

1708 {
1709  return wl_proxy_add_listener((struct wl_proxy *) wl_buffer,
1710  (void (**)(void)) listener, data);
1711 }
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: SDL_opengl.h:1974

◆ wl_buffer_destroy()

static void wl_buffer_destroy ( struct wl_buffer *  wl_buffer)
inlinestatic

Destroy a buffer. If and how you need to release the backing storage is defined by the buffer factory interface.

For possible side-effects to a surface, see wl_surface.attach.

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

References WL_BUFFER_DESTROY.

1755 {
1756  wl_proxy_marshal((struct wl_proxy *) wl_buffer,
1758 
1759  wl_proxy_destroy((struct wl_proxy *) wl_buffer);
1760 }
#define WL_BUFFER_DESTROY

◆ wl_buffer_get_user_data()

static void* wl_buffer_get_user_data ( struct wl_buffer *  wl_buffer)
inlinestatic

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

1735 {
1736  return wl_proxy_get_user_data((struct wl_proxy *) wl_buffer);
1737 }

◆ wl_buffer_set_user_data()

static void wl_buffer_set_user_data ( struct wl_buffer *  wl_buffer,
void user_data 
)
inlinestatic

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

1728 {
1729  wl_proxy_set_user_data((struct wl_proxy *) wl_buffer, user_data);
1730 }