[PATCH v2 25/28] text: Rename input_method to wl_input_method
Jan Arne Petersen
jpetersen at openismus.com
Thu Apr 18 07:47:39 PDT 2013
From: Jan Arne Petersen <jpetersen at openismus.com>
Also rename input_method_context to wl_input_method_context,
input_panel to wl_input_panel and input_panel_surface to
wl_input_panel_surface.
Signed-off-by: Jan Arne Petersen <jpetersen at openismus.com>
---
clients/keyboard.c | 162 ++++++++++++++++++++++-----------------------
clients/weston-simple-im.c | 124 +++++++++++++++++-----------------
protocol/input-method.xml | 14 ++--
src/input-panel.c | 16 ++---
src/text-backend.c | 44 ++++++------
5 files changed, 180 insertions(+), 180 deletions(-)
diff --git a/clients/keyboard.c b/clients/keyboard.c
index 6c5ddd7..d83ca3c 100644
--- a/clients/keyboard.c
+++ b/clients/keyboard.c
@@ -35,9 +35,9 @@
struct keyboard;
struct virtual_keyboard {
- struct input_panel *input_panel;
- struct input_method *input_method;
- struct input_method_context *context;
+ struct wl_input_panel *input_panel;
+ struct wl_input_method *input_method;
+ struct wl_input_method_context *context;
struct display *display;
struct output *output;
char *preedit_string;
@@ -387,11 +387,11 @@ virtual_keyboard_commit_preedit(struct virtual_keyboard *keyboard)
strlen(keyboard->preedit_string) == 0)
return;
- input_method_context_cursor_position(keyboard->context,
- 0, 0);
- input_method_context_commit_string(keyboard->context,
- keyboard->serial,
- keyboard->preedit_string);
+ wl_input_method_context_cursor_position(keyboard->context,
+ 0, 0);
+ wl_input_method_context_commit_string(keyboard->context,
+ keyboard->serial,
+ keyboard->preedit_string);
free(keyboard->preedit_string);
keyboard->preedit_string = strdup("");
}
@@ -403,18 +403,18 @@ virtual_keyboard_send_preedit(struct virtual_keyboard *keyboard,
uint32_t index = strlen(keyboard->preedit_string);
if (keyboard->preedit_style)
- input_method_context_preedit_styling(keyboard->context,
- 0,
- strlen(keyboard->preedit_string),
- keyboard->preedit_style);
+ wl_input_method_context_preedit_styling(keyboard->context,
+ 0,
+ strlen(keyboard->preedit_string),
+ keyboard->preedit_style);
if (cursor > 0)
index = cursor;
- input_method_context_preedit_cursor(keyboard->context,
- index);
- input_method_context_preedit_string(keyboard->context,
- keyboard->serial,
- keyboard->preedit_string,
- keyboard->preedit_string);
+ wl_input_method_context_preedit_cursor(keyboard->context,
+ index);
+ wl_input_method_context_preedit_string(keyboard->context,
+ keyboard->serial,
+ keyboard->preedit_string,
+ keyboard->preedit_string);
}
static void
@@ -438,11 +438,11 @@ keyboard_handle_key(struct keyboard *keyboard, uint32_t time, const struct key *
break;
if (strlen(keyboard->keyboard->preedit_string) == 0) {
- input_method_context_delete_surrounding_text(keyboard->keyboard->context,
- -1, 1);
- input_method_context_commit_string(keyboard->keyboard->context,
- keyboard->keyboard->serial,
- "");
+ wl_input_method_context_delete_surrounding_text(keyboard->keyboard->context,
+ -1, 1);
+ wl_input_method_context_commit_string(keyboard->keyboard->context,
+ keyboard->keyboard->serial,
+ "");
} else {
keyboard->keyboard->preedit_string[strlen(keyboard->keyboard->preedit_string) - 1] = '\0';
virtual_keyboard_send_preedit(keyboard->keyboard, -1);
@@ -450,10 +450,10 @@ keyboard_handle_key(struct keyboard *keyboard, uint32_t time, const struct key *
break;
case keytype_enter:
virtual_keyboard_commit_preedit(keyboard->keyboard);
- input_method_context_keysym(keyboard->keyboard->context,
- display_get_serial(keyboard->keyboard->display),
- time,
- XKB_KEY_Return, key_state, mod_mask);
+ wl_input_method_context_keysym(keyboard->keyboard->context,
+ display_get_serial(keyboard->keyboard->display),
+ time,
+ XKB_KEY_Return, key_state, mod_mask);
break;
case keytype_space:
if (state != WL_POINTER_BUTTON_STATE_PRESSED)
@@ -476,38 +476,38 @@ keyboard_handle_key(struct keyboard *keyboard, uint32_t time, const struct key *
break;
case keytype_tab:
virtual_keyboard_commit_preedit(keyboard->keyboard);
- input_method_context_keysym(keyboard->keyboard->context,
- display_get_serial(keyboard->keyboard->display),
- time,
- XKB_KEY_Tab, key_state, mod_mask);
+ wl_input_method_context_keysym(keyboard->keyboard->context,
+ display_get_serial(keyboard->keyboard->display),
+ time,
+ XKB_KEY_Tab, key_state, mod_mask);
break;
case keytype_arrow_up:
virtual_keyboard_commit_preedit(keyboard->keyboard);
- input_method_context_keysym(keyboard->keyboard->context,
- display_get_serial(keyboard->keyboard->display),
- time,
- XKB_KEY_Up, key_state, mod_mask);
+ wl_input_method_context_keysym(keyboard->keyboard->context,
+ display_get_serial(keyboard->keyboard->display),
+ time,
+ XKB_KEY_Up, key_state, mod_mask);
break;
case keytype_arrow_left:
virtual_keyboard_commit_preedit(keyboard->keyboard);
- input_method_context_keysym(keyboard->keyboard->context,
- display_get_serial(keyboard->keyboard->display),
- time,
- XKB_KEY_Left, key_state, mod_mask);
+ wl_input_method_context_keysym(keyboard->keyboard->context,
+ display_get_serial(keyboard->keyboard->display),
+ time,
+ XKB_KEY_Left, key_state, mod_mask);
break;
case keytype_arrow_right:
virtual_keyboard_commit_preedit(keyboard->keyboard);
- input_method_context_keysym(keyboard->keyboard->context,
- display_get_serial(keyboard->keyboard->display),
- time,
- XKB_KEY_Right, key_state, mod_mask);
+ wl_input_method_context_keysym(keyboard->keyboard->context,
+ display_get_serial(keyboard->keyboard->display),
+ time,
+ XKB_KEY_Right, key_state, mod_mask);
break;
case keytype_arrow_down:
virtual_keyboard_commit_preedit(keyboard->keyboard);
- input_method_context_keysym(keyboard->keyboard->context,
- display_get_serial(keyboard->keyboard->display),
- time,
- XKB_KEY_Down, key_state, mod_mask);
+ wl_input_method_context_keysym(keyboard->keyboard->context,
+ display_get_serial(keyboard->keyboard->display),
+ time,
+ XKB_KEY_Down, key_state, mod_mask);
break;
case keytype_style:
if (state != WL_POINTER_BUTTON_STATE_PRESSED)
@@ -558,7 +558,7 @@ button_handler(struct widget *widget,
static void
handle_surrounding_text(void *data,
- struct input_method_context *context,
+ struct wl_input_method_context *context,
const char *text,
uint32_t cursor,
uint32_t anchor)
@@ -571,7 +571,7 @@ handle_surrounding_text(void *data,
static void
handle_reset(void *data,
- struct input_method_context *context)
+ struct wl_input_method_context *context)
{
struct virtual_keyboard *keyboard = data;
@@ -585,7 +585,7 @@ handle_reset(void *data,
static void
handle_content_type(void *data,
- struct input_method_context *context,
+ struct wl_input_method_context *context,
uint32_t hint,
uint32_t purpose)
{
@@ -597,7 +597,7 @@ handle_content_type(void *data,
static void
handle_invoke_action(void *data,
- struct input_method_context *context,
+ struct wl_input_method_context *context,
uint32_t button,
uint32_t index)
{
@@ -611,7 +611,7 @@ handle_invoke_action(void *data,
static void
handle_commit_state(void *data,
- struct input_method_context *context,
+ struct wl_input_method_context *context,
uint32_t serial)
{
struct virtual_keyboard *keyboard = data;
@@ -628,15 +628,15 @@ handle_commit_state(void *data,
layout->columns * key_width,
layout->rows * key_height);
- input_method_context_language(context, keyboard->serial, layout->language);
- input_method_context_text_direction(context, keyboard->serial, layout->text_direction);
+ wl_input_method_context_language(context, keyboard->serial, layout->language);
+ wl_input_method_context_text_direction(context, keyboard->serial, layout->text_direction);
widget_schedule_redraw(keyboard->keyboard->widget);
}
static void
handle_preferred_language(void *data,
- struct input_method_context *context,
+ struct wl_input_method_context *context,
const char *language)
{
struct virtual_keyboard *keyboard = data;
@@ -650,7 +650,7 @@ handle_preferred_language(void *data,
keyboard->preferred_language = strdup(language);
}
-static const struct input_method_context_listener input_method_context_listener = {
+static const struct wl_input_method_context_listener input_method_context_listener = {
handle_surrounding_text,
handle_reset,
handle_content_type,
@@ -661,8 +661,8 @@ static const struct input_method_context_listener input_method_context_listener
static void
input_method_activate(void *data,
- struct input_method *input_method,
- struct input_method_context *context)
+ struct wl_input_method *input_method,
+ struct wl_input_method_context *context)
{
struct virtual_keyboard *keyboard = data;
struct wl_array modifiers_map;
@@ -671,7 +671,7 @@ input_method_activate(void *data,
keyboard->keyboard->state = keyboardstate_default;
if (keyboard->context)
- input_method_context_destroy(keyboard->context);
+ wl_input_method_context_destroy(keyboard->context);
if (keyboard->preedit_string)
free(keyboard->preedit_string);
@@ -687,15 +687,15 @@ input_method_activate(void *data,
keyboard->serial = 0;
keyboard->context = context;
- input_method_context_add_listener(context,
- &input_method_context_listener,
- keyboard);
+ wl_input_method_context_add_listener(context,
+ &input_method_context_listener,
+ keyboard);
wl_array_init(&modifiers_map);
keysym_modifiers_add(&modifiers_map, "Shift");
keysym_modifiers_add(&modifiers_map, "Control");
keysym_modifiers_add(&modifiers_map, "Mod1");
- input_method_context_modifiers_map(context, &modifiers_map);
+ wl_input_method_context_modifiers_map(context, &modifiers_map);
keyboard->keysym.shift_mask = keysym_modifiers_get_mask(&modifiers_map, "Shift");
wl_array_release(&modifiers_map);
@@ -705,27 +705,27 @@ input_method_activate(void *data,
layout->columns * key_width,
layout->rows * key_height);
- input_method_context_language(context, keyboard->serial, layout->language);
- input_method_context_text_direction(context, keyboard->serial, layout->text_direction);
+ wl_input_method_context_language(context, keyboard->serial, layout->language);
+ wl_input_method_context_text_direction(context, keyboard->serial, layout->text_direction);
widget_schedule_redraw(keyboard->keyboard->widget);
}
static void
input_method_deactivate(void *data,
- struct input_method *input_method,
- struct input_method_context *context)
+ struct wl_input_method *input_method,
+ struct wl_input_method_context *context)
{
struct virtual_keyboard *keyboard = data;
if (!keyboard->context)
return;
- input_method_context_destroy(keyboard->context);
+ wl_input_method_context_destroy(keyboard->context);
keyboard->context = NULL;
}
-static const struct input_method_listener input_method_listener = {
+static const struct wl_input_method_listener input_method_listener = {
input_method_activate,
input_method_deactivate
};
@@ -736,14 +736,14 @@ global_handler(struct display *display, uint32_t name,
{
struct virtual_keyboard *keyboard = data;
- if (!strcmp(interface, "input_panel")) {
+ if (!strcmp(interface, "wl_input_panel")) {
keyboard->input_panel =
- display_bind(display, name, &input_panel_interface, 1);
- } else if (!strcmp(interface, "input_method")) {
+ display_bind(display, name, &wl_input_panel_interface, 1);
+ } else if (!strcmp(interface, "wl_input_method")) {
keyboard->input_method =
display_bind(display, name,
- &input_method_interface, 1);
- input_method_add_listener(keyboard->input_method, &input_method_listener, keyboard);
+ &wl_input_method_interface, 1);
+ wl_input_method_add_listener(keyboard->input_method, &input_method_listener, keyboard);
}
}
@@ -752,8 +752,8 @@ keyboard_create(struct output *output, struct virtual_keyboard *virtual_keyboard
{
struct keyboard *keyboard;
const struct layout *layout;
- struct input_panel_surface *ips;
-
+ struct wl_input_panel_surface *ips;
+
layout = get_current_layout(virtual_keyboard);
keyboard = malloc(sizeof *keyboard);
@@ -777,12 +777,12 @@ keyboard_create(struct output *output, struct virtual_keyboard *virtual_keyboard
layout->rows * key_height);
- ips = input_panel_get_input_panel_surface(virtual_keyboard->input_panel,
- window_get_wl_surface(keyboard->window));
+ ips = wl_input_panel_get_input_panel_surface(virtual_keyboard->input_panel,
+ window_get_wl_surface(keyboard->window));
- input_panel_surface_set_toplevel(ips,
- output_get_wl_output(output),
- INPUT_PANEL_SURFACE_POSITION_CENTER_BOTTOM);
+ wl_input_panel_surface_set_toplevel(ips,
+ output_get_wl_output(output),
+ WL_INPUT_PANEL_SURFACE_POSITION_CENTER_BOTTOM);
}
int
diff --git a/clients/weston-simple-im.c b/clients/weston-simple-im.c
index a532003..56e30a7 100644
--- a/clients/weston-simple-im.c
+++ b/clients/weston-simple-im.c
@@ -51,8 +51,8 @@ typedef void (*keyboard_input_key_handler_t)(struct simple_im *keyboard,
enum wl_keyboard_key_state state);
struct simple_im {
- struct input_method *input_method;
- struct input_method_context *context;
+ struct wl_input_method *input_method;
+ struct wl_input_method_context *context;
struct wl_display *display;
struct wl_registry *registry;
struct wl_keyboard *keyboard;
@@ -102,7 +102,7 @@ static const uint32_t ignore_keys_on_compose[] = {
static void
handle_surrounding_text(void *data,
- struct input_method_context *context,
+ struct wl_input_method_context *context,
const char *text,
uint32_t cursor,
uint32_t anchor)
@@ -112,7 +112,7 @@ handle_surrounding_text(void *data,
static void
handle_reset(void *data,
- struct input_method_context *context)
+ struct wl_input_method_context *context)
{
struct simple_im *keyboard = data;
@@ -123,7 +123,7 @@ handle_reset(void *data,
static void
handle_content_type(void *data,
- struct input_method_context *context,
+ struct wl_input_method_context *context,
uint32_t hint,
uint32_t purpose)
{
@@ -131,7 +131,7 @@ handle_content_type(void *data,
static void
handle_invoke_action(void *data,
- struct input_method_context *context,
+ struct wl_input_method_context *context,
uint32_t button,
uint32_t index)
{
@@ -139,7 +139,7 @@ handle_invoke_action(void *data,
static void
handle_commit_state(void *data,
- struct input_method_context *context,
+ struct wl_input_method_context *context,
uint32_t serial)
{
struct simple_im *keyboard = data;
@@ -149,12 +149,12 @@ handle_commit_state(void *data,
static void
handle_preferred_language(void *data,
- struct input_method_context *context,
+ struct wl_input_method_context *context,
const char *language)
{
}
-static const struct input_method_context_listener input_method_context_listener = {
+static const struct wl_input_method_context_listener input_method_context_listener = {
handle_surrounding_text,
handle_reset,
handle_content_type,
@@ -253,7 +253,7 @@ input_method_keyboard_modifiers(void *data,
uint32_t group)
{
struct simple_im *keyboard = data;
- struct input_method_context *context = keyboard->context;
+ struct wl_input_method_context *context = keyboard->context;
xkb_mod_mask_t mask;
xkb_state_update_mask(keyboard->state, mods_depressed,
@@ -270,9 +270,9 @@ input_method_keyboard_modifiers(void *data,
if (mask & keyboard->shift_mask)
keyboard->modifiers |= MOD_SHIFT_MASK;
- input_method_context_modifiers(context, serial,
- mods_depressed, mods_depressed,
- mods_latched, group);
+ wl_input_method_context_modifiers(context, serial,
+ mods_depressed, mods_depressed,
+ mods_latched, group);
}
static const struct wl_keyboard_listener input_method_keyboard_listener = {
@@ -285,23 +285,23 @@ static const struct wl_keyboard_listener input_method_keyboard_listener = {
static void
input_method_activate(void *data,
- struct input_method *input_method,
- struct input_method_context *context)
+ struct wl_input_method *input_method,
+ struct wl_input_method_context *context)
{
struct simple_im *keyboard = data;
if (keyboard->context)
- input_method_context_destroy(keyboard->context);
+ wl_input_method_context_destroy(keyboard->context);
keyboard->compose_state = state_normal;
keyboard->serial = 0;
keyboard->context = context;
- input_method_context_add_listener(context,
- &input_method_context_listener,
- keyboard);
- keyboard->keyboard = input_method_context_grab_keyboard(context);
+ wl_input_method_context_add_listener(context,
+ &input_method_context_listener,
+ keyboard);
+ keyboard->keyboard = wl_input_method_context_grab_keyboard(context);
wl_keyboard_add_listener(keyboard->keyboard,
&input_method_keyboard_listener,
keyboard);
@@ -309,19 +309,19 @@ input_method_activate(void *data,
static void
input_method_deactivate(void *data,
- struct input_method *input_method,
- struct input_method_context *context)
+ struct wl_input_method *input_method,
+ struct wl_input_method_context *context)
{
struct simple_im *keyboard = data;
if (!keyboard->context)
return;
- input_method_context_destroy(keyboard->context);
+ wl_input_method_context_destroy(keyboard->context);
keyboard->context = NULL;
}
-static const struct input_method_listener input_method_listener = {
+static const struct wl_input_method_listener input_method_listener = {
input_method_activate,
input_method_deactivate
};
@@ -332,12 +332,12 @@ registry_handle_global(void *data, struct wl_registry *registry,
{
struct simple_im *keyboard = data;
- if (!strcmp(interface, "input_method")) {
+ if (!strcmp(interface, "wl_input_method")) {
keyboard->input_method =
wl_registry_bind(registry, name,
- &input_method_interface, 1);
- input_method_add_listener(keyboard->input_method,
- &input_method_listener, keyboard);
+ &wl_input_method_interface, 1);
+ wl_input_method_add_listener(keyboard->input_method,
+ &input_method_listener, keyboard);
}
}
@@ -376,7 +376,7 @@ simple_im_key_handler(struct simple_im *keyboard,
uint32_t serial, uint32_t time, uint32_t key, uint32_t sym,
enum wl_keyboard_key_state state)
{
- struct input_method_context *context = keyboard->context;
+ struct wl_input_method_context *context = keyboard->context;
char text[64];
if (sym == XKB_KEY_Multi_key &&
@@ -396,7 +396,7 @@ simple_im_key_handler(struct simple_im *keyboard,
for (i = 0; i < sizeof(ignore_keys_on_compose) / sizeof(ignore_keys_on_compose[0]); i++) {
if (sym == ignore_keys_on_compose[i]) {
- input_method_context_key(context, keyboard->serial, time, key, state);
+ wl_input_method_context_key(context, keyboard->serial, time, key, state);
return;
}
}
@@ -411,16 +411,16 @@ simple_im_key_handler(struct simple_im *keyboard,
if (cs) {
if (cs->keys[i + 1] == 0) {
- input_method_context_preedit_cursor(keyboard->context,
- 0);
- input_method_context_preedit_string(keyboard->context,
- keyboard->serial,
- "", "");
- input_method_context_cursor_position(keyboard->context,
- 0, 0);
- input_method_context_commit_string(keyboard->context,
- keyboard->serial,
- cs->text);
+ wl_input_method_context_preedit_cursor(keyboard->context,
+ 0);
+ wl_input_method_context_preedit_string(keyboard->context,
+ keyboard->serial,
+ "", "");
+ wl_input_method_context_cursor_position(keyboard->context,
+ 0, 0);
+ wl_input_method_context_commit_string(keyboard->context,
+ keyboard->serial,
+ cs->text);
keyboard->compose_state = state_normal;
} else {
uint32_t j = 0, idx = 0;
@@ -429,12 +429,12 @@ simple_im_key_handler(struct simple_im *keyboard,
idx += xkb_keysym_to_utf8(cs->keys[j], text + idx, sizeof(text) - idx);
}
- input_method_context_preedit_cursor(keyboard->context,
- strlen(text));
- input_method_context_preedit_string(keyboard->context,
- keyboard->serial,
- text,
- text);
+ wl_input_method_context_preedit_cursor(keyboard->context,
+ strlen(text));
+ wl_input_method_context_preedit_string(keyboard->context,
+ keyboard->serial,
+ text,
+ text);
}
} else {
uint32_t j = 0, idx = 0;
@@ -442,34 +442,34 @@ simple_im_key_handler(struct simple_im *keyboard,
for (; j <= i; j++) {
idx += xkb_keysym_to_utf8(keyboard->compose_seq.keys[j], text + idx, sizeof(text) - idx);
}
- input_method_context_preedit_cursor(keyboard->context,
- 0);
- input_method_context_preedit_string(keyboard->context,
- keyboard->serial,
- "", "");
- input_method_context_cursor_position(keyboard->context,
- 0, 0);
- input_method_context_commit_string(keyboard->context,
- keyboard->serial,
- text);
+ wl_input_method_context_preedit_cursor(keyboard->context,
+ 0);
+ wl_input_method_context_preedit_string(keyboard->context,
+ keyboard->serial,
+ "", "");
+ wl_input_method_context_cursor_position(keyboard->context,
+ 0, 0);
+ wl_input_method_context_commit_string(keyboard->context,
+ keyboard->serial,
+ text);
keyboard->compose_state = state_normal;
}
return;
}
if (xkb_keysym_to_utf8(sym, text, sizeof(text)) <= 0) {
- input_method_context_key(context, serial, time, key, state);
+ wl_input_method_context_key(context, serial, time, key, state);
return;
}
if (state == WL_KEYBOARD_KEY_STATE_PRESSED)
return;
- input_method_context_cursor_position(keyboard->context,
- 0, 0);
- input_method_context_commit_string(keyboard->context,
- keyboard->serial,
- text);
+ wl_input_method_context_cursor_position(keyboard->context,
+ 0, 0);
+ wl_input_method_context_commit_string(keyboard->context,
+ keyboard->serial,
+ text);
}
int
diff --git a/protocol/input-method.xml b/protocol/input-method.xml
index d7b3f6b..f0c1184 100644
--- a/protocol/input-method.xml
+++ b/protocol/input-method.xml
@@ -26,7 +26,7 @@
</copyright>
- <interface name="input_method_context" version="1">
+ <interface name="wl_input_method_context" version="1">
<description summary="input method context">
Corresponds to a text model on input method side. An input method context
is created on text mode activation on the input method side. It allows to
@@ -215,7 +215,7 @@
</event>
</interface>
- <interface name="input_method" version="1">
+ <interface name="wl_input_method" version="1">
<description summary="input method">
An input method object is responsible to compose text in response to
input from hardware or virtual keyboards. There is one input method
@@ -227,7 +227,7 @@
A text model was activated. Creates an input method context object
which allows communication with the text model.
</description>
- <arg name="id" type="new_id" interface="input_method_context"/>
+ <arg name="id" type="new_id" interface="wl_input_method_context"/>
</event>
<event name="deactivate">
<description summary="activate event">
@@ -235,22 +235,22 @@
The input method context should be destroyed after deactivation is
handled.
</description>
- <arg name="context" type="object" interface="input_method_context"/>
+ <arg name="context" type="object" interface="wl_input_method_context"/>
</event>
</interface>
- <interface name="input_panel" version="1">
+ <interface name="wl_input_panel" version="1">
<description summary="interface for implementing keyboards">
Only one client can bind this interface at a time.
</description>
<request name="get_input_panel_surface">
- <arg name="id" type="new_id" interface="input_panel_surface"/>
+ <arg name="id" type="new_id" interface="wl_input_panel_surface"/>
<arg name="surface" type="object" interface="wl_surface"/>
</request>
</interface>
- <interface name="input_panel_surface" version="1">
+ <interface name="wl_input_panel_surface" version="1">
<enum name="position">
<entry name="center_bottom" value="0"/>
</enum>
diff --git a/src/input-panel.c b/src/input-panel.c
index fb3e0d2..711c164 100644
--- a/src/input-panel.c
+++ b/src/input-panel.c
@@ -295,7 +295,7 @@ input_panel_surface_set_overlay_panel(struct wl_client *client,
input_panel_surface->overlay_panel = 1;
}
-static const struct input_panel_surface_interface input_panel_surface_implementation = {
+static const struct wl_input_panel_surface_interface input_panel_surface_implementation = {
input_panel_surface_set_toplevel,
input_panel_surface_set_overlay_panel
};
@@ -321,7 +321,7 @@ input_panel_get_input_panel_surface(struct wl_client *client,
if (get_input_panel_surface(surface)) {
wl_resource_post_error(surface_resource,
WL_DISPLAY_ERROR_INVALID_OBJECT,
- "input_panel::get_input_panel_surface already requested");
+ "wl_input_panel::get_input_panel_surface already requested");
return;
}
@@ -335,7 +335,7 @@ input_panel_get_input_panel_surface(struct wl_client *client,
ipsurf->resource.destroy = destroy_input_panel_surface_resource;
ipsurf->resource.object.id = id;
- ipsurf->resource.object.interface = &input_panel_surface_interface;
+ ipsurf->resource.object.interface = &wl_input_panel_surface_interface;
ipsurf->resource.object.implementation =
(void (**)(void)) &input_panel_surface_implementation;
ipsurf->resource.data = ipsurf;
@@ -343,7 +343,7 @@ input_panel_get_input_panel_surface(struct wl_client *client,
wl_client_add_resource(client, &ipsurf->resource);
}
-static const struct input_panel_interface input_panel_implementation = {
+static const struct wl_input_panel_interface input_panel_implementation = {
input_panel_get_input_panel_surface
};
@@ -371,12 +371,12 @@ unbind_input_panel(struct wl_resource *resource)
static void
bind_input_panel(struct wl_client *client,
- void *data, uint32_t version, uint32_t id)
+ void *data, uint32_t version, uint32_t id)
{
struct input_panel *input_panel = data;
struct wl_resource *resource;
- resource = wl_client_add_object(client, &input_panel_interface,
+ resource = wl_client_add_object(client, &wl_input_panel_interface,
&input_panel_implementation,
id, input_panel);
@@ -386,7 +386,7 @@ bind_input_panel(struct wl_client *client,
wl_resource_destroy(resource);
return;
}
-
+
resource->destroy = unbind_input_panel;
input_panel->binding = resource;
}
@@ -414,7 +414,7 @@ input_panel_create(struct weston_compositor *ec)
weston_layer_init(&input_panel->layer.input_panel, NULL);
- if (wl_display_add_global(ec->wl_display, &input_panel_interface,
+ if (wl_display_add_global(ec->wl_display, &wl_input_panel_interface,
input_panel, bind_input_panel) == NULL)
return NULL;
diff --git a/src/text-backend.c b/src/text-backend.c
index 3464c8b..1a40e4b 100644
--- a/src/text-backend.c
+++ b/src/text-backend.c
@@ -119,8 +119,8 @@ deactivate_text_input(struct text_input *text_input,
if (input_method->model == text_input) {
if (input_method->context && input_method->input_method_binding) {
input_method_context_end_keyboard_grab(input_method->context);
- input_method_send_deactivate(input_method->input_method_binding,
- &input_method->context->resource);
+ wl_input_method_send_deactivate(input_method->input_method_binding,
+ &input_method->context->resource);
}
wl_list_remove(&input_method->link);
@@ -157,16 +157,16 @@ text_input_set_surrounding_text(struct wl_client *client,
wl_list_for_each_safe(input_method, next, &text_input->input_methods, link) {
if (!input_method->context)
continue;
- input_method_context_send_surrounding_text(&input_method->context->resource,
- text,
- cursor,
- anchor);
+ wl_input_method_context_send_surrounding_text(&input_method->context->resource,
+ text,
+ cursor,
+ anchor);
}
}
static void
text_input_activate(struct wl_client *client,
- struct wl_resource *resource,
+ struct wl_resource *resource,
struct wl_resource *seat,
struct wl_resource *surface)
{
@@ -222,7 +222,7 @@ text_input_reset(struct wl_client *client,
wl_list_for_each_safe(input_method, next, &text_input->input_methods, link) {
if (!input_method->context)
continue;
- input_method_context_send_reset(&input_method->context->resource);
+ wl_input_method_context_send_reset(&input_method->context->resource);
}
}
@@ -257,7 +257,7 @@ text_input_set_content_type(struct wl_client *client,
wl_list_for_each_safe(input_method, next, &text_input->input_methods, link) {
if (!input_method->context)
continue;
- input_method_context_send_content_type(&input_method->context->resource, hint, purpose);
+ wl_input_method_context_send_content_type(&input_method->context->resource, hint, purpose);
}
}
@@ -273,7 +273,7 @@ text_input_invoke_action(struct wl_client *client,
wl_list_for_each_safe(input_method, next, &text_input->input_methods, link) {
if (!input_method->context)
continue;
- input_method_context_send_invoke_action(&input_method->context->resource, button, index);
+ wl_input_method_context_send_invoke_action(&input_method->context->resource, button, index);
}
}
@@ -288,7 +288,7 @@ text_input_commit_state(struct wl_client *client,
wl_list_for_each_safe(input_method, next, &text_input->input_methods, link) {
if (!input_method->context)
continue;
- input_method_context_send_commit_state(&input_method->context->resource, serial);
+ wl_input_method_context_send_commit_state(&input_method->context->resource, serial);
}
}
@@ -331,8 +331,8 @@ text_input_set_preferred_language(struct wl_client *client,
wl_list_for_each_safe(input_method, next, &text_input->input_methods, link) {
if (!input_method->context)
continue;
- input_method_context_send_preferred_language(&input_method->context->resource,
- language);
+ wl_input_method_context_send_preferred_language(&input_method->context->resource,
+ language);
}
}
@@ -519,7 +519,7 @@ input_method_context_keysym(struct wl_client *client,
struct input_method_context *context = resource->data;
wl_text_input_send_keysym(&context->model->resource, serial, time,
- sym, state, modifiers);
+ sym, state, modifiers);
}
static void
@@ -657,7 +657,7 @@ input_method_context_text_direction(struct wl_client *client,
}
-static const struct input_method_context_interface input_method_context_implementation = {
+static const struct wl_input_method_context_interface input_method_context_implementation = {
input_method_context_destroy,
input_method_context_commit_string,
input_method_context_preedit_string,
@@ -701,7 +701,7 @@ input_method_context_create(struct text_input *model,
context->resource.destroy = destroy_input_method_context;
context->resource.object.id = 0;
- context->resource.object.interface = &input_method_context_interface;
+ context->resource.object.interface = &wl_input_method_context_interface;
context->resource.object.implementation =
(void (**)(void)) &input_method_context_implementation;
context->resource.data = context;
@@ -713,7 +713,7 @@ input_method_context_create(struct text_input *model,
wl_client_add_resource(input_method->input_method_binding->client, &context->resource);
- input_method_send_activate(input_method->input_method_binding, &context->resource);
+ wl_input_method_send_activate(input_method->input_method_binding, &context->resource);
}
static void
@@ -755,7 +755,7 @@ bind_input_method(struct wl_client *client,
struct text_backend *text_backend = input_method->text_backend;
struct wl_resource *resource;
- resource = wl_client_add_object(client, &input_method_interface,
+ resource = wl_client_add_object(client, &wl_input_method_interface,
NULL,
id, input_method);
@@ -869,9 +869,9 @@ launch_input_method(struct text_backend *text_backend)
return;
text_backend->input_method.client = weston_client_launch(text_backend->compositor,
- &text_backend->input_method.process,
- text_backend->input_method.path,
- handle_input_method_sigchld);
+ &text_backend->input_method.process,
+ text_backend->input_method.path,
+ handle_input_method_sigchld);
if (!text_backend->input_method.client)
weston_log("not able to start %s\n", text_backend->input_method.path);
@@ -898,7 +898,7 @@ handle_seat_created(struct wl_listener *listener,
input_method->input_method_global =
wl_display_add_global(ec->wl_display,
- &input_method_interface,
+ &wl_input_method_interface,
input_method, bind_input_method);
input_method->destroy_listener.notify = input_method_notifier_destroy;
--
1.8.1.4
More information about the wayland-devel
mailing list