elm_entry: add elm_entry_imf_context_get
authorjihoon <jihoon@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 2 Mar 2012 10:34:58 +0000 (10:34 +0000)
committerjihoon <jihoon@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 2 Mar 2012 10:34:58 +0000 (10:34 +0000)
It provides internal input method context similar to elm_entry_textblock_get()
Note: Do NOT cache the return object.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@68622 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/elm_entry.c
src/lib/elm_entry.h

index a4776fd..2664327 100644 (file)
@@ -3745,3 +3745,12 @@ elm_entry_input_panel_return_key_autoenabled_set(Evas_Object *obj, Eina_Bool ena
    _check_enable_return_key(obj);
 }
 
+EAPI void*
+elm_entry_imf_context_get(Evas_Object *obj)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return NULL;
+
+   return edje_object_part_text_imf_context_get(wd->ent, "elm.text");
+}
index 18f9820..adf3583 100644 (file)
@@ -1395,5 +1395,18 @@ struct _Elm_Entry_Filter_Accept_Set
 EAPI void                   elm_entry_filter_accept_set(void *data, Evas_Object *entry, char **text);
 
 /**
+ * Returns the input method context of the entry.
+ *
+ * This function exposes the internal input method context.
+ *
+ * IMPORTANT: Many functions may change (i.e delete and create a new one)
+ * the internal input method context. Do NOT cache the returned object.
+ *
+ * @param obj The entry object
+ * @return The input method context (Ecore_IMF_Context *) in entry.
+ */
+EAPI void                  *elm_entry_imf_context_get(Evas_Object *obj);
+
+/**
  * @}
  */