From ebc6ee9cf34b1a7538ea416112c60931ad3230b5 Mon Sep 17 00:00:00 2001 From: WooHyun Jung Date: Fri, 9 Mar 2012 18:07:25 +0900 Subject: [PATCH] [Entry] magnifier codes are added again --- src/lib/elm_entry.c | 30 ++++++++++++++++++++++++++++++ src/lib/elm_entry.h | 18 ++++++++++++++++++ 2 files changed, 48 insertions(+) diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c index 1434bca..f6833d2 100644 --- a/src/lib/elm_entry.c +++ b/src/lib/elm_entry.c @@ -4605,3 +4605,33 @@ _entry_hover_anchor_clicked(void *data, Evas_Object *obj, void *event_info) evas_object_show(wd->anchor_hover.hover); } /* END - ANCHOR HOVER */ + +EAPI void +elm_entry_magnifier_disabled_set(Evas_Object *obj, Eina_Bool disabled) +{ + ELM_CHECK_WIDTYPE(obj, widtype); + Widget_Data *wd = elm_widget_data_get(obj); + if (!wd) return; + if (wd->magnifier_enabled == !disabled) return; + wd->magnifier_enabled = !disabled; +} + +EAPI Eina_Bool +elm_entry_magnifier_disabled_get(const Evas_Object *obj) +{ + ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE; + Widget_Data *wd = elm_widget_data_get(obj); + if (!wd) return EINA_FALSE; + return !wd->magnifier_enabled; +} + +EAPI void +elm_entry_magnifier_type_set(Evas_Object *obj, int type) +{ + ELM_CHECK_WIDTYPE(obj, widtype); + Widget_Data *wd = elm_widget_data_get(obj); + if (!wd) return; + + wd->mgf_type = type; + _magnifier_create(obj); +} diff --git a/src/lib/elm_entry.h b/src/lib/elm_entry.h index 311d2bd..1743c57 100644 --- a/src/lib/elm_entry.h +++ b/src/lib/elm_entry.h @@ -1550,5 +1550,23 @@ EAPI const char *elm_entry_anchor_hover_style_get(const Evas_Obj EAPI void elm_entry_anchor_hover_end(Evas_Object *obj); /** + * This disables the entry's magnifer feature. + * + * @param obj The entry object + * @param disabled If true, the magnifier is not displayed + */ + +EAPI void elm_entry_magnifier_disabled_set(Evas_Object *obj, Eina_Bool disabled); +/** + * This returns whether the entry's magnifier feature is disabled. + * + * @param obj The entry object + * @return If true, the feature is disabled + */ +EAPI Eina_Bool elm_entry_magnifier_disabled_get(const Evas_Object *obj); + +EAPI void elm_entry_magnifier_type_set(Evas_Object *obj, int type); + +/** * @} */ -- 2.7.4