summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elm_genlist_item_eo.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/elementary/elm_genlist_item_eo.h')
-rw-r--r--src/lib/elementary/elm_genlist_item_eo.h496
1 files changed, 496 insertions, 0 deletions
diff --git a/src/lib/elementary/elm_genlist_item_eo.h b/src/lib/elementary/elm_genlist_item_eo.h
new file mode 100644
index 0000000..ef73deb
--- /dev/null
+++ b/src/lib/elementary/elm_genlist_item_eo.h
@@ -0,0 +1,496 @@
1#ifndef _ELM_GENLIST_ITEM_EO_H_
2#define _ELM_GENLIST_ITEM_EO_H_
3
4#ifndef _ELM_GENLIST_ITEM_EO_CLASS_TYPE
5#define _ELM_GENLIST_ITEM_EO_CLASS_TYPE
6
7typedef Eo Elm_Genlist_Item;
8
9#endif
10
11#ifndef _ELM_GENLIST_ITEM_EO_TYPES
12#define _ELM_GENLIST_ITEM_EO_TYPES
13
14
15#endif
16/** Elementary genlist item class
17 *
18 * @ingroup Elm_Genlist_Item
19 */
20#define ELM_GENLIST_ITEM_CLASS elm_genlist_item_class_get()
21
22EWAPI const Efl_Class *elm_genlist_item_class_get(void);
23
24/**
25 * @brief Get the previous item in a genlist widget's internal list of items,
26 * given a handle to one of those items.
27 *
28 * This returns the item placed before the @c item, on the container genlist.
29 *
30 * If filter is set on genlist, this returns the filtered item placed before
31 * @c item in the list.
32 *
33 * Note that parent / child relationship is not taken into account, the
34 * previous visual item is always returned, could it be a parent, a child or a
35 * group item.
36 *
37 * NULL is returned if called on the first item.
38 *
39 * @param[in] obj The object.
40 *
41 * @return The item before @c item, or @c null if there's none (and on errors).
42 *
43 * @ingroup Elm_Genlist_Item
44 */
45EOAPI Elm_Widget_Item *elm_obj_genlist_item_prev_get(const Eo *obj);
46
47/**
48 * @brief Get the next item in a genlist widget's internal lis of items, given
49 * a handle to one of those items.
50 *
51 * This returns the item placed after the @c item, on the container genlist.
52 *
53 * If filter is set on genlist, this returns the filtered item placed after
54 * @c item in the list.
55 *
56 * Note that parent / child relationship is not taken into account, the next
57 * visual item is always returned, could it be a parent, a child or a group
58 * item.
59 *
60 * NULL is returned if called on the last item.
61 *
62 * @param[in] obj The object.
63 *
64 * @return The item after @c item, or @c null if there's none (and on errors).
65 *
66 * @ingroup Elm_Genlist_Item
67 */
68EOAPI Elm_Widget_Item *elm_obj_genlist_item_next_get(const Eo *obj);
69
70/**
71 * @brief Get the parent item of the given item
72 *
73 * This returns the item that was specified as parent of the item @c it on @ref
74 * elm_genlist_item_append and insertion related functions.
75 *
76 * @param[in] obj The object.
77 *
78 * @return The parent of the item or @c null if it has no parent.
79 *
80 * @ingroup Elm_Genlist_Item
81 */
82EOAPI Elm_Widget_Item *elm_obj_genlist_item_parent_item_get(const Eo *obj);
83
84/**
85 * @brief Get the list of subitems of a given item
86 *
87 * This returns the list of subitems that an item possesses. It cannot be
88 * changed.
89 *
90 * @param[in] obj The object.
91 *
92 * @return The list of subitems, @c null on error.
93 *
94 * @since 1.9
95 *
96 * @ingroup Elm_Genlist_Item
97 */
98EOAPI const Eina_List *elm_obj_genlist_item_subitems_get(const Eo *obj);
99
100/**
101 * @brief Set whether a given genlist item is selected or not
102 *
103 * This sets the selected state of an item. If multi selection is not enabled
104 * on the containing genlist and @c selected is @c true, any other previously
105 * selected items will get unselected in favor of this new one.
106 *
107 * @param[in] obj The object.
108 * @param[in] selected The selected state ($true selected, @c false not
109 * selected).
110 *
111 * @ingroup Elm_Genlist_Item
112 */
113EOAPI void elm_obj_genlist_item_selected_set(Eo *obj, Eina_Bool selected);
114
115/**
116 * @brief Get whether a given genlist item is selected or not.
117 *
118 * @param[in] obj The object.
119 *
120 * @return The selected state ($true selected, @c false not selected).
121 *
122 * @ingroup Elm_Genlist_Item
123 */
124EOAPI Eina_Bool elm_obj_genlist_item_selected_get(const Eo *obj);
125
126/**
127 * @brief Sets the expanded state of an item.
128 *
129 * This function flags the item of type #ELM_GENLIST_ITEM_TREE as expanded or
130 * not.
131 *
132 * The theme will respond to this change visually, and a signal "expanded" or
133 * "contracted" will be sent from the genlist with a pointer to the item that
134 * has been expanded/contracted.
135 *
136 * Calling this function won't show or hide any child of this item (if it is a
137 * parent). You must manually delete and create them on the callbacks of the
138 * "expanded" or "contracted" signals.
139 *
140 * @param[in] obj The object.
141 * @param[in] expanded The expanded state ($true expanded, @c false not
142 * expanded).
143 *
144 * @ingroup Elm_Genlist_Item
145 */
146EOAPI void elm_obj_genlist_item_expanded_set(Eo *obj, Eina_Bool expanded);
147
148/**
149 * @brief Get the expanded state of an item
150 *
151 * This gets the expanded state of an item.
152 *
153 * @param[in] obj The object.
154 *
155 * @return The expanded state ($true expanded, @c false not expanded).
156 *
157 * @ingroup Elm_Genlist_Item
158 */
159EOAPI Eina_Bool elm_obj_genlist_item_expanded_get(const Eo *obj);
160
161/**
162 * @brief Get the depth of expanded item.
163 *
164 * @param[in] obj The object.
165 *
166 * @return The depth of expanded item.
167 *
168 * @ingroup Elm_Genlist_Item
169 */
170EOAPI int elm_obj_genlist_item_expanded_depth_get(const Eo *obj);
171
172/**
173 * @brief Get the Genlist Item class for the given Genlist Item.
174 *
175 * This returns the Genlist_Item_Class for the given item. It can be used to
176 * examine the function pointers and item_style.
177 *
178 * @param[in] obj The object.
179 *
180 * @return Genlist Item class for the given item.
181 *
182 * @ingroup Elm_Genlist_Item
183 */
184EOAPI const Elm_Genlist_Item_Class *elm_obj_genlist_item_class_get(const Eo *obj);
185
186/**
187 * @brief Get the index of the item. It is only valid once displayed.
188 *
189 * The index start from 1.
190 *
191 * @param[in] obj The object.
192 *
193 * @return The position inside the list of item.
194 *
195 * @ingroup Elm_Genlist_Item
196 */
197EOAPI int elm_obj_genlist_item_index_get(const Eo *obj);
198
199/**
200 * @brief Get the item's decorate mode.
201 *
202 * This function just returns the name of the item's decorate mode.
203 *
204 * @param[in] obj The object.
205 *
206 * @return Name of the item's decorate mode.
207 *
208 * @ingroup Elm_Genlist_Item
209 */
210EOAPI const char *elm_obj_genlist_item_decorate_mode_get(const Eo *obj);
211
212/**
213 * @brief Set the flip state of a given genlist item.
214 *
215 * This function sets the flip state of a given genlist item. Flip mode
216 * overrides current item object. It can be used for on-the-fly item replace.
217 * Flip mode can be used with/without decorate mode.
218 *
219 * @param[in] obj The object.
220 * @param[in] flip The flip mode.
221 *
222 * @ingroup Elm_Genlist_Item
223 */
224EOAPI void elm_obj_genlist_item_flip_set(Eo *obj, Eina_Bool flip);
225
226/**
227 * @brief Get the flip state of a given genlist item.
228 *
229 * This function returns the flip state of a given genlist item. If the
230 * parameter is invalid, it returns @c false.
231 *
232 * @param[in] obj The object.
233 *
234 * @return The flip mode.
235 *
236 * @ingroup Elm_Genlist_Item
237 */
238EOAPI Eina_Bool elm_obj_genlist_item_flip_get(const Eo *obj);
239
240/**
241 * @brief Set the genlist item's select mode.
242 *
243 * ELM_OBJECT_SELECT_MODE_DEFAULT means that the item will only call their
244 * selection func and callback when first becoming selected. Any further clicks
245 * will do nothing, unless you set always select mode.
246 *
247 * ELM_OBJECT_SELECT_MODE_ALWAYS means that even if selected, every click will
248 * make the selected callbacks be called.
249 *
250 * ELM_OBJECT_SELECT_MODE_NONE will turn off the ability to select the item
251 * entirely and they will neither appear selected nor call selected callback
252 * functions.
253 *
254 * ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY will apply no-finger-size rule with
255 * ELM_OBJECT_SELECT_MODE_NONE. No-finger-size rule makes an item can be
256 * smaller than lower limit. Clickable objects should be bigger than human
257 * touch point device (your finger) for some touch or small screen devices. So
258 * it is enabled, the item can be shrink than predefined finger-size value. And
259 * the item will be updated.
260 *
261 * @param[in] obj The object.
262 * @param[in] mode The selected mode.
263 *
264 * @ingroup Elm_Genlist_Item
265 */
266EOAPI void elm_obj_genlist_item_select_mode_set(Eo *obj, Elm_Object_Select_Mode mode);
267
268/**
269 * @brief Get the genlist item's select mode.
270 *
271 * It's ELM_OBJECT_SELECT_MODE_MAX on failure.
272 *
273 * @param[in] obj The object.
274 *
275 * @return The selected mode.
276 *
277 * @ingroup Elm_Genlist_Item
278 */
279EOAPI Elm_Object_Select_Mode elm_obj_genlist_item_select_mode_get(const Eo *obj);
280
281/**
282 * @brief Get the Item's type.
283 *
284 * This function returns the item's type. Normally the item's type. If it
285 * failed, return value is ELM_GENLIST_ITEM_MAX.
286 *
287 * @param[in] obj The object.
288 *
289 * @return Item type.
290 *
291 * @ingroup Elm_Genlist_Item
292 */
293EOAPI Elm_Genlist_Item_Type elm_obj_genlist_item_type_get(const Eo *obj);
294
295/**
296 * @brief Set whether a given genlist item is pinned or not
297 *
298 * This sets a genlist item as pinned so that it will be always available in
299 * the viewport available for user interaction. Group items cannot be pinned.
300 * Also when a new item is pinned, the current pinned item will get unpinned.
301 * Item pinning cannot be done in reorder mode too.
302 *
303 * @param[in] obj The object.
304 * @param[in] pin The item pin state state ($true pin item, @c false unpin
305 * item).
306 *
307 * @ingroup Elm_Genlist_Item
308 */
309EOAPI void elm_obj_genlist_item_pin_set(Eo *obj, Eina_Bool pin);
310
311/**
312 * @brief Get whether a given genlist item is pinned or not.
313 *
314 * @param[in] obj The object.
315 *
316 * @return The item pin state state ($true pin item, @c false unpin item).
317 *
318 * @ingroup Elm_Genlist_Item
319 */
320EOAPI Eina_Bool elm_obj_genlist_item_pin_get(const Eo *obj);
321
322/**
323 * @brief Get the number of subitems of a given item.
324 *
325 * This returns the number of subitems that an item possesses.
326 *
327 * @param[in] obj The object.
328 *
329 * @return The number of subitems, 0 on error.
330 *
331 * @since 1.9
332 *
333 * @ingroup Elm_Genlist_Item
334 */
335EOAPI unsigned int elm_obj_genlist_item_subitems_count(Eo *obj);
336
337/**
338 * @brief Remove all sub-items (children) of the given item.
339 *
340 * This removes all items that are children (and their descendants) of the
341 * given item @c it.
342 * @param[in] obj The object.
343 *
344 * @ingroup Elm_Genlist_Item
345 */
346EOAPI void elm_obj_genlist_item_subitems_clear(Eo *obj);
347
348/** Promote an item to the top of the list.
349 *
350 * @ingroup Elm_Genlist_Item
351 */
352EOAPI void elm_obj_genlist_item_promote(Eo *obj);
353
354/** Demote an item to the end of the list.
355 *
356 * @ingroup Elm_Genlist_Item
357 */
358EOAPI void elm_obj_genlist_item_demote(Eo *obj);
359
360/**
361 * @brief Show the portion of a genlist's internal list containing a given
362 * item, immediately.
363 *
364 * This causes genlist to jump to the given item @c it and show it (by jumping
365 * to that position), if it is not fully visible.
366 *
367 * @param[in] obj The object.
368 * @param[in] type The position to bring in, the given item to. @ref
369 * Elm_Genlist_Item_Scrollto_Type.
370 *
371 * @ingroup Elm_Genlist_Item
372 */
373EOAPI void elm_obj_genlist_item_show(Eo *obj, Elm_Genlist_Item_Scrollto_Type type);
374
375/**
376 * @brief Animatedly bring in, to the visible area of a genlist, a given item
377 * on it.
378 *
379 * This causes genlist to jump to the given item @c it and show it (by
380 * animatedly scrolling), if it is not fully visible. This may use animation
381 * and take a some time to do so.
382 *
383 * @param[in] obj The object.
384 * @param[in] type The position to bring in, the given item to. @ref
385 * Elm_Genlist_Item_Scrollto_Type.
386 *
387 * @ingroup Elm_Genlist_Item
388 */
389EOAPI void elm_obj_genlist_item_bring_in(Eo *obj, Elm_Genlist_Item_Scrollto_Type type);
390
391/**
392 * @brief Unset all contents fetched by the item class.
393 *
394 * This instructs genlist to release references to contents in the item,
395 * meaning that they will no longer be managed by genlist and are floating
396 * "orphans" that can be re-used elsewhere if the user wants to.
397 *
398 * @param[in] obj The object.
399 * @param[out] l The contents list to return.
400 *
401 * @ingroup Elm_Genlist_Item
402 */
403EOAPI void elm_obj_genlist_item_all_contents_unset(Eo *obj, Eina_List **l);
404
405/**
406 * @brief Update all the contents of an item.
407 *
408 * This updates an item by calling all the item class functions again to get
409 * the contents, texts and states. Use this when the original item data has
410 * changed and the changes are desired to be reflected.
411 *
412 * Use elm_genlist_realized_items_update() to update all already realized
413 * items.
414 *
415 * @note This also updates internal genlist item object (edje_object as of
416 * now). So when this is called between mouse down and mouse up, mouse up event
417 * will be ignored because edje_object is deleted and created again by this
418 * API. If you want to avoid this, please use @ref
419 * elm_genlist_item_fields_update.
420 * @param[in] obj The object.
421 *
422 * @ingroup Elm_Genlist_Item
423 */
424EOAPI void elm_obj_genlist_item_update(Eo *obj);
425
426/**
427 * @brief Update the part of an item.
428 *
429 * This updates an item's part by calling item's fetching functions again to
430 * get the contents, texts and states. Use this when the original item data has
431 * changed and the changes are desired to be reflected. Second part argument is
432 * used for globbing to match '*', '?', and '.' It can be used at updating
433 * multi fields.
434 *
435 * Use @ref elm_genlist_realized_items_update to update an item's all property.
436 *
437 * @param[in] obj The object.
438 * @param[in] parts The name of item's part.
439 * @param[in] itf The type of item's part type.
440 *
441 * @ingroup Elm_Genlist_Item
442 */
443EOAPI void elm_obj_genlist_item_fields_update(Eo *obj, const char *parts, Elm_Genlist_Item_Field_Type itf);
444
445/**
446 * @brief Update the item class of an item.
447 *
448 * This sets another class of the item, changing the way that it is displayed.
449 * After changing the item class @ref elm_obj_genlist_item_update is called on
450 * the item @c it.
451 *
452 * @param[in] obj The object.
453 * @param[in] itc The item class for the item.
454 *
455 * @ingroup Elm_Genlist_Item
456 */
457EOAPI void elm_obj_genlist_item_class_update(Eo *obj, const Elm_Genlist_Item_Class *itc);
458
459/**
460 * @brief Activate a genlist mode on an item.
461 *
462 * A genlist mode is a different way of selecting an item. Once a mode is
463 * activated on an item, any other selected item is immediately unselected.
464 * This feature provides an easy way of implementing a new kind of animation
465 * for selecting an item, without having to entirely rewrite the item style
466 * theme. However, the elm_genlist_selected_* API can't be used to get what
467 * item is activate for a mode.
468 *
469 * The current item style will still be used, but applying a genlist mode to an
470 * item will select it using a different kind of animation.
471 *
472 * The current active item for a mode can be found by @ref
473 * elm_genlist_decorated_item_get.
474 *
475 * Only one mode can be active at any time, and for only one item. Genlist
476 * handles deactivating other items when one item is activated. A mode is
477 * defined in the genlist theme (edc), and more modes can easily be added. A
478 * mode style and the genlist item style are different things. They can be
479 * combined to provide a default style to the item, with some kind of animation
480 * for that item when the mode is activated.
481 *
482 * When a mode is activated on an item, a new view for that item is created.
483 * The theme of this mode defines the animation that will be used to transit
484 * the item from the old view to the new view. This second (new) view will be
485 * active for that item while the mode is active on the item, and will be
486 * destroyed after the mode is totally deactivated from that item.
487 *
488 * @param[in] obj The object.
489 * @param[in] decorate_it_type Mode name.
490 * @param[in] decorate_it_set Boolean to define set or unset mode.
491 *
492 * @ingroup Elm_Genlist_Item
493 */
494EOAPI void elm_obj_genlist_item_decorate_mode_set(Eo *obj, const char *decorate_it_type, Eina_Bool decorate_it_set);
495
496#endif