From: Jihoon Kim Date: Wed, 8 Feb 2017 02:08:45 +0000 (+0900) Subject: Merge branch 'tizen_3.0' into tizen X-Git-Tag: submit/tizen/20170208.102507^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e7e335e889a6d07e4f54233fa056801e28daf5f2;p=platform%2Fcore%2Fapi%2Finputmethod.git Merge branch 'tizen_3.0' into tizen Change-Id: I3cce9fe4e1789d52474a43062bd7cac52d4f290f --- e7e335e889a6d07e4f54233fa056801e28daf5f2 diff --cc src/inputmethod.cpp index 27071c1,ac1b49c..decff5a --- a/src/inputmethod.cpp +++ b/src/inputmethod.cpp @@@ -58,7 -62,13 +62,11 @@@ class CCoreEventCallback : public ISCLC void on_create_option_window(sclwindow window, SCLOptionWindowType type); void on_destroy_option_window(sclwindow window); void on_check_option_window_availability(sclboolean *ret); + void on_set_caps_mode(sclu32 mode); + void on_candidate_show(sclint ic, const sclchar *ic_uuid); + void on_candidate_hide(sclint ic, const sclchar *ic_uuid); + void on_update_lookup_table(SclCandidateTable &table); -#ifdef TIZEN_WEARABLE void on_process_input_device_event(sclu32 &type, sclchar *data, size_t &len, sclu32 *ret); -#endif }; typedef struct @@@ -82,7 -92,13 +90,11 @@@ ime_accessibility_state_changed_cb accessibility_state_changed; /**< Called when Accessibility in Settings application is on or off */ ime_option_window_created_cb option_window_created; /**< Called to create the option window */ ime_option_window_destroyed_cb option_window_destroyed; /**< Called to destroy the option window */ + ime_caps_mode_changed_cb caps_mode_changed; + ime_candidate_show_cb candidate_show; + ime_candidate_hide_cb candidate_hide; + ime_lookup_table_changed_cb lookup_table_changed; -#ifdef TIZEN_WEARABLE ime_process_input_device_event_cb process_input_device_event; /**< Called when the event is received from the unconventional input devices */ -#endif void *focus_in_user_data; void *focus_out_user_data; void *surrounding_text_updated_user_data; @@@ -102,9 -118,16 +114,13 @@@ void *accessibility_state_changed_user_data; void *option_window_created_user_data; void *option_window_destroyed_user_data; + void *caps_mode_changed_user_data; + void *candidate_show_user_data; + void *candidate_hide_user_data; + void *lookup_table_changed_user_data; -#ifdef TIZEN_WEARABLE void *process_input_device_event_user_data; -#endif } ime_event_callback_s; -#ifdef TIZEN_WEARABLE typedef struct { ime_input_device_type_e device_type; void *event_data; @@@ -350,6 -375,42 +367,41 @@@ void CCoreEventCallback::on_check_optio } } + void CCoreEventCallback::on_set_caps_mode(sclu32 mode) + { + if (g_event_callback.caps_mode_changed) { + g_event_callback.caps_mode_changed(mode, g_event_callback.caps_mode_changed_user_data); + } + } + + void CCoreEventCallback::on_candidate_show(sclint ic, const sclchar *ic_uuid) + { + if (g_event_callback.candidate_show) { + g_event_callback.candidate_show(ic, g_event_callback.candidate_show_user_data); + } + } + + void CCoreEventCallback::on_candidate_hide(sclint ic, const sclchar *ic_uuid) + { + if (g_event_callback.candidate_hide) { + g_event_callback.candidate_hide(ic, g_event_callback.candidate_hide_user_data); + } + } + + void CCoreEventCallback::on_update_lookup_table(SclCandidateTable &table) + { + Eina_List *string_list = NULL; + + if (g_event_callback.lookup_table_changed) { + vector::iterator iter = table.candidate.begin(); + for (; iter != table.candidate.end(); ++iter) { + string_list = eina_list_append(string_list, strdup(iter->c_str())); + } + + g_event_callback.lookup_table_changed(string_list, g_event_callback.lookup_table_changed_user_data); + } + } + -#ifdef TIZEN_WEARABLE void CCoreEventCallback::on_process_input_device_event(sclu32 &type, sclchar *data, size_t &len, sclu32 *ret) { typedef struct {