Functions that deal with parts of type swallow and swallowed objects. More...
Typedefs | |
typedef enum _Edje_Aspect_Control | Edje_Aspect_Control |
Enumerations | |
enum | _Edje_Aspect_Control { EDJE_ASPECT_CONTROL_NONE = 0, EDJE_ASPECT_CONTROL_NEITHER = 1, EDJE_ASPECT_CONTROL_HORIZONTAL = 2, EDJE_ASPECT_CONTROL_VERTICAL = 3, EDJE_ASPECT_CONTROL_BOTH = 4 } |
#define | edje_obj_part_swallow(part, obj_swallow, ret) EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_PART_SWALLOW), EO_TYPECHECK(const char *, part), EO_TYPECHECK(Evas_Object *, obj_swallow), EO_TYPECHECK(Eina_Bool *, ret) |
"Swallows" an object into one of the Edje object SWALLOW More... | |
#define | edje_obj_part_unswallow(obj_swallow) EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_PART_UNSWALLOW), EO_TYPECHECK(Evas_Object *, obj_swallow) |
Unswallow an object. More... | |
#define | edje_obj_part_swallow_get(part, ret) EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_PART_SWALLOW_GET), EO_TYPECHECK(const char *, part), EO_TYPECHECK(Evas_Object **, ret) |
Get the object currently swallowed by a part. More... | |
void | edje_extern_object_min_size_set (Evas_Object *obj, Evas_Coord minw, Evas_Coord minh) |
Set the object minimum size. More... | |
void | edje_extern_object_max_size_set (Evas_Object *obj, Evas_Coord maxw, Evas_Coord maxh) |
Set the object maximum size. More... | |
void | edje_extern_object_aspect_set (Evas_Object *obj, Edje_Aspect_Control aspect, Evas_Coord aw, Evas_Coord ah) |
Set the object aspect size. More... | |
Eina_Bool | edje_object_part_swallow (Evas_Object *obj, const char *part, Evas_Object *obj_swallow) |
"Swallows" an object into one of the Edje object SWALLOW parts. More... | |
void | edje_object_part_unswallow (Evas_Object *obj, Evas_Object *obj_swallow) |
Unswallow an object. More... | |
Evas_Object * | edje_object_part_swallow_get (const Evas_Object *obj, const char *part) |
Get the object currently swallowed by a part. More... | |
Functions that deal with parts of type swallow and swallowed objects.
A important feature of Edje is to be able to create Evas_Objects in code and place them in a layout. And that is what swallowing is all about.
Swallow parts are place holders defined in the EDC file for objects that one may want to include in the layout later, or for objects that are not native of Edje. In this last case, Edje will only treat the Evas_Object properties of the swallowed objects.
#define edje_obj_part_swallow | ( | part, | |
obj_swallow, | |||
ret | |||
) | EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_PART_SWALLOW), EO_TYPECHECK(const char *, part), EO_TYPECHECK(Evas_Object *, obj_swallow), EO_TYPECHECK(Eina_Bool *, ret) |
"Swallows" an object into one of the Edje object SWALLOW
[in] | part | |
[in] | obj_swallow | |
[out] | ret |
Referenced by edje_object_part_swallow().
#define edje_obj_part_unswallow | ( | obj_swallow | ) | EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_PART_UNSWALLOW), EO_TYPECHECK(Evas_Object *, obj_swallow) |
Unswallow an object.
[in] | obj_swallow |
Referenced by edje_object_part_unswallow().
#define edje_obj_part_swallow_get | ( | part, | |
ret | |||
) | EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_PART_SWALLOW_GET), EO_TYPECHECK(const char *, part), EO_TYPECHECK(Evas_Object **, ret) |
Get the object currently swallowed by a part.
[in] | part | |
[out] | ret |
Referenced by edje_object_part_swallow_get().
void edje_extern_object_min_size_set | ( | Evas_Object * | obj, |
Evas_Coord | minw, | ||
Evas_Coord | minh | ||
) |
Set the object minimum size.
obj | A valid Evas_Object handle |
minw | The minimum width |
minh | The minimum height |
This sets the minimum size restriction for the object.
References EAPI, evas_object_data_get(), and evas_object_size_hint_min_set().
void edje_extern_object_max_size_set | ( | Evas_Object * | obj, |
Evas_Coord | maxw, | ||
Evas_Coord | maxh | ||
) |
Set the object maximum size.
obj | A valid Evas_Object handle |
maxw | The maximum width |
maxh | The maximum height |
This sets the maximum size restriction for the object.
References EAPI, evas_object_data_get(), and evas_object_size_hint_max_set().
void edje_extern_object_aspect_set | ( | Evas_Object * | obj, |
Edje_Aspect_Control | aspect, | ||
Evas_Coord | aw, | ||
Evas_Coord | ah | ||
) |
Set the object aspect size.
obj | A valid Evas_Object handle |
aspect | The aspect control axes |
aw | The aspect radio width |
ah | The aspect ratio height |
This sets the desired aspect ratio to keep an object that will be swallowed by Edje. The width and height define a preferred size ASPECT and the object may be scaled to be larger or smaller, but retaining the relative scale of both aspect width and height.
References EVAS_ASPECT_CONTROL_NONE.
Eina_Bool edje_object_part_swallow | ( | Evas_Object * | obj, |
const char * | part, | ||
Evas_Object * | obj_swallow | ||
) |
"Swallows" an object into one of the Edje object SWALLOW
parts.
obj | A valid Edje object handle |
part | The swallow part's name |
obj_swallow | The object to occupy that part |
Swallowing an object into an Edje object is, for a given part of type SWALLOW
in the EDC group which gave life to obj, to set an external object to be controlled by obj, being displayed exactly over that part's region inside the whole Edje object's viewport.
From this point on, obj will have total control over obj_swallow's geometry and visibility. For instance, if obj is visible, as in evas_object_show()
, the swallowed object will be visible too – if the given SWALLOW
part it's in is also visible. Other actions on obj will also reflect on the swallowed object as well (e.g. resizing, moving, raising/lowering, etc.).
Finally, all internal changes to part, specifically, will reflect on the displaying of obj_swallow, for example state changes leading to different visibility states, geometries, positions, etc.
If an object has already been swallowed into this part, then it will first be unswallowed (as in edje_object_part_unswallow()) before the new object is swallowed.
For more details on EDC SWALLOW
parts, see syntaxreference".
References edje_obj_part_swallow, edje_object_part_unswallow(), EINA_FALSE, EINA_TRUE, and evas_object_data_get().
void edje_object_part_unswallow | ( | Evas_Object * | obj, |
Evas_Object * | obj_swallow | ||
) |
Unswallow an object.
obj | A valid Evas_Object handle |
obj_swallow | The swallowed object |
Causes the edje to regurgitate a previously swallowed object. :)
obj_swallow
will not be deleted or hidden. obj_swallow
may appear shown on the evas depending on its state when it got unswallowed. Make sure you delete it or hide it if you do not want it to. References edje_obj_part_unswallow, and evas_object_data_get().
Referenced by edje_object_part_swallow().
Evas_Object* edje_object_part_swallow_get | ( | const Evas_Object * | obj, |
const char * | part | ||
) |
Get the object currently swallowed by a part.
obj | A valid Evas_Object handle |
part | The part name |
References EAPI, and edje_obj_part_swallow_get.