linux-dmabuf-protocol.c 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. /* Generated by wayland-scanner 1.26.0 */
  2. /*
  3. * Copyright © 2014, 2015 Collabora, Ltd.
  4. *
  5. * Permission is hereby granted, free of charge, to any person obtaining a
  6. * copy of this software and associated documentation files (the "Software"),
  7. * to deal in the Software without restriction, including without limitation
  8. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  9. * and/or sell copies of the Software, and to permit persons to whom the
  10. * Software is furnished to do so, subject to the following conditions:
  11. *
  12. * The above copyright notice and this permission notice (including the next
  13. * paragraph) shall be included in all copies or substantial portions of the
  14. * Software.
  15. *
  16. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  17. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  18. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  19. * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  20. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  21. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  22. * DEALINGS IN THE SOFTWARE.
  23. */
  24. #include <stdbool.h>
  25. #include <stdlib.h>
  26. #include <stdint.h>
  27. #include "wayland-util.h"
  28. #ifndef __has_attribute
  29. # define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */
  30. #endif
  31. #if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4)
  32. #define WL_PRIVATE __attribute__ ((visibility("hidden")))
  33. #else
  34. #define WL_PRIVATE
  35. #endif
  36. extern const struct wl_interface wl_buffer_interface;
  37. extern const struct wl_interface wl_surface_interface;
  38. extern const struct wl_interface zwp_linux_buffer_params_v1_interface;
  39. extern const struct wl_interface zwp_linux_dmabuf_feedback_v1_interface;
  40. static const struct wl_interface *linux_dmabuf_v1_types[] = {
  41. NULL,
  42. NULL,
  43. NULL,
  44. NULL,
  45. NULL,
  46. NULL,
  47. &zwp_linux_buffer_params_v1_interface,
  48. &zwp_linux_dmabuf_feedback_v1_interface,
  49. &zwp_linux_dmabuf_feedback_v1_interface,
  50. &wl_surface_interface,
  51. &wl_buffer_interface,
  52. NULL,
  53. NULL,
  54. NULL,
  55. NULL,
  56. &wl_buffer_interface,
  57. };
  58. static const struct wl_message zwp_linux_dmabuf_v1_requests[] = {
  59. { "destroy", "", linux_dmabuf_v1_types + 0 },
  60. { "create_params", "n", linux_dmabuf_v1_types + 6 },
  61. { "get_default_feedback", "4n", linux_dmabuf_v1_types + 7 },
  62. { "get_surface_feedback", "4no", linux_dmabuf_v1_types + 8 },
  63. };
  64. static const struct wl_message zwp_linux_dmabuf_v1_events[] = {
  65. { "format", "u", linux_dmabuf_v1_types + 0 },
  66. { "modifier", "3uuu", linux_dmabuf_v1_types + 0 },
  67. };
  68. WL_PRIVATE const struct wl_interface zwp_linux_dmabuf_v1_interface = {
  69. "zwp_linux_dmabuf_v1", 6,
  70. 4, zwp_linux_dmabuf_v1_requests,
  71. 2, zwp_linux_dmabuf_v1_events,
  72. };
  73. static const struct wl_message zwp_linux_buffer_params_v1_requests[] = {
  74. { "destroy", "", linux_dmabuf_v1_types + 0 },
  75. { "add", "huuuuu", linux_dmabuf_v1_types + 0 },
  76. { "create", "iiuu", linux_dmabuf_v1_types + 0 },
  77. { "create_immed", "2niiuu", linux_dmabuf_v1_types + 10 },
  78. { "set_sampling_device", "6a", linux_dmabuf_v1_types + 0 },
  79. };
  80. static const struct wl_message zwp_linux_buffer_params_v1_events[] = {
  81. { "created", "n", linux_dmabuf_v1_types + 15 },
  82. { "failed", "", linux_dmabuf_v1_types + 0 },
  83. };
  84. WL_PRIVATE const struct wl_interface zwp_linux_buffer_params_v1_interface = {
  85. "zwp_linux_buffer_params_v1", 6,
  86. 5, zwp_linux_buffer_params_v1_requests,
  87. 2, zwp_linux_buffer_params_v1_events,
  88. };
  89. static const struct wl_message zwp_linux_dmabuf_feedback_v1_requests[] = {
  90. { "destroy", "", linux_dmabuf_v1_types + 0 },
  91. };
  92. static const struct wl_message zwp_linux_dmabuf_feedback_v1_events[] = {
  93. { "done", "", linux_dmabuf_v1_types + 0 },
  94. { "format_table", "hu", linux_dmabuf_v1_types + 0 },
  95. { "main_device", "a", linux_dmabuf_v1_types + 0 },
  96. { "tranche_done", "", linux_dmabuf_v1_types + 0 },
  97. { "tranche_target_device", "a", linux_dmabuf_v1_types + 0 },
  98. { "tranche_formats", "a", linux_dmabuf_v1_types + 0 },
  99. { "tranche_flags", "u", linux_dmabuf_v1_types + 0 },
  100. };
  101. WL_PRIVATE const struct wl_interface zwp_linux_dmabuf_feedback_v1_interface = {
  102. "zwp_linux_dmabuf_feedback_v1", 6,
  103. 1, zwp_linux_dmabuf_feedback_v1_requests,
  104. 7, zwp_linux_dmabuf_feedback_v1_events,
  105. };