summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorGustavo Lima Chaves <glima@profusion.mobi>2010-11-22 06:56:06 +0000
committerGustavo Lima Chaves <glima@profusion.mobi>2010-11-22 06:56:06 +0000
commite15e4b09930e79cf5917840dd998fe111d999872 (patch)
treed36a1b4a90974bf37e9e1e802353a6f0d77d419a /src/bin
parentc9a51810c870f5f242d6c3187cd620d4cb901342 (diff)
Elm caching settings exposed, part I.
Now working on exposing edje caching too, and having a cache dumping poller. Patch also replaces some focus_overalay object functions, too. SVN revision: 54770
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/config.c115
1 files changed, 114 insertions, 1 deletions
diff --git a/src/bin/config.c b/src/bin/config.c
index 4ab0b1353..b20d65130 100644
--- a/src/bin/config.c
+++ b/src/bin/config.c
@@ -119,6 +119,46 @@ config_exit(void *data __UNUSED__,
119} 119}
120 120
121static void 121static void
122fc_round(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
123{
124 double val = elm_slider_value_get(obj);
125 double v;
126
127 v = ((double)((int)(val * 10.0))) / 10.0;
128 if (v != val) elm_slider_value_set(obj, v);
129}
130
131static void
132fc_change(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
133{
134 double font_cache = elm_font_cache_get();
135 double val = elm_slider_value_get(obj);
136
137 if (font_cache == val) return;
138 elm_font_cache_all_set(val * 1024);
139}
140
141static void
142ic_round(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
143{
144 double val = elm_slider_value_get(obj);
145 double v;
146
147 v = ((double)((int)(val * 10.0))) / 10.0;
148 if (v != val) elm_slider_value_set(obj, v);
149}
150
151static void
152ic_change(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
153{
154 double image_cache = elm_image_cache_get();
155 double val = elm_slider_value_get(obj);
156
157 if (image_cache == val) return;
158 elm_image_cache_all_set(val * 1024);
159}
160
161static void
122sc_round(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__) 162sc_round(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
123{ 163{
124 double val = elm_slider_value_get(obj); 164 double val = elm_slider_value_get(obj);
@@ -1993,7 +2033,80 @@ _status_config_rendering(Evas_Object *win, Evas_Object *pager)
1993static void 2033static void
1994_status_config_caches(Evas_Object *win, Evas_Object *pager) 2034_status_config_caches(Evas_Object *win, Evas_Object *pager)
1995{ 2035{
1996 _unimplemented(win, pager, "caches"); 2036 Evas_Object *lb, *pd, *bx, *sl, *sp;
2037
2038 bx = elm_box_add(win);
2039 evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, 0.0);
2040 evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, 0.5);
2041
2042 pd = elm_frame_add(win);
2043 evas_object_size_hint_weight_set(pd, EVAS_HINT_EXPAND, 0.0);
2044 evas_object_size_hint_align_set(pd, EVAS_HINT_FILL, 0.5);
2045 elm_object_style_set(pd, "pad_medium");
2046 elm_box_pack_end(bx, pd);
2047 evas_object_show(pd);
2048
2049 lb = elm_label_add(win);
2050 evas_object_size_hint_weight_set(lb, EVAS_HINT_EXPAND, 0.0);
2051 evas_object_size_hint_align_set(lb, EVAS_HINT_FILL, 0.5);
2052 elm_label_label_set(lb,"<hilight>Font Cache Size</>");
2053 elm_frame_content_set(pd, lb);
2054 evas_object_show(lb);
2055
2056 sl = elm_slider_add(win);
2057 evas_object_data_set(win, "font_cache_slider", sl);
2058 evas_object_size_hint_weight_set(sl, EVAS_HINT_EXPAND, 0.0);
2059 evas_object_size_hint_align_set(sl, EVAS_HINT_FILL, 0.5);
2060 elm_slider_span_size_set(sl, 120);
2061 elm_slider_unit_format_set(sl, "%1.1f");
2062 elm_slider_indicator_format_set(sl, "%1.1f MB");
2063 elm_slider_min_max_set(sl, 0.0, 4.0);
2064 elm_slider_value_set(sl, (double)elm_font_cache_get() / 1024);
2065 elm_box_pack_end(bx, sl);
2066 evas_object_show(sl);
2067
2068 evas_object_smart_callback_add(sl, "changed", fc_round, NULL);
2069 evas_object_smart_callback_add(sl, "delay,changed", fc_change, NULL);
2070
2071 sp = elm_separator_add(win);
2072 elm_separator_horizontal_set(sp, 1);
2073 evas_object_size_hint_weight_set(sp, EVAS_HINT_EXPAND, 0.0);
2074 evas_object_size_hint_align_set(sp, EVAS_HINT_FILL, 0.5);
2075 elm_box_pack_end(bx, sp);
2076 evas_object_show(sp);
2077
2078 pd = elm_frame_add(win);
2079 evas_object_size_hint_weight_set(pd, EVAS_HINT_EXPAND, 0.0);
2080 evas_object_size_hint_align_set(pd, EVAS_HINT_FILL, 0.5);
2081 elm_object_style_set(pd, "pad_medium");
2082 elm_box_pack_end(bx, pd);
2083 evas_object_show(pd);
2084
2085 lb = elm_label_add(win);
2086 evas_object_size_hint_weight_set(lb, EVAS_HINT_EXPAND, 0.0);
2087 evas_object_size_hint_align_set(lb, EVAS_HINT_FILL, 0.5);
2088 elm_label_label_set(lb, "<hilight>Image Cache Size</><br>");
2089 elm_frame_content_set(pd, lb);
2090 evas_object_show(lb);
2091
2092 sl = elm_slider_add(win);
2093 evas_object_data_set(win, "image_cache_slider", sl);
2094 evas_object_size_hint_weight_set(sl, EVAS_HINT_EXPAND, 0.0);
2095 evas_object_size_hint_align_set(sl, EVAS_HINT_FILL, 0.5);
2096 elm_slider_span_size_set(sl, 120);
2097 elm_slider_unit_format_set(sl, "%1.0f");
2098 elm_slider_indicator_format_set(sl, "%1.0f MB");
2099 elm_slider_min_max_set(sl, 0, 32);
2100 elm_slider_value_set(sl, (double)elm_image_cache_get() / 1024);
2101 elm_box_pack_end(bx, sl);
2102 evas_object_show(sl);
2103
2104 evas_object_smart_callback_add(sl, "changed", ic_round, NULL);
2105 evas_object_smart_callback_add(sl, "delay,changed", ic_change, NULL);
2106
2107 evas_object_data_set(win, "caches", bx);
2108
2109 elm_pager_content_push(pager, bx);
1997} 2110}
1998 2111
1999static void 2112static void