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;
}
}
-#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 {