github.com/cybriq/giocore@v0.0.7-0.20210703034601-cfb9cb5f3900/app/internal/wm/wayland_xdg_shell.c (about)

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