The wl_shm interface

A singleton global object that provides support for shared memory. More...

## Data Structures

struct | wl_shm_listener

## Macros

#define | WL_SHM_FORMAT_SINCE_VERSION 1
#define | WL_SHM_CREATE_POOL_SINCE_VERSION 1

## Enumerations

enum | wl_shm_error { WL_SHM_ERROR_INVALID_FORMAT = 0, WL_SHM_ERROR_INVALID_STRIDE = 1, WL_SHM_ERROR_INVALID_FD = 2 }

enum

wl_shm_format {
WL_SHM_FORMAT_ARGB8888 = 0,
WL_SHM_FORMAT_XRGB8888 = 1,
WL_SHM_FORMAT_C8 = 0x20203843,
WL_SHM_FORMAT_RGB332 = 0x38424752,
WL_SHM_FORMAT_BGR233 = 0x38524742,
WL_SHM_FORMAT_XRGB4444 = 0x32315258,
WL_SHM_FORMAT_XBGR4444 = 0x32314258,
WL_SHM_FORMAT_RGBX4444 = 0x32315852,
WL_SHM_FORMAT_BGRX4444 = 0x32315842,
WL_SHM_FORMAT_ARGB4444 = 0x32315241,
WL_SHM_FORMAT_ABGR4444 = 0x32314241,
WL_SHM_FORMAT_RGBA4444 = 0x32314152,
WL_SHM_FORMAT_BGRA4444 = 0x32314142,
WL_SHM_FORMAT_XRGB1555 = 0x35315258,
WL_SHM_FORMAT_XBGR1555 = 0x35314258,
WL_SHM_FORMAT_RGBX5551 = 0x35315852,
WL_SHM_FORMAT_BGRX5551 = 0x35315842,
WL_SHM_FORMAT_ARGB1555 = 0x35315241,
WL_SHM_FORMAT_ABGR1555 = 0x35314241,
WL_SHM_FORMAT_RGBA5551 = 0x35314152,
WL_SHM_FORMAT_BGRA5551 = 0x35314142,
WL_SHM_FORMAT_RGB565 = 0x36314752,
WL_SHM_FORMAT_BGR565 = 0x36314742,
WL_SHM_FORMAT_RGB888 = 0x34324752,
WL_SHM_FORMAT_BGR888 = 0x34324742,
WL_SHM_FORMAT_XBGR8888 = 0x34324258,
WL_SHM_FORMAT_RGBX8888 = 0x34325852,
WL_SHM_FORMAT_BGRX8888 = 0x34325842,
WL_SHM_FORMAT_ABGR8888 = 0x34324241,
WL_SHM_FORMAT_RGBA8888 = 0x34324152,
WL_SHM_FORMAT_BGRA8888 = 0x34324142,
WL_SHM_FORMAT_XRGB2101010 = 0x30335258,
WL_SHM_FORMAT_XBGR2101010 = 0x30334258,
WL_SHM_FORMAT_RGBX1010102 = 0x30335852,
WL_SHM_FORMAT_BGRX1010102 = 0x30335842,
WL_SHM_FORMAT_ARGB2101010 = 0x30335241,
WL_SHM_FORMAT_ABGR2101010 = 0x30334241,
WL_SHM_FORMAT_RGBA1010102 = 0x30334152,
WL_SHM_FORMAT_BGRA1010102 = 0x30334142,
WL_SHM_FORMAT_YUYV = 0x56595559,
WL_SHM_FORMAT_YVYU = 0x55595659,
WL_SHM_FORMAT_UYVY = 0x59565955,
WL_SHM_FORMAT_VYUY = 0x59555956,
WL_SHM_FORMAT_AYUV = 0x56555941,
WL_SHM_FORMAT_NV12 = 0x3231564e,
WL_SHM_FORMAT_NV21 = 0x3132564e,
WL_SHM_FORMAT_NV16 = 0x3631564e,
WL_SHM_FORMAT_NV61 = 0x3136564e,
WL_SHM_FORMAT_YUV410 = 0x39565559,
WL_SHM_FORMAT_YVU410 = 0x39555659,
WL_SHM_FORMAT_YUV411 = 0x31315559,
WL_SHM_FORMAT_YVU411 = 0x31315659,
WL_SHM_FORMAT_YUV420 = 0x32315559,
WL_SHM_FORMAT_YVU420 = 0x32315659,
WL_SHM_FORMAT_YUV422 = 0x36315559,
WL_SHM_FORMAT_YVU422 = 0x36315659,
WL_SHM_FORMAT_YUV444 = 0x34325559,
WL_SHM_FORMAT_YVU444 = 0x34325659
}

## Functions

static int | wl_shm_add_listener (struct wl_shm *wl_shm, const struct wl_shm_listener *listener, void *data)
static void | wl_shm_set_user_data (struct wl_shm *wl_shm, void *user_data)
static void * | wl_shm_get_user_data (struct wl_shm *wl_shm)
static void | wl_shm_destroy (struct wl_shm *wl_shm)
static struct wl_shm_pool * | wl_shm_create_pool (struct wl_shm *wl_shm, int32_t fd, int32_t size)

## Detailed Description

A singleton global object that provides support for shared memory.

Clients can create wl_shm_pool objects using the create_pool request.

At connection setup time, the wl_shm object emits one or more format events to inform clients about the valid pixel formats that can be used for buffers.

## Macro Definition Documentation

## WL_SHM_CREATE_POOL_SINCE_VERSION

#define WL_SHM_CREATE_POOL_SINCE_VERSION 1

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

## WL_SHM_FORMAT_SINCE_VERSION

#define WL_SHM_FORMAT_SINCE_VERSION 1

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

## Enumeration Type Documentation

## wl_shm_error

enum wl_shm_error

wl_shm error values

These errors can be emitted in response to wl_shm requests.

Enumerator
WL_SHM_ERROR_INVALID_FORMAT | buffer format is not known
WL_SHM_ERROR_INVALID_STRIDE | invalid size or stride during pool or buffer creation
WL_SHM_ERROR_INVALID_FD | mmapping the file descriptor failed

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

{
/**
* buffer format is not known
*/
WL_SHM_ERROR_INVALID_FORMAT = 0,
/**
* invalid size or stride during pool or buffer creation
*/
WL_SHM_ERROR_INVALID_STRIDE = 1,
/**
* mmapping the file descriptor failed
*/
WL_SHM_ERROR_INVALID_FD = 2,
};

## wl_shm_format

enum wl_shm_format

pixel formats

This describes the memory layout of an individual pixel.

All renderers should support argb8888 and xrgb8888 but any other formats are optional and may not be supported by the particular renderer in use.

The drm format codes match the macros defined in drm_fourcc.h. The formats actually supported by the compositor will be reported by the format event.

Enumerator
WL_SHM_FORMAT_ARGB8888 | 32-bit ARGB format, [31:0] A:R:G:B 8:8:8:8 little endian
WL_SHM_FORMAT_XRGB8888 | 32-bit RGB format, [31:0] x:R:G:B 8:8:8:8 little endian
WL_SHM_FORMAT_C8 | 8-bit color index format, [7:0] C
WL_SHM_FORMAT_RGB332 | 8-bit RGB format, [7:0] R:G:B 3:3:2
WL_SHM_FORMAT_BGR233 | 8-bit BGR format, [7:0] B:G:R 2:3:3
WL_SHM_FORMAT_XRGB4444 | 16-bit xRGB format, [15:0] x:R:G:B 4:4:4:4 little endian
WL_SHM_FORMAT_XBGR4444 | 16-bit xBGR format, [15:0] x:B:G:R 4:4:4:4 little endian
WL_SHM_FORMAT_RGBX4444 | 16-bit RGBx format, [15:0] R:G:B:x 4:4:4:4 little endian
WL_SHM_FORMAT_BGRX4444 | 16-bit BGRx format, [15:0] B:G:R:x 4:4:4:4 little endian
WL_SHM_FORMAT_ARGB4444 | 16-bit ARGB format, [15:0] A:R:G:B 4:4:4:4 little endian
WL_SHM_FORMAT_ABGR4444 | 16-bit ABGR format, [15:0] A:B:G:R 4:4:4:4 little endian
WL_SHM_FORMAT_RGBA4444 | 16-bit RBGA format, [15:0] R:G:B:A 4:4:4:4 little endian
WL_SHM_FORMAT_BGRA4444 | 16-bit BGRA format, [15:0] B:G:R:A 4:4:4:4 little endian
WL_SHM_FORMAT_XRGB1555 | 16-bit xRGB format, [15:0] x:R:G:B 1:5:5:5 little endian
WL_SHM_FORMAT_XBGR1555 | 16-bit xBGR 1555 format, [15:0] x:B:G:R 1:5:5:5 little endian
WL_SHM_FORMAT_RGBX5551 | 16-bit RGBx 5551 format, [15:0] R:G:B:x 5:5:5:1 little endian
WL_SHM_FORMAT_BGRX5551 | 16-bit BGRx 5551 format, [15:0] B:G:R:x 5:5:5:1 little endian
WL_SHM_FORMAT_ARGB1555 | 16-bit ARGB 1555 format, [15:0] A:R:G:B 1:5:5:5 little endian
WL_SHM_FORMAT_ABGR1555 | 16-bit ABGR 1555 format, [15:0] A:B:G:R 1:5:5:5 little endian
WL_SHM_FORMAT_RGBA5551 | 16-bit RGBA 5551 format, [15:0] R:G:B:A 5:5:5:1 little endian
WL_SHM_FORMAT_BGRA5551 | 16-bit BGRA 5551 format, [15:0] B:G:R:A 5:5:5:1 little endian
WL_SHM_FORMAT_RGB565 | 16-bit RGB 565 format, [15:0] R:G:B 5:6:5 little endian
WL_SHM_FORMAT_BGR565 | 16-bit BGR 565 format, [15:0] B:G:R 5:6:5 little endian
WL_SHM_FORMAT_RGB888 | 24-bit RGB format, [23:0] R:G:B little endian
WL_SHM_FORMAT_BGR888 | 24-bit BGR format, [23:0] B:G:R little endian
WL_SHM_FORMAT_XBGR8888 | 32-bit xBGR format, [31:0] x:B:G:R 8:8:8:8 little endian
WL_SHM_FORMAT_RGBX8888 | 32-bit RGBx format, [31:0] R:G:B:x 8:8:8:8 little endian
WL_SHM_FORMAT_BGRX8888 | 32-bit BGRx format, [31:0] B:G:R:x 8:8:8:8 little endian
WL_SHM_FORMAT_ABGR8888 | 32-bit ABGR format, [31:0] A:B:G:R 8:8:8:8 little endian
WL_SHM_FORMAT_RGBA8888 | 32-bit RGBA format, [31:0] R:G:B:A 8:8:8:8 little endian
WL_SHM_FORMAT_BGRA8888 | 32-bit BGRA format, [31:0] B:G:R:A 8:8:8:8 little endian
WL_SHM_FORMAT_XRGB2101010 | 32-bit xRGB format, [31:0] x:R:G:B 2:10:10:10 little endian
WL_SHM_FORMAT_XBGR2101010 | 32-bit xBGR format, [31:0] x:B:G:R 2:10:10:10 little endian
WL_SHM_FORMAT_RGBX1010102 | 32-bit RGBx format, [31:0] R:G:B:x 10:10:10:2 little endian
WL_SHM_FORMAT_BGRX1010102 | 32-bit BGRx format, [31:0] B:G:R:x 10:10:10:2 little endian
WL_SHM_FORMAT_ARGB2101010 | 32-bit ARGB format, [31:0] A:R:G:B 2:10:10:10 little endian
WL_SHM_FORMAT_ABGR2101010 | 32-bit ABGR format, [31:0] A:B:G:R 2:10:10:10 little endian
WL_SHM_FORMAT_RGBA1010102 | 32-bit RGBA format, [31:0] R:G:B:A 10:10:10:2 little endian
WL_SHM_FORMAT_BGRA1010102 | 32-bit BGRA format, [31:0] B:G:R:A 10:10:10:2 little endian
WL_SHM_FORMAT_YUYV | packed YCbCr format, [31:0] Cr0:Y1:Cb0:Y0 8:8:8:8 little endian
WL_SHM_FORMAT_YVYU | packed YCbCr format, [31:0] Cb0:Y1:Cr0:Y0 8:8:8:8 little endian
WL_SHM_FORMAT_UYVY | packed YCbCr format, [31:0] Y1:Cr0:Y0:Cb0 8:8:8:8 little endian
WL_SHM_FORMAT_VYUY | packed YCbCr format, [31:0] Y1:Cb0:Y0:Cr0 8:8:8:8 little endian
WL_SHM_FORMAT_AYUV | packed AYCbCr format, [31:0] A:Y:Cb:Cr 8:8:8:8 little endian
WL_SHM_FORMAT_NV12 | 2 plane YCbCr Cr:Cb format, 2x2 subsampled Cr:Cb plane
WL_SHM_FORMAT_NV21 | 2 plane YCbCr Cb:Cr format, 2x2 subsampled Cb:Cr plane
WL_SHM_FORMAT_NV16 | 2 plane YCbCr Cr:Cb format, 2x1 subsampled Cr:Cb plane
WL_SHM_FORMAT_NV61 | 2 plane YCbCr Cb:Cr format, 2x1 subsampled Cb:Cr plane
WL_SHM_FORMAT_YUV410 | 3 plane YCbCr format, 4x4 subsampled Cb (1) and Cr (2) planes
WL_SHM_FORMAT_YVU410 | 3 plane YCbCr format, 4x4 subsampled Cr (1) and Cb (2) planes
WL_SHM_FORMAT_YUV411 | 3 plane YCbCr format, 4x1 subsampled Cb (1) and Cr (2) planes
WL_SHM_FORMAT_YVU411 | 3 plane YCbCr format, 4x1 subsampled Cr (1) and Cb (2) planes
WL_SHM_FORMAT_YUV420 | 3 plane YCbCr format, 2x2 subsampled Cb (1) and Cr (2) planes
WL_SHM_FORMAT_YVU420 | 3 plane YCbCr format, 2x2 subsampled Cr (1) and Cb (2) planes
WL_SHM_FORMAT_YUV422 | 3 plane YCbCr format, 2x1 subsampled Cb (1) and Cr (2) planes
WL_SHM_FORMAT_YVU422 | 3 plane YCbCr format, 2x1 subsampled Cr (1) and Cb (2) planes
WL_SHM_FORMAT_YUV444 | 3 plane YCbCr format, non-subsampled Cb (1) and Cr (2) planes
WL_SHM_FORMAT_YVU444 | 3 plane YCbCr format, non-subsampled Cr (1) and Cb (2) planes

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

{
/**
* 32-bit ARGB format, [31:0] A:R:G:B 8:8:8:8 little endian
*/
WL_SHM_FORMAT_ARGB8888 = 0,
/**
* 32-bit RGB format, [31:0] x:R:G:B 8:8:8:8 little endian
*/
WL_SHM_FORMAT_XRGB8888 = 1,
/**
* 8-bit color index format, [7:0] C
*/
WL_SHM_FORMAT_C8 = 0x20203843,
/**
* 8-bit RGB format, [7:0] R:G:B 3:3:2
*/
WL_SHM_FORMAT_RGB332 = 0x38424752,
/**
* 8-bit BGR format, [7:0] B:G:R 2:3:3
*/
WL_SHM_FORMAT_BGR233 = 0x38524742,
/**
* 16-bit xRGB format, [15:0] x:R:G:B 4:4:4:4 little endian
*/
WL_SHM_FORMAT_XRGB4444 = 0x32315258,
/**
* 16-bit xBGR format, [15:0] x:B:G:R 4:4:4:4 little endian
*/
WL_SHM_FORMAT_XBGR4444 = 0x32314258,
/**
* 16-bit RGBx format, [15:0] R:G:B:x 4:4:4:4 little endian
*/
WL_SHM_FORMAT_RGBX4444 = 0x32315852,
/**
* 16-bit BGRx format, [15:0] B:G:R:x 4:4:4:4 little endian
*/
WL_SHM_FORMAT_BGRX4444 = 0x32315842,
/**
* 16-bit ARGB format, [15:0] A:R:G:B 4:4:4:4 little endian
*/
WL_SHM_FORMAT_ARGB4444 = 0x32315241,
/**
* 16-bit ABGR format, [15:0] A:B:G:R 4:4:4:4 little endian
*/
WL_SHM_FORMAT_ABGR4444 = 0x32314241,
/**
* 16-bit RBGA format, [15:0] R:G:B:A 4:4:4:4 little endian
*/
WL_SHM_FORMAT_RGBA4444 = 0x32314152,
/**
* 16-bit BGRA format, [15:0] B:G:R:A 4:4:4:4 little endian
*/
WL_SHM_FORMAT_BGRA4444 = 0x32314142,
/**
* 16-bit xRGB format, [15:0] x:R:G:B 1:5:5:5 little endian
*/
WL_SHM_FORMAT_XRGB1555 = 0x35315258,
/**
* 16-bit xBGR 1555 format, [15:0] x:B:G:R 1:5:5:5 little endian
*/
WL_SHM_FORMAT_XBGR1555 = 0x35314258,
/**
* 16-bit RGBx 5551 format, [15:0] R:G:B:x 5:5:5:1 little endian
*/
WL_SHM_FORMAT_RGBX5551 = 0x35315852,
/**
* 16-bit BGRx 5551 format, [15:0] B:G:R:x 5:5:5:1 little endian
*/
WL_SHM_FORMAT_BGRX5551 = 0x35315842,
/**
* 16-bit ARGB 1555 format, [15:0] A:R:G:B 1:5:5:5 little endian
*/
WL_SHM_FORMAT_ARGB1555 = 0x35315241,
/**
* 16-bit ABGR 1555 format, [15:0] A:B:G:R 1:5:5:5 little endian
*/
WL_SHM_FORMAT_ABGR1555 = 0x35314241,
/**
* 16-bit RGBA 5551 format, [15:0] R:G:B:A 5:5:5:1 little endian
*/
WL_SHM_FORMAT_RGBA5551 = 0x35314152,
/**
* 16-bit BGRA 5551 format, [15:0] B:G:R:A 5:5:5:1 little endian
*/
WL_SHM_FORMAT_BGRA5551 = 0x35314142,
/**
* 16-bit RGB 565 format, [15:0] R:G:B 5:6:5 little endian
*/
WL_SHM_FORMAT_RGB565 = 0x36314752,
/**
* 16-bit BGR 565 format, [15:0] B:G:R 5:6:5 little endian
*/
WL_SHM_FORMAT_BGR565 = 0x36314742,
/**
* 24-bit RGB format, [23:0] R:G:B little endian
*/
WL_SHM_FORMAT_RGB888 = 0x34324752,
/**
* 24-bit BGR format, [23:0] B:G:R little endian
*/
WL_SHM_FORMAT_BGR888 = 0x34324742,
/**
* 32-bit xBGR format, [31:0] x:B:G:R 8:8:8:8 little endian
*/
WL_SHM_FORMAT_XBGR8888 = 0x34324258,
/**
* 32-bit RGBx format, [31:0] R:G:B:x 8:8:8:8 little endian
*/
WL_SHM_FORMAT_RGBX8888 = 0x34325852,
/**
* 32-bit BGRx format, [31:0] B:G:R:x 8:8:8:8 little endian
*/
WL_SHM_FORMAT_BGRX8888 = 0x34325842,
/**
* 32-bit ABGR format, [31:0] A:B:G:R 8:8:8:8 little endian
*/
WL_SHM_FORMAT_ABGR8888 = 0x34324241,
/**
* 32-bit RGBA format, [31:0] R:G:B:A 8:8:8:8 little endian
*/
WL_SHM_FORMAT_RGBA8888 = 0x34324152,
/**
* 32-bit BGRA format, [31:0] B:G:R:A 8:8:8:8 little endian
*/
WL_SHM_FORMAT_BGRA8888 = 0x34324142,
/**
* 32-bit xRGB format, [31:0] x:R:G:B 2:10:10:10 little endian
*/
WL_SHM_FORMAT_XRGB2101010 = 0x30335258,
/**
* 32-bit xBGR format, [31:0] x:B:G:R 2:10:10:10 little endian
*/
WL_SHM_FORMAT_XBGR2101010 = 0x30334258,
/**
* 32-bit RGBx format, [31:0] R:G:B:x 10:10:10:2 little endian
*/
WL_SHM_FORMAT_RGBX1010102 = 0x30335852,
/**
* 32-bit BGRx format, [31:0] B:G:R:x 10:10:10:2 little endian
*/
WL_SHM_FORMAT_BGRX1010102 = 0x30335842,
/**
* 32-bit ARGB format, [31:0] A:R:G:B 2:10:10:10 little endian
*/
WL_SHM_FORMAT_ARGB2101010 = 0x30335241,
/**
* 32-bit ABGR format, [31:0] A:B:G:R 2:10:10:10 little endian
*/
WL_SHM_FORMAT_ABGR2101010 = 0x30334241,
/**
* 32-bit RGBA format, [31:0] R:G:B:A 10:10:10:2 little endian
*/
WL_SHM_FORMAT_RGBA1010102 = 0x30334152,
/**
* 32-bit BGRA format, [31:0] B:G:R:A 10:10:10:2 little endian
*/
WL_SHM_FORMAT_BGRA1010102 = 0x30334142,
/**
* packed YCbCr format, [31:0] Cr0:Y1:Cb0:Y0 8:8:8:8 little endian
*/
WL_SHM_FORMAT_YUYV = 0x56595559,
/**
* packed YCbCr format, [31:0] Cb0:Y1:Cr0:Y0 8:8:8:8 little endian
*/
WL_SHM_FORMAT_YVYU = 0x55595659,
/**
* packed YCbCr format, [31:0] Y1:Cr0:Y0:Cb0 8:8:8:8 little endian
*/
WL_SHM_FORMAT_UYVY = 0x59565955,
/**
* packed YCbCr format, [31:0] Y1:Cb0:Y0:Cr0 8:8:8:8 little endian
*/
WL_SHM_FORMAT_VYUY = 0x59555956,
/**
* packed AYCbCr format, [31:0] A:Y:Cb:Cr 8:8:8:8 little endian
*/
WL_SHM_FORMAT_AYUV = 0x56555941,
/**
* 2 plane YCbCr Cr:Cb format, 2x2 subsampled Cr:Cb plane
*/
WL_SHM_FORMAT_NV12 = 0x3231564e,
/**
* 2 plane YCbCr Cb:Cr format, 2x2 subsampled Cb:Cr plane
*/
WL_SHM_FORMAT_NV21 = 0x3132564e,
/**
* 2 plane YCbCr Cr:Cb format, 2x1 subsampled Cr:Cb plane
*/
WL_SHM_FORMAT_NV16 = 0x3631564e,
/**
* 2 plane YCbCr Cb:Cr format, 2x1 subsampled Cb:Cr plane
*/
WL_SHM_FORMAT_NV61 = 0x3136564e,
/**
* 3 plane YCbCr format, 4x4 subsampled Cb (1) and Cr (2) planes
*/
WL_SHM_FORMAT_YUV410 = 0x39565559,
/**
* 3 plane YCbCr format, 4x4 subsampled Cr (1) and Cb (2) planes
*/
WL_SHM_FORMAT_YVU410 = 0x39555659,
/**
* 3 plane YCbCr format, 4x1 subsampled Cb (1) and Cr (2) planes
*/
WL_SHM_FORMAT_YUV411 = 0x31315559,
/**
* 3 plane YCbCr format, 4x1 subsampled Cr (1) and Cb (2) planes
*/
WL_SHM_FORMAT_YVU411 = 0x31315659,
/**
* 3 plane YCbCr format, 2x2 subsampled Cb (1) and Cr (2) planes
*/
WL_SHM_FORMAT_YUV420 = 0x32315559,
/**
* 3 plane YCbCr format, 2x2 subsampled Cr (1) and Cb (2) planes
*/
WL_SHM_FORMAT_YVU420 = 0x32315659,
/**
* 3 plane YCbCr format, 2x1 subsampled Cb (1) and Cr (2) planes
*/
WL_SHM_FORMAT_YUV422 = 0x36315559,
/**
* 3 plane YCbCr format, 2x1 subsampled Cr (1) and Cb (2) planes
*/
WL_SHM_FORMAT_YVU422 = 0x36315659,
/**
* 3 plane YCbCr format, non-subsampled Cb (1) and Cr (2) planes
*/
WL_SHM_FORMAT_YUV444 = 0x34325559,
/**
* 3 plane YCbCr format, non-subsampled Cr (1) and Cb (2) planes
*/
WL_SHM_FORMAT_YVU444 = 0x34325659,
};

## Function Documentation

## wl_shm_add_listener()

static int wl_shm_add_listener | ( | struct wl_shm * | wl_shm,
|  | const struct wl_shm_listener * | listener,
|  | void * | data
| ) |  |

inline static

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

{
return wl_proxy_add_listener((struct wl_proxy *) wl_shm,
(void (**)(void)) listener, data);
}

## wl_shm_create_pool()

static struct wl_shm_pool* wl_shm_create_pool | ( | struct wl_shm * | wl_shm,
|  | int32_t | fd,
|  | int32_t | size
| ) |  |

inline static

Create a new wl_shm_pool object.

The pool can be used to create shared memory based buffer objects. The server will mmap size bytes of the passed file descriptor, to use as backing memory for the pool.

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

{
struct wl_proxy *id;
id = wl_proxy_marshal_constructor((struct wl_proxy *) wl_shm,
WL_SHM_CREATE_POOL, &wl_shm_pool_interface, NULL, fd, size);
return (struct wl_shm_pool *) id;
}

References NULL, WL_SHM_CREATE_POOL, and wl_shm_pool_interface.

## wl_shm_destroy()

static void wl_shm_destroy | ( | struct wl_shm * | wl_shm | ) |

inline static

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

{
wl_proxy_destroy((struct wl_proxy *) wl_shm);
}

## wl_shm_get_user_data()

static void* wl_shm_get_user_data | ( | struct wl_shm * | wl_shm | ) |

inline static

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

{
return wl_proxy_get_user_data((struct wl_proxy *) wl_shm);
}

## wl_shm_set_user_data()

static void wl_shm_set_user_data | ( | struct wl_shm * | wl_shm,
|  | void * | user_data
| ) |  |

inline static

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

{
wl_proxy_set_user_data((struct wl_proxy *) wl_shm, user_data);
}
WL_SHM_FORMAT_RGBA5551
@ WL_SHM_FORMAT_RGBA5551
Definition: wayland-client-protocol.h:1434
WL_SHM_FORMAT_ARGB1555
@ WL_SHM_FORMAT_ARGB1555
Definition: wayland-client-protocol.h:1426
WL_SHM_FORMAT_XRGB1555
@ WL_SHM_FORMAT_XRGB1555
Definition: wayland-client-protocol.h:1410
WL_SHM_FORMAT_AYUV
@ WL_SHM_FORMAT_AYUV
Definition: wayland-client-protocol.h:1530
WL_SHM_FORMAT_ABGR2101010
@ WL_SHM_FORMAT_ABGR2101010
Definition: wayland-client-protocol.h:1502
WL_SHM_FORMAT_ARGB2101010
@ WL_SHM_FORMAT_ARGB2101010
Definition: wayland-client-protocol.h:1498
WL_SHM_FORMAT_RGB888
@ WL_SHM_FORMAT_RGB888
Definition: wayland-client-protocol.h:1450
NULL
#define NULL
Definition: begin_code.h:167
wl_shm_pool_interface
const struct wl_interface wl_shm_pool_interface
Definition: wayland-protocol.c:207
WL_SHM_FORMAT_BGRX4444
@ WL_SHM_FORMAT_BGRX4444
Definition: wayland-client-protocol.h:1390
WL_SHM_FORMAT_YUV410
@ WL_SHM_FORMAT_YUV410
Definition: wayland-client-protocol.h:1550
WL_SHM_FORMAT_BGR565
@ WL_SHM_FORMAT_BGR565
Definition: wayland-client-protocol.h:1446
WL_SHM_FORMAT_XRGB8888
@ WL_SHM_FORMAT_XRGB8888
Definition: wayland-client-protocol.h:1362
WL_SHM_FORMAT_XRGB2101010
@ WL_SHM_FORMAT_XRGB2101010
Definition: wayland-client-protocol.h:1482
WL_SHM_FORMAT_VYUY
@ WL_SHM_FORMAT_VYUY
Definition: wayland-client-protocol.h:1526
WL_SHM_FORMAT_RGB565
@ WL_SHM_FORMAT_RGB565
Definition: wayland-client-protocol.h:1442
WL_SHM_FORMAT_YVU410
@ WL_SHM_FORMAT_YVU410
Definition: wayland-client-protocol.h:1554
WL_SHM_FORMAT_BGRX5551
@ WL_SHM_FORMAT_BGRX5551
Definition: wayland-client-protocol.h:1422
WL_SHM_FORMAT_YUV420
@ WL_SHM_FORMAT_YUV420
Definition: wayland-client-protocol.h:1566
WL_SHM_FORMAT_YUV422
@ WL_SHM_FORMAT_YUV422
Definition: wayland-client-protocol.h:1574
WL_SHM_FORMAT_YVU420
@ WL_SHM_FORMAT_YVU420
Definition: wayland-client-protocol.h:1570
WL_SHM_ERROR_INVALID_STRIDE
@ WL_SHM_ERROR_INVALID_STRIDE
Definition: wayland-client-protocol.h:1330
WL_SHM_FORMAT_YVYU
@ WL_SHM_FORMAT_YVYU
Definition: wayland-client-protocol.h:1518
WL_SHM_FORMAT_NV61
@ WL_SHM_FORMAT_NV61
Definition: wayland-client-protocol.h:1546
WL_SHM_FORMAT_RGBX5551
@ WL_SHM_FORMAT_RGBX5551
Definition: wayland-client-protocol.h:1418
WL_SHM_FORMAT_ABGR1555
@ WL_SHM_FORMAT_ABGR1555
Definition: wayland-client-protocol.h:1430
WL_SHM_FORMAT_ARGB8888
@ WL_SHM_FORMAT_ARGB8888
Definition: wayland-client-protocol.h:1358
WL_SHM_FORMAT_YUYV
@ WL_SHM_FORMAT_YUYV
Definition: wayland-client-protocol.h:1514
WL_SHM_ERROR_INVALID_FORMAT
@ WL_SHM_ERROR_INVALID_FORMAT
Definition: wayland-client-protocol.h:1326
WL_SHM_FORMAT_YVU444
@ WL_SHM_FORMAT_YVU444
Definition: wayland-client-protocol.h:1586
data
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: SDL_opengl.h:1974
WL_SHM_ERROR_INVALID_FD
@ WL_SHM_ERROR_INVALID_FD
Definition: wayland-client-protocol.h:1334
WL_SHM_FORMAT_UYVY
@ WL_SHM_FORMAT_UYVY
Definition: wayland-client-protocol.h:1522
WL_SHM_FORMAT_YUV411
@ WL_SHM_FORMAT_YUV411
Definition: wayland-client-protocol.h:1558
WL_SHM_FORMAT_RGBX1010102
@ WL_SHM_FORMAT_RGBX1010102
Definition: wayland-client-protocol.h:1490
WL_SHM_FORMAT_RGBX4444
@ WL_SHM_FORMAT_RGBX4444
Definition: wayland-client-protocol.h:1386
WL_SHM_FORMAT_XBGR1555
@ WL_SHM_FORMAT_XBGR1555
Definition: wayland-client-protocol.h:1414
WL_SHM_FORMAT_BGRX8888
@ WL_SHM_FORMAT_BGRX8888
Definition: wayland-client-protocol.h:1466
WL_SHM_FORMAT_C8
@ WL_SHM_FORMAT_C8
Definition: wayland-client-protocol.h:1366
WL_SHM_FORMAT_RGBA1010102
@ WL_SHM_FORMAT_RGBA1010102
Definition: wayland-client-protocol.h:1506
WL_SHM_FORMAT_BGRA8888
@ WL_SHM_FORMAT_BGRA8888
Definition: wayland-client-protocol.h:1478
WL_SHM_FORMAT_BGR233
@ WL_SHM_FORMAT_BGR233
Definition: wayland-client-protocol.h:1374
WL_SHM_FORMAT_BGRA1010102
@ WL_SHM_FORMAT_BGRA1010102
Definition: wayland-client-protocol.h:1510
WL_SHM_FORMAT_YVU422
@ WL_SHM_FORMAT_YVU422
Definition: wayland-client-protocol.h:1578
WL_SHM_FORMAT_XBGR2101010
@ WL_SHM_FORMAT_XBGR2101010
Definition: wayland-client-protocol.h:1486
WL_SHM_FORMAT_XBGR4444
@ WL_SHM_FORMAT_XBGR4444
Definition: wayland-client-protocol.h:1382
WL_SHM_FORMAT_NV16
@ WL_SHM_FORMAT_NV16
Definition: wayland-client-protocol.h:1542
WL_SHM_FORMAT_ABGR4444
@ WL_SHM_FORMAT_ABGR4444
Definition: wayland-client-protocol.h:1398
WL_SHM_FORMAT_RGBX8888
@ WL_SHM_FORMAT_RGBX8888
Definition: wayland-client-protocol.h:1462
WL_SHM_FORMAT_NV12
@ WL_SHM_FORMAT_NV12
Definition: wayland-client-protocol.h:1534
size
GLsizeiptr size
Definition: SDL_opengl_glext.h:537
id
GLuint id
Definition: SDL_opengl_glext.h:528
WL_SHM_FORMAT_BGRX1010102
@ WL_SHM_FORMAT_BGRX1010102
Definition: wayland-client-protocol.h:1494
WL_SHM_FORMAT_BGRA4444
@ WL_SHM_FORMAT_BGRA4444
Definition: wayland-client-protocol.h:1406
WL_SHM_FORMAT_BGR888
@ WL_SHM_FORMAT_BGR888
Definition: wayland-client-protocol.h:1454
WL_SHM_FORMAT_ABGR8888
@ WL_SHM_FORMAT_ABGR8888
Definition: wayland-client-protocol.h:1470
WL_SHM_CREATE_POOL
#define WL_SHM_CREATE_POOL
Definition: wayland-client-protocol.h:1618
WL_SHM_FORMAT_RGBA4444
@ WL_SHM_FORMAT_RGBA4444
Definition: wayland-client-protocol.h:1402
WL_SHM_FORMAT_NV21
@ WL_SHM_FORMAT_NV21
Definition: wayland-client-protocol.h:1538
WL_SHM_FORMAT_BGRA5551
@ WL_SHM_FORMAT_BGRA5551
Definition: wayland-client-protocol.h:1438
WL_SHM_FORMAT_XBGR8888
@ WL_SHM_FORMAT_XBGR8888
Definition: wayland-client-protocol.h:1458
WL_SHM_FORMAT_ARGB4444
@ WL_SHM_FORMAT_ARGB4444
Definition: wayland-client-protocol.h:1394
WL_SHM_FORMAT_YVU411
@ WL_SHM_FORMAT_YVU411
Definition: wayland-client-protocol.h:1562
WL_SHM_FORMAT_RGB332
@ WL_SHM_FORMAT_RGB332
Definition: wayland-client-protocol.h:1370
WL_SHM_FORMAT_YUV444
@ WL_SHM_FORMAT_YUV444
Definition: wayland-client-protocol.h:1582
fd
GLuint64 GLenum GLint fd
Definition: gl2ext.h:1508
WL_SHM_FORMAT_XRGB4444
@ WL_SHM_FORMAT_XRGB4444
Definition: wayland-client-protocol.h:1378
WL_SHM_FORMAT_RGBA8888
@ WL_SHM_FORMAT_RGBA8888
Definition: wayland-client-protocol.h:1474