aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/efl/interfaces/efl_ui_autorepeat.eo
blob: 92dcc3a88aa377d2502a8eb08672ce9cdc35e9b4 (plain) (blame)
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
interface @beta Efl.Ui.Autorepeat {
   [[Interface for autorepeating clicks.

     This interface abstracts functions for enabling / disabling this feature.
     When enabled, keeping a button pressed will continuously emit the $repeated
     event until the button is released. The time it takes until it starts
     emitting the event is given by @.autorepeat_initial_timeout, and the
     time between each new emission by @.autorepeat_gap_timeout.
   ]]
   methods {
      @property autorepeat_initial_timeout {
         [[The initial timeout before the autorepeat event is generated.

           Sets the timeout, in seconds, since the button is pressed until the
           first $repeated signal is emitted. If $t is 0.0 or less, there
           won't be any delay and the event will be fired the moment the button is
           pressed.

           See also @.autorepeat_enabled and @.autorepeat_gap_timeout.
         ]]
         values {
            t: double; [[Timeout in seconds.]]
         }
      }
      @property autorepeat_gap_timeout {
         [[The interval between each generated autorepeat event.

           After the first $repeated event is fired, all subsequent ones will
           follow after a delay of $t seconds for each.

           See also @.autorepeat_initial_timeout.
         ]]
         values {
            t: double; [[Time interval in seconds.]]
         }
      }
      @property autorepeat_enabled {
         [[Turn on/off the autorepeat event generated when a button is kept pressed.

           When off, no autorepeat is performed and buttons emit a normal $clicked
           event when they are clicked.
         ]]
         values {
            on: bool; [[A bool to turn on/off the repeat event generation.]]
         }
      }
   }
   events {
      repeated: void; [[Called when a repeated event is emitted]]
   }
}