Functions | |
Evas_Object * | _edje_external_content_get (const Evas_Object *obj, const char *content) |
void | _edje_external_init () |
Eina_Bool | _edje_external_param_get (const Evas_Object *obj, Edje_Real_Part *rp, Edje_External_Param *param) |
Eina_Bool | _edje_external_param_set (Evas_Object *obj, Edje_Real_Part *rp, const Edje_External_Param *param) |
void | _edje_external_params_free (Eina_List *external_params, Eina_Bool free_strings) |
void * | _edje_external_params_parse (Evas_Object *obj, const Eina_List *params) |
void | _edje_external_parsed_params_free (Evas_Object *obj, void *params) |
void | _edje_external_recalc_apply (Edje *ed __UNUSED__, Edje_Real_Part *ep, Edje_Calc_Params *params __UNUSED__, Edje_Part_Description_Common *chosen_desc __UNUSED__) |
void | _edje_external_shutdown () |
void | _edje_external_signal_emit (Evas_Object *obj, const char *emission, const char *source) |
Evas_Object * | _edje_external_type_add (const char *type_name, Evas *evas, Evas_Object *parent, const Eina_List *params, const char *part_name) |
EAPI Eina_Iterator * | edje_external_iterator_get (void) |
Returns an interator of all the registered EXTERNAL types. More... | |
EAPI Eina_Bool | edje_external_param_bool_get (const Eina_List *params, const char *key, Eina_Bool *ret) |
Get the value of the given parameter of boolean type. More... | |
EAPI Eina_Bool | edje_external_param_choice_get (const Eina_List *params, const char *key, const char **ret) |
Get the value of the given parameter of choice type. More... | |
EAPI Eina_Bool | edje_external_param_double_get (const Eina_List *params, const char *key, double *ret) |
Get the value of the given parameter of double type. More... | |
EAPI Edje_External_Param * | edje_external_param_find (const Eina_List *params, const char *key) |
Conevenience function to find a specific parameter in a list of them. More... | |
EAPI const Edje_External_Param_Info * | edje_external_param_info_get (const char *type_name) |
Get the array of parameters information about a type given its name. More... | |
EAPI Eina_Bool | edje_external_param_int_get (const Eina_List *params, const char *key, int *ret) |
Get the value of the given parameter of integer type. More... | |
EAPI Eina_Bool | edje_external_param_string_get (const Eina_List *params, const char *key, const char **ret) |
Get the value of the given parameter of string type. More... | |
EAPI const char * | edje_external_param_type_str (Edje_External_Param_Type type) |
Converts type identifier to string nicer representation. More... | |
EAPI unsigned int | edje_external_type_abi_version_get (void) |
Return the current ABI version for Edje_External_Type structure. More... | |
EAPI void | edje_external_type_array_register (const Edje_External_Type_Info *array) |
Register a batch of types and their information. More... | |
EAPI void | edje_external_type_array_unregister (const Edje_External_Type_Info *array) |
Unregister a batch of given external type previously registered. More... | |
EAPI const Edje_External_Type * | edje_external_type_get (const char *type_name) |
Get the Edje_External_Type that defines an EXTERNAL type registered with the name type_name . More... | |
EAPI Eina_Bool | edje_external_type_register (const char *type_name, const Edje_External_Type *type_info) |
Register a type to be used by EXTERNAL parts. More... | |
EAPI Eina_Bool | edje_external_type_unregister (const char *type_name) |
Unregister a previously registered EXTERNAL type. More... | |
EAPI 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. More... | |
EAPI Evas_Object * | edje_object_part_external_object_get (const Evas_Object *obj, const char *part) |
Get the object created by this external part. More... | |
EAPI 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... | |
EAPI 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... | |
EAPI 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... | |
Function Documentation
Evas_Object* _edje_external_content_get | ( | const Evas_Object * | obj, |
const char * | content | ||
) |
References _Edje_External_Type::content_get, _Edje_External_Type::data, ERR, _Edje_External_Type::module, _Edje_External_Type::module_name, and type.
Referenced by _edje_children_get(), and edje_object_part_external_content_get().
void _edje_external_init | ( | ) |
Referenced by edje_init().
Eina_Bool _edje_external_param_get | ( | const Evas_Object * | obj, |
Edje_Real_Part * | rp, | ||
Edje_External_Param * | param | ||
) |
References _Edje_External_Type::data, EDJE_EXTERNAL_PARAM_TYPE_STRING, edje_object_part_text_get(), EDJE_PART_TYPE_TEXT, EDJE_PART_TYPE_TEXTBLOCK, ERR, _Edje_External_Type::module, _Edje_External_Type::module_name, _Edje_External_Param::name, _Edje_Part::name, _Edje_External_Type::param_get, _Edje_Real_Part::part, _Edje_External_Param::s, _Edje_Real_Part::swallowed_object, type, _Edje_External_Param::type, and _Edje_Part::type.
Referenced by edje_object_part_external_param_get().
Eina_Bool _edje_external_param_set | ( | Evas_Object * | obj, |
Edje_Real_Part * | rp, | ||
const Edje_External_Param * | param | ||
) |
References _Edje_External_Type::data, EDJE_EXTERNAL_PARAM_TYPE_STRING, edje_object_part_text_set(), EDJE_PART_TYPE_TEXT, EDJE_PART_TYPE_TEXTBLOCK, ERR, _Edje_External_Type::module, _Edje_External_Type::module_name, _Edje_External_Param::name, _Edje_Part::name, _Edje_External_Type::param_set, _Edje_Real_Part::part, _Edje_External_Param::s, _Edje_Real_Part::swallowed_object, type, _Edje_External_Param::type, and _Edje_Part::type.
Referenced by edje_object_part_external_param_set().
void _edje_external_params_free | ( | Eina_List * | external_params, |
Eina_Bool | free_strings | ||
) |
References _Edje_External_Param::name, and _Edje_External_Param::s.
Referenced by _edje_collection_free_part_description_clean().
void* _edje_external_params_parse | ( | Evas_Object * | obj, |
const Eina_List * | params | ||
) |
References _Edje_External_Type::data, _Edje_External_Type::params_parse, and type.
Referenced by _edje_object_file_set_internal(), and edje_edit_state_add().
void _edje_external_parsed_params_free | ( | Evas_Object * | obj, |
void * | params | ||
) |
References _Edje_External_Type::params_free, and type.
Referenced by _edje_file_del(), _edje_part_description_apply(), and edje_edit_state_external_param_set().
void _edje_external_recalc_apply | ( | Edje *ed | __UNUSED__, |
Edje_Real_Part * | ep, | ||
Edje_Calc_Params *params | __UNUSED__, | ||
Edje_Part_Description_Common *chosen_desc | __UNUSED__ | ||
) |
References _Edje_External_Type::data, _Edje_Real_Part_State::description, _Edje_Real_Part::description_pos, _Edje_Part_Description_External::external_params, _Edje_Real_Part_State::external_params, _Edje_Real_Part::param1, _Edje_Real_Part::param2, _Edje_External_Type::state_set, _Edje_Real_Part::swallowed_object, and type.
Referenced by _edje_object_file_set_internal(), and _edje_part_description_apply().
void _edje_external_shutdown | ( | ) |
Referenced by edje_init().
void _edje_external_signal_emit | ( | Evas_Object * | obj, |
const char * | emission, | ||
const char * | source | ||
) |
References _Edje_External_Type::data, ERR, _Edje_External_Type::signal_emit, and type.
Referenced by _edje_emit_full().
Evas_Object* _edje_external_type_add | ( | const char * | type_name, |
Evas * | evas, | ||
Evas_Object * | parent, | ||
const Eina_List * | params, | ||
const char * | part_name | ||
) |
References _Edje_External_Type::add, _Edje_External_Type::data, ERR, and type.
Referenced by _edje_object_file_set_internal().
EAPI Eina_Iterator* edje_external_iterator_get | ( | void | ) |
Returns an interator of all the registered EXTERNAL types.
Each item in the iterator is an Eina_Hash_Tuple
which has the type of the external in the key
and Edje_External_Type as data
.
EAPI Eina_Bool edje_external_param_bool_get | ( | const Eina_List * | params, |
const char * | key, | ||
Eina_Bool * | ret | ||
) |
Get the value of the given parameter of boolean type.
Look for the key
parameter in the params
list and return its value in ret
. If the parameter is found and is of type EDJE_EXTERNAL_PARAM_TYPE_BOOL, its value will be stored in the Eina_Bool pointed by ret
, returning EINA_TRUE. In any other case, the function returns EINA_FALSE.
- Parameters
-
params List of parameters where to look key Name of the parameter to fetch ret Eina_Bool pointer where to store the value, must not be NULL.
- Returns
- EINA_TRUE if the parameter was found and is of boolean type, EINA_FALSE otherwise.
References edje_external_param_find(), EDJE_EXTERNAL_PARAM_TYPE_BOOL, _Edje_External_Param::i, and _Edje_External_Param::type.
EAPI Eina_Bool edje_external_param_choice_get | ( | const Eina_List * | params, |
const char * | key, | ||
const char ** | ret | ||
) |
Get the value of the given parameter of choice type.
Look for the key
parameter in the params
list and return its value in ret
. If the parameter is found and is of type EDJE_EXTERNAL_PARAM_TYPE_CHOICE, its value will be stored in the string pointed by ret
, returning EINA_TRUE. In any other case, the function returns EINA_FALSE.
The string stored in ret
must not be freed or modified.
- Parameters
-
params List of parameters where to look key Name of the parameter to fetch ret String pointer where to store the value, must not be NULL.
- Returns
- EINA_TRUE if the parameter was found and is of integer type, EINA_FALSE otherwise.
References edje_external_param_find(), EDJE_EXTERNAL_PARAM_TYPE_CHOICE, _Edje_External_Param::s, and _Edje_External_Param::type.
EAPI Eina_Bool edje_external_param_double_get | ( | const Eina_List * | params, |
const char * | key, | ||
double * | ret | ||
) |
Get the value of the given parameter of double type.
Look for the key
parameter in the params
list and return its value in ret
. If the parameter is found and is of type EDJE_EXTERNAL_PARAM_TYPE_DOUBLE, its value will be stored in the double pointed by ret
, returning EINA_TRUE. In any other case, the function returns EINA_FALSE.
- Parameters
-
params List of parameters where to look key Name of the parameter to fetch ret Double pointer where to store the value, must not be NULL.
- Returns
- EINA_TRUE if the parameter was found and is of double type, EINA_FALSE otherwise.
References _Edje_External_Param::d, edje_external_param_find(), EDJE_EXTERNAL_PARAM_TYPE_DOUBLE, and _Edje_External_Param::type.
EAPI Edje_External_Param* edje_external_param_find | ( | const Eina_List * | params, |
const char * | key | ||
) |
Conevenience function to find a specific parameter in a list of them.
- Parameters
-
params The list of parameters for the external key The parameter to look for
- Returns
- The matching Edje_External_Param or NULL if it's not found.
References _Edje_External_Param::name.
Referenced by edje_external_param_bool_get(), edje_external_param_choice_get(), edje_external_param_double_get(), edje_external_param_int_get(), and edje_external_param_string_get().
EAPI const Edje_External_Param_Info* edje_external_param_info_get | ( | const char * | type_name) |
Get the array of parameters information about a type given its name.
- Note
- the type names and other strings are static, that means they are NOT translated. One must use Edje_External_Type::translate() to translate those.
- Returns
- the NULL terminated array, or
NULL
if type is unknown or it does not have any parameter information.
- See Also
- edje_external_type_get()
References _Edje_External_Type::parameters_info, and type.
Referenced by edje_edit_state_add().
EAPI Eina_Bool edje_external_param_int_get | ( | const Eina_List * | params, |
const char * | key, | ||
int * | ret | ||
) |
Get the value of the given parameter of integer type.
Look for the key
parameter in the params
list and return its value in ret
. If the parameter is found and is of type EDJE_EXTERNAL_PARAM_TYPE_INT, its value will be stored in the int pointed by ret
, returning EINA_TRUE. In any other case, the function returns EINA_FALSE.
- Parameters
-
params List of parameters where to look key Name of the parameter to fetch ret Int pointer where to store the value, must not be NULL.
- Returns
- EINA_TRUE if the parameter was found and is of integer type, EINA_FALSE otherwise.
References edje_external_param_find(), EDJE_EXTERNAL_PARAM_TYPE_INT, _Edje_External_Param::i, and _Edje_External_Param::type.
EAPI Eina_Bool edje_external_param_string_get | ( | const Eina_List * | params, |
const char * | key, | ||
const char ** | ret | ||
) |
Get the value of the given parameter of string type.
Look for the key
parameter in the params
list and return its value in ret
. If the parameter is found and is of type EDJE_EXTERNAL_PARAM_TYPE_STRING, its value will be stored in the pointer pointed by ret
, returning EINA_TRUE. In any other case, the function returns EINA_FALSE.
The string stored in ret
must not be freed or modified.
- Parameters
-
params List of parameters where to look key Name of the parameter to fetch ret String pointer where to store the value, must not be NULL.
- Returns
- EINA_TRUE if the parameter was found and is of string type, EINA_FALSE otherwise.
References edje_external_param_find(), EDJE_EXTERNAL_PARAM_TYPE_STRING, _Edje_External_Param::s, and _Edje_External_Param::type.
EAPI const char* edje_external_param_type_str | ( | Edje_External_Param_Type | type) |
Converts type identifier to string nicer representation.
This may be used to debug or other informational purposes.
- Parameters
-
type the identifier to convert.
- Returns
- the string with the string representation, or
"(unknown)"
.
References EDJE_EXTERNAL_PARAM_TYPE_BOOL, EDJE_EXTERNAL_PARAM_TYPE_CHOICE, EDJE_EXTERNAL_PARAM_TYPE_DOUBLE, EDJE_EXTERNAL_PARAM_TYPE_INT, and EDJE_EXTERNAL_PARAM_TYPE_STRING.
EAPI unsigned int edje_external_type_abi_version_get | ( | void | ) |
Return the current ABI version for Edje_External_Type structure.
Always check this number before accessing Edje_External_Type in your own software. If the number is not the same, your software may access invalid memory and crash, or just get garbage values.
- Warning
- NEVER, EVER define your own Edje_External_Type using the return of this function as it will change as Edje library (libedje.so) changes, but your type definition will not. Instead, use EDJE_EXTERNAL_TYPE_ABI_VERSION.
Summary:
- use edje_external_type_abi_version_get() to check.
- use EDJE_EXTERNAL_TYPE_ABI_VERSION to define/declare.
- Returns
- The external ABI version the Edje library was compiled with. That is, the value EDJE_EXTERNAL_TYPE_ABI_VERSION had at that moment.
References EDJE_EXTERNAL_TYPE_ABI_VERSION.
EAPI void edje_external_type_array_register | ( | const Edje_External_Type_Info * | array) |
Register a batch of types and their information.
When several types will be registered it is recommended to use this function instead of several calls to edje_external_type_register(), as it is faster.
- Note
- The contents of the array will be referenced directly for as long as the type remains registered, so both the
name
andinfo
in thearray
must be kept alive during all this period (usually, the entire program lifetime). The most common case would be to keep the array as astatic
const
type anyway.
- Parameters
-
array NULL
terminated array with type name and information. Note that type name or information are referenced directly, so they must be kept alive after this function returns!
- Returns
EINA_TRUE
on success,EINA_FALSE
on failure (like type already registered).
- See Also
- edje_external_type_register()
References _Edje_External_Type::abi_version, EDJE_EXTERNAL_TYPE_ABI_VERSION, ERR, _Edje_External_Type_Info::info, and _Edje_External_Type_Info::name.
EAPI void edje_external_type_array_unregister | ( | const Edje_External_Type_Info * | array) |
Unregister a batch of given external type previously registered.
- Parameters
-
array NULL
terminated array, should be the same as the one used to register with edje_external_type_array_register()
- See Also
- edje_external_type_unregister()
References _Edje_External_Type_Info::info, and _Edje_External_Type_Info::name.
EAPI const Edje_External_Type* edje_external_type_get | ( | const char * | type_name) |
Get the Edje_External_Type that defines an EXTERNAL type registered with the name type_name
.
EAPI Eina_Bool edje_external_type_register | ( | const char * | type_name, |
const Edje_External_Type * | type_info | ||
) |
Register a type to be used by EXTERNAL parts.
Edje supports parts of type EXTERNAL, which will call user defined functions to create and manipulate the object that's allocated in that part. This is done by expecifying in the source
property of the part the name of the external to use, which must be one registered with this function.
- Parameters
-
type_name name to register and be known by edje's "source:" parameter of "type: EXTERNAL" parts. type_info meta-information describing how to interact with it.
- Returns
EINA_TRUE
on success,EINA_FALSE
on failure (like type already registered).
References _Edje_External_Type::abi_version, EDJE_EXTERNAL_TYPE_ABI_VERSION, and ERR.
EAPI Eina_Bool edje_external_type_unregister | ( | const char * | type_name) |
Unregister a previously registered EXTERNAL type.
- Parameters
-
type_name name to unregister. It should have been registered with edje_external_type_register() before.
- Returns
EINA_TRUE
on success,EINA_FALSE
on failure (like type_name did not exist).
EAPI 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
-
obj The Edje object part The name of the part holding the EXTERNAL content A string identifying which content from the EXTERNAL to get
References _edje_external_content_get(), _edje_fetch(), _edje_real_part_recursive_get(), ERR, and _Edje_Real_Part::swallowed_object.
EAPI 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
-
obj A valid Evas_Object handle part The part name
- Returns
- The externally created object, or NULL if there is none or part is not an external.
References _edje_fetch(), _edje_real_part_recursive_get(), _edje_recalc_do(), EDJE_PART_TYPE_EXTERNAL, ERR, _Edje_Part::name, _Edje_Real_Part::part, _Edje_Real_Part::swallowed_object, and _Edje_Part::type.
EAPI 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
-
obj A valid Evas_Object handle part The part name param the 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 andparam
members are filled with information,EINA_FALSE
on errors andparam
member values are not set or valid.
References _edje_external_param_get(), _edje_fetch(), _edje_real_part_recursive_get(), ERR, and _Edje_External_Param::name.
EAPI 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
-
obj A valid Evas_Object handle part The part name param the 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_external_param_set(), _edje_fetch(), _edje_real_part_recursive_get(), ERR, and _Edje_External_Param::name.
Referenced by edje_edit_state_external_param_set().
EAPI 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
-
obj A valid Evas_Object handle part The part name param the parameter name to use.
- Returns
EDJE_EXTERNAL_PARAM_TYPE_MAX
on errors, or another value from Edje_External_Param_Type on success.
References _edje_fetch(), _edje_real_part_recursive_get(), EDJE_EXTERNAL_PARAM_TYPE_MAX, ERR, _Edje_External_Type::module_name, _Edje_External_Param_Info::name, _Edje_External_Type::parameters_info, _Edje_Real_Part::swallowed_object, type, and _Edje_External_Param_Info::type.