static void test_input_panel_layout_set (void *data, Evas_Object *obj, void *event_info);
static void test_input_panel_layout_get (void *data, Evas_Object *obj, void *event_info);
static void test_input_panel_state_get (void *data, Evas_Object *obj, void *event_info);
+static void test_input_panel_language_locale_get (void *data, Evas_Object *obj, void *event_info);
static void test_get_active_ise (void *data, Evas_Object *obj, void *event_info);
static void test_get_ise_list (void *data, Evas_Object *obj, void *event_info);
static void test_get_ise_info (void *data, Evas_Object *obj, void *event_info);
{ "INPUT PANEL LAYOUT SET", test_input_panel_layout_set },
{ "INPUT PANEL LAYOUT GET", test_input_panel_layout_get },
{ "INPUT PANEL STATE GET", test_input_panel_state_get },
+ { "LANGUAGE LOCALE GET", test_input_panel_language_locale_get },
{ "GET ACTIVE ISE", test_get_active_ise },
{ "GET ACTIVE ISE INFO", test_get_ise_info },
{ "GET INITIAL ISE", test_get_initial_ise },
}
}
+static void test_input_panel_language_locale_get (void *data, Evas_Object *obj, void *event_info)
+{
+ char *locale = NULL;
+
+ if (imf_context != NULL) {
+ ecore_imf_context_input_panel_language_locale_get (imf_context, &locale);
+ LOGD ("locale : %s\n", locale);
+ }
+
+ if (locale)
+ free (locale);
+}
+
static void test_get_active_ise (void *data, Evas_Object *obj, void *event_info)
{
char *uuid = NULL;
if (it)
elm_genlist_item_selected_set (it, EINA_FALSE);
- imcontrol_menu_its[j].func (NULL, obj, event_info);
+ if (imcontrol_menu_its[j].func)
+ imcontrol_menu_its[j].func (NULL, obj, event_info);
}
static Eina_Bool _nf_back_event_cb (void *data, Elm_Object_Item *it)
if (wsc->surrounding_text)
LOGD ("Surrounding text updated: %s", wsc->surrounding_text);
- if(wsc->language)
+ if (wsc->language)
wl_input_method_context_language (im_ctx, wsc->serial, wsc->language);
wl_input_method_context_text_direction (im_ctx, wsc->serial, wsc->text_direction);
wsc->keyboard = wl_input_method_context_grab_keyboard(im_ctx);
wl_keyboard_add_listener(wsc->keyboard, &wsc_im_keyboard_listener, wsc);
+ if (wsc->language)
+ wl_input_method_context_language (im_ctx, wsc->serial, wsc->language);
+
+ wl_input_method_context_text_direction (im_ctx, wsc->serial, wsc->text_direction);
+
wsc->context_changed = EINA_TRUE;
isf_wsc_context_focus_in (wsc->wsc_ctx);
isf_wsc_context_input_panel_show (wsc->wsc_ctx);
wsc->wsc_ctx = NULL;
}
- isf_wsc_context_shutdown ();
-
if (wsc->preedit_str) {
free (wsc->preedit_str);
wsc->preedit_str = NULL;
free (wsc->surrounding_text);
wsc->surrounding_text = NULL;
}
+
+ if (wsc->language) {
+ free (wsc->language);
+ wsc->language = NULL;
+ }
+
+ isf_wsc_context_shutdown ();
}
int main (int argc EINA_UNUSED, char **argv EINA_UNUSED)