- Main Page
- Related Pages
- Modules
- Data Structures
- Files
- Examples

Edje Object Geometry
Edje Object

Functions that deal with object's geometry. More...

#define | edje_obj_size_min_get(minw, minh) EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_SIZE_MIN_GET), EO_TYPECHECK(Evas_Coord *, minw), EO_TYPECHECK(Evas_Coord *, minh)
| Get the minimum size specified – as an EDC property – for a given Edje object. More...
#define | edje_obj_update_hints_set(update) EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_UPDATE_HINTS_SET), EO_TYPECHECK(Eina_Bool, update)
| Edje will automatically update the size hints on itself. More...
#define | edje_obj_update_hints_get(ret) EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_UPDATE_HINTS_GET), EO_TYPECHECK(Eina_Bool *, ret)
| Wether or not Edje will update size hints on itself. More...
#define | edje_obj_size_max_get(maxw, maxh) EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_SIZE_MAX_GET), EO_TYPECHECK(Evas_Coord *, maxw), EO_TYPECHECK(Evas_Coord *, maxh)
| Get the maximum size specified – as an EDC property – for a given Edje object. More...
#define | edje_obj_calc_force() EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_CALC_FORCE)
| Force a Size/Geometry calculation. More...
#define | edje_obj_size_min_calc(minw, minh) EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_SIZE_MIN_CALC), EO_TYPECHECK(Evas_Coord *, minw), EO_TYPECHECK(Evas_Coord *, minh)
| Calculate the minimum required size for a given Edje object. More...
#define | edje_obj_parts_extends_calc(x, y, w, h, ret) EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_PARTS_EXTENDS_CALC), EO_TYPECHECK(Evas_Coord *, x), EO_TYPECHECK(Evas_Coord *, y), EO_TYPECHECK(Evas_Coord *, w), EO_TYPECHECK(Evas_Coord *, h), EO_TYPECHECK(Eina_Bool *, ret)
#define | edje_obj_size_min_restricted_calc(minw, minh, restrictedw, restrictedh) EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_SIZE_MIN_RESTRICTED_CALC), EO_TYPECHECK(Evas_Coord *, minw), EO_TYPECHECK(Evas_Coord *, minh), EO_TYPECHECK(Evas_Coord, restrictedw), EO_TYPECHECK(Evas_Coord, restrictedh)
| Calculate the minimum required size for a given Edje object. More...
void | edje_object_size_min_get (const Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh)
| Get the minimum size specified – as an EDC property – for a given Edje object. More...
void | edje_object_update_hints_set (Evas_Object *obj, Eina_Bool update)
| Edje will automatically update the size hints on itself. More...
Eina_Bool | edje_object_update_hints_get (Evas_Object *obj)
| Wether or not Edje will update size hints on itself. More...
void | edje_object_size_max_get (const Evas_Object *obj, Evas_Coord *maxw, Evas_Coord *maxh)
| Get the maximum size specified – as an EDC property – for a given Edje object. More...
void | edje_object_calc_force (Evas_Object *obj)
| Force a Size/Geometry calculation. More...
void | edje_object_size_min_calc (Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh)
| Calculate the minimum required size for a given Edje object. More...
Eina_Bool | edje_object_parts_extends_calc (Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
| Calculate the geometry of the region, relative to a given Edje object's area, occupied by all parts in the object More...
void | edje_object_size_min_restricted_calc (Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh, Evas_Coord restrictedw, Evas_Coord restrictedh)
| Calculate the minimum required size for a given Edje object. More...

## Detailed Description

Functions that deal with object's geometry.

By geometry we mean size and position. So in this groups there are functions to manipulate object's geometry or retrieve information about it.

Keep in mind that by changing an object's geometry, it may affect the appearance in the screen of the parts inside. Most times that is what you want.

## Macro Definition Documentation

#define edje_obj_size_min_get | ( |  | minw,
|  |  | minh
| ) |  | EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_SIZE_MIN_GET), EO_TYPECHECK(Evas_Coord *, minw), EO_TYPECHECK(Evas_Coord *, minh)

Get the minimum size specified – as an EDC property – for a given Edje object.

Since
  1.8

Parameters

  [out] | minw |
  [out] | minh |

See Also
  edje_object_size_min_get

Referenced by edje_object_size_min_get().

#define edje_obj_update_hints_set | ( |  | update | ) | EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_UPDATE_HINTS_SET), EO_TYPECHECK(Eina_Bool, update)

Edje will automatically update the size hints on itself.

Since
  1.8

Parameters

  [in] | update |

See Also
  edje_object_update_hints_set

Referenced by edje_object_update_hints_set().

#define edje_obj_update_hints_get | ( |  | ret | ) | EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_UPDATE_HINTS_GET), EO_TYPECHECK(Eina_Bool *, ret)

Wether or not Edje will update size hints on itself.

Since
  1.8

Parameters

  [out] | ret |

See Also
  edje_object_update_hints_get

Referenced by edje_object_update_hints_get().

#define edje_obj_size_max_get | ( |  | maxw,
|  |  | maxh
| ) |  | EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_SIZE_MAX_GET), EO_TYPECHECK(Evas_Coord *, maxw), EO_TYPECHECK(Evas_Coord *, maxh)

Get the maximum size specified – as an EDC property – for a given Edje object.

Since
  1.8

Parameters

  [out] | maxw |
  [out] | maxh |

See Also
  edje_object_size_max_get

Referenced by edje_object_size_max_get().

#define edje_obj_calc_force | ( |  | ) | EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_CALC_FORCE)

Force a Size/Geometry calculation.

Since
  1.8

See Also
  edje_object_calc_force

Referenced by edje_object_calc_force().

#define edje_obj_size_min_calc | ( |  | minw,
|  |  | minh
| ) |  | EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_SIZE_MIN_CALC), EO_TYPECHECK(Evas_Coord *, minw), EO_TYPECHECK(Evas_Coord *, minh)

Calculate the minimum required size for a given Edje object.

Since
  1.8

Parameters

  [out] | minw |
  [out] | minh |

See Also
  edje_object_size_min_calc

Referenced by edje_object_size_min_calc().

#define edje_obj_parts_extends_calc | ( |  | x,
|  |  | y,
|  |  | w,
|  |  | h,
|  |  | ret
| ) |  | EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_PARTS_EXTENDS_CALC), EO_TYPECHECK(Evas_Coord *, x), EO_TYPECHECK(Evas_Coord *, y), EO_TYPECHECK(Evas_Coord *, w), EO_TYPECHECK(Evas_Coord *, h), EO_TYPECHECK(Eina_Bool *, ret)

Since
  1.8

Calculate the geometry of the region, relative to a given Edje

Parameters

  [out] | x |
  [out] | y |
  [out] | w |
  [out] | h |
  [out] | ret |

See Also
  edje_object_parts_extends_calc

Referenced by edje_object_parts_extends_calc().

#define edje_obj_size_min_restricted_calc | ( |  | minw,
|  |  | minh,
|  |  | restrictedw,
|  |  | restrictedh
| ) |  | EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_SIZE_MIN_RESTRICTED_CALC), EO_TYPECHECK(Evas_Coord *, minw), EO_TYPECHECK(Evas_Coord *, minh), EO_TYPECHECK(Evas_Coord, restrictedw), EO_TYPECHECK(Evas_Coord, restrictedh)

Calculate the minimum required size for a given Edje object.

Since
  1.8

Parameters

  [out] | minw |
  [out] | minh |
  [in] | restrictedw |
  [in] | restrictedh |

See Also
  edje_object_size_min_restricted_calc

Referenced by edje_object_size_min_restricted_calc().

## Function Documentation

void edje_object_size_min_get | ( | const Evas_Object * | obj,
|  | Evas_Coord * | minw,
|  | Evas_Coord * | minh
| ) |  |

Get the minimum size specified – as an EDC property – for a given Edje object.

Parameters

  obj | A handle to an Edje object
  minw | Pointer to a variable where to store the minimum width
  minh | Pointer to a variable where to store the minimum height

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

collections {
group {
name: "a_group";
min: 100 100;
}
}

where one declares a minimum size of 100 pixels both for width and height. Those are (hint) values which 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` typed part, as in edje_object_part_swallow()). Check the complete syntax reference for EDC files.

Note
  If the `min` EDC property was not declared for `obj`, this call will return the value 0, for each axis.
  On failure, this function will make all non-`NULL` size pointers' pointed variables be set to zero.

See Also
  edje_object_size_max_get()

Examples:
  edje-basic.c.

References edje_obj_size_min_get.

void edje_object_update_hints_set | ( | Evas_Object * | obj,
|  | Eina_Bool | update
| ) |  |

Edje will automatically update the size hints on itself.

Parameters

  obj | A handle to an Edje object.
  update | Wether or not update the size hints.

By default edje doesn't set size hints on itself. With this function call, it will do so if update is true. Be carefully, it cost a lot to trigger this feature as it will recalc the object every time it make sense to be sure that's its minimal size hint is always accurate.

References edje_obj_update_hints_set.

Eina_Bool edje_object_update_hints_get | ( | Evas_Object * | obj | ) |

Wether or not Edje will update size hints on itself.

Parameters

  obj | A handle to an Edje object.

Returns
  `true` if does, `false` if it doesn't.

References edje_obj_update_hints_get, and EINA_FALSE.

void edje_object_size_max_get | ( | const Evas_Object * | obj,
|  | Evas_Coord * | maxw,
|  | Evas_Coord * | maxh
| ) |  |

Get the maximum size specified – as an EDC property – for a given Edje object.

Parameters

  obj | A handle to an Edje object
  maxw | Pointer to a variable where to store the maximum width
  maxh | Pointer to a variable where to store the maximum height

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

collections {
group {
name: "a_group";
max: 100 100;
}
}

where one declares a maximum size of 100 pixels both for width and height. Those are (hint) values which 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` typed part, as in edje_object_part_swallow()). Check the complete syntax reference for EDC files.

Note
  If the `max` EDC property was not declared for `obj`, this call will return the maximum size a given Edje object may have, for each axis.
  On failure, this function will make all non-`NULL` size pointers' pointed variables be set to zero.

See Also
  edje_object_size_min_get()

Examples:
  edje-basic.c.

References edje_obj_size_max_get.

void edje_object_calc_force | ( | Evas_Object * | obj | ) |

Force a Size/Geometry calculation.

Parameters

  obj | A valid Evas_Object handle

Forces the object `obj` to recalculation layout regardless of freeze/thaw.

Examples:
  edje-perspective.c.

References edje_obj_calc_force.

Referenced by edje_edit_part_clip_to_set(), edje_edit_part_del(), edje_edit_part_effect_set(), edje_edit_part_scale_set(), edje_edit_part_selected_state_set(), edje_edit_state_color3_set(), edje_edit_state_color_class_set(), edje_edit_state_font_set(), edje_edit_state_image_border_fill_set(), edje_edit_state_image_border_set(), edje_edit_state_image_set(), edje_edit_state_text_set(), edje_edit_state_text_size_set(), edje_edit_state_text_source_set(), edje_edit_state_text_style_set(), edje_edit_state_visible_set(), and edje_scale_set().

void edje_object_size_min_calc | ( | Evas_Object * | obj,
|  | Evas_Coord * | minw,
|  | Evas_Coord * | minh
| ) |  |

Calculate the minimum required size for a given Edje object.

Parameters

  obj | A handle to an Edje object
  minw | Pointer to a variable where to store the minimum required width
  minh | Pointer to a variable where to store the minimum required height

This call works exactly as edje_object_size_min_restricted_calc(), with the last two arguments set to 0. Please refer to its documentation, then.

Examples:
  edje-basic.c.

References edje_obj_size_min_calc.

Eina_Bool edje_object_parts_extends_calc | ( | Evas_Object * | obj,
|  | Evas_Coord * | x,
|  | Evas_Coord * | y,
|  | Evas_Coord * | w,
|  | Evas_Coord * | h
| ) |  |

Calculate the geometry of the region, relative to a given Edje object's area, occupied by all parts in the object

Parameters

  obj | A handle to an Edje object
  x | A pointer to a variable where to store the parts region's x coordinate
  y | A pointer to a variable where to store the parts region's y coordinate
  w | A pointer to a variable where to store the parts region's width
  h | A pointer to a variable where to store the parts region's height

This function gets the geometry of the rectangle 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 will also be taken in account, so that `x` and `y` may be negative.

Note
  Use `NULL` pointers on the geometry components you're not interested in: they'll be ignored by the function.
  On failure, this function will make all non-`NULL` geometry pointers' pointed variables be set to zero.

Examples:
  edje-basic.c.

References edje_obj_parts_extends_calc, and EINA_FALSE.

void edje_object_size_min_restricted_calc | ( | Evas_Object * | obj,
|  | Evas_Coord * | minw,
|  | Evas_Coord * | minh,
|  | Evas_Coord | restrictedw,
|  | Evas_Coord | restrictedh
| ) |  |

Calculate the minimum required size for a given Edje object.

Parameters

  obj | A handle to an Edje object
  minw | Pointer to a variable where to store the minimum required width
  minh | Pointer to a variable where to store the minimum required height
  restrictedw | Do not allow object's calculated (minimum) width to be less than this value
  restrictedh | Do not allow object's calculated (minimum) height to be less than this value

This call will trigger an internal recalculation of all parts of the `obj` object, in order to return its minimum required dimensions for 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.

Note
  At the end of this call, `obj` won't be automatically resized to new dimensions, but just return the calculated sizes. The caller is the one up to change its geometry or not.

Warning
  Be advised that invisible parts in `obj` will be taken into account in this calculation.

Examples:
  edje-basic.c.

References edje_obj_size_min_restricted_calc.