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