summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elm_gengrid_eo.legacy.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/elementary/elm_gengrid_eo.legacy.h')
-rw-r--r--src/lib/elementary/elm_gengrid_eo.legacy.h627
1 files changed, 627 insertions, 0 deletions
diff --git a/src/lib/elementary/elm_gengrid_eo.legacy.h b/src/lib/elementary/elm_gengrid_eo.legacy.h
new file mode 100644
index 0000000..b454ac0
--- /dev/null
+++ b/src/lib/elementary/elm_gengrid_eo.legacy.h
@@ -0,0 +1,627 @@
1#ifndef _ELM_GENGRID_EO_LEGACY_H_
2#define _ELM_GENGRID_EO_LEGACY_H_
3
4#ifndef _ELM_GENGRID_EO_CLASS_TYPE
5#define _ELM_GENGRID_EO_CLASS_TYPE
6
7typedef Eo Elm_Gengrid;
8
9#endif
10
11#ifndef _ELM_GENGRID_EO_TYPES
12#define _ELM_GENGRID_EO_TYPES
13
14/** Gengrid reorder modes
15 *
16 * @ingroup Elm_Gengrid
17 */
18typedef enum
19{
20 ELM_GENGRID_REORDER_TYPE_NORMAL = 0, /**< Normal reorder type */
21 ELM_GENGRID_REORDER_TYPE_SWAP /**< Swap reorder type */
22} Elm_Gengrid_Reorder_Type;
23
24
25#endif
26
27/**
28 * @brief Set the items grid's alignment within a given gengrid widget.
29 *
30 * This sets the alignment of the whole grid of items of a gengrid within its
31 * given viewport. By default, those values are both 0.5, meaning that the
32 * gengrid will have its items grid placed exactly in the middle of its
33 * viewport.
34 *
35 * @note If given alignment values are out of the cited ranges, they'll be
36 * changed to the nearest boundary values on the valid ranges.
37 *
38 * @param[in] obj The object.
39 * @param[in] align_x Alignment in the horizontal axis (0 <= align_x <= 1).
40 * @param[in] align_y Alignment in the vertical axis (0 <= align_y <= 1).
41 *
42 * @ingroup Elm_Gengrid_Group
43 */
44EAPI void elm_gengrid_align_set(Elm_Gengrid *obj, double align_x, double align_y);
45
46/**
47 * @brief Get the items grid's alignment values within a given gengrid widget.
48 *
49 * @note Use @c null pointers on the alignment values you're not interested in:
50 * they'll be ignored by the function.
51 *
52 * @param[in] obj The object.
53 * @param[out] align_x Alignment in the horizontal axis (0 <= align_x <= 1).
54 * @param[out] align_y Alignment in the vertical axis (0 <= align_y <= 1).
55 *
56 * @ingroup Elm_Gengrid_Group
57 */
58EAPI void elm_gengrid_align_get(const Elm_Gengrid *obj, double *align_x, double *align_y);
59
60/**
61 * @brief Set how the items grid's filled within a given gengrid widget
62 *
63 * This sets the fill state of the whole grid of items of a gengrid within its
64 * given viewport. By default, this value is false, meaning that if the first
65 * line of items grid's isn't filled, the items are centered with the
66 * alignment.
67 *
68 * @param[in] obj The object.
69 * @param[in] fill @c true if the grid is filled, @c false otherwise
70 *
71 * @ingroup Elm_Gengrid_Group
72 */
73EAPI void elm_gengrid_filled_set(Elm_Gengrid *obj, Eina_Bool fill);
74
75/**
76 * @brief Get how the items grid's filled within a given gengrid widget
77 *
78 * @note Use @c null pointers on the alignment values you're not interested in:
79 * they'll be ignored by the function.
80 *
81 * @param[in] obj The object.
82 *
83 * @return @c true if the grid is filled, @c false otherwise
84 *
85 * @ingroup Elm_Gengrid_Group
86 */
87EAPI Eina_Bool elm_gengrid_filled_get(const Elm_Gengrid *obj);
88
89/**
90 * @brief Enable or disable multi-selection in a given gengrid widget.
91 *
92 * Multi-selection is the ability to have more than one item selected, on a
93 * given gengrid, simultaneously. When it is enabled, a sequence of clicks on
94 * different items will make them all selected, progressively. A click on an
95 * already selected item will unselect it. If interacting via the keyboard,
96 * multi-selection is enabled while holding the "Shift" key.
97 *
98 * @note By default, multi-selection is disabled on gengrids.
99 *
100 * @param[in] obj The object.
101 * @param[in] multi @c true if multislect is enabled, @c false otherwise
102 *
103 * @ingroup Elm_Gengrid_Group
104 */
105EAPI void elm_gengrid_multi_select_set(Elm_Gengrid *obj, Eina_Bool multi);
106
107/**
108 * @brief Get whether multi-selection is enabled or disabled for a given
109 * gengrid widget.
110 *
111 * @param[in] obj The object.
112 *
113 * @return @c true if multislect is enabled, @c false otherwise
114 *
115 * @ingroup Elm_Gengrid_Group
116 */
117EAPI Eina_Bool elm_gengrid_multi_select_get(const Elm_Gengrid *obj);
118
119/**
120 * @brief Set the size for the group items of a given gengrid widget.
121 *
122 * A gengrid, after creation, has still no information on the size to give to
123 * each of its cells. So, you most probably will end up with squares one @ref
124 * Fingers "finger" wide, the default size. Use this function to force a custom
125 * size for you group items, making them as big as you wish.
126 *
127 * @param[in] obj The object.
128 * @param[in] w The group items' width.
129 * @param[in] h The group items' height.
130 *
131 * @ingroup Elm_Gengrid_Group
132 */
133EAPI void elm_gengrid_group_item_size_set(Elm_Gengrid *obj, int w, int h);
134
135/**
136 * @brief Get the size set for the group items of a given gengrid widget.
137 *
138 * @note Use @c null pointers on the size values you're not interested in:
139 * they'll be ignored by the function.
140 *
141 * @param[in] obj The object.
142 * @param[out] w The group items' width.
143 * @param[out] h The group items' height.
144 *
145 * @ingroup Elm_Gengrid_Group
146 */
147EAPI void elm_gengrid_group_item_size_get(const Elm_Gengrid *obj, int *w, int *h);
148
149/**
150 * @brief Set the gengrid select mode.
151 *
152 * This changes item select mode in the gengrid widget.
153 * #ELM_OBJECT_SELECT_MODE_DEFAULT means that items will only call their
154 * selection func and callback when first becoming selected. Any further clicks
155 * will do nothing, unless you set always select mode.
156 * #ELM_OBJECT_SELECT_MODE_ALWAYS means that even if selected, every click will
157 * make the selected callbacks be called. #ELM_OBJECT_SELECT_MODE_NONE will
158 * turn off the ability to select items entirely and they will neither appear
159 * selected nor call selected callback functions.
160 *
161 * @param[in] obj The object.
162 * @param[in] mode The select mode.
163 *
164 * @ingroup Elm_Gengrid_Group
165 */
166EAPI void elm_gengrid_select_mode_set(Elm_Gengrid *obj, Elm_Object_Select_Mode mode);
167
168/**
169 * @brief Get the gengrid select mode.
170 *
171 * @param[in] obj The object.
172 *
173 * @return The select mode.
174 *
175 * @ingroup Elm_Gengrid_Group
176 */
177EAPI Elm_Object_Select_Mode elm_gengrid_select_mode_get(const Elm_Gengrid *obj);
178
179/**
180 * @brief Set whether a given gengrid widget is or not able have items
181 * reordered.
182 *
183 * If a gengrid is set to allow reordering, a click held for more than 0.5 over
184 * a given item will highlight it specially, signaling the gengrid has entered
185 * the reordering state. From that time on, the user will be able to, while
186 * still holding the mouse button down, move the item freely in the gengrid's
187 * viewport, replacing to said item to the locations it goes to. The
188 * replacements will be animated and, whenever the user releases the mouse
189 * button, the item being replaced gets a new definitive place in the grid.
190 *
191 * @param[in] obj The object.
192 * @param[in] reorder_mode Use @c true to turn reordering on, @c false to turn
193 * it off.
194 *
195 * @ingroup Elm_Gengrid_Group
196 */
197EAPI void elm_gengrid_reorder_mode_set(Elm_Gengrid *obj, Eina_Bool reorder_mode);
198
199/**
200 * @brief Get whether a given gengrid widget is or not able have items
201 * reordered.
202 *
203 * @param[in] obj The object.
204 *
205 * @return Use @c true to turn reordering on, @c false to turn it off.
206 *
207 * @ingroup Elm_Gengrid_Group
208 */
209EAPI Eina_Bool elm_gengrid_reorder_mode_get(const Elm_Gengrid *obj);
210
211/**
212 * @brief Control whether the gengrid items' should be highlighted when item
213 * selected.
214 *
215 * @param[in] obj The object.
216 * @param[in] highlight @c true if item will be highlighted, @c false otherwise
217 *
218 * @ingroup Elm_Gengrid_Group
219 */
220EAPI void elm_gengrid_highlight_mode_set(Elm_Gengrid *obj, Eina_Bool highlight);
221
222/**
223 * @brief Control whether the gengrid items' should be highlighted when item
224 * selected.
225 *
226 * @param[in] obj The object.
227 *
228 * @return @c true if item will be highlighted, @c false otherwise
229 *
230 * @ingroup Elm_Gengrid_Group
231 */
232EAPI Eina_Bool elm_gengrid_highlight_mode_get(const Elm_Gengrid *obj);
233
234/**
235 * @brief Set the Gengrid reorder type
236 *
237 * @param[in] obj The object.
238 * @param[in] type Reorder type value
239 *
240 * @since 1.11
241 *
242 * @ingroup Elm_Gengrid_Group
243 */
244EAPI void elm_gengrid_reorder_type_set(Elm_Gengrid *obj, Elm_Gengrid_Reorder_Type type);
245
246/**
247 * @brief Set the size for the items of a given gengrid widget.
248 *
249 * A gengrid, after creation, has still no information on the size to give to
250 * each of its cells. So, you most probably will end up with squares one @ref
251 * Fingers "finger" wide, the default size. Use this function to force a custom
252 * size for you items, making them as big as you wish.
253 *
254 * @param[in] obj The object.
255 * @param[in] w The items' width.
256 * @param[in] h The items' height.
257 *
258 * @ingroup Elm_Gengrid_Group
259 */
260EAPI void elm_gengrid_item_size_set(Elm_Gengrid *obj, int w, int h);
261
262/**
263 * @brief Get the size set for the items of a given gengrid widget.
264 *
265 * @note Use @c null pointers on the size values you're not interested in:
266 * they'll be ignored by the function.
267 *
268 * @param[in] obj The object.
269 * @param[out] w The items' width.
270 * @param[out] h The items' height.
271 *
272 * @ingroup Elm_Gengrid_Group
273 */
274EAPI void elm_gengrid_item_size_get(const Elm_Gengrid *obj, int *w, int *h);
275
276/**
277 * @brief Set the gengrid multi select mode.
278 *
279 * #ELM_OBJECT_MULTI_SELECT_MODE_DEFAULT means that select/unselect items
280 * whenever each item is clicked. #ELM_OBJECT_MULTI_SELECT_MODE_WITH_CONTROL
281 * means that only one item will be selected although multi-selection is
282 * enabled, if clicked without pressing control key. This mode is only
283 * available with multi-selection.
284 *
285 * @param[in] obj The object.
286 * @param[in] mode The multi select mode.
287 *
288 * @since 1.8
289 *
290 * @ingroup Elm_Gengrid_Group
291 */
292EAPI void elm_gengrid_multi_select_mode_set(Elm_Gengrid *obj, Elm_Object_Multi_Select_Mode mode);
293
294/**
295 * @brief Get the gengrid multi select mode.
296 *
297 * If getting mode fails, it returns #ELM_OBJECT_MULTI_SELECT_MODE_MAX.
298 *
299 * @param[in] obj The object.
300 *
301 * @return The multi select mode.
302 *
303 * @since 1.8
304 *
305 * @ingroup Elm_Gengrid_Group
306 */
307EAPI Elm_Object_Multi_Select_Mode elm_gengrid_multi_select_mode_get(const Elm_Gengrid *obj);
308
309/**
310 * @brief Set the direction in which a given gengrid widget will expand while
311 * placing its items.
312 *
313 * When in "horizontal mode" ($true), items will be placed in columns, from top
314 * to bottom and, when the space for a column is filled, another one is started
315 * on the right, thus expanding the grid horizontally. When in "vertical mode"
316 * ($false), though, items will be placed in rows, from left to right and, when
317 * the space for a row is filled, another one is started below, thus expanding
318 * the grid vertically.
319 *
320 * @note By default, gengrid is in vertical mode, @c false.
321 *
322 * @param[in] obj The object.
323 * @param[in] horizontal @c true to make the gengrid expand horizontally,
324 * @c false to expand vertically.
325 *
326 * @ingroup Elm_Gengrid_Group
327 */
328EAPI void elm_gengrid_horizontal_set(Elm_Gengrid *obj, Eina_Bool horizontal);
329
330/**
331 * @brief Get for what direction a given gengrid widget will expand while
332 * placing its items.
333 *
334 * @param[in] obj The object.
335 *
336 * @return @c true to make the gengrid expand horizontally, @c false to expand
337 * vertically.
338 *
339 * @ingroup Elm_Gengrid_Group
340 */
341EAPI Eina_Bool elm_gengrid_horizontal_get(const Elm_Gengrid *obj);
342
343/**
344 * @brief Get the selected item in a given gengrid widget.
345 *
346 * This returns the selected item in @c obj. If multi selection is enabled on
347 * @c obj (See @ref elm_gengrid_multi_select_set), only the first item in the
348 * list is selected, which might not be very useful. For that case, see
349 * @ref elm_gengrid_selected_items_get.
350 *
351 * @param[in] obj The object.
352 *
353 * @return The selected item's handle or @c null if none is selected at the
354 * moment (and on errors).
355 *
356 * @ingroup Elm_Gengrid_Group
357 */
358EAPI Elm_Widget_Item *elm_gengrid_selected_item_get(const Elm_Gengrid *obj);
359
360/**
361 * @brief Get a list of realized items in gengrid.
362 *
363 * This returns a list of the realized items in the gengrid. The list contains
364 * gengrid item pointers. The list must be freed by the caller when done with
365 * eina_list_free(). The item pointers in the list are only valid so long as
366 * those items are not deleted or the gengrid is not deleted.
367 *
368 * @param[in] obj The object.
369 *
370 * @return The list of realized items or @c null if none are realized.
371 *
372 * @ingroup Elm_Gengrid_Group
373 */
374EAPI Eina_List *elm_gengrid_realized_items_get(const Elm_Gengrid *obj) EINA_WARN_UNUSED_RESULT;
375
376/**
377 * @brief Get the first item in a given gengrid widget.
378 *
379 * This returns the first item in the @c obj's internal list of items.
380 *
381 * @param[in] obj The object.
382 *
383 * @return The first item's handle or @c null, if there are no items in @c obj
384 * (and on errors)
385 *
386 * @ingroup Elm_Gengrid_Group
387 */
388EAPI Elm_Widget_Item *elm_gengrid_first_item_get(const Elm_Gengrid *obj);
389
390/**
391 * @brief Get a list of selected items in a given gengrid.
392 *
393 * This returns a list of the selected items, in the order that they appear in
394 * the grid. This list is only valid as long as no more items are selected or
395 * unselected (or unselected implicitly by deletion). The list contains Gengrid
396 * item pointers as data, naturally.
397 *
398 * @param[in] obj The object.
399 *
400 * @return The list of selected items or @c null, if none is selected at the
401 * moment (and on errors).
402 *
403 * @ingroup Elm_Gengrid_Group
404 */
405EAPI const Eina_List *elm_gengrid_selected_items_get(const Elm_Gengrid *obj);
406
407/**
408 * @brief Get the last item in a given gengrid widget.
409 *
410 * This returns the last item in the @c obj's internal list of items.
411 *
412 * @param[in] obj The object.
413 *
414 * @return The last item's handle or @c null if there are no items in @c obj
415 * (and on errors).
416 *
417 * @ingroup Elm_Gengrid_Group
418 */
419EAPI Elm_Widget_Item *elm_gengrid_last_item_get(const Elm_Gengrid *obj);
420
421/**
422 * @brief Insert an item before another in a gengrid widget.
423 *
424 * This inserts an item before another in the gengrid.
425 *
426 * @param[in] obj The object.
427 * @param[in] itc The item class for the item.
428 * @param[in] data The item data.
429 * @param[in] relative The item to place this new one before.
430 * @param[in] func Convenience function called when the item is selected.
431 * @param[in] func_data Data to be passed to @c func.
432 *
433 * @return A handle to the item added or @c null on errors.
434 *
435 * @ingroup Elm_Gengrid_Group
436 */
437EAPI Elm_Widget_Item *elm_gengrid_item_insert_before(Elm_Gengrid *obj, const Elm_Gengrid_Item_Class *itc, const void *data, Elm_Widget_Item *relative, Evas_Smart_Cb func, const void *func_data);
438
439/**
440 * @brief Update the contents of all realized items.
441 *
442 * This updates all realized items by calling all the item class functions
443 * again to get the contents, texts and states. Use this when the original item
444 * data has changed and the changes are desired to be reflected.
445 *
446 * To update just one item, use @ref elm_gengrid_item_update.
447 * @param[in] obj The object.
448 *
449 * @ingroup Elm_Gengrid_Group
450 */
451EAPI void elm_gengrid_realized_items_update(Elm_Gengrid *obj);
452
453/**
454 * @brief Insert an item after another in a gengrid widget.
455 *
456 * This inserts an item after another in the gengrid.
457 *
458 * @param[in] obj The object.
459 * @param[in] itc The item class for the item.
460 * @param[in] data The item data.
461 * @param[in] relative The item to place this new one after.
462 * @param[in] func Convenience function called when the item is selected.
463 * @param[in] func_data Data to be passed to @c func.
464 *
465 * @return A handle to the item added or @c null on error.
466 *
467 * @ingroup Elm_Gengrid_Group
468 */
469EAPI Elm_Widget_Item *elm_gengrid_item_insert_after(Elm_Gengrid *obj, const Elm_Gengrid_Item_Class *itc, const void *data, Elm_Widget_Item *relative, Evas_Smart_Cb func, const void *func_data);
470
471/**
472 * @brief Return how many items are currently in a list
473 *
474 * This behavior is O(1) and includes items which may or may not be realized.
475 *
476 * @param[in] obj The object.
477 *
478 * @return Items in list
479 *
480 * @ingroup Elm_Gengrid_Group
481 */
482EAPI unsigned int elm_gengrid_items_count(const Elm_Gengrid *obj);
483
484/**
485 * @brief Get the item that is at the x, y canvas coords.
486 *
487 * This returns the item at the given coordinates (which are canvas relative,
488 * not object-relative). If an item is at that coordinate, that item handle is
489 * returned, and if @c xposret is not @c null, the integer pointed to is set to
490 * a value of -1, 0 or 1, depending if the coordinate is on the left portion of
491 * that item (-1), on the middle section (0) or on the right part (1).
492 *
493 * If @c yposret is not @c null, the integer pointed to is set to a value of
494 * -1, 0 or 1, depending if the coordinate is on the upper portion of that item
495 * (-1), on the middle section (0) or on the lower part (1). If NULL is
496 * returned as an item (no item found there), then posret may indicate -1 or 1
497 * based if the coordinate is above or below all items respectively in the
498 * gengrid.
499 *
500 * @param[in] obj The object.
501 * @param[in] x The input x coordinate.
502 * @param[in] y The input y coordinate.
503 * @param[out] xposret The position relative to the item returned here.
504 * @param[out] yposret The position relative to the item returned here.
505 *
506 * @return The item at the coordinates or @c null if none.
507 *
508 * @ingroup Elm_Gengrid_Group
509 */
510EAPI Elm_Widget_Item *elm_gengrid_at_xy_item_get(const Elm_Gengrid *obj, int x, int y, int *xposret, int *yposret);
511
512/**
513 * @brief Append a new item in a given gengrid widget.
514 *
515 * This adds an item to the beginning of the gengrid.
516 *
517 * @param[in] obj The object.
518 * @param[in] itc The item class for the item.
519 * @param[in] data The item data.
520 * @param[in] func Convenience function called when the item is selected.
521 * @param[in] func_data Data to be passed to @c func.
522 *
523 * @return A handle to the item added or @c null on errors.
524 *
525 * @ingroup Elm_Gengrid_Group
526 */
527EAPI Elm_Widget_Item *elm_gengrid_item_append(Elm_Gengrid *obj, const Elm_Gengrid_Item_Class *itc, const void *data, Evas_Smart_Cb func, const void *func_data);
528
529/**
530 * @brief Prepend a new item in a given gengrid widget.
531 *
532 * This adds an item to the end of the gengrid.
533 *
534 * @param[in] obj The object.
535 * @param[in] itc The item class for the item.
536 * @param[in] data The item data.
537 * @param[in] func Convenience function called when the item is selected.
538 * @param[in] func_data Data to be passed to @c func.
539 *
540 * @return A handle to the item added or @c null on errors.
541 *
542 * @ingroup Elm_Gengrid_Group
543 */
544EAPI Elm_Widget_Item *elm_gengrid_item_prepend(Elm_Gengrid *obj, const Elm_Gengrid_Item_Class *itc, const void *data, Evas_Smart_Cb func, const void *func_data);
545
546/**
547 * @brief Remove all items from a given gengrid widget.
548 *
549 * This removes (and deletes) all items in @c obj, leaving it empty.
550 *
551 * See @ref elm_gengrid_item_del to remove just one item.
552 * @param[in] obj The object.
553 *
554 * @ingroup Elm_Gengrid_Group
555 */
556EAPI void elm_gengrid_clear(Elm_Gengrid *obj);
557
558/**
559 * @brief Insert an item in a gengrid widget using a user-defined sort
560 * function.
561 *
562 * This inserts an item in the gengrid based on user defined comparison
563 * function. The two arguments passed to the function @c func are gengrid item
564 * handles to compare.
565 *
566 * @param[in] obj The object.
567 * @param[in] itc The item class for the item.
568 * @param[in] data The item data.
569 * @param[in] comp User defined comparison function that defines the sort order
570 * based on gengrid item and its data.
571 * @param[in] func Convenience function called when the item is selected.
572 * @param[in] func_data Data to be passed to @c func.
573 *
574 * @return A handle to the item added or @c null on errors.
575 *
576 * @ingroup Elm_Gengrid_Group
577 */
578EAPI Elm_Widget_Item *elm_gengrid_item_sorted_insert(Elm_Gengrid *obj, const Elm_Gengrid_Item_Class *itc, const void *data, Eina_Compare_Cb comp, Evas_Smart_Cb func, const void *func_data);
579
580/**
581 * @brief Get gengrid item by given string.
582 *
583 * It takes pointer to the gengrid item that will be used to start search from
584 * it.
585 *
586 * This function uses globs (like "*.jpg") for searching and takes search flags
587 * as last parameter That is a bitfield with values to be ored together or 0
588 * for no flags.
589 *
590 * @param[in] obj The object.
591 * @param[in] item_to_search_from Pointer to item to start search from. If
592 * @c null, search will be started from the first item of the gengrid.
593 * @param[in] part_name Name of the TEXT part of gengrid item to search string
594 * in. If @c null, search by "elm.text" parts.
595 * @param[in] pattern The search pattern.
596 * @param[in] flags Search flags.
597 *
598 * @return Pointer to the gengrid item which matches search_string in case of
599 * success, otherwise @c null.
600 *
601 * @since 1.11
602 *
603 * @ingroup Elm_Gengrid_Group
604 */
605EAPI Elm_Widget_Item *elm_gengrid_search_by_text_item_get(Elm_Gengrid *obj, Elm_Widget_Item *item_to_search_from, const char *part_name, const char *pattern, Elm_Glob_Match_Flags flags);
606
607/**
608 * @brief Starts the reorder mode of Gengrid
609 *
610 * @param[in] obj The object.
611 * @param[in] tween_mode Position mappings for animation
612 *
613 * @since 1.10
614 *
615 * @ingroup Elm_Gengrid_Group
616 */
617EAPI void elm_gengrid_reorder_mode_start(Elm_Gengrid *obj, Ecore_Pos_Map tween_mode);
618
619/** Stops the reorder mode of Gengrid
620 *
621 * @since 1.10
622 *
623 * @ingroup Elm_Gengrid_Group
624 */
625EAPI void elm_gengrid_reorder_mode_stop(Elm_Gengrid *obj);
626
627#endif