2 * Copyright © 2012, 2013 Intel Corporation
4 * Permission to use, copy, modify, distribute, and sell this
5 * software and its documentation for any purpose is hereby granted
6 * without fee, provided that the above copyright notice appear in
7 * all copies and that both that copyright notice and this permission
8 * notice appear in supporting documentation, and that the name of
9 * the copyright holders not be used in advertising or publicity
10 * pertaining to distribution of the software without specific,
11 * written prior permission. The copyright holders make no
12 * representations about the suitability of this software for any
13 * purpose. It is provided "as is" without express or implied
16 * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
17 * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
18 * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
19 * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
20 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
21 * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
22 * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
28 #include "wayland-util.h"
30 extern const struct wl_interface wl_seat_interface;
31 extern const struct wl_interface wl_surface_interface;
32 extern const struct wl_interface wl_seat_interface;
33 extern const struct wl_interface wl_surface_interface;
34 extern const struct wl_interface wl_text_input_interface;
36 static const struct wl_interface *types[] = {
43 &wl_surface_interface,
45 &wl_surface_interface,
46 &wl_text_input_interface,
49 static const struct wl_message wl_text_input_requests[] = {
50 { "activate", "oo", types + 5 },
51 { "deactivate", "o", types + 7 },
52 { "show_input_panel", "", types + 0 },
53 { "hide_input_panel", "", types + 0 },
54 { "reset", "", types + 0 },
55 { "set_surrounding_text", "suu", types + 0 },
56 { "set_content_type", "uu", types + 0 },
57 { "set_cursor_rectangle", "iiii", types + 0 },
58 { "set_preferred_language", "s", types + 0 },
59 { "commit_state", "u", types + 0 },
60 { "invoke_action", "uu", types + 0 },
63 static const struct wl_message wl_text_input_events[] = {
64 { "enter", "o", types + 8 },
65 { "leave", "", types + 0 },
66 { "modifiers_map", "a", types + 0 },
67 { "input_panel_state", "u", types + 0 },
68 { "preedit_string", "uss", types + 0 },
69 { "preedit_styling", "uuu", types + 0 },
70 { "preedit_cursor", "i", types + 0 },
71 { "commit_string", "us", types + 0 },
72 { "cursor_position", "ii", types + 0 },
73 { "delete_surrounding_text", "iu", types + 0 },
74 { "keysym", "uuuuu", types + 0 },
75 { "language", "us", types + 0 },
76 { "text_direction", "uu", types + 0 },
79 WL_EXPORT const struct wl_interface wl_text_input_interface = {
81 11, wl_text_input_requests,
82 13, wl_text_input_events,
85 static const struct wl_message wl_text_input_manager_requests[] = {
86 { "create_text_input", "n", types + 9 },
89 WL_EXPORT const struct wl_interface wl_text_input_manager_interface = {
90 "wl_text_input_manager", 1,
91 1, wl_text_input_manager_requests,