From: InHong Han Date: Fri, 19 Feb 2016 05:35:02 +0000 (+0900) Subject: Add bidi_direction X-Git-Tag: accepted/tizen/common/20160302.194115^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=76d2223e2e820cfcc44fec5f82f1ec9f955526e4;p=platform%2Fcore%2Fuifw%2Fe-mod-tizen-wl-textinput.git Add bidi_direction Change-Id: I07b106cb520bbd78929d269e5fe9b8ac7ac18294 Signed-off-by: InHong Han --- diff --git a/src/e_mod_main.c b/src/e_mod_main.c index d12c511..2262e13 100755 --- a/src/e_mod_main.c +++ b/src/e_mod_main.c @@ -1048,6 +1048,31 @@ _e_text_input_cb_input_panel_data_set(struct wl_client *client EINA_UNUSED, stru } } +static void +_e_text_input_cb_bidi_direction_set(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, uint32_t bidi_direction) +{ + E_Text_Input *text_input = wl_resource_get_user_data(resource); + E_Input_Method *input_method = NULL; + Eina_List *l = NULL; + + if (!text_input) + { + wl_resource_post_error(resource, + WL_DISPLAY_ERROR_INVALID_OBJECT, + "No Text Input For Resource"); + return; + } + + EINA_LIST_FOREACH(text_input->input_methods, l, input_method) + { + if (!input_method || !input_method->context) continue; + + if (input_method->context->resource) + wl_input_method_context_send_bidi_direction(input_method->context->resource, + bidi_direction); + } +} + static const struct wl_text_input_interface _e_text_input_implementation = { _e_text_input_cb_activate, _e_text_input_cb_deactivate, @@ -1062,7 +1087,8 @@ static const struct wl_text_input_interface _e_text_input_implementation = { _e_text_input_cb_action_invoke, _e_text_input_cb_return_key_type_set, _e_text_input_cb_return_key_disabled_set, - _e_text_input_cb_input_panel_data_set + _e_text_input_cb_input_panel_data_set, + _e_text_input_cb_bidi_direction_set }; static void