summaryrefslogtreecommitdiff
path: root/src/text-backend.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2013-04-18 15:25:39 -0400
committerKristian Høgsberg <krh@bitplanet.net>2013-05-06 21:40:36 -0400
commit29139d4a45c433fc11a0dcad9fea17916464ec17 (patch)
tree14658bb5c475520de1962efe63fee6d38a1eea92 /src/text-backend.c
parent2158a889a1b06140d327e1da0873e0b6a4cfaca6 (diff)
fold wl_keyboard into weston_keyboard
Diffstat (limited to 'src/text-backend.c')
-rw-r--r--src/text-backend.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/text-backend.c b/src/text-backend.c
index 02e4d6fc..3037fe8c 100644
--- a/src/text-backend.c
+++ b/src/text-backend.c
@@ -527,10 +527,10 @@ unbind_keyboard(struct wl_resource *resource)
}
static void
-input_method_context_grab_key(struct wl_keyboard_grab *grab,
+input_method_context_grab_key(struct weston_keyboard_grab *grab,
uint32_t time, uint32_t key, uint32_t state_w)
{
- struct weston_keyboard *keyboard = (struct weston_keyboard *)grab->keyboard;
+ struct weston_keyboard *keyboard = grab->keyboard;
struct wl_display *display;
uint32_t serial;
@@ -544,11 +544,11 @@ input_method_context_grab_key(struct wl_keyboard_grab *grab,
}
static void
-input_method_context_grab_modifier(struct wl_keyboard_grab *grab, uint32_t serial,
+input_method_context_grab_modifier(struct weston_keyboard_grab *grab, uint32_t serial,
uint32_t mods_depressed, uint32_t mods_latched,
uint32_t mods_locked, uint32_t group)
{
- struct weston_keyboard *keyboard = (struct weston_keyboard *)grab->keyboard;
+ struct weston_keyboard *keyboard = grab->keyboard;
if (!keyboard->input_method_resource)
return;
@@ -558,7 +558,7 @@ input_method_context_grab_modifier(struct wl_keyboard_grab *grab, uint32_t seria
mods_locked, group);
}
-static const struct wl_keyboard_grab_interface input_method_context_grab = {
+static const struct weston_keyboard_grab_interface input_method_context_grab = {
input_method_context_grab_key,
input_method_context_grab_modifier,
};
@@ -583,10 +583,10 @@ input_method_context_grab_keyboard(struct wl_client *client,
seat->xkb_info.keymap_fd,
seat->xkb_info.keymap_size);
- if (keyboard->keyboard.grab != &keyboard->keyboard.default_grab) {
- wl_keyboard_end_grab(&keyboard->keyboard);
+ if (keyboard->grab != &keyboard->default_grab) {
+ weston_keyboard_end_grab(keyboard);
}
- wl_keyboard_start_grab(&keyboard->keyboard, &keyboard->input_method_grab);
+ weston_keyboard_start_grab(keyboard, &keyboard->input_method_grab);
keyboard->input_method_resource = cr;
}
@@ -600,8 +600,8 @@ input_method_context_key(struct wl_client *client,
{
struct input_method_context *context = resource->data;
struct weston_seat *seat = context->input_method->seat;
- struct wl_keyboard *keyboard = seat->seat.keyboard;
- struct wl_keyboard_grab *default_grab = &keyboard->default_grab;
+ struct weston_keyboard *keyboard = seat->seat.keyboard;
+ struct weston_keyboard_grab *default_grab = &keyboard->default_grab;
default_grab->interface->key(default_grab, time, key, state_w);
}
@@ -618,8 +618,8 @@ input_method_context_modifiers(struct wl_client *client,
struct input_method_context *context = resource->data;
struct weston_seat *seat = context->input_method->seat;
- struct wl_keyboard *keyboard = seat->seat.keyboard;
- struct wl_keyboard_grab *default_grab = &keyboard->default_grab;
+ struct weston_keyboard *keyboard = seat->seat.keyboard;
+ struct weston_keyboard_grab *default_grab = &keyboard->default_grab;
default_grab->interface->modifiers(default_grab,
serial, mods_depressed,
@@ -712,14 +712,14 @@ input_method_context_create(struct text_input *model,
static void
input_method_context_end_keyboard_grab(struct input_method_context *context)
{
- struct wl_keyboard_grab *grab = &context->input_method->seat->keyboard.input_method_grab;
- struct weston_keyboard *keyboard = (struct weston_keyboard *)grab->keyboard;
+ struct weston_keyboard_grab *grab = &context->input_method->seat->keyboard.input_method_grab;
+ struct weston_keyboard *keyboard = grab->keyboard;
if (!grab->keyboard)
return;
if (grab->keyboard->grab == grab)
- wl_keyboard_end_grab(grab->keyboard);
+ weston_keyboard_end_grab(grab->keyboard);
keyboard->input_method_resource = NULL;
}
@@ -790,7 +790,7 @@ input_method_notifier_destroy(struct wl_listener *listener, void *data)
static void
handle_keyboard_focus(struct wl_listener *listener, void *data)
{
- struct wl_keyboard *keyboard = data;
+ struct weston_keyboard *keyboard = data;
struct input_method *input_method =
container_of(listener, struct input_method, keyboard_focus_listener);
struct wl_surface *surface = keyboard->focus;