Changeset View
Changeset View
Standalone View
Standalone View
src/lib/elementary/efl_ui_clickable.eo
- This file was added.
1 | struct Efl.Ui.Clickable_Clicked { | ||||
---|---|---|---|---|---|
2 | [[A struct that expresses a click in elementary.]] | ||||
segfaultxavi: Event structures should be suffixed `_Event`. | |||||
Done ReplyWhen did we start with this? The API we have released last release is full of none Event suffixed Types. bu5hm4n: When did we start with this? The API we have released last release is full of none `Event`… | |||||
Done ReplyYou are right, we have released event structs without _Event and I now think that's bad. segfaultxavi: You are right, we have released event structs without `_Event` and I now think that's bad. | |||||
3 | repeated : int; [[The amount of how often the clicked event was repeated in a certain amount of time]] | ||||
4 | button : int; [[The Button that is pressed]] | ||||
5 | } | ||||
6 | | ||||
7 | mixin @beta Efl.Ui.Clickable | ||||
8 | { | ||||
9 | [[Efl UI clickable interface]] | ||||
10 | event_prefix: efl_ui; | ||||
11 | methods { | ||||
12 | press @protected { | ||||
13 | [[Change internal states that a button got pressed. | ||||
14 | | ||||
15 | When the button is already pressed, this is silently ignored. | ||||
16 | ]] | ||||
17 | params { | ||||
18 | button : uint; [[The number of the button. FIXME ensure to have the right interval of possible input]] | ||||
19 | } | ||||
20 | } | ||||
21 | unpress @protected { | ||||
22 | [[Change internal states that a button got unpressed. | ||||
23 | | ||||
24 | When the button is not pressed, this is silently ignored. | ||||
25 | ]] | ||||
Done ReplyDocs for this event? I do not see the difference with clicked. segfaultxavi: Docs for this event? I do not see the difference with `clicked`. | |||||
26 | params { | ||||
27 | button : uint; [[The number of the button. FIXME ensure to have the right interval of possible input]] | ||||
28 | } | ||||
29 | } | ||||
30 | button_state_reset @protected { | ||||
31 | [[This aborts the internal state after a press call. | ||||
Not Done ReplyThis should be renamed button_state_reset or similar. abort is a function call which stops program execution, and we don't want any confusion related to that function. zmike: This should be renamed `button_state_reset` or similar. `abort` is a function call which stops… | |||||
32 | | ||||
33 | This will stop the timer for longpress. And set the state of the clickable mixin back into the unpressed state. | ||||
Not Done ReplyThe descriptions for these should be more explicit like "when an object is pressed and then unpressed by the same button". zmike: The descriptions for these should be more explicit like "when an object is pressed and then… | |||||
34 | ]] | ||||
35 | params { | ||||
36 | button : uint; | ||||
37 | } | ||||
38 | } | ||||
39 | } | ||||
40 | events { | ||||
41 | clicked: Efl.Ui.Clickable_Clicked; [[Called when object is in sequence pressed and unpressed, by the primary button]] | ||||
42 | clicked,any : Efl.Ui.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.]] | ||||
43 | pressed: int; [[Called when the object is pressed, event_info is the button that got pressed]] | ||||
44 | unpressed: int; [[Called when the object is no longer pressed, event_info is the button that got pressed]] | ||||
45 | longpressed: int; [[Called when the object receives a long press, event_info is the button that got pressed]] | ||||
46 | } | ||||
47 | } |
Event structures should be suffixed _Event.