From: Carsten Haitzler Date: Thu, 25 Aug 2011 07:00:39 +0000 (+0000) Subject: Please find the Attached patch for Password show last feature's set,get APIs. X-Git-Tag: v1.0.0~2164 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=769d6526c210e7e348c72ddda6a20efda5384a78;p=platform%2Fupstream%2Felementary.git Please find the Attached patch for Password show last feature's set,get APIs. Using these APIs of elm_main.c, password last show feature can be enabled or disabled and the time out value for which character will be visible before being masked also can be manipulated. Change description as given below. "Change Descritption" Four APIs have been added to elementary in order to manipulate the global settings of show last feature of password mode of entry widget. The settings include 1. enable/disable the show_last feature [ set and get API ]. 2. Manipulate the time out value [ set and get API ]. SVN revision: 62781 --- diff --git a/src/lib/Elementary.h.in b/src/lib/Elementary.h.in index c176178..debe4d2 100644 --- a/src/lib/Elementary.h.in +++ b/src/lib/Elementary.h.in @@ -1401,6 +1401,64 @@ extern "C" { EAPI double elm_object_scale_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); /** + * @defgroup Password_last_show Password last input show + * + * Last show feature of password mode enables user to view + * the last input entered for few seconds before masking it. + * These functions allow to set this feature in password mode + * of entry widget and also allow to manipulate the duration + * for which the input has to be visible. + * + * @{ + */ + + /** + * Get show last setting of password mode. + * + * This gets the show last input setting of password mode which might be + * enabled or disabled. + * + * @return @c EINA_TRUE, if the last input show setting is enabled, @c EINA_FALSE + * if it's disabled. + * @ingroup Password_last_show + */ + EAPI Eina_Bool elm_password_show_last_get(void); + + /** + * Set show last setting in password mode. + * + * This enables or disables show last setting of password mode. + * + * @param password_show_last If EINA_TRUE enable's last input show in password mode. + * @see elm_password_show_last_timeout_set() + * @ingroup Password_last_show + */ + EAPI void elm_password_show_last_set(Eina_Bool password_show_last); + + /** + * Get's the timeout value in last show password mode. + * + * This gets the time out value for which the last input entered in password + * mode will be visible. + * + * @return The timeout value of last show password mode. + * @ingroup Password_last_show + */ + EAPI double elm_password_show_last_timeout_get(void); + + /** + * Set's the timeout value in last show password mode. + * + * This sets the time out value for which the last input entered in password + * mode will be visible. + * + * @param password_show_last_timeout The timeout value. + * @see elm_password_show_last_set() + * @ingroup Password_last_show + */ + EAPI void elm_password_show_last_timeout_set(double password_show_last_timeout); + + /** * @defgroup UI-Mirroring Selective Widget mirroring * * These functions allow you to set ui-mirroring on specific diff --git a/src/lib/elm_main.c b/src/lib/elm_main.c index cf0ae1d..d5ad7a4 100644 --- a/src/lib/elm_main.c +++ b/src/lib/elm_main.c @@ -988,6 +988,34 @@ elm_scale_all_set(double scale) #endif } +EAPI Eina_Bool +elm_password_show_last_get(void) +{ + return _elm_config->password_show_last; +} + +EAPI void +elm_password_show_last_set(Eina_Bool password_show_last) +{ + if (_elm_config->password_show_last == password_show_last) return; + _elm_config->password_show_last = password_show_last; + edje_password_show_last_set(_elm_config->password_show_last); +} + +EAPI double +elm_password_show_last_timeout_get(void) +{ + return _elm_config->password_show_last_timeout; +} + +EAPI void +elm_password_show_last_timeout_set(double password_show_last_timeout) +{ + if (_elm_config->password_show_last_timeout == password_show_last_timeout) return; + _elm_config->password_show_last_timeout = password_show_last_timeout; + edje_password_show_last_timeout_set(_elm_config->password_show_last_timeout); +} + EAPI void elm_object_style_set(Evas_Object *obj, const char *style)