diff options
author | Jan Arne Petersen <jpetersen@openismus.com> | 2013-02-19 19:26:55 +0100 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2013-02-20 15:12:34 -0500 |
commit | d5a97ae053b92dd1050a2cd42287d6c7840fe88c (patch) | |
tree | 7f26d956b1f52071b10ffd2dca7df0a2ab960524 | |
parent | a1377cf198844b0f1d3a77f6f98b873c16814fb3 (diff) | |
download | weston-d5a97ae053b92dd1050a2cd42287d6c7840fe88c.tar.gz weston-d5a97ae053b92dd1050a2cd42287d6c7840fe88c.tar.bz2 weston-d5a97ae053b92dd1050a2cd42287d6c7840fe88c.zip |
tests: Fix text-test
Updated to changed text protocol.
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
-rw-r--r-- | tests/text-test.c | 68 |
1 files changed, 40 insertions, 28 deletions
diff --git a/tests/text-test.c b/tests/text-test.c index 8994d105..f5c02ff8 100644 --- a/tests/text-test.c +++ b/tests/text-test.c @@ -34,30 +34,53 @@ struct text_model_state { static void text_model_commit_string(void *data, struct text_model *text_model, - const char *text, - uint32_t index) + uint32_t serial, + const char *text) { } static void text_model_preedit_string(void *data, struct text_model *text_model, + uint32_t serial, const char *text, - uint32_t index) + const char *commit) { } static void text_model_delete_surrounding_text(void *data, struct text_model *text_model, + uint32_t serial, int32_t index, uint32_t length) { } static void +text_model_cursor_position(void *data, + struct text_model *text_model, + uint32_t serial, + int32_t index, + int32_t anchor) +{ +} + +static void text_model_preedit_styling(void *data, - struct text_model *text_model) + struct text_model *text_model, + uint32_t serial, + uint32_t index, + uint32_t length, + uint32_t style) +{ +} + +static void +text_model_preedit_cursor(void *data, + struct text_model *text_model, + uint32_t serial, + int32_t index) { } @@ -80,24 +103,6 @@ text_model_keysym(void *data, } static void -text_model_selection_replacement(void *data, - struct text_model *text_model) -{ -} - -static void -text_model_direction(void *data, - struct text_model *text_model) -{ -} - -static void -text_model_locale(void *data, - struct text_model *text_model) -{ -} - -static void text_model_enter(void *data, struct text_model *text_model, struct wl_surface *surface) @@ -119,18 +124,25 @@ text_model_leave(void *data, state->deactivated += 1; } +static void +text_model_input_panel_state(void *data, + struct text_model *text_model, + uint32_t state) +{ +} + static const struct text_model_listener text_model_listener = { text_model_commit_string, text_model_preedit_string, text_model_delete_surrounding_text, + text_model_cursor_position, text_model_preedit_styling, + text_model_preedit_cursor, text_model_modifiers_map, text_model_keysym, - text_model_selection_replacement, - text_model_direction, - text_model_locale, text_model_enter, - text_model_leave + text_model_leave, + text_model_input_panel_state }; TEST(text_test) @@ -165,7 +177,7 @@ TEST(text_test) assert(client->input->keyboard->focus == client->surface); /* Activate test model and make sure we get enter event. */ - text_model_activate(text_model, client->input->wl_seat, + text_model_activate(text_model, 0, client->input->wl_seat, client->surface->wl_surface); client_roundtrip(client); assert(state.activated == 1 && state.deactivated == 0); @@ -176,7 +188,7 @@ TEST(text_test) assert(state.activated == 1 && state.deactivated == 1); /* Activate test model again. */ - text_model_activate(text_model, client->input->wl_seat, + text_model_activate(text_model, 0, client->input->wl_seat, client->surface->wl_surface); client_roundtrip(client); assert(state.activated == 2 && state.deactivated == 1); |