example-enum.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836
  1. /* SCANNER TEST */
  2. #ifndef WAYLAND_ENUM_PROTOCOL_H
  3. #define WAYLAND_ENUM_PROTOCOL_H
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. #ifndef WL_DISPLAY_ERROR_ENUM
  8. #define WL_DISPLAY_ERROR_ENUM
  9. /**
  10. * @ingroup iface_wl_display
  11. * global error values
  12. *
  13. * These errors are global and can be emitted in response to any
  14. * server request.
  15. */
  16. enum wl_display_error {
  17. /**
  18. * server couldn't find object
  19. */
  20. WL_DISPLAY_ERROR_INVALID_OBJECT = 0,
  21. /**
  22. * method doesn't exist on the specified interface
  23. */
  24. WL_DISPLAY_ERROR_INVALID_METHOD = 1,
  25. /**
  26. * server is out of memory
  27. */
  28. WL_DISPLAY_ERROR_NO_MEMORY = 2,
  29. };
  30. #endif /* WL_DISPLAY_ERROR_ENUM */
  31. #ifndef WL_SHM_ERROR_ENUM
  32. #define WL_SHM_ERROR_ENUM
  33. /**
  34. * @ingroup iface_wl_shm
  35. * wl_shm error values
  36. *
  37. * These errors can be emitted in response to wl_shm requests.
  38. */
  39. enum wl_shm_error {
  40. /**
  41. * buffer format is not known
  42. */
  43. WL_SHM_ERROR_INVALID_FORMAT = 0,
  44. /**
  45. * invalid size or stride during pool or buffer creation
  46. */
  47. WL_SHM_ERROR_INVALID_STRIDE = 1,
  48. /**
  49. * mmapping the file descriptor failed
  50. */
  51. WL_SHM_ERROR_INVALID_FD = 2,
  52. };
  53. #endif /* WL_SHM_ERROR_ENUM */
  54. #ifndef WL_SHM_FORMAT_ENUM
  55. #define WL_SHM_FORMAT_ENUM
  56. /**
  57. * @ingroup iface_wl_shm
  58. * pixel formats
  59. *
  60. * This describes the memory layout of an individual pixel.
  61. *
  62. * All renderers should support argb8888 and xrgb8888 but any other
  63. * formats are optional and may not be supported by the particular
  64. * renderer in use.
  65. *
  66. * The drm format codes match the macros defined in drm_fourcc.h.
  67. * The formats actually supported by the compositor will be
  68. * reported by the format event.
  69. */
  70. enum wl_shm_format {
  71. /**
  72. * 32-bit ARGB format, [31:0] A:R:G:B 8:8:8:8 little endian
  73. */
  74. WL_SHM_FORMAT_ARGB8888 = 0,
  75. /**
  76. * 32-bit RGB format, [31:0] x:R:G:B 8:8:8:8 little endian
  77. */
  78. WL_SHM_FORMAT_XRGB8888 = 1,
  79. /**
  80. * 8-bit color index format, [7:0] C
  81. */
  82. WL_SHM_FORMAT_C8 = 0x20203843,
  83. /**
  84. * 8-bit RGB format, [7:0] R:G:B 3:3:2
  85. */
  86. WL_SHM_FORMAT_RGB332 = 0x38424752,
  87. /**
  88. * 8-bit BGR format, [7:0] B:G:R 2:3:3
  89. */
  90. WL_SHM_FORMAT_BGR233 = 0x38524742,
  91. /**
  92. * 16-bit xRGB format, [15:0] x:R:G:B 4:4:4:4 little endian
  93. */
  94. WL_SHM_FORMAT_XRGB4444 = 0x32315258,
  95. /**
  96. * 16-bit xBGR format, [15:0] x:B:G:R 4:4:4:4 little endian
  97. */
  98. WL_SHM_FORMAT_XBGR4444 = 0x32314258,
  99. /**
  100. * 16-bit RGBx format, [15:0] R:G:B:x 4:4:4:4 little endian
  101. */
  102. WL_SHM_FORMAT_RGBX4444 = 0x32315852,
  103. /**
  104. * 16-bit BGRx format, [15:0] B:G:R:x 4:4:4:4 little endian
  105. */
  106. WL_SHM_FORMAT_BGRX4444 = 0x32315842,
  107. /**
  108. * 16-bit ARGB format, [15:0] A:R:G:B 4:4:4:4 little endian
  109. */
  110. WL_SHM_FORMAT_ARGB4444 = 0x32315241,
  111. /**
  112. * 16-bit ABGR format, [15:0] A:B:G:R 4:4:4:4 little endian
  113. */
  114. WL_SHM_FORMAT_ABGR4444 = 0x32314241,
  115. /**
  116. * 16-bit RBGA format, [15:0] R:G:B:A 4:4:4:4 little endian
  117. */
  118. WL_SHM_FORMAT_RGBA4444 = 0x32314152,
  119. /**
  120. * 16-bit BGRA format, [15:0] B:G:R:A 4:4:4:4 little endian
  121. */
  122. WL_SHM_FORMAT_BGRA4444 = 0x32314142,
  123. /**
  124. * 16-bit xRGB format, [15:0] x:R:G:B 1:5:5:5 little endian
  125. */
  126. WL_SHM_FORMAT_XRGB1555 = 0x35315258,
  127. /**
  128. * 16-bit xBGR 1555 format, [15:0] x:B:G:R 1:5:5:5 little endian
  129. */
  130. WL_SHM_FORMAT_XBGR1555 = 0x35314258,
  131. /**
  132. * 16-bit RGBx 5551 format, [15:0] R:G:B:x 5:5:5:1 little endian
  133. */
  134. WL_SHM_FORMAT_RGBX5551 = 0x35315852,
  135. /**
  136. * 16-bit BGRx 5551 format, [15:0] B:G:R:x 5:5:5:1 little endian
  137. */
  138. WL_SHM_FORMAT_BGRX5551 = 0x35315842,
  139. /**
  140. * 16-bit ARGB 1555 format, [15:0] A:R:G:B 1:5:5:5 little endian
  141. */
  142. WL_SHM_FORMAT_ARGB1555 = 0x35315241,
  143. /**
  144. * 16-bit ABGR 1555 format, [15:0] A:B:G:R 1:5:5:5 little endian
  145. */
  146. WL_SHM_FORMAT_ABGR1555 = 0x35314241,
  147. /**
  148. * 16-bit RGBA 5551 format, [15:0] R:G:B:A 5:5:5:1 little endian
  149. */
  150. WL_SHM_FORMAT_RGBA5551 = 0x35314152,
  151. /**
  152. * 16-bit BGRA 5551 format, [15:0] B:G:R:A 5:5:5:1 little endian
  153. */
  154. WL_SHM_FORMAT_BGRA5551 = 0x35314142,
  155. /**
  156. * 16-bit RGB 565 format, [15:0] R:G:B 5:6:5 little endian
  157. */
  158. WL_SHM_FORMAT_RGB565 = 0x36314752,
  159. /**
  160. * 16-bit BGR 565 format, [15:0] B:G:R 5:6:5 little endian
  161. */
  162. WL_SHM_FORMAT_BGR565 = 0x36314742,
  163. /**
  164. * 24-bit RGB format, [23:0] R:G:B little endian
  165. */
  166. WL_SHM_FORMAT_RGB888 = 0x34324752,
  167. /**
  168. * 24-bit BGR format, [23:0] B:G:R little endian
  169. */
  170. WL_SHM_FORMAT_BGR888 = 0x34324742,
  171. /**
  172. * 32-bit xBGR format, [31:0] x:B:G:R 8:8:8:8 little endian
  173. */
  174. WL_SHM_FORMAT_XBGR8888 = 0x34324258,
  175. /**
  176. * 32-bit RGBx format, [31:0] R:G:B:x 8:8:8:8 little endian
  177. */
  178. WL_SHM_FORMAT_RGBX8888 = 0x34325852,
  179. /**
  180. * 32-bit BGRx format, [31:0] B:G:R:x 8:8:8:8 little endian
  181. */
  182. WL_SHM_FORMAT_BGRX8888 = 0x34325842,
  183. /**
  184. * 32-bit ABGR format, [31:0] A:B:G:R 8:8:8:8 little endian
  185. */
  186. WL_SHM_FORMAT_ABGR8888 = 0x34324241,
  187. /**
  188. * 32-bit RGBA format, [31:0] R:G:B:A 8:8:8:8 little endian
  189. */
  190. WL_SHM_FORMAT_RGBA8888 = 0x34324152,
  191. /**
  192. * 32-bit BGRA format, [31:0] B:G:R:A 8:8:8:8 little endian
  193. */
  194. WL_SHM_FORMAT_BGRA8888 = 0x34324142,
  195. /**
  196. * 32-bit xRGB format, [31:0] x:R:G:B 2:10:10:10 little endian
  197. */
  198. WL_SHM_FORMAT_XRGB2101010 = 0x30335258,
  199. /**
  200. * 32-bit xBGR format, [31:0] x:B:G:R 2:10:10:10 little endian
  201. */
  202. WL_SHM_FORMAT_XBGR2101010 = 0x30334258,
  203. /**
  204. * 32-bit RGBx format, [31:0] R:G:B:x 10:10:10:2 little endian
  205. */
  206. WL_SHM_FORMAT_RGBX1010102 = 0x30335852,
  207. /**
  208. * 32-bit BGRx format, [31:0] B:G:R:x 10:10:10:2 little endian
  209. */
  210. WL_SHM_FORMAT_BGRX1010102 = 0x30335842,
  211. /**
  212. * 32-bit ARGB format, [31:0] A:R:G:B 2:10:10:10 little endian
  213. */
  214. WL_SHM_FORMAT_ARGB2101010 = 0x30335241,
  215. /**
  216. * 32-bit ABGR format, [31:0] A:B:G:R 2:10:10:10 little endian
  217. */
  218. WL_SHM_FORMAT_ABGR2101010 = 0x30334241,
  219. /**
  220. * 32-bit RGBA format, [31:0] R:G:B:A 10:10:10:2 little endian
  221. */
  222. WL_SHM_FORMAT_RGBA1010102 = 0x30334152,
  223. /**
  224. * 32-bit BGRA format, [31:0] B:G:R:A 10:10:10:2 little endian
  225. */
  226. WL_SHM_FORMAT_BGRA1010102 = 0x30334142,
  227. /**
  228. * packed YCbCr format, [31:0] Cr0:Y1:Cb0:Y0 8:8:8:8 little endian
  229. */
  230. WL_SHM_FORMAT_YUYV = 0x56595559,
  231. /**
  232. * packed YCbCr format, [31:0] Cb0:Y1:Cr0:Y0 8:8:8:8 little endian
  233. */
  234. WL_SHM_FORMAT_YVYU = 0x55595659,
  235. /**
  236. * packed YCbCr format, [31:0] Y1:Cr0:Y0:Cb0 8:8:8:8 little endian
  237. */
  238. WL_SHM_FORMAT_UYVY = 0x59565955,
  239. /**
  240. * packed YCbCr format, [31:0] Y1:Cb0:Y0:Cr0 8:8:8:8 little endian
  241. */
  242. WL_SHM_FORMAT_VYUY = 0x59555956,
  243. /**
  244. * packed AYCbCr format, [31:0] A:Y:Cb:Cr 8:8:8:8 little endian
  245. */
  246. WL_SHM_FORMAT_AYUV = 0x56555941,
  247. /**
  248. * 2 plane YCbCr Cr:Cb format, 2x2 subsampled Cr:Cb plane
  249. */
  250. WL_SHM_FORMAT_NV12 = 0x3231564e,
  251. /**
  252. * 2 plane YCbCr Cb:Cr format, 2x2 subsampled Cb:Cr plane
  253. */
  254. WL_SHM_FORMAT_NV21 = 0x3132564e,
  255. /**
  256. * 2 plane YCbCr Cr:Cb format, 2x1 subsampled Cr:Cb plane
  257. */
  258. WL_SHM_FORMAT_NV16 = 0x3631564e,
  259. /**
  260. * 2 plane YCbCr Cb:Cr format, 2x1 subsampled Cb:Cr plane
  261. */
  262. WL_SHM_FORMAT_NV61 = 0x3136564e,
  263. /**
  264. * 3 plane YCbCr format, 4x4 subsampled Cb (1) and Cr (2) planes
  265. */
  266. WL_SHM_FORMAT_YUV410 = 0x39565559,
  267. /**
  268. * 3 plane YCbCr format, 4x4 subsampled Cr (1) and Cb (2) planes
  269. */
  270. WL_SHM_FORMAT_YVU410 = 0x39555659,
  271. /**
  272. * 3 plane YCbCr format, 4x1 subsampled Cb (1) and Cr (2) planes
  273. */
  274. WL_SHM_FORMAT_YUV411 = 0x31315559,
  275. /**
  276. * 3 plane YCbCr format, 4x1 subsampled Cr (1) and Cb (2) planes
  277. */
  278. WL_SHM_FORMAT_YVU411 = 0x31315659,
  279. /**
  280. * 3 plane YCbCr format, 2x2 subsampled Cb (1) and Cr (2) planes
  281. */
  282. WL_SHM_FORMAT_YUV420 = 0x32315559,
  283. /**
  284. * 3 plane YCbCr format, 2x2 subsampled Cr (1) and Cb (2) planes
  285. */
  286. WL_SHM_FORMAT_YVU420 = 0x32315659,
  287. /**
  288. * 3 plane YCbCr format, 2x1 subsampled Cb (1) and Cr (2) planes
  289. */
  290. WL_SHM_FORMAT_YUV422 = 0x36315559,
  291. /**
  292. * 3 plane YCbCr format, 2x1 subsampled Cr (1) and Cb (2) planes
  293. */
  294. WL_SHM_FORMAT_YVU422 = 0x36315659,
  295. /**
  296. * 3 plane YCbCr format, non-subsampled Cb (1) and Cr (2) planes
  297. */
  298. WL_SHM_FORMAT_YUV444 = 0x34325559,
  299. /**
  300. * 3 plane YCbCr format, non-subsampled Cr (1) and Cb (2) planes
  301. */
  302. WL_SHM_FORMAT_YVU444 = 0x34325659,
  303. };
  304. #endif /* WL_SHM_FORMAT_ENUM */
  305. #ifndef WL_DATA_OFFER_ERROR_ENUM
  306. #define WL_DATA_OFFER_ERROR_ENUM
  307. enum wl_data_offer_error {
  308. /**
  309. * finish request was called untimely
  310. */
  311. WL_DATA_OFFER_ERROR_INVALID_FINISH = 0,
  312. /**
  313. * action mask contains invalid values
  314. */
  315. WL_DATA_OFFER_ERROR_INVALID_ACTION_MASK = 1,
  316. /**
  317. * action argument has an invalid value
  318. */
  319. WL_DATA_OFFER_ERROR_INVALID_ACTION = 2,
  320. /**
  321. * offer doesn't accept this request
  322. */
  323. WL_DATA_OFFER_ERROR_INVALID_OFFER = 3,
  324. };
  325. #endif /* WL_DATA_OFFER_ERROR_ENUM */
  326. #ifndef WL_DATA_SOURCE_ERROR_ENUM
  327. #define WL_DATA_SOURCE_ERROR_ENUM
  328. enum wl_data_source_error {
  329. /**
  330. * action mask contains invalid values
  331. */
  332. WL_DATA_SOURCE_ERROR_INVALID_ACTION_MASK = 0,
  333. /**
  334. * source doesn't accept this request
  335. */
  336. WL_DATA_SOURCE_ERROR_INVALID_SOURCE = 1,
  337. };
  338. #endif /* WL_DATA_SOURCE_ERROR_ENUM */
  339. #ifndef WL_DATA_DEVICE_ERROR_ENUM
  340. #define WL_DATA_DEVICE_ERROR_ENUM
  341. enum wl_data_device_error {
  342. /**
  343. * given wl_surface has another role
  344. */
  345. WL_DATA_DEVICE_ERROR_ROLE = 0,
  346. };
  347. #endif /* WL_DATA_DEVICE_ERROR_ENUM */
  348. #ifndef WL_DATA_DEVICE_MANAGER_DND_ACTION_ENUM
  349. #define WL_DATA_DEVICE_MANAGER_DND_ACTION_ENUM
  350. /**
  351. * @ingroup iface_wl_data_device_manager
  352. * drag and drop actions
  353. *
  354. * This is a bitmask of the available/preferred actions in a
  355. * drag-and-drop operation.
  356. *
  357. * In the compositor, the selected action is a result of matching the
  358. * actions offered by the source and destination sides. "action" events
  359. * with a "none" action will be sent to both source and destination if
  360. * there is no match. All further checks will effectively happen on
  361. * (source actions ∩ destination actions).
  362. *
  363. * In addition, compositors may also pick different actions in
  364. * reaction to key modifiers being pressed. One common design that
  365. * is used in major toolkits (and the behavior recommended for
  366. * compositors) is:
  367. *
  368. * - If no modifiers are pressed, the first match (in bit order)
  369. * will be used.
  370. * - Pressing Shift selects "move", if enabled in the mask.
  371. * - Pressing Control selects "copy", if enabled in the mask.
  372. *
  373. * Behavior beyond that is considered implementation-dependent.
  374. * Compositors may for example bind other modifiers (like Alt/Meta)
  375. * or drags initiated with other buttons than BTN_LEFT to specific
  376. * actions (e.g. "ask").
  377. */
  378. enum wl_data_device_manager_dnd_action {
  379. /**
  380. * no action
  381. */
  382. WL_DATA_DEVICE_MANAGER_DND_ACTION_NONE = 0,
  383. /**
  384. * copy action
  385. */
  386. WL_DATA_DEVICE_MANAGER_DND_ACTION_COPY = 1,
  387. /**
  388. * move action
  389. */
  390. WL_DATA_DEVICE_MANAGER_DND_ACTION_MOVE = 2,
  391. /**
  392. * ask action
  393. */
  394. WL_DATA_DEVICE_MANAGER_DND_ACTION_ASK = 4,
  395. };
  396. #endif /* WL_DATA_DEVICE_MANAGER_DND_ACTION_ENUM */
  397. #ifndef WL_SHELL_ERROR_ENUM
  398. #define WL_SHELL_ERROR_ENUM
  399. enum wl_shell_error {
  400. /**
  401. * given wl_surface has another role
  402. */
  403. WL_SHELL_ERROR_ROLE = 0,
  404. };
  405. #endif /* WL_SHELL_ERROR_ENUM */
  406. #ifndef WL_SHELL_SURFACE_RESIZE_ENUM
  407. #define WL_SHELL_SURFACE_RESIZE_ENUM
  408. /**
  409. * @ingroup iface_wl_shell_surface
  410. * edge values for resizing
  411. *
  412. * These values are used to indicate which edge of a surface
  413. * is being dragged in a resize operation. The server may
  414. * use this information to adapt its behavior, e.g. choose
  415. * an appropriate cursor image.
  416. */
  417. enum wl_shell_surface_resize {
  418. /**
  419. * no edge
  420. */
  421. WL_SHELL_SURFACE_RESIZE_NONE = 0,
  422. /**
  423. * top edge
  424. */
  425. WL_SHELL_SURFACE_RESIZE_TOP = 1,
  426. /**
  427. * bottom edge
  428. */
  429. WL_SHELL_SURFACE_RESIZE_BOTTOM = 2,
  430. /**
  431. * left edge
  432. */
  433. WL_SHELL_SURFACE_RESIZE_LEFT = 4,
  434. /**
  435. * top and left edges
  436. */
  437. WL_SHELL_SURFACE_RESIZE_TOP_LEFT = 5,
  438. /**
  439. * bottom and left edges
  440. */
  441. WL_SHELL_SURFACE_RESIZE_BOTTOM_LEFT = 6,
  442. /**
  443. * right edge
  444. */
  445. WL_SHELL_SURFACE_RESIZE_RIGHT = 8,
  446. /**
  447. * top and right edges
  448. */
  449. WL_SHELL_SURFACE_RESIZE_TOP_RIGHT = 9,
  450. /**
  451. * bottom and right edges
  452. */
  453. WL_SHELL_SURFACE_RESIZE_BOTTOM_RIGHT = 10,
  454. };
  455. #endif /* WL_SHELL_SURFACE_RESIZE_ENUM */
  456. #ifndef WL_SHELL_SURFACE_TRANSIENT_ENUM
  457. #define WL_SHELL_SURFACE_TRANSIENT_ENUM
  458. /**
  459. * @ingroup iface_wl_shell_surface
  460. * details of transient behaviour
  461. *
  462. * These flags specify details of the expected behaviour
  463. * of transient surfaces. Used in the set_transient request.
  464. */
  465. enum wl_shell_surface_transient {
  466. /**
  467. * do not set keyboard focus
  468. */
  469. WL_SHELL_SURFACE_TRANSIENT_INACTIVE = 0x1,
  470. };
  471. #endif /* WL_SHELL_SURFACE_TRANSIENT_ENUM */
  472. #ifndef WL_SHELL_SURFACE_FULLSCREEN_METHOD_ENUM
  473. #define WL_SHELL_SURFACE_FULLSCREEN_METHOD_ENUM
  474. /**
  475. * @ingroup iface_wl_shell_surface
  476. * different method to set the surface fullscreen
  477. *
  478. * Hints to indicate to the compositor how to deal with a conflict
  479. * between the dimensions of the surface and the dimensions of the
  480. * output. The compositor is free to ignore this parameter.
  481. */
  482. enum wl_shell_surface_fullscreen_method {
  483. /**
  484. * no preference, apply default policy
  485. */
  486. WL_SHELL_SURFACE_FULLSCREEN_METHOD_DEFAULT = 0,
  487. /**
  488. * scale, preserve the surface's aspect ratio and center on output
  489. */
  490. WL_SHELL_SURFACE_FULLSCREEN_METHOD_SCALE = 1,
  491. /**
  492. * switch output mode to the smallest mode that can fit the surface, add black borders to compensate size mismatch
  493. */
  494. WL_SHELL_SURFACE_FULLSCREEN_METHOD_DRIVER = 2,
  495. /**
  496. * no upscaling, center on output and add black borders to compensate size mismatch
  497. */
  498. WL_SHELL_SURFACE_FULLSCREEN_METHOD_FILL = 3,
  499. };
  500. #endif /* WL_SHELL_SURFACE_FULLSCREEN_METHOD_ENUM */
  501. #ifndef WL_SURFACE_ERROR_ENUM
  502. #define WL_SURFACE_ERROR_ENUM
  503. /**
  504. * @ingroup iface_wl_surface
  505. * wl_surface error values
  506. *
  507. * These errors can be emitted in response to wl_surface requests.
  508. */
  509. enum wl_surface_error {
  510. /**
  511. * buffer scale value is invalid
  512. */
  513. WL_SURFACE_ERROR_INVALID_SCALE = 0,
  514. /**
  515. * buffer transform value is invalid
  516. */
  517. WL_SURFACE_ERROR_INVALID_TRANSFORM = 1,
  518. };
  519. #endif /* WL_SURFACE_ERROR_ENUM */
  520. #ifndef WL_SEAT_CAPABILITY_ENUM
  521. #define WL_SEAT_CAPABILITY_ENUM
  522. /**
  523. * @ingroup iface_wl_seat
  524. * seat capability bitmask
  525. *
  526. * This is a bitmask of capabilities this seat has; if a member is
  527. * set, then it is present on the seat.
  528. */
  529. enum wl_seat_capability {
  530. /**
  531. * the seat has pointer devices
  532. */
  533. WL_SEAT_CAPABILITY_POINTER = 1,
  534. /**
  535. * the seat has one or more keyboards
  536. */
  537. WL_SEAT_CAPABILITY_KEYBOARD = 2,
  538. /**
  539. * the seat has touch devices
  540. */
  541. WL_SEAT_CAPABILITY_TOUCH = 4,
  542. };
  543. #endif /* WL_SEAT_CAPABILITY_ENUM */
  544. #ifndef WL_POINTER_ERROR_ENUM
  545. #define WL_POINTER_ERROR_ENUM
  546. enum wl_pointer_error {
  547. /**
  548. * given wl_surface has another role
  549. */
  550. WL_POINTER_ERROR_ROLE = 0,
  551. };
  552. #endif /* WL_POINTER_ERROR_ENUM */
  553. #ifndef WL_POINTER_BUTTON_STATE_ENUM
  554. #define WL_POINTER_BUTTON_STATE_ENUM
  555. /**
  556. * @ingroup iface_wl_pointer
  557. * physical button state
  558. *
  559. * Describes the physical state of a button that produced the button
  560. * event.
  561. */
  562. enum wl_pointer_button_state {
  563. /**
  564. * the button is not pressed
  565. */
  566. WL_POINTER_BUTTON_STATE_RELEASED = 0,
  567. /**
  568. * the button is pressed
  569. */
  570. WL_POINTER_BUTTON_STATE_PRESSED = 1,
  571. };
  572. #endif /* WL_POINTER_BUTTON_STATE_ENUM */
  573. #ifndef WL_POINTER_AXIS_ENUM
  574. #define WL_POINTER_AXIS_ENUM
  575. /**
  576. * @ingroup iface_wl_pointer
  577. * axis types
  578. *
  579. * Describes the axis types of scroll events.
  580. */
  581. enum wl_pointer_axis {
  582. /**
  583. * vertical axis
  584. */
  585. WL_POINTER_AXIS_VERTICAL_SCROLL = 0,
  586. /**
  587. * horizontal axis
  588. */
  589. WL_POINTER_AXIS_HORIZONTAL_SCROLL = 1,
  590. };
  591. #endif /* WL_POINTER_AXIS_ENUM */
  592. #ifndef WL_POINTER_AXIS_SOURCE_ENUM
  593. #define WL_POINTER_AXIS_SOURCE_ENUM
  594. /**
  595. * @ingroup iface_wl_pointer
  596. * axis source types
  597. *
  598. * Describes the source types for axis events. This indicates to the
  599. * client how an axis event was physically generated; a client may
  600. * adjust the user interface accordingly. For example, scroll events
  601. * from a "finger" source may be in a smooth coordinate space with
  602. * kinetic scrolling whereas a "wheel" source may be in discrete steps
  603. * of a number of lines.
  604. */
  605. enum wl_pointer_axis_source {
  606. /**
  607. * a physical wheel rotation
  608. */
  609. WL_POINTER_AXIS_SOURCE_WHEEL = 0,
  610. /**
  611. * finger on a touch surface
  612. */
  613. WL_POINTER_AXIS_SOURCE_FINGER = 1,
  614. /**
  615. * continuous coordinate space
  616. *
  617. * A device generating events in a continuous coordinate space,
  618. * but using something other than a finger. One example for this
  619. * source is button-based scrolling where the vertical motion of a
  620. * device is converted to scroll events while a button is held
  621. * down.
  622. */
  623. WL_POINTER_AXIS_SOURCE_CONTINUOUS = 2,
  624. /**
  625. * a physical wheel tilt
  626. *
  627. * Indicates that the actual device is a wheel but the scroll
  628. * event is not caused by a rotation but a (usually sideways) tilt
  629. * of the wheel.
  630. * @since 6
  631. */
  632. WL_POINTER_AXIS_SOURCE_WHEEL_TILT = 3,
  633. };
  634. /**
  635. * @ingroup iface_wl_pointer
  636. */
  637. #define WL_POINTER_AXIS_SOURCE_WHEEL_TILT_SINCE_VERSION 6
  638. #endif /* WL_POINTER_AXIS_SOURCE_ENUM */
  639. #ifndef WL_KEYBOARD_KEYMAP_FORMAT_ENUM
  640. #define WL_KEYBOARD_KEYMAP_FORMAT_ENUM
  641. /**
  642. * @ingroup iface_wl_keyboard
  643. * keyboard mapping format
  644. *
  645. * This specifies the format of the keymap provided to the
  646. * client with the wl_keyboard.keymap event.
  647. */
  648. enum wl_keyboard_keymap_format {
  649. /**
  650. * no keymap; client must understand how to interpret the raw keycode
  651. */
  652. WL_KEYBOARD_KEYMAP_FORMAT_NO_KEYMAP = 0,
  653. /**
  654. * libxkbcommon compatible; to determine the xkb keycode, clients must add 8 to the key event keycode
  655. */
  656. WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1 = 1,
  657. };
  658. #endif /* WL_KEYBOARD_KEYMAP_FORMAT_ENUM */
  659. #ifndef WL_KEYBOARD_KEY_STATE_ENUM
  660. #define WL_KEYBOARD_KEY_STATE_ENUM
  661. /**
  662. * @ingroup iface_wl_keyboard
  663. * physical key state
  664. *
  665. * Describes the physical state of a key that produced the key event.
  666. */
  667. enum wl_keyboard_key_state {
  668. /**
  669. * key is not pressed
  670. */
  671. WL_KEYBOARD_KEY_STATE_RELEASED = 0,
  672. /**
  673. * key is pressed
  674. */
  675. WL_KEYBOARD_KEY_STATE_PRESSED = 1,
  676. };
  677. #endif /* WL_KEYBOARD_KEY_STATE_ENUM */
  678. #ifndef WL_OUTPUT_SUBPIXEL_ENUM
  679. #define WL_OUTPUT_SUBPIXEL_ENUM
  680. /**
  681. * @ingroup iface_wl_output
  682. * subpixel geometry information
  683. *
  684. * This enumeration describes how the physical
  685. * pixels on an output are laid out.
  686. */
  687. enum wl_output_subpixel {
  688. /**
  689. * unknown geometry
  690. */
  691. WL_OUTPUT_SUBPIXEL_UNKNOWN = 0,
  692. /**
  693. * no geometry
  694. */
  695. WL_OUTPUT_SUBPIXEL_NONE = 1,
  696. /**
  697. * horizontal RGB
  698. */
  699. WL_OUTPUT_SUBPIXEL_HORIZONTAL_RGB = 2,
  700. /**
  701. * horizontal BGR
  702. */
  703. WL_OUTPUT_SUBPIXEL_HORIZONTAL_BGR = 3,
  704. /**
  705. * vertical RGB
  706. */
  707. WL_OUTPUT_SUBPIXEL_VERTICAL_RGB = 4,
  708. /**
  709. * vertical BGR
  710. */
  711. WL_OUTPUT_SUBPIXEL_VERTICAL_BGR = 5,
  712. };
  713. #endif /* WL_OUTPUT_SUBPIXEL_ENUM */
  714. #ifndef WL_OUTPUT_TRANSFORM_ENUM
  715. #define WL_OUTPUT_TRANSFORM_ENUM
  716. /**
  717. * @ingroup iface_wl_output
  718. * transform from framebuffer to output
  719. *
  720. * This describes the transform that a compositor will apply to a
  721. * surface to compensate for the rotation or mirroring of an
  722. * output device.
  723. *
  724. * The flipped values correspond to an initial flip around a
  725. * vertical axis followed by rotation.
  726. *
  727. * The purpose is mainly to allow clients to render accordingly and
  728. * tell the compositor, so that for fullscreen surfaces, the
  729. * compositor will still be able to scan out directly from client
  730. * surfaces.
  731. */
  732. enum wl_output_transform {
  733. /**
  734. * no transform
  735. */
  736. WL_OUTPUT_TRANSFORM_NORMAL = 0,
  737. /**
  738. * 90 degrees counter-clockwise
  739. */
  740. WL_OUTPUT_TRANSFORM_90 = 1,
  741. /**
  742. * 180 degrees counter-clockwise
  743. */
  744. WL_OUTPUT_TRANSFORM_180 = 2,
  745. /**
  746. * 270 degrees counter-clockwise
  747. */
  748. WL_OUTPUT_TRANSFORM_270 = 3,
  749. /**
  750. * 180 degree flip around a vertical axis
  751. */
  752. WL_OUTPUT_TRANSFORM_FLIPPED = 4,
  753. /**
  754. * flip and rotate 90 degrees counter-clockwise
  755. */
  756. WL_OUTPUT_TRANSFORM_FLIPPED_90 = 5,
  757. /**
  758. * flip and rotate 180 degrees counter-clockwise
  759. */
  760. WL_OUTPUT_TRANSFORM_FLIPPED_180 = 6,
  761. /**
  762. * flip and rotate 270 degrees counter-clockwise
  763. */
  764. WL_OUTPUT_TRANSFORM_FLIPPED_270 = 7,
  765. };
  766. #endif /* WL_OUTPUT_TRANSFORM_ENUM */
  767. #ifndef WL_OUTPUT_MODE_ENUM
  768. #define WL_OUTPUT_MODE_ENUM
  769. /**
  770. * @ingroup iface_wl_output
  771. * mode information
  772. *
  773. * These flags describe properties of an output mode.
  774. * They are used in the flags bitfield of the mode event.
  775. */
  776. enum wl_output_mode {
  777. /**
  778. * indicates this is the current mode
  779. */
  780. WL_OUTPUT_MODE_CURRENT = 0x1,
  781. /**
  782. * indicates this is the preferred mode
  783. */
  784. WL_OUTPUT_MODE_PREFERRED = 0x2,
  785. };
  786. #endif /* WL_OUTPUT_MODE_ENUM */
  787. #ifndef WL_SUBCOMPOSITOR_ERROR_ENUM
  788. #define WL_SUBCOMPOSITOR_ERROR_ENUM
  789. enum wl_subcompositor_error {
  790. /**
  791. * the to-be sub-surface is invalid
  792. */
  793. WL_SUBCOMPOSITOR_ERROR_BAD_SURFACE = 0,
  794. };
  795. #endif /* WL_SUBCOMPOSITOR_ERROR_ENUM */
  796. #ifndef WL_SUBSURFACE_ERROR_ENUM
  797. #define WL_SUBSURFACE_ERROR_ENUM
  798. enum wl_subsurface_error {
  799. /**
  800. * wl_surface is not a sibling or the parent
  801. */
  802. WL_SUBSURFACE_ERROR_BAD_SURFACE = 0,
  803. };
  804. #endif /* WL_SUBSURFACE_ERROR_ENUM */
  805. #ifdef __cplusplus
  806. }
  807. #endif
  808. #endif