2 * @defgroup Gengrid Gengrid (Generic grid)
5 * @image html gengrid_inheritance_tree.png
6 * @image latex gengrid_inheritance_tree.eps
8 * This widget aims to position objects in a grid layout while
9 * actually creating and rendering only the visible ones, using the
10 * same idea as the @ref Genlist "genlist": the user defines a @b
11 * class for each item, specifying functions that will be called at
12 * object creation, deletion, etc. When those items are selected by
13 * the user, a callback function is issued. Users may interact with
14 * a gengrid via the mouse (by clicking on items to select them and
15 * clicking on the grid's viewport and swiping to pan the whole
16 * view) or via the keyboard, navigating through item with the
19 * This widget inherits from the @ref Layout one, so that all the
20 * functions acting on it also work for gengrid objects.
22 * This widget implements the @b @ref elm-scrollable-interface
23 * interface, so that all (non-deprecated) functions for the base @ref
24 * Scroller widget also work for gengrids.
26 * Some calls on the gengrid's API are marked as @b deprecated, as
27 * they just wrap the scrollable widgets counterpart functions. Use
28 * the ones we point you to, for each case of deprecation here,
29 * instead -- eventually the deprecated ones will be discarded (next
32 * @section Gengrid_Layouts Gengrid layouts
34 * Gengrid may layout its items in one of two possible layouts:
38 * When in "horizontal mode", items will be placed in @b columns,
39 * from top to bottom and, when the space for a column is filled,
40 * another one is started on the right, thus expanding the grid
41 * horizontally, making for horizontal scrolling. When in "vertical
42 * mode" , though, items will be placed in @b rows, from left to
43 * right and, when the space for a row is filled, another one is
44 * started below, thus expanding the grid vertically (and making
45 * for vertical scrolling).
47 * @section Gengrid_Items Gengrid items
49 * An item in a gengrid can have 0 or more texts (they can be
50 * regular text or textblock Evas objects - that's up to the style
51 * to determine), 0 or more contents (which are simply objects
52 * swallowed into the gengrid item's theming Edje object) and 0 or
53 * more <b>boolean states</b>, which have the behavior left to the
54 * user to define. The Edje part names for each of these properties
55 * will be looked up, in the theme file for the gengrid, under the
56 * Edje (string) data items named @c "texts", @c "contents" and @c
57 * "states", respectively. For each of those properties, if more
58 * than one part is provided, they must have names listed separated
59 * by spaces in the data fields. For the default gengrid item
60 * theme, we have @b one text part (@c "elm.text"), @b two content
61 * parts (@c "elm.swalllow.icon" and @c "elm.swallow.end") and @b
64 * A gengrid item may be at one of several styles. Elementary
65 * provides one by default - "default", but this can be extended by
66 * system or application custom themes/overlays/extensions (see
67 * @ref Theme "themes" for more details).
69 * @section Gengrid_Item_Class Gengrid item classes
71 * In order to have the ability to add and delete items on the fly,
72 * gengrid implements a class (callback) system where the
73 * application provides a structure with information about that
74 * type of item (gengrid may contain multiple different items with
75 * different classes, states and styles). Gengrid will call the
76 * functions in this struct (methods) when an item is "realized"
77 * (i.e., created dynamically, while the user is scrolling the
78 * grid). All objects will simply be deleted when no longer needed
79 * with evas_object_del(). The #Elm_Gengrid_Item_Class structure
80 * contains the following members:
81 * - @c item_style - This is a constant string and simply defines
82 * the name of the item style. It @b must be specified and the
83 * default should be @c "default".
84 * - @c func.text_get - This function is called when an item
85 * object is actually created. The @c data parameter will point to
86 * the same data passed to elm_gengrid_item_append() and related
87 * item creation functions. The @c obj parameter is the gengrid
88 * object itself, while the @c part one is the name string of one
89 * of the existing text parts in the Edje group implementing the
90 * item's theme. This function @b must return a strdup'()ed string,
91 * as the caller will free() it when done.
92 * See #Elm_Gengrid_Item_Text_Get_Cb.
93 * - @c func.content_get - This function is called when an item object
94 * is actually created. The @c data parameter will point to the
95 * same data passed to elm_gengrid_item_append() and related item
96 * creation functions. The @c obj parameter is the gengrid object
97 * itself, while the @c part one is the name string of one of the
98 * existing (content) swallow parts in the Edje group implementing the
99 * item's theme. It must return @c NULL, when no content is desired,
100 * or a valid object handle, otherwise. The object will be deleted
101 * by the gengrid on its deletion or when the item is "unrealized".
102 * See #Elm_Gengrid_Item_Content_Get_Cb.
103 * - @c func.state_get - This function is called when an item
104 * object is actually created. The @c data parameter will point to
105 * the same data passed to elm_gengrid_item_append() and related
106 * item creation functions. The @c obj parameter is the gengrid
107 * object itself, while the @c part one is the name string of one
108 * of the state parts in the Edje group implementing the item's
109 * theme. Return @c EINA_FALSE for false/off or @c EINA_TRUE for
110 * true/on. Gengrids will emit a signal to its theming Edje object
111 * with @c "elm,state,xxx,active" and @c "elm" as "emission" and
112 * "source" arguments, respectively, when the state is true (the
113 * default is false), where @c xxx is the name of the (state) part.
114 * See #Elm_Gengrid_Item_State_Get_Cb.
115 * - @c func.del - This is called when elm_object_item_del() is
116 * called on an item or elm_gengrid_clear() is called on the
117 * gengrid. This is intended for use when gengrid items are
118 * deleted, so any data attached to the item (e.g. its data
119 * parameter on creation) can be deleted. See #Elm_Gengrid_Item_Del_Cb.
121 * @section Gengrid_Usage_Hints Usage hints
123 * If the user wants to have multiple items selected at the same
124 * time, elm_gengrid_multi_select_set() will permit it. If the
125 * gengrid is single-selection only (the default), then
126 * elm_gengrid_select_item_get() will return the selected item or
127 * @c NULL, if none is selected. If the gengrid is under
128 * multi-selection, then elm_gengrid_selected_items_get() will
129 * return a list (that is only valid as long as no items are
130 * modified (added, deleted, selected or unselected) of child items
133 * If an item changes (internal (boolean) state, text or content
134 * changes), then use elm_gengrid_item_update() to have gengrid
135 * update the item with the new state. A gengrid will re-"realize"
136 * the item, thus calling the functions in the #Elm_Gengrid_Item_Class
139 * To programmatically (un)select an item, use
140 * elm_gengrid_item_selected_set(). To get its selected state use
141 * elm_gengrid_item_selected_get(). To make an item disabled
142 * (unable to be selected and appear differently) use
143 * elm_object_item_disabled_set() to set this and
144 * elm_object_item_disabled_get() to get the disabled state.
146 * Grid cells will only have their selection smart callbacks called
147 * when firstly getting selected. Any further clicks will do
148 * nothing, unless you enable the "always select mode", with
149 * elm_gengrid_select_mode_set() as ELM_OBJECT_SELECT_MODE_ALWAYS,
150 * thus making every click to issue selection callbacks.
151 * elm_gengrid_select_mode_set() as ELM_OBJECT_SELECT_MODE_NONE will
152 * turn off the ability to select items entirely in the widget and
153 * they will neither appear selected nor call the selection smart
156 * Remember that you can create new styles and add your own theme
157 * augmentation per application with elm_theme_extension_add(). If
158 * you absolutely must have a specific style that overrides any
159 * theme the user or system sets up you can use
160 * elm_theme_overlay_add() to add such a file.
162 * @section Gengrid_Smart_Events Gengrid smart events
164 * This widget emits the following signals, besides the ones sent from
166 * - @c "activated" - The user has double-clicked or pressed
167 * (enter|return|spacebar) on an item. The @c event_info parameter
168 * is the gengrid item that was activated.
169 * - @c "clicked,double" - The user has double-clicked an item.
170 * The @c event_info parameter is the gengrid item that was double-clicked.
171 * - @c "longpressed" - This is called when the item is pressed for a certain
172 * amount of time. By default it's 1 second.
173 * - @c "selected" - The user has made an item selected. The
174 * @c event_info parameter is the gengrid item that was selected.
175 * - @c "unselected" - The user has made an item unselected. The
176 * @c event_info parameter is the gengrid item that was unselected.
177 * - @c "realized" - This is called when the item in the gengrid
178 * has its implementing Evas object instantiated, de facto. @c
179 * event_info is the gengrid item that was created. The object
180 * may be deleted at any time, so it is highly advised to the
181 * caller @b not to use the object pointer returned from
182 * elm_gengrid_item_object_get(), because it may point to freed
184 * - @c "unrealized" - This is called when the implementing Evas
185 * object for this item is deleted. @c event_info is the gengrid
186 * item that was deleted.
187 * - @c "changed" - Called when an item is added, removed, resized
188 * or moved and when the gengrid is resized or gets "horizontal"
190 * - @c "scroll,anim,start" - This is called when scrolling animation has
192 * - @c "scroll,anim,stop" - This is called when scrolling animation has
194 * - @c "drag,start,up" - Called when the item in the gengrid has
195 * been dragged (not scrolled) up.
196 * - @c "drag,start,down" - Called when the item in the gengrid has
197 * been dragged (not scrolled) down.
198 * - @c "drag,start,left" - Called when the item in the gengrid has
199 * been dragged (not scrolled) left.
200 * - @c "drag,start,right" - Called when the item in the gengrid has
201 * been dragged (not scrolled) right.
202 * - @c "drag,stop" - Called when the item in the gengrid has
203 * stopped being dragged.
204 * - @c "drag" - Called when the item in the gengrid is being
206 * - @c "scroll" - called when the content has been scrolled
208 * - @c "scroll,drag,start" - called when dragging the content has
210 * - @c "scroll,drag,stop" - called when dragging the content has
212 * - @c "edge,top" - This is called when the gengrid is scrolled until
214 * - @c "edge,bottom" - This is called when the gengrid is scrolled
215 * until the bottom edge.
216 * - @c "edge,left" - This is called when the gengrid is scrolled
217 * until the left edge.
218 * - @c "edge,right" - This is called when the gengrid is scrolled
219 * until the right edge.
220 * - @c "highlighted" - an item in the list is pressed and highlighted.
221 * The %c event_info parameter is the item that was highlighted.
222 * - @c "unhighlighted" - an item in the list is unpressed and unhighlighted.
223 * The %c event_info parameter is the item that was unhighlighted.
224 * - @c "language,changed" - This is called when the program's language is
225 * changed. Call the elm_gengrid_realized_items_update() if items text should
228 * Supported elm_object common APIs
229 * @li elm_object_signal_emit()
231 * Supported elm_object_item common APIs
232 * @li elm_object_item_part_content_get()
233 * @li elm_object_item_part_content_set()
234 * @li elm_object_item_part_content_unset()
235 * @li elm_object_item_part_text_set()
236 * @li elm_object_item_part_text_get()
237 * @li elm_object_item_disabled_set()
238 * @li elm_object_item_disabled_get()
240 * List of gengrid examples:
241 * @li @ref gengrid_example
245 * @addtogroup Gengrid
249 #define ELM_GENGRID_ITEM_CLASS_VERSION ELM_GEN_ITEM_CLASS_VERSION
250 #define ELM_GENGRID_ITEM_CLASS_HEADER ELM_GEN_ITEM_CLASS_HEADER
253 * Defines where to position the item in the genlist.
259 ELM_GENGRID_ITEM_SCROLLTO_NONE = 0, /**< no scrollto */
260 ELM_GENGRID_ITEM_SCROLLTO_IN = (1 << 0), /**< to the nearest viewport */
261 ELM_GENGRID_ITEM_SCROLLTO_TOP = (1 << 1), /**< to the top of viewport */
262 ELM_GENGRID_ITEM_SCROLLTO_MIDDLE = (1 << 2) /**< to the middle of viewport */
263 } Elm_Gengrid_Item_Scrollto_Type;
267 * @see Elm_Gen_Item_Class
269 typedef Elm_Gen_Item_Class Elm_Gengrid_Item_Class;
272 * @see Elm_Gen_Item_Text_Get_Cb
274 typedef Elm_Gen_Item_Text_Get_Cb Elm_Gengrid_Item_Text_Get_Cb;
277 * @see Elm_Gen_Item_Content_Get_Cb
279 typedef Elm_Gen_Item_Content_Get_Cb Elm_Gengrid_Item_Content_Get_Cb;
282 * @see Elm_Gen_Item_State_Get_Cb
284 typedef Elm_Gen_Item_State_Get_Cb Elm_Gengrid_Item_State_Get_Cb;
287 * @see Elm_Gen_Item_Del_Cb
289 typedef Elm_Gen_Item_Del_Cb Elm_Gengrid_Item_Del_Cb;
292 * Add a new gengrid widget to the given parent Elementary
295 * @param parent The parent object
296 * @return a new gengrid widget handle or @c NULL, on errors
298 * This function inserts a new gengrid widget on the canvas.
300 * @see elm_gengrid_item_size_set()
301 * @see elm_gengrid_group_item_size_set()
302 * @see elm_gengrid_horizontal_set()
303 * @see elm_gengrid_item_append()
304 * @see elm_object_item_del()
305 * @see elm_gengrid_clear()
309 EAPI Evas_Object *elm_gengrid_add(Evas_Object *parent);
312 * Remove all items from a given gengrid widget
314 * @param obj The gengrid object.
316 * This removes (and deletes) all items in @p obj, leaving it
319 * @see elm_object_item_del(), to remove just one item.
323 EAPI void elm_gengrid_clear(Evas_Object *obj);
326 * Enable or disable multi-selection in a given gengrid widget
328 * @param obj The gengrid object.
329 * @param multi @c EINA_TRUE, to enable multi-selection,
330 * @c EINA_FALSE to disable it.
332 * Multi-selection is the ability to have @b more than one
333 * item selected, on a given gengrid, simultaneously. When it is
334 * enabled, a sequence of clicks on different items will make them
335 * all selected, progressively. A click on an already selected item
336 * will unselect it. If interacting via the keyboard,
337 * multi-selection is enabled while holding the "Shift" key.
339 * @note By default, multi-selection is @b disabled on gengrids
341 * @see elm_gengrid_multi_select_get()
345 EAPI void elm_gengrid_multi_select_set(Evas_Object *obj, Eina_Bool multi);
348 * Get whether multi-selection is enabled or disabled for a given
351 * @param obj The gengrid object.
352 * @return @c EINA_TRUE, if multi-selection is enabled, @c
353 * EINA_FALSE otherwise
355 * @see elm_gengrid_multi_select_set() for more details
359 EAPI Eina_Bool elm_gengrid_multi_select_get(const Evas_Object *obj);
362 * Set the direction in which a given gengrid widget will expand while
365 * @param obj The gengrid object.
366 * @param horizontal @c EINA_TRUE to make the gengrid expand
367 * horizontally, @c EINA_FALSE to expand vertically.
369 * When in "horizontal mode" (@c EINA_TRUE), items will be placed
370 * in @b columns, from top to bottom and, when the space for a
371 * column is filled, another one is started on the right, thus
372 * expanding the grid horizontally. When in "vertical mode"
373 * (@c EINA_FALSE), though, items will be placed in @b rows, from left
374 * to right and, when the space for a row is filled, another one is
375 * started below, thus expanding the grid vertically.
377 * @see elm_gengrid_horizontal_get()
381 EAPI void elm_gengrid_horizontal_set(Evas_Object *obj, Eina_Bool horizontal);
384 * Get for what direction a given gengrid widget will expand while
387 * @param obj The gengrid object.
388 * @return @c EINA_TRUE, if @p obj is set to expand horizontally,
389 * @c EINA_FALSE if it's set to expand vertically.
391 * @see elm_gengrid_horizontal_set() for more details
395 EAPI Eina_Bool elm_gengrid_horizontal_get(const Evas_Object *obj);
398 * Enable or disable bouncing effect for a given gengrid widget
400 * @param obj The gengrid object
401 * @param h_bounce @c EINA_TRUE, to enable @b horizontal bouncing,
402 * @c EINA_FALSE to disable it
403 * @param v_bounce @c EINA_TRUE, to enable @b vertical bouncing,
404 * @c EINA_FALSE to disable it
406 * The bouncing effect occurs whenever one reaches the gengrid's
407 * edge's while panning it -- it will scroll past its limits a
408 * little bit and return to the edge again, in a animated for,
411 * @note By default, gengrids have bouncing enabled on both axis
413 * @deprecated Use elm_scroller_bounce_set() instead.
415 * @see elm_scroller_bounce_set()
419 EINA_DEPRECATED EAPI void elm_gengrid_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce);
422 * Get whether bouncing effects are enabled or disabled, for a
423 * given gengrid widget, on each axis
425 * @param obj The gengrid object
426 * @param h_bounce Pointer to a variable where to store the
427 * horizontal bouncing flag.
428 * @param v_bounce Pointer to a variable where to store the
429 * vertical bouncing flag.
431 * @deprecated Use elm_scroller_bounce_get() instead.
433 * @see elm_scroller_bounce_get()
437 EINA_DEPRECATED EAPI void elm_gengrid_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce);
440 * Append a new item in a given gengrid widget.
442 * @param obj The gengrid object.
443 * @param gic The item class for the item.
444 * @param data The item data.
445 * @param func Convenience function called when the item is
447 * @param func_data Data to be passed to @p func.
448 * @return A handle to the item added or @c NULL, on errors.
450 * This adds an item to the beginning of the gengrid.
452 * @see elm_gengrid_item_prepend()
453 * @see elm_gengrid_item_insert_before()
454 * @see elm_gengrid_item_insert_after()
455 * @see elm_object_item_del()
459 EAPI Elm_Object_Item *elm_gengrid_item_append(Evas_Object *obj, const Elm_Gengrid_Item_Class *gic, const void *data, Evas_Smart_Cb func, const void *func_data);
462 * Prepend a new item in a given gengrid widget.
464 * @param obj The gengrid object.
465 * @param gic The item class for the item.
466 * @param data The item data.
467 * @param func Convenience function called when the item is
469 * @param func_data Data to be passed to @p func.
470 * @return A handle to the item added or @c NULL, on errors.
472 * This adds an item to the end of the gengrid.
474 * @see elm_gengrid_item_append()
475 * @see elm_gengrid_item_insert_before()
476 * @see elm_gengrid_item_insert_after()
477 * @see elm_object_item_del()
481 EAPI Elm_Object_Item *elm_gengrid_item_prepend(Evas_Object *obj, const Elm_Gengrid_Item_Class *gic, const void *data, Evas_Smart_Cb func, const void *func_data);
484 * Insert an item before another in a gengrid widget
486 * @param obj The gengrid object.
487 * @param gic The item class for the item.
488 * @param data The item data.
489 * @param relative The item to place this new one before.
490 * @param func Convenience function called when the item is
492 * @param func_data Data to be passed to @p func.
493 * @return A handle to the item added or @c NULL, on errors.
495 * This inserts an item before another in the gengrid.
497 * @see elm_gengrid_item_append()
498 * @see elm_gengrid_item_prepend()
499 * @see elm_gengrid_item_insert_after()
500 * @see elm_object_item_del()
504 EAPI Elm_Object_Item *elm_gengrid_item_insert_before(Evas_Object *obj, const Elm_Gengrid_Item_Class *gic, const void *data, Elm_Object_Item *relative, Evas_Smart_Cb func, const void *func_data);
507 * Insert an item after another in a gengrid widget
509 * @param obj The gengrid object.
510 * @param gic The item class for the item.
511 * @param data The item data.
512 * @param relative The item to place this new one after.
513 * @param func Convenience function called when the item is
515 * @param func_data Data to be passed to @p func.
516 * @return A handle to the item added or @c NULL, on errors.
518 * This inserts an item after another in the gengrid.
520 * @see elm_gengrid_item_append()
521 * @see elm_gengrid_item_prepend()
522 * @see elm_gengrid_item_insert_after()
523 * @see elm_object_item_del()
527 EAPI Elm_Object_Item *elm_gengrid_item_insert_after(Evas_Object *obj, const Elm_Gengrid_Item_Class *gic, const void *data, Elm_Object_Item *relative, Evas_Smart_Cb func, const void *func_data);
530 * Insert an item in a gengrid widget using a user-defined sort function.
532 * @param obj The gengrid object.
533 * @param gic The item class for the item.
534 * @param data The item data.
535 * @param comp User defined comparison function that defines the sort order
536 * based on Elm_Gen_Item and its data param.
537 * @param func Convenience function called when the item is selected.
538 * @param func_data Data to be passed to @p func.
539 * @return A handle to the item added or @c NULL, on errors.
541 * This inserts an item in the gengrid based on user defined comparison
542 * function. The two arguments passed to the function @p func are gengrid
543 * item handles to compare.
545 * @see elm_gengrid_item_append()
546 * @see elm_gengrid_item_prepend()
547 * @see elm_gengrid_item_insert_after()
548 * @see elm_object_item_del()
552 EAPI Elm_Object_Item *elm_gengrid_item_sorted_insert(Evas_Object *obj, const Elm_Gengrid_Item_Class *gic, const void *data, Eina_Compare_Cb comp, Evas_Smart_Cb func, const void *func_data);
555 * Get the selected item in a given gengrid widget
557 * @param obj The gengrid object.
558 * @return The selected item's handle or @c NULL, if none is
559 * selected at the moment (and on errors)
561 * This returns the selected item in @p obj. If multi selection is
562 * enabled on @p obj (@see elm_gengrid_multi_select_set()), only
563 * the first item in the list is selected, which might not be very
564 * useful. For that case, see elm_gengrid_selected_items_get().
568 EAPI Elm_Object_Item *elm_gengrid_selected_item_get(const Evas_Object *obj);
571 * Get <b>a list</b> of selected items in a given gengrid
573 * @param obj The gengrid object.
574 * @return The list of selected items or @c NULL, if none is
575 * selected at the moment (and on errors)
577 * This returns a list of the selected items, in the order that
578 * they appear in the grid. This list is only valid as long as no
579 * more items are selected or unselected (or unselected implicitly
580 * by deletion). The list contains Gengrid item pointers as
583 * @see elm_gengrid_selected_item_get()
587 EAPI const Eina_List *elm_gengrid_selected_items_get(const Evas_Object *obj);
590 * Get a list of realized items in gengrid
592 * @param obj The gengrid object
593 * @return The list of realized items, nor NULL if none are realized.
595 * This returns a list of the realized items in the gengrid. The list
596 * contains gengrid item pointers. The list must be freed by the
597 * caller when done with eina_list_free(). The item pointers in the
598 * list are only valid so long as those items are not deleted or the
599 * gengrid is not deleted.
601 * @see elm_gengrid_realized_items_update()
605 EAPI Eina_List *elm_gengrid_realized_items_get(const Evas_Object *obj);
608 * Update the contents of all realized items.
610 * @param obj The gengrid object.
612 * This updates all realized items by calling all the item class functions again
613 * to get the contents, texts and states. Use this when the original
614 * item data has changed and the changes are desired to be reflected.
616 * To update just one item, use elm_gengrid_item_update().
618 * @see elm_gengrid_realized_items_get()
619 * @see elm_gengrid_item_update()
623 EAPI void elm_gengrid_realized_items_update(Evas_Object *obj);
626 * Get the first item in a given gengrid widget
628 * @param obj The gengrid object
629 * @return The first item's handle or @c NULL, if there are no
630 * items in @p obj (and on errors)
632 * This returns the first item in the @p obj's internal list of
635 * @see elm_gengrid_last_item_get()
639 EAPI Elm_Object_Item *elm_gengrid_first_item_get(const Evas_Object *obj);
642 * Get the last item in a given gengrid widget
644 * @param obj The gengrid object
645 * @return The last item's handle or @c NULL, if there are no
646 * items in @p obj (and on errors)
648 * This returns the last item in the @p obj's internal list of
651 * @see elm_gengrid_first_item_get()
655 EAPI Elm_Object_Item *elm_gengrid_last_item_get(const Evas_Object *obj);
658 * Set the scrollbar policy
660 * @param obj The gengrid object
661 * @param policy_h Horizontal scrollbar policy.
662 * @param policy_v Vertical scrollbar policy.
664 * This sets the scrollbar visibility policy for the given gengrid
665 * scroller. #ELM_SCROLLER_POLICY_AUTO means the scrollbar is made
666 * visible if it is needed, and otherwise kept
667 * hidden. #ELM_SCROLLER_POLICY_ON turns it on all the time, and
668 * #ELM_SCROLLER_POLICY_OFF always keeps it off. This applies
669 * respectively for the horizontal and vertical scrollbars. Default
670 * is #ELM_SCROLLER_POLICY_AUTO.
672 * @deprecated Use elm_scroller_policy_set() instead.
674 * @see elm_scroller_policy_set()
676 * @see elm_gengrid_scroller_policy_get()
680 EINA_DEPRECATED EAPI void elm_gengrid_scroller_policy_set(Evas_Object *obj, Elm_Scroller_Policy policy_h, Elm_Scroller_Policy policy_v);
683 * Get the scrollbar policy
685 * @param obj The gengrid object
686 * @param policy_h Pointer to store the horizontal scrollbar policy.
687 * @param policy_v Pointer to store the vertical scrollbar policy.
689 * @deprecated Use elm_scroller_policy_get() instead.
691 * @see elm_scroller_policy_get()
693 * @see elm_gengrid_scroller_policy_set()
697 EINA_DEPRECATED EAPI void elm_gengrid_scroller_policy_get(const Evas_Object *obj, Elm_Scroller_Policy *policy_h, Elm_Scroller_Policy *policy_v);
700 * Get the @b next item in a gengrid widget's internal list of items,
701 * given a handle to one of those items.
703 * @param it The gengrid item to fetch next from
704 * @return The item after @p item, or @c NULL if there's none (and
707 * This returns the item placed after the @p item, on the container
710 * @see elm_gengrid_item_prev_get()
714 EAPI Elm_Object_Item *elm_gengrid_item_next_get(const Elm_Object_Item *it);
717 * Get the @b previous item in a gengrid widget's internal list of items,
718 * given a handle to one of those items.
720 * @param it The gengrid item to fetch previous from
721 * @return The item before @p item, or @c NULL if there's none (and
724 * This returns the item placed before the @p item, on the container
727 * @see elm_gengrid_item_next_get()
731 EAPI Elm_Object_Item *elm_gengrid_item_prev_get(const Elm_Object_Item *it);
734 * Set whether a given gengrid item is selected or not
736 * @param it The gengrid item
737 * @param selected Use @c EINA_TRUE, to make it selected, @c
738 * EINA_FALSE to make it unselected
740 * This sets the selected state of an item. If multi-selection is
741 * not enabled on the containing gengrid and @p selected is @c
742 * EINA_TRUE, any other previously selected items will get
743 * unselected in favor of this new one.
745 * @see elm_gengrid_item_selected_get()
749 EAPI void elm_gengrid_item_selected_set(Elm_Object_Item *it, Eina_Bool selected);
752 * Get whether a given gengrid item is selected or not
754 * @param it The gengrid item
755 * @return @c EINA_TRUE, if it's selected, @c EINA_FALSE otherwise
757 * This API returns EINA_TRUE for all the items selected in multi-select mode as well.
759 * @see elm_gengrid_item_selected_set() for more details
763 EAPI Eina_Bool elm_gengrid_item_selected_get(const Elm_Object_Item *it);
766 * Show the portion of a gengrid's internal grid containing a given
767 * item, @b immediately.
769 * @param it The item to display
770 * @param type Where to position the item in the viewport.
772 * This causes gengrid to @b redraw its viewport's contents to the
773 * region containing the given @p item item, if it is not fully
776 * @see elm_gengrid_item_bring_in()
780 EAPI void elm_gengrid_item_show(Elm_Object_Item *it, Elm_Gengrid_Item_Scrollto_Type type);
783 * Animatedly bring in, to the visible area of a gengrid, a given
786 * @param it The gengrid item to display
787 * @param type Where to position the item in the viewport.
789 * This causes gengrid to jump to the given @p item and show
790 * it (by scrolling), if it is not fully visible. This will use
791 * animation to do so and take a period of time to complete.
793 * @see elm_gengrid_item_show()
797 EAPI void elm_gengrid_item_bring_in(Elm_Object_Item *it, Elm_Gengrid_Item_Scrollto_Type type);
800 * Update the contents of a given gengrid item
802 * @param it The gengrid item
804 * This updates an item by calling all the item class functions
805 * again to get the contents, texts and states. Use this when the
806 * original item data has changed and you want the changes to be
811 EAPI void elm_gengrid_item_update(Elm_Object_Item *it);
814 * Update the item class of a gengrid item.
816 * This sets another class of the item, changing the way that it is
817 * displayed. After changing the item class, elm_gengrid_item_update() is
818 * called on the item @p it.
820 * @param it The gengrid item
821 * @param gic The gengrid item class describing the function pointers and the item style.
825 EAPI void elm_gengrid_item_item_class_update(Elm_Object_Item *it, const Elm_Gengrid_Item_Class *gic);
828 * Get the Gengrid Item class for the given Gengrid Item.
830 * @param it The gengrid item
832 * This returns the Gengrid_Item_Class for the given item. It can be used to examine
833 * the function pointers and item_style.
837 EAPI const Elm_Gengrid_Item_Class *elm_gengrid_item_item_class_get(const Elm_Object_Item *it);
840 * Get the index of the item. It is only valid once displayed.
842 * @param it a gengrid item
843 * @return the position inside the list of item.
847 EAPI int elm_gengrid_item_index_get(const Elm_Object_Item *it);
850 * Return how many items are currently in a list
852 * @param obj The list
853 * @return The total number of list items in the list
855 * This behavior is O(1) and includes items which may or may not be realized.
859 EAPI unsigned int elm_gengrid_items_count(const Evas_Object *obj);
862 * Add a new gengrid item class in a given gengrid widget.
864 * @return New allocated a gengrid item class.
866 * This adds gengrid item class for the gengrid widget. When adding an item,
867 * gengrid_item_{append, prepend, insert} function needs item class of the item.
868 * Given callback parameters are used at retrieving {text, content} of
869 * added item. Set as NULL if it's not used.
870 * If there's no available memory, return can be NULL.
872 * @see elm_gengrid_item_class_free()
873 * @see elm_gengrid_item_append()
877 EAPI Elm_Gengrid_Item_Class *elm_gengrid_item_class_new(void);
880 * Remove an item class in a given gengrid widget.
882 * @param itc The itc to be removed.
884 * This removes item class from the gengrid widget.
885 * Whenever it has no more references to it, item class is going to be freed.
886 * Otherwise it just decreases its reference count.
888 * @see elm_gengrid_item_class_new()
889 * @see elm_gengrid_item_class_ref()
890 * @see elm_gengrid_item_class_unref()
894 EAPI void elm_gengrid_item_class_free(Elm_Gengrid_Item_Class *itc);
897 * Increments object reference count for the item class.
899 * @param itc The given item class object to reference
901 * This API just increases its reference count for item class management.
903 * @see elm_gengrid_item_class_unref()
907 EAPI void elm_gengrid_item_class_ref(Elm_Gengrid_Item_Class *itc);
910 * Decrements object reference count for the item class.
912 * @param itc The given item class object to reference
914 * This API just decreases its reference count for item class management.
915 * Reference count can't be less than 0.
917 * @see elm_gengrid_item_class_ref()
918 * @see elm_gengrid_item_class_free()
922 EAPI void elm_gengrid_item_class_unref(Elm_Gengrid_Item_Class *itc);
925 * Set the text to be shown in a given gengrid item's tooltips.
927 * @param it The gengrid item
928 * @param text The text to set in the content
930 * This call will setup the text to be used as tooltip to that item
931 * (analogous to elm_object_tooltip_text_set(), but being item
932 * tooltips with higher precedence than object tooltips). It can
933 * have only one tooltip at a time, so any previous tooltip data
936 * In order to set a content or something else as a tooltip, look at
937 * elm_gengrid_item_tooltip_content_cb_set().
941 EAPI void elm_gengrid_item_tooltip_text_set(Elm_Object_Item *it, const char *text);
944 * Set the content to be shown in a given gengrid item's tooltip
946 * @param it The gengrid item.
947 * @param func The function returning the tooltip contents.
948 * @param data What to provide to @a func as callback data/context.
949 * @param del_cb Called when data is not needed anymore, either when
950 * another callback replaces @p func, the tooltip is unset with
951 * elm_gengrid_item_tooltip_unset() or the owner @p item
952 * dies. This callback receives as its first parameter the
953 * given @p data, being @c event_info the item handle.
955 * This call will setup the tooltip's contents to @p item
956 * (analogous to elm_object_tooltip_content_cb_set(), but being
957 * item tooltips with higher precedence than object tooltips). It
958 * can have only one tooltip at a time, so any previous tooltip
959 * content will get removed. @p func (with @p data) will be called
960 * every time Elementary needs to show the tooltip and it should
961 * return a valid Evas object, which will be fully managed by the
962 * tooltip system, getting deleted when the tooltip is gone.
964 * In order to set just a text as a tooltip, look at
965 * elm_gengrid_item_tooltip_text_set().
969 EAPI void elm_gengrid_item_tooltip_content_cb_set(Elm_Object_Item *it, Elm_Tooltip_Item_Content_Cb func, const void *data, Evas_Smart_Cb del_cb);
972 * Unset a tooltip from a given gengrid item
974 * @param it gengrid item to remove a previously set tooltip from.
976 * This call removes any tooltip set on @p item. The callback
977 * provided as @c del_cb to
978 * elm_gengrid_item_tooltip_content_cb_set() will be called to
979 * notify it is not used anymore (and have resources cleaned, if
982 * @see elm_gengrid_item_tooltip_content_cb_set()
986 EAPI void elm_gengrid_item_tooltip_unset(Elm_Object_Item *it);
989 * Set a different @b style for a given gengrid item's tooltip.
991 * @param it gengrid item with tooltip set
992 * @param style the <b>theme style</b> to use on tooltips (e.g. @c
993 * "default", @c "transparent", etc)
995 * Tooltips can have <b>alternate styles</b> to be displayed on,
996 * which are defined by the theme set on Elementary. This function
997 * works analogously as elm_object_tooltip_style_set(), but here
998 * applied only to gengrid item objects. The default style for
999 * tooltips is @c "default".
1001 * @note before you set a style you should define a tooltip with
1002 * elm_gengrid_item_tooltip_content_cb_set() or
1003 * elm_gengrid_item_tooltip_text_set()
1005 * @see elm_gengrid_item_tooltip_style_get()
1009 EAPI void elm_gengrid_item_tooltip_style_set(Elm_Object_Item *it, const char *style);
1012 * Get the style set a given gengrid item's tooltip.
1014 * @param it gengrid item with tooltip already set on.
1015 * @return style the theme style in use, which defaults to
1016 * "default". If the object does not have a tooltip set,
1017 * then @c NULL is returned.
1019 * @see elm_gengrid_item_tooltip_style_set() for more details
1023 EAPI const char *elm_gengrid_item_tooltip_style_get(const Elm_Object_Item *it);
1026 * @brief Disable size restrictions on an object's tooltip
1027 * @param it The tooltip's anchor object
1028 * @param disable If EINA_TRUE, size restrictions are disabled
1029 * @return EINA_FALSE on failure, EINA_TRUE on success
1031 * This function allows a tooltip to expand beyond its parent window's canvas.
1032 * It will instead be limited only by the size of the display.
1034 EAPI Eina_Bool elm_gengrid_item_tooltip_window_mode_set(Elm_Object_Item *it, Eina_Bool disable);
1037 * @brief Retrieve size restriction state of an object's tooltip
1038 * @param it The tooltip's anchor object
1039 * @return If EINA_TRUE, size restrictions are disabled
1041 * This function returns whether a tooltip is allowed to expand beyond
1042 * its parent window's canvas.
1043 * It will instead be limited only by the size of the display.
1045 EAPI Eina_Bool elm_gengrid_item_tooltip_window_mode_get(const Elm_Object_Item *it);
1048 * Set the type of mouse pointer/cursor decoration to be shown,
1049 * when the mouse pointer is over the given gengrid widget item
1051 * @param it gengrid item to customize cursor on
1052 * @param cursor the cursor type's name
1054 * This function works analogously as elm_object_cursor_set(), but
1055 * here the cursor's changing area is restricted to the item's
1056 * area, and not the whole widget's. Note that that item cursors
1057 * have precedence over widget cursors, so that a mouse over @p
1058 * item will always show cursor @p type.
1060 * If this function is called twice for an object, a previously set
1061 * cursor will be unset on the second call.
1063 * @see elm_object_cursor_set()
1064 * @see elm_gengrid_item_cursor_get()
1065 * @see elm_gengrid_item_cursor_unset()
1069 EAPI void elm_gengrid_item_cursor_set(Elm_Object_Item *it, const char *cursor);
1072 * Get the type of mouse pointer/cursor decoration set to be shown,
1073 * when the mouse pointer is over the given gengrid widget item
1075 * @param it gengrid item with custom cursor set
1076 * @return the cursor type's name or @c NULL, if no custom cursors
1077 * were set to @p item (and on errors)
1079 * @see elm_object_cursor_get()
1080 * @see elm_gengrid_item_cursor_set() for more details
1081 * @see elm_gengrid_item_cursor_unset()
1085 EAPI const char *elm_gengrid_item_cursor_get(const Elm_Object_Item *it);
1088 * Unset any custom mouse pointer/cursor decoration set to be
1089 * shown, when the mouse pointer is over the given gengrid widget
1090 * item, thus making it show the @b default cursor again.
1092 * @param it a gengrid item
1094 * Use this call to undo any custom settings on this item's cursor
1095 * decoration, bringing it back to defaults (no custom style set).
1097 * @see elm_object_cursor_unset()
1098 * @see elm_gengrid_item_cursor_set() for more details
1102 EAPI void elm_gengrid_item_cursor_unset(Elm_Object_Item *it);
1105 * Set a different @b style for a given custom cursor set for a
1108 * @param it gengrid item with custom cursor set
1109 * @param style the <b>theme style</b> to use (e.g. @c "default",
1110 * @c "transparent", etc)
1112 * This function only makes sense when one is using custom mouse
1113 * cursor decorations <b>defined in a theme file</b> , which can
1114 * have, given a cursor name/type, <b>alternate styles</b> on
1115 * it. It works analogously as elm_object_cursor_style_set(), but
1116 * here applied only to gengrid item objects.
1118 * @warning Before you set a cursor style you should have defined a
1119 * custom cursor previously on the item, with
1120 * elm_gengrid_item_cursor_set()
1122 * @see elm_gengrid_item_cursor_engine_only_set()
1123 * @see elm_gengrid_item_cursor_style_get()
1127 EAPI void elm_gengrid_item_cursor_style_set(Elm_Object_Item *it, const char *style);
1130 * Get the current @b style set for a given gengrid item's custom
1133 * @param it gengrid item with custom cursor set.
1134 * @return style the cursor style in use. If the object does not
1135 * have a cursor set, then @c NULL is returned.
1137 * @see elm_gengrid_item_cursor_style_set() for more details
1141 EAPI const char *elm_gengrid_item_cursor_style_get(const Elm_Object_Item *it);
1144 * Set if the (custom) cursor for a given gengrid item should be
1145 * searched in its theme, also, or should only rely on the
1148 * @param it item with custom (custom) cursor already set on
1149 * @param engine_only Use @c EINA_TRUE to have cursors looked for
1150 * only on those provided by the rendering engine, @c EINA_FALSE to
1151 * have them searched on the widget's theme, as well.
1153 * @note This call is of use only if you've set a custom cursor
1154 * for gengrid items, with elm_gengrid_item_cursor_set().
1156 * @note By default, cursors will only be looked for between those
1157 * provided by the rendering engine.
1161 EAPI void elm_gengrid_item_cursor_engine_only_set(Elm_Object_Item *it, Eina_Bool engine_only);
1164 * Get if the (custom) cursor for a given gengrid item is being
1165 * searched in its theme, also, or is only relying on the rendering
1168 * @param it a gengrid item
1169 * @return @c EINA_TRUE, if cursors are being looked for only on
1170 * those provided by the rendering engine, @c EINA_FALSE if they
1171 * are being searched on the widget's theme, as well.
1173 * @see elm_gengrid_item_cursor_engine_only_set(), for more details
1177 EAPI Eina_Bool elm_gengrid_item_cursor_engine_only_get(const Elm_Object_Item *it);
1180 * Set the size for the items of a given gengrid widget
1182 * @param obj The gengrid object.
1183 * @param w The items' width.
1184 * @param h The items' height;
1186 * A gengrid, after creation, has still no information on the size
1187 * to give to each of its cells. So, you most probably will end up
1188 * with squares one @ref Fingers "finger" wide, the default
1189 * size. Use this function to force a custom size for you items,
1190 * making them as big as you wish.
1192 * @see elm_gengrid_item_size_get()
1196 EAPI void elm_gengrid_item_size_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h);
1199 * Get the size set for the items of a given gengrid widget
1201 * @param obj The gengrid object.
1202 * @param w Pointer to a variable where to store the items' width.
1203 * @param h Pointer to a variable where to store the items' height.
1205 * @note Use @c NULL pointers on the size values you're not
1206 * interested in: they'll be ignored by the function.
1208 * @see elm_gengrid_item_size_get() for more details
1212 EAPI void elm_gengrid_item_size_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h);
1215 * Set the size for the group items of a given gengrid widget
1217 * @param obj The gengrid object.
1218 * @param w The group items' width.
1219 * @param h The group items' height;
1221 * A gengrid, after creation, has still no information on the size
1222 * to give to each of its cells. So, you most probably will end up
1223 * with squares one @ref Fingers "finger" wide, the default
1224 * size. Use this function to force a custom size for you group items,
1225 * making them as big as you wish.
1227 * @see elm_gengrid_group_item_size_get()
1231 EAPI void elm_gengrid_group_item_size_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h);
1234 * Get the size set for the group items of a given gengrid widget
1236 * @param obj The gengrid object.
1237 * @param w Pointer to a variable where to store the group items' width.
1238 * @param h Pointer to a variable where to store the group items' height.
1240 * @note Use @c NULL pointers on the size values you're not
1241 * interested in: they'll be ignored by the function.
1243 * @see elm_gengrid_group_item_size_get() for more details
1247 EAPI void elm_gengrid_group_item_size_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h);
1250 * Set the items grid's alignment within a given gengrid widget
1252 * @param obj The gengrid object.
1253 * @param align_x Alignment in the horizontal axis (0 <= align_x <= 1).
1254 * @param align_y Alignment in the vertical axis (0 <= align_y <= 1).
1256 * This sets the alignment of the whole grid of items of a gengrid
1257 * within its given viewport. By default, those values are both
1258 * 0.5, meaning that the gengrid will have its items grid placed
1259 * exactly in the middle of its viewport.
1261 * @note If given alignment values are out of the cited ranges,
1262 * they'll be changed to the nearest boundary values on the valid
1265 * @see elm_gengrid_align_get()
1269 EAPI void elm_gengrid_align_set(Evas_Object *obj, double align_x, double align_y);
1272 * Get the items grid's alignment values within a given gengrid
1275 * @param obj The gengrid object.
1276 * @param align_x Pointer to a variable where to store the
1277 * horizontal alignment.
1278 * @param align_y Pointer to a variable where to store the vertical
1281 * @note Use @c NULL pointers on the alignment values you're not
1282 * interested in: they'll be ignored by the function.
1284 * @see elm_gengrid_align_set() for more details
1288 EAPI void elm_gengrid_align_get(const Evas_Object *obj, double *align_x, double *align_y);
1291 * Set whether a given gengrid widget is or not able have items
1294 * @param obj The gengrid object
1295 * @param reorder_mode Use @c EINA_TRUE to turn reordering on,
1296 * @c EINA_FALSE to turn it off
1298 * If a gengrid is set to allow reordering, a click held for more
1299 * than 0.5 over a given item will highlight it specially,
1300 * signaling the gengrid has entered the reordering state. From
1301 * that time on, the user will be able to, while still holding the
1302 * mouse button down, move the item freely in the gengrid's
1303 * viewport, replacing to said item to the locations it goes to.
1304 * The replacements will be animated and, whenever the user
1305 * releases the mouse button, the item being replaced gets a new
1306 * definitive place in the grid.
1308 * @see elm_gengrid_reorder_mode_get()
1312 EAPI void elm_gengrid_reorder_mode_set(Evas_Object *obj, Eina_Bool reorder_mode);
1315 * Get whether a given gengrid widget is or not able have items
1318 * @param obj The gengrid object
1319 * @return @c EINA_TRUE, if reordering is on, @c EINA_FALSE if it's
1322 * @see elm_gengrid_reorder_mode_set() for more details
1326 EAPI Eina_Bool elm_gengrid_reorder_mode_get(const Evas_Object *obj);
1330 * Set a given gengrid widget's scrolling page size, relative to
1331 * its viewport size.
1333 * @param obj The gengrid object
1334 * @param h_pagerel The horizontal page (relative) size
1335 * @param v_pagerel The vertical page (relative) size
1337 * The gengrid's scroller is capable of binding scrolling by the
1338 * user to "pages". It means that, while scrolling and, specially
1339 * after releasing the mouse button, the grid will @b snap to the
1340 * nearest displaying page's area. When page sizes are set, the
1341 * grid's continuous content area is split into (equal) page sized
1344 * This function sets the size of a page <b>relatively to the
1345 * viewport dimensions</b> of the gengrid, for each axis. A value
1346 * @c 1.0 means "the exact viewport's size", in that axis, while @c
1347 * 0.0 turns paging off in that axis. Likewise, @c 0.5 means "half
1348 * a viewport". Sane usable values are, than, between @c 0.0 and @c
1349 * 1.0. Values beyond those will make it behave behave
1350 * inconsistently. If you only want one axis to snap to pages, use
1351 * the value @c 0.0 for the other one.
1353 * There is a function setting page size values in @b absolute
1354 * values, too -- elm_gengrid_page_size_set(). Naturally, its use
1355 * is mutually exclusive to this one.
1357 * @deprecated Use elm_scroller_page_relative_set() instead.
1359 * @see elm_scroller_page_relative_set()
1363 EINA_DEPRECATED EAPI void elm_gengrid_page_relative_set(Evas_Object *obj, double h_pagerel, double v_pagerel);
1366 * Get a given gengrid widget's scrolling page size, relative to
1367 * its viewport size.
1369 * @param obj The gengrid object
1370 * @param h_pagerel Pointer to a variable where to store the
1371 * horizontal page (relative) size
1372 * @param v_pagerel Pointer to a variable where to store the
1373 * vertical page (relative) size
1375 * @deprecated Use elm_scroller_page_relative_get() instead.
1377 * @see elm_scroller_page_relative_get()
1381 EINA_DEPRECATED EAPI void elm_gengrid_page_relative_get(const Evas_Object *obj, double *h_pagerel, double *v_pagerel);
1384 * Set a given gengrid widget's scrolling page size
1386 * @param obj The gengrid object
1387 * @param h_pagesize The horizontal page size, in pixels
1388 * @param v_pagesize The vertical page size, in pixels
1390 * The gengrid's scroller is capable of binding scrolling by the
1391 * user to "pages". It means that, while scrolling and, specially
1392 * after releasing the mouse button, the grid will @b snap to the
1393 * nearest displaying page's area. When page sizes are set, the
1394 * grid's continuous content area is split into (equal) page sized
1397 * This function sets the size of a page of the gengrid, in pixels,
1398 * for each axis. Sane usable values are, between @c 0 and the
1399 * dimensions of @p obj, for each axis. Values beyond those will
1400 * make it behave behave inconsistently. If you only want one axis
1401 * to snap to pages, use the value @c 0 for the other one.
1403 * There is a function setting page size values in @b relative
1404 * values, too -- elm_gengrid_page_relative_set(). Naturally, its
1405 * use is mutually exclusive to this one.
1407 * @deprecated Use elm_scroller_page_size_set() instead.
1409 * @see elm_scroller_page_size_set()
1413 EINA_DEPRECATED EAPI void elm_gengrid_page_size_set(Evas_Object *obj, Evas_Coord h_pagesize, Evas_Coord v_pagesize);
1416 * @brief Get gengrid current page number.
1418 * @param obj The gengrid object
1419 * @param h_pagenumber The horizontal page number
1420 * @param v_pagenumber The vertical page number
1422 * The page number starts from 0. 0 is the first page.
1423 * Current page means the page which meet the top-left of the viewport.
1424 * If there are two or more pages in the viewport, it returns the number of page
1425 * which meet the top-left of the viewport.
1427 * @deprecated Use elm_scroller_current_page_set() instead.
1429 * @see elm_scroller_current_page_set()
1431 * @see elm_gengrid_last_page_get()
1432 * @see elm_gengrid_page_show()
1433 * @see elm_gengrid_page_bring_in()
1435 EINA_DEPRECATED EAPI void elm_gengrid_current_page_get(const Evas_Object *obj, int *h_pagenumber, int *v_pagenumber);
1438 * @brief Get gengrid last page number.
1440 * @param obj The gengrid object
1441 * @param h_pagenumber The horizontal page number
1442 * @param v_pagenumber The vertical page number
1444 * The page number starts from 0. 0 is the first page.
1445 * This returns the last page number among the pages.
1447 * @deprecated Use elm_scroller_last_page_set() instead.
1449 * @see elm_scroller_last_page_set()
1451 * @see elm_gengrid_current_page_get()
1452 * @see elm_gengrid_page_show()
1453 * @see elm_gengrid_page_bring_in()
1455 EINA_DEPRECATED EAPI void elm_gengrid_last_page_get(const Evas_Object *obj, int *h_pagenumber, int *v_pagenumber);
1458 * Show a specific virtual region within the gengrid content object by page number.
1460 * @param obj The gengrid object
1461 * @param h_pagenumber The horizontal page number
1462 * @param v_pagenumber The vertical page number
1464 * 0, 0 of the indicated page is located at the top-left of the viewport.
1465 * This will jump to the page directly without animation.
1470 * sc = elm_gengrid_add(win);
1471 * elm_gengrid_content_set(sc, content);
1472 * elm_gengrid_page_relative_set(sc, 1, 0);
1473 * elm_gengrid_current_page_get(sc, &h_page, &v_page);
1474 * elm_gengrid_page_show(sc, h_page + 1, v_page);
1477 * @see elm_gengrid_page_bring_in()
1479 EAPI void elm_gengrid_page_show(const Evas_Object *obj, int h_pagenumber, int v_pagenumber);
1482 * Show a specific virtual region within the gengrid content object by page number.
1484 * @param obj The gengrid object
1485 * @param h_pagenumber The horizontal page number
1486 * @param v_pagenumber The vertical page number
1488 * 0, 0 of the indicated page is located at the top-left of the viewport.
1489 * This will slide to the page with animation.
1494 * sc = elm_gengrid_add(win);
1495 * elm_gengrid_content_set(sc, content);
1496 * elm_gengrid_page_relative_set(sc, 1, 0);
1497 * elm_gengrid_last_page_get(sc, &h_page, &v_page);
1498 * elm_gengrid_page_bring_in(sc, h_page, v_page);
1501 * @deprecated Use elm_scroller_page_bring_in() instead.
1503 * @see elm_scroller_page_bring_in()
1505 * @see elm_gengrid_page_show()
1507 EINA_DEPRECATED EAPI void elm_gengrid_page_bring_in(const Evas_Object *obj, int h_pagenumber, int v_pagenumber);
1510 * Get a given gengrid item's position, relative to the whole
1511 * gengrid's grid area.
1513 * @param it The Gengrid item.
1514 * @param x Pointer to variable to store the item's <b>row number</b>.
1515 * @param y Pointer to variable to store the item's <b>column number</b>.
1517 * This returns the "logical" position of the item within the
1518 * gengrid. For example, @c (0, 1) would stand for first row,
1523 EAPI void elm_gengrid_item_pos_get(const Elm_Object_Item *it, unsigned int *x, unsigned int *y);
1526 * Set how the items grid's filled within a given gengrid widget
1528 * @param obj The gengrid object.
1529 * @param fill Filled if True
1531 * This sets the fill state of the whole grid of items of a gengrid
1532 * within its given viewport. By default, this value is false, meaning
1533 * that if the first line of items grid's isn't filled, the items are
1534 * centered with the alignment
1536 * @see elm_gengrid_filled_get()
1541 EAPI void elm_gengrid_filled_set(Evas_Object *obj, Eina_Bool fill);
1544 * Get how the items grid's filled within a given gengrid widget
1546 * @param obj The gengrid object.
1547 * @return @c EINA_TRUE, if filled is on, @c EINA_FALSE if it's
1550 * @note Use @c NULL pointers on the alignment values you're not
1551 * interested in: they'll be ignored by the function.
1553 * @see elm_gengrid_align_set() for more details
1557 EAPI Eina_Bool elm_gengrid_filled_get(const Evas_Object *obj);
1560 * Set the gengrid select mode.
1562 * @param obj The gengrid object
1563 * @param mode The select mode
1565 * elm_gengrid_select_mode_set() changes item select mode in the gengrid widget.
1566 * - ELM_OBJECT_SELECT_MODE_DEFAULT : Items will only call their selection func and
1567 * callback when first becoming selected. Any further clicks will
1568 * do nothing, unless you set always select mode.
1569 * - ELM_OBJECT_SELECT_MODE_ALWAYS : This means that, even if selected,
1570 * every click will make the selected callbacks be called.
1571 * - ELM_OBJECT_SELECT_MODE_NONE : This will turn off the ability to select items
1572 * entirely and they will neither appear selected nor call selected
1573 * callback functions.
1575 * @see elm_gengrid_select_mode_get()
1579 EAPI void elm_gengrid_select_mode_set(Evas_Object *obj, Elm_Object_Select_Mode mode);
1582 * Get the gengrid select mode.
1584 * @param obj The gengrid object
1585 * @return The select mode
1586 * (If getting mode is failed, it returns ELM_OBJECT_SELECT_MODE_MAX)
1588 * @see elm_gengrid_select_mode_set()
1592 EAPI Elm_Object_Select_Mode elm_gengrid_select_mode_get(const Evas_Object *obj);
1595 * Set whether the gengrid items' should be highlighted when item selected.
1597 * @param obj The gengrid object.
1598 * @param highlight @c EINA_TRUE to enable highlight or @c EINA_FALSE to
1601 * This will turn on/off the highlight effect when items are selected and
1602 * they will or will not be highlighted. The selected and clicked
1603 * callback functions will still be called.
1605 * highlight is enabled by default.
1607 * @see elm_gengrid_highlight_mode_get().
1612 EAPI void elm_gengrid_highlight_mode_set(Evas_Object *obj, Eina_Bool highlight);
1615 * Get whether the gengrid items' should be highlighted when item selected.
1617 * @param obj The gengrid object.
1618 * @return @c EINA_TRUE means items can be highlighted. @c EINA_FALSE indicates
1619 * they can't. If @p obj is @c NULL, @c EINA_FALSE is returned.
1621 * @see elm_gengrid_highlight_mode_set() for details.
1626 EAPI Eina_Bool elm_gengrid_highlight_mode_get(const Evas_Object *obj);
1629 * Set the gengrid item's select mode.
1631 * @param it The gengrid item object
1632 * @param mode The select mode
1634 * elm_gengrid_select_mode_set() changes item's select mode.
1635 * - ELM_OBJECT_SELECT_MODE_DEFAULT : The item will only call their selection func and
1636 * callback when first becoming selected. Any further clicks will
1637 * do nothing, unless you set always select mode.
1638 * - ELM_OBJECT_SELECT_MODE_ALWAYS : This means that, even if selected,
1639 * every click will make the selected callbacks be called.
1640 * - ELM_OBJECT_SELECT_MODE_NONE : This will turn off the ability to select the item
1641 * entirely and they will neither appear selected nor call selected
1642 * callback functions.
1643 * - ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY : This will apply no-finger-size rule
1644 * with ELM_OBJECT_SELECT_MODE_NONE. No-finger-size rule makes an item can be
1645 * smaller than lower limit. Clickable objects should be bigger than
1646 * human touch point device (your finger) for some touch or
1647 * small screen devices. So it is enabled, the item can be shrink than
1648 * predefined finger-size value. And the item will be updated.
1650 * @see elm_gengrid_item_select_mode_get()
1654 EAPI void elm_gengrid_item_select_mode_set(Elm_Object_Item *it, Elm_Object_Select_Mode mode);
1657 * Get the gengrid item's select mode.
1659 * @param it The gengrid item object
1660 * @return The select mode
1661 * (If getting mode is failed, it returns ELM_OBJECT_SELECT_MODE_MAX)
1663 * @see elm_gengrid_item_select_mode_set()
1667 EAPI Elm_Object_Select_Mode elm_gengrid_item_select_mode_get(const Elm_Object_Item *it);