Tizen Native API
Edje Geometry

This group discusses functions that deal with an object's geometry.

Remarks:
By geometry we mean size and position. So in this group there are functions to manipulate an object's geometry or retrieve information about it.
Keep in mind that by changing an object's geometry, it may affect its appearance on the screen of the parts inside. Most of the time that is what you want.

## Functions

void edje_object_size_min_get (const Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh)
Gets the minimum size specified, as an EDC property, for a given edje object.
void edje_object_update_hints_set (Evas_Object *obj, Eina_Bool update)
Sets whether Edje is going to update size hints on itself.
Eina_Bool edje_object_update_hints_get (Evas_Object *obj)
Gets whether Edje is going to update size hints on itself.
void edje_object_size_max_get (const Evas_Object *obj, Evas_Coord *maxw, Evas_Coord *maxh)
Gets the maximum size specified, as an EDC property, for a given edje object.
void edje_object_calc_force (Evas_Object *obj)
Forces a Size/Geometry calculation.
void edje_object_size_min_calc (Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh)
Calculates the minimum required size for a given edje object.
Eina_Bool edje_object_parts_extends_calc (Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
Calculates the geometry of the region, relative to a given edje object's area, occupied by all parts in the object.
void edje_object_size_min_restricted_calc (Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh, Evas_Coord restrictedw, Evas_Coord restrictedh)
Calculates the minimum required size for a given edje object.

## Function Documentation

 void edje_object_calc_force ( Evas_Object * obj )

Forces a Size/Geometry calculation.

This forces the object obj to recalculate the layout regardless of freeze/thaw.

Since :
2.3.1
Parameters:
 [in] obj A valid Evas_Object handle
 Eina_Bool edje_object_parts_extends_calc ( Evas_Object * obj, Evas_Coord * x, Evas_Coord * y, Evas_Coord * w, Evas_Coord * h )

Calculates the geometry of the region, relative to a given edje object's area, occupied by all parts in the object.

This function gets the geometry of the rectangle that is equal to the area required to group all parts in obj's group/collection. The x and y coordinates are relative to the top left corner of the whole obj object's area. Parts placed out of the group's boundaries are also taken into account, so that x and y may be negative.

Since :
2.3.1
Remarks:
Use `NULL` pointers on the geometry components you're not interested in, they are ignored by the function.
On failure, this function makes all non-`NULL` geometry pointers' pointed variables as zero.
Parameters:
 [in] obj A handle to an edje object [out] x A pointer to a variable to store the parts region's x coordinate [out] y A pointer to a variable to store the parts region's y coordinate [out] w A pointer to a variable to store the parts region's width [out] h A pointer to a variable to store the parts region's height
Returns:
EINA_TRUE if success, otherwise EINA_FALSE
 void edje_object_size_max_get ( const Evas_Object * obj, Evas_Coord * maxw, Evas_Coord * maxh )

Gets the maximum size specified, as an EDC property, for a given edje object.

This function retrieves the obj object's maximum size values, as declared in its EDC group definition. Maximum size groups have the following syntax:

Since :
2.3.1
``` collections {
group {
name: "a_group";
max: 100 100;
}
}
```

where one declares a maximum size of 100 pixels for both width and height. Those are (hint) values that should be respected when the given object/group is to be controlled by a given container object (e.g. an edje object being "swallowed" into a given `SWALLOW` type part, as in edje_object_part_swallow()). Check the complete syntax reference for EDC files.

Remarks:
If the `max` EDC property is not declared for obj, this call returns the maximum size that a given edje object may have, for each axis.
On failure, this function makes all non-`NULL` size pointers' pointed variables as zero.
Parameters:
 [in] obj A handle to an edje object [out] maxw A pointer to a variable to store the maximum width [out] maxh A pointer to a variable to store the maximum height
edje_object_size_min_get()
 void edje_object_size_min_calc ( Evas_Object * obj, Evas_Coord * minw, Evas_Coord * minh )

Calculates the minimum required size for a given edje object.

Since :
2.3.1
Remarks:
This call works exactly like edje_object_size_min_restricted_calc(), with the last two arguments set to 0. Please refer to its documentation.
Parameters:
 [in] obj A handle to an edje object [out] minw A pointer to a variable to store the minimum required width [out] minh A pointer to a variable to store the minimum required height
 void edje_object_size_min_get ( const Evas_Object * obj, Evas_Coord * minw, Evas_Coord * minh )

Gets the minimum size specified, as an EDC property, for a given edje object.

This function retrieves the obj object's minimum size values, as declared in its EDC group definition. Minimum size groups have the following syntax:

Since :
2.3.1
``` collections {
group {
name: "a_group";
min: 100 100;
}
}
```

where one declares a minimum size of 100 pixels for both width and height. Those are (hint) values that should be respected when the given object/group is to be controlled by a given container object (e.g. an edje object being "swallowed" into a given `SWALLOW` type part, as in edje_object_part_swallow()). Check the complete syntax reference for EDC files.

Remarks:
If the `min` EDC property is not declared for obj, this call returns the value 0, for each axis.
On failure, this function makes all non-`NULL` size pointers' pointed variables as zero.
Parameters:
 [in] obj A handle to an edje object [out] minw A pointer to a variable to store the minimum width [out] minh A pointer to a variable to store the minimum height
edje_object_size_max_get()
 void edje_object_size_min_restricted_calc ( Evas_Object * obj, Evas_Coord * minw, Evas_Coord * minh, Evas_Coord restrictedw, Evas_Coord restrictedh )

Calculates the minimum required size for a given edje object.

Since :
2.3.1
Remarks:
This call triggers an internal recalculation of all the parts of the obj object, in order to return its minimum required dimensions of width and height. The user might choose to impose those minimum sizes, making the resulting calculation to get to values equal or bigger than restrictedw and restrictedh, for width and height, respectively.
At the end of this call, obj isn't automatically resized to new dimensions, but just returns the calculated sizes. The caller is the one who changes its geometry.
Be advised that invisible parts in obj are taken into account in this calculation.
Parameters:
 [in] obj A handle to an edje object [out] minw A pointer to a variable to store the minimum required width [out] minh A pointer to a variable to store the minimum required width [in] restrictedw Minimum value for an object's calculated (minimum) width [in] restrictedh Minimum value for an object's calculated (minimum) height
 Eina_Bool edje_object_update_hints_get ( Evas_Object * obj )

Gets whether Edje is going to update size hints on itself.

Since :
2.3.1
Parameters:
 [in] obj A handle to an edje object
Returns:
`true` if it does, otherwise `false` if it doesn't
 void edje_object_update_hints_set ( Evas_Object * obj, Eina_Bool update )

Sets whether Edje is going to update size hints on itself.

Since :
2.3.1
Remarks:
By default Edje doesn't set size hints on itself. With this function call, it does so if update is `true`. Be careful, it costs a lot to trigger this feature as it recalculates the object every time it makes sense to be sure that its minimal size hint is always accurate.
Parameters:
 [in] obj A handle to an edje object [in] update A boolean value that indicates whether to update the size hints