summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJihoon Kim <imfine98@gmail.com>2012-02-23 06:15:12 +0000
committerJihoon Kim <imfine98@gmail.com>2012-02-23 06:15:12 +0000
commitc58edcd114dc95da01bea81d5b4ac69d4d93f89d (patch)
tree1f25b5c159b200e7382ca806fdc64cbb5178b772
parent0a420910766e0785b3e71cf2308ffe9c8b81fb23 (diff)
Add edje_object_part_text_imf_context_get API
This API can be used to get the input method context in entry. SVN revision: 68306
-rw-r--r--legacy/edje/src/lib/Edje.h18
-rw-r--r--legacy/edje/src/lib/edje_entry.c11
-rw-r--r--legacy/edje/src/lib/edje_private.h4
-rw-r--r--legacy/edje/src/lib/edje_util.c20
4 files changed, 51 insertions, 2 deletions
diff --git a/legacy/edje/src/lib/Edje.h b/legacy/edje/src/lib/Edje.h
index 2aa8a05131..1c1621a91a 100644
--- a/legacy/edje/src/lib/Edje.h
+++ b/legacy/edje/src/lib/Edje.h
@@ -452,6 +452,10 @@ param in edje programs
452# undef EAPI 452# undef EAPI
453#endif 453#endif
454 454
455#ifdef HAVE_ECORE_IMF
456#include <Ecore_IMF.h>
457#endif
458
455#ifdef _WIN32 459#ifdef _WIN32
456# ifdef EFL_EDJE_BUILD 460# ifdef EFL_EDJE_BUILD
457# ifdef DLL_EXPORT 461# ifdef DLL_EXPORT
@@ -2869,9 +2873,21 @@ EAPI int edje_object_part_text_cursor_pos_get (const E
2869 */ 2873 */
2870EAPI void edje_object_part_text_imf_context_reset (const Evas_Object *obj, const char *part); 2874EAPI void edje_object_part_text_imf_context_reset (const Evas_Object *obj, const char *part);
2871 2875
2876#ifdef HAVE_ECORE_IMF
2877/**
2878 * @brief Get the input method context in entry.
2879 *
2880 * @param obj A valid Evas_Object handle
2881 * @param part The part name
2882 *
2883 * @return The input method context in entry
2884 */
2885EAPI Ecore_IMF_Context *edje_object_part_text_imf_context_get (const Evas_Object *obj, const char *part);
2886#endif
2887
2872/** 2888/**
2873 * @brief Set the layout of the input panel. 2889 * @brief Set the layout of the input panel.
2874 * 2890 *
2875 * The layout of the input panel or virtual keyboard can make it easier or 2891 * The layout of the input panel or virtual keyboard can make it easier or
2876 * harder to enter content. This allows you to hint what kind of input you 2892 * harder to enter content. This allows you to hint what kind of input you
2877 * are expecting to enter and thus have the input panel automatically 2893 * are expecting to enter and thus have the input panel automatically
diff --git a/legacy/edje/src/lib/edje_entry.c b/legacy/edje/src/lib/edje_entry.c
index 84b69098bf..f28be42a14 100644
--- a/legacy/edje/src/lib/edje_entry.c
+++ b/legacy/edje/src/lib/edje_entry.c
@@ -2553,6 +2553,17 @@ _edje_entry_select_abort(Edje_Real_Part *rp)
2553 } 2553 }
2554} 2554}
2555 2555
2556#ifdef HAVE_ECORE_IMF
2557Ecore_IMF_Context *
2558_edje_entry_imf_context_get(Edje_Real_Part *rp)
2559{
2560 Entry *en = rp->entry_data;
2561 if (!en) return NULL;
2562
2563 return en->imf_context;
2564}
2565#endif
2566
2556void 2567void
2557_edje_entry_autocapital_type_set(Edje_Real_Part *rp, Edje_Text_Autocapital_Type autocapital_type) 2568_edje_entry_autocapital_type_set(Edje_Real_Part *rp, Edje_Text_Autocapital_Type autocapital_type)
2558{ 2569{
diff --git a/legacy/edje/src/lib/edje_private.h b/legacy/edje/src/lib/edje_private.h
index d9d578c6f0..9a4112f416 100644
--- a/legacy/edje/src/lib/edje_private.h
+++ b/legacy/edje/src/lib/edje_private.h
@@ -1940,7 +1940,9 @@ void _edje_entry_cursor_geometry_get(Edje_Real_Part *rp, Evas_Coord *cx, Evas_Co
1940void _edje_entry_select_allow_set(Edje_Real_Part *rp, Eina_Bool allow); 1940void _edje_entry_select_allow_set(Edje_Real_Part *rp, Eina_Bool allow);
1941Eina_Bool _edje_entry_select_allow_get(const Edje_Real_Part *rp); 1941Eina_Bool _edje_entry_select_allow_get(const Edje_Real_Part *rp);
1942void _edje_entry_select_abort(Edje_Real_Part *rp); 1942void _edje_entry_select_abort(Edje_Real_Part *rp);
1943 1943#ifdef HAVE_ECORE_IMF
1944Ecore_IMF_Context *_edje_entry_imf_context_get(Edje_Real_Part *rp);
1945#endif
1944Eina_Bool _edje_entry_cursor_next(Edje_Real_Part *rp, Edje_Cursor cur); 1946Eina_Bool _edje_entry_cursor_next(Edje_Real_Part *rp, Edje_Cursor cur);
1945Eina_Bool _edje_entry_cursor_prev(Edje_Real_Part *rp, Edje_Cursor cur); 1947Eina_Bool _edje_entry_cursor_prev(Edje_Real_Part *rp, Edje_Cursor cur);
1946Eina_Bool _edje_entry_cursor_up(Edje_Real_Part *rp, Edje_Cursor cur); 1948Eina_Bool _edje_entry_cursor_up(Edje_Real_Part *rp, Edje_Cursor cur);
diff --git a/legacy/edje/src/lib/edje_util.c b/legacy/edje/src/lib/edje_util.c
index 6750b5b831..a248764b0b 100644
--- a/legacy/edje/src/lib/edje_util.c
+++ b/legacy/edje/src/lib/edje_util.c
@@ -1527,6 +1527,26 @@ edje_object_part_text_select_extend(const Evas_Object *obj, const char *part)
1527 _edje_entry_select_extend(rp); 1527 _edje_entry_select_extend(rp);
1528} 1528}
1529 1529
1530#ifdef HAVE_ECORE_IMF
1531EAPI Ecore_IMF_Context *
1532edje_object_part_text_imf_context_get(const Evas_Object *obj, const char *part)
1533{
1534 Edje *ed;
1535 Edje_Real_Part *rp;
1536
1537 ed = _edje_fetch(obj);
1538 if ((!ed) || (!part)) return NULL;
1539
1540 rp = _edje_real_part_recursive_get(ed, (char *)part);
1541 if (!rp) return NULL;
1542
1543 if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
1544 return _edje_entry_imf_context_get(rp);
1545 else
1546 return NULL;
1547}
1548#endif
1549
1530EAPI Eina_Bool 1550EAPI Eina_Bool
1531edje_object_part_text_cursor_next(Evas_Object *obj, const char *part, Edje_Cursor cur) 1551edje_object_part_text_cursor_next(Evas_Object *obj, const char *part, Edje_Cursor cur)
1532{ 1552{