github.com/Seikaijyu/gio@v0.0.1/app/wayland_xdg_shell.c (about)

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