Edje Object Geometry

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
objA handle to an Edje object
minwPointer to a variable where to store the minimum width
minhPointer 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

1 collections {
2  group {
3  name: "a_group";
4  min: 100 100;
5  }
6 }

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 EAPI, and edje_obj_size_min_get.

Referenced by edje_file_data_get(), and edje_object_update_hints_get().

void edje_object_update_hints_set ( Evas_Object obj,
Eina_Bool  update 
)

Edje will automatically update the size hints on itself.

Parameters
objA handle to an Edje object.
updateWether 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 EAPI, edje_obj_update_hints_set, and EINA_TRUE.

Eina_Bool edje_object_update_hints_get ( Evas_Object obj)

Wether or not Edje will update size hints on itself.

Parameters
objA handle to an Edje object.
Returns
true if does, false if it doesn't.

References _Eina_List::data, EAPI, edje_obj_update_hints_get, edje_object_part_unswallow(), edje_object_signal_callback_del(), edje_object_size_max_get(), edje_object_size_min_get(), EINA_FALSE, eina_hash_find(), eina_hash_foreach(), eina_hash_free(), EINA_ITERATOR_FOREACH, eina_iterator_free(), eina_list_append(), EINA_LIST_FOREACH, eina_list_remove(), eina_list_remove_list(), eina_str_split(), eina_stringshare_del(), EINA_TRUE, EVAS_ASPECT_CONTROL_BOTH, EVAS_ASPECT_CONTROL_HORIZONTAL, EVAS_ASPECT_CONTROL_NEITHER, EVAS_ASPECT_CONTROL_NONE, EVAS_ASPECT_CONTROL_VERTICAL, EVAS_CALLBACK_CHANGED_SIZE_HINTS, EVAS_CALLBACK_DEL, EVAS_CALLBACK_IMAGE_PRELOADED, EVAS_CALLBACK_IMAGE_RESIZE, evas_map_point_image_uv_set(), evas_object_box_iterator_new(), evas_object_clip_set(), evas_object_clip_unset(), evas_object_data_del(), evas_object_data_get(), evas_object_data_set(), evas_object_del(), evas_object_event_callback_add(), evas_object_event_callback_del_full(), evas_object_geometry_get(), evas_object_image_size_get(), evas_object_image_source_get(), evas_object_map_get(), evas_object_map_set(), evas_object_name_get(), evas_object_pass_events_set(), EVAS_OBJECT_POINTER_MODE_AUTOGRAB, evas_object_pointer_mode_set(), evas_object_precise_is_inside_set(), evas_object_repeat_events_set(), evas_object_size_hint_aspect_get(), evas_object_size_hint_max_get(), evas_object_size_hint_min_get(), evas_object_smart_member_add(), evas_object_smart_member_del(), evas_object_smart_parent_get(), evas_object_stack_above(), evas_object_table_children_get(), evas_object_table_iterator_new(), evas_object_table_pack(), and evas_object_table_unpack().

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
objA handle to an Edje object
maxwPointer to a variable where to store the maximum width
maxhPointer 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

1 collections {
2  group {
3  name: "a_group";
4  max: 100 100;
5  }
6 }

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 EAPI, and edje_obj_size_max_get.

Referenced by edje_object_update_hints_get().

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
objA handle to an Edje object
minwPointer to a variable where to store the minimum required width
minhPointer 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 EAPI, edje_obj_size_min_calc, and edje_object_size_min_restricted_calc().

Referenced by edje_file_data_get().

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
objA handle to an Edje object
xA pointer to a variable where to store the parts region's x coordinate
yA pointer to a variable where to store the parts region's y coordinate
wA pointer to a variable where to store the parts region's width
hA 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 EAPI, edje_obj_parts_extends_calc, EINA_FALSE, and EINA_TRUE.

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
objA handle to an Edje object
minwPointer to a variable where to store the minimum required width
minhPointer to a variable where to store the minimum required height
restrictedwDo not allow object's calculated (minimum) width to be less than this value
restrictedhDo 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 EAPI, edje_obj_size_min_restricted_calc, EINA_FALSE, EINA_TRUE, and evas_object_textblock_size_formatted_get().

Referenced by edje_object_size_min_calc().