Blame client/wayland/input-method-protocol.c

Packit Service 1d8f1c
/* 
Packit Service 1d8f1c
 * Copyright © 2012, 2013 Intel Corporation
Packit Service 1d8f1c
 * 
Packit Service 1d8f1c
 * Permission to use, copy, modify, distribute, and sell this
Packit Service 1d8f1c
 * software and its documentation for any purpose is hereby granted
Packit Service 1d8f1c
 * without fee, provided that the above copyright notice appear in
Packit Service 1d8f1c
 * all copies and that both that copyright notice and this permission
Packit Service 1d8f1c
 * notice appear in supporting documentation, and that the name of
Packit Service 1d8f1c
 * the copyright holders not be used in advertising or publicity
Packit Service 1d8f1c
 * pertaining to distribution of the software without specific,
Packit Service 1d8f1c
 * written prior permission.  The copyright holders make no
Packit Service 1d8f1c
 * representations about the suitability of this software for any
Packit Service 1d8f1c
 * purpose.  It is provided "as is" without express or implied
Packit Service 1d8f1c
 * warranty.
Packit Service 1d8f1c
 * 
Packit Service 1d8f1c
 * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
Packit Service 1d8f1c
 * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
Packit Service 1d8f1c
 * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
Packit Service 1d8f1c
 * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
Packit Service 1d8f1c
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
Packit Service 1d8f1c
 * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
Packit Service 1d8f1c
 * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
Packit Service 1d8f1c
 * THIS SOFTWARE.
Packit Service 1d8f1c
 */
Packit Service 1d8f1c
Packit Service 1d8f1c
#include <stdlib.h>
Packit Service 1d8f1c
#include <stdint.h>
Packit Service 1d8f1c
#include "wayland-util.h"
Packit Service 1d8f1c
Packit Service 1d8f1c
extern const struct wl_interface wl_keyboard_interface;
Packit Service 1d8f1c
extern const struct wl_interface wl_input_method_context_interface;
Packit Service 1d8f1c
extern const struct wl_interface wl_input_method_context_interface;
Packit Service 1d8f1c
extern const struct wl_interface wl_input_panel_surface_interface;
Packit Service 1d8f1c
extern const struct wl_interface wl_surface_interface;
Packit Service 1d8f1c
extern const struct wl_interface wl_output_interface;
Packit Service 1d8f1c
Packit Service 1d8f1c
static const struct wl_interface *types[] = {
Packit Service 1d8f1c
	NULL,
Packit Service 1d8f1c
	NULL,
Packit Service 1d8f1c
	NULL,
Packit Service 1d8f1c
	NULL,
Packit Service 1d8f1c
	NULL,
Packit Service 1d8f1c
	&wl_keyboard_interface,
Packit Service 1d8f1c
	&wl_input_method_context_interface,
Packit Service 1d8f1c
	&wl_input_method_context_interface,
Packit Service 1d8f1c
	&wl_input_panel_surface_interface,
Packit Service 1d8f1c
	&wl_surface_interface,
Packit Service 1d8f1c
	&wl_output_interface,
Packit Service 1d8f1c
	NULL,
Packit Service 1d8f1c
};
Packit Service 1d8f1c
Packit Service 1d8f1c
static const struct wl_message wl_input_method_context_requests[] = {
Packit Service 1d8f1c
	{ "destroy", "", types + 0 },
Packit Service 1d8f1c
	{ "commit_string", "us", types + 0 },
Packit Service 1d8f1c
	{ "preedit_string", "uss", types + 0 },
Packit Service 1d8f1c
	{ "preedit_styling", "uuu", types + 0 },
Packit Service 1d8f1c
	{ "preedit_cursor", "i", types + 0 },
Packit Service 1d8f1c
	{ "delete_surrounding_text", "iu", types + 0 },
Packit Service 1d8f1c
	{ "cursor_position", "ii", types + 0 },
Packit Service 1d8f1c
	{ "modifiers_map", "a", types + 0 },
Packit Service 1d8f1c
	{ "keysym", "uuuuu", types + 0 },
Packit Service 1d8f1c
	{ "grab_keyboard", "n", types + 5 },
Packit Service 1d8f1c
	{ "key", "uuuu", types + 0 },
Packit Service 1d8f1c
	{ "modifiers", "uuuuu", types + 0 },
Packit Service 1d8f1c
	{ "language", "us", types + 0 },
Packit Service 1d8f1c
	{ "text_direction", "uu", types + 0 },
Packit Service 1d8f1c
};
Packit Service 1d8f1c
Packit Service 1d8f1c
static const struct wl_message wl_input_method_context_events[] = {
Packit Service 1d8f1c
	{ "surrounding_text", "suu", types + 0 },
Packit Service 1d8f1c
	{ "reset", "", types + 0 },
Packit Service 1d8f1c
	{ "content_type", "uu", types + 0 },
Packit Service 1d8f1c
	{ "invoke_action", "uu", types + 0 },
Packit Service 1d8f1c
	{ "commit_state", "u", types + 0 },
Packit Service 1d8f1c
	{ "preferred_language", "s", types + 0 },
Packit Service 1d8f1c
};
Packit Service 1d8f1c
Packit Service 1d8f1c
WL_EXPORT const struct wl_interface wl_input_method_context_interface = {
Packit Service 1d8f1c
	"wl_input_method_context", 1,
Packit Service 1d8f1c
	14, wl_input_method_context_requests,
Packit Service 1d8f1c
	6, wl_input_method_context_events,
Packit Service 1d8f1c
};
Packit Service 1d8f1c
Packit Service 1d8f1c
static const struct wl_message wl_input_method_events[] = {
Packit Service 1d8f1c
	{ "activate", "n", types + 6 },
Packit Service 1d8f1c
	{ "deactivate", "o", types + 7 },
Packit Service 1d8f1c
};
Packit Service 1d8f1c
Packit Service 1d8f1c
WL_EXPORT const struct wl_interface wl_input_method_interface = {
Packit Service 1d8f1c
	"wl_input_method", 1,
Packit Service 1d8f1c
	0, NULL,
Packit Service 1d8f1c
	2, wl_input_method_events,
Packit Service 1d8f1c
};
Packit Service 1d8f1c
Packit Service 1d8f1c
static const struct wl_message wl_input_panel_requests[] = {
Packit Service 1d8f1c
	{ "get_input_panel_surface", "no", types + 8 },
Packit Service 1d8f1c
};
Packit Service 1d8f1c
Packit Service 1d8f1c
WL_EXPORT const struct wl_interface wl_input_panel_interface = {
Packit Service 1d8f1c
	"wl_input_panel", 1,
Packit Service 1d8f1c
	1, wl_input_panel_requests,
Packit Service 1d8f1c
	0, NULL,
Packit Service 1d8f1c
};
Packit Service 1d8f1c
Packit Service 1d8f1c
static const struct wl_message wl_input_panel_surface_requests[] = {
Packit Service 1d8f1c
	{ "set_toplevel", "ou", types + 10 },
Packit Service 1d8f1c
	{ "set_overlay_panel", "", types + 0 },
Packit Service 1d8f1c
};
Packit Service 1d8f1c
Packit Service 1d8f1c
WL_EXPORT const struct wl_interface wl_input_panel_surface_interface = {
Packit Service 1d8f1c
	"wl_input_panel_surface", 1,
Packit Service 1d8f1c
	2, wl_input_panel_surface_requests,
Packit Service 1d8f1c
	0, NULL,
Packit Service 1d8f1c
};
Packit Service 1d8f1c