Edje Use of External Parts

Functions to manipulate parts of type EXTERNAL. More...

Functions

Evas_Objectedje_object_part_external_object_get (const Evas_Object *obj, const char *part)
 Get the object created by this external part. More...
 
Eina_Bool edje_object_part_external_param_set (Evas_Object *obj, const char *part, const Edje_External_Param *param)
 Set the parameter for the external part. More...
 
Eina_Bool edje_object_part_external_param_get (const Evas_Object *obj, const char *part, Edje_External_Param *param)
 Get the parameter for the external part. More...
 
Evas_Objectedje_object_part_external_content_get (const Evas_Object *obj, const char *part, const char *content)
 Get an object contained in an part of type EXTERNAL. More...
 
Edje_External_Param_Type edje_object_part_external_param_type_get (const Evas_Object *obj, const char *part, const char *param)
 Facility to query the type of the given parameter of the given part. More...
 

Detailed Description

Functions to manipulate parts of type EXTERNAL.

Edje supports parts of type EXTERNAL, which will call plugins defined by the user to create and manipulate the object that's allocated in that part.

Parts of type external may carry extra properties that have meanings defined by the external plugin. For instance, it may be a string that defines a button label and setting this property will change that label on the fly.

Function Documentation

§ edje_object_part_external_object_get()

Evas_Object* edje_object_part_external_object_get ( const Evas_Object obj,
const char *  part 
)

Get the object created by this external part.

Parts of type external creates the part object using information provided by external plugins. It's somehow like "swallow" (edje_object_part_swallow()), but it's all set automatically.

This function returns the part created by such external plugins and being currently managed by this Edje.

Note
Almost all swallow rules apply: you should not move, resize, hide, show, set the color or clipper of such part. It's a bit more restrictive as one must never delete this object!
Parameters
objA valid Evas_Object handle
partThe part name
Returns
The externally created object, or NULL if there is none or part is not an external.

References edje_obj_part_external_object_get, and EINA_UNUSED.

§ edje_object_part_external_param_set()

Eina_Bool edje_object_part_external_param_set ( Evas_Object obj,
const char *  part,
const Edje_External_Param param 
)

Set the parameter for the external part.

Parts of type external may carry extra properties that have meanings defined by the external plugin. For instance, it may be a string that defines a button label and setting this property will change that label on the fly.

Note
external parts have parameters set when they change states. Those parameters will never be changed by this function. The interpretation of how state_set parameters and param_set will interact is up to the external plugin.
this function will not check if parameter value is valid using Edje_External_Param_Info minimum, maximum, valid choices and others. However these should be checked by the underlying implementation provided by the external plugin. This is done for performance reasons.
Parameters
objA valid Evas_Object handle
partThe part name
paramthe parameter details, including its name, type and actual value. This pointer should be valid, and the parameter must exist in Edje_External_Type::parameters_info, with the exact type, otherwise the operation will fail and EINA_FALSE will be returned.
Returns
EINA_TRUE if everything went fine, EINA_FALSE on errors.

References edje_obj_part_external_param_set, EINA_FALSE, and _Edje_External_Param::name.

§ edje_object_part_external_param_get()

Eina_Bool edje_object_part_external_param_get ( const Evas_Object obj,
const char *  part,
Edje_External_Param param 
)

Get the parameter for the external part.

Parts of type external may carry extra properties that have meanings defined by the external plugin. For instance, it may be a string that defines a button label. This property can be modified by state parameters, by explicit calls to edje_object_part_external_param_set() or getting the actual object with edje_object_part_external_object_get() and calling native functions.

This function asks the external plugin what is the current value, independent on how it was set.

Parameters
objA valid Evas_Object handle
partThe part name
paramthe parameter details. It is used as both input and output variable. This pointer should be valid, and the parameter must exist in Edje_External_Type::parameters_info, with the exact type, otherwise the operation will fail and EINA_FALSE will be returned.
Returns
EINA_TRUE if everything went fine and param members are filled with information, EINA_FALSE on errors and param member values are not set or valid.

References edje_obj_part_external_param_get, EINA_FALSE, and _Edje_External_Param::name.

§ edje_object_part_external_content_get()

Evas_Object* edje_object_part_external_content_get ( const Evas_Object obj,
const char *  part,
const char *  content 
)

Get an object contained in an part of type EXTERNAL.

The content string must not be NULL. Its actual value depends on the code providing the EXTERNAL.

Parameters
objThe Edje object
partThe name of the part holding the EXTERNAL
contentA string identifying which content from the EXTERNAL to get

References edje_obj_part_external_content_get, and EINA_UNUSED.

§ edje_object_part_external_param_type_get()

Edje_External_Param_Type edje_object_part_external_param_type_get ( const Evas_Object obj,
const char *  part,
const char *  param 
)

Facility to query the type of the given parameter of the given part.

Parameters
objA valid Evas_Object handle
partThe part name
paramthe parameter name to use.
Returns
EDJE_EXTERNAL_PARAM_TYPE_MAX on errors, or another value from Edje_External_Param_Type on success.

References EDJE_EXTERNAL_PARAM_TYPE_MAX, and edje_obj_part_external_param_type_get.