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

◆ WL_BUFFER_RELEASE_SINCE_VERSION

#define WL_BUFFER_RELEASE_SINCE_VERSION   1

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

1720 {
1721  return wl_proxy_add_listener((struct wl_proxy *) wl_buffer,
1722  (void (**)(void)) listener, data);
1723 }
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 1766 of file wayland-client-protocol.h.

References WL_BUFFER_DESTROY.

1767 {
1768  wl_proxy_marshal((struct wl_proxy *) wl_buffer,
1770 
1771  wl_proxy_destroy((struct wl_proxy *) wl_buffer);
1772 }
#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 1746 of file wayland-client-protocol.h.

1747 {
1748  return wl_proxy_get_user_data((struct wl_proxy *) wl_buffer);
1749 }

◆ wl_buffer_set_user_data()

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

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

1740 {
1741  wl_proxy_set_user_data((struct wl_proxy *) wl_buffer, user_data);
1742 }