}
void
-_edje_entry_real_part_init(Edje *ed, Edje_Real_Part *rp)
+_edje_entry_real_part_init(Edje *ed, Edje_Real_Part *rp, Ecore_IMF_Context *ic)
{
Entry *en;
#ifdef HAVE_ECORE_IMF
edje_object_signal_callback_add(ed->obj, "focus,part,in", rp->part->name, _edje_entry_focus_in_cb, rp);
edje_object_signal_callback_add(ed->obj, "focus,part,out", rp->part->name, _edje_entry_focus_out_cb, rp);
- ctx_id = ecore_imf_context_default_id_get();
- if (ctx_id)
+ // TIZEN_ONLY(20131129): Reuse ecore_imf_context when theme is changed
+
+ if (ic)
+ en->imf_context = ic;
+ else
{
- ctx_info = ecore_imf_context_info_by_id_get(ctx_id);
- if (!ctx_info->canvas_type ||
- strcmp(ctx_info->canvas_type, "evas") == 0)
- {
- en->imf_context = ecore_imf_context_add(ctx_id);
- }
- else
+ ctx_id = ecore_imf_context_default_id_get();
+ if (ctx_id)
{
- ctx_id = ecore_imf_context_default_id_by_canvas_type_get("evas");
- if (ctx_id)
+ ctx_info = ecore_imf_context_info_by_id_get(ctx_id);
+ if (!ctx_info->canvas_type ||
+ strcmp(ctx_info->canvas_type, "evas") == 0)
{
en->imf_context = ecore_imf_context_add(ctx_id);
}
+ else
+ {
+ ctx_id = ecore_imf_context_default_id_by_canvas_type_get("evas");
+ if (ctx_id)
+ {
+ en->imf_context = ecore_imf_context_add(ctx_id);
+ }
+ }
}
- }
- else
- en->imf_context = NULL;
+ else
+ en->imf_context = NULL;
- if (!en->imf_context) goto done;
+ if (!en->imf_context) goto done;
+ }
ecore_imf_context_client_window_set
(en->imf_context,
ecore_imf_context_input_panel_language_set(en->imf_context, ECORE_IMF_INPUT_PANEL_LANG_ALPHABET);
#endif
}
+ // TIZEN_ONLY(20131129): Reuse ecore_imf_context when theme is changed
+ else
+ {
+#ifdef HAVE_ECORE_IMF
+ if (ic)
+ ecore_imf_context_del(ic);
+#endif
+ }
+ //
#ifdef HAVE_ECORE_IMF
done:
#endif
}
void
-_edje_entry_real_part_shutdown(Edje *ed, Edje_Real_Part *rp)
+_edje_entry_real_part_shutdown(Edje *ed, Edje_Real_Part *rp, Eina_Bool reuse_ic)
{
Entry *en;
ecore_imf_context_event_callback_del(en->imf_context, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, _edje_entry_imf_event_preedit_changed_cb);
ecore_imf_context_event_callback_del(en->imf_context, ECORE_IMF_CALLBACK_SELECTION_SET, _edje_entry_imf_event_selection_set_cb);
- ecore_imf_context_del(en->imf_context);
- en->imf_context = NULL;
+ // TIZEN_ONLY(20131129): Reuse ecore_imf_context when theme is changed
+ if (!reuse_ic)
+ {
+ ecore_imf_context_del(en->imf_context);
+ en->imf_context = NULL;
+ }
+ //
}
edje_object_signal_callback_del(ed->obj, "focus,part,in", rp->part->name, _edje_entry_focus_in_cb);
unsigned char nested_children_count; /* Number of nested children */
};
+static Eina_List *ic_list = NULL;
+
Evas_Smart *
_edje_smart_nested_smart_class_new(void)
{
}
#endif
- _edje_file_del(ed);
+ _edje_file_del(ed, EINA_TRUE);
eina_stringshare_replace(&ed->path, file ? eina_file_filename_get(file) : NULL);
eina_stringshare_replace(&ed->group, group);
{
ed->table_parts = malloc(sizeof(Edje_Real_Part *) * n);
ed->table_parts_size = n;
+ // TIZEN_ONLY(20131129): Reuse ecore_imf_context when theme is changed
+ Eina_List *l = ic_list;
+
/* FIXME: check malloc return */
n = eina_array_count(&parts) - 1;
while ((rp = eina_array_pop(&parts)))
}
if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
{
- _edje_entry_real_part_init(ed, rp);
+ // TIZEN_ONLY(20131129): Reuse ecore_imf_context when theme is changed
+ Ecore_IMF_Context *ic = NULL;
+ if (l)
+ {
+ ic = l->data;
+ l = eina_list_next(l);
+ }
+ _edje_entry_real_part_init(ed, rp, ic);
+ //
+
if (!ed->has_entries)
ed->has_entries = EINA_TRUE;
}
}
}
+
+ // TIZEN_ONLY(20131129): Reuse ecore_imf_context when theme is changed
+ if (ic_list)
+ ic_list = eina_list_free(ic_list);
+ //
}
_edje_ref(ed);
_edje_util_thaw(ed);
_edje_unblock(ed);
_edje_unref(ed);
- _edje_file_del(ed);
+ _edje_file_del(ed, EINA_FALSE);
if (group_path_started)
{
const char *path;
}
void
-_edje_file_del(Edje *ed)
+_edje_file_del(Edje *ed, Eina_Bool reuse_ic)
{
Edje_User_Defined *eud;
Evas *tev = NULL;
#endif
if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
- _edje_entry_real_part_shutdown(ed, rp);
+ {
+ // TIZEN_ONLY(20131129): Reuse ecore_imf_context when theme is changed
+ if (reuse_ic)
+ {
+ Ecore_IMF_Context *ic = _edje_entry_imf_context_get (rp);
+ ic_list = eina_list_append(ic_list, ic);
+ }
+
+ _edje_entry_real_part_shutdown(ed, rp, reuse_ic);
+ //
+ }
if ((rp->type == EDJE_RP_TYPE_CONTAINER) &&
(rp->typedata.container))
}
_edje_message_del(ed);
_edje_signal_callback_free(ed->callbacks);
- _edje_file_del(ed);
+ _edje_file_del(ed, EINA_FALSE);
if (ed->path) eina_stringshare_del(ed->path);
if (ed->group) eina_stringshare_del(ed->group);
if (ed->parent) eina_stringshare_del(ed->parent);
int _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const char *group, const char *parent, Eina_List *group_path, Eina_Array *nested);
-void _edje_file_del(Edje *ed);
+void _edje_file_del(Edje *ed, Eina_Bool reuse_ic);
void _edje_file_free(Edje_File *edf);
void _edje_file_cache_shutdown(void);
void _edje_collection_free(Edje_File *edf,
void _edje_entry_init(Edje *ed);
void _edje_entry_shutdown(Edje *ed);
-void _edje_entry_real_part_init(Edje *ed, Edje_Real_Part *rp);
-void _edje_entry_real_part_shutdown(Edje *ed, Edje_Real_Part *rp);
+void _edje_entry_real_part_init(Edje *ed, Edje_Real_Part *rp, Ecore_IMF_Context *ic);
+void _edje_entry_real_part_shutdown(Edje *ed, Edje_Real_Part *rp, Eina_Bool reuse_ic);
void _edje_entry_real_part_configure(Edje *ed, Edje_Real_Part *rp);
// TIZEN_ONLY(20150128): Add evas_textblock_cursor_range_text_valid_markup_get API.
const char *_edje_entry_selection_valid_markup_get(Edje_Real_Part *rp);
}
#endif
if (ed->persp) edje_object_perspective_set(obj, NULL);
- _edje_file_del(ed);
+ _edje_file_del(ed, EINA_FALSE);
_edje_clean_objects(ed);
_edje_unref(ed);
_edje_lib_unref();