summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJan Arne Petersen <jpetersen@openismus.com>2013-04-18 16:47:36 +0200
committerKristian Høgsberg <krh@bitplanet.net>2013-05-02 17:06:27 -0400
commit62ece76b1e519b5356dfb6eaba260872a3c96bdf (patch)
tree552677ead3e7cb3056866d0a1a12ff71d3c75329 /tests
parent8f2f764c0c5f5c50de1fb26bf2f95655c2bad3cf (diff)
text: Rename text_input to wl_text_input
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/text-test.c50
1 files changed, 25 insertions, 25 deletions
diff --git a/tests/text-test.c b/tests/text-test.c
index d8ffc381..48f2b5a6 100644
--- a/tests/text-test.c
+++ b/tests/text-test.c
@@ -33,7 +33,7 @@ struct text_input_state {
static void
text_input_commit_string(void *data,
- struct text_input *text_input,
+ struct wl_text_input *text_input,
uint32_t serial,
const char *text)
{
@@ -41,7 +41,7 @@ text_input_commit_string(void *data,
static void
text_input_preedit_string(void *data,
- struct text_input *text_input,
+ struct wl_text_input *text_input,
uint32_t serial,
const char *text,
const char *commit)
@@ -50,7 +50,7 @@ text_input_preedit_string(void *data,
static void
text_input_delete_surrounding_text(void *data,
- struct text_input *text_input,
+ struct wl_text_input *text_input,
int32_t index,
uint32_t length)
{
@@ -58,7 +58,7 @@ text_input_delete_surrounding_text(void *data,
static void
text_input_cursor_position(void *data,
- struct text_input *text_input,
+ struct wl_text_input *text_input,
int32_t index,
int32_t anchor)
{
@@ -66,7 +66,7 @@ text_input_cursor_position(void *data,
static void
text_input_preedit_styling(void *data,
- struct text_input *text_input,
+ struct wl_text_input *text_input,
uint32_t index,
uint32_t length,
uint32_t style)
@@ -75,21 +75,21 @@ text_input_preedit_styling(void *data,
static void
text_input_preedit_cursor(void *data,
- struct text_input *text_input,
+ struct wl_text_input *text_input,
int32_t index)
{
}
static void
text_input_modifiers_map(void *data,
- struct text_input *text_input,
+ struct wl_text_input *text_input,
struct wl_array *map)
{
}
static void
text_input_keysym(void *data,
- struct text_input *text_input,
+ struct wl_text_input *text_input,
uint32_t serial,
uint32_t time,
uint32_t sym,
@@ -100,7 +100,7 @@ text_input_keysym(void *data,
static void
text_input_enter(void *data,
- struct text_input *text_input,
+ struct wl_text_input *text_input,
struct wl_surface *surface)
{
@@ -113,7 +113,7 @@ text_input_enter(void *data,
static void
text_input_leave(void *data,
- struct text_input *text_input)
+ struct wl_text_input *text_input)
{
struct text_input_state *state = data;
@@ -122,14 +122,14 @@ text_input_leave(void *data,
static void
text_input_input_panel_state(void *data,
- struct text_input *text_input,
+ struct wl_text_input *text_input,
uint32_t state)
{
}
static void
text_input_language(void *data,
- struct text_input *text_input,
+ struct wl_text_input *text_input,
uint32_t serial,
const char *language)
{
@@ -137,13 +137,13 @@ text_input_language(void *data,
static void
text_input_text_direction(void *data,
- struct text_input *text_input,
+ struct wl_text_input *text_input,
uint32_t serial,
uint32_t direction)
{
}
-static const struct text_input_listener text_input_listener = {
+static const struct wl_text_input_listener text_input_listener = {
text_input_enter,
text_input_leave,
text_input_modifiers_map,
@@ -163,8 +163,8 @@ TEST(text_test)
{
struct client *client;
struct global *global;
- struct text_input_manager *factory;
- struct text_input *text_input;
+ struct wl_text_input_manager *factory;
+ struct wl_text_input *text_input;
struct text_input_state state;
client = client_create(100, 100, 100, 100);
@@ -172,17 +172,17 @@ TEST(text_test)
factory = NULL;
wl_list_for_each(global, &client->global_list, link) {
- if (strcmp(global->interface, "text_input_manager") == 0)
+ if (strcmp(global->interface, "wl_text_input_manager") == 0)
factory = wl_registry_bind(client->wl_registry,
global->name,
- &text_input_manager_interface, 1);
+ &wl_text_input_manager_interface, 1);
}
assert(factory);
memset(&state, 0, sizeof state);
- text_input = text_input_manager_create_text_input(factory);
- text_input_add_listener(text_input, &text_input_listener, &state);
+ text_input = wl_text_input_manager_create_text_input(factory);
+ wl_text_input_add_listener(text_input, &text_input_listener, &state);
/* Make sure our test surface has keyboard focus. */
wl_test_activate_surface(client->test->wl_test,
@@ -191,19 +191,19 @@ TEST(text_test)
assert(client->input->keyboard->focus == client->surface);
/* Activate test model and make sure we get enter event. */
- text_input_activate(text_input, client->input->wl_seat,
- client->surface->wl_surface);
+ wl_text_input_activate(text_input, client->input->wl_seat,
+ client->surface->wl_surface);
client_roundtrip(client);
assert(state.activated == 1 && state.deactivated == 0);
/* Deactivate test model and make sure we get leave event. */
- text_input_deactivate(text_input, client->input->wl_seat);
+ wl_text_input_deactivate(text_input, client->input->wl_seat);
client_roundtrip(client);
assert(state.activated == 1 && state.deactivated == 1);
/* Activate test model again. */
- text_input_activate(text_input, client->input->wl_seat,
- client->surface->wl_surface);
+ wl_text_input_activate(text_input, client->input->wl_seat,
+ client->surface->wl_surface);
client_roundtrip(client);
assert(state.activated == 2 && state.deactivated == 1);