elm_entry: add 'const' in some getter functions
authorjihoon <jihoon@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 15 Feb 2012 11:50:06 +0000 (11:50 +0000)
committerJihoon Kim <jihoon48.kim@samsung.com>
Tue, 21 Feb 2012 06:47:30 +0000 (15:47 +0900)
Change-Id: Iaba1d2dee9413bdae72741468c3c38e1a5be4689
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@67979 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

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

index a40539a..b182ec3 100644 (file)
@@ -4346,7 +4346,7 @@ elm_entry_input_panel_layout_set(Evas_Object *obj, Elm_Input_Panel_Layout layout
 }
 
 EAPI Elm_Input_Panel_Layout
-elm_entry_input_panel_layout_get(Evas_Object *obj)
+elm_entry_input_panel_layout_get(const Evas_Object *obj)
 {
    ELM_CHECK_WIDTYPE(obj, widtype) ELM_INPUT_PANEL_LAYOUT_INVALID;
    Widget_Data *wd = elm_widget_data_get(obj);
@@ -4367,7 +4367,7 @@ elm_entry_autocapital_type_set(Evas_Object *obj, Elm_Autocapital_Type autocapita
 }
 
 EAPI Elm_Autocapital_Type
-elm_entry_autocapital_type_get(Evas_Object *obj)
+elm_entry_autocapital_type_get(const Evas_Object *obj)
 {
    ELM_CHECK_WIDTYPE(obj, widtype) ELM_AUTOCAPITAL_TYPE_NONE;
    Widget_Data *wd = elm_widget_data_get(obj);
@@ -4377,6 +4377,27 @@ elm_entry_autocapital_type_get(Evas_Object *obj)
 }
 
 EAPI void
+elm_entry_prediction_allow_set(Evas_Object *obj, Eina_Bool prediction)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype);
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return;
+
+   wd->prediction_allow = prediction;
+   edje_object_part_text_prediction_allow_set(wd->ent, "elm.text", prediction);
+}
+
+EAPI Eina_Bool
+elm_entry_prediction_allow_get(const Evas_Object *obj)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype) EINA_TRUE;
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return EINA_TRUE;
+
+   return wd->prediction_allow;
+}
+
+EAPI void
 elm_entry_imf_context_reset(Evas_Object *obj)
 {
    ELM_CHECK_WIDTYPE(obj, widtype);
@@ -4398,7 +4419,7 @@ elm_entry_input_panel_enabled_set(Evas_Object *obj, Eina_Bool enabled)
 }
 
 EAPI Eina_Bool
-elm_entry_input_panel_enabled_get(Evas_Object *obj)
+elm_entry_input_panel_enabled_get(const Evas_Object *obj)
 {
    ELM_CHECK_WIDTYPE(obj, widtype) EINA_TRUE;
    Widget_Data *wd = elm_widget_data_get(obj);
index 6eb677e..7b7ccf8 100644 (file)
@@ -1165,7 +1165,7 @@ EAPI void                   elm_entry_input_panel_layout_set(Evas_Object *obj, E
  *
  * @see elm_entry_input_panel_layout_set
  */
-EAPI Elm_Input_Panel_Layout elm_entry_input_panel_layout_get(Evas_Object *obj);
+EAPI Elm_Input_Panel_Layout elm_entry_input_panel_layout_get(const Evas_Object *obj);
 
 /**
  * Set the autocapitalization type on the immodule.
@@ -1181,7 +1181,7 @@ EAPI void                   elm_entry_autocapital_type_set(Evas_Object *obj, Elm
  * @param obj The entry object
  * @return autocapitalization type
  */
-EAPI Elm_Autocapital_Type   elm_entry_autocapital_type_get(Evas_Object *obj);
+EAPI Elm_Autocapital_Type   elm_entry_autocapital_type_get(const Evas_Object *obj);
 
 /**
  * Sets the attribute to show the input panel automatically.
@@ -1197,7 +1197,7 @@ EAPI void                   elm_entry_input_panel_enabled_set(Evas_Object *obj,
  * @param obj The entry object
  * @return EINA_TRUE if input panel will be appeared when the entry is clicked or has a focus, EINA_FALSE otherwise
  */
-EAPI Eina_Bool              elm_entry_input_panel_enabled_get(Evas_Object *obj);
+EAPI Eina_Bool              elm_entry_input_panel_enabled_get(const Evas_Object *obj);
 
 /**
  * Show the input panel (virtual keyboard) based on the input panel property of entry such as layout, autocapital types, and so on.
@@ -1308,6 +1308,22 @@ EAPI Eina_Bool              elm_entry_input_panel_return_key_disabled_get(const
  */
 EAPI void                   elm_entry_imf_context_reset(Evas_Object *obj);
 
+/**
+ * Set whether the entry should allow to use the text prediction.
+ *
+ * @param obj The entry object
+ * @param prediction Whether the entry should allow to use the text prediction.
+ */
+EAPI void                   elm_entry_prediction_allow_set(Evas_Object *obj, Eina_Bool prediction);
+
+/**
+ * Get whether the entry should allow to use the text prediction.
+ *
+ * @param obj The entry object
+ * @return EINA_TRUE if it allows to use the text prediction, otherwise EINA_FALSE.
+ */
+EAPI Eina_Bool              elm_entry_prediction_allow_get(const Evas_Object *obj);
+
 /* pre-made filters for entries */
 
 /**