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