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