summaryrefslogtreecommitdiff
path: root/legacy/elementary/src/lib/elm_gengrid_item.eo
blob: 6ace3dc258d100ddc5e9db786bfec4e86e2b257c (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
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
class Elm.Gengrid_Item(Elm.Widget_Item)
{
      eo_prefix: elm_obj_gengrid_item;
      data: Elm_Gen_Item;
      methods {
           @property prev {
                get {
                     /*@
                      Get the @b previous item in a gengrid widget's internal list of items,
                      given a handle to one of those items.

                      This returns the item placed before the @p item, on the container
                      gengrid.

                      @see elm_gengrid_item_next_get()

                      @ingroup Gengrid
                      */
                }
                values {
                     item: Elm_Object_Item *; /*@ @return The item before @p item, or @c NULL if there's none (and on errors) */
                }
           }
           @property next {
                get {
                     /*@
                      Get the @b next item in a gengrid widget's internal list of items,
                      given a handle to one of those items.

                      This returns the item placed after the @p item, on the container
                      gengrid.

                      @see elm_gengrid_item_prev_get()

                      @ingroup Gengrid
                      */
                }
                values {
                     item: Elm_Object_Item *; /*@ @return The item after @p item, or @c NULL if there's none (and on errors) */
                }
           }
           @property selected {
                get {
                     /*@
                      Get whether a given gengrid item is selected or not

                      This API returns EINA_TRUE for all the items selected in multi-select mode as well.

                      @see elm_gengrid_item_selected_set() for more details

                      @ingroup Gengrid
                      */
                }
                set {
                     /*@
                      Set whether a given gengrid item is selected or not

                      This sets the selected state of an item. If multi-selection is
                      not enabled on the containing gengrid and @p selected is @c
                      EINA_TRUE, any other previously selected items will get
                      unselected in favor of this new one.

                      @see elm_gengrid_item_selected_get()

                      @ingroup Gengrid
                      */
                }
                values {
                     selected: Eina_Bool; /*@ the selected state (@c EINA_TRUE selected, @c EINA_FALSE not selected) */
                }
           }
           @property item_class {
                get {
                     /*@
                      Get the Gengrid Item class for the given Gengrid Item.

                      This returns the Gengrid_Item_Class for the given item. It can be used to examine
                      the function pointers and item_style.

                      @ingroup Gengrid
                      */
                }
                values {
                     itc: const (Elm_Gengrid_Item_Class) *; /*@ Gengrid Item class for the given item */
                }
           }
           @property index {
                get {
                     /*@
                      Get the index of the item. It is only valid once displayed.

                      @ingroup Gengrid
                      */
                }
                values {
                     index: int(-1); /*@ @return the position inside the list of item. */
                }
           }
           @property pos {
                get {
                     /*@
                      Get a given gengrid item's position, relative to the whole
                      gengrid's grid area.

                      This returns the "logical" position of the item within the
                      gengrid. For example, @c (0, 1) would stand for first row,
                      second column.

                      @ingroup Gengrid
                      */
                }
                values {
                     x: uint; /*@ Pointer to variable to store the item's <b>row number</b>. */
                     y: uint; /*@ Pointer to variable to store the item's <b>column number</b>. */
                }
           }
           @property select_mode {
                get {
                     /*@
                      Get the gengrid item's select mode.

                      (If getting mode fails, it returns ELM_OBJECT_SELECT_MODE_MAX)

                      @see elm_gengrid_item_select_mode_set()

                      @ingroup Gengrid
                      */
                }
                set {
                     /*@
                      Set the gengrid item's select mode.

                      elm_gengrid_select_mode_set() changes item's select mode.
                      - ELM_OBJECT_SELECT_MODE_DEFAULT : The item will only call their selection func and
                           callback when first becoming selected. Any further clicks will
                           do nothing, unless you set always select mode.
                      - ELM_OBJECT_SELECT_MODE_ALWAYS : This means that, even if selected,
                           every click will make the selected callbacks be called.
                      - ELM_OBJECT_SELECT_MODE_NONE : This will turn off the ability to select the item
                           entirely and they will neither appear selected nor call selected
                           callback functions.
                      - ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY : This will apply no-finger-size rule
                           with ELM_OBJECT_SELECT_MODE_NONE. No-finger-size rule makes an item can be
                           smaller than lower limit. Clickable objects should be bigger than
                           human touch point device (your finger) for some touch or
                           small screen devices. So it is enabled, the item can be shrink than
                           predefined finger-size value. And the item will be updated.

                      @see elm_gengrid_item_select_mode_get()

                      @ingroup Gengrid
                      */
                }
                values {
                     mode: Elm_Object_Select_Mode(4); /*@ The selected mode */
                }
           }
           /*      init { FIXME
                   params {
                   Evas_Smart_Cb func;
                   const(void)* data;
                   }
                   }*/
           show {
                /*@
                 Show the portion of a gengrid's internal grid containing a given
                 item, @b immediately.

                 This causes gengrid to @b redraw its viewport's contents to the
                 region containing the given @p item item, if it is not fully
                 visible.

                 @see elm_gengrid_item_bring_in()

                 @ingroup Gengrid
                 */
                params {
                     @in type: Elm_Gengrid_Item_Scrollto_Type; /*@ Where to position the item in the viewport. */
                }
           }
           bring_in {
                /*@
                 Animatedly bring in, to the visible area of a gengrid, a given
                 item on it.
                 
                 This causes gengrid to jump to the given @p item and show
                 it (by scrolling), if it is not fully visible. This will use
                 animation to do so and take a period of time to complete.

                 @see elm_gengrid_item_show()

                 @ingroup Gengrid
                 */
                params {
                     @in type: Elm_Gengrid_Item_Scrollto_Type; /*@ Where to position the item in the viewport. */
                }
           }
           update {
                /*@
                 Update the contents of a given gengrid item

                 This updates an item by calling all the item class functions
                 again to get the contents, texts and states. Use this when the
                 original item data has changed and you want the changes to be
                 reflected.

                 @ingroup Gengrid
                 */
           }
           item_class_update {
                /*@
                 Update the item class of a gengrid item.

                 This sets another class of the item, changing the way that it is
                 displayed. After changing the item class, elm_gengrid_item_update() is
                 called on the item @p it.

                 @ingroup Gengrid
                 */
                params {
                     @in itc: const (Elm_Gengrid_Item_Class) *; /*@ The gengrid item class describing the function pointers and the item style. */
                }
           }
      }
      implements {
           Eo.Base.constructor;
           Elm.Widget_Item.del_pre;
           Elm.Widget_Item.disable;
           Elm.Widget_Item.signal_emit;
           Elm.Widget_Item.focus.set;
           Elm.Widget_Item.focus.get;
           Elm.Widget_Item.part_text.get;
           Elm.Widget_Item.part_content.get;
           Elm.Widget_Item.tooltip_text_set;
           Elm.Widget_Item.tooltip_style.get;
           Elm.Widget_Item.tooltip_style.set;
           Elm.Widget_Item.tooltip_window_mode.get;
           Elm.Widget_Item.tooltip_window_mode.set;
           Elm.Widget_Item.tooltip_content_cb_set;
           Elm.Widget_Item.tooltip_unset;
           Elm.Widget_Item.cursor.set;
           Elm.Widget_Item.cursor_unset;
           Elm_Interface_Atspi_Accessible.name.get;
           Elm_Interface_Atspi_Accessible.state_set.get;
           Elm_Interface_Atspi_Accessible.children.get;
      }
}