From: Carsten Haitzler Date: Tue, 6 Mar 2012 09:23:43 +0000 (+0000) Subject: move config setting fucns over to elm_config in preparation for naming X-Git-Tag: v1.0.0~608 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a4991f0f3a283f0a91f57bcf31eb182d1071e8bc;p=platform%2Fupstream%2Felementary.git move config setting fucns over to elm_config in preparation for naming elm_config_* SVN revision: 68797 --- diff --git a/src/lib/Elementary.h.in b/src/lib/Elementary.h.in index 5406e3f..b1e17fa 100644 --- a/src/lib/Elementary.h.in +++ b/src/lib/Elementary.h.in @@ -225,7 +225,6 @@ EAPI extern Elm_Version *elm_version; // SanjeevBA #include // OK #include // OK -#include // OK #include // OK #include // OK #include // OK diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am index a5fb15c..953c8b3 100644 --- a/src/lib/Makefile.am +++ b/src/lib/Makefile.am @@ -111,7 +111,6 @@ elm_object.h \ elm_object_item.h \ elm_panel.h \ elm_panes.h \ -elm_password.h \ elm_photocam.h \ elm_photo.h \ elm_progressbar.h \ diff --git a/src/lib/elm_config.c b/src/lib/elm_config.c index 97f4177..f4f26e9 100644 --- a/src/lib/elm_config.c +++ b/src/lib/elm_config.c @@ -1407,6 +1407,85 @@ elm_mirrored_set(Eina_Bool mirrored) _elm_rescale(); } +EAPI Eina_Bool +elm_cursor_engine_only_get(void) +{ + return _elm_config->cursor_engine_only; +} + +EAPI void +elm_cursor_engine_only_set(Eina_Bool engine_only) +{ + engine_only = !!engine_only; + _elm_config->cursor_engine_only = engine_only; +} + +EINA_DEPRECATED EAPI double +elm_tooltip_delay_get(void) +{ + return elm_config_tooltip_delay_get(); +} + +EINA_DEPRECATED EAPI Eina_Bool +elm_tooltip_delay_set(double delay) +{ + elm_config_tooltip_delay_set(delay); + return EINA_TRUE; +} + +EAPI double elm_config_tooltip_delay_get(void) +{ + return _elm_config->tooltip_delay; +} + +EAPI void elm_config_tooltip_delay_set(double delay) +{ + if (delay < 0.0) return; + _elm_config->tooltip_delay = delay; +} + +EAPI double +elm_scale_get(void) +{ + return _elm_config->scale; +} + +EAPI void +elm_scale_set(double scale) +{ + if (_elm_config->scale == scale) return; + _elm_config->scale = scale; + _elm_rescale(); +} + +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_config_all_flush(void) { diff --git a/src/lib/elm_config.h b/src/lib/elm_config.h index 133d97e..e140cec 100644 --- a/src/lib/elm_config.h +++ b/src/lib/elm_config.h @@ -456,4 +456,112 @@ EAPI double elm_config_tooltip_delay_get(void); * * @return EINA_TRUE if value is set. */ -EAPI Eina_Bool elm_config_tooltip_delay_set(double delay); +EAPI void elm_config_tooltip_delay_set(double delay); + +/** + * Get the configured cursor engine only usage + * + * This gets the globally configured exclusive usage of engine cursors. + * + * @return 1 if only engine cursors should be used + * @ingroup Cursors + */ +EAPI Eina_Bool elm_cursor_engine_only_get(void); + +/** + * Set the configured cursor engine only usage + * + * This sets the globally configured exclusive usage of engine cursors. + * It won't affect cursors set before changing this value. + * + * @param engine_only If 1 only engine cursors will be enabled, if 0 will + * look for them on theme before. + * @ingroup Cursors + */ +EAPI void elm_cursor_engine_only_set(Eina_Bool engine_only); + +/** + * Get the global scaling factor + * + * This gets the globally configured scaling factor that is applied to all + * objects. + * + * @return The scaling factor + * @ingroup Scaling + */ +EAPI double elm_scale_get(void); + +/** + * Set the global scaling factor + * + * This sets the globally configured scaling factor that is applied to all + * objects. + * + * @param scale The scaling factor to set + * @ingroup Scaling + */ +EAPI void elm_scale_set(double scale); + +/** + * @defgroup Password_last_show Password show last + * + * Show last 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 the "show last" setting of password mode. + * + * This gets the "show last" setting of password mode which might be + * enabled or disabled. + * + * @return @c EINA_TRUE, if the "show last" 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 enables "show last" 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); + +/** + * Gets the timeout value in "show last" 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 "show last" password mode. + * @ingroup Password_last_show + */ +EAPI double elm_password_show_last_timeout_get(void); + +/** + * Set's the timeout value in "show last" 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); + +/** + * @} + */ + diff --git a/src/lib/elm_cursor.h b/src/lib/elm_cursor.h index 2e55d06..370e01d 100644 --- a/src/lib/elm_cursor.h +++ b/src/lib/elm_cursor.h @@ -117,30 +117,5 @@ EAPI void elm_object_cursor_theme_search_enabled_set(Evas_Object *obj, Eina_Bool EAPI Eina_Bool elm_object_cursor_theme_search_enabled_get(const Evas_Object *obj); /** - * Get the configured cursor engine only usage - * - * This gets the globally configured exclusive usage of engine cursors. - * - * @return 1 if only engine cursors should be used - * @ingroup Cursors - */ -// XXX: need to review -EAPI int elm_cursor_engine_only_get(void); - -/** - * Set the configured cursor engine only usage - * - * This sets the globally configured exclusive usage of engine cursors. - * It won't affect cursors set before changing this value. - * - * @param engine_only If 1 only engine cursors will be enabled, if 0 will - * look for them on theme before. - * @return EINA_TRUE if value is valid and set (0 or 1) - * @ingroup Cursors - */ -// XXX: need to review -EAPI Eina_Bool elm_cursor_engine_only_set(int engine_only); - -/** * @} */ diff --git a/src/lib/elm_main.c b/src/lib/elm_main.c index 239a4c9..93aa67e 100644 --- a/src/lib/elm_main.c +++ b/src/lib/elm_main.c @@ -1017,48 +1017,6 @@ elm_object_content_part_unset(Evas_Object *obj, const char *part) return elm_widget_content_part_unset(obj, part); } -EAPI double -elm_scale_get(void) -{ - return _elm_config->scale; -} - -EAPI void -elm_scale_set(double scale) -{ - if (_elm_config->scale == scale) return; - _elm_config->scale = scale; - _elm_rescale(); -} - -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) diff --git a/src/lib/elm_password.h b/src/lib/elm_password.h deleted file mode 100644 index 3d4baa9..0000000 --- a/src/lib/elm_password.h +++ /dev/null @@ -1,62 +0,0 @@ -/** - * @defgroup Password_last_show Password show last - * - * Show last 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 the "show last" setting of password mode. - * - * This gets the "show last" setting of password mode which might be - * enabled or disabled. - * - * @return @c EINA_TRUE, if the "show last" 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 enables "show last" 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); - -/** - * Gets the timeout value in "show last" 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 "show last" password mode. - * @ingroup Password_last_show - */ -EAPI double elm_password_show_last_timeout_get(void); - -/** - * Set's the timeout value in "show last" 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); - -/** - * @} - */ diff --git a/src/lib/elm_scale.h b/src/lib/elm_scale.h index f65d321..3477e3e 100644 --- a/src/lib/elm_scale.h +++ b/src/lib/elm_scale.h @@ -14,28 +14,6 @@ */ /** - * Get the global scaling factor - * - * This gets the globally configured scaling factor that is applied to all - * objects. - * - * @return The scaling factor - * @ingroup Scaling - */ -EAPI double elm_scale_get(void); - -/** - * Set the global scaling factor - * - * This sets the globally configured scaling factor that is applied to all - * objects. - * - * @param scale The scaling factor to set - * @ingroup Scaling - */ -EAPI void elm_scale_set(double scale); - -/** * Set the scaling factor for a given Elementary object * * @param obj The Elementary to operate on diff --git a/src/lib/els_cursor.c b/src/lib/els_cursor.c index 69a5589..30fab6c 100644 --- a/src/lib/els_cursor.c +++ b/src/lib/els_cursor.c @@ -514,17 +514,3 @@ elm_object_cursor_theme_search_enabled_get(const Evas_Object *obj) ELM_CURSOR_GET_OR_RETURN(cur, obj, EINA_FALSE); return cur->engine_only; } - -EAPI int -elm_cursor_engine_only_get(void) -{ - return _elm_config->cursor_engine_only; -} - -EAPI Eina_Bool -elm_cursor_engine_only_set(int engine_only) -{ - if ((engine_only < 0) || (engine_only > 1)) return EINA_FALSE; - _elm_config->cursor_engine_only = engine_only; - return EINA_TRUE; -} diff --git a/src/lib/els_tooltip.c b/src/lib/els_tooltip.c index a4ac5e0..5c76672 100644 --- a/src/lib/els_tooltip.c +++ b/src/lib/els_tooltip.c @@ -894,47 +894,6 @@ elm_object_tooltip_style_get(const Evas_Object *obj) } /** - * Get the configured tooltip delay - * - * This gets the globally configured tooltip delay in seconds - * - * @return The tooltip delay - * @ingroup Tooltips - */ -EINA_DEPRECATED EAPI double -elm_tooltip_delay_get(void) -{ - return elm_config_tooltip_delay_get(); -} - -EAPI double elm_config_tooltip_delay_get(void) -{ - return _elm_config->tooltip_delay; -} - -/** - * Set the configured tooltip delay - * - * This sets the globally configured delay to tooltip - * - * @param delay The delay to show the tooltip - * @return EINA_TRUE if value is valid and setted - * @ingroup Tooltips - */ -EINA_DEPRECATED EAPI Eina_Bool -elm_tooltip_delay_set(double delay) -{ - return elm_config_tooltip_delay_set(delay); -} - -EAPI Eina_Bool elm_config_tooltip_delay_set(double delay) -{ - if (delay < 0.0) return EINA_FALSE; - _elm_config->tooltip_delay = delay; - return EINA_TRUE; -} - -/** * @brief Disable size restrictions on an object's tooltip * @param obj The tooltip's anchor object * @param disable If EINA_TRUE, size restrictions are disabled