diff options
author | Jan Arne Petersen <jpetersen@openismus.com> | 2013-04-18 16:47:15 +0200 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2013-05-02 16:21:18 -0400 |
commit | ece6b5af51460c21f5bdd1fae4e7c2ea9f707e2f (patch) | |
tree | d388a5dc9db1f50c5dab8457b43d8988af8d3ba2 /clients | |
parent | f91871980e095caa827f4f39e6c178fc0a2bd396 (diff) | |
download | weston-ece6b5af51460c21f5bdd1fae4e7c2ea9f707e2f.tar.gz weston-ece6b5af51460c21f5bdd1fae4e7c2ea9f707e2f.tar.bz2 weston-ece6b5af51460c21f5bdd1fae4e7c2ea9f707e2f.zip |
text: Add language and text-direction to protocol
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
Diffstat (limited to 'clients')
-rw-r--r-- | clients/editor.c | 20 | ||||
-rw-r--r-- | clients/keyboard.c | 54 | ||||
-rw-r--r-- | clients/weston-simple-im.c | 54 |
3 files changed, 81 insertions, 47 deletions
diff --git a/clients/editor.c b/clients/editor.c index 0de25000..e037c2f9 100644 --- a/clients/editor.c +++ b/clients/editor.c @@ -391,6 +391,22 @@ text_model_input_panel_state(void *data, { } +static void +text_model_language(void *data, + struct text_model *text_model, + uint32_t serial, + const char *language) +{ +} + +static void +text_model_text_direction(void *data, + struct text_model *text_model, + uint32_t serial, + uint32_t direction) +{ +} + static const struct text_model_listener text_model_listener = { text_model_commit_string, text_model_preedit_string, @@ -402,7 +418,9 @@ static const struct text_model_listener text_model_listener = { text_model_keysym, text_model_enter, text_model_leave, - text_model_input_panel_state + text_model_input_panel_state, + text_model_language, + text_model_text_direction }; static struct text_entry* diff --git a/clients/keyboard.c b/clients/keyboard.c index ad34b855..b23de42a 100644 --- a/clients/keyboard.c +++ b/clients/keyboard.c @@ -492,11 +492,11 @@ button_handler(struct widget *widget, } static void -input_method_context_surrounding_text(void *data, - struct input_method_context *context, - const char *text, - uint32_t cursor, - uint32_t anchor) +handle_surrounding_text(void *data, + struct input_method_context *context, + const char *text, + uint32_t cursor, + uint32_t anchor) { struct virtual_keyboard *keyboard = data; @@ -505,9 +505,9 @@ input_method_context_surrounding_text(void *data, } static void -input_method_context_reset(void *data, - struct input_method_context *context, - uint32_t serial) +handle_reset(void *data, + struct input_method_context *context, + uint32_t serial) { struct virtual_keyboard *keyboard = data; @@ -529,10 +529,10 @@ input_method_context_reset(void *data, } static void -input_method_context_content_type(void *data, - struct input_method_context *context, - uint32_t hint, - uint32_t purpose) +handle_content_type(void *data, + struct input_method_context *context, + uint32_t hint, + uint32_t purpose) { struct virtual_keyboard *keyboard = data; @@ -541,10 +541,10 @@ input_method_context_content_type(void *data, } static void -input_method_context_invoke_action(void *data, - struct input_method_context *context, - uint32_t button, - uint32_t index) +handle_invoke_action(void *data, + struct input_method_context *context, + uint32_t button, + uint32_t index) { struct virtual_keyboard *keyboard = data; @@ -555,8 +555,8 @@ input_method_context_invoke_action(void *data, } static void -input_method_context_commit(void *data, - struct input_method_context *context) +handle_commit(void *data, + struct input_method_context *context) { struct virtual_keyboard *keyboard = data; const struct layout *layout; @@ -573,12 +573,20 @@ input_method_context_commit(void *data, widget_schedule_redraw(keyboard->widget); } +static void +handle_preferred_language(void *data, + struct input_method_context *context, + const char *language) +{ +} + static const struct input_method_context_listener input_method_context_listener = { - input_method_context_surrounding_text, - input_method_context_reset, - input_method_context_content_type, - input_method_context_invoke_action, - input_method_context_commit + handle_surrounding_text, + handle_reset, + handle_content_type, + handle_invoke_action, + handle_commit, + handle_preferred_language }; static void diff --git a/clients/weston-simple-im.c b/clients/weston-simple-im.c index e955d3c2..9d31e3b0 100644 --- a/clients/weston-simple-im.c +++ b/clients/weston-simple-im.c @@ -101,19 +101,19 @@ static const uint32_t ignore_keys_on_compose[] = { }; static void -input_method_context_surrounding_text(void *data, - struct input_method_context *context, - const char *text, - uint32_t cursor, - uint32_t anchor) +handle_surrounding_text(void *data, + struct input_method_context *context, + const char *text, + uint32_t cursor, + uint32_t anchor) { fprintf(stderr, "Surrounding text updated: %s\n", text); } static void -input_method_context_reset(void *data, - struct input_method_context *context, - uint32_t serial) +handle_reset(void *data, + struct input_method_context *context, + uint32_t serial) { struct simple_im *keyboard = data; @@ -125,33 +125,41 @@ input_method_context_reset(void *data, } static void -input_method_context_content_type(void *data, - struct input_method_context *context, - uint32_t hint, - uint32_t purpose) +handle_content_type(void *data, + struct input_method_context *context, + uint32_t hint, + uint32_t purpose) { } static void -input_method_context_invoke_action(void *data, - struct input_method_context *context, - uint32_t button, - uint32_t index) +handle_invoke_action(void *data, + struct input_method_context *context, + uint32_t button, + uint32_t index) { } static void -input_method_context_commit(void *data, - struct input_method_context *context) +handle_commit(void *data, + struct input_method_context *context) +{ +} + +static void +handle_preferred_language(void *data, + struct input_method_context *context, + const char *language) { } static const struct input_method_context_listener input_method_context_listener = { - input_method_context_surrounding_text, - input_method_context_reset, - input_method_context_content_type, - input_method_context_invoke_action, - input_method_context_commit + handle_surrounding_text, + handle_reset, + handle_content_type, + handle_invoke_action, + handle_commit, + handle_preferred_language }; static void |