static sclboolean g_set_mime_type = FALSE;
#endif
-int g_imdata_state = 0;
-
-extern emoticon_group_t current_emoticon_group;
-extern std::vector <int> emoticon_list_recent;
+static int g_imdata_state = 0;
static sclboolean g_need_send_shift_event = FALSE;
#define SOFT_CANDIDATE_DELETE_TIME (100.0/1000)
static Ecore_Timer *g_softcandidate_hide_timer = NULL;
-extern sclboolean g_setting_window_open_status;
-
static int g_ic = 0;
static int g_ic_smartreply = -1;
static CUIEventCallback callback;
+int ise_get_imdata_state()
+{
+ return g_imdata_state;
+}
+
+void ise_set_imdata_state(int state)
+{
+ g_imdata_state = state;
+}
+
static void update_candidate_table()
{
g_softcandidate_string.clear();
if (!strcmp(key_value, USER_KEYSTRING_EMOTICON)) {
ise_init_emoticon_list();
#ifdef _WEARABLE
- current_emoticon_group = EMOTICON_GROUP_1;
+ set_current_emoticon_group(EMOTICON_GROUP_1);
#else
- if (emoticon_list_recent.size() == 0)
- current_emoticon_group = EMOTICON_GROUP_1;
+ if (get_emoticon_list_recent_size() == 0)
+ set_current_emoticon_group(EMOTICON_GROUP_1);
else
- current_emoticon_group = EMOTICON_GROUP_RECENTLY_USED;
+ set_current_emoticon_group(EMOTICON_GROUP_RECENTLY_USED);
#endif
SCLRotation rotation = ui->get_rotation();
- ise_show_emoticon_layout(current_emoticon_group, ROTATION_TO_DEGREE(rotation), false, ime_get_main_window());
+ ise_show_emoticon_layout(get_current_emoticon_group(), ROTATION_TO_DEGREE(rotation), false, ime_get_main_window());
}
}
}
}
#endif
if (strcmp(event_desc.key_value, USER_VOICE_LANGUAGE) == 0) {
- if (!g_setting_window_open_status) {
+ if (!get_setting_window_open_status()) {
ise_hide_stt_mode();
#ifdef _WEARABLE
hide_indicator_window();
}
#ifdef _WEARABLE
emoticon_group_t group_id = EMOTICON_GROUP_1;
- if (current_emoticon_group < EMOTICON_GROUP_3)
- group_id = (emoticon_group_t)(current_emoticon_group + 1);
+ if (get_current_emoticon_group() < EMOTICON_GROUP_3)
+ group_id = (emoticon_group_t)(get_current_emoticon_group() + 1);
ise_set_emoticon_label(group_id);
#else
/* Reset input mode if the input context value has changed */
if (ic != keyboard_state->ic) {
/* Do not reset input mode if STT's setting window was opened */
- if (g_setting_window_open_status && input_mode && strcmp(input_mode, "STT_3X4") == 0) {
+ if (get_setting_window_open_status() && input_mode && strcmp(input_mode, "STT_3X4") == 0) {
LOGD("Setting window was opened while using STT, skip resetting input mode");
} else {
reset_inputmode = TRUE;
/* No matter what, just reset the inputmode if it needs to */
if (keyboard_state->need_reset) {
/* Do not reset input mode if STT's setting window was opened */
- if (g_setting_window_open_status && input_mode && strcmp(input_mode, "STT_3X4") == 0) {
+ if (get_setting_window_open_status() && input_mode && strcmp(input_mode, "STT_3X4") == 0) {
LOGD("Setting window was opened while using STT, skip resetting input mode");
} else {
reset_inputmode = TRUE;
if (keyboard_state->layout == ISE_LAYOUT_STYLE_EMOTICON) {
ise_init_emoticon_list();
#ifdef _WEARABLE
- current_emoticon_group = EMOTICON_GROUP_1;
+ set_current_emoticon_group(EMOTICON_GROUP_1);
ise_set_emoticon_label(1);
#else
- if (emoticon_list_recent.size() == 0)
- current_emoticon_group = EMOTICON_GROUP_1;
+ if (get_emoticon_list_recent_size() == 0)
+ set_current_emoticon_group(EMOTICON_GROUP_1);
else
- current_emoticon_group = EMOTICON_GROUP_RECENTLY_USED;
+ set_current_emoticon_group(EMOTICON_GROUP_RECENTLY_USED);
#endif
SCLRotation rotation = ui->get_rotation();
- ise_show_emoticon_layout(current_emoticon_group, ROTATION_TO_DEGREE(rotation), false, ime_get_main_window());
+ ise_show_emoticon_layout(get_current_emoticon_group(), ROTATION_TO_DEGREE(rotation), false, ime_get_main_window());
}
}
}
}
#endif
- if (g_setting_window_open_status) {
+ if (get_setting_window_open_status()) {
ise_show_stt_mode(NATIVE_WINDOW_CAST(ime_get_main_window()));
}
- g_setting_window_open_status = FALSE;
+ set_setting_window_open_status(FALSE);
if (keyboard_state->layout == ISE_LAYOUT_STYLE_VOICE) {
ise_show_stt_mode(NATIVE_WINDOW_CAST(ime_get_main_window()));
ise_hide_stt_mode();
}
if (keyboard_state->layout == ISE_LAYOUT_STYLE_EMOTICON) {
- ise_show_emoticon_layout(current_emoticon_group, degree, false, ime_get_main_window());
+ ise_show_emoticon_layout(get_current_emoticon_group(), degree, false, ime_get_main_window());
} else if (ui) {
const sclchar *input_mode = ui->get_input_mode();
if (input_mode) {
if (!(strcmp(input_mode, "EMOTICON_LAYOUT")))
- ise_show_emoticon_layout(current_emoticon_group, degree, false, ime_get_main_window());
+ ise_show_emoticon_layout(get_current_emoticon_group(), degree, false, ime_get_main_window());
else if (!(strcmp(input_mode, "STT_3X4")))
ise_show_stt_mode(NATIVE_WINDOW_CAST(ime_get_main_window()));
}