summaryrefslogtreecommitdiff
path: root/src/lib/elementary/efl_ui_dnd.eo
blob: 192644e7b1fa4efdee67a345abdc7ddfe40204c5 (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
import efl_ui_dnd_types;

mixin Efl.Ui.Dnd {
   data: null;
   methods {
      drag_start {
         [[Start 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 format: Efl.Selection.Format; [[The data format]]
            @in data: Eina.Slice; [[The drag data]]
            @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 {
         [[Set the action for the drag]]
         params {
            @in action: Efl.Selection.Action; [[Drag action]]
            @in seat: uint; [[Specified seat for multiple seats case.]]
         }
      }
      drag_cancel {
         [[Cancel the on-going drag]]
         params {
            @in seat: uint; [[Specified seat for multiple seats case.]]
         }
      }
      drop_target_add {
         [[Make the current object as drop targert.
           There are four events emitted:
            - EFL_UI_DND_EVENT_DRAG_ENTER
            - EFL_UI_DND_EVENT_DRAG_LEAVE
            - EFL_UI_DND_EVENT_DRAG_POS
            - EFL_UI_DND_EVENT_DRAG_DROP.]]
         params {
            @in format: Efl.Selection.Format; [[Accepted data format]]
            @in seat: uint; [[Specified seat for multiple seats case.]]
         }
      }
      drop_target_del {
         [[Delete the dropable status from object]]
         params {
            @in format: Efl.Selection.Format; [[Accepted data format]]
            @in seat: uint; [[Specified seat for multiple seats case.]]
         }
      }
   }
   events {
      drag,accept; [[accept drag data]]
      drag,done; [[drag is done (mouse up)]]
      drag,enter; [[called when the drag object enters this object]]
      drag,leave; [[called when the drag object leaves this object]]
      drag,pos; [[called when the drag object changes drag position]]
      drag,drop; [[called when the drag object dropped on this object]]
   }
}