Rename elm_cache API with common prefix.

Signed-off-by: Sanjeev BA <iamsanjeev@gmail.com>

SVN revision: 68564
This commit is contained in:
Sanjeev BA 2012-03-01 06:05:54 +00:00
parent 78ae3dc90b
commit 347db44573
4 changed files with 166 additions and 33 deletions

View File

@ -454,11 +454,11 @@ fc_change(void *data __UNUSED__,
Evas_Object *obj,
void *event_info __UNUSED__)
{
double font_cache = elm_font_cache_get();
double font_cache = elm_cache_font_cache_size_get();
double val = elm_slider_value_get(obj);
if (font_cache == val) return;
elm_font_cache_set(val * 1024);
elm_cache_font_cache_size_set(val * 1024);
elm_config_all_flush();
}
@ -479,11 +479,11 @@ ic_change(void *data __UNUSED__,
Evas_Object *obj,
void *event_info __UNUSED__)
{
double image_cache = elm_image_cache_get();
double image_cache = elm_cache_image_cache_size_get();
double val = elm_slider_value_get(obj);
if (image_cache == val) return;
elm_image_cache_set(val * 1024);
elm_cache_image_cache_size_set(val * 1024);
elm_config_all_flush();
}
@ -554,11 +554,11 @@ efc_change(void *data __UNUSED__,
Evas_Object *obj,
void *event_info __UNUSED__)
{
double efc = elm_edje_file_cache_get();
double efc = elm_cache_edje_file_cache_size_get();
double val = elm_slider_value_get(obj);
if (efc == val) return;
elm_edje_file_cache_set(val);
elm_cache_edje_file_cache_size_set(val);
elm_config_all_flush();
}
@ -579,11 +579,11 @@ ecc_change(void *data __UNUSED__,
Evas_Object *obj,
void *event_info __UNUSED__)
{
double ecc = elm_edje_collection_cache_get();
double ecc = elm_cache_edje_collection_cache_size_get();
double val = elm_slider_value_get(obj);
if (ecc == val) return;
elm_edje_collection_cache_set(val);
elm_cache_edje_collection_cache_size_set(val);
elm_config_all_flush();
}
@ -916,10 +916,10 @@ _config_display_update(Evas_Object *win)
scale = elm_scale_get();
fs = elm_finger_size_get();
flush_interval = elm_cache_flush_interval_get();
font_c = elm_font_cache_get();
image_c = elm_image_cache_get();
edje_file_c = elm_edje_file_cache_get();
edje_col_c = elm_edje_collection_cache_get();
font_c = elm_cache_font_cache_size_get();
image_c = elm_cache_image_cache_size_get();
edje_file_c = elm_cache_edje_file_cache_size_get();
edje_col_c = elm_cache_edje_collection_cache_size_get();
s_bounce = elm_scroll_bounce_enabled_get();
s_bounce_friction = elm_scroll_bounce_friction_get();
@ -2872,7 +2872,7 @@ _status_config_caches(Evas_Object *win,
elm_slider_unit_format_set(sl, "%1.1f MB");
elm_slider_indicator_format_set(sl, "%1.1f");
elm_slider_min_max_set(sl, 0.0, 4.0);
elm_slider_value_set(sl, (double)elm_font_cache_get() / 1024.0);
elm_slider_value_set(sl, (double)elm_cache_font_cache_size_get() / 1024.0);
elm_box_pack_end(bx, sl);
evas_object_show(sl);
@ -2896,7 +2896,7 @@ _status_config_caches(Evas_Object *win,
elm_slider_unit_format_set(sl, "%1.0f MB");
elm_slider_indicator_format_set(sl, "%1.0f");
elm_slider_min_max_set(sl, 0, 32);
elm_slider_value_set(sl, (double)elm_image_cache_get() / 1024.0);
elm_slider_value_set(sl, (double)elm_cache_image_cache_size_get() / 1024.0);
elm_box_pack_end(bx, sl);
evas_object_show(sl);
@ -2920,7 +2920,7 @@ _status_config_caches(Evas_Object *win,
elm_slider_unit_format_set(sl, "%1.0f files");
elm_slider_indicator_format_set(sl, "%1.0f");
elm_slider_min_max_set(sl, 0, 32);
elm_slider_value_set(sl, elm_edje_file_cache_get());
elm_slider_value_set(sl, elm_cache_edje_file_cache_size_get());
elm_box_pack_end(bx, sl);
evas_object_show(sl);
@ -2944,7 +2944,7 @@ _status_config_caches(Evas_Object *win,
elm_slider_unit_format_set(sl, "%1.0f collections");
elm_slider_indicator_format_set(sl, "%1.0f");
elm_slider_min_max_set(sl, 0, 128);
elm_slider_value_set(sl, elm_edje_collection_cache_get());
elm_slider_value_set(sl, elm_cache_edje_collection_cache_size_get());
elm_box_pack_end(bx, sl);
evas_object_show(sl);

View File

@ -88,8 +88,7 @@ EAPI void elm_cache_flush_enabled_set(Eina_Bool enabled);
* @return The font cache size
* @ingroup Caches
*/
// XXX: how about using elm_cache prefix for all following APIs???
EAPI int elm_font_cache_get(void);
EAPI int elm_cache_font_cache_size_get(void);
/**
* Set the configured font cache size
@ -99,7 +98,7 @@ EAPI int elm_font_cache_get(void);
* @param size The font cache size
* @ingroup Caches
*/
EAPI void elm_font_cache_set(int size);
EAPI void elm_cache_font_cache_size_set(int size);
/**
* Get the configured image cache size
@ -109,7 +108,7 @@ EAPI void elm_font_cache_set(int size);
* @return The image cache size
* @ingroup Caches
*/
EAPI int elm_image_cache_get(void);
EAPI int elm_cache_image_cache_size_get(void);
/**
* Set the configured image cache size
@ -119,7 +118,7 @@ EAPI int elm_image_cache_get(void);
* @param size The image cache size
* @ingroup Caches
*/
EAPI void elm_image_cache_set(int size);
EAPI void elm_cache_image_cache_size_set(int size);
/**
@ -131,7 +130,7 @@ EAPI void elm_image_cache_set(int size);
* @return The edje file cache size
* @ingroup Caches
*/
EAPI int elm_edje_file_cache_get(void);
EAPI int elm_cache_edje_file_cache_size_get(void);
/**
* Set the configured edje file cache size
@ -142,7 +141,7 @@ EAPI int elm_edje_file_cache_get(void);
* @param size The edje file cache size
* @ingroup Caches
*/
EAPI void elm_edje_file_cache_set(int size);
EAPI void elm_cache_edje_file_cache_size_set(int size);
/**
* Get the configured edje collections (groups) cache size.
@ -153,7 +152,7 @@ EAPI void elm_edje_file_cache_set(int size);
* @return The edje collections cache size
* @ingroup Caches
*/
EAPI int elm_edje_collection_cache_get(void);
EAPI int elm_cache_edje_collection_cache_size_get(void);
/**
* Set the configured edje collections (groups) cache size
@ -164,7 +163,7 @@ EAPI int elm_edje_collection_cache_get(void);
* @param size The edje collections cache size
* @ingroup Caches
*/
EAPI void elm_edje_collection_cache_set(int size);
EAPI void elm_cache_edje_collection_cache_size_set(int size);
/**
* @}

View File

@ -4420,6 +4420,92 @@ EINA_DEPRECATED EAPI Eina_Bool elm_calendar_day_selection_enabled_get
*/
typedef _Elm_Calendar_Mark_Repeat_Type Elm_Calendar_Mark_Repeat EINA_DEPRECATED;
/**
* Get the configured font cache size
*
* This gets the globally configured font cache size, in bytes.
*
* @return The font cache size
* @deprecated elm_cache_font_cache_size_get(void);
*/
EINA_DEPRECATED EAPI int elm_font_cache_get(void);
/**
* Set the configured font cache size
*
* This sets the globally configured font cache size, in bytes
*
* @param size The font cache size
* @deprecated elm_cache_font_cache_size_set(int size);
*/
EINA_DEPRECATED EAPI void elm_font_cache_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
*/
EINA_DEPRECATED EAPI int elm_image_cache_get(void);
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
* @deprecated Use elm_cache_image_cache_size_set(int size);
*/
EINA_DEPRECATED EAPI void elm_image_cache_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
* @deprecated Use elm_cache_edje_file_cache_size_get(void);
*/
EINA_DEPRECATED EAPI int elm_edje_file_cache_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
* @deprecated Use elm_cache_edje_file_cache_size_get(int size);
*/
EINA_DEPRECATED EAPI void elm_edje_file_cache_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
* @deprecated Use elm_cache_edje_collection_cache_size_get(void);
*/
EINA_DEPRECATED EAPI int elm_edje_collection_cache_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
* @deprecated elm_cache_edje_collection_cache_size_set(int size);
*/
EINA_DEPRECATED EAPI void elm_edje_collection_cache_set(int size);
/**
* @}
*/

View File

@ -1358,14 +1358,26 @@ elm_cache_flush_enabled_set(Eina_Bool enabled)
_elm_recache();
}
EAPI int
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;
}
EAPI void
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;
@ -1373,14 +1385,26 @@ elm_font_cache_set(int size)
_elm_recache();
}
EAPI int
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;
}
EAPI void
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;
@ -1388,14 +1412,26 @@ elm_image_cache_set(int size)
_elm_recache();
}
EAPI int
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;
}
EAPI void
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;
@ -1403,14 +1439,26 @@ elm_edje_file_cache_set(int size)
_elm_recache();
}
EAPI int
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;
}
EAPI void
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;