summaryrefslogtreecommitdiff
path: root/src/lib/elementary/efl_selection_manager.eo
blob: 5c4c6d9d16fa95504fe1037185c6fcf25be43b35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
import efl_ui_dnd_types;

class Efl.Selection.Manager (Efl.Object) {
   methods {
      selection_set @beta {
         [[Set selection]]
         params {
            @in owner: Efl.Object; [[Seleciton owner]]
            @in type: Efl.Selection.Type; [[Selection type]]
            @in format: Efl.Selection.Format; [[Selection format]]
            @in data: Eina.Slice; [[Selection data]]
            @in seat: uint @optional;[[Specified seat for multiple seats case.]]
         }
         return: ptr(Eina.Future); [[Future for tracking when the selection is lost]]
      }
      selection_get @beta {
         [[Get selection]]
         params {
            @in request: const(Efl.Object); [[Seleciton owner]]
            @in type: Efl.Selection.Type; [[Selection type]]
            @in format: Efl.Selection.Format; [[Selection Format]]
            @in data_func: Efl.Selection.Data_Ready; [[Data ready function pointer]]
            @in seat: uint @optional;[[Specified seat for multiple seats case.]]
         }
      }
      selection_clear @beta {
         params {
            @in owner: Efl.Object; [[Seleciton owner]]
            @in type: Efl.Selection.Type; [[Selection type]]
            @in seat: uint @optional; [[Specified seat for multiple seats case.]]
         }
      }
      selection_has_owner @beta {
         [[Check if the request object has selection or not]]
         params {
            @in request: Efl.Object; [[Request object]]
            @in type: Efl.Selection.Type; [[Selection type]]
            @in seat: uint @optional; [[Specified seat for multiple seats case.]]
         }
         return: bool; [[EINA_TRUE if the request object has selection, otherwise, EINA_FALSE]]
      }
     drag_start @beta {
          [[This starts a drag and drop process at the drag side.
            During dragging, there are three events emitted as belows:
               - EFL_UI_DND_EVENT_DRAG_POS
               - EFL_UI_DND_EVENT_DRAG_ACCEPT
               - EFL_UI_DND_EVENT_DRAG_DONE
          ]]
         params {
            @in drag_obj: Efl.Object; [[Drag object]]
            @in format: Efl.Selection.Format; [[Data format]]
            @in data: Eina.Slice; [[Data to transfer]]
            @in action: Efl.Selection.Action; [[Action when data is transferred]]
            @in icon_func: Efl.Dnd.Drag_Icon_Create; [[Function pointer to create icon]]
            @in seat: uint; [[Specified seat for multiple seats case.]]
         }
      }
      drag_action_set @beta {
         [[This sets the action for the drag]]
         params {
            @in drag_obj: Efl.Object; [[Drag object]]
            @in action: Efl.Selection.Action; [[Drag action]]
            @in seat: uint; [[Specified seat for multiple seats case.]]
         }
      }
      drag_cancel @beta {
         [[This cancels the on-going drag]]
         params {
            @in drag_obj: Efl.Object; [[Drag object]]
            @in seat: uint; [[Specified seat for multiple seats case.]]
         }
      }
      container_drag_item_add @beta {
         [[This registers a drag for items in a container. Many items can be
           dragged at a time. During dragging, there are three events emitted:
              - EFL_UI_DND_EVENT_DRAG_POS
              - EFL_UI_DND_EVENT_DRAG_ACCEPT
              - EFL_UI_DND_EVENT_DRAG_DONE.]]
         params {
            @in cont: Efl.Object; [[Container object]]
            @in time_to_drag: double; [[Time since mouse down happens to drag starts]]
            @in anim_duration: double; [[animation duration]]
            @in data_func: Efl.Dnd.Drag_Data_Get; [[Data and its format]]
            @in item_func: Efl.Dnd.Item_Get; [[Item to determine drag start]]
            @in icon_func: Efl.Dnd.Drag_Icon_Create; [[Icon used during drag]]
            @in icon_list_func: Efl.Dnd.Drag_Icon_List_Create; [[Icons used for animations]]
            @in seat: uint; [[Specified seat for multiple seats case]]
         }
      }
      container_drag_item_del @beta {
         [[Remove drag function of items in the container object.]]
         params {
            @in cont: Efl.Object; [[Container object]]
            @in seat: uint; [[Specified seat for multiple seats case]]
         }
      }
      drop_target_add @beta {
         [[Add a dropable target. There are four events emitted:
              - EFL_UI_DND_DROP_DRAG_ENTER
              - EFL_UI_DND_DROP_DRAG_LEAVE
              - EFL_UI_DND_DROP_DRAG_POS
              - EFL_UI_DND_DROP_DRAG_DROP.]]
         params {
            @in target_obj: Efl.Object; [[Drop target]]
            @in format: Efl.Selection.Format; [[Accepted data format]]
            @in seat: uint; [[Specified seat for multiple seats case.]]
         }
         return: bool; [[$true on success, $false otherwise]]
      }
      drop_target_del @beta {
         [[Remove a dropable target]]
         params {
            @in target_obj: Efl.Object; [[Drop target]]
            @in format: Efl.Selection.Format; [[Accepted data format]]
            @in seat: uint; [[Specified seat for multiple seats case.]]
         }
      }
      container_drop_item_add @beta {
         [[Add dropable target for a container in which items can drop to it]]
         params {
            @in cont: Efl.Object; [[Container object]]
            @in format: Efl.Selection.Format; [[Accepted data formats]]
            @in item_func: Efl.Dnd.Item_Get; [[Get item at specific position]]
            @in seat: uint; [[Specified seat for multiple seats case.]]
         }
      }
      container_drop_item_del @beta {
         [[Remove dropable target for the container]]
         params {
            @in cont: Efl.Object; [[Container object]]
            @in seat: uint; [[Specified seat for multiple seats case.]]
         }
      }
   }
   implements {
      Efl.Object.constructor;
      Efl.Object.destructor;
   }
}