move all config related apis into elm_config.c/h... need to name

elm_config_*



SVN revision: 68800
This commit is contained in:
Carsten Haitzler 2012-03-06 09:49:24 +00:00
parent 60be2324a3
commit 513a85595c
11 changed files with 907 additions and 907 deletions

View File

@ -192,7 +192,6 @@ EAPI extern Elm_Version *elm_version;
#include <elm_diskselector.h>
// Chuneon Park
#include <elm_engine.h> // OK
//#include <elm_factory.h> // OK
#include <elm_finger.h> // OK
#include <elm_flip.h> // OK

View File

@ -75,7 +75,6 @@ elm_datetime.h \
elm_debug.h \
elm_deprecated.h \
elm_diskselector.h \
elm_engine.h \
elm_entry.h \
elm_finger.h \
elm_flip.h \

View File

@ -25,146 +25,6 @@
*/
EAPI void elm_cache_all_flush(void);
/**
* Get the configured cache flush interval time
*
* This gets the globally configured cache flush interval time, in
* ticks
*
* @return The cache flush interval time
* @ingroup Caches
*
* @see elm_cache_all_flush()
*/
EAPI int elm_cache_flush_interval_get(void);
/**
* Set the configured cache flush interval time
*
* This sets the globally configured cache flush interval time, in ticks
*
* @param size The cache flush interval time
* @ingroup Caches
*
* @see elm_cache_all_flush()
*/
EAPI void elm_cache_flush_interval_set(int size);
/**
* Get the configured cache flush enabled state
*
* This gets the globally configured cache flush state - if it is enabled
* or not. When cache flushing is enabled, elementary will regularly
* (see elm_cache_flush_interval_get() ) flush caches and dump data out of
* memory and allow usage to re-seed caches and data in memory where it
* can do so. An idle application will thus minimize its memory usage as
* data will be freed from memory and not be re-loaded as it is idle and
* not rendering or doing anything graphically right now.
*
* @return The cache flush state
* @ingroup Caches
*
* @see elm_cache_all_flush()
*/
EAPI Eina_Bool elm_cache_flush_enabled_get(void);
/**
* Set the configured cache flush enabled state
*
* This sets the globally configured cache flush enabled state.
*
* @param enabled The cache flush enabled state
* @ingroup Caches
*
* @see elm_cache_all_flush()
*/
EAPI void elm_cache_flush_enabled_set(Eina_Bool enabled);
/**
* Get the configured font cache size
*
* This gets the globally configured font cache size, in bytes.
*
* @return The font cache size
* @ingroup Caches
*/
EAPI int elm_cache_font_cache_size_get(void);
/**
* Set the configured font cache size
*
* This sets the globally configured font cache size, in bytes
*
* @param size The font cache size
* @ingroup Caches
*/
EAPI void elm_cache_font_cache_size_set(int size);
/**
* Get the configured image cache size
*
* This gets the globally configured image cache size, in bytes
*
* @return The image cache size
* @ingroup Caches
*/
EAPI int elm_cache_image_cache_size_get(void);
/**
* Set the configured image cache size
*
* This sets the globally configured image cache size, in bytes
*
* @param size The image cache size
* @ingroup Caches
*/
EAPI void elm_cache_image_cache_size_set(int size);
/**
* Get the configured edje file cache size.
*
* This gets the globally configured edje file cache size, in number
* of files.
*
* @return The edje file cache size
* @ingroup Caches
*/
EAPI int elm_cache_edje_file_cache_size_get(void);
/**
* Set the configured edje file cache size
*
* This sets the globally configured edje file cache size, in number
* of files.
*
* @param size The edje file cache size
* @ingroup Caches
*/
EAPI void elm_cache_edje_file_cache_size_set(int size);
/**
* Get the configured edje collections (groups) cache size.
*
* This gets the globally configured edje collections cache size, in
* number of collections.
*
* @return The edje collections cache size
* @ingroup Caches
*/
EAPI int elm_cache_edje_collection_cache_size_get(void);
/**
* Set the configured edje collections (groups) cache size
*
* This sets the globally configured edje collections cache size, in
* number of collections.
*
* @param size The edje collections cache size
* @ingroup Caches
*/
EAPI void elm_cache_edje_collection_cache_size_set(int size);
/**
* @}
*/

View File

@ -1486,6 +1486,438 @@ elm_password_show_last_timeout_set(double password_show_last_timeout)
edje_password_show_last_timeout_set(_elm_config->password_show_last_timeout);
}
EAPI Eina_Bool
elm_config_save(void)
{
return _elm_config_save();
}
EAPI void
elm_config_reload(void)
{
_elm_config_reload();
}
EAPI const char *
elm_profile_current_get(void)
{
return _elm_config_current_profile_get();
}
EAPI const char *
elm_profile_dir_get(const char *profile,
Eina_Bool is_user)
{
return _elm_config_profile_dir_get(profile, is_user);
}
EAPI void
elm_profile_dir_free(const char *p_dir)
{
free((void *)p_dir);
}
EAPI Eina_List *
elm_profile_list_get(void)
{
return _elm_config_profiles_list();
}
EAPI void
elm_profile_list_free(Eina_List *l)
{
const char *dir;
EINA_LIST_FREE(l, dir)
eina_stringshare_del(dir);
}
EAPI void
elm_profile_set(const char *profile)
{
EINA_SAFETY_ON_NULL_RETURN(profile);
_elm_config_profile_set(profile);
}
EAPI const char *
elm_engine_get(void)
{
return _elm_config->engine;
}
EAPI void
elm_engine_set(const char *engine)
{
EINA_SAFETY_ON_NULL_RETURN(engine);
_elm_config_engine_set(engine);
}
EAPI Eina_List *
elm_text_classes_list_get(void)
{
return _elm_config_text_classes_get();
}
EAPI void
elm_text_classes_list_free(Eina_List *list)
{
_elm_config_text_classes_free(list);
}
EAPI const Eina_List *
elm_font_overlay_list_get(void)
{
return _elm_config_font_overlays_list();
}
EAPI void
elm_font_overlay_set(const char *text_class,
const char *font,
Evas_Font_Size size)
{
EINA_SAFETY_ON_NULL_RETURN(text_class);
_elm_config_font_overlay_set(text_class, font, size);
}
EAPI void
elm_font_overlay_unset(const char *text_class)
{
EINA_SAFETY_ON_NULL_RETURN(text_class);
_elm_config_font_overlay_remove(text_class);
}
EAPI void
elm_font_overlay_apply(void)
{
_elm_config_font_overlay_apply();
}
EAPI Evas_Coord
elm_finger_size_get(void)
{
return _elm_config->finger_size;
}
EAPI void
elm_finger_size_set(Evas_Coord size)
{
if (_elm_config->finger_size == size) return;
_elm_config->finger_size = size;
_elm_rescale();
}
EAPI int
elm_cache_flush_interval_get(void)
{
return _elm_config->cache_flush_poll_interval;
}
EAPI void
elm_cache_flush_interval_set(int size)
{
if (_elm_config->cache_flush_poll_interval == size) return;
_elm_config->cache_flush_poll_interval = size;
_elm_recache();
}
EAPI Eina_Bool
elm_cache_flush_enabled_get(void)
{
return _elm_config->cache_flush_enable;
}
EAPI void
elm_cache_flush_enabled_set(Eina_Bool enabled)
{
enabled = !!enabled;
if (_elm_config->cache_flush_enable == enabled) return;
_elm_config->cache_flush_enable = enabled;
_elm_recache();
}
EINA_DEPRECATED EAPI int
elm_font_cache_get(void)
{
return elm_cache_font_cache_size_get();
}
EAPI int
elm_cache_font_cache_size_get(void)
{
return _elm_config->font_cache;
}
EINA_DEPRECATED EAPI void
elm_font_cache_set(int size)
{
elm_cache_font_cache_size_set(size);
}
EAPI void
elm_cache_font_cache_size_set(int size)
{
if (_elm_config->font_cache == size) return;
_elm_config->font_cache = size;
_elm_recache();
}
EINA_DEPRECATED EAPI int
elm_image_cache_get(void)
{
return elm_cache_image_cache_size_get();
}
EAPI int
elm_cache_image_cache_size_get(void)
{
return _elm_config->image_cache;
}
EINA_DEPRECATED EAPI void
elm_image_cache_set(int size)
{
elm_cache_image_cache_size_set(size);
}
EAPI void
elm_cache_image_cache_size_set(int size)
{
if (_elm_config->image_cache == size) return;
_elm_config->image_cache = size;
_elm_recache();
}
EINA_DEPRECATED EAPI int
elm_edje_file_cache_get(void)
{
return elm_cache_edje_file_cache_size_get();
}
EAPI int
elm_cache_edje_file_cache_size_get()
{
return _elm_config->edje_cache;
}
EINA_DEPRECATED EAPI void
elm_edje_file_cache_set(int size)
{
elm_cache_edje_file_cache_size_set(size);
}
EAPI void
elm_cache_edje_file_cache_size_set(int size)
{
if (_elm_config->edje_cache == size) return;
_elm_config->edje_cache = size;
_elm_recache();
}
EINA_DEPRECATED EAPI int
elm_edje_collection_cache_get(void)
{
return elm_cache_edje_collection_cache_size_get();
}
EAPI int
elm_cache_edje_collection_cache_size_get(void)
{
return _elm_config->edje_collection_cache;
}
EINA_DEPRECATED EAPI void
elm_edje_collection_cache_set(int size)
{
elm_cache_edje_collection_cache_size_set(size);
}
EAPI void
elm_cache_edje_collection_cache_size_set(int size)
{
if (_elm_config->edje_collection_cache == size) return;
_elm_config->edje_collection_cache = size;
_elm_recache();
}
EAPI Eina_Bool
elm_focus_highlight_enabled_get(void)
{
return _elm_config->focus_highlight_enable;
}
EAPI void
elm_focus_highlight_enabled_set(Eina_Bool enable)
{
_elm_config->focus_highlight_enable = !!enable;
}
EAPI Eina_Bool
elm_focus_highlight_animate_get(void)
{
return _elm_config->focus_highlight_animate;
}
EAPI void
elm_focus_highlight_animate_set(Eina_Bool animate)
{
_elm_config->focus_highlight_animate = !!animate;
}
EAPI Eina_Bool
elm_scroll_bounce_enabled_get(void)
{
return _elm_config->thumbscroll_bounce_enable;
}
EAPI void
elm_scroll_bounce_enabled_set(Eina_Bool enabled)
{
_elm_config->thumbscroll_bounce_enable = enabled;
}
EAPI double
elm_scroll_bounce_friction_get(void)
{
return _elm_config->thumbscroll_bounce_friction;
}
EAPI void
elm_scroll_bounce_friction_set(double friction)
{
_elm_config->thumbscroll_bounce_friction = friction;
}
EAPI double
elm_scroll_page_scroll_friction_get(void)
{
return _elm_config->page_scroll_friction;
}
EAPI void
elm_scroll_page_scroll_friction_set(double friction)
{
_elm_config->page_scroll_friction = friction;
}
EAPI double
elm_scroll_bring_in_scroll_friction_get(void)
{
return _elm_config->bring_in_scroll_friction;
}
EAPI void
elm_scroll_bring_in_scroll_friction_set(double friction)
{
_elm_config->bring_in_scroll_friction = friction;
}
EAPI double
elm_scroll_zoom_friction_get(void)
{
return _elm_config->zoom_friction;
}
EAPI void
elm_scroll_zoom_friction_set(double friction)
{
_elm_config->zoom_friction = friction;
}
EAPI Eina_Bool
elm_scroll_thumbscroll_enabled_get(void)
{
return _elm_config->thumbscroll_enable;
}
EAPI void
elm_scroll_thumbscroll_enabled_set(Eina_Bool enabled)
{
_elm_config->thumbscroll_enable = enabled;
}
EAPI unsigned int
elm_scroll_thumbscroll_threshold_get(void)
{
return _elm_config->thumbscroll_threshold;
}
EAPI void
elm_scroll_thumbscroll_threshold_set(unsigned int threshold)
{
_elm_config->thumbscroll_threshold = threshold;
}
EAPI double
elm_scroll_thumbscroll_momentum_threshold_get(void)
{
return _elm_config->thumbscroll_momentum_threshold;
}
EAPI void
elm_scroll_thumbscroll_momentum_threshold_set(double threshold)
{
_elm_config->thumbscroll_momentum_threshold = threshold;
}
EAPI double
elm_scroll_thumbscroll_friction_get(void)
{
return _elm_config->thumbscroll_friction;
}
EAPI void
elm_scroll_thumbscroll_friction_set(double friction)
{
_elm_config->thumbscroll_friction = friction;
}
EAPI double
elm_scroll_thumbscroll_border_friction_get(void)
{
return _elm_config->thumbscroll_border_friction;
}
EAPI void
elm_scroll_thumbscroll_border_friction_set(double friction)
{
if (friction < 0.0) friction = 0.0;
if (friction > 1.0) friction = 1.0;
_elm_config->thumbscroll_friction = friction;
}
EAPI double
elm_scroll_thumbscroll_sensitivity_friction_get(void)
{
return _elm_config->thumbscroll_sensitivity_friction;
}
EAPI void
elm_scroll_thumbscroll_sensitivity_friction_set(double friction)
{
if (friction < 0.1) friction = 0.1;
if (friction > 1.0) friction = 1.0;
_elm_config->thumbscroll_friction = friction;
}
EAPI void
elm_longpress_timeout_set(double longpress_timeout)
{
_elm_config->longpress_timeout = longpress_timeout;
}
EAPI double
elm_longpress_timeout_get(void)
{
return _elm_config->longpress_timeout;
}
EAPI void
elm_config_all_flush(void)
{

View File

@ -565,3 +565,389 @@ EAPI void elm_password_show_last_timeout_set(double password_show_last_time
* @}
*/
/**
* @defgroup Engine Elementary Engine
*
* These are functions setting and querying which rendering engine
* Elementary will use for drawing its windows' pixels.
*
* The following are the available engines:
* @li "software_x11"
* @li "fb"
* @li "directfb"
* @li "software_16_x11"
* @li "software_8_x11"
* @li "xrender_x11"
* @li "opengl_x11"
* @li "software_gdi"
* @li "software_16_wince_gdi"
* @li "sdl"
* @li "software_16_sdl"
* @li "opengl_sdl"
* @li "buffer"
* @li "ews"
* @li "opengl_cocoa"
* @li "psl1ght"
*
* @{
*/
/**
* @brief Get Elementary's rendering engine in use.
*
* @return The rendering engine's name
* @note there's no need to free the returned string, here.
*
* This gets the global rendering engine that is applied to all Elementary
* applications.
*
* @see elm_engine_set()
*/
EAPI const char *elm_engine_get(void);
/**
* @brief Set Elementary's rendering engine for use.
*
* @param engine The rendering engine's name
*
* Note that it will take effect only to Elementary windows created after
* this is called.
*
* @see elm_win_add()
*/
EAPI void elm_engine_set(const char *engine);
/**
* @brief Get Elementary's preferred engine to use.
*
* @return The rendering engine's name
* @note there's no need to free the returned string, here.
*
* This gets the global rendering engine that is applied to all Elementary
* applications and is PREFERRED by the application. This can (and will)
* override the engine configured for all applications which.
*
* @see elm_preferred_engine_set()
*/
EAPI const char *elm_preferred_engine_get(void);
/**
* @brief Set Elementary's preferred rendering engine for use.
*
* @param engine The rendering engine's name
*
* Note that it will take effect only to Elementary windows created after
* this is called. This overrides the engine set by configuration at
* application startup. Note that it is a hint and may not be honored.
*
* @see elm_win_add()
*/
EAPI void elm_preferred_engine_set(const char *engine);
typedef struct _Elm_Text_Class
{
const char *name;
const char *desc;
} Elm_Text_Class;
typedef struct _Elm_Font_Overlay
{
const char *text_class;
const char *font;
Evas_Font_Size size;
} Elm_Font_Overlay;
/**
* Get Elementary's list of supported text classes.
*
* @return The text classes list, with @c Elm_Text_Class blobs as data.
* @ingroup Fonts
*
* Release the list with elm_text_classes_list_free().
*/
EAPI Eina_List *elm_text_classes_list_get(void);
/**
* Free Elementary's list of supported text classes.
*
* @ingroup Fonts
*
* @see elm_text_classes_list_get().
*/
EAPI void elm_text_classes_list_free(Eina_List *list);
/**
* Get Elementary's list of font overlays, set with
* elm_font_overlay_set().
*
* @return The font overlays list, with @c Elm_Font_Overlay blobs as
* data.
*
* @ingroup Fonts
*
* For each text class, one can set a <b>font overlay</b> for it,
* overriding the default font properties for that class coming from
* the theme in use. There is no need to free this list.
*
* @see elm_font_overlay_set() and elm_font_overlay_unset().
*/
EAPI const Eina_List *elm_font_overlay_list_get(void);
/**
* Set a font overlay for a given Elementary text class.
*
* @param text_class Text class name
* @param font Font name and style string
* @param size Font size
*
* @ingroup Fonts
*
* @p font has to be in the format returned by
* elm_font_fontconfig_name_get(). @see elm_font_overlay_list_get()
* and elm_font_overlay_unset().
*/
EAPI void elm_font_overlay_set(const char *text_class, const char *font, Evas_Font_Size size);
/**
* Unset a font overlay for a given Elementary text class.
*
* @param text_class Text class name
*
* @ingroup Fonts
*
* This will bring back text elements belonging to text class
* @p text_class back to their default font settings.
*/
EAPI void elm_font_overlay_unset(const char *text_class);
/**
* Apply the changes made with elm_font_overlay_set() and
* elm_font_overlay_unset() on the current Elementary window.
*
* @ingroup Fonts
*
* This applies all font overlays set to all objects in the UI.
*/
EAPI void elm_font_overlay_apply(void);
/**
* Get the configured "finger size"
*
* @return The finger size
*
* This gets the globally configured finger size, <b>in pixels</b>
*
* @ingroup Fingers
*/
EAPI Evas_Coord elm_finger_size_get(void);
/**
* Set the configured finger size
*
* This sets the globally configured finger size in pixels
*
* @param size The finger size
* @ingroup Fingers
*/
EAPI void elm_finger_size_set(Evas_Coord size);
/**
* Get the configured cache flush interval time
*
* This gets the globally configured cache flush interval time, in
* ticks
*
* @return The cache flush interval time
* @ingroup Caches
*
* @see elm_cache_all_flush()
*/
EAPI int elm_cache_flush_interval_get(void);
/**
* Set the configured cache flush interval time
*
* This sets the globally configured cache flush interval time, in ticks
*
* @param size The cache flush interval time
* @ingroup Caches
*
* @see elm_cache_all_flush()
*/
EAPI void elm_cache_flush_interval_set(int size);
/**
* Get the configured cache flush enabled state
*
* This gets the globally configured cache flush state - if it is enabled
* or not. When cache flushing is enabled, elementary will regularly
* (see elm_cache_flush_interval_get() ) flush caches and dump data out of
* memory and allow usage to re-seed caches and data in memory where it
* can do so. An idle application will thus minimize its memory usage as
* data will be freed from memory and not be re-loaded as it is idle and
* not rendering or doing anything graphically right now.
*
* @return The cache flush state
* @ingroup Caches
*
* @see elm_cache_all_flush()
*/
EAPI Eina_Bool elm_cache_flush_enabled_get(void);
/**
* Set the configured cache flush enabled state
*
* This sets the globally configured cache flush enabled state.
*
* @param enabled The cache flush enabled state
* @ingroup Caches
*
* @see elm_cache_all_flush()
*/
EAPI void elm_cache_flush_enabled_set(Eina_Bool enabled);
/**
* Get the configured font cache size
*
* This gets the globally configured font cache size, in bytes.
*
* @return The font cache size
* @ingroup Caches
*/
EAPI int elm_cache_font_cache_size_get(void);
/**
* Set the configured font cache size
*
* This sets the globally configured font cache size, in bytes
*
* @param size The font cache size
* @ingroup Caches
*/
EAPI void elm_cache_font_cache_size_set(int size);
/**
* Get the configured image cache size
*
* This gets the globally configured image cache size, in bytes
*
* @return The image cache size
* @ingroup Caches
*/
EAPI int elm_cache_image_cache_size_get(void);
/**
* Set the configured image cache size
*
* This sets the globally configured image cache size, in bytes
*
* @param size The image cache size
* @ingroup Caches
*/
EAPI void elm_cache_image_cache_size_set(int size);
/**
* Get the configured edje file cache size.
*
* This gets the globally configured edje file cache size, in number
* of files.
*
* @return The edje file cache size
* @ingroup Caches
*/
EAPI int elm_cache_edje_file_cache_size_get(void);
/**
* Set the configured edje file cache size
*
* This sets the globally configured edje file cache size, in number
* of files.
*
* @param size The edje file cache size
* @ingroup Caches
*/
EAPI void elm_cache_edje_file_cache_size_set(int size);
/**
* Get the configured edje collections (groups) cache size.
*
* This gets the globally configured edje collections cache size, in
* number of collections.
*
* @return The edje collections cache size
* @ingroup Caches
*/
EAPI int elm_cache_edje_collection_cache_size_get(void);
/**
* Set the configured edje collections (groups) cache size
*
* This sets the globally configured edje collections cache size, in
* number of collections.
*
* @param size The edje collections cache size
* @ingroup Caches
*/
EAPI void elm_cache_edje_collection_cache_size_set(int size);
/**
* Get the enable status of the focus highlight
*
* This gets whether the highlight on focused objects is enabled or not
*
* @see elm_focus_highlight_enabled_set()
* @ingroup Focus
*/
EAPI Eina_Bool elm_focus_highlight_enabled_get(void);
/**
* Set the enable status of the focus highlight
*
* @param enable Enable highlight if EINA_TRUE, disable otherwise
*
* Set whether to show or not the highlight on focused objects
*
* Note that it will take effect only to Elementary windows created after
* this is called.
*
* @see elm_win_add()
*
* @ingroup Focus
*/
EAPI void elm_focus_highlight_enabled_set(Eina_Bool enable);
/**
* Get the enable status of the highlight animation
*
* @return The focus highlight mode set
*
* Get whether the focus highlight, if enabled, will animate its switch from
* one object to the next
*
* @ingroup Focus
*/
EAPI Eina_Bool elm_focus_highlight_animate_get(void);
/**
* Set the enable status of the highlight animation
*
* @param animate Enable animation if EINA_TRUE, disable otherwise
*
* Set whether the focus highlight, if enabled, will animate its switch from
* one object to the next
*
* Note that it will take effect only to Elementary windows created after
* this is called.
*
* @see elm_win_add()
*
* @ingroup Focus
*/
EAPI void elm_focus_highlight_animate_set(Eina_Bool animate);
/**
* @}
*/

View File

@ -1,82 +0,0 @@
/**
* @defgroup Engine Elementary Engine
*
* These are functions setting and querying which rendering engine
* Elementary will use for drawing its windows' pixels.
*
* The following are the available engines:
* @li "software_x11"
* @li "fb"
* @li "directfb"
* @li "software_16_x11"
* @li "software_8_x11"
* @li "xrender_x11"
* @li "opengl_x11"
* @li "software_gdi"
* @li "software_16_wince_gdi"
* @li "sdl"
* @li "software_16_sdl"
* @li "opengl_sdl"
* @li "buffer"
* @li "ews"
* @li "opengl_cocoa"
* @li "psl1ght"
*
* @{
*/
/**
* @brief Get Elementary's rendering engine in use.
*
* @return The rendering engine's name
* @note there's no need to free the returned string, here.
*
* This gets the global rendering engine that is applied to all Elementary
* applications.
*
* @see elm_engine_set()
*/
EAPI const char *elm_engine_get(void);
/**
* @brief Set Elementary's rendering engine for use.
*
* @param engine The rendering engine's name
*
* Note that it will take effect only to Elementary windows created after
* this is called.
*
* @see elm_win_add()
*/
EAPI void elm_engine_set(const char *engine);
/**
* @brief Get Elementary's preferred engine to use.
*
* @return The rendering engine's name
* @note there's no need to free the returned string, here.
*
* This gets the global rendering engine that is applied to all Elementary
* applications and is PREFERRED by the application. This can (and will)
* override the engine configured for all applications which.
*
* @see elm_preferred_engine_set()
*/
EAPI const char *elm_preferred_engine_get(void);
/**
* @brief Set Elementary's preferred rendering engine for use.
*
* @param engine The rendering engine's name
*
* Note that it will take effect only to Elementary windows created after
* this is called. This overrides the engine set by configuration at
* application startup. Note that it is a hint and may not be honored.
*
* @see elm_win_add()
*/
EAPI void elm_preferred_engine_set(const char *engine);
/**
* @}
*/

View File

@ -15,27 +15,6 @@
* @{
*/
/**
* Get the configured "finger size"
*
* @return The finger size
*
* This gets the globally configured finger size, <b>in pixels</b>
*
* @ingroup Fingers
*/
EAPI Evas_Coord elm_finger_size_get(void);
/**
* Set the configured finger size
*
* This sets the globally configured finger size in pixels
*
* @param size The finger size
* @ingroup Fingers
*/
EAPI void elm_finger_size_set(Evas_Coord size);
/**
* Adjust size of an element for finger usage.
*

View File

@ -32,61 +32,6 @@
* some of these functions.
*/
/**
* Get the enable status of the focus highlight
*
* This gets whether the highlight on focused objects is enabled or not
*
* @see elm_focus_highlight_enabled_set()
* @ingroup Focus
*/
EAPI Eina_Bool elm_focus_highlight_enabled_get(void);
/**
* Set the enable status of the focus highlight
*
* @param enable Enable highlight if EINA_TRUE, disable otherwise
*
* Set whether to show or not the highlight on focused objects
*
* Note that it will take effect only to Elementary windows created after
* this is called.
*
* @see elm_win_add()
*
* @ingroup Focus
*/
EAPI void elm_focus_highlight_enabled_set(Eina_Bool enable);
/**
* Get the enable status of the highlight animation
*
* @return The focus highlight mode set
*
* Get whether the focus highlight, if enabled, will animate its switch from
* one object to the next
*
* @ingroup Focus
*/
EAPI Eina_Bool elm_focus_highlight_animate_get(void);
/**
* Set the enable status of the highlight animation
*
* @param animate Enable animation if EINA_TRUE, disable otherwise
*
* Set whether the focus highlight, if enabled, will animate its switch from
* one object to the next
*
* Note that it will take effect only to Elementary windows created after
* this is called.
*
* @see elm_win_add()
*
* @ingroup Focus
*/
EAPI void elm_focus_highlight_animate_set(Eina_Bool animate);
/**
* Get the whether an Elementary object has the focus or not.
*

View File

@ -138,3 +138,84 @@ _elm_font_available_hash_del(Eina_Hash *hash)
eina_hash_foreach(hash, _font_hash_free_cb, NULL);
eina_hash_free(hash);
}
EAPI Elm_Font_Properties *
elm_font_properties_get(const char *font)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(font, NULL);
return _elm_font_properties_get(NULL, font);
}
EAPI void
elm_font_properties_free(Elm_Font_Properties *efp)
{
const char *str;
EINA_SAFETY_ON_NULL_RETURN(efp);
EINA_LIST_FREE(efp->styles, str)
if (str) eina_stringshare_del(str);
if (efp->name) eina_stringshare_del(efp->name);
free(efp);
}
EAPI char *
elm_font_fontconfig_name_get(const char *name,
const char *style)
{
char buf[256];
EINA_SAFETY_ON_NULL_RETURN_VAL(name, NULL);
if (!style || style[0] == 0) return (char *) eina_stringshare_add(name);
snprintf(buf, 256, "%s" ELM_FONT_TOKEN_STYLE "%s", name, style);
return (char *) eina_stringshare_add(buf);
}
EAPI void
elm_font_fontconfig_name_free(char *name)
{
eina_stringshare_del(name);
}
EAPI Eina_Hash *
elm_font_available_hash_add(Eina_List *list)
{
Eina_Hash *font_hash;
Eina_List *l;
void *key;
font_hash = NULL;
/* populate with default font families */
//FIXME: Need to check whether fonts are being added multiple times.
font_hash = _elm_font_available_hash_add(font_hash, "Sans:style=Regular");
font_hash = _elm_font_available_hash_add(font_hash, "Sans:style=Bold");
font_hash = _elm_font_available_hash_add(font_hash, "Sans:style=Oblique");
font_hash = _elm_font_available_hash_add(font_hash,
"Sans:style=Bold Oblique");
font_hash = _elm_font_available_hash_add(font_hash, "Serif:style=Regular");
font_hash = _elm_font_available_hash_add(font_hash, "Serif:style=Bold");
font_hash = _elm_font_available_hash_add(font_hash, "Serif:style=Oblique");
font_hash = _elm_font_available_hash_add(font_hash,
"Serif:style=Bold Oblique");
font_hash = _elm_font_available_hash_add(font_hash,
"Monospace:style=Regular");
font_hash = _elm_font_available_hash_add(font_hash,
"Monospace:style=Bold");
font_hash = _elm_font_available_hash_add(font_hash,
"Monospace:style=Oblique");
font_hash = _elm_font_available_hash_add(font_hash,
"Monospace:style=Bold Oblique");
EINA_LIST_FOREACH(list, l, key)
if (key) _elm_font_available_hash_add(font_hash, key);
return font_hash;
}
EAPI void
elm_font_available_hash_del(Eina_Hash *hash)
{
_elm_font_available_hash_del(hash);
}

View File

@ -9,98 +9,12 @@
* @{
*/
typedef struct _Elm_Text_Class
{
const char *name;
const char *desc;
} Elm_Text_Class;
typedef struct _Elm_Font_Overlay
{
const char *text_class;
const char *font;
Evas_Font_Size size;
} Elm_Font_Overlay;
typedef struct _Elm_Font_Properties
{
const char *name;
Eina_List *styles;
} Elm_Font_Properties;
/**
* Get Elementary's list of supported text classes.
*
* @return The text classes list, with @c Elm_Text_Class blobs as data.
* @ingroup Fonts
*
* Release the list with elm_text_classes_list_free().
*/
EAPI Eina_List *elm_text_classes_list_get(void);
/**
* Free Elementary's list of supported text classes.
*
* @ingroup Fonts
*
* @see elm_text_classes_list_get().
*/
EAPI void elm_text_classes_list_free(Eina_List *list);
/**
* Get Elementary's list of font overlays, set with
* elm_font_overlay_set().
*
* @return The font overlays list, with @c Elm_Font_Overlay blobs as
* data.
*
* @ingroup Fonts
*
* For each text class, one can set a <b>font overlay</b> for it,
* overriding the default font properties for that class coming from
* the theme in use. There is no need to free this list.
*
* @see elm_font_overlay_set() and elm_font_overlay_unset().
*/
EAPI const Eina_List *elm_font_overlay_list_get(void);
/**
* Set a font overlay for a given Elementary text class.
*
* @param text_class Text class name
* @param font Font name and style string
* @param size Font size
*
* @ingroup Fonts
*
* @p font has to be in the format returned by
* elm_font_fontconfig_name_get(). @see elm_font_overlay_list_get()
* and elm_font_overlay_unset().
*/
EAPI void elm_font_overlay_set(const char *text_class, const char *font, Evas_Font_Size size);
/**
* Unset a font overlay for a given Elementary text class.
*
* @param text_class Text class name
*
* @ingroup Fonts
*
* This will bring back text elements belonging to text class
* @p text_class back to their default font settings.
*/
EAPI void elm_font_overlay_unset(const char *text_class);
/**
* Apply the changes made with elm_font_overlay_set() and
* elm_font_overlay_unset() on the current Elementary window.
*
* @ingroup Fonts
*
* This applies all font overlays set to all objects in the UI.
*/
EAPI void elm_font_overlay_apply(void);
/**
* Translate a font (family) name string in fontconfig's font names
* syntax into an @c Elm_Font_Properties struct.

View File

@ -1047,220 +1047,6 @@ elm_object_disabled_get(const Evas_Object *obj)
return elm_widget_disabled_get(obj);
}
EAPI Eina_Bool
elm_config_save(void)
{
return _elm_config_save();
}
EAPI void
elm_config_reload(void)
{
_elm_config_reload();
}
EAPI const char *
elm_profile_current_get(void)
{
return _elm_config_current_profile_get();
}
EAPI const char *
elm_profile_dir_get(const char *profile,
Eina_Bool is_user)
{
return _elm_config_profile_dir_get(profile, is_user);
}
EAPI void
elm_profile_dir_free(const char *p_dir)
{
free((void *)p_dir);
}
EAPI Eina_List *
elm_profile_list_get(void)
{
return _elm_config_profiles_list();
}
EAPI void
elm_profile_list_free(Eina_List *l)
{
const char *dir;
EINA_LIST_FREE(l, dir)
eina_stringshare_del(dir);
}
EAPI void
elm_profile_set(const char *profile)
{
EINA_SAFETY_ON_NULL_RETURN(profile);
_elm_config_profile_set(profile);
}
EAPI const char *
elm_engine_get(void)
{
return _elm_config->engine;
}
EAPI void
elm_engine_set(const char *engine)
{
EINA_SAFETY_ON_NULL_RETURN(engine);
_elm_config_engine_set(engine);
}
EAPI Eina_List *
elm_text_classes_list_get(void)
{
return _elm_config_text_classes_get();
}
EAPI void
elm_text_classes_list_free(Eina_List *list)
{
_elm_config_text_classes_free(list);
}
EAPI const Eina_List *
elm_font_overlay_list_get(void)
{
return _elm_config_font_overlays_list();
}
EAPI void
elm_font_overlay_set(const char *text_class,
const char *font,
Evas_Font_Size size)
{
EINA_SAFETY_ON_NULL_RETURN(text_class);
_elm_config_font_overlay_set(text_class, font, size);
}
EAPI void
elm_font_overlay_unset(const char *text_class)
{
EINA_SAFETY_ON_NULL_RETURN(text_class);
_elm_config_font_overlay_remove(text_class);
}
EAPI void
elm_font_overlay_apply(void)
{
_elm_config_font_overlay_apply();
}
EAPI Elm_Font_Properties *
elm_font_properties_get(const char *font)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(font, NULL);
return _elm_font_properties_get(NULL, font);
}
EAPI void
elm_font_properties_free(Elm_Font_Properties *efp)
{
const char *str;
EINA_SAFETY_ON_NULL_RETURN(efp);
EINA_LIST_FREE(efp->styles, str)
if (str) eina_stringshare_del(str);
if (efp->name) eina_stringshare_del(efp->name);
free(efp);
}
EAPI char *
elm_font_fontconfig_name_get(const char *name,
const char *style)
{
char buf[256];
EINA_SAFETY_ON_NULL_RETURN_VAL(name, NULL);
if (!style || style[0] == 0) return (char *) eina_stringshare_add(name);
snprintf(buf, 256, "%s" ELM_FONT_TOKEN_STYLE "%s", name, style);
return (char *) eina_stringshare_add(buf);
}
EAPI void
elm_font_fontconfig_name_free(char *name)
{
eina_stringshare_del(name);
}
EAPI Eina_Hash *
elm_font_available_hash_add(Eina_List *list)
{
Eina_Hash *font_hash;
Eina_List *l;
void *key;
font_hash = NULL;
/* populate with default font families */
//FIXME: Need to check whether fonts are being added multiple times.
font_hash = _elm_font_available_hash_add(font_hash, "Sans:style=Regular");
font_hash = _elm_font_available_hash_add(font_hash, "Sans:style=Bold");
font_hash = _elm_font_available_hash_add(font_hash, "Sans:style=Oblique");
font_hash = _elm_font_available_hash_add(font_hash,
"Sans:style=Bold Oblique");
font_hash = _elm_font_available_hash_add(font_hash, "Serif:style=Regular");
font_hash = _elm_font_available_hash_add(font_hash, "Serif:style=Bold");
font_hash = _elm_font_available_hash_add(font_hash, "Serif:style=Oblique");
font_hash = _elm_font_available_hash_add(font_hash,
"Serif:style=Bold Oblique");
font_hash = _elm_font_available_hash_add(font_hash,
"Monospace:style=Regular");
font_hash = _elm_font_available_hash_add(font_hash,
"Monospace:style=Bold");
font_hash = _elm_font_available_hash_add(font_hash,
"Monospace:style=Oblique");
font_hash = _elm_font_available_hash_add(font_hash,
"Monospace:style=Bold Oblique");
EINA_LIST_FOREACH(list, l, key)
if (key) _elm_font_available_hash_add(font_hash, key);
return font_hash;
}
EAPI void
elm_font_available_hash_del(Eina_Hash *hash)
{
_elm_font_available_hash_del(hash);
}
EAPI Evas_Coord
elm_finger_size_get(void)
{
return _elm_config->finger_size;
}
EAPI void
elm_finger_size_set(Evas_Coord size)
{
if (_elm_config->finger_size == size) return;
_elm_config->finger_size = size;
_elm_rescale();
}
EAPI void
elm_coords_finger_size_adjust(int times_w,
Evas_Coord *w,
int times_h,
Evas_Coord *h)
{
if ((w) && (*w < (_elm_config->finger_size * times_w)))
*w = _elm_config->finger_size * times_w;
if ((h) && (*h < (_elm_config->finger_size * times_h)))
*h = _elm_config->finger_size * times_h;
}
EAPI void
elm_cache_all_flush(void)
{
@ -1285,145 +1071,6 @@ elm_all_flush(void)
elm_cache_all_flush();
}
EAPI int
elm_cache_flush_interval_get(void)
{
return _elm_config->cache_flush_poll_interval;
}
EAPI void
elm_cache_flush_interval_set(int size)
{
if (_elm_config->cache_flush_poll_interval == size) return;
_elm_config->cache_flush_poll_interval = size;
_elm_recache();
}
EAPI Eina_Bool
elm_cache_flush_enabled_get(void)
{
return _elm_config->cache_flush_enable;
}
EAPI void
elm_cache_flush_enabled_set(Eina_Bool enabled)
{
enabled = !!enabled;
if (_elm_config->cache_flush_enable == enabled) return;
_elm_config->cache_flush_enable = enabled;
_elm_recache();
}
EINA_DEPRECATED EAPI int
elm_font_cache_get(void)
{
return elm_cache_font_cache_size_get();
}
EAPI int
elm_cache_font_cache_size_get(void)
{
return _elm_config->font_cache;
}
EINA_DEPRECATED EAPI void
elm_font_cache_set(int size)
{
elm_cache_font_cache_size_set(size);
}
EAPI void
elm_cache_font_cache_size_set(int size)
{
if (_elm_config->font_cache == size) return;
_elm_config->font_cache = size;
_elm_recache();
}
EINA_DEPRECATED EAPI int
elm_image_cache_get(void)
{
return elm_cache_image_cache_size_get();
}
EAPI int
elm_cache_image_cache_size_get(void)
{
return _elm_config->image_cache;
}
EINA_DEPRECATED EAPI void
elm_image_cache_set(int size)
{
elm_cache_image_cache_size_set(size);
}
EAPI void
elm_cache_image_cache_size_set(int size)
{
if (_elm_config->image_cache == size) return;
_elm_config->image_cache = size;
_elm_recache();
}
EINA_DEPRECATED EAPI int
elm_edje_file_cache_get(void)
{
return elm_cache_edje_file_cache_size_get();
}
EAPI int
elm_cache_edje_file_cache_size_get()
{
return _elm_config->edje_cache;
}
EINA_DEPRECATED EAPI void
elm_edje_file_cache_set(int size)
{
elm_cache_edje_file_cache_size_set(size);
}
EAPI void
elm_cache_edje_file_cache_size_set(int size)
{
if (_elm_config->edje_cache == size) return;
_elm_config->edje_cache = size;
_elm_recache();
}
EINA_DEPRECATED EAPI int
elm_edje_collection_cache_get(void)
{
return elm_cache_edje_collection_cache_size_get();
}
EAPI int
elm_cache_edje_collection_cache_size_get(void)
{
return _elm_config->edje_collection_cache;
}
EINA_DEPRECATED EAPI void
elm_edje_collection_cache_set(int size)
{
elm_cache_edje_collection_cache_size_set(size);
}
EAPI void
elm_cache_edje_collection_cache_size_set(int size)
{
if (_elm_config->edje_collection_cache == size) return;
_elm_config->edje_collection_cache = size;
_elm_recache();
}
EAPI Eina_Bool
elm_object_focus_get(const Evas_Object *obj)
{
@ -1555,166 +1202,6 @@ elm_object_tree_unfocusable_get(const Evas_Object *obj)
return elm_widget_tree_unfocusable_get(obj);
}
EAPI Eina_Bool
elm_focus_highlight_enabled_get(void)
{
return _elm_config->focus_highlight_enable;
}
EAPI void
elm_focus_highlight_enabled_set(Eina_Bool enable)
{
_elm_config->focus_highlight_enable = !!enable;
}
EAPI Eina_Bool
elm_focus_highlight_animate_get(void)
{
return _elm_config->focus_highlight_animate;
}
EAPI void
elm_focus_highlight_animate_set(Eina_Bool animate)
{
_elm_config->focus_highlight_animate = !!animate;
}
EAPI Eina_Bool
elm_scroll_bounce_enabled_get(void)
{
return _elm_config->thumbscroll_bounce_enable;
}
EAPI void
elm_scroll_bounce_enabled_set(Eina_Bool enabled)
{
_elm_config->thumbscroll_bounce_enable = enabled;
}
EAPI double
elm_scroll_bounce_friction_get(void)
{
return _elm_config->thumbscroll_bounce_friction;
}
EAPI void
elm_scroll_bounce_friction_set(double friction)
{
_elm_config->thumbscroll_bounce_friction = friction;
}
EAPI double
elm_scroll_page_scroll_friction_get(void)
{
return _elm_config->page_scroll_friction;
}
EAPI void
elm_scroll_page_scroll_friction_set(double friction)
{
_elm_config->page_scroll_friction = friction;
}
EAPI double
elm_scroll_bring_in_scroll_friction_get(void)
{
return _elm_config->bring_in_scroll_friction;
}
EAPI void
elm_scroll_bring_in_scroll_friction_set(double friction)
{
_elm_config->bring_in_scroll_friction = friction;
}
EAPI double
elm_scroll_zoom_friction_get(void)
{
return _elm_config->zoom_friction;
}
EAPI void
elm_scroll_zoom_friction_set(double friction)
{
_elm_config->zoom_friction = friction;
}
EAPI Eina_Bool
elm_scroll_thumbscroll_enabled_get(void)
{
return _elm_config->thumbscroll_enable;
}
EAPI void
elm_scroll_thumbscroll_enabled_set(Eina_Bool enabled)
{
_elm_config->thumbscroll_enable = enabled;
}
EAPI unsigned int
elm_scroll_thumbscroll_threshold_get(void)
{
return _elm_config->thumbscroll_threshold;
}
EAPI void
elm_scroll_thumbscroll_threshold_set(unsigned int threshold)
{
_elm_config->thumbscroll_threshold = threshold;
}
EAPI double
elm_scroll_thumbscroll_momentum_threshold_get(void)
{
return _elm_config->thumbscroll_momentum_threshold;
}
EAPI void
elm_scroll_thumbscroll_momentum_threshold_set(double threshold)
{
_elm_config->thumbscroll_momentum_threshold = threshold;
}
EAPI double
elm_scroll_thumbscroll_friction_get(void)
{
return _elm_config->thumbscroll_friction;
}
EAPI void
elm_scroll_thumbscroll_friction_set(double friction)
{
_elm_config->thumbscroll_friction = friction;
}
EAPI double
elm_scroll_thumbscroll_border_friction_get(void)
{
return _elm_config->thumbscroll_border_friction;
}
EAPI void
elm_scroll_thumbscroll_border_friction_set(double friction)
{
if (friction < 0.0) friction = 0.0;
if (friction > 1.0) friction = 1.0;
_elm_config->thumbscroll_friction = friction;
}
EAPI double
elm_scroll_thumbscroll_sensitivity_friction_get(void)
{
return _elm_config->thumbscroll_sensitivity_friction;
}
EAPI void
elm_scroll_thumbscroll_sensitivity_friction_set(double friction)
{
if (friction < 0.1) friction = 0.1;
if (friction > 1.0) friction = 1.0;
_elm_config->thumbscroll_friction = friction;
}
EAPI void
elm_object_scroll_hold_push(Evas_Object *obj)
{
@ -1869,15 +1356,15 @@ elm_object_tree_dot_dump(const Evas_Object *top,
}
EAPI void
elm_longpress_timeout_set(double longpress_timeout)
elm_coords_finger_size_adjust(int times_w,
Evas_Coord *w,
int times_h,
Evas_Coord *h)
{
_elm_config->longpress_timeout = longpress_timeout;
}
EAPI double
elm_longpress_timeout_get(void)
{
return _elm_config->longpress_timeout;
if ((w) && (*w < (_elm_config->finger_size * times_w)))
*w = _elm_config->finger_size * times_w;
if ((h) && (*h < (_elm_config->finger_size * times_h)))
*h = _elm_config->finger_size * times_h;
}
EAPI Evas_Object *