summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSangHyeon Lee <dltkdgus1764@gmail.com>2015-06-25 16:28:07 +0200
committerCedric BAIL <cedric@osg.samsung.com>2015-06-25 17:24:08 +0200
commit0710c5ee6425e4514e7b3f87a075052792956ecf (patch)
treee0f154ba173077a0e5920114d9bc89c5deb90c93
parent1fa9c23544617907caf0e706c74545117f034c7d (diff)
gengrid: add item cache in gengrid for efficient realize/unrealize operation.
Summary: gengrid realize/unrealize items each smart calculation if their posiiton is updated. This concept will be occurred useless view object creation and deletion. So instead of delete items in unrealize function, push item cache into cache list, and pop item cache from cache list in realize function to reuse item view object more efficiently. the cache concept is already implemented in genlist widget and this patch is improved item cache of genlist cache. @feature ``` NOTICE: This patch is written under the D2561 Patch which add elm_gengrid_item_fields_update. So it must submitted after D2561. ``` Test Plan: I've tested below three cases, 1. tested ith this patch in elementary_test and checked all gengrid features are working properly. 2. tested with changing CACHE_MAX to another value which is set 40 in default and checked all gengrid features are working properly. 3. tested with set it->item->nocache true, and checked cache is never generated and checked all gengrid features are working properly. Reviewers: raster, Hermet, seoz, jaehwan, singh.amitesh Subscribers: eagleeye, singh.amitesh, Jaehyun Differential Revision: https://phab.enlightenment.org/D2641 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
-rw-r--r--src/bin/test.c2
-rw-r--r--src/bin/test_gengrid.c261
-rw-r--r--src/lib/elm_gengrid.c520
-rw-r--r--src/lib/elm_gengrid_common.h17
-rw-r--r--src/lib/elm_gengrid_item.eo23
-rw-r--r--src/lib/elm_widget_gengrid.h17
6 files changed, 744 insertions, 96 deletions
diff --git a/src/bin/test.c b/src/bin/test.c
index 443d69c69..04fb02d08 100644
--- a/src/bin/test.c
+++ b/src/bin/test.c
@@ -140,6 +140,7 @@ void test_gengrid5(void *data, Evas_Object *obj, void *event_info);
140void test_gengrid_item_styles(void *data, Evas_Object *obj, void *event_info); 140void test_gengrid_item_styles(void *data, Evas_Object *obj, void *event_info);
141void test_gengrid_speed(void *data, Evas_Object *obj, void *event_info); 141void test_gengrid_speed(void *data, Evas_Object *obj, void *event_info);
142void test_gengrid_focus(void *data, Evas_Object *obj, void *event_info); 142void test_gengrid_focus(void *data, Evas_Object *obj, void *event_info);
143void test_gengrid_update(void *data, Evas_Object *obj, void *event_info);
143void test_win_state(void *data, Evas_Object *obj, void *event_info); 144void test_win_state(void *data, Evas_Object *obj, void *event_info);
144void test_win_state2(void *data, Evas_Object *obj, void *event_info); 145void test_win_state2(void *data, Evas_Object *obj, void *event_info);
145void test_progressbar(void *data, Evas_Object *obj, void *event_info); 146void test_progressbar(void *data, Evas_Object *obj, void *event_info);
@@ -695,6 +696,7 @@ add_tests:
695 ADD_TEST(NULL, "Lists - Gengrid", "GenGrid Item Styles", test_gengrid_item_styles); 696 ADD_TEST(NULL, "Lists - Gengrid", "GenGrid Item Styles", test_gengrid_item_styles);
696 ADD_TEST(NULL, "Lists - Gengrid", "Gengrid Update Speed", test_gengrid_speed); 697 ADD_TEST(NULL, "Lists - Gengrid", "Gengrid Update Speed", test_gengrid_speed);
697 ADD_TEST(NULL, "Lists - Gengrid", "GenGrid Focus", test_gengrid_focus); 698 ADD_TEST(NULL, "Lists - Gengrid", "GenGrid Focus", test_gengrid_focus);
699 ADD_TEST(NULL, "Lists - Gengrid", "GenGrid Update", test_gengrid_update);
698 700
699 //------------------------------// 701 //------------------------------//
700 ADD_TEST(NULL, "General", "Scaling", test_scaling); 702 ADD_TEST(NULL, "General", "Scaling", test_scaling);
diff --git a/src/bin/test_gengrid.c b/src/bin/test_gengrid.c
index 99ef7feb3..ffd4857bc 100644
--- a/src/bin/test_gengrid.c
+++ b/src/bin/test_gengrid.c
@@ -29,6 +29,7 @@ struct _api_data
29 unsigned int state; /* What state we are testing */ 29 unsigned int state; /* What state we are testing */
30 Evas_Object *box; /* Use this to get box content */ 30 Evas_Object *box; /* Use this to get box content */
31 Evas_Object *grid; 31 Evas_Object *grid;
32 Elm_Gengrid_Item_Field_Type field_type;
32}; 33};
33typedef struct _api_data api_data; 34typedef struct _api_data api_data;
34 35
@@ -1848,3 +1849,263 @@ test_gengrid_focus(void *data EINA_UNUSED,
1848 evas_object_resize(win, 600, 600); 1849 evas_object_resize(win, 600, 600);
1849 evas_object_show(win); 1850 evas_object_show(win);
1850} 1851}
1852
1853char *
1854_gg_update_text_get(void *data EINA_UNUSED,
1855 Evas_Object *obj EINA_UNUSED,
1856 const char *part EINA_UNUSED)
1857{
1858 char *txt[] = {"Sky", "Stone", "Water", "Flower", "Sand", "Sun", "Moon", "Star", "Cloud", NULL};
1859 int n = rand() % 9;
1860
1861 return strdup(txt[n]);
1862}
1863
1864Evas_Object *
1865_gg_update_content_get(void *data, Evas_Object *obj, const char *part)
1866{
1867 const Item_Data *id = data;
1868 char buf[256];
1869 int n = 0;
1870
1871 if (!strcmp(part, "elm.swallow.icon"))
1872 {
1873 n = rand() % 9;
1874
1875 Evas_Object *image = elm_image_add(obj);
1876 snprintf(buf, sizeof(buf), "%s/images/%s", elm_app_data_dir_get(), img[n]);
1877 elm_image_file_set(image, buf, NULL);
1878 elm_image_aspect_fixed_set(image, EINA_FALSE);
1879 evas_object_show(image);
1880 return image;
1881 }
1882 else if (!strcmp(part, "elm.swallow.end"))
1883 {
1884 Evas_Object *ck = elm_check_add(obj);
1885 evas_object_propagate_events_set(ck, EINA_FALSE);
1886 elm_check_state_set(ck, id->onoff);
1887 evas_object_smart_callback_add(ck, "changed", grid_item_check_changed, data);
1888 evas_object_show(ck);
1889 return ck;
1890 }
1891 return NULL;
1892}
1893
1894Eina_Bool
1895_gg_update_state_get(void *data EINA_UNUSED,
1896 Evas_Object *obj EINA_UNUSED,
1897 const char *part EINA_UNUSED)
1898{
1899 return EINA_FALSE;
1900}
1901
1902static void
1903_gg_item_update_clicked_cb(void *data,
1904 Evas_Object *obj EINA_UNUSED,
1905 void *event_info EINA_UNUSED)
1906{
1907 api_data *api = (api_data *)data;
1908
1909 Evas_Object *gengrid = api->grid;
1910 Eina_List *l = elm_gengrid_realized_items_get(gengrid);
1911 Elm_Object_Item *item = NULL;
1912 Item_Data *id = NULL;
1913
1914 EINA_LIST_FREE(l, item)
1915 {
1916 id = elm_object_item_data_get(item);
1917 if (id && id->onoff) elm_gengrid_item_update(item);
1918 }
1919}
1920
1921static void
1922_gg_item_fields_update_clicked_cb(void *data,
1923 Evas_Object *obj EINA_UNUSED,
1924 void *event_info EINA_UNUSED)
1925{
1926 api_data *api = (api_data *)data;
1927
1928 Evas_Object *gengrid = api->grid;
1929 Eina_List *l = elm_gengrid_realized_items_get(gengrid);
1930 Elm_Object_Item *item = NULL;
1931 Item_Data *id = NULL;
1932
1933 EINA_LIST_FREE(l, item)
1934 {
1935 id = elm_object_item_data_get(item);
1936 if (id && id->onoff)
1937 {
1938 elm_gengrid_item_fields_update(item, "*", api->field_type);
1939 }
1940 }
1941}
1942
1943static void
1944_gg_text_update_changed_cb(void *data,
1945 Evas_Object *obj,
1946 void *event_info EINA_UNUSED)
1947{
1948 api_data *api = (api_data *)data;
1949
1950 if (elm_check_state_get(obj))
1951 api->field_type |= ELM_GENGRID_ITEM_FIELD_TEXT;
1952 else
1953 api->field_type ^= ELM_GENGRID_ITEM_FIELD_TEXT;
1954}
1955
1956static void
1957_gg_content_update_changed_cb(void *data,
1958 Evas_Object *obj,
1959 void *event_info EINA_UNUSED)
1960{
1961 api_data *api = (api_data *)data;
1962
1963 if (elm_check_state_get(obj))
1964 api->field_type |= ELM_GENGRID_ITEM_FIELD_CONTENT;
1965 else
1966 api->field_type ^= ELM_GENGRID_ITEM_FIELD_CONTENT;
1967}
1968
1969static void
1970_gg_state_update_changed_cb(void *data,
1971 Evas_Object *obj,
1972 void *event_info EINA_UNUSED)
1973{
1974 api_data *api = (api_data *)data;
1975
1976 if (elm_check_state_get(obj))
1977 api->field_type |= ELM_GENGRID_ITEM_FIELD_STATE;
1978 else
1979 api->field_type ^= ELM_GENGRID_ITEM_FIELD_STATE;
1980}
1981
1982void
1983test_gengrid_update(void *data EINA_UNUSED,
1984 Evas_Object *obj EINA_UNUSED,
1985 void *event_info EINA_UNUSED)
1986{
1987 Evas_Object *win, *bx, *gengrid, *btn, *fr, *bx_opt, *ck;
1988 Elm_Gengrid_Item_Class *ic;
1989 api_data *api = calloc(1, sizeof(api_data));
1990 Item_Data *id;
1991 int i;
1992
1993 win = elm_win_util_standard_add("gengrid-update", "Gengrid Update");
1994 elm_win_autodel_set(win, EINA_TRUE);
1995
1996 api->box = bx = elm_box_add(win);
1997 evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
1998 evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, EVAS_HINT_FILL);
1999 elm_win_resize_object_add(win, bx);
2000 evas_object_show(bx);
2001
2002 api->grid = gengrid = elm_gengrid_add(bx);
2003 elm_gengrid_item_size_set(gengrid,
2004 ELM_SCALE_SIZE(150),
2005 ELM_SCALE_SIZE(150));
2006 evas_object_size_hint_weight_set(gengrid, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
2007 evas_object_size_hint_align_set(gengrid, EVAS_HINT_FILL, EVAS_HINT_FILL);
2008 elm_box_pack_end(bx, gengrid);
2009 evas_object_show(gengrid);
2010 evas_object_smart_callback_add(gengrid, "item,focused", _gengrid_focus_item_cb, "item,focused");
2011 evas_object_smart_callback_add(gengrid, "item,unfocused", _gengrid_focus_item_cb, "item,unfocused");
2012 evas_object_smart_callback_add(gengrid, "selected", _gengrid_focus_item_cb, "selected");
2013 evas_object_smart_callback_add(gengrid, "unselected", _gengrid_focus_item_cb, "unselected");
2014 evas_object_smart_callback_add(gengrid, "activated", _gengrid_focus_item_cb, "activated");
2015 evas_object_smart_callback_add(gengrid, "highlighted", _gengrid_focus_item_cb, "highlighted");
2016 evas_object_smart_callback_add(gengrid, "unhighlighted", _gengrid_focus_item_cb, "unhighlighted");
2017 evas_object_event_callback_add(gengrid, EVAS_CALLBACK_KEY_DOWN, _gengrid_focus_key_down_cb, NULL);
2018
2019 //initialize field type
2020 api->field_type = ELM_GENGRID_ITEM_FIELD_ALL;
2021
2022 //Field Options
2023 fr = elm_frame_add(bx);
2024 elm_object_text_set(fr, "Field Options");
2025 evas_object_size_hint_weight_set(fr, EVAS_HINT_EXPAND, 0.0);
2026 evas_object_size_hint_align_set(fr, EVAS_HINT_FILL, EVAS_HINT_FILL);
2027 elm_box_pack_end(bx, fr);
2028 evas_object_show(fr);
2029
2030 bx_opt = elm_box_add(fr);
2031 elm_box_horizontal_set(bx_opt, EINA_TRUE);
2032 elm_object_content_set(fr, bx_opt);
2033 evas_object_show(bx_opt);
2034
2035 ck = elm_check_add(bx_opt);
2036 elm_object_text_set(ck, "TEXT");
2037 elm_check_state_set(ck, EINA_FALSE);
2038 evas_object_size_hint_weight_set(ck, EVAS_HINT_EXPAND, 0.0);
2039 evas_object_smart_callback_add(ck, "changed",
2040 _gg_text_update_changed_cb,
2041 api);
2042 elm_box_pack_end(bx_opt, ck);
2043 evas_object_show(ck);
2044
2045 ck = elm_check_add(bx_opt);
2046 elm_object_text_set(ck, "CONTENT");
2047 elm_check_state_set(ck, EINA_FALSE);
2048 evas_object_size_hint_weight_set(ck, EVAS_HINT_EXPAND, 0.0);
2049 evas_object_smart_callback_add(ck, "changed",
2050 _gg_content_update_changed_cb,
2051 api);
2052 elm_box_pack_end(bx_opt, ck);
2053 evas_object_show(ck);
2054
2055 ck = elm_check_add(bx_opt);
2056 elm_object_text_set(ck, "STATE");
2057 elm_check_state_set(ck, EINA_FALSE);
2058 evas_object_size_hint_weight_set(ck, EVAS_HINT_EXPAND, 0.0);
2059 evas_object_smart_callback_add(ck, "changed",
2060 _gg_state_update_changed_cb,
2061 api);
2062 elm_box_pack_end(bx_opt, ck);
2063 evas_object_show(ck);
2064
2065 //Update Buttons
2066 fr = elm_frame_add(bx);
2067 elm_object_text_set(fr, "Update Options");
2068 evas_object_size_hint_weight_set(fr, EVAS_HINT_EXPAND, 0.0);
2069 evas_object_size_hint_align_set(fr, EVAS_HINT_FILL, EVAS_HINT_FILL);
2070 elm_box_pack_end(bx, fr);
2071 evas_object_show(fr);
2072
2073 bx_opt = elm_box_add(fr);
2074 elm_box_horizontal_set(bx_opt, EINA_TRUE);
2075 elm_object_content_set(fr, bx_opt);
2076 evas_object_show(bx_opt);
2077
2078 btn = elm_button_add(bx_opt);
2079 elm_object_text_set(btn, "Update");
2080 evas_object_smart_callback_add(btn, "clicked", _gg_item_update_clicked_cb, api);
2081 elm_box_pack_end(bx_opt, btn);
2082 evas_object_show(btn);
2083
2084 btn = elm_button_add(bx_opt);
2085 elm_object_text_set(btn, "Fields Update");
2086 evas_object_smart_callback_add(btn, "clicked", _gg_item_fields_update_clicked_cb, api);
2087 elm_box_pack_end(bx_opt, btn);
2088 evas_object_show(btn);
2089
2090
2091 //Gengrid Item Append
2092 ic = elm_gengrid_item_class_new();
2093 ic->item_style = "default";
2094 ic->func.text_get = _gg_update_text_get;
2095 ic->func.content_get = _gg_update_content_get;
2096 ic->func.state_get = _gg_update_state_get;
2097 ic->func.del = grid_del;
2098
2099 for (i = 0; i < 24; i++)
2100 {
2101 id = calloc(1, sizeof(Item_Data));
2102 id->mode = i;
2103 id->item = elm_gengrid_item_append(gengrid, ic, id, NULL, NULL);
2104 if (i == 4)
2105 elm_object_item_disabled_set(id->item, EINA_TRUE);
2106 }
2107 elm_gengrid_item_class_free(ic);
2108
2109 evas_object_resize(win, 600, 600);
2110 evas_object_show(win);
2111}
diff --git a/src/lib/elm_gengrid.c b/src/lib/elm_gengrid.c
index 0c12c9bb9..e8a7fde35 100644
--- a/src/lib/elm_gengrid.c
+++ b/src/lib/elm_gengrid.c
@@ -34,6 +34,8 @@
34#define PRELOAD 1 34#define PRELOAD 1
35#define REORDER_EFFECT_TIME 0.5 35#define REORDER_EFFECT_TIME 0.5
36 36
37#define CACHE_MAX 40
38
37EAPI const char ELM_GENGRID_SMART_NAME[] = "elm_gengrid"; 39EAPI const char ELM_GENGRID_SMART_NAME[] = "elm_gengrid";
38EAPI const char ELM_GENGRID_PAN_SMART_NAME[] = "elm_gengrid_pan"; 40EAPI const char ELM_GENGRID_PAN_SMART_NAME[] = "elm_gengrid_pan";
39 41
@@ -93,6 +95,8 @@ static Eina_Bool _key_action_move(Evas_Object *obj, const char *params);
93static Eina_Bool _key_action_select(Evas_Object *obj, const char *params); 95static Eina_Bool _key_action_select(Evas_Object *obj, const char *params);
94static Eina_Bool _key_action_escape(Evas_Object *obj, const char *params); 96static Eina_Bool _key_action_escape(Evas_Object *obj, const char *params);
95static void _item_position_update(Eina_Inlist *list, int idx); 97static void _item_position_update(Eina_Inlist *list, int idx);
98static void _item_mouse_callbacks_add(Elm_Gen_Item *it, Evas_Object *view);
99static void _item_mouse_callbacks_del(Elm_Gen_Item *it, Evas_Object *view);
96 100
97 101
98static const Elm_Action key_actions[] = { 102static const Elm_Action key_actions[] = {
@@ -102,6 +106,168 @@ static const Elm_Action key_actions[] = {
102 {NULL, NULL} 106 {NULL, NULL}
103}; 107};
104 108
109
110//-- item cache handle routine --//
111// push item cache into caches
112static Eina_Bool
113_item_cache_push(Elm_Gengrid_Data *sd, Item_Cache *itc)
114{
115 if (!itc || (sd->item_cache_max <= 0))
116 return EINA_FALSE;
117
118 sd->item_cache_count++;
119 sd->item_cache =
120 eina_inlist_prepend(sd->item_cache, EINA_INLIST_GET(itc));
121
122 return EINA_TRUE;
123}
124
125// pop item cache from caches
126static Item_Cache *
127_item_cache_pop(Elm_Gengrid_Data *sd, Item_Cache *itc)
128{
129 if ((!itc) || (!sd->item_cache) ||
130 (sd->item_cache_count <= 0))
131 return NULL;
132
133 sd->item_cache =
134 eina_inlist_remove (sd->item_cache, EINA_INLIST_GET(itc));
135 sd->item_cache_count--;
136
137 return itc;
138}
139
140// free one item cache from caches
141static void
142_item_cache_free(Item_Cache *itc)
143{
144 if (!itc) return;
145
146 evas_object_del(itc->spacer);
147 evas_object_del(itc->base_view);
148 eina_stringshare_del(itc->item_style);
149 ELM_SAFE_FREE(itc ,free);
150}
151
152// clean up item cache by removing overflowed caches
153static void
154_item_cache_clean(Elm_Gengrid_Data *sd)
155{
156 evas_event_freeze(evas_object_evas_get(sd->obj));
157
158 while ((sd->item_cache) && (sd->item_cache_count > sd->item_cache_max))
159 {
160 Item_Cache *itc =
161 EINA_INLIST_CONTAINER_GET(sd->item_cache->last, Item_Cache);
162 _item_cache_free(_item_cache_pop(sd, itc));
163 }
164 evas_event_thaw(evas_object_evas_get(sd->obj));
165 evas_event_thaw_eval(evas_object_evas_get(sd->obj));
166}
167
168// empty all item caches
169static void
170_item_cache_zero(Elm_Gengrid_Data *sd)
171{
172 int pmax = sd->item_cache_max;
173
174 sd->item_cache_max = 0;
175 _item_cache_clean(sd);
176 sd->item_cache_max = pmax;
177}
178
179// add an item to item cache
180static Eina_Bool
181_item_cache_add(Elm_Gen_Item *it)
182{
183 if (it->item->nocache_once || it->item->nocache) return EINA_FALSE;
184
185 Item_Cache *itc = NULL;
186 ELM_GENGRID_DATA_GET_FROM_ITEM(it, sd);
187 Evas_Object *obj = sd->obj;
188
189 evas_event_freeze(evas_object_evas_get(obj));
190 if (sd->item_cache_max > 0)
191 itc = ELM_NEW(Item_Cache);
192 if (!_item_cache_push(sd, itc))
193 {
194 if (itc) ELM_SAFE_FREE(itc, free);
195
196 evas_event_thaw(evas_object_evas_get(obj));
197 evas_event_thaw_eval(evas_object_evas_get(obj));
198 return EINA_FALSE;
199 }
200
201 itc->spacer = it->spacer;
202 itc->base_view = VIEW(it);
203 itc->item_style = eina_stringshare_add(it->itc->item_style);
204
205 if (!it->group)
206 {
207 Eina_Bool tmp;
208 if (it->selected)
209 edje_object_signal_emit(itc->base_view, "elm,state,unselected", "elm");
210 if (eo_do_ret(EO_OBJ(it), tmp, elm_wdg_item_disabled_get()))
211 edje_object_signal_emit(itc->base_view, "elm,state,enabled", "elm");
212 if (it == (Elm_Gen_Item *)sd->focused_item &&
213 elm_widget_focus_highlight_enabled_get(obj))
214 edje_object_signal_emit(itc->base_view, "elm,state,unfocused", "elm");
215
216 ELM_SAFE_FREE(it->long_timer, ecore_timer_del);
217 // FIXME: other callbacks?
218 _item_mouse_callbacks_del(it, itc->base_view);
219 }
220
221 edje_object_mirrored_set(VIEW(it),
222 elm_widget_mirrored_get(WIDGET(it)));
223 edje_object_scale_set(VIEW(it),
224 elm_widget_scale_get(WIDGET(it))
225 * elm_config_scale_get());
226
227 evas_object_hide(itc->base_view);
228 evas_object_move(itc->base_view, -9999, -9999);
229 it->spacer = NULL;
230 VIEW(it) = NULL;
231
232 _item_cache_clean(sd);
233
234 evas_event_thaw(evas_object_evas_get(obj));
235 evas_event_thaw_eval(evas_object_evas_get(obj));
236
237 return EINA_TRUE;
238}
239
240// find an item from item cache and remove it from the cache
241static Eina_Bool
242_item_cache_find(Elm_Gen_Item *it)
243{
244 if (it->item->nocache_once || it->item->nocache) return EINA_FALSE;
245
246 Item_Cache *itc = NULL;
247 Eina_Inlist *l;
248 ELM_GENGRID_DATA_GET_FROM_ITEM(it, sd);
249
250 EINA_INLIST_FOREACH_SAFE(sd->item_cache, l, itc)
251 {
252 if (((!it->itc->item_style) && (!itc->item_style)) ||
253 (it->itc->item_style && itc->item_style &&
254 (!strcmp(it->itc->item_style, itc->item_style))))
255 {
256 itc = _item_cache_pop(sd, itc);
257 if (!itc) continue;
258
259 it->spacer = itc->spacer;
260 VIEW(it) = itc->base_view;
261 itc->spacer = NULL;
262 itc->base_view = NULL;
263
264 _item_cache_free(itc);
265 return EINA_TRUE;
266 }
267 }
268 return EINA_FALSE;
269}
270
105static Eina_Bool 271static Eina_Bool
106_is_no_select(Elm_Gen_Item *it) 272_is_no_select(Elm_Gen_Item *it)
107{ 273{
@@ -614,11 +780,196 @@ _item_mouse_down_cb(void *data,
614} 780}
615 781
616static void 782static void
617_elm_gengrid_item_unrealize(Elm_Gen_Item *it, 783_item_text_realize(Elm_Gen_Item *it,
618 Eina_Bool calc) 784 Evas_Object *target,
785 Eina_List **source,
786 const char *parts)
619{ 787{
788 const Eina_List *l;
789 const char *key;
790 char *s;
791
792 if (!it->itc->func.text_get) return;
793
794 if (!(*source))
795 *source = elm_widget_stringlist_get
796 (edje_object_data_get(target, "texts"));
797 EINA_LIST_FOREACH(*source, l, key)
798 {
799 if (parts && fnmatch(parts, key, FNM_PERIOD)) continue;
800
801 s = it->itc->func.text_get
802 ((void *)WIDGET_ITEM_DATA_GET(EO_OBJ(it)), WIDGET(it), key);
803 if (s)
804 {
805 edje_object_part_text_escaped_set(target, key, s);
806 free(s);
807 }
808 else
809 {
810 edje_object_part_text_set(target, key, "");
811 }
812 if (_elm_config->atspi_mode)
813 elm_interface_atspi_accessible_name_changed_signal_emit(EO_OBJ(it));
814 }
815}
816
817static void
818_item_content_realize(Elm_Gen_Item *it,
819 Evas_Object *target,
820 Eina_List **contents,
821 const char *src,
822 const char *parts)
823{
824 Eina_Bool tmp;
620 Evas_Object *content; 825 Evas_Object *content;
621 826
827 if (!parts)
828 {
829 EINA_LIST_FREE(*contents, content)
830 evas_object_del(content);
831 }
832 if (it->itc->func.content_get)
833 {
834 Eina_List *source;
835 const char *key;
836
837 source = elm_widget_stringlist_get(edje_object_data_get(target, src));
838
839 EINA_LIST_FREE(source, key)
840 {
841 if (parts && fnmatch(parts, key, FNM_PERIOD))
842 continue;
843
844 Evas_Object *old = edje_object_part_swallow_get(target, key);
845 if (old)
846 {
847 *contents = eina_list_remove(*contents, old);
848 evas_object_del(old);
849 }
850 content = NULL;
851 if (it->itc->func.content_get)
852 content = it->itc->func.content_get
853 ((void *)WIDGET_ITEM_DATA_GET(EO_OBJ(it)), WIDGET(it), key);
854 if (!content) continue;
855 *contents = eina_list_append(*contents, content);
856 if (!edje_object_part_swallow(target, key, content))
857 {
858 ERR("%s (%p) can not be swallowed into %s",
859 evas_object_type_get(content), content, key);
860 evas_object_hide(content);
861 continue;
862 }
863 elm_widget_sub_object_add(WIDGET(it), content);
864 if (eo_do_ret(EO_OBJ(it), tmp, elm_wdg_item_disabled_get()))
865 elm_widget_disabled_set(content, EINA_TRUE);
866 }
867 }
868}
869
870static void
871_item_state_realize(Elm_Gen_Item *it, Evas_Object *target, const char *parts)
872{
873 Eina_List *src;
874 const char *key;
875 char buf[4096];
876
877 if (!it->itc->func.state_get) return;
878
879 src = elm_widget_stringlist_get(edje_object_data_get(target, "states"));
880 EINA_LIST_FREE(src, key)
881 {
882 if (parts && fnmatch(parts, key, FNM_PERIOD)) continue;
883
884 Eina_Bool on = it->itc->func.state_get
885 ((void *)WIDGET_ITEM_DATA_GET(EO_OBJ(it)), WIDGET(it), key);
886
887 if (on)
888 {
889 snprintf(buf, sizeof(buf), "elm,state,%s,active", key);
890 edje_object_signal_emit(target, buf, "elm");
891 }
892 else
893 {
894 snprintf(buf, sizeof(buf), "elm,state,%s,passive", key);
895 edje_object_signal_emit(target, buf, "elm");
896 }
897 }
898 edje_object_message_signal_process(target);
899}
900
901static void
902_view_inflate(Evas_Object *view, Elm_Gen_Item *it, Eina_List **sources,
903 Eina_List **contents)
904{
905 if (!view) return;
906 if (sources) _item_text_realize(it, view, sources, NULL);
907 if (contents) _item_content_realize(it, view, contents, "contents", NULL);
908 _item_state_realize(it, view, NULL);
909}
910
911/**
912 * Apply the right style for the created item view.
913 */
914static void
915_view_style_update(Elm_Gen_Item *it, Evas_Object *view, const char *style)
916{
917 char buf[1024];
918 ELM_GENGRID_DATA_GET_FROM_ITEM(it, sd);
919 snprintf(buf, sizeof(buf), "item/%s", style ? style : "default");
920
921 if (!elm_widget_theme_object_set(WIDGET(it), view,
922 "gengrid", buf,
923 elm_widget_style_get(WIDGET(it))))
924 {
925 ERR("%s is not a valid gengrid item style. "
926 "Automatically falls back into default style.",
927 style);
928 elm_widget_theme_object_set
929 (WIDGET(it), view, "gengrid", "item/default", "default");
930 }
931
932 edje_object_mirrored_set(view, elm_widget_mirrored_get(WIDGET(it)));
933 edje_object_scale_set(view, elm_widget_scale_get(WIDGET(it)) *
934 elm_config_scale_get());
935 evas_object_stack_below(view, sd->stack);
936}
937
938/**
939 * Create a VIEW(it) during _item_realize()
940 */
941static Evas_Object *
942_view_create(Elm_Gen_Item *it, const char *style)
943{
944 Evas_Object *view = edje_object_add(evas_object_evas_get(WIDGET(it)));
945 evas_object_smart_member_add(view, GG_IT(it)->wsd->pan_obj);
946 elm_widget_sub_object_add(WIDGET(it), view);
947 edje_object_scale_set(view, elm_widget_scale_get(WIDGET(it)) *
948 elm_config_scale_get());
949
950 _view_style_update(it, view, style);
951 return view;
952}
953
954static void
955_view_clear(Evas_Object *view, Eina_List **texts, Eina_List **contents)
956{
957 const char *part;
958 Evas_Object *c;
959 const Eina_List *l;
960
961 EINA_LIST_FOREACH(*texts, l, part)
962 edje_object_part_text_set(view, part, NULL);
963 ELM_SAFE_FREE(*texts, elm_widget_stringlist_free);
964
965 EINA_LIST_FREE(*contents, c)
966 evas_object_del(c);
967}
968
969static void
970_elm_gengrid_item_unrealize(Elm_Gen_Item *it,
971 Eina_Bool calc)
972{
622 if (!it->realized) return; 973 if (!it->realized) return;
623 if (GG_IT(it)->wsd->reorder_it == it) return; 974 if (GG_IT(it)->wsd->reorder_it == it) return;
624 975
@@ -626,13 +977,10 @@ _elm_gengrid_item_unrealize(Elm_Gen_Item *it,
626 if (!calc) 977 if (!calc)
627 evas_object_smart_callback_call(WIDGET(it), SIG_UNREALIZED, EO_OBJ(it)); 978 evas_object_smart_callback_call(WIDGET(it), SIG_UNREALIZED, EO_OBJ(it));
628 ELM_SAFE_FREE(it->long_timer, ecore_timer_del); 979 ELM_SAFE_FREE(it->long_timer, ecore_timer_del);
629 ELM_SAFE_FREE(it->texts, elm_widget_stringlist_free);
630 ELM_SAFE_FREE(it->contents, elm_widget_stringlist_free);
631 ELM_SAFE_FREE(it->states, elm_widget_stringlist_free);
632 980
633 EINA_LIST_FREE(it->content_objs, content) 981 _view_clear(VIEW(it), &(it->texts), &(it->contents));
634 evas_object_del(content);
635 982
983 ELM_SAFE_FREE(it->states, elm_widget_stringlist_free);
636 eo_do(EO_OBJ(it), elm_wdg_item_track_cancel()); 984 eo_do(EO_OBJ(it), elm_wdg_item_track_cancel());
637 985
638 it->unrealize_cb(it); 986 it->unrealize_cb(it);
@@ -766,6 +1114,36 @@ _item_mouse_up_cb(void *data,
766} 1114}
767 1115
768static void 1116static void
1117_item_mouse_callbacks_add(Elm_Gen_Item *it,
1118 Evas_Object *view)
1119{
1120 evas_object_event_callback_add
1121 (view, EVAS_CALLBACK_MOUSE_IN, _item_mouse_in_cb, it);
1122 evas_object_event_callback_add
1123 (view, EVAS_CALLBACK_MOUSE_MOVE, _item_mouse_move_cb, it);
1124 evas_object_event_callback_add
1125 (view, EVAS_CALLBACK_MOUSE_DOWN, _item_mouse_down_cb, it);
1126 evas_object_event_callback_add
1127 (view, EVAS_CALLBACK_MOUSE_UP, _item_mouse_up_cb, it);
1128}
1129
1130static void
1131_item_mouse_callbacks_del(Elm_Gen_Item *it,
1132 Evas_Object *view)
1133{
1134 evas_object_event_callback_del_full
1135 (view, EVAS_CALLBACK_MOUSE_IN, _item_mouse_in_cb, it);
1136 evas_object_event_callback_del_full
1137 (view, EVAS_CALLBACK_MOUSE_MOVE, _item_mouse_move_cb, it);
1138 evas_object_event_callback_del_full
1139 (view, EVAS_CALLBACK_MOUSE_DOWN, _item_mouse_down_cb, it);
1140 evas_object_event_callback_del_full
1141 (view, EVAS_CALLBACK_MOUSE_UP, _item_mouse_up_cb, it);
1142}
1143
1144
1145
1146static void
769_elm_gengrid_item_index_update(Elm_Gen_Item *it) 1147_elm_gengrid_item_index_update(Elm_Gen_Item *it)
770{ 1148{
771 if (it->position_update) 1149 if (it->position_update)
@@ -778,8 +1156,11 @@ _elm_gengrid_item_index_update(Elm_Gen_Item *it)
778static void 1156static void
779_item_unrealize_cb(Elm_Gen_Item *it) 1157_item_unrealize_cb(Elm_Gen_Item *it)
780{ 1158{
781 ELM_SAFE_FREE(VIEW(it), evas_object_del); 1159 if (!_item_cache_add(it))
782 ELM_SAFE_FREE(it->spacer, evas_object_del); 1160 {
1161 ELM_SAFE_FREE(VIEW(it), evas_object_del);
1162 ELM_SAFE_FREE(it->spacer, evas_object_del);
1163 }
783} 1164}
784 1165
785static char * 1166static char *
@@ -854,8 +1235,6 @@ static void
854_item_realize(Elm_Gen_Item *it) 1235_item_realize(Elm_Gen_Item *it)
855{ 1236{
856 Eina_Bool tmp; 1237 Eina_Bool tmp;
857 char buf[1024];
858 char style[1024];
859 ELM_GENGRID_DATA_GET_FROM_ITEM(it, sd); 1238 ELM_GENGRID_DATA_GET_FROM_ITEM(it, sd);
860 Elm_Object_Item *eo_it = EO_OBJ(it); 1239 Elm_Object_Item *eo_it = EO_OBJ(it);
861 1240
@@ -863,26 +1242,14 @@ _item_realize(Elm_Gen_Item *it)
863 (it->generation < sd->generation)) 1242 (it->generation < sd->generation))
864 return; 1243 return;
865 1244
866 VIEW(it) = edje_object_add(evas_object_evas_get(WIDGET(it))); 1245 if (!_item_cache_find(it))
867 edje_object_scale_set
868 (VIEW(it), elm_widget_scale_get(WIDGET(it)) * elm_config_scale_get());
869 edje_object_mirrored_set(VIEW(it), elm_widget_mirrored_get(WIDGET(it)));
870 evas_object_smart_member_add(VIEW(it), sd->pan_obj);
871 elm_widget_sub_object_add(WIDGET(it), VIEW(it));
872 snprintf(style, sizeof(style), "item/%s",
873 it->itc->item_style ? it->itc->item_style : "default");
874 if (!elm_widget_theme_object_set(WIDGET(it), VIEW(it), "gengrid", style,
875 elm_widget_style_get(WIDGET(it))))
876 { 1246 {
877 ERR("%s is not a valid gengrid item style. " 1247 VIEW(it) = _view_create(it, it->itc->item_style);
878 "Automatically falls back into default style.", 1248 if (it->item->nocache_once)
879 it->itc->item_style); 1249 it->item->nocache_once = EINA_FALSE;
880 elm_widget_theme_object_set
881 (WIDGET(it), VIEW(it), "gengrid", "item/default", "default");
882 } 1250 }
883 evas_object_stack_below(VIEW(it), sd->stack);
884 1251
885 if (edje_object_part_exists(VIEW(it), "elm.swallow.pad")) 1252 if (it->spacer && edje_object_part_exists(VIEW(it), "elm.swallow.pad"))
886 { 1253 {
887 it->spacer = 1254 it->spacer =
888 evas_object_rectangle_add(evas_object_evas_get(WIDGET(it))); 1255 evas_object_rectangle_add(evas_object_evas_get(WIDGET(it)));
@@ -895,64 +1262,8 @@ _item_realize(Elm_Gen_Item *it)
895 /* access */ 1262 /* access */
896 if (_elm_config->access_mode) _access_widget_item_register(it); 1263 if (_elm_config->access_mode) _access_widget_item_register(it);
897 1264
898 if (it->itc->func.text_get) 1265 /* infate texts, contents and states of view object */
899 { 1266 _view_inflate(VIEW(it), it, &it->texts, &it->contents);
900 const Eina_List *l;
901 const char *key;
902
903 it->texts =
904 elm_widget_stringlist_get(edje_object_data_get(VIEW(it), "texts"));
905 EINA_LIST_FOREACH(it->texts, l, key)
906 {
907 char *s = it->itc->func.text_get
908 ((void *)WIDGET_ITEM_DATA_GET(eo_it), WIDGET(it), key);
909 if (s)
910 {
911 edje_object_part_text_escaped_set(VIEW(it), key, s);
912 free(s);
913 }
914 }
915 }
916
917 if (it->itc->func.content_get)
918 {
919 const Eina_List *l;
920 const char *key;
921 Evas_Object *ic = NULL;
922
923 it->contents = elm_widget_stringlist_get
924 (edje_object_data_get(VIEW(it), "contents"));
925 EINA_LIST_FOREACH(it->contents, l, key)
926 {
927 ic = it->itc->func.content_get((void *)WIDGET_ITEM_DATA_GET(eo_it), WIDGET(it), key);
928 if (ic)
929 {
930 it->content_objs = eina_list_append(it->content_objs, ic);
931 edje_object_part_swallow(VIEW(it), key, ic);
932 evas_object_show(ic);
933 elm_widget_sub_object_add(WIDGET(it), ic);
934 }
935 }
936 }
937
938 if (it->itc->func.state_get)
939 {
940 const Eina_List *l;
941 const char *key;
942
943 it->states =
944 elm_widget_stringlist_get(edje_object_data_get(VIEW(it), "states"));
945 EINA_LIST_FOREACH(it->states, l, key)
946 {
947 Eina_Bool on = it->itc->func.state_get
948 ((void *)WIDGET_ITEM_DATA_GET(eo_it), WIDGET(it), l->data);
949 if (on)
950 {
951 snprintf(buf, sizeof(buf), "elm,state,%s,active", key);
952 edje_object_signal_emit(VIEW(it), buf, "elm");
953 }
954 }
955 }
956 1267
957 if (it->group) 1268 if (it->group)
958 { 1269 {
@@ -981,15 +1292,7 @@ _item_realize(Elm_Gen_Item *it)
981 &sd->item_height); 1292 &sd->item_height);
982 } 1293 }
983 1294
984 evas_object_event_callback_add 1295 _item_mouse_callbacks_add(it, VIEW(it));
985 (VIEW(it), EVAS_CALLBACK_MOUSE_DOWN, _item_mouse_down_cb, it);
986 evas_object_event_callback_add
987 (VIEW(it), EVAS_CALLBACK_MOUSE_UP, _item_mouse_up_cb, it);
988 evas_object_event_callback_add
989 (VIEW(it), EVAS_CALLBACK_MOUSE_MOVE, _item_mouse_move_cb, it);
990 evas_object_event_callback_add
991 (VIEW(it), EVAS_CALLBACK_MOUSE_IN, _item_mouse_in_cb, it);
992
993 _elm_gengrid_item_index_update(it); 1296 _elm_gengrid_item_index_update(it);
994 1297
995 if (it->selected) 1298 if (it->selected)
@@ -3236,6 +3539,7 @@ _mirrored_set(Evas_Object *obj,
3236 3539
3237 ELM_GENGRID_DATA_GET(obj, sd); 3540 ELM_GENGRID_DATA_GET(obj, sd);
3238 3541
3542 _item_cache_zero(sd);
3239 eo_do_super(obj, MY_CLASS, elm_interface_scrollable_mirrored_set(rtl)); 3543 eo_do_super(obj, MY_CLASS, elm_interface_scrollable_mirrored_set(rtl));
3240 3544
3241 if (!sd->items) return; 3545 if (!sd->items) return;
@@ -3747,6 +4051,7 @@ _elm_gengrid_evas_object_smart_add(Eo *obj, Elm_Gengrid_Data *priv)
3747 priv->align_x = 0.5; 4051 priv->align_x = 0.5;
3748 priv->align_y = 0.5; 4052 priv->align_y = 0.5;
3749 priv->highlight = EINA_TRUE; 4053 priv->highlight = EINA_TRUE;
4054 priv->item_cache_max = CACHE_MAX;
3750 4055
3751 priv->pan_obj = eo_add(MY_PAN_CLASS, evas_object_evas_get(obj)); 4056 priv->pan_obj = eo_add(MY_PAN_CLASS, evas_object_evas_get(obj));
3752 pan_data = eo_data_scope_get(priv->pan_obj, MY_PAN_CLASS); 4057 pan_data = eo_data_scope_get(priv->pan_obj, MY_PAN_CLASS);
@@ -3768,6 +4073,7 @@ _elm_gengrid_evas_object_smart_del(Eo *obj, Elm_Gengrid_Data *sd)
3768 ELM_SAFE_FREE(sd->pan_obj, evas_object_del); 4073 ELM_SAFE_FREE(sd->pan_obj, evas_object_del);
3769 ELM_SAFE_FREE(sd->stack, evas_object_del); 4074 ELM_SAFE_FREE(sd->stack, evas_object_del);
3770 4075
4076 _item_cache_zero(sd);
3771 ecore_job_del(sd->calc_job); 4077 ecore_job_del(sd->calc_job);
3772 4078
3773 eo_do_super(obj, MY_CLASS, evas_obj_smart_del()); 4079 eo_do_super(obj, MY_CLASS, evas_obj_smart_del());
@@ -4075,6 +4381,28 @@ _elm_gengrid_item_update(Eo *eo_item EINA_UNUSED, Elm_Gen_Item *it)
4075 _item_place(it, it->x, it->y); 4381 _item_place(it, it->x, it->y);
4076} 4382}
4077 4383
4384EOLIAN static void
4385_elm_gengrid_item_fields_update(Eo *eo_item EINA_UNUSED, Elm_Gen_Item *it,
4386 const char *parts,
4387 Elm_Gengrid_Item_Field_Type itf)
4388{
4389 ELM_GENGRID_ITEM_CHECK_OR_RETURN(it);
4390
4391 if (!it->realized) return;
4392 if (it->want_unrealize) return;
4393
4394 if ((!itf) || (itf & ELM_GENGRID_ITEM_FIELD_TEXT))
4395 _item_text_realize(it, VIEW(it), &it->texts, parts);
4396
4397 if ((!itf) || (itf & ELM_GENGRID_ITEM_FIELD_CONTENT))
4398 _item_content_realize(it, VIEW(it), &it->contents, "contents", parts);
4399
4400 if ((!itf) || (itf & ELM_GENGRID_ITEM_FIELD_STATE))
4401 _item_state_realize(it, VIEW(it), parts);
4402
4403 _item_place(it, it->x, it->y);
4404}
4405
4078EOLIAN static const Elm_Gengrid_Item_Class * 4406EOLIAN static const Elm_Gengrid_Item_Class *
4079_elm_gengrid_item_item_class_get(Eo *eo_item EINA_UNUSED, Elm_Gen_Item *item) 4407_elm_gengrid_item_item_class_get(Eo *eo_item EINA_UNUSED, Elm_Gen_Item *item)
4080{ 4408{
@@ -4090,6 +4418,8 @@ _elm_gengrid_item_item_class_update(Eo *eo_it EINA_UNUSED, Elm_Gen_Item *it,
4090 4418
4091 if (it->generation < GG_IT(it)->wsd->generation) return; 4419 if (it->generation < GG_IT(it)->wsd->generation) return;
4092 it->itc = itc; 4420 it->itc = itc;
4421 it->item->nocache_once = EINA_TRUE;
4422
4093 elm_gengrid_item_update(EO_OBJ(it)); 4423 elm_gengrid_item_update(EO_OBJ(it));
4094} 4424}
4095 4425
diff --git a/src/lib/elm_gengrid_common.h b/src/lib/elm_gengrid_common.h
index b5aa1f955..a38717fc7 100644
--- a/src/lib/elm_gengrid_common.h
+++ b/src/lib/elm_gengrid_common.h
@@ -4,7 +4,7 @@
4/** 4/**
5 * Defines where to position the item in the genlist. 5 * Defines where to position the item in the genlist.
6 * 6 *
7 * @ingroup Genlist 7 * @ingroup Gengrid
8 */ 8 */
9typedef enum 9typedef enum
10{ 10{
@@ -16,6 +16,21 @@ typedef enum
16 16
17 17
18/** 18/**
19 * Defines the type of the item part
20 * Used while updating item's parts
21 * It can be used at updating multi fields.
22 *
23 * @ingroup Gengrid
24 */
25typedef enum
26{
27 ELM_GENGRID_ITEM_FIELD_ALL = 0,
28 ELM_GENGRID_ITEM_FIELD_TEXT = (1 << 0),
29 ELM_GENGRID_ITEM_FIELD_CONTENT = (1 << 1),
30 ELM_GENGRID_ITEM_FIELD_STATE = (1 << 2)
31} Elm_Gengrid_Item_Field_Type;
32
33/**
19 * @see Elm_Gen_Item_Class 34 * @see Elm_Gen_Item_Class
20 */ 35 */
21typedef Elm_Gen_Item_Class Elm_Gengrid_Item_Class; 36typedef Elm_Gen_Item_Class Elm_Gengrid_Item_Class;
diff --git a/src/lib/elm_gengrid_item.eo b/src/lib/elm_gengrid_item.eo
index 18b98688c..913199c05 100644
--- a/src/lib/elm_gengrid_item.eo
+++ b/src/lib/elm_gengrid_item.eo
@@ -209,6 +209,29 @@ class Elm.Gengrid_Item(Elm.Widget_Item)
209 @ingroup Gengrid 209 @ingroup Gengrid
210 */ 210 */
211 } 211 }
212 fields_update {
213 /*@
214 Update the part of an item
215
216 This updates an item's part by calling item's fetching functions again
217 to get the contents, texts and states. Use this when the original
218 item data has changed and the changes are desired to be reflected.
219 Second parts argument is used for globbing to match '*', '?', and '.'
220 It can be used at updating multi fields.
221
222 Use elm_gengrid_realized_items_update() to update an item's all
223 property.
224
225 @see elm_gengrid_iitem_update()
226
227 @ingroup Gengrid
228 @since 1.15
229 */
230 params {
231 @in parts: const (char) *; /*@ The name of item's part */
232 @in itf: Elm_Gengrid_Item_Field_Type; /*@ The type of item's part type */
233 }
234 }
212 item_class_update { 235 item_class_update {
213 /*@ 236 /*@
214 Update the item class of a gengrid item. 237 Update the item class of a gengrid item.
diff --git a/src/lib/elm_widget_gengrid.h b/src/lib/elm_widget_gengrid.h
index 5ffca3731..586400f5c 100644
--- a/src/lib/elm_widget_gengrid.h
+++ b/src/lib/elm_widget_gengrid.h
@@ -129,6 +129,12 @@ struct _Elm_Gengrid_Data
129 Eina_Bool wheel_disabled : 1; /**< a flag that shows mouse wheel is disabled or not. */ 129 Eina_Bool wheel_disabled : 1; /**< a flag that shows mouse wheel is disabled or not. */
130 /**< value whether item loop feature is enabled or not. */ 130 /**< value whether item loop feature is enabled or not. */
131 Eina_Bool item_loop_enable : 1; 131 Eina_Bool item_loop_enable : 1;
132
133 Eina_Inlist *item_cache; /* an inlist of
134 * edje object it
135 * cache. */
136 int item_cache_count;
137 int item_cache_max;
132}; 138};
133 139
134struct Elm_Gen_Item_Type 140struct Elm_Gen_Item_Type
@@ -144,6 +150,17 @@ struct Elm_Gen_Item_Type
144 150
145 Eina_Bool group_realized : 1; 151 Eina_Bool group_realized : 1;
146 Eina_Bool moving : 1; 152 Eina_Bool moving : 1;
153 Eina_Bool nocache_once : 1; /* do not use cache for
154 * this item only once */
155 Eina_Bool nocache : 1; /* do not use cache for this item */
156};
157
158typedef struct _Item_Cache Item_Cache;
159struct _Item_Cache
160{
161 EINA_INLIST;
162 Evas_Object *base_view, *spacer;
163 const char *item_style; // it->itc->item_style
147}; 164};
148 165
149typedef struct _Elm_Gengrid_Pan_Data Elm_Gengrid_Pan_Data; 166typedef struct _Elm_Gengrid_Pan_Data Elm_Gengrid_Pan_Data;