summaryrefslogtreecommitdiff
path: root/src/lib/elementary/efl_ui_clickable_util.eo
blob: 5db5e67a5ccb89df710f9891f9413b123f358ce2 (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
class @beta Efl.Ui.Clickable_Util {
  [[Helper class that connects theme signals or object events to the @Efl.Input.Clickable interface.

    This simplifies creating widgets that implement the @Efl.Input.Clickable interface.
  ]]
  methods {
    bind_to_theme @class {
      [[This will listen to the standard "click" events on a theme and emit the appropriate
        events through the @Efl.Input.Clickable interface.

        Using these methods widgets do not need to listen to the theme signals. This class
        does it and calls the correct clickable functions.

        This handles theme signals "efl,action,press", "efl,action,unpress" and "efl,action,mouse_out",
        and the @[Efl.Input.Interface.pointer,move] event.
      ]]
      params {
        object : Efl.Canvas.Layout; [[The object to listen on.]]
        clickable : Efl.Input.Clickable; [[The object to call the clickable methods on.]]
      }
    }
    bind_to_object @class {
      [[This will listen to the standard "click" events on an object, and emit the appropriate
        events through the @Efl.Input.Clickable interface.

        Using these methods widgets do not need to listen to the object events. This class
        does it and calls the correct clickable functions.

        The handled events are @[Efl.Input.Interface.pointer,up] and @[Efl.Input.Interface.pointer,down].
      ]]
      params {
        object : Efl.Input.Interface; [[The object to listen on.]]
        clickable : Efl.Input.Clickable; [[The object to call the clickable methods on.]]
      }
    }
  }
}