aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/elementary/elm_index.eo
blob: 9916adcd74480062fd2896c6a19f56647f5f500b (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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
class Elm.Index (Efl.Ui.Layout.Object, Efl.Ui.Direction,
                 Efl.Ui.Clickable, Efl.Ui.Selectable, Efl.Ui.Legacy)
{
   [[elementary index class]]
   legacy_prefix: elm_index;
   eo_prefix: elm_obj_index;
   event_prefix: elm_index;
   methods {
      @property autohide_disabled {
         [[Enable or disable auto hiding feature for a given index widget.]]
         values {
            disabled: bool; [[$true to disable auto hiding, $false to enable]]
         }
      }
      @property omit_enabled {
         [[Enable or disable omit feature for a given index widget.

           @since 1.8]]
         values {
            enabled: bool; [[$true to enable omit feature, $false to disable]]
         }
      }
      @property standard_priority {
         [[Control standard_priority group of index. Priority group will be shown as many items as it can, and other group will be shown one character only.

           @since 1.16]]
         values {
            priority: int; [[$priority target priority value in index]]
         }
      }
      @property delay_change_time {
         [[Set a delay change time for index object.

           Note: delay time is 0.2 sec by default.]]
         values {
            dtime: double; [[The delay change time to set.]]
         }
      }
      @property indicator_disabled {
         [[Control the indicator as to be disabled.

           In Index widget, Indicator notes popup text, which shows a letter has been selecting.]]
         values {
            disabled: bool; [[$true to disable it, $false to enable it]]
         }
      }
      @property item_level {
         [[Set the items level for a given index widget.

           See: elm_index_item_level_get()]]
         values {
            level: int; [[$0 or $1, the currently implemented levels.]]
         }
      }
      level_go {
         [[Flush the changes made to the index items so they work correctly

           This flushes any changes made to items indicating the object is ready to
           go. You should call this before any changes you expect to work. This
           is similar to elm_list_go().

           Warning: If not called, it won't display the index properly.]]
         params {
            @in level: int; [[The index level (one of $0 or $1) where changes were made]]
         }
      }
      item_prepend {
         [[Prepend a new item on a given index widget.


           Despite the most common usage of the $letter argument is for
           single char strings, one could use arbitrary strings as index
           entries.

           $item will be the pointer returned back on $"changed",
           "delay,changed" and $"selected" smart events.]]

         return: Elm.Widget.Item; [[A handle to the item added or $NULL, on errors]]
         params {
            @in letter: string; [[Letter under which the item should be indexed]]
            @in func: Evas_Smart_Cb @optional; [[The function to call when the item is selected.]]
            @in data: const(void_ptr) @optional; [[The item data to set for the index's item]]
         }
      }
      item_clear {
         [[Removes all items from a given index widget.

           If deletion callbacks are set, via elm_object_item_del_cb_set(),
           that callback function will be called for each item in $obj.]]
      }
      item_insert_after {
         [[Insert a new item into the index object after item $after.

           Despite the most common usage of the $letter argument is for
           single char strings, one could use arbitrary strings as index
           entries.

           $item will be the pointer returned back on $"changed",
           "delay,changed" and $"selected" smart events.

           Note: If $after is $NULL this function will behave as
           elm_index_item_append().]]

         return: Elm.Widget.Item; [[A handle to the item added or $NULL, on errors]]
         params {
            @in after: Elm.Widget.Item; [[The index item to insert after.]]
            @in letter: string; [[Letter under which the item should be indexed]]
            @in func: Evas_Smart_Cb @optional; [[The function to call when the item is clicked.]]
            @in data: const(void_ptr) @optional; [[The item data to set for the index's item]]
         }
      }
      item_find {
         [[Find a given index widget's item, using item data.]]

         return: Elm.Widget.Item; [[The index item handle, if found, or $NULL otherwise]]
         params {
            @in data: const(void_ptr); [[The item data pointed to by the desired index item]]
         }
      }
      item_insert_before {
         [[Insert a new item into the index object before item $before.

           Despite the most common usage of the $letter argument is for
           single char strings, one could use arbitrary strings as index
           entries.

           $item will be the pointer returned back on $"changed",
           "delay,changed" and $"selected" smart events.

           Note: If $before is $NULL this function will behave as
           elm_index_item_prepend().]]

         return: Elm.Widget.Item; [[A handle to the item added or $NULL, on errors]]
         params {
            @in before: Elm.Widget.Item; [[The index item to insert after.]]
            @in letter: string; [[Letter under which the item should be indexed]]
            @in func: Evas_Smart_Cb @optional; [[The function to call when the item is clicked.]]
            @in data: const(void_ptr) @optional; [[The item data to set for the index's item]]
         }
      }
      item_append {
         [[Append a new item on a given index widget.

           Despite the most common usage of the $letter argument is for
           single char strings, one could use arbitrary strings as index
           entries.

           $item will be the pointer returned back on $"changed",
           "delay,changed" and $"selected" smart events.]]

         return: Elm.Widget.Item; [[A handle to the item added or $NULL, on errors]]
         params {
            @in letter: string; [[Letter under which the item should be indexed]]
            @in func: Evas_Smart_Cb @optional; [[The function to call when the item is selected.]]
            @in data: const(void_ptr) @optional; [[The item data to set for the index's item]]
         }
      }
      selected_item_get @const {
         [[Returns the last selected item, for a given index widget.]]

         return: Elm.Widget.Item; [[The last item selected on $obj (or $NULL, on errors).]]
         params {
            @in level: int; [[$0 or $1, the currently implemented levels.]]
         }
      }
      item_sorted_insert {
         [[Insert a new item into the given index widget, using $cmp_func function to sort items (by item handles).

           Despite the most common usage of the $letter argument is for
           single char strings, one could use arbitrary strings as index
           entries.

           $item will be the pointer returned back on $"changed",
           "delay,changed" and $"selected" smart events.]]

         return: Elm.Widget.Item; [[A handle to the item added or $NULL, on errors]]
         params {
            @in letter: string; [[Letter under which the item should be indexed]]
            @in func: Evas_Smart_Cb @optional; [[The function to call when the item is clicked.]]
            @in data: const(void_ptr) @optional; [[The item data to set for the index's item]]
            @in cmp_func: Eina_Compare_Cb; [[The comparing function to be used to sort index items by index item handles]]
            @in cmp_data_func: Eina_Compare_Cb @optional; [[A fallback function to be called for the
                                                            sorting of index items by item data). It will be used
                                                            when $cmp_func returns $0 (equality), which means an index
                                                            item with provided item data already exists. To decide which
                                                            data item should be pointed to by the index item in question,
                                                            $cmp_data_func will be used. If $cmp_data_func returns a
                                                            non-negative value, the previous index item data will be
                                                            replaced by the given $item pointer. If the previous data need
                                                            to be freed, it should be done by the $cmp_data_func function,
                                                            because all references to it will be lost. If this function is
                                                            not provided ($NULL is given), index items will be
                                                            duplicated, if $cmp_func returns $0.]]
         }
      }
   }
   implements {
      class.constructor;
      Efl.Object.constructor;
      Efl.Ui.Widget.theme_apply;
      Efl.Ui.Widget.on_access_update;
      Efl.Ui.Direction.direction { get; set; [[Only supports $vertical and $horizontal. Default is $vertical.]] }
      Efl.Access.Object.access_children { get; }
   }
   events {
      changed: Efl.Object; [[Called when index changed]]
      delay,changed: Efl.Object; [[Called when delay changed]]
      level,up: void; [[Called when level increased]]
      level,down: void; [[Called when level decreased]]
   }
}