xdg-shell-protocol.c 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. /* Generated by wayland-scanner 1.21.90 */
  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 <stdlib.h>
  30. #include <stdint.h>
  31. #include "wayland-util.h"
  32. #ifndef __has_attribute
  33. # define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */
  34. #endif
  35. #if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4)
  36. #define WL_PRIVATE __attribute__ ((visibility("hidden")))
  37. #else
  38. #define WL_PRIVATE
  39. #endif
  40. extern const struct wl_interface wl_output_interface;
  41. extern const struct wl_interface wl_seat_interface;
  42. extern const struct wl_interface wl_surface_interface;
  43. extern const struct wl_interface xdg_popup_interface;
  44. extern const struct wl_interface xdg_positioner_interface;
  45. extern const struct wl_interface xdg_surface_interface;
  46. extern const struct wl_interface xdg_toplevel_interface;
  47. static const struct wl_interface *xdg_shell_types[] = {
  48. NULL,
  49. NULL,
  50. NULL,
  51. NULL,
  52. &xdg_positioner_interface,
  53. &xdg_surface_interface,
  54. &wl_surface_interface,
  55. &xdg_toplevel_interface,
  56. &xdg_popup_interface,
  57. &xdg_surface_interface,
  58. &xdg_positioner_interface,
  59. &xdg_toplevel_interface,
  60. &wl_seat_interface,
  61. NULL,
  62. NULL,
  63. NULL,
  64. &wl_seat_interface,
  65. NULL,
  66. &wl_seat_interface,
  67. NULL,
  68. NULL,
  69. &wl_output_interface,
  70. &wl_seat_interface,
  71. NULL,
  72. &xdg_positioner_interface,
  73. NULL,
  74. };
  75. static const struct wl_message xdg_wm_base_requests[] = {
  76. { "destroy", "", xdg_shell_types + 0 },
  77. { "create_positioner", "n", xdg_shell_types + 4 },
  78. { "get_xdg_surface", "no", xdg_shell_types + 5 },
  79. { "pong", "u", xdg_shell_types + 0 },
  80. };
  81. static const struct wl_message xdg_wm_base_events[] = {
  82. { "ping", "u", xdg_shell_types + 0 },
  83. };
  84. WL_PRIVATE const struct wl_interface xdg_wm_base_interface = {
  85. "xdg_wm_base", 5,
  86. 4, xdg_wm_base_requests,
  87. 1, xdg_wm_base_events,
  88. };
  89. static const struct wl_message xdg_positioner_requests[] = {
  90. { "destroy", "", xdg_shell_types + 0 },
  91. { "set_size", "ii", xdg_shell_types + 0 },
  92. { "set_anchor_rect", "iiii", xdg_shell_types + 0 },
  93. { "set_anchor", "u", xdg_shell_types + 0 },
  94. { "set_gravity", "u", xdg_shell_types + 0 },
  95. { "set_constraint_adjustment", "u", xdg_shell_types + 0 },
  96. { "set_offset", "ii", xdg_shell_types + 0 },
  97. { "set_reactive", "3", xdg_shell_types + 0 },
  98. { "set_parent_size", "3ii", xdg_shell_types + 0 },
  99. { "set_parent_configure", "3u", xdg_shell_types + 0 },
  100. };
  101. WL_PRIVATE const struct wl_interface xdg_positioner_interface = {
  102. "xdg_positioner", 5,
  103. 10, xdg_positioner_requests,
  104. 0, NULL,
  105. };
  106. static const struct wl_message xdg_surface_requests[] = {
  107. { "destroy", "", xdg_shell_types + 0 },
  108. { "get_toplevel", "n", xdg_shell_types + 7 },
  109. { "get_popup", "n?oo", xdg_shell_types + 8 },
  110. { "set_window_geometry", "iiii", xdg_shell_types + 0 },
  111. { "ack_configure", "u", xdg_shell_types + 0 },
  112. };
  113. static const struct wl_message xdg_surface_events[] = {
  114. { "configure", "u", xdg_shell_types + 0 },
  115. };
  116. WL_PRIVATE const struct wl_interface xdg_surface_interface = {
  117. "xdg_surface", 5,
  118. 5, xdg_surface_requests,
  119. 1, xdg_surface_events,
  120. };
  121. static const struct wl_message xdg_toplevel_requests[] = {
  122. { "destroy", "", xdg_shell_types + 0 },
  123. { "set_parent", "?o", xdg_shell_types + 11 },
  124. { "set_title", "s", xdg_shell_types + 0 },
  125. { "set_app_id", "s", xdg_shell_types + 0 },
  126. { "show_window_menu", "ouii", xdg_shell_types + 12 },
  127. { "move", "ou", xdg_shell_types + 16 },
  128. { "resize", "ouu", xdg_shell_types + 18 },
  129. { "set_max_size", "ii", xdg_shell_types + 0 },
  130. { "set_min_size", "ii", xdg_shell_types + 0 },
  131. { "set_maximized", "", xdg_shell_types + 0 },
  132. { "unset_maximized", "", xdg_shell_types + 0 },
  133. { "set_fullscreen", "?o", xdg_shell_types + 21 },
  134. { "unset_fullscreen", "", xdg_shell_types + 0 },
  135. { "set_minimized", "", xdg_shell_types + 0 },
  136. };
  137. static const struct wl_message xdg_toplevel_events[] = {
  138. { "configure", "iia", xdg_shell_types + 0 },
  139. { "close", "", xdg_shell_types + 0 },
  140. { "configure_bounds", "4ii", xdg_shell_types + 0 },
  141. { "wm_capabilities", "5a", xdg_shell_types + 0 },
  142. };
  143. WL_PRIVATE const struct wl_interface xdg_toplevel_interface = {
  144. "xdg_toplevel", 5,
  145. 14, xdg_toplevel_requests,
  146. 4, xdg_toplevel_events,
  147. };
  148. static const struct wl_message xdg_popup_requests[] = {
  149. { "destroy", "", xdg_shell_types + 0 },
  150. { "grab", "ou", xdg_shell_types + 22 },
  151. { "reposition", "3ou", xdg_shell_types + 24 },
  152. };
  153. static const struct wl_message xdg_popup_events[] = {
  154. { "configure", "iiii", xdg_shell_types + 0 },
  155. { "popup_done", "", xdg_shell_types + 0 },
  156. { "repositioned", "3u", xdg_shell_types + 0 },
  157. };
  158. WL_PRIVATE const struct wl_interface xdg_popup_interface = {
  159. "xdg_popup", 5,
  160. 3, xdg_popup_requests,
  161. 3, xdg_popup_events,
  162. };