Tizen Native API
|
This group provides functions for grid smart objects.
- Since (EFL) :
- 1.1
- Remarks:
- Convenience smart object that packs children under a regular grid layout, using their virtual grid location and size to determine children's positions inside the grid object's area.
Functions | |
Evas_Object * | evas_object_grid_add (Evas *evas) |
Creates a new grid. | |
Evas_Object * | evas_object_grid_add_to (Evas_Object *parent) |
Creates a grid that is child of a given element parent. | |
void | evas_object_grid_size_set (Evas_Object *o, int w, int h) |
Sets the virtual resolution for the grid. | |
void | evas_object_grid_size_get (const Evas_Object *o, int *w, int *h) |
Gets the current virtual resolution. | |
void | evas_object_grid_mirrored_set (Evas_Object *o, Eina_Bool mirrored) |
Sets the mirrored mode of the grid. | |
Eina_Bool | evas_object_grid_mirrored_get (const Evas_Object *o) |
Gets the mirrored mode of the grid. | |
Eina_Bool | evas_object_grid_pack (Evas_Object *o, Evas_Object *child, int x, int y, int w, int h) |
Adds a new child to a grid object. | |
Eina_Bool | evas_object_grid_unpack (Evas_Object *o, Evas_Object *child) |
Removes child from grid. | |
void | evas_object_grid_clear (Evas_Object *o, Eina_Bool clear) |
Removes all child objects from a grid object. | |
Eina_Bool | evas_object_grid_pack_get (const Evas_Object *o, Evas_Object *child, int *x, int *y, int *w, int *h) |
Gets the pack options for a grid child. | |
Eina_Iterator * | evas_object_grid_iterator_new (const Evas_Object *o) |
Gets an iterator to walk the list of children for the grid. | |
Eina_Accessor * | evas_object_grid_accessor_new (const Evas_Object *o) |
Gets an accessor to get random access to the list of children for the grid. | |
Eina_List * | evas_object_grid_children_get (const Evas_Object *o) |
Gets the list of children for the grid. |
Function Documentation
Eina_Accessor* evas_object_grid_accessor_new | ( | const Evas_Object * | o | ) |
Gets an accessor to get random access to the list of children for the grid.
- Since (EFL) :
- 1.1
- Since :
- 2.3.1
- Remarks:
- Do not remove or delete objects while walking the list.
- Parameters:
-
[in] o The grid object
- Returns:
- An accessor to get random access to the list of children for the grid,
otherwiseNULL
in case of errors
Evas_Object* evas_object_grid_add | ( | Evas * | evas | ) |
Creates a new grid.
- Since (EFL) :
- 1.1
- Since :
- 2.3.1
- Remarks:
- It is set to a virtual size of 1x1 by default and add children with evas_object_grid_pack().
- Parameters:
-
[in] evas The given evas
- Returns:
- The new grid object
Evas_Object* evas_object_grid_add_to | ( | Evas_Object * | parent | ) |
Creates a grid that is child of a given element parent.
- Since (EFL) :
- 1.1
- Since :
- 2.3.1
- Parameters:
-
[in] parent The parent element
- Returns:
- The new grid object
- See also:
- evas_object_grid_add()
Eina_List* evas_object_grid_children_get | ( | const Evas_Object * | o | ) |
Gets the list of children for the grid.
- Since (EFL) :
- 1.1
- Since :
- 2.3.1
- Remarks:
- This is a duplicate of the list kept by the grid internally. It is up to the user to destroy it when it no longer needs it. It is possible to remove objects from the grid when walking this list, but these removals are not reflected on it.
- Parameters:
-
[in] o The grid object
- Returns:
- The list of children for the grid
void evas_object_grid_clear | ( | Evas_Object * | o, |
Eina_Bool | clear | ||
) |
Removes all child objects from a grid object.
- Since (EFL) :
- 1.1
- Since :
- 2.3.1
- Remarks:
- This is a faster way to remove all child objects.
- Parameters:
-
[in] o The given grid object [in] clear Set EINA_TRUE to delete the just removed children,
otherwise set EINA_FALSE to not delete them
Eina_Iterator* evas_object_grid_iterator_new | ( | const Evas_Object * | o | ) |
Gets an iterator to walk the list of children for the grid.
- Since (EFL) :
- 1.1
- Since :
- 2.3.1
- Remarks:
- Do not remove or delete objects while walking the list.
- Parameters:
-
[in] o The grid object
- Returns:
- An iterator to walk through the children of the object,
otherwiseNULL
in case of errors
Eina_Bool evas_object_grid_mirrored_get | ( | const Evas_Object * | o | ) |
Gets the mirrored mode of the grid.
- Since (EFL) :
- 1.1
- Since :
- 2.3.1
- Parameters:
-
[in] o The grid object
- Returns:
- EINA_TRUE if it is a mirrored grid,
otherwise EINA_FALSE if it is not a mirrored grid
- See also:
- evas_object_grid_mirrored_set()
void evas_object_grid_mirrored_set | ( | Evas_Object * | o, |
Eina_Bool | mirrored | ||
) |
Sets the mirrored mode of the grid.
- Since (EFL) :
- 1.1
- Since :
- 2.3.1
- Remarks:
- In mirrored mode the grid items go from right to left instead of left to right. That is, 0,0 is top right, not to left.
- Parameters:
-
[in] o The grid object [in] mirrored The mirrored mode to set
Eina_Bool evas_object_grid_pack | ( | Evas_Object * | o, |
Evas_Object * | child, | ||
int | x, | ||
int | y, | ||
int | w, | ||
int | h | ||
) |
Adds a new child to a grid object.
- Since (EFL) :
- 1.1
- Since :
- 2.3.1
- Parameters:
-
[in] o The given grid object [in] child The child object to add [in] x The virtual x coordinate of the child [in] y The virtual y coordinate of the child [in] w The virtual width of the child [in] h The virtual height of the child
- Returns:
- EINA_TRUE if the child is added successfully,
otherwise EINA_FALSE on failure
Eina_Bool evas_object_grid_pack_get | ( | const Evas_Object * | o, |
Evas_Object * | child, | ||
int * | x, | ||
int * | y, | ||
int * | w, | ||
int * | h | ||
) |
Gets the pack options for a grid child.
- Since (EFL) :
- 1.1
- Since :
- 2.3.1
- Remarks:
- Gets the pack x, y, width and height in virtual coordinates set by evas_object_grid_pack().
- Parameters:
-
[in] o The grid object [in] child The grid child to query for coordinates [out] x The pointer to where the x coordinate to be returned [out] y The pointer to where the y coordinate to be returned [out] w The pointer to where the width to be returned [out] h The pointer to where the height to be returned
- Returns:
- EINA_TRUE if the pack options are obtained successfully, otherwise EINA_FALSE on failure
void evas_object_grid_size_get | ( | const Evas_Object * | o, |
int * | w, | ||
int * | h | ||
) |
Gets the current virtual resolution.
- Since (EFL) :
- 1.1
- Since :
- 2.3.1
- Parameters:
-
[in] o The grid object to query [out] w A pointer to an integer to store the virtual width [out] h A pointer to an integer to store the virtual height
- See also:
- evas_object_grid_size_set()
void evas_object_grid_size_set | ( | Evas_Object * | o, |
int | w, | ||
int | h | ||
) |
Sets the virtual resolution for the grid.
- Since (EFL) :
- 1.1
- Since :
- 2.3.1
- Parameters:
-
[in] o The grid object to modify [in] w The virtual horizontal size (resolution) in integer units [in] h The virtual vertical size (resolution) in integer units
Eina_Bool evas_object_grid_unpack | ( | Evas_Object * | o, |
Evas_Object * | child | ||
) |
Removes child from grid.
- Since (EFL) :
- 1.1
- Since :
- 2.3.1
- Remarks:
- Removing a child immediately calls a walk over children in order to recalculate numbers of columns and rows. If you plan to remove all children, use evas_object_grid_clear() instead.
- Parameters:
-
[in] o The given grid object [in] child The child object to remove
- Returns:
- EINA_TRUE if the child is removed successfully,
otherwise EINA_FALSE on failure