Rename elm_cache API with common prefix.
authorsanjeev <sanjeev@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 1 Mar 2012 06:05:54 +0000 (06:05 +0000)
committersanjeev <sanjeev@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 1 Mar 2012 06:05:54 +0000 (06:05 +0000)
Signed-off-by: Sanjeev BA <iamsanjeev@gmail.com>
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@68564 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/bin/config.c
src/lib/elm_cache.h
src/lib/elm_deprecated.h
src/lib/elm_main.c

index 4faf87b..2b00423 100644 (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);
 
index 39a02c9..a0c59c7 100644 (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);
 
 /**
  * @}
index 55e2682..64e6954 100644 (file)
@@ -4421,5 +4421,91 @@ 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);
+
+/**
  * @}
  */
index 3a90c76..031dae3 100644 (file)
@@ -1358,60 +1358,108 @@ 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;
 
    _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;
 
    _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;
 
    _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;