Merge branch 'tizen_3.0' into tizen 87/113487/1 accepted/tizen/common/20170208.155314 submit/tizen/20170208.102507
authorJihoon Kim <jihoon48.kim@samsung.com>
Wed, 8 Feb 2017 02:08:45 +0000 (11:08 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Wed, 8 Feb 2017 02:08:45 +0000 (11:08 +0900)
Change-Id: I3cce9fe4e1789d52474a43062bd7cac52d4f290f

1  2 
packaging/capi-ui-inputmethod.spec
src/inputmethod.cpp

Simple merge
@@@ -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);
 -#ifdef TIZEN_WEARABLE
+     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);
      void on_process_input_device_event(sclu32 &type, sclchar *data, size_t &len, sclu32 *ret);
 -#endif
  };
  
  typedef struct
      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 */
 -#ifdef TIZEN_WEARABLE
+     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;
      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;
      void *accessibility_state_changed_user_data;
      void *option_window_created_user_data;
      void *option_window_destroyed_user_data;
 -#ifdef TIZEN_WEARABLE
+     void *caps_mode_changed_user_data;
+     void *candidate_show_user_data;
+     void *candidate_hide_user_data;
+     void *lookup_table_changed_user_data;
      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
      }
  }
  
 -#ifdef TIZEN_WEARABLE
+ 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<string>::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);
+     }
+ }
  void CCoreEventCallback::on_process_input_device_event(sclu32 &type, sclchar *data, size_t &len, sclu32 *ret)
  {
      typedef struct {