summaryrefslogtreecommitdiff
path: root/legacy/elementary/src/lib/elm_scroller.eo
blob: 17263e841857af8bf07ad804048259fa5f664d03 (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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
enum Elm.Scroller.Policy
{
   [[Type that controls when scrollbars should appear.

     See also @Elm_Interface_Scrollable.policy.set.
   ]]
   auto = 0, [[Show scrollbars as needed]]
   on, [[Always show scrollbars]]
   off, [[Never show scrollbars]]
   last
}

enum Elm.Scroller.Single_Direction
{
   [[Type that controls how the content is scrolled.

     See also @Elm_Interface_Scrollable.single_direction.set.
   ]]
   none = 0, [[Scroll every direction]]
   soft, [[Scroll single direction if the direction is certain]]
   hard, [[Scroll only single direction]]
   last
}

enum Elm.Scroller.Movement_Block
{
   [[Type that blocks the scroll movement in one or more direction.

     @since 1.8
   ]]
   legacy: elm_scroller_movement;
   no_block = 1 << 0, [[Do not block movements]]
   block_vertical = 1 << 1, [[Block vertical movements]]
   block_horizontal = 1 << 2 [[Block horizontal movements]]
}

class Elm.Scroller (Elm.Layout, Elm_Interface_Scrollable,
                    Elm_Interface_Atspi_Widget_Action,
                    Evas.Scrollable_Interface)
{
   eo_prefix: elm_obj_scroller;
   methods {
      @property propagate_events {
         set {
            [[Set event propagation on a scroller

              This enables or disables event propagation from the scroller
              content to the scroller and its parent. By default event
              propagation is enabled.
            ]]
         }
         get {
            [[Get event propagation for a scroller

              This gets the event propagation for a scroller.
            ]]
         }
         values {
            propagation: bool; [[The propagation state]]
         }
      }
      @property custom_widget_base_theme {
         set {
            [[Set custom theme elements for the scroller]]
         }
         values {
            klass: const(char)*;
            group: const(char)*;
         }
      }
      page_scroll_limit_set @const {
         [[Set the maximum of the movable page at a flicking.

           The value of maximum movable page should be more than 1.

           @since 1.8
         ]]
         params {
            @in page_limit_h: int; [[The maximum of the movable horizontal page]]
            @in page_limit_v: int; [[The maximum of the movable vertical page]]
         }
      }
      page_scroll_limit_get @const {
         [[Get the maximum of the movable page at a flicking.

           @since 1.8
         ]]
         params {
            @in page_limit_h: int *; [[The maximum of the movable horizontal page]]
            @in page_limit_v: int *; [[The maximum of the movable vertical page]]
         }
      }
   }
   implements {
      class.constructor;
      Eo.Base.constructor;
      Evas.Object_Smart.move;
      Evas.Object_Smart.add;
      Evas.Object_Smart.member_add;
      Evas.Object_Smart.resize;
      Elm.Widget.theme_apply;
      Elm.Widget.activate;
      Elm.Widget.focus_next_manager_is;
      Elm.Widget.focus_direction_manager_is;
      Elm.Widget.focus_next;
      Elm.Widget.sub_object_del;
      Elm.Widget.event;
      Elm.Container.content_get;
      Elm.Container.content_set;
      Elm.Container.content_unset;
      Elm.Layout.sizing_eval;
      Elm_Interface_Scrollable.page_size.set;
      Elm_Interface_Scrollable.policy.set;
      Elm_Interface_Scrollable.single_direction;
      Elm_Interface_Atspi_Widget_Action.elm_actions.get;
   }
   events {
      scroll,page,changed;
      hbar,unpress;
      hbar,press;
      hbar,drag;
      vbar,unpress;
      vbar,press;
      vbar,drag;
      scroll,left;
      scroll,right;
      scroll,up;
      scroll,down;
      edge,left;
      edge,right;
      edge,top;
      edge,bottom;
   }

}