summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/efl_input_clickable.eo
blob: 14ca084d372973b46989849c48c456e5a74128e8 (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
struct @beta Efl.Input.Clickable_Clicked {
   [[A struct that expresses a click in elementary.]]
   repeated : int; [[The amount of how often the clicked event was repeated in a certain amount of time]]
   button : int; [[The Button that is pressed]]
}

mixin @beta Efl.Input.Clickable
{
   [[Efl input clickable interface]]
   event_prefix: efl_input;
   methods {
      press @protected {
         [[Change internal states that a button got pressed.

           When the button is already pressed, this is silently ignored.
         ]]
         params {
            button : uint; [[The number of the button. FIXME ensure to have the right interval of possible input]]
         }
      }
      unpress @protected {
         [[Change internal states that a button got unpressed.

           When the button is not pressed, this is silently ignored.
         ]]
         params {
            button : uint; [[The number of the button. FIXME ensure to have the right interval of possible input]]
         }
      }
      button_state_reset @protected {
         [[This aborts the internal state after a press call.

           This will stop the timer for longpress. And set the state of the clickable mixin back into the unpressed state.
         ]]
         params {
            button : uint;
         }
      }
   }
   events {
      clicked: Efl.Input.Clickable_Clicked; [[Called when object is in sequence pressed and unpressed, by the primary button]]
      clicked,any: Efl.Input.Clickable_Clicked; [[Called when object is in sequence pressed and unpressed by any button. The button that triggered the event can be found in the event information.]]
      pressed: int; [[Called when the object is pressed, event_info is the button that got pressed]]
      unpressed: int; [[Called when the object is no longer pressed, event_info is the button that got pressed]]
      longpressed: int; [[Called when the object receives a long press, event_info is the button that got pressed]]
   }
}