summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2018-08-01 19:45:36 -0300
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2018-08-01 19:52:51 -0300
commit71d339579cb8fbbc1881dd3c30cc8e6ccde809f3 (patch)
treee15bacf943c3a03feea51715f8198b2d27ccd033
parent4fb9205a94759eb35dc2bb2965b0596d6f775a01 (diff)
elementary: efl_ui_view_list cleanup
Summary: private data cleanup removed callbacks Reviewers: felipealmeida, SanghyeonLee Reviewed By: felipealmeida Subscribers: Hermet Differential Revision: https://phab.enlightenment.org/D6707
-rw-r--r--src/lib/elementary/efl_ui_view_list.c27
-rw-r--r--src/lib/elementary/efl_ui_view_list_private.h32
2 files changed, 9 insertions, 50 deletions
diff --git a/src/lib/elementary/efl_ui_view_list.c b/src/lib/elementary/efl_ui_view_list.c
index ca31058401..08c8604e82 100644
--- a/src/lib/elementary/efl_ui_view_list.c
+++ b/src/lib/elementary/efl_ui_view_list.c
@@ -2,13 +2,10 @@
2# include "elementary_config.h" 2# include "elementary_config.h"
3#endif 3#endif
4#define EFL_ACCESS_OBJECT_PROTECTED 4#define EFL_ACCESS_OBJECT_PROTECTED
5#define EFL_ACCESS_WIDGET_ACTION_PROTECTED
6#define EFL_ACCESS_SELECTION_PROTECTED 5#define EFL_ACCESS_SELECTION_PROTECTED
7#define EFL_UI_SCROLL_MANAGER_PROTECTED 6#define EFL_UI_SCROLL_MANAGER_PROTECTED
8#define EFL_UI_SCROLLBAR_PROTECTED 7#define EFL_UI_SCROLLBAR_PROTECTED
9#define EFL_UI_SCROLLBAR_BETA 8#define EFL_UI_SCROLLBAR_BETA
10#define EFL_GFX_SIZE_HINT_PROTECTED
11#define EFL_UI_VIEW_LIST_PROTECTED
12#define EFL_UI_FOCUS_COMPOSITION_PROTECTED 9#define EFL_UI_FOCUS_COMPOSITION_PROTECTED
13#define EFL_UI_WIDGET_FOCUS_MANAGER_PROTECTED 10#define EFL_UI_WIDGET_FOCUS_MANAGER_PROTECTED
14 11
@@ -400,12 +397,6 @@ _efl_ui_view_list_hbar_unpress_cb(void *data,
400} 397}
401 398
402static void 399static void
403_scroll_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED)
404{
405 //scroll cb
406}
407
408static void
409_efl_ui_view_list_bar_size_changed_cb(void *data, const Efl_Event *event EINA_UNUSED) 400_efl_ui_view_list_bar_size_changed_cb(void *data, const Efl_Event *event EINA_UNUSED)
410{ 401{
411 Eo *obj = data; 402 Eo *obj = data;
@@ -490,8 +481,8 @@ _efl_ui_view_list_edje_object_attach(Eo *obj)
490 (obj, "reload", "efl", _efl_ui_view_list_reload_cb, obj); 481 (obj, "reload", "efl", _efl_ui_view_list_reload_cb, obj);
491 //Vertical bar 482 //Vertical bar
492 efl_layout_signal_callback_add 483 efl_layout_signal_callback_add
493 (obj, "drag", "efl.dragable.vbar", _efl_ui_view_list_vbar_drag_cb, 484 (obj, "drag", "efl.dragable.vbar",
494 obj); 485 _efl_ui_view_list_vbar_drag_cb, obj);
495 efl_layout_signal_callback_add 486 efl_layout_signal_callback_add
496 (obj, "drag,set", "efl.dragable.vbar", 487 (obj, "drag,set", "efl.dragable.vbar",
497 _efl_ui_view_list_edje_drag_cb, obj); 488 _efl_ui_view_list_edje_drag_cb, obj);
@@ -516,8 +507,8 @@ _efl_ui_view_list_edje_object_attach(Eo *obj)
516 507
517 //Horizontal bar 508 //Horizontal bar
518 efl_layout_signal_callback_add 509 efl_layout_signal_callback_add
519 (obj, "drag", "efl.dragable.hbar", _efl_ui_view_list_hbar_drag_cb, 510 (obj, "drag", "efl.dragable.hbar",
520 obj); 511 _efl_ui_view_list_hbar_drag_cb, obj);
521 efl_layout_signal_callback_add 512 efl_layout_signal_callback_add
522 (obj, "drag,set", "efl.dragable.hbar", 513 (obj, "drag,set", "efl.dragable.hbar",
523 _efl_ui_view_list_edje_drag_cb, obj); 514 _efl_ui_view_list_edje_drag_cb, obj);
@@ -574,8 +565,8 @@ _efl_ui_view_list_edje_object_detach(Evas_Object *obj)
574 565
575 //Horizontal bar 566 //Horizontal bar
576 efl_layout_signal_callback_del 567 efl_layout_signal_callback_del
577 (obj, "drag", "efl.dragable.hbar", _efl_ui_view_list_hbar_drag_cb, 568 (obj, "drag", "efl.dragable.hbar",
578 obj); 569 _efl_ui_view_list_hbar_drag_cb, obj);
579 efl_layout_signal_callback_del 570 efl_layout_signal_callback_del
580 (obj, "drag,set", "efl.dragable.hbar", 571 (obj, "drag,set", "efl.dragable.hbar",
581 _efl_ui_view_list_edje_drag_cb, obj); 572 _efl_ui_view_list_edje_drag_cb, obj);
@@ -632,16 +623,12 @@ _efl_ui_view_list_efl_canvas_group_group_add(Eo *obj, Efl_Ui_View_List_Data *pd)
632 edje_object_thaw(wd->resize_obj); 623 edje_object_thaw(wd->resize_obj);
633 efl_gfx_stack_raise((Eo *)o); 624 efl_gfx_stack_raise((Eo *)o);
634 625
635 pd->mode = ELM_LIST_COMPRESS;
636
637 efl_gfx_entity_visible_set(pd->pan_obj, EINA_TRUE); 626 efl_gfx_entity_visible_set(pd->pan_obj, EINA_TRUE);
638
639 efl_access_object_access_type_set(obj, EFL_ACCESS_TYPE_DISABLED); 627 efl_access_object_access_type_set(obj, EFL_ACCESS_TYPE_DISABLED);
640 628
641 edje_object_size_min_calc(wd->resize_obj, &min.w, &min.h); 629 edje_object_size_min_calc(wd->resize_obj, &min.w, &min.h);
642 efl_gfx_size_hint_restricted_min_set(obj, min); 630 efl_gfx_size_hint_restricted_min_set(obj, min);
643 631
644 efl_event_callback_add(obj, EFL_UI_EVENT_SCROLL, _scroll_cb, obj);
645 efl_event_callback_add(obj, EFL_UI_SCROLLBAR_EVENT_BAR_SIZE_CHANGED, 632 efl_event_callback_add(obj, EFL_UI_SCROLLBAR_EVENT_BAR_SIZE_CHANGED,
646 _efl_ui_view_list_bar_size_changed_cb, obj); 633 _efl_ui_view_list_bar_size_changed_cb, obj);
647 efl_event_callback_add(obj, EFL_UI_SCROLLBAR_EVENT_BAR_POS_CHANGED, 634 efl_event_callback_add(obj, EFL_UI_SCROLLBAR_EVENT_BAR_POS_CHANGED,
@@ -708,7 +695,6 @@ _efl_ui_view_list_efl_object_constructor(Eo *obj, Efl_Ui_View_List_Data *pd)
708 pd->style = eina_stringshare_add(elm_widget_style_get(obj)); 695 pd->style = eina_stringshare_add(elm_widget_style_get(obj));
709 696
710 pd->factory = NULL; 697 pd->factory = NULL;
711 pd->orient = EFL_ORIENT_DOWN;
712 pd->min.w = 0; 698 pd->min.w = 0;
713 pd->min.h = 0; 699 pd->min.h = 0;
714 700
@@ -723,7 +709,6 @@ _efl_ui_view_list_efl_object_destructor(Eo *obj, Efl_Ui_View_List_Data *pd)
723 efl_unref(pd->model); 709 efl_unref(pd->model);
724 eina_stringshare_del(pd->style); 710 eina_stringshare_del(pd->style);
725 711
726 efl_event_callback_del(obj, EFL_UI_EVENT_SCROLL, _scroll_cb, obj);
727 _efl_ui_view_list_edje_object_detach(obj); 712 _efl_ui_view_list_edje_object_detach(obj);
728 713
729 ELM_SAFE_FREE(pd->pan_obj, evas_object_del); 714 ELM_SAFE_FREE(pd->pan_obj, evas_object_del);
diff --git a/src/lib/elementary/efl_ui_view_list_private.h b/src/lib/elementary/efl_ui_view_list_private.h
index 7560870f14..94c5d894a8 100644
--- a/src/lib/elementary/efl_ui_view_list_private.h
+++ b/src/lib/elementary/efl_ui_view_list_private.h
@@ -5,26 +5,19 @@
5# include "elementary_config.h" 5# include "elementary_config.h"
6#endif 6#endif
7 7
8#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED
9#define ELM_INTERFACE_ATSPI_SELECTION_PROTECTED
10#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
11
12#include <Elementary.h> 8#include <Elementary.h>
13#include "elm_priv.h" 9#include "elm_priv.h"
14 10
15typedef struct _Efl_Ui_View_List_Data Efl_Ui_View_List_Data; 11typedef struct _Efl_Ui_View_List_Data Efl_Ui_View_List_Data;
16
17int efl_ui_view_list_item_index_get(Efl_Ui_View_List_LayoutItem *item); 12int efl_ui_view_list_item_index_get(Efl_Ui_View_List_LayoutItem *item);
18 13
19typedef struct _Efl_Ui_View_List_Data Efl_Ui_View_List_Data;
20
21#include "efl_ui_view_list_segarray.h" 14#include "efl_ui_view_list_segarray.h"
22 15
23struct _Efl_Ui_View_List_Data 16struct _Efl_Ui_View_List_Data
24{ 17{
25 Eo *obj; 18 Eo *obj;
26 Eo *scrl_mgr; 19 Eo *scrl_mgr;
27 Efl_Ui_View_List_Pan *pan_obj; 20 Efl_Ui_View_List_Pan *pan_obj;
28 Efl_Model *model; 21 Efl_Model *model;
29 22
30 Eina_Stringshare *style; 23 Eina_Stringshare *style;
@@ -41,21 +34,13 @@ struct _Efl_Ui_View_List_Data
41 34
42 Efl_Ui_Focus_Manager *manager; 35 Efl_Ui_Focus_Manager *manager;
43 Efl_Ui_View_List_Relayout *relayout; 36 Efl_Ui_View_List_Relayout *relayout;
44 37 Efl_Ui_View_List_SegArray *segarray;
45 Efl_Orient orient; 38 int segarray_first;
46
47 int segarray_first;
48 Efl_Ui_View_List_SegArray *segarray;
49 39
50 Elm_Object_Select_Mode select_mode; 40 Elm_Object_Select_Mode select_mode;
51 Elm_List_Mode mode;
52
53 Eina_Rect gmt;
54 Eina_Size2D min; 41 Eina_Size2D min;
55 42
56 Eina_Bool homogeneous : 1; 43 Eina_Bool homogeneous : 1;
57 Eina_Bool recalc : 1;
58 Eina_Bool on_hold : 1;
59 Eina_Bool scrl_freeze : 1; 44 Eina_Bool scrl_freeze : 1;
60}; 45};
61 46
@@ -65,17 +50,6 @@ struct _Efl_Ui_View_List_Pan_Data
65{ 50{
66 Eo *wobj; 51 Eo *wobj;
67 Eina_Rect gmt; 52 Eina_Rect gmt;
68 Evas_Coord move_diff;
69
70 Ecore_Job *resize_job;
71};
72
73typedef struct _Efl_Ui_View_List_Slice Efl_Ui_View_List_Slice;
74
75struct _Efl_Ui_View_List_Slice
76{
77 Efl_Ui_View_List_Data *pd;
78 int newstart, slicestart, newslice;
79}; 53};
80 54
81#define EFL_UI_VIEW_LIST_DATA_GET(o, ptr) \ 55#define EFL_UI_VIEW_LIST_DATA_GET(o, ptr) \