SDL  2.0
The wl_shm interface

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

◆ WL_SHM_FORMAT_SINCE_VERSION

#define WL_SHM_FORMAT_SINCE_VERSION   1

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

Enumeration Type Documentation

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

1334  {
1335  /**
1336  * buffer format is not known
1337  */
1339  /**
1340  * invalid size or stride during pool or buffer creation
1341  */
1343  /**
1344  * mmapping the file descriptor failed
1345  */
1347 };

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

1366  {
1367  /**
1368  * 32-bit ARGB format, [31:0] A:R:G:B 8:8:8:8 little endian
1369  */
1371  /**
1372  * 32-bit RGB format, [31:0] x:R:G:B 8:8:8:8 little endian
1373  */
1375  /**
1376  * 8-bit color index format, [7:0] C
1377  */
1378  WL_SHM_FORMAT_C8 = 0x20203843,
1379  /**
1380  * 8-bit RGB format, [7:0] R:G:B 3:3:2
1381  */
1382  WL_SHM_FORMAT_RGB332 = 0x38424752,
1383  /**
1384  * 8-bit BGR format, [7:0] B:G:R 2:3:3
1385  */
1386  WL_SHM_FORMAT_BGR233 = 0x38524742,
1387  /**
1388  * 16-bit xRGB format, [15:0] x:R:G:B 4:4:4:4 little endian
1389  */
1390  WL_SHM_FORMAT_XRGB4444 = 0x32315258,
1391  /**
1392  * 16-bit xBGR format, [15:0] x:B:G:R 4:4:4:4 little endian
1393  */
1394  WL_SHM_FORMAT_XBGR4444 = 0x32314258,
1395  /**
1396  * 16-bit RGBx format, [15:0] R:G:B:x 4:4:4:4 little endian
1397  */
1398  WL_SHM_FORMAT_RGBX4444 = 0x32315852,
1399  /**
1400  * 16-bit BGRx format, [15:0] B:G:R:x 4:4:4:4 little endian
1401  */
1402  WL_SHM_FORMAT_BGRX4444 = 0x32315842,
1403  /**
1404  * 16-bit ARGB format, [15:0] A:R:G:B 4:4:4:4 little endian
1405  */
1406  WL_SHM_FORMAT_ARGB4444 = 0x32315241,
1407  /**
1408  * 16-bit ABGR format, [15:0] A:B:G:R 4:4:4:4 little endian
1409  */
1410  WL_SHM_FORMAT_ABGR4444 = 0x32314241,
1411  /**
1412  * 16-bit RBGA format, [15:0] R:G:B:A 4:4:4:4 little endian
1413  */
1414  WL_SHM_FORMAT_RGBA4444 = 0x32314152,
1415  /**
1416  * 16-bit BGRA format, [15:0] B:G:R:A 4:4:4:4 little endian
1417  */
1418  WL_SHM_FORMAT_BGRA4444 = 0x32314142,
1419  /**
1420  * 16-bit xRGB format, [15:0] x:R:G:B 1:5:5:5 little endian
1421  */
1422  WL_SHM_FORMAT_XRGB1555 = 0x35315258,
1423  /**
1424  * 16-bit xBGR 1555 format, [15:0] x:B:G:R 1:5:5:5 little endian
1425  */
1426  WL_SHM_FORMAT_XBGR1555 = 0x35314258,
1427  /**
1428  * 16-bit RGBx 5551 format, [15:0] R:G:B:x 5:5:5:1 little endian
1429  */
1430  WL_SHM_FORMAT_RGBX5551 = 0x35315852,
1431  /**
1432  * 16-bit BGRx 5551 format, [15:0] B:G:R:x 5:5:5:1 little endian
1433  */
1434  WL_SHM_FORMAT_BGRX5551 = 0x35315842,
1435  /**
1436  * 16-bit ARGB 1555 format, [15:0] A:R:G:B 1:5:5:5 little endian
1437  */
1438  WL_SHM_FORMAT_ARGB1555 = 0x35315241,
1439  /**
1440  * 16-bit ABGR 1555 format, [15:0] A:B:G:R 1:5:5:5 little endian
1441  */
1442  WL_SHM_FORMAT_ABGR1555 = 0x35314241,
1443  /**
1444  * 16-bit RGBA 5551 format, [15:0] R:G:B:A 5:5:5:1 little endian
1445  */
1446  WL_SHM_FORMAT_RGBA5551 = 0x35314152,
1447  /**
1448  * 16-bit BGRA 5551 format, [15:0] B:G:R:A 5:5:5:1 little endian
1449  */
1450  WL_SHM_FORMAT_BGRA5551 = 0x35314142,
1451  /**
1452  * 16-bit RGB 565 format, [15:0] R:G:B 5:6:5 little endian
1453  */
1454  WL_SHM_FORMAT_RGB565 = 0x36314752,
1455  /**
1456  * 16-bit BGR 565 format, [15:0] B:G:R 5:6:5 little endian
1457  */
1458  WL_SHM_FORMAT_BGR565 = 0x36314742,
1459  /**
1460  * 24-bit RGB format, [23:0] R:G:B little endian
1461  */
1462  WL_SHM_FORMAT_RGB888 = 0x34324752,
1463  /**
1464  * 24-bit BGR format, [23:0] B:G:R little endian
1465  */
1466  WL_SHM_FORMAT_BGR888 = 0x34324742,
1467  /**
1468  * 32-bit xBGR format, [31:0] x:B:G:R 8:8:8:8 little endian
1469  */
1470  WL_SHM_FORMAT_XBGR8888 = 0x34324258,
1471  /**
1472  * 32-bit RGBx format, [31:0] R:G:B:x 8:8:8:8 little endian
1473  */
1474  WL_SHM_FORMAT_RGBX8888 = 0x34325852,
1475  /**
1476  * 32-bit BGRx format, [31:0] B:G:R:x 8:8:8:8 little endian
1477  */
1478  WL_SHM_FORMAT_BGRX8888 = 0x34325842,
1479  /**
1480  * 32-bit ABGR format, [31:0] A:B:G:R 8:8:8:8 little endian
1481  */
1482  WL_SHM_FORMAT_ABGR8888 = 0x34324241,
1483  /**
1484  * 32-bit RGBA format, [31:0] R:G:B:A 8:8:8:8 little endian
1485  */
1486  WL_SHM_FORMAT_RGBA8888 = 0x34324152,
1487  /**
1488  * 32-bit BGRA format, [31:0] B:G:R:A 8:8:8:8 little endian
1489  */
1490  WL_SHM_FORMAT_BGRA8888 = 0x34324142,
1491  /**
1492  * 32-bit xRGB format, [31:0] x:R:G:B 2:10:10:10 little endian
1493  */
1494  WL_SHM_FORMAT_XRGB2101010 = 0x30335258,
1495  /**
1496  * 32-bit xBGR format, [31:0] x:B:G:R 2:10:10:10 little endian
1497  */
1498  WL_SHM_FORMAT_XBGR2101010 = 0x30334258,
1499  /**
1500  * 32-bit RGBx format, [31:0] R:G:B:x 10:10:10:2 little endian
1501  */
1502  WL_SHM_FORMAT_RGBX1010102 = 0x30335852,
1503  /**
1504  * 32-bit BGRx format, [31:0] B:G:R:x 10:10:10:2 little endian
1505  */
1506  WL_SHM_FORMAT_BGRX1010102 = 0x30335842,
1507  /**
1508  * 32-bit ARGB format, [31:0] A:R:G:B 2:10:10:10 little endian
1509  */
1510  WL_SHM_FORMAT_ARGB2101010 = 0x30335241,
1511  /**
1512  * 32-bit ABGR format, [31:0] A:B:G:R 2:10:10:10 little endian
1513  */
1514  WL_SHM_FORMAT_ABGR2101010 = 0x30334241,
1515  /**
1516  * 32-bit RGBA format, [31:0] R:G:B:A 10:10:10:2 little endian
1517  */
1518  WL_SHM_FORMAT_RGBA1010102 = 0x30334152,
1519  /**
1520  * 32-bit BGRA format, [31:0] B:G:R:A 10:10:10:2 little endian
1521  */
1522  WL_SHM_FORMAT_BGRA1010102 = 0x30334142,
1523  /**
1524  * packed YCbCr format, [31:0] Cr0:Y1:Cb0:Y0 8:8:8:8 little endian
1525  */
1526  WL_SHM_FORMAT_YUYV = 0x56595559,
1527  /**
1528  * packed YCbCr format, [31:0] Cb0:Y1:Cr0:Y0 8:8:8:8 little endian
1529  */
1530  WL_SHM_FORMAT_YVYU = 0x55595659,
1531  /**
1532  * packed YCbCr format, [31:0] Y1:Cr0:Y0:Cb0 8:8:8:8 little endian
1533  */
1534  WL_SHM_FORMAT_UYVY = 0x59565955,
1535  /**
1536  * packed YCbCr format, [31:0] Y1:Cb0:Y0:Cr0 8:8:8:8 little endian
1537  */
1538  WL_SHM_FORMAT_VYUY = 0x59555956,
1539  /**
1540  * packed AYCbCr format, [31:0] A:Y:Cb:Cr 8:8:8:8 little endian
1541  */
1542  WL_SHM_FORMAT_AYUV = 0x56555941,
1543  /**
1544  * 2 plane YCbCr Cr:Cb format, 2x2 subsampled Cr:Cb plane
1545  */
1546  WL_SHM_FORMAT_NV12 = 0x3231564e,
1547  /**
1548  * 2 plane YCbCr Cb:Cr format, 2x2 subsampled Cb:Cr plane
1549  */
1550  WL_SHM_FORMAT_NV21 = 0x3132564e,
1551  /**
1552  * 2 plane YCbCr Cr:Cb format, 2x1 subsampled Cr:Cb plane
1553  */
1554  WL_SHM_FORMAT_NV16 = 0x3631564e,
1555  /**
1556  * 2 plane YCbCr Cb:Cr format, 2x1 subsampled Cb:Cr plane
1557  */
1558  WL_SHM_FORMAT_NV61 = 0x3136564e,
1559  /**
1560  * 3 plane YCbCr format, 4x4 subsampled Cb (1) and Cr (2) planes
1561  */
1562  WL_SHM_FORMAT_YUV410 = 0x39565559,
1563  /**
1564  * 3 plane YCbCr format, 4x4 subsampled Cr (1) and Cb (2) planes
1565  */
1566  WL_SHM_FORMAT_YVU410 = 0x39555659,
1567  /**
1568  * 3 plane YCbCr format, 4x1 subsampled Cb (1) and Cr (2) planes
1569  */
1570  WL_SHM_FORMAT_YUV411 = 0x31315559,
1571  /**
1572  * 3 plane YCbCr format, 4x1 subsampled Cr (1) and Cb (2) planes
1573  */
1574  WL_SHM_FORMAT_YVU411 = 0x31315659,
1575  /**
1576  * 3 plane YCbCr format, 2x2 subsampled Cb (1) and Cr (2) planes
1577  */
1578  WL_SHM_FORMAT_YUV420 = 0x32315559,
1579  /**
1580  * 3 plane YCbCr format, 2x2 subsampled Cr (1) and Cb (2) planes
1581  */
1582  WL_SHM_FORMAT_YVU420 = 0x32315659,
1583  /**
1584  * 3 plane YCbCr format, 2x1 subsampled Cb (1) and Cr (2) planes
1585  */
1586  WL_SHM_FORMAT_YUV422 = 0x36315559,
1587  /**
1588  * 3 plane YCbCr format, 2x1 subsampled Cr (1) and Cb (2) planes
1589  */
1590  WL_SHM_FORMAT_YVU422 = 0x36315659,
1591  /**
1592  * 3 plane YCbCr format, non-subsampled Cb (1) and Cr (2) planes
1593  */
1594  WL_SHM_FORMAT_YUV444 = 0x34325559,
1595  /**
1596  * 3 plane YCbCr format, non-subsampled Cr (1) and Cb (2) planes
1597  */
1598  WL_SHM_FORMAT_YVU444 = 0x34325659,
1599 };

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 
)
inlinestatic

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

1625 {
1626  return wl_proxy_add_listener((struct wl_proxy *) wl_shm,
1627  (void (**)(void)) listener, data);
1628 }
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: SDL_opengl.h:1974

◆ wl_shm_create_pool()

static struct wl_shm_pool* wl_shm_create_pool ( struct wl_shm *  wl_shm,
int32_t  fd,
int32_t  size 
)
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 1679 of file wayland-client-protocol.h.

References NULL, WL_SHM_CREATE_POOL, and wl_shm_pool_interface.

1680 {
1681  struct wl_proxy *id;
1682 
1683  id = wl_proxy_marshal_constructor((struct wl_proxy *) wl_shm,
1685 
1686  return (struct wl_shm_pool *) id;
1687 }
GLuint id
#define WL_SHM_CREATE_POOL
const struct wl_interface wl_shm_pool_interface
GLsizeiptr size
#define NULL
Definition: begin_code.h:164
GLuint64 GLenum GLint fd
Definition: gl2ext.h:1508

◆ wl_shm_destroy()

static void wl_shm_destroy ( struct wl_shm *  wl_shm)
inlinestatic

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

1665 {
1666  wl_proxy_destroy((struct wl_proxy *) wl_shm);
1667 }

◆ wl_shm_get_user_data()

static void* wl_shm_get_user_data ( struct wl_shm *  wl_shm)
inlinestatic

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

1652 {
1653  return wl_proxy_get_user_data((struct wl_proxy *) wl_shm);
1654 }

◆ wl_shm_set_user_data()

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

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

1645 {
1646  wl_proxy_set_user_data((struct wl_proxy *) wl_shm, user_data);
1647 }