Tizen Native API
|
Functions | |
Evas_Object * | elm_gengrid_add (Evas_Object *parent) |
Adds a new gengrid widget to the given parent Elementary (container) object. | |
void | elm_gengrid_clear (Evas_Object *obj) |
Removes all items from a given gengrid widget. | |
void | elm_gengrid_multi_select_set (Evas_Object *obj, Eina_Bool multi) |
Enables or disables multi-selection in a given gengrid widget. | |
Eina_Bool | elm_gengrid_multi_select_get (const Evas_Object *obj) |
Gets whether multi-selection is enabled or disabled for a given gengrid widget. | |
void | elm_gengrid_horizontal_set (Evas_Object *obj, Eina_Bool horizontal) |
Sets the direction in which a given gengrid widget expands while placing its items. | |
Eina_Bool | elm_gengrid_horizontal_get (const Evas_Object *obj) |
Gets the direction for which a given gengrid widget expands while placing its items. | |
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) |
Appends a new item to a given gengrid widget. | |
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) |
Prepends a new item to a given gengrid widget. | |
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) |
Inserts an item before another in a gengrid widget. | |
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) |
Inserts an item after another in a gengrid widget. | |
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) |
Inserts an item in a gengrid widget using a user-defined sort function. | |
Elm_Object_Item * | elm_gengrid_selected_item_get (const Evas_Object *obj) |
Gets the selected item in a given gengrid widget. | |
const Eina_List * | elm_gengrid_selected_items_get (const Evas_Object *obj) |
Gets a list of selected items in a given gengrid. | |
Eina_List * | elm_gengrid_realized_items_get (const Evas_Object *obj) |
Gets a list of realized items in the gengrid. | |
void | elm_gengrid_realized_items_update (Evas_Object *obj) |
Updates the contents of all the realized items. | |
Elm_Object_Item * | elm_gengrid_first_item_get (const Evas_Object *obj) |
Gets the first item in a given gengrid widget. | |
Elm_Object_Item * | elm_gengrid_last_item_get (const Evas_Object *obj) |
Gets the last item in a given gengrid widget. | |
Elm_Object_Item * | elm_gengrid_item_next_get (const Elm_Object_Item *it) |
Gets the next item in a gengrid widget's internal list of items, given that a handle to one of those items is present. | |
Elm_Object_Item * | elm_gengrid_item_prev_get (const Elm_Object_Item *it) |
Gets the previous item in a gengrid widget's internal list of items, given that a handle to one of those items is present. | |
void | elm_gengrid_item_selected_set (Elm_Object_Item *it, Eina_Bool selected) |
Sets whether a given gengrid item is selected. | |
Eina_Bool | elm_gengrid_item_selected_get (const Elm_Object_Item *it) |
Gets whether a given gengrid item is selected. | |
void | elm_gengrid_item_show (Elm_Object_Item *it, Elm_Gengrid_Item_Scrollto_Type type) |
Shows the portion of a gengrid internal grid containing a given item immediately. | |
void | elm_gengrid_item_bring_in (Elm_Object_Item *it, Elm_Gengrid_Item_Scrollto_Type type) |
Animatedly brings a given item to the visible area of a gengrid. | |
void | elm_gengrid_item_update (Elm_Object_Item *it) |
Updates the content of a given gengrid item. | |
void | elm_gengrid_item_item_class_update (Elm_Object_Item *it, const Elm_Gengrid_Item_Class *gic) |
Updates the item class of a gengrid item. | |
const Elm_Gengrid_Item_Class * | elm_gengrid_item_item_class_get (const Elm_Object_Item *it) |
Gets the gengrid item class for the given gengrid item. | |
int | elm_gengrid_item_index_get (const Elm_Object_Item *it) |
Gets the index of the item. It is only valid once it is displayed. | |
unsigned int | elm_gengrid_items_count (const Evas_Object *obj) |
Returns the number of items that are currently in a list. | |
Elm_Gengrid_Item_Class * | elm_gengrid_item_class_new (void) |
Adds a new gengrid item class in a given gengrid widget. | |
void | elm_gengrid_item_class_free (Elm_Gengrid_Item_Class *itc) |
Removes an item class in a given gengrid widget. | |
void | elm_gengrid_item_class_ref (Elm_Gengrid_Item_Class *itc) |
Increments the object reference count for the item class. | |
void | elm_gengrid_item_class_unref (Elm_Gengrid_Item_Class *itc) |
Decrements the object reference count for the item class. | |
void | elm_gengrid_item_tooltip_text_set (Elm_Object_Item *it, const char *text) |
Sets the text to be shown in a given gengrid item's tooltips. | |
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) |
Sets the content to be shown in a given gengrid item's tooltips. | |
void | elm_gengrid_item_tooltip_unset (Elm_Object_Item *it) |
Unsets a tooltip from a given gengrid item. | |
void | elm_gengrid_item_tooltip_style_set (Elm_Object_Item *it, const char *style) |
Sets a different style for a given gengrid item's tooltip. | |
const char * | elm_gengrid_item_tooltip_style_get (const Elm_Object_Item *it) |
Gets the style set for a given gengrid item's tooltip. | |
Eina_Bool | elm_gengrid_item_tooltip_window_mode_set (Elm_Object_Item *it, Eina_Bool disable) |
Disables the size restrictions on an object's tooltip. | |
Eina_Bool | elm_gengrid_item_tooltip_window_mode_get (const Elm_Object_Item *it) |
Retrieves the size restriction state of an object's tooltip. | |
void | elm_gengrid_item_cursor_set (Elm_Object_Item *it, const char *cursor) |
Sets the type of mouse pointer/cursor decoration to be displayed, when the mouse pointer is over the given gengrid widget item. | |
const char * | elm_gengrid_item_cursor_get (const Elm_Object_Item *it) |
Gets the type of mouse pointer/cursor decoration set to be displayed, when the mouse pointer is over the given gengrid widget item. | |
void | elm_gengrid_item_cursor_unset (Elm_Object_Item *it) |
Unsets any custom mouse pointer/cursor decoration set to be displayed, when the mouse pointer is over the given gengrid widget item, thus making it show the default cursor again. | |
void | elm_gengrid_item_cursor_style_set (Elm_Object_Item *it, const char *style) |
Sets a different style for a given custom cursor set for a gengrid item. | |
const char * | elm_gengrid_item_cursor_style_get (const Elm_Object_Item *it) |
Gets the current style set for a given gengrid item's custom cursor. | |
void | elm_gengrid_item_cursor_engine_only_set (Elm_Object_Item *it, Eina_Bool engine_only) |
Sets whether the (custom) cursor for a given gengrid item should be searched in its theme or should only rely on the rendering engine. | |
Eina_Bool | elm_gengrid_item_cursor_engine_only_get (const Elm_Object_Item *it) |
Gets whether the (custom) cursor for a given gengrid item is being searched in its theme or is only relying on the rendering engine. | |
void | elm_gengrid_item_size_set (Evas_Object *obj, Evas_Coord w, Evas_Coord h) |
Sets the size for the items of a given gengrid widget. | |
void | elm_gengrid_item_size_get (const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) |
Gets the size set for the items of a given gengrid widget. | |
void | elm_gengrid_group_item_size_set (Evas_Object *obj, Evas_Coord w, Evas_Coord h) |
Sets the size of the group items of a given gengrid widget. | |
void | elm_gengrid_group_item_size_get (const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) |
Gets the size set for the group items of a given gengrid widget. | |
void | elm_gengrid_align_set (Evas_Object *obj, double align_x, double align_y) |
Sets the item's grid alignment within a given gengrid widget. | |
void | elm_gengrid_align_get (const Evas_Object *obj, double *align_x, double *align_y) |
Gets the item's grid alignment values within a given gengrid widget. | |
void | elm_gengrid_reorder_mode_set (Evas_Object *obj, Eina_Bool reorder_mode) |
Sets whether a given gengrid widget is able to have items reordered. | |
Eina_Bool | elm_gengrid_reorder_mode_get (const Evas_Object *obj) |
Gets whether a given gengrid widget is able to have items reordered. | |
void | elm_gengrid_page_show (const Evas_Object *obj, int h_pagenumber, int v_pagenumber) |
Shows a specific virtual region within the gengrid content object by its page number. | |
void | elm_gengrid_item_pos_get (const Elm_Object_Item *it, unsigned int *x, unsigned int *y) |
Gets a given gengrid item's position, relative to the whole gengrid's grid area. | |
void | elm_gengrid_filled_set (Evas_Object *obj, Eina_Bool fill) |
Sets the manner in which the items grid is filled within a given gengrid widget. | |
Eina_Bool | elm_gengrid_filled_get (const Evas_Object *obj) |
Gets the manner in which the items grid is filled within a given gengrid widget. | |
void | elm_gengrid_select_mode_set (Evas_Object *obj, Elm_Object_Select_Mode mode) |
Sets the gengrid select mode. | |
Elm_Object_Select_Mode | elm_gengrid_select_mode_get (const Evas_Object *obj) |
Gets the gengrid select mode. | |
void | elm_gengrid_highlight_mode_set (Evas_Object *obj, Eina_Bool highlight) |
Sets whether the gengrid items should be highlighted when an item is selected. | |
Eina_Bool | elm_gengrid_highlight_mode_get (const Evas_Object *obj) |
Gets whether the gengrid items should be highlighted when an item is selected. | |
void | elm_gengrid_item_select_mode_set (Elm_Object_Item *it, Elm_Object_Select_Mode mode) |
Sets the gengrid item's select mode. | |
Elm_Object_Select_Mode | elm_gengrid_item_select_mode_get (const Elm_Object_Item *it) |
Gets the gengrid item's select mode. | |
Elm_Object_Item * | elm_gengrid_at_xy_item_get (const Evas_Object *obj, Evas_Coord x, Evas_Coord y, int *xposret, int *yposret) |
Gets the item that is at the x, y canvas coordinates. | |
Typedefs | |
typedef Elm_Gen_Item_Class | Elm_Gengrid_Item_Class |
typedef Elm_Gen_Item_Text_Get_Cb | Elm_Gengrid_Item_Text_Get_Cb |
typedef Elm_Gen_Item_Content_Get_Cb | Elm_Gengrid_Item_Content_Get_Cb |
typedef Elm_Gen_Item_State_Get_Cb | Elm_Gengrid_Item_State_Get_Cb |
typedef Elm_Gen_Item_Del_Cb | Elm_Gengrid_Item_Del_Cb |
This widget aims to position objects in a grid layout while actually creating and rendering only the visible ones.
Gengrid using the same idea as the genlist: the user defines a class for each item, specifying functions that are called at object creation, deletion, etc. When those items are selected by the user, a callback function is issued. Users may interact with the gengrid via a mouse (by clicking on items to select them and clicking on the grid's viewport and swiping to pan the whole view) or via the keyboard, navigating through items using the arrow keys.
This widget inherits from the Layout one, so that all the functions acting on it also work for gengrid objects.
This widget implements the elm-scrollable-interface interface, so that all (non-deprecated) functions for the base Scroller widget also work for gengrids.
Some calls on the gengrid's API are marked as deprecated, as they just wrap the scrollable widgets counterpart functions. Use the ones mentioned for each case of deprecation here, Eventually the deprecated ones are discarded (next major release).
Gengrid may layout its items in one of the following two possible layouts:
When in the "horizontal mode", items are placed in columns from top to bottom and when the space for a column is filled, another one is started on the right, thus expanding the grid horizontally and allowing horizontal scrolling. When in the "vertical mode", though items are placed in rows from left to right, and when the space for a row is filled, another one is started below, thus expanding the grid vertically (and allowing vertical scrolling).
An item in a gengrid can have 0
or more texts (they can be regular text or textblock Evas objects - that's up to the style to determine), 0
or more contents (which are simply objects swallowed into the gengrid item's theming Edje object) and 0
or more boolean states, which have their behavior left to the user to define. The Edje part names for each of these properties are looked up in the theme file for the gengrid, under the Edje (string) data items named "texts"
, "contents"
, and "states"
, respectively. For each of these properties, if more than one part is provided, they must have names listed and separated by spaces in the data fields. By default, in a gengrid item theme, we have one text part ("elm.text"
), two content parts ("elm.swalllow.icon"
and "elm.swallow.end"
), and no state parts.
A gengrid item may have one of the several styles. Elementary provides one by default - "default", but this can be extended by the system or application custom themes/overlays/extensions (see themes for more details).
In order to have the ability to add and delete items on the fly, gengrid implements a class (callback) system where the application provides a structure with information about that type of item (gengrid may contain multiple items of different types with different classes, states, and styles). Gengrid calls the functions in this struct (methods) when an item is "realized" (i.e., created dynamically, while the user is scrolling the grid). All objects are simply deleted when no longer needed with evas_object_del(). The Elm_Gengrid_Item_Class structure contains the following members:
item_style
- This is a constant string and simply defines the name of the item style. It must be specified and the default should be "default"
.func.text_get
- This function is called when an item object is actually created. The data parameter points to the same data passed to elm_gengrid_item_append() and other related item creation functions. The obj parameter is the gengrid object itself, while the part
one is the name string of one of the existing text parts in the Edje group implementing the item's theme. This function must return a strdup'()ed string, as the caller uses free() to free it when done. See Elm_Gengrid_Item_Text_Get_Cb.func.content_get
- This function is called when an item object is actually created. The data parameter points to the same data passed to elm_gengrid_item_append() and other related item creation functions. The obj parameter is the gengrid object itself, while the part
one is the name string of one of the existing (content) swallow parts in the Edje group implementing the item's theme. It must return NULL
when no content is desired, otherwise, a valid object handle. The object is deleted by the gengrid on its deletion or when the item is "unrealized". See Elm_Gengrid_Item_Content_Get_Cb.func.state_get
- This function is called when an item object is actually created. The data parameter points to the same data passed to elm_gengrid_item_append() and other related item creation functions. The obj parameter is the gengrid object itself, while the part
one is the name string of one of the state parts in the Edje group implementing the item's theme. Return EINA_FALSE
for false/off or EINA_TRUE
for true/on. Gengrids emit a signal to its theming Edje object with "elm,state,xxx,active"
and "elm"
as "emission" and "source" arguments respectively, when the state is true
(the default is false), where xxx
is the name of the (state) part. See Elm_Gengrid_Item_State_Get_Cb.func.del
- This is called when elm_object_item_del() is called on an item or elm_gengrid_clear() is called on the gengrid. This is intended for use when gengrid items are deleted, so any data attached to the item (e.g. its data parameter on creation) can be deleted. See Elm_Gengrid_Item_Del_Cb.If the user wants to have multiple items selected at the same time, elm_gengrid_multi_select_set() permits it. If the gengrid is single-selection only (the default), then elm_gengrid_select_item_get() returns the selected item, otherwise it returns NULL
, if no item is selected. If the gengrid is under multi-selection, then elm_gengrid_selected_items_get() returns a list (that is only valid as long as no items are modified (added, deleted, selected, or unselected) from the child items on a gengrid.
If an item changes (internal (boolean) state, text, or content changes), then use elm_gengrid_item_update() to have gengrid update the item with the new state. A gengrid re-realizes the item, thus calling the functions in the Elm_Gengrid_Item_Class set for that item.
To programmatically (un)select an item, use elm_gengrid_item_selected_set(). To get its selected state use elm_gengrid_item_selected_get(). To disable an item (unable to be selected and appear differently) use elm_object_item_disabled_set() to set this and elm_object_item_disabled_get() to get the disabled state.
Grid cells only have their selection smart callbacks called when getting selected for the first time. Any further clicks do nothing, unless you enable the "always select mode", with elm_gengrid_select_mode_set() as ELM_OBJECT_SELECT_MODE_ALWAYS
, thus making every click to issue selection callbacks. elm_gengrid_select_mode_set() as ELM_OBJECT_SELECT_MODE_NONE
turns off the ability to select items entirely in the widget and they neither appear selected nor call the selection smart callbacks.
Remember that you can create new styles and add your own theme augmentation for each application using elm_theme_extension_add(). If you absolutely must have a specific style that overrides any theme the user or system sets up, you can use elm_theme_overlay_add() to add such a file.
This widget emits the following signals, besides the ones sent from Layout :
"activated"
- The user has double-clicked or pressed (enter|return|spacebar) on an item. The event_info parameter is the gengrid item that is activated."pressed"
- The user pressed an item. The event_info parameter is the item that is pressed."released"
- The user released an item. The event_info parameter is the item that is released."clicked,double"
- The user has double-clicked an item. The event_info parameter is the gengrid item that is double-clicked."longpressed"
- This is called when the item is pressed for a certain amount of time. By default it's 1
second."selected"
- The user has selected an item. The event_info parameter is the gengrid item that is selected."unselected"
- The user has unselected an item. The event_info parameter is the gengrid item that is unselected."realized"
- This is called when the item in the gengrid has its implementing Evas object instantiated, de facto. event_info is the gengrid item that is created. The object may be deleted at any time, so it is highly advised to the caller not to use the object pointer returned from elm_gengrid_item_object_get(), because it may point to freed objects."unrealized"
- This is called when the implementing Evas object for this item is deleted. event_info is the gengrid item that is deleted."changed"
- Called when an item is added, removed, resized, or moved and when the gengrid is resized or gets "horizontal" property changes."scroll,anim,start"
- This is called when scrolling animation has started."scroll,anim,stop"
- This is called when scrolling animation has stopped."drag,start,up"
- Called when the item in the gengrid has been dragged (not scrolled) up."drag,start,down"
- Called when the item in the gengrid has been dragged (not scrolled) down."drag,start,left"
- Called when the item in the gengrid has been dragged (not scrolled) left."drag,start,right"
- Called when the item in the gengrid has been dragged (not scrolled) right."drag,stop"
- Called when the item in the gengrid has stopped being dragged."drag"
- Called when the item in the gengrid is being dragged."scroll"
- Called when the content has been scrolled (moved)."scroll,drag,start"
- Called when dragging the content has started."scroll,drag,stop"
- Called when dragging the content has stopped."edge,top"
- Called when the gengrid is scrolled till the top edge."edge,bottom"
- Called when the gengrid is scrolled until the bottom edge."edge,left"
- Called when the gengrid is scrolled till the left edge."edge,right"
- Called when the gengrid is scrolled till the right edge."highlighted"
- Called when an item in the list is pressed and highlighted. The event_info parameter is the item that is highlighted."unhighlighted"
- an item in the list is unpressed and unhighlighted. The event_info parameter is the item that is unhighlighted."language,changed"
- Called when the program's language is changed. Call elm_gengrid_realized_items_update() if items text needs to be translated.Supported common elm_object APIs.
Supported common elm_object_item APIs.
Enumeration that defines the type of item part.
Enumeration that defines where to position the item in the gengrid.
Evas_Object* elm_gengrid_add | ( | Evas_Object * | parent | ) |
Adds a new gengrid widget to the given parent Elementary (container) object.
This function inserts a new gengrid widget on the canvas.
[in] | parent | The parent object |
NULL
in case of an errorvoid elm_gengrid_align_get | ( | const Evas_Object * | obj, |
double * | align_x, | ||
double * | align_y | ||
) |
Gets the item's grid alignment values within a given gengrid widget.
NULL
pointers for the alignment values you're not interested in, they get ignored by the function.[in] | obj | The gengrid object |
[out] | align_x | The pointer to a variable that stores the horizontal alignment |
[out] | align_y | The pointer to a variable that stores the vertical alignment |
void elm_gengrid_align_set | ( | Evas_Object * | obj, |
double | align_x, | ||
double | align_y | ||
) |
Sets the item's grid alignment within a given gengrid widget.
This sets the alignment of the whole grid of gengrid items within its given viewport. By default, those values are both 0.5
, meaning that the gengrid has its items grid placed exactly in the middle of its viewport.
[in] | obj | The gengrid object |
[in] | align_x | The alignment along the horizontal axis (0 <= align_x <= 1) |
[in] | align_y | The alignment along the vertical axis (0 <= align_y <= 1) |
Elm_Object_Item* elm_gengrid_at_xy_item_get | ( | const Evas_Object * | obj, |
Evas_Coord | x, | ||
Evas_Coord | y, | ||
int * | xposret, | ||
int * | yposret | ||
) |
Gets the item that is at the x, y canvas coordinates.
This returns the item at the given coordinates (which is canvas relative, not object-relative). If an item is at that coordinate, that item handle is returned, and if xposret is not NULL
, the integer it points to is set to either -1
, 0
, or 1
, depending on whether the coordinate is on the left portion of that item (-1), in the middle section (0), or on the right part (1). If yposret is not NULL
, the integer it points to is set to either -1
, 0
, or 1
, depending on whether the coordinate is at the upper portion of that item (-1), in the middle section (0), or at the lower part (1). If NULL
is returned as an item (no item found there), then posret may indicate -1
or 1
based on whether the coordinate is above or below the items respectively in the gengrid.
[in] | obj | The gengrid object |
[in] | x | The input x coordinate |
[in] | y | The input y coordinate |
[out] | xposret | The position relative to the returned item |
[out] | yposret | The position relative to the returned item |
NULL
if no item is present void elm_gengrid_clear | ( | Evas_Object * | obj | ) |
Removes all items from a given gengrid widget.
This removes (and deletes) all items in obj, making it empty.
[in] | obj | The gengrid object |
Eina_Bool elm_gengrid_filled_get | ( | const Evas_Object * | obj | ) |
Gets the manner in which the items grid is filled within a given gengrid widget.
NULL
pointers for the alignment values you're not interested in, they are ignored by the function.[in] | obj | The gengrid object |
EINA_TRUE
if filled is on, otherwise EINA_FALSE
if it is offvoid elm_gengrid_filled_set | ( | Evas_Object * | obj, |
Eina_Bool | fill | ||
) |
Sets the manner in which the items grid is filled within a given gengrid widget.
This sets the fill state of the whole grid of items of a gengrid within its given viewport. By default, this value is false
, meaning that if the first line of items grid isn't filled, the items are centered with the alignment.
[in] | obj | The gengrid object |
[in] | fill | If true if it is filled, otherwise false |
Elm_Object_Item* elm_gengrid_first_item_get | ( | const Evas_Object * | obj | ) |
Gets the first item in a given gengrid widget.
This returns the first item in the obj internal list of items.
[in] | obj | The gengrid object |
NULL
if there are no items in obj (and on errors)void elm_gengrid_group_item_size_get | ( | const Evas_Object * | obj, |
Evas_Coord * | w, | ||
Evas_Coord * | h | ||
) |
Gets the size set for the group items of a given gengrid widget.
NULL
pointers for the size values you're not interested in, they get ignored by the function.[in] | obj | The gengrid object |
[out] | w | The pointer to a variable that stores the group item's width |
[out] | h | The pointer to a variable that stores the group item's height |
void elm_gengrid_group_item_size_set | ( | Evas_Object * | obj, |
Evas_Coord | w, | ||
Evas_Coord | h | ||
) |
Sets the size of the group items of a given gengrid widget.
[in] | obj | The gengrid object |
[in] | w | The group item's width |
[in] | h | The group item's height |
Eina_Bool elm_gengrid_highlight_mode_get | ( | const Evas_Object * | obj | ) |
Gets whether the gengrid items should be highlighted when an item is selected.
[in] | obj | The gengrid object |
EINA_TRUE
indicates that items can be highlighted, otherwise EINA_FALSE
indicates that they can't NULL
, EINA_FALSE
is returned.void elm_gengrid_highlight_mode_set | ( | Evas_Object * | obj, |
Eina_Bool | highlight | ||
) |
Sets whether the gengrid items should be highlighted when an item is selected.
This turns on/off the highlight effect when items are selected and they either get or do not get highlighted. The selected and clicked callback functions are still called.
[in] | obj | The gengrid object |
[in] | highlight | If EINA_TRUE highlighting is enabled, otherwise EINA_FALSE to disable it |
Eina_Bool elm_gengrid_horizontal_get | ( | const Evas_Object * | obj | ) |
Gets the direction for which a given gengrid widget expands while placing its items.
[in] | obj | The gengrid object |
EINA_TRUE
if obj is set to expand horizontally, otherwise EINA_FALSE
if it's set to expand verticallyvoid elm_gengrid_horizontal_set | ( | Evas_Object * | obj, |
Eina_Bool | horizontal | ||
) |
Sets the direction in which a given gengrid widget expands while placing its items.
"horizontal mode"
(EINA_TRUE
), items are placed in columns from top to bottom and when the space for a column is filled, another one is started on the right, thus expanding the grid horizontally. When in the "vertical mode"
(EINA_FALSE
), though items are placed in rows from left to right, and when the space for a row is filled, another one is started below, thus expanding the grid vertically.[in] | obj | The gengrid object |
[in] | horizontal | If EINA_TRUE the gengrid expands horizontally, otherwise EINA_FALSE to expand vertically |
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 | ||
) |
Appends a new item to a given gengrid widget.
This adds an item to the beginning of the gengrid.
[in] | obj | The gengrid object |
[in] | gic | The item class for the item |
[in] | data | The item data |
[in] | func | The convenience function that is called when the item is selected |
[in] | func_data | The data to be passed to func |
NULL
in case of an errorvoid elm_gengrid_item_bring_in | ( | Elm_Object_Item * | it, |
Elm_Gengrid_Item_Scrollto_Type | type | ||
) |
Animatedly brings a given item to the visible area of a gengrid.
This causes gengrid to jump to the given it and show it (by scrolling), if it is not fully visible. This uses animation to do so and takes a period of time to complete.
[in] | it | The gengrid item to display |
[in] | type | The position of the item in the viewport |
void elm_gengrid_item_class_free | ( | Elm_Gengrid_Item_Class * | itc | ) |
Removes an item class in a given gengrid widget.
This removes the item class from the gengrid widget. Whenever it has no more references to it, the item class is freed. Otherwise it just decreases its reference count.
[in] | itc | The itc to be removed |
Adds a new gengrid item class in a given gengrid widget.
This adds the gengrid item class for the gengrid widget. When adding an item, the gengrid_item_{append, prepend, insert} function needs the item class of the item. Given callback parameters are used for retrieving {text, content} of an added item. Set as NULL
if it's not used. If there's no available memory, it returns NULL
.
void elm_gengrid_item_class_ref | ( | Elm_Gengrid_Item_Class * | itc | ) |
Increments the object reference count for the item class.
[in] | itc | The given item class object to reference |
void elm_gengrid_item_class_unref | ( | Elm_Gengrid_Item_Class * | itc | ) |
Decrements the object reference count for the item class.
0
.[in] | itc | The given item class object to reference |
Eina_Bool elm_gengrid_item_cursor_engine_only_get | ( | const Elm_Object_Item * | it | ) |
Gets whether the (custom) cursor for a given gengrid item is being searched in its theme or is only relying on the rendering engine.
[in] | it | The gengrid item |
EINA_TRUE
if cursors are being looked for only from those provided by the rendering engine, otherwise EINA_FALSE
if they are being searched on the widget's theme as wellvoid elm_gengrid_item_cursor_engine_only_set | ( | Elm_Object_Item * | it, |
Eina_Bool | engine_only | ||
) |
Sets whether the (custom) cursor for a given gengrid item should be searched in its theme or should only rely on the rendering engine.
[in] | it | The item with custom (custom) cursor already set on it |
[in] | engine_only | If EINA_TRUE look for cursors only from those provided by the rendering engine, otherwise EINA_FALSE to have them searched on the widget's theme as well |
const char* elm_gengrid_item_cursor_get | ( | const Elm_Object_Item * | it | ) |
Gets the type of mouse pointer/cursor decoration set to be displayed, when the mouse pointer is over the given gengrid widget item.
[in] | it | The gengrid item with a custom cursor set |
NULL
if no custom cursors are set to it(and on errors) void elm_gengrid_item_cursor_set | ( | Elm_Object_Item * | it, |
const char * | cursor | ||
) |
Sets the type of mouse pointer/cursor decoration to be displayed, when the mouse pointer is over the given gengrid widget item.
This function is analogous to elm_object_cursor_set(), but the cursor's changing area is restricted to the item's area, and not the whole widget. Note that item cursors have precedence over widget cursors, so a mouse over it always shows the cursor type.
[in] | it | The gengrid item on which to customize the cursor |
[in] | cursor | The cursor type |
const char* elm_gengrid_item_cursor_style_get | ( | const Elm_Object_Item * | it | ) |
Gets the current style set for a given gengrid item's custom cursor.
[in] | it | The gengrid item with a custom cursor set |
NULL
is returned.void elm_gengrid_item_cursor_style_set | ( | Elm_Object_Item * | it, |
const char * | style | ||
) |
Sets a different style for a given custom cursor set for a gengrid item.
This function only makes sense when one is using customized mouse cursor decorations defined in a theme file , which can have, given a cursor name/type, alternate styles on it. It is analogous to elm_object_cursor_style_set(), but is applied only to gengrid item objects.
[in] | it | The gengrid item with a custom cursor set |
[in] | style | The theme style to use (e.g. "default" , "transparent" , etc) |
void elm_gengrid_item_cursor_unset | ( | Elm_Object_Item * | it | ) |
Unsets any custom mouse pointer/cursor decoration set to be displayed, when the mouse pointer is over the given gengrid widget item, thus making it show the default cursor again.
[in] | it | The gengrid item |
int elm_gengrid_item_index_get | ( | const Elm_Object_Item * | it | ) |
Gets the index of the item. It is only valid once it is displayed.
[in] | it | The gengrid item |
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 | ||
) |
Inserts an item after another in a gengrid widget.
This inserts an item after another in the gengrid.
[in] | obj | The gengrid object |
[in] | gic | The item class for the item |
[in] | data | The item data |
[in] | relative | The item after which to place this new one |
[in] | func | The convenience function that is called when the item is selected |
[in] | func_data | The data to be passed to func |
NULL
in case of an errorElm_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 | ||
) |
Inserts an item before another in a gengrid widget.
This inserts an item before another in the gengrid.
[in] | obj | The gengrid object |
[in] | gic | The item class for the item |
[in] | data | The item data |
[in] | relative | The item tbefore which to place this new one |
[in] | func | The convenience function that is called when the item is selected |
[in] | func_data | The data to be passed to func |
NULL
in case of an errorconst Elm_Gengrid_Item_Class* elm_gengrid_item_item_class_get | ( | const Elm_Object_Item * | it | ) |
Gets the gengrid item class for the given gengrid item.
This returns the Gengrid_Item_Class for the given item. It can be used to examine the function pointers and item style.
[in] | it | The gengrid item |
void elm_gengrid_item_item_class_update | ( | Elm_Object_Item * | it, |
const Elm_Gengrid_Item_Class * | gic | ||
) |
Updates the item class of a gengrid item.
This sets another class of the item, changing the way it is displayed. After changing the item class, elm_gengrid_item_update() is called on the item it.
[in] | it | The gengrid item |
[in] | gic | The gengrid item class describing the function pointers and the item style |
Elm_Object_Item* elm_gengrid_item_next_get | ( | const Elm_Object_Item * | it | ) |
Gets the next item in a gengrid widget's internal list of items, given that a handle to one of those items is present.
This returns the item placed after the it, on the container gengrid.
[in] | it | The gengrid item to fetch next from |
NULL
if there are none (and on errors)void elm_gengrid_item_pos_get | ( | const Elm_Object_Item * | it, |
unsigned int * | x, | ||
unsigned int * | y | ||
) |
Gets a given gengrid item's position, relative to the whole gengrid's grid area.
This returns the "logical" position of the item within the gengrid. For example, (0, 1) would stand for the first row and the second column.
[in] | it | The gengrid item |
[out] | x | The pointer to a variable that stores the item's row number |
[out] | y | The pointer to a variable that stores the item's column number |
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 | ||
) |
Prepends a new item to a given gengrid widget.
This adds an item to the end of the gengrid.
[in] | obj | The gengrid object |
[in] | gic | The item class for the item |
[in] | data | The item data |
[in] | func | The convenience function that is called when the item is selected |
[in] | func_data | The data to be passed to func |
NULL
in case of an errorElm_Object_Item* elm_gengrid_item_prev_get | ( | const Elm_Object_Item * | it | ) |
Gets the previous item in a gengrid widget's internal list of items, given that a handle to one of those items is present.
This returns the item placed before the it, on the container gengrid.
[in] | it | The gengrid item to fetch previous from |
NULL
if there are none (and on errors)Gets the gengrid item's select mode.
[in] | it | The gengrid item object |
ELM_OBJECT_SELECT_MODE_MAX
)void elm_gengrid_item_select_mode_set | ( | Elm_Object_Item * | it, |
Elm_Object_Select_Mode | mode | ||
) |
Sets the gengrid item's select mode.
ELM_OBJECT_SELECT_MODE_NONE
. The no-finger-size rule makes an item smaller than the lower limit. Clickable objects should be bigger than the human touch point device (your finger) for some touch or small screen devices. Once it is enabled, the item can shrink beyond the predefined finger-size value. And the item gets updated.[in] | it | The gengrid item object |
[in] | mode | The select mode |
Eina_Bool elm_gengrid_item_selected_get | ( | const Elm_Object_Item * | it | ) |
Gets whether a given gengrid item is selected.
EINA_TRUE
for all the items selected in the multi-select mode as well.[in] | it | The gengrid item |
EINA_TRUE
if it's selected, otherwise EINA_FALSE
void elm_gengrid_item_selected_set | ( | Elm_Object_Item * | it, |
Eina_Bool | selected | ||
) |
Sets whether a given gengrid item is selected.
This sets the selected state of an item. If multi-selection is not enabled on the containing gengrid and selected is EINA_TRUE
, any other previously selected items get unselected in favor of this new one.
[in] | it | The gengrid item |
[in] | selected | If EINA_TRUE it is selected, otherwise EINA_FALSE to unselect it |
void elm_gengrid_item_show | ( | Elm_Object_Item * | it, |
Elm_Gengrid_Item_Scrollto_Type | type | ||
) |
Shows the portion of a gengrid internal grid containing a given item immediately.
[in] | it | The item to display |
[in] | type | The position of the item in the viewport |
void elm_gengrid_item_size_get | ( | const Evas_Object * | obj, |
Evas_Coord * | w, | ||
Evas_Coord * | h | ||
) |
Gets the size set for the items of a given gengrid widget.
NULL
pointers for the size values you're not interested in, they get ignored by the function.[in] | obj | The gengrid object |
[out] | w | The pointer to a variable that stores the item's width |
[out] | h | The pointer to a variable that stores the item's height |
void elm_gengrid_item_size_set | ( | Evas_Object * | obj, |
Evas_Coord | w, | ||
Evas_Coord | h | ||
) |
Sets the size for the items of a given gengrid widget.
[in] | obj | The gengrid object |
[in] | w | The items width |
[in] | h | The items height |
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 | ||
) |
Inserts an item in a gengrid widget using a user-defined sort function.
This inserts an item in the gengrid based on a user defined comparison function. The two arguments passed to the function func are gengrid item handles to compare.
[in] | obj | The gengrid object |
[in] | gic | The item class for the item |
[in] | data | The item data |
[in] | comp | The user defined comparison function that defines the sort order based on Elm_Gen_Item and its data parameter. |
[in] | func | The convenience function that is called when the item is selected |
[in] | func_data | The data to be passed to func |
NULL
in case of an errorvoid 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 | ||
) |
Sets the content to be shown in a given gengrid item's tooltips.
[in] | it | The gengrid item |
[in] | func | The function returning the tooltip contents |
[in] | data | The data to provide to func as callback data/context |
[in] | del_cb | Called when data is not needed anymore, either when another callback replaces func, the tooltip is unset with elm_gengrid_item_tooltip_unset() or the owner it dies. This callback receives the given data as its first parameter with event_info as the item handle |
const char* elm_gengrid_item_tooltip_style_get | ( | const Elm_Object_Item * | it | ) |
Gets the style set for a given gengrid item's tooltip.
[in] | it | The gengrid item on which the tooltip is already set |
"default"
NULL
is returned.void elm_gengrid_item_tooltip_style_set | ( | Elm_Object_Item * | it, |
const char * | style | ||
) |
Sets a different style for a given gengrid item's tooltip.
"default"
.[in] | it | The gengrid item with a tooltip set |
[in] | style | The theme style to use on tooltips (e.g. "default" , "transparent" , etc) |
void elm_gengrid_item_tooltip_text_set | ( | Elm_Object_Item * | it, |
const char * | text | ||
) |
Sets the text to be shown in a given gengrid item's tooltips.
[in] | it | The gengrid item |
[in] | text | The text to set in the content |
void elm_gengrid_item_tooltip_unset | ( | Elm_Object_Item * | it | ) |
Unsets a tooltip from a given gengrid item.
[in] | it | The gengrid item from which to remove a previously set tooltip |
Eina_Bool elm_gengrid_item_tooltip_window_mode_get | ( | const Elm_Object_Item * | it | ) |
Retrieves the size restriction state of an object's tooltip.
This function returns a value that indicates whether a tooltip is allowed to expand beyond its parent window's canvas. It is instead limited only to the size of the display.
[in] | it | The tooltip's anchor object |
EINA_TRUE
if size restrictions are disabled, otherwise EINA_FALSE
Eina_Bool elm_gengrid_item_tooltip_window_mode_set | ( | Elm_Object_Item * | it, |
Eina_Bool | disable | ||
) |
Disables the size restrictions on an object's tooltip.
This function allows a tooltip to expand beyond its parent window's canvas.
[in] | it | The tooltip's anchor object |
disable | If EINA_TRUE size restrictions are disabled, otherwise EINA_FALSE to enable it |
EINA_TRUE
on success, otherwise EINA_FALSE
on failure void elm_gengrid_item_update | ( | Elm_Object_Item * | it | ) |
Updates the content of a given gengrid item.
This updates an item by calling all the item class functions again to get the content, text, and states. Use this when the original item data has changed and you want the changes to reflect.
[in] | it | The gengrid item |
unsigned int elm_gengrid_items_count | ( | const Evas_Object * | obj | ) |
Returns the number of items that are currently in a list.
[in] | obj | The list |
Elm_Object_Item* elm_gengrid_last_item_get | ( | const Evas_Object * | obj | ) |
Gets the last item in a given gengrid widget.
This returns the last item in the obj internal list of items.
[in] | obj | The gengrid object |
NULL
if there are no items in obj (and on errors)Eina_Bool elm_gengrid_multi_select_get | ( | const Evas_Object * | obj | ) |
Gets whether multi-selection is enabled or disabled for a given gengrid widget.
[in] | obj | The gengrid object |
EINA_TRUE
if multi-selection is enabled, otherwise EINA_FALSE
void elm_gengrid_multi_select_set | ( | Evas_Object * | obj, |
Eina_Bool | multi | ||
) |
Enables or disables multi-selection in a given gengrid widget.
[in] | obj | The gengrid object |
[in] | multi | If EINA_TRUE multi-selection is enabled, otherwise EINA_FALSE to disable it |
void elm_gengrid_page_show | ( | const Evas_Object * | obj, |
int | h_pagenumber, | ||
int | v_pagenumber | ||
) |
Shows a specific virtual region within the gengrid content object by its page number.
[in] | obj | The gengrid object |
[in] | h_pagenumber | The horizontal page number |
[in] | v_pagenumber | The vertical page number |
Eina_List* elm_gengrid_realized_items_get | ( | const Evas_Object * | obj | ) |
Gets a list of realized items in the gengrid.
This returns a list of realized items in the gengrid. The list contains gengrid item pointers. The list must be freed by the caller when done using eina_list_free(). The item pointers in the list are only valid as long as those items are not deleted or the gengrid is not deleted.
[in] | obj | The gengrid object |
NULL
if none are realizedvoid elm_gengrid_realized_items_update | ( | Evas_Object * | obj | ) |
Updates the contents of all the realized items.
This updates all realized items by calling all the item class functions again to get the content, text, and states. Use this when the original item data has changed and the changes are desired to reflect.
[in] | obj | The gengrid object |
Eina_Bool elm_gengrid_reorder_mode_get | ( | const Evas_Object * | obj | ) |
Gets whether a given gengrid widget is able to have items reordered.
[in] | obj | The gengrid object |
EINA_TRUE
if reordering is on, otherwise EINA_FALSE
if it's offvoid elm_gengrid_reorder_mode_set | ( | Evas_Object * | obj, |
Eina_Bool | reorder_mode | ||
) |
Sets whether a given gengrid widget is able to have items reordered.
0.5
over a given item highlights it specially, signaling the gengrid has entered the reordering state. From that time on, the user is able to, while still holding the mouse button down, move the item freely in the gengrid's viewport, replacing the said item by the locations it goes to. The replacements are animated and, whenever the user releases the mouse button, the item being replaced gets a new definitive place in the grid.[in] | obj | The gengrid object |
[in] | reorder_mode | If EINA_TRUE reordering is turned on, otherwise EINA_FALSE to turn it off |
Elm_Object_Select_Mode elm_gengrid_select_mode_get | ( | const Evas_Object * | obj | ) |
Gets the gengrid select mode.
[in] | obj | The gengrid object |
ELM_OBJECT_SELECT_MODE_MAX
)void elm_gengrid_select_mode_set | ( | Evas_Object * | obj, |
Elm_Object_Select_Mode | mode | ||
) |
Sets the gengrid select mode.
[in] | obj | The gengrid object |
[in] | mode | The select mode |
Elm_Object_Item* elm_gengrid_selected_item_get | ( | const Evas_Object * | obj | ) |
Gets the selected item in a given gengrid widget.
This returns the selected item in obj. If multi selection is enabled on obj (
[in] | obj | The gengrid object |
NULL
if none are selected at the moment (and on errors) const Eina_List* elm_gengrid_selected_items_get | ( | const Evas_Object * | obj | ) |
Gets a list of selected items in a given gengrid.
This returns a list of the selected items, in the order that they appear in the grid. This list is only valid as long as no more items are selected or unselected (or unselected implicitly by deletion). The list contains gengrid item pointers as data, naturally.
[in] | obj | The gengrid object |
NULL
if none are selected at the moment (and on errors)