Tizen Native API
Grid Smart Object.

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_Objectevas_object_grid_add (Evas *evas)
 Creates a new grid.
Evas_Objectevas_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_Iteratorevas_object_grid_iterator_new (const Evas_Object *o)
 Gets an iterator to walk the list of children for the grid.
Eina_Accessorevas_object_grid_accessor_new (const Evas_Object *o)
 Gets an accessor to get random access to the list of children for the grid.
Eina_Listevas_object_grid_children_get (const Evas_Object *o)
 Gets the list of children for the grid.

Function Documentation

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]oThe grid object
Returns:
An accessor to get random access to the list of children for the grid,
otherwise NULL in case of errors

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]evasThe given evas
Returns:
The new grid object

Creates a grid that is child of a given element parent.

Since (EFL) :
1.1
Since :
2.3.1
Parameters:
[in]parentThe parent element
Returns:
The new grid object
See also:
evas_object_grid_add()

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]oThe 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]oThe given grid object
[in]clearSet EINA_TRUE to delete the just removed children,
otherwise set EINA_FALSE to not delete them

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]oThe grid object
Returns:
An iterator to walk through the children of the object,
otherwise NULL in case of errors

Gets the mirrored mode of the grid.

Since (EFL) :
1.1
Since :
2.3.1
Parameters:
[in]oThe 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]oThe grid object
[in]mirroredThe 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]oThe given grid object
[in]childThe child object to add
[in]xThe virtual x coordinate of the child
[in]yThe virtual y coordinate of the child
[in]wThe virtual width of the child
[in]hThe 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]oThe grid object
[in]childThe grid child to query for coordinates
[out]xThe pointer to where the x coordinate to be returned
[out]yThe pointer to where the y coordinate to be returned
[out]wThe pointer to where the width to be returned
[out]hThe 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]oThe grid object to query
[out]wA pointer to an integer to store the virtual width
[out]hA 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]oThe grid object to modify
[in]wThe virtual horizontal size (resolution) in integer units
[in]hThe virtual vertical size (resolution) in integer units

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]oThe given grid object
[in]childThe child object to remove
Returns:
EINA_TRUE if the child is removed successfully,
otherwise EINA_FALSE on failure