xdg-shell-protocol.c 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. /* Generated by wayland-scanner 1.26.0 */
  2. /*
  3. * Copyright © 2008-2013 Kristian Høgsberg
  4. * Copyright © 2013 Rafael Antognolli
  5. * Copyright © 2013 Jasper St. Pierre
  6. * Copyright © 2010-2013 Intel Corporation
  7. * Copyright © 2015-2017 Samsung Electronics Co., Ltd
  8. * Copyright © 2015-2017 Red Hat Inc.
  9. *
  10. * Permission is hereby granted, free of charge, to any person obtaining a
  11. * copy of this software and associated documentation files (the "Software"),
  12. * to deal in the Software without restriction, including without limitation
  13. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  14. * and/or sell copies of the Software, and to permit persons to whom the
  15. * Software is furnished to do so, subject to the following conditions:
  16. *
  17. * The above copyright notice and this permission notice (including the next
  18. * paragraph) shall be included in all copies or substantial portions of the
  19. * Software.
  20. *
  21. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  22. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  23. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  24. * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  25. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  26. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  27. * DEALINGS IN THE SOFTWARE.
  28. */
  29. #include <stdbool.h>
  30. #include <stdlib.h>
  31. #include <stdint.h>
  32. #include "wayland-util.h"
  33. #ifndef __has_attribute
  34. # define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */
  35. #endif
  36. #if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4)
  37. #define WL_PRIVATE __attribute__ ((visibility("hidden")))
  38. #else
  39. #define WL_PRIVATE
  40. #endif
  41. extern const struct wl_interface wl_output_interface;
  42. extern const struct wl_interface wl_seat_interface;
  43. extern const struct wl_interface wl_surface_interface;
  44. extern const struct wl_interface xdg_popup_interface;
  45. extern const struct wl_interface xdg_positioner_interface;
  46. extern const struct wl_interface xdg_surface_interface;
  47. extern const struct wl_interface xdg_toplevel_interface;
  48. static const struct wl_interface *xdg_shell_types[] = {
  49. NULL,
  50. NULL,
  51. NULL,
  52. NULL,
  53. &xdg_positioner_interface,
  54. &xdg_surface_interface,
  55. &wl_surface_interface,
  56. &xdg_toplevel_interface,
  57. &xdg_popup_interface,
  58. &xdg_surface_interface,
  59. &xdg_positioner_interface,
  60. &xdg_toplevel_interface,
  61. &wl_seat_interface,
  62. NULL,
  63. NULL,
  64. NULL,
  65. &wl_seat_interface,
  66. NULL,
  67. &wl_seat_interface,
  68. NULL,
  69. NULL,
  70. &wl_output_interface,
  71. &wl_seat_interface,
  72. NULL,
  73. &xdg_positioner_interface,
  74. NULL,
  75. };
  76. static const struct wl_message xdg_wm_base_requests[] = {
  77. { "destroy", "", xdg_shell_types + 0 },
  78. { "create_positioner", "n", xdg_shell_types + 4 },
  79. { "get_xdg_surface", "no", xdg_shell_types + 5 },
  80. { "pong", "u", xdg_shell_types + 0 },
  81. };
  82. static const struct wl_message xdg_wm_base_events[] = {
  83. { "ping", "u", xdg_shell_types + 0 },
  84. };
  85. WL_PRIVATE const struct wl_interface xdg_wm_base_interface = {
  86. "xdg_wm_base", 7,
  87. 4, xdg_wm_base_requests,
  88. 1, xdg_wm_base_events,
  89. };
  90. static const struct wl_message xdg_positioner_requests[] = {
  91. { "destroy", "", xdg_shell_types + 0 },
  92. { "set_size", "ii", xdg_shell_types + 0 },
  93. { "set_anchor_rect", "iiii", xdg_shell_types + 0 },
  94. { "set_anchor", "u", xdg_shell_types + 0 },
  95. { "set_gravity", "u", xdg_shell_types + 0 },
  96. { "set_constraint_adjustment", "u", xdg_shell_types + 0 },
  97. { "set_offset", "ii", xdg_shell_types + 0 },
  98. { "set_reactive", "3", xdg_shell_types + 0 },
  99. { "set_parent_size", "3ii", xdg_shell_types + 0 },
  100. { "set_parent_configure", "3u", xdg_shell_types + 0 },
  101. };
  102. WL_PRIVATE const struct wl_interface xdg_positioner_interface = {
  103. "xdg_positioner", 7,
  104. 10, xdg_positioner_requests,
  105. 0, NULL,
  106. };
  107. static const struct wl_message xdg_surface_requests[] = {
  108. { "destroy", "", xdg_shell_types + 0 },
  109. { "get_toplevel", "n", xdg_shell_types + 7 },
  110. { "get_popup", "n?oo", xdg_shell_types + 8 },
  111. { "set_window_geometry", "iiii", xdg_shell_types + 0 },
  112. { "ack_configure", "u", xdg_shell_types + 0 },
  113. };
  114. static const struct wl_message xdg_surface_events[] = {
  115. { "configure", "u", xdg_shell_types + 0 },
  116. };
  117. WL_PRIVATE const struct wl_interface xdg_surface_interface = {
  118. "xdg_surface", 7,
  119. 5, xdg_surface_requests,
  120. 1, xdg_surface_events,
  121. };
  122. static const struct wl_message xdg_toplevel_requests[] = {
  123. { "destroy", "", xdg_shell_types + 0 },
  124. { "set_parent", "?o", xdg_shell_types + 11 },
  125. { "set_title", "s", xdg_shell_types + 0 },
  126. { "set_app_id", "s", xdg_shell_types + 0 },
  127. { "show_window_menu", "ouii", xdg_shell_types + 12 },
  128. { "move", "ou", xdg_shell_types + 16 },
  129. { "resize", "ouu", xdg_shell_types + 18 },
  130. { "set_max_size", "ii", xdg_shell_types + 0 },
  131. { "set_min_size", "ii", xdg_shell_types + 0 },
  132. { "set_maximized", "", xdg_shell_types + 0 },
  133. { "unset_maximized", "", xdg_shell_types + 0 },
  134. { "set_fullscreen", "?o", xdg_shell_types + 21 },
  135. { "unset_fullscreen", "", xdg_shell_types + 0 },
  136. { "set_minimized", "", xdg_shell_types + 0 },
  137. };
  138. static const struct wl_message xdg_toplevel_events[] = {
  139. { "configure", "iia", xdg_shell_types + 0 },
  140. { "close", "", xdg_shell_types + 0 },
  141. { "configure_bounds", "4ii", xdg_shell_types + 0 },
  142. { "wm_capabilities", "5a", xdg_shell_types + 0 },
  143. };
  144. WL_PRIVATE const struct wl_interface xdg_toplevel_interface = {
  145. "xdg_toplevel", 7,
  146. 14, xdg_toplevel_requests,
  147. 4, xdg_toplevel_events,
  148. };
  149. static const struct wl_message xdg_popup_requests[] = {
  150. { "destroy", "", xdg_shell_types + 0 },
  151. { "grab", "ou", xdg_shell_types + 22 },
  152. { "reposition", "3ou", xdg_shell_types + 24 },
  153. };
  154. static const struct wl_message xdg_popup_events[] = {
  155. { "configure", "iiii", xdg_shell_types + 0 },
  156. { "popup_done", "", xdg_shell_types + 0 },
  157. { "repositioned", "3u", xdg_shell_types + 0 },
  158. };
  159. WL_PRIVATE const struct wl_interface xdg_popup_interface = {
  160. "xdg_popup", 7,
  161. 3, xdg_popup_requests,
  162. 3, xdg_popup_events,
  163. };