aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--legacy/edje/ChangeLog9
-rw-r--r--legacy/edje/src/lib/Edje.h20
-rw-r--r--legacy/edje/src/lib/edje_entry.c23
-rw-r--r--legacy/edje/src/lib/edje_private.h2
-rw-r--r--legacy/edje/src/lib/edje_util.c33
5 files changed, 85 insertions, 2 deletions
diff --git a/legacy/edje/ChangeLog b/legacy/edje/ChangeLog
index f36aacb8e3..183956aefd 100644
--- a/legacy/edje/ChangeLog
+++ b/legacy/edje/ChangeLog
@@ -336,6 +336,11 @@
2012-02-13 Jihoon Kim
* add edje_object_part_text_input_panel_show/hide.
- These APIs can be used in input panel manual control mode
+ These APIs can be used in input panel manual control mode.
* add edje_object_part_text_imf_context_reset that will use
- for reseting the input method context
+ for reseting the input method context.
+
+2012-02-14 Jihoon Kim
+
+ * add edje_object_part_text_prediction_allow_set/get.
+ These APIs can be used to set whether prediction feature is allowed or not.
diff --git a/legacy/edje/src/lib/Edje.h b/legacy/edje/src/lib/Edje.h
index 57dc5a8f52..58d6b4cb4b 100644
--- a/legacy/edje/src/lib/Edje.h
+++ b/legacy/edje/src/lib/Edje.h
@@ -2900,6 +2900,26 @@ EAPI void edje_object_part_text_autocapital_type_set (const Evas_
EAPI Edje_Text_Autocapital_Type edje_object_part_text_autocapital_type_get (const Evas_Object *obj, const char *part);
/**
+ * @brief Set whether the prediction is allowed or not.
+ *
+ * @param obj A valid Evas_Object handle
+ * @param part The part name
+ * @param prediction If true, the prediction feature is allowed.
+ * @since 1.2.0
+ */
+EAPI void edje_object_part_text_prediction_allow_set (const Evas_Object *obj, const char *part, Eina_Bool prediction);
+
+/**
+ * @brief Get whether the prediction is allowed or not.
+ *
+ * @param obj A valid Evas_Object handle
+ * @param part The part name
+ * @return EINA_TRUE if prediction feature is allowed.
+ * @since 1.2.0
+ */
+EAPI Eina_Bool edje_object_part_text_prediction_allow_get (const Evas_Object *obj, const char *part);
+
+/**
* @brief Sets the attribute to show the input panel automatically.
*
* @param obj A valid Evas_Object handle
diff --git a/legacy/edje/src/lib/edje_entry.c b/legacy/edje/src/lib/edje_entry.c
index 5e40bf4c69..a74a8324c8 100644
--- a/legacy/edje/src/lib/edje_entry.c
+++ b/legacy/edje/src/lib/edje_entry.c
@@ -35,6 +35,7 @@ struct _Entry
Eina_Bool select_mod_end : 1;
Eina_Bool had_sel : 1;
Eina_Bool input_panel_enable : 1;
+ Eina_Bool prediction_allow : 1;
#ifdef HAVE_ECORE_IMF
Eina_Bool have_preedit : 1;
@@ -2578,6 +2579,28 @@ _edje_entry_autocapital_type_get(Edje_Real_Part *rp)
}
void
+_edje_entry_prediction_allow_set(Edje_Real_Part *rp, Eina_Bool prediction)
+{
+ Entry *en = rp->entry_data;
+
+ if (!en) return;
+ en->prediction_allow = prediction;
+#ifdef HAVE_ECORE_IMF
+ if (en->imf_context)
+ ecore_imf_context_prediction_allow_set(en->imf_context, prediction);
+#endif
+}
+
+Eina_Bool
+_edje_entry_prediction_allow_get(Edje_Real_Part *rp)
+{
+ Entry *en = rp->entry_data;
+ if (!en) return EINA_FALSE;
+
+ return en->prediction_allow;
+}
+
+void
_edje_entry_input_panel_enabled_set(Edje_Real_Part *rp, Eina_Bool enabled)
{
Entry *en = rp->entry_data;
diff --git a/legacy/edje/src/lib/edje_private.h b/legacy/edje/src/lib/edje_private.h
index 763030ea22..30339b146d 100644
--- a/legacy/edje/src/lib/edje_private.h
+++ b/legacy/edje/src/lib/edje_private.h
@@ -1944,6 +1944,8 @@ void _edje_entry_input_panel_layout_set(Edje_Real_Part *rp, Edje_Input_Panel_Lay
Edje_Input_Panel_Layout _edje_entry_input_panel_layout_get(Edje_Real_Part *rp);
void _edje_entry_autocapital_type_set(Edje_Real_Part *rp, Edje_Text_Autocapital_Type autocapital_type);
Edje_Text_Autocapital_Type _edje_entry_autocapital_type_get(Edje_Real_Part *rp);
+void _edje_entry_prediction_allow_set(Edje_Real_Part *rp, Eina_Bool prediction);
+Eina_Bool _edje_entry_prediction_allow_get(Edje_Real_Part *rp);
void _edje_entry_input_panel_enabled_set(Edje_Real_Part *rp, Eina_Bool enabled);
Eina_Bool _edje_entry_input_panel_enabled_get(Edje_Real_Part *rp);
void _edje_entry_input_panel_show(Edje_Real_Part *rp);
diff --git a/legacy/edje/src/lib/edje_util.c b/legacy/edje/src/lib/edje_util.c
index 321d47ed29..9d58678b33 100644
--- a/legacy/edje/src/lib/edje_util.c
+++ b/legacy/edje/src/lib/edje_util.c
@@ -1860,6 +1860,39 @@ edje_object_part_text_autocapital_type_get(const Evas_Object *obj, const char *p
}
EAPI void
+edje_object_part_text_prediction_allow_set(const Evas_Object *obj, const char *part, Eina_Bool prediction)
+{
+ Edje *ed;
+ Edje_Real_Part *rp;
+
+ ed = _edje_fetch(obj);
+ if ((!ed) || (!part)) return;
+ rp = _edje_real_part_recursive_get(ed, part);
+ if (!rp) return;
+ if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
+ {
+ _edje_entry_prediction_allow_set(rp, prediction);
+ }
+}
+
+EAPI Eina_Bool
+edje_object_part_text_prediction_allow_get(const Evas_Object *obj, const char *part)
+{
+ Edje *ed;
+ Edje_Real_Part *rp;
+
+ ed = _edje_fetch(obj);
+ if ((!ed) || (!part)) return EINA_FALSE;
+ rp = _edje_real_part_recursive_get(ed, part);
+ if (!rp) return EINA_FALSE;
+ if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
+ {
+ return _edje_entry_prediction_allow_get(rp);
+ }
+ return EINA_FALSE;
+}
+
+EAPI void
edje_object_part_text_input_panel_enabled_set(const Evas_Object *obj, const char *part, Eina_Bool enabled)
{
Edje *ed;