summaryrefslogtreecommitdiff
path: root/src/lib/elementary/efl_ui_list.c
diff options
context:
space:
mode:
authorLarry Jr <larry.olj@gmail.com>2018-01-26 16:53:42 -0200
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2018-02-15 15:08:54 -0200
commitee0cbdad17a9f1b19ca23f3eeb6e4b5b7c16c1c5 (patch)
treec067b9e3e12d190932b16e5883633c798d6f282e /src/lib/elementary/efl_ui_list.c
parent10d10dfa5dffa774b95a9daaf25daa6d201a5bdf (diff)
elementary: efl_ui_list change SegArray tree to Efl.Object
Diffstat (limited to 'src/lib/elementary/efl_ui_list.c')
-rw-r--r--src/lib/elementary/efl_ui_list.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/lib/elementary/efl_ui_list.c b/src/lib/elementary/efl_ui_list.c
index 2d3f213126..e332d9cf40 100644
--- a/src/lib/elementary/efl_ui_list.c
+++ b/src/lib/elementary/efl_ui_list.c
@@ -721,7 +721,7 @@ _efl_ui_list_efl_object_constructor(Eo *obj, Efl_Ui_List_Data *pd)
721 evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks); 721 evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks);
722 efl_access_role_set(obj, EFL_ACCESS_ROLE_LIST); 722 efl_access_role_set(obj, EFL_ACCESS_ROLE_LIST);
723 723
724 efl_ui_list_segarray_setup(&pd->segarray, 32); 724 pd->segarray = efl_add(EFL_UI_LIST_SEGARRAY_CLASS, obj, efl_ui_list_segarray_setup(efl_added, 32));
725 725
726 manager = efl_ui_widget_focus_manager_create(obj, obj); 726 manager = efl_ui_widget_focus_manager_create(obj, obj);
727 efl_composite_attach(obj, manager); 727 efl_composite_attach(obj, manager);
@@ -735,7 +735,6 @@ _efl_ui_list_efl_object_constructor(Eo *obj, Efl_Ui_List_Data *pd)
735 pd->style = eina_stringshare_add(elm_widget_style_get(obj)); 735 pd->style = eina_stringshare_add(elm_widget_style_get(obj));
736 736
737 pd->factory = NULL; 737 pd->factory = NULL;
738 pd->orient = EFL_ORIENT_DOWN;
739 pd->align.h = 0; 738 pd->align.h = 0;
740 pd->align.v = 0; 739 pd->align.v = 0;
741 pd->min.w = 0; 740 pd->min.w = 0;
@@ -758,8 +757,6 @@ _efl_ui_list_efl_object_destructor(Eo *obj, Efl_Ui_List_Data *pd)
758 ELM_SAFE_FREE(pd->pan_obj, evas_object_del); 757 ELM_SAFE_FREE(pd->pan_obj, evas_object_del);
759 efl_canvas_group_del(efl_super(obj, MY_CLASS)); 758 efl_canvas_group_del(efl_super(obj, MY_CLASS));
760 759
761 efl_ui_list_segarray_flush(&pd->segarray);
762
763 efl_destructor(efl_super(obj, MY_CLASS)); 760 efl_destructor(efl_super(obj, MY_CLASS));
764} 761}
765 762
@@ -789,7 +786,7 @@ _efl_ui_list_efl_ui_view_model_set(Eo *obj EINA_UNUSED, Efl_Ui_List_Data *pd, Ef
789 { 786 {
790 if (pd->relayout) 787 if (pd->relayout)
791 efl_ui_list_relayout_model_set(pd->relayout, NULL); 788 efl_ui_list_relayout_model_set(pd->relayout, NULL);
792 efl_ui_list_segarray_flush(&pd->segarray); 789 efl_ui_list_segarray_flush(pd->segarray);
793 efl_unref(pd->model); 790 efl_unref(pd->model);
794 pd->model = NULL; 791 pd->model = NULL;
795 } 792 }
@@ -930,7 +927,7 @@ _layout(Efl_Ui_List_Data *pd)
930 if (!pd->model) 927 if (!pd->model)
931 return; 928 return;
932 929
933 efl_ui_list_relayout_layout_do(pd->relayout, pd->obj, pd->segarray_first, &pd->segarray); 930 efl_ui_list_relayout_layout_do(pd->relayout, pd->obj, pd->segarray_first, pd->segarray);
934} 931}
935 932
936static void 933static void
@@ -939,7 +936,7 @@ _children_slice_then(void * data, Efl_Event const* event)
939 Efl_Ui_List_Data *pd = data; 936 Efl_Ui_List_Data *pd = data;
940 Eina_Accessor *acc = (Eina_Accessor*)((Efl_Future_Event_Success*)event->info)->value; 937 Eina_Accessor *acc = (Eina_Accessor*)((Efl_Future_Event_Success*)event->info)->value;
941 938
942 efl_ui_list_segarray_insert_accessor(&pd->segarray, pd->outstanding_slice.slice_start, acc); 939 efl_ui_list_segarray_insert_accessor(pd->segarray, pd->outstanding_slice.slice_start, acc);
943 940
944 pd->segarray_first = pd->outstanding_slice.slice_start; 941 pd->segarray_first = pd->outstanding_slice.slice_start;
945 pd->outstanding_slice.slice_start = pd->outstanding_slice.slice_count = 0; 942 pd->outstanding_slice.slice_start = pd->outstanding_slice.slice_count = 0;
@@ -1007,7 +1004,7 @@ _efl_ui_list_efl_ui_list_model_realize(Eo *obj, Efl_Ui_List_Data *pd, Efl_Ui_Lis
1007 1004
1008 evt.child = item->children; 1005 evt.child = item->children;
1009 evt.layout = item->layout; 1006 evt.layout = item->layout;
1010 evt.index = efl_ui_list_item_index_get((Efl_Ui_List_Item *)item); 1007 evt.index = efl_ui_list_item_index_get(item);
1011 efl_event_callback_call(obj, EFL_UI_LIST_EVENT_ITEM_REALIZED, &evt); 1008 efl_event_callback_call(obj, EFL_UI_LIST_EVENT_ITEM_REALIZED, &evt);
1012 efl_ui_focus_composition_dirty(obj); 1009 efl_ui_focus_composition_dirty(obj);
1013 1010
@@ -1033,7 +1030,7 @@ _efl_ui_list_efl_ui_list_model_unrealize(Eo *obj, Efl_Ui_List_Data *pd, Efl_Ui_L
1033 1030
1034 evt.child = item->children; 1031 evt.child = item->children;
1035 evt.layout = item->layout; 1032 evt.layout = item->layout;
1036 evt.index = efl_ui_list_item_index_get((Efl_Ui_List_Item *)item); 1033 evt.index = efl_ui_list_item_index_get(item);
1037 efl_event_callback_call(obj, EFL_UI_LIST_EVENT_ITEM_UNREALIZED, &evt); 1034 efl_event_callback_call(obj, EFL_UI_LIST_EVENT_ITEM_UNREALIZED, &evt);
1038 1035
1039 evas_object_smart_member_del(item->layout); 1036 evas_object_smart_member_del(item->layout);