gioui.org@v0.6.1-0.20240506124620-7a9ce51988ce/app/wayland_text_input.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 © 2012, 2013 Intel Corporation
     9   * Copyright © 2015, 2016 Jan Arne Petersen
    10   * Copyright © 2017, 2018 Red Hat, Inc.
    11   * Copyright © 2018       Purism SPC
    12   *
    13   * Permission to use, copy, modify, distribute, and sell this
    14   * software and its documentation for any purpose is hereby granted
    15   * without fee, provided that the above copyright notice appear in
    16   * all copies and that both that copyright notice and this permission
    17   * notice appear in supporting documentation, and that the name of
    18   * the copyright holders not be used in advertising or publicity
    19   * pertaining to distribution of the software without specific,
    20   * written prior permission.  The copyright holders make no
    21   * representations about the suitability of this software for any
    22   * purpose.  It is provided "as is" without express or implied
    23   * warranty.
    24   *
    25   * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
    26   * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
    27   * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
    28   * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
    29   * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
    30   * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
    31   * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
    32   * THIS 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_seat_interface;
    50  extern const struct wl_interface wl_surface_interface;
    51  extern const struct wl_interface zwp_text_input_v3_interface;
    52  
    53  static const struct wl_interface *text_input_unstable_v3_types[] = {
    54  	NULL,
    55  	NULL,
    56  	NULL,
    57  	NULL,
    58  	&wl_surface_interface,
    59  	&wl_surface_interface,
    60  	&zwp_text_input_v3_interface,
    61  	&wl_seat_interface,
    62  };
    63  
    64  static const struct wl_message zwp_text_input_v3_requests[] = {
    65  	{ "destroy", "", text_input_unstable_v3_types + 0 },
    66  	{ "enable", "", text_input_unstable_v3_types + 0 },
    67  	{ "disable", "", text_input_unstable_v3_types + 0 },
    68  	{ "set_surrounding_text", "sii", text_input_unstable_v3_types + 0 },
    69  	{ "set_text_change_cause", "u", text_input_unstable_v3_types + 0 },
    70  	{ "set_content_type", "uu", text_input_unstable_v3_types + 0 },
    71  	{ "set_cursor_rectangle", "iiii", text_input_unstable_v3_types + 0 },
    72  	{ "commit", "", text_input_unstable_v3_types + 0 },
    73  };
    74  
    75  static const struct wl_message zwp_text_input_v3_events[] = {
    76  	{ "enter", "o", text_input_unstable_v3_types + 4 },
    77  	{ "leave", "o", text_input_unstable_v3_types + 5 },
    78  	{ "preedit_string", "?sii", text_input_unstable_v3_types + 0 },
    79  	{ "commit_string", "?s", text_input_unstable_v3_types + 0 },
    80  	{ "delete_surrounding_text", "uu", text_input_unstable_v3_types + 0 },
    81  	{ "done", "u", text_input_unstable_v3_types + 0 },
    82  };
    83  
    84  WL_PRIVATE const struct wl_interface zwp_text_input_v3_interface = {
    85  	"zwp_text_input_v3", 1,
    86  	8, zwp_text_input_v3_requests,
    87  	6, zwp_text_input_v3_events,
    88  };
    89  
    90  static const struct wl_message zwp_text_input_manager_v3_requests[] = {
    91  	{ "destroy", "", text_input_unstable_v3_types + 0 },
    92  	{ "get_text_input", "no", text_input_unstable_v3_types + 6 },
    93  };
    94  
    95  WL_PRIVATE const struct wl_interface zwp_text_input_manager_v3_interface = {
    96  	"zwp_text_input_manager_v3", 1,
    97  	2, zwp_text_input_manager_v3_requests,
    98  	0, NULL,
    99  };
   100