summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2018-02-06 16:28:51 -0800
committerCedric BAIL <cedric@osg.samsung.com>2018-05-01 10:39:01 -0700
commitbf2e65a38d0af1189639270e2983e3cdf39c8158 (patch)
treebf5264db6567454d36b785418fd0d2bda9fdf8ee /src
parentcb7550eb1cc810a9f1ec011f1a4a3be00bb4e613 (diff)
elementary: converting Efl.Ui.List to the new Efl.Model API.
Diffstat (limited to 'src')
-rw-r--r--src/lib/elementary/efl_ui_view_list.c88
-rw-r--r--src/lib/elementary/efl_ui_view_list_precise_layouter.c111
-rw-r--r--src/lib/elementary/efl_ui_view_list_private.h34
-rw-r--r--src/lib/elementary/efl_ui_view_list_segarray.c51
-rw-r--r--src/lib/elementary/efl_ui_view_list_segarray.eo4
-rw-r--r--src/lib/elementary/elm_view_list.c2
6 files changed, 137 insertions, 153 deletions
diff --git a/src/lib/elementary/efl_ui_view_list.c b/src/lib/elementary/efl_ui_view_list.c
index e467f54d06..4461eeb9e8 100644
--- a/src/lib/elementary/efl_ui_view_list.c
+++ b/src/lib/elementary/efl_ui_view_list.c
@@ -195,32 +195,6 @@ _on_item_mouse_up(void *data, Evas *evas EINA_UNUSED, Evas_Object *o EINA_UNUSED
195 _efl_ui_view_list_item_select_set(item, EINA_TRUE); 195 _efl_ui_view_list_item_select_set(item, EINA_TRUE);
196} 196}
197 197
198static void
199_count_then(void * data, Efl_Event const* event EINA_UNUSED)
200{
201 Efl_Ui_View_List_Data *pd = data;
202 EINA_SAFETY_ON_NULL_RETURN(pd);
203
204 pd->count_future = NULL;
205 _layout(pd);
206}
207
208static void
209_count_error(void * data, Efl_Event const* event EINA_UNUSED)
210{
211 Efl_Ui_View_List_Data *pd = data;
212 EINA_SAFETY_ON_NULL_RETURN(pd);
213 pd->count_future = NULL;
214}
215
216static void
217_children_slice_error(void * data EINA_UNUSED, Efl_Event const* event EINA_UNUSED)
218{
219 Efl_Ui_View_List_Data *pd = data;
220 EINA_SAFETY_ON_NULL_RETURN(pd);
221 pd->slice_future = NULL;
222}
223
224EOLIAN static void 198EOLIAN static void
225_efl_ui_view_list_select_mode_set(Eo *obj EINA_UNUSED, Efl_Ui_View_List_Data *pd, Elm_Object_Select_Mode mode) 199_efl_ui_view_list_select_mode_set(Eo *obj EINA_UNUSED, Efl_Ui_View_List_Data *pd, Elm_Object_Select_Mode mode)
226{ 200{
@@ -735,8 +709,7 @@ _efl_ui_view_list_efl_object_constructor(Eo *obj, Efl_Ui_View_List_Data *pd)
735 pd->style = eina_stringshare_add(elm_widget_style_get(obj)); 709 pd->style = eina_stringshare_add(elm_widget_style_get(obj));
736 710
737 pd->factory = NULL; 711 pd->factory = NULL;
738 pd->align.h = 0; 712 pd->orient = EFL_ORIENT_DOWN;
739 pd->align.v = 0;
740 pd->min.w = 0; 713 pd->min.w = 0;
741 pd->min.h = 0; 714 pd->min.h = 0;
742 715
@@ -776,29 +749,20 @@ _efl_ui_view_list_efl_ui_view_model_set(Eo *obj EINA_UNUSED, Efl_Ui_View_List_Da
776 if (pd->model == model) 749 if (pd->model == model)
777 return; 750 return;
778 751
779 if (pd->count_future)
780 {
781 efl_future_cancel(pd->count_future);
782 pd->count_future = NULL;
783 }
784 752
785 if (pd->model) 753 if (pd->model)
786 { 754 {
787 if (pd->relayout) 755 if (pd->relayout)
788 efl_ui_view_list_relayout_model_set(pd->relayout, NULL); 756 efl_ui_view_list_relayout_model_set(pd->relayout, NULL);
789 efl_ui_view_list_segarray_flush(pd->segarray); 757 efl_ui_view_list_segarray_flush(pd->segarray);
790 efl_unref(pd->model);
791 pd->model = NULL;
792 } 758 }
793 759
760 efl_replace(&pd->model, model);
761
794 if (model) 762 if (model)
795 { 763 {
796 pd->model = model;
797 efl_ref(pd->model);
798 if (pd->relayout) 764 if (pd->relayout)
799 efl_ui_view_list_relayout_model_set(pd->relayout, model); 765 efl_ui_view_list_relayout_model_set(pd->relayout, model);
800 pd->count_future = efl_model_children_count_get(pd->model);
801 efl_future_then(pd->count_future, &_count_then, &_count_error, NULL, pd);
802 } 766 }
803 767
804 evas_object_smart_changed(pd->obj); 768 evas_object_smart_changed(pd->obj);
@@ -908,11 +872,7 @@ _efl_ui_view_list_item_select_set(Efl_Ui_View_List_LayoutItem *item, Eina_Bool s
908static void 872static void
909_efl_ui_view_list_relayout_set(Eo *obj EINA_UNUSED, Efl_Ui_View_List_Data *pd EINA_UNUSED, Efl_Ui_View_List_Relayout *object) 873_efl_ui_view_list_relayout_set(Eo *obj EINA_UNUSED, Efl_Ui_View_List_Data *pd EINA_UNUSED, Efl_Ui_View_List_Relayout *object)
910{ 874{
911 if(pd->relayout) 875 efl_replace(&pd->relayout, object);
912 efl_unref(pd->relayout);
913
914 pd->relayout = object;
915 efl_ref(pd->relayout);
916} 876}
917 877
918static Efl_Ui_View_List_Relayout * 878static Efl_Ui_View_List_Relayout *
@@ -930,17 +890,22 @@ _layout(Efl_Ui_View_List_Data *pd)
930 efl_ui_view_list_relayout_layout_do(pd->relayout, pd->obj, pd->segarray_first, pd->segarray); 890 efl_ui_view_list_relayout_layout_do(pd->relayout, pd->obj, pd->segarray_first, pd->segarray);
931} 891}
932 892
933static void 893static Eina_Value
934_children_slice_then(void * data, Efl_Event const* event) 894_children_slice_then(void * data, const Eina_Value v, const Eina_Future *dead_future EINA_UNUSED)
935{ 895{
936 Efl_Ui_View_List_Data *pd = data; 896 Efl_Ui_View_List_Data *pd = data;
937 Eina_Accessor *acc = (Eina_Accessor*)((Efl_Future_Event_Success*)event->info)->value;
938 897
939 efl_ui_view_list_segarray_insert_accessor(pd->segarray, pd->outstanding_slice.slice_start, acc); 898 if (eina_value_type_get(&v) == EINA_VALUE_TYPE_ERROR)
899 goto on_error;
940 900
941 pd->segarray_first = pd->outstanding_slice.slice_start; 901 efl_ui_view_list_segarray_insert_value(pd->segarray, pd->slice.start, v);
942 pd->outstanding_slice.slice_start = pd->outstanding_slice.slice_count = 0; 902
943 pd->slice_future = NULL; 903 pd->segarray_first = pd->slice.start;
904 pd->slice.start = pd->slice.count = 0;
905 pd->slice.future = NULL;
906
907 on_error:
908 return v;
944} 909}
945 910
946/* EFL UI LIST MODEL INTERFACE */ 911/* EFL UI LIST MODEL INTERFACE */
@@ -1039,21 +1004,24 @@ _efl_ui_view_list_efl_ui_view_list_model_unrealize(Eo *obj, Efl_Ui_View_List_Dat
1039} 1004}
1040 1005
1041EOLIAN static void 1006EOLIAN static void
1042_efl_ui_view_list_efl_ui_view_list_model_load_range_set(Eo* obj EINA_UNUSED, Efl_Ui_View_List_Data* pd, int first, int count) 1007_efl_ui_view_list_efl_ui_view_list_model_load_range_set(Eo* obj, Efl_Ui_View_List_Data* pd, int first, int count)
1043{ 1008{
1044 if(!pd->slice_future) 1009 Eina_Future *f;
1045 { 1010
1046 pd->slice_future = efl_model_children_slice_get(pd->model, first, count); 1011 if (pd->slice.future) return ;
1047 pd->outstanding_slice.slice_start = first; 1012
1048 pd->outstanding_slice.slice_count = count; 1013 pd->slice.start = first;
1049 efl_future_then(pd->slice_future, &_children_slice_then, &_children_slice_error, NULL, pd); 1014 pd->slice.count = count;
1050 } 1015
1016 f = efl_model_children_slice_get(pd->model, first, count);
1017 f = eina_future_then(f, _children_slice_then, pd);
1018 pd->slice.future = efl_future_Eina_FutureXXX_then(obj, f);
1051} 1019}
1052 1020
1053EOLIAN static int 1021EOLIAN static int
1054_efl_ui_view_list_efl_ui_view_list_model_model_size_get(const Eo *obj EINA_UNUSED, Efl_Ui_View_List_Data *pd) 1022_efl_ui_view_list_efl_ui_view_list_model_model_size_get(const Eo *obj EINA_UNUSED, Efl_Ui_View_List_Data *pd)
1055{ 1023{
1056 return pd->item_count; 1024 return efl_model_children_count_get(pd->model);
1057} 1025}
1058 1026
1059ELM_WIDGET_KEY_DOWN_DEFAULT_IMPLEMENT(efl_ui_view_list, Efl_Ui_View_List_Data) 1027ELM_WIDGET_KEY_DOWN_DEFAULT_IMPLEMENT(efl_ui_view_list, Efl_Ui_View_List_Data)
diff --git a/src/lib/elementary/efl_ui_view_list_precise_layouter.c b/src/lib/elementary/efl_ui_view_list_precise_layouter.c
index a711e5315a..592283106a 100644
--- a/src/lib/elementary/efl_ui_view_list_precise_layouter.c
+++ b/src/lib/elementary/efl_ui_view_list_precise_layouter.c
@@ -13,31 +13,35 @@
13 13
14typedef struct _Efl_Ui_View_List_Precise_Layouter_Data 14typedef struct _Efl_Ui_View_List_Precise_Layouter_Data
15{ 15{
16 Eina_Bool initialized;
17 Eina_Bool recalc;
18 Eina_Bool resize;
19 Eina_Size2D min;
20 Efl_Model* model; 16 Efl_Model* model;
21 Efl_Ui_View_List_Model *modeler; 17 Efl_Ui_View_List_Model *modeler;
22 Efl_Future *count_future;
23 Ecore_Job *calc_job; 18 Ecore_Job *calc_job;
24 Efl_Ui_View_List_SegArray *segarray; 19 Efl_Ui_View_List_SegArray *segarray;
20
21 Eina_Size2D min;
22
23 unsigned int calc_progress;
24
25 int first; 25 int first;
26 int count_total; 26 int count_total;
27 unsigned int calc_progress; 27
28 Eina_Bool initialized : 1;
29 Eina_Bool recalc : 1;
30 Eina_Bool resize : 1;
28} Efl_Ui_View_List_Precise_Layouter_Data; 31} Efl_Ui_View_List_Precise_Layouter_Data;
29 32
30typedef struct _Efl_Ui_View_List_Precise_Layouter_Node_Data 33typedef struct _Efl_Ui_View_List_Precise_Layouter_Node_Data
31{ 34{
32 Eina_Size2D min; 35 Eina_Size2D min;
33 Eina_Size2D size; 36 Eina_Size2D size;
34 Eina_Bool realized; 37
38 Eina_Bool realized;
35} Efl_Ui_View_List_Precise_Layouter_Node_Data; 39} Efl_Ui_View_List_Precise_Layouter_Node_Data;
36 40
37typedef struct _Efl_Ui_View_List_Precise_Layouter_Callback_Data 41typedef struct _Efl_Ui_View_List_Precise_Layouter_Callback_Data
38{ 42{
39 Efl_Ui_View_List_Precise_Layouter_Data* pd; 43 Efl_Ui_View_List_Precise_Layouter_Data *pd;
40 Efl_Ui_View_List_LayoutItem* item; 44 Efl_Ui_View_List_LayoutItem *item;
41} Efl_Ui_View_List_Precise_Layouter_Callback_Data; 45} Efl_Ui_View_List_Precise_Layouter_Callback_Data;
42 46
43#include "efl_ui_view_list_precise_layouter.eo.h" 47#include "efl_ui_view_list_precise_layouter.eo.h"
@@ -176,29 +180,6 @@ _item_min_calc(Efl_Ui_View_List_Precise_Layouter_Data *pd, Efl_Ui_View_List_Layo
176} 180}
177 181
178static void 182static void
179_count_then(void * data, Efl_Event const* event)
180{
181 Efl_Ui_View_List_Precise_Layouter_Data *pd = data;
182 EINA_SAFETY_ON_NULL_RETURN(pd);
183 pd->count_future = NULL;
184 pd->count_total = *(int*)((Efl_Future_Event_Success*)event->info)->value;
185
186 if (pd->modeler && (pd->count_total != efl_ui_view_list_segarray_count(pd->segarray)))
187 {
188 pd->recalc = EINA_TRUE;
189 efl_ui_view_list_model_load_range_set(pd->modeler, 0, 0); // load all
190 }
191}
192
193static void
194_count_error(void * data, Efl_Event const* event EINA_UNUSED)
195{
196 Efl_Ui_View_List_Precise_Layouter_Data *pd = data;
197 EINA_SAFETY_ON_NULL_RETURN(pd);
198 pd->count_future = NULL;
199}
200
201static void
202_on_item_size_hint_change(void *data, Evas *e EINA_UNUSED, 183_on_item_size_hint_change(void *data, Evas *e EINA_UNUSED,
203 Evas_Object *obj, void *event_info EINA_UNUSED) 184 Evas_Object *obj, void *event_info EINA_UNUSED)
204{ 185{
@@ -225,15 +206,46 @@ _on_modeler_resize(void *data, Evas *e EINA_UNUSED,
225 pd->resize = EINA_TRUE; 206 pd->resize = EINA_TRUE;
226} 207}
227 208
209typedef struct _Request Request;
210struct _Request
211{
212 Efl_Ui_View_List_Precise_Layouter_Data *pd;
213 unsigned int index;
214};
215
216static Eina_Value
217_children_get(void *data, const Eina_Value v, const Eina_Future *dead_future EINA_UNUSED)
218{
219 Request *r = data;
220
221 if (eina_value_type_get(&v) == EINA_VALUE_TYPE_ERROR)
222 goto on_error;
223
224 efl_ui_view_list_segarray_insert_value(r->pd->segarray, r->index, v);
225 r->pd->recalc = EINA_TRUE;
226 evas_object_smart_changed(r->pd->modeler);
227
228 on_error:
229 free(r);
230 return v;
231}
232
228static void 233static void
229_child_added_cb(void *data, const Efl_Event *event) 234_child_added_cb(void *data, const Efl_Event *event)
230{ 235{
231 Efl_Model_Children_Event* evt = event->info; 236 Efl_Model_Children_Event* evt = event->info;
232 Efl_Ui_View_List_Precise_Layouter_Data *pd = data; 237 Efl_Ui_View_List_Precise_Layouter_Data *pd = data;
238 Eina_Future *f;
239 Request *r;
233 240
234 efl_ui_view_list_segarray_insert(pd->segarray, evt->index, evt->child); 241 r = calloc(1, sizeof (Request));
235 pd->recalc = EINA_TRUE; 242 if (!r) return ;
236 evas_object_smart_changed(pd->modeler); 243
244 r->index = evt->index;
245 r->pd = pd;
246
247 f = efl_model_children_slice_get(pd->model, evt->index, 1);
248 f = eina_future_then(f, _children_get, r);
237} 249}
238 250
239static void 251static void
@@ -518,7 +530,6 @@ _efl_ui_view_list_precise_layouter_efl_object_constructor(Eo *obj EINA_UNUSED, E
518{ 530{
519 obj = efl_constructor(efl_super(obj, MY_CLASS)); 531 obj = efl_constructor(efl_super(obj, MY_CLASS));
520 pd->initialized = EINA_FALSE; 532 pd->initialized = EINA_FALSE;
521 pd->count_future = NULL;
522 533
523 return obj; 534 return obj;
524} 535}
@@ -552,29 +563,21 @@ _efl_ui_view_list_precise_layouter_efl_ui_view_list_relayout_elements_get(const
552EOLIAN static void 563EOLIAN static void
553_efl_ui_view_list_precise_layouter_efl_ui_view_list_relayout_model_set(Eo *obj EINA_UNUSED, Efl_Ui_View_List_Precise_Layouter_Data *pd, Efl_Model *model) 564_efl_ui_view_list_precise_layouter_efl_ui_view_list_relayout_model_set(Eo *obj EINA_UNUSED, Efl_Ui_View_List_Precise_Layouter_Data *pd, Efl_Model *model)
554{ 565{
555 if (pd->model == model) 566 _finalize(obj, pd);
556 return;
557 567
558 pd->count_total = 0; 568 efl_replace(&pd->model, model);
559 if (pd->count_future)
560 {
561 efl_future_cancel(pd->count_future);
562 pd->count_future = NULL;
563 }
564 569
565 if (pd->model) 570 pd->count_total = 0;
566 {
567 _finalize(obj, pd);
568 efl_unref(pd->model);
569 pd->model = NULL;
570 }
571 571
572 if (model) 572 if (model)
573 { 573 {
574 pd->model = model; 574 pd->count_total = efl_model_children_count_get(pd->model);
575 efl_ref(pd->model); 575
576 pd->count_future = efl_model_children_count_get(pd->model); 576 if (pd->modeler && (pd->count_total != efl_ui_view_list_segarray_count(pd->segarray)))
577 efl_future_then(pd->count_future, &_count_then, &_count_error, NULL, pd); 577 {
578 pd->recalc = EINA_TRUE;
579 efl_ui_view_list_model_load_range_set(pd->modeler, 0, pd->count_total); // load all
580 }
578 } 581 }
579} 582}
580 583
diff --git a/src/lib/elementary/efl_ui_view_list_private.h b/src/lib/elementary/efl_ui_view_list_private.h
index 12e588fc16..7560870f14 100644
--- a/src/lib/elementary/efl_ui_view_list_private.h
+++ b/src/lib/elementary/efl_ui_view_list_private.h
@@ -27,39 +27,31 @@ struct _Efl_Ui_View_List_Data
27 Efl_Ui_View_List_Pan *pan_obj; 27 Efl_Ui_View_List_Pan *pan_obj;
28 Efl_Model *model; 28 Efl_Model *model;
29 29
30 struct { 30 Eina_Stringshare *style;
31 double h, v;
32 Eina_Bool scalable: 1;
33 } pad;
34 31
35 struct { 32 struct {
36 double h, v; 33 Eina_Future *future;
37 } align;
38 34
39 struct { 35 int start;
40 double x, y; 36 int count;
41 } weight; 37 } slice;
38
39 Efl_Ui_Layout_Factory *factory;
40 Eina_List *selected_items;
41
42 Efl_Ui_Focus_Manager *manager;
43 Efl_Ui_View_List_Relayout *relayout;
44
45 Efl_Orient orient;
42 46
43 int segarray_first; 47 int segarray_first;
44 Efl_Ui_View_List_SegArray *segarray; 48 Efl_Ui_View_List_SegArray *segarray;
45 49
46 Efl_Ui_Layout_Factory *factory;
47 Eina_List *selected_items;
48 Eina_Stringshare *style;
49 Elm_Object_Select_Mode select_mode; 50 Elm_Object_Select_Mode select_mode;
50 Elm_List_Mode mode; 51 Elm_List_Mode mode;
51 52
52 Efl_Ui_Focus_Manager *manager;
53 Eina_Rect gmt; 53 Eina_Rect gmt;
54 Eina_Size2D min; 54 Eina_Size2D min;
55 int item_count;
56 Efl_Future *slice_future;
57 Efl_Future *count_future;
58 Efl_Ui_View_List_Relayout *relayout;
59 struct {
60 int slice_start;
61 int slice_count;
62 } outstanding_slice;
63 55
64 Eina_Bool homogeneous : 1; 56 Eina_Bool homogeneous : 1;
65 Eina_Bool recalc : 1; 57 Eina_Bool recalc : 1;
diff --git a/src/lib/elementary/efl_ui_view_list_segarray.c b/src/lib/elementary/efl_ui_view_list_segarray.c
index 0390103a92..d5b694cae6 100644
--- a/src/lib/elementary/efl_ui_view_list_segarray.c
+++ b/src/lib/elementary/efl_ui_view_list_segarray.c
@@ -215,28 +215,49 @@ _efl_ui_view_list_segarray_insert(Eo *obj EINA_UNUSED, Efl_Ui_View_List_SegArray
215 _efl_ui_view_list_segarray_insert_at_node(pd, index, item, NULL); 215 _efl_ui_view_list_segarray_insert_at_node(pd, index, item, NULL);
216} 216}
217 217
218static void
219efl_ui_view_list_segarray_insert_object(Efl_Ui_View_List_SegArray_Data *segarray, unsigned int index, Efl_Model *children)
220{
221 Efl_Ui_View_List_SegArray_Node *node;
222
223 node = (void*)eina_rbtree_inline_lookup(EINA_RBTREE_GET(segarray->root),
224 &index, sizeof(index), &_insert_lookup_cb, NULL);
225 if (!node)
226 {
227 node = _alloc_node(segarray, index);
228 }
229
230 assert(node->length < node->max);
231 node->pointers[node->length] = _create_item(children, node, index);
232 node->length++;
233 segarray->count++;
234}
235
218EOLIAN static void 236EOLIAN static void
219_efl_ui_view_list_segarray_insert_accessor(Eo *obj EINA_UNUSED, Efl_Ui_View_List_SegArray_Data* pd, int first, Eina_Accessor* accessor) 237_efl_ui_view_list_segarray_insert_value(Eo *obj EINA_UNUSED, Efl_Ui_View_List_SegArray_Data *segarray, int first, Eina_Value v)
220{ 238{
221 int i; 239 Efl_Model *children;
222 Efl_Model* children; 240 unsigned int i, len;
223 241
224 EINA_ACCESSOR_FOREACH(accessor, i, children) 242 if (eina_value_type_get(&v) == EINA_VALUE_TYPE_OBJECT)
243 {
244 children = eina_value_object_get(&v);
245 efl_ui_view_list_segarray_insert_object(segarray, first, children);
246 }
247 else if (eina_value_type_get(&v) == EINA_VALUE_TYPE_ARRAY)
225 { 248 {
226 Efl_Ui_View_List_SegArray_Node *node; 249 Eina_Value vo = EINA_VALUE_EMPTY;
227 int idx = first + i;
228 250
229 node = (void*)eina_rbtree_inline_lookup(EINA_RBTREE_GET(pd->root), 251 EINA_VALUE_ARRAY_FOREACH(&v, len, i, children)
230 &idx, sizeof(idx), &_insert_lookup_cb, NULL);
231 if (!node)
232 { 252 {
233 node = _alloc_node(pd, idx); 253 unsigned int idx = first + i;
234 }
235 254
236 assert(node->length < node->max); 255 efl_ui_view_list_segarray_insert_object(segarray, idx, children);
237 node->pointers[node->length] = _create_item(children, node, idx); 256 }
238 node->length++; 257 }
239 pd->count++; 258 else
259 {
260 printf("Unknow type !\n");
240 } 261 }
241} 262}
242 263
diff --git a/src/lib/elementary/efl_ui_view_list_segarray.eo b/src/lib/elementary/efl_ui_view_list_segarray.eo
index cc5deb5bca..8b09e2fa2f 100644
--- a/src/lib/elementary/efl_ui_view_list_segarray.eo
+++ b/src/lib/elementary/efl_ui_view_list_segarray.eo
@@ -20,11 +20,11 @@ class Efl.Ui.View_List_SegArray (Efl.Object)
20 acc: accessor<ptr(Efl.Ui.View.List.SegArray.Node)>; 20 acc: accessor<ptr(Efl.Ui.View.List.SegArray.Node)>;
21 } 21 }
22 } 22 }
23 insert_accessor { 23 insert_value {
24 [[ Insert a accessor in segarray tree ]] 24 [[ Insert a accessor in segarray tree ]]
25 params { 25 params {
26 @in first: int; 26 @in first: int;
27 @in acc: accessor<Efl.Model>; 27 @in v: any_value;
28 } 28 }
29 } 29 }
30 count { 30 count {
diff --git a/src/lib/elementary/elm_view_list.c b/src/lib/elementary/elm_view_list.c
index cb448af999..4360fa1d20 100644
--- a/src/lib/elementary/elm_view_list.c
+++ b/src/lib/elementary/elm_view_list.c
@@ -428,7 +428,7 @@ _elm_view_list_model_set(Eo *obj EINA_UNUSED, Elm_View_List_Data *priv, Efl_Mode
428} 428}
429 429
430static Efl_Model * 430static Efl_Model *
431_elm_view_list_model_get(Eo *obj EINA_UNUSED, Elm_View_List_Data *priv) 431_elm_view_list_model_get(const Eo *obj EINA_UNUSED, Elm_View_List_Data *priv)
432{ 432{
433 return priv->connect.model; 433 return priv->connect.model;
434} 434}