Tizen Native API
|
Functions | |
char * | edje_file_data_get (const char *file, const char *key) |
Get data from the file level data block of an edje file. | |
Eina_List * | edje_mmap_collection_list (Eina_File *f) |
void | edje_mmap_collection_list_free (Eina_List *lst) |
Eina_Bool | edje_mmap_group_exists (Eina_File *f, const char *glob) |
Eina_List * | edje_file_collection_list (const char *file) |
Get a list of groups in an edje file. | |
void | edje_file_collection_list_free (Eina_List *lst) |
Free file collection list. | |
Eina_Bool | edje_file_group_exists (const char *file, const char *glob) |
Determine whether a group matching glob exists in an edje file. | |
const char * | edje_load_error_str (Edje_Load_Error error) |
Converts the given Edje file load error code into a string describing it in English. | |
Eina_Bool | edje_object_file_set (Eo *obj, const char *file, const char *group) |
Sets the EDJ file (and group within it) to load an Edje object's contents from. | |
void | edje_object_file_get (const Eo *obj, const char **file, const char **group) |
Get the file and group name that a given Edje object is bound to. | |
Edje_Load_Error | edje_object_load_error_get (const Edje_Object *obj) |
Gets the (last) file loading error for a given Edje object. | |
const char * | edje_object_data_get (const Edje_Object *obj, const char *key) |
Retrive an EDC data field's value from a given Edje object's group. | |
Typedefs | |
typedef enum _Edje_Load_Error | Edje_Load_Error |
Functions to deals with EDJ files.
Layouts in Edje are usually called themes and they are created using the EDC language. The EDC language is declarative and must be compiled before being used. The output of this compilation is an EDJ file, this file can be loaded by Edje, and the result is a edje object.
This groups of functions interact with these EDJ files, either by loading them or retrieving information of the EDC file about objects.
Typedef Documentation
typedef enum _Edje_Load_Error Edje_Load_Error |
Edje file loading error codes one can get - see edje_load_error_str() too.
Enumeration Type Documentation
enum _Edje_Load_Error |
- Enumerator:
Function Documentation
Eina_List* edje_file_collection_list | ( | const char * | file | ) |
Get a list of groups in an edje file.
- Since :
- 2.3
- Parameters:
-
[in] file The path to the edje file
- Returns:
- The Eina_List of group names (char *)
- Remarks:
- Note: the list must be freed using edje_file_collection_list_free() when you are done with it.
void edje_file_collection_list_free | ( | Eina_List * | lst | ) |
Free file collection list.
- Since :
- 2.3
- Parameters:
-
[in] lst The Eina_List of groups
- Remarks:
- Frees the list returned by edje_file_collection_list().
char* edje_file_data_get | ( | const char * | file, |
const char * | key | ||
) |
Get data from the file level data block of an edje file.
- Since :
- 2.3
- Parameters:
-
[in] file The path to the .edj file [in] key The data key
- Returns:
- The string value of the data or NULL if no key is found.
- Remarks:
- Must be freed by the user when no longer needed.
- If an edje file test.edj is built from the following edc:
- data { item: "key1" "value1"; item: "key2" "value2"; } collections { ... }
- Then, edje_file_data_get("test.edj", "key1") will return "value1"
Eina_Bool edje_file_group_exists | ( | const char * | file, |
const char * | glob | ||
) |
Determine whether a group matching glob exists in an edje file.
- Since :
- 2.3
- Parameters:
-
[in] file The file path [in] glob A glob to match on
- Returns:
- 1 if a match is found, 0 otherwise
const char* edje_load_error_str | ( | Edje_Load_Error | error | ) |
Converts the given Edje file load error code into a string describing it in English.
- Since :
- 2.3
- Parameters:
-
[in] error the error code, a value in Edje_Load_Error.
- Returns:
- Always returns a valid string. If the given
error
is not supported,"Unknown error"
is returned.
- Remarks:
- edje_object_file_set() is a function which sets an error value, afterwards, which can be fetched with edje_object_load_error_get(). The function in question is meant to be used in conjunction with the latter, for pretty-printing any possible error cause.
Eina_List* edje_mmap_collection_list | ( | Eina_File * | f | ) |
Get a list of groups in an edje mapped file
- Parameters:
-
f The mapped file
- Returns:
- The Eina_List of group names (char *)
Note: the list must be freed when you are done with it.
void edje_mmap_collection_list_free | ( | Eina_List * | lst | ) |
Free file collection list
- Parameters:
-
lst The Eina_List of groups
Frees the list of groups in an edje mapped file.
Eina_Bool edje_mmap_group_exists | ( | Eina_File * | f, |
const char * | glob | ||
) |
Determine whether a group matching glob exists in an edje mapped file.
- Parameters:
-
f The mapped file glob A glob to match on
- Returns:
- 1 if a match is found, 0 otherwise
const char* edje_object_data_get | ( | const Edje_Object * | obj, |
const char * | key | ||
) |
Retrive an EDC data field's value from a given Edje object's group.
- Since :
- 2.3
- Returns:
- The data's value string. Must not be freed.
- Remarks:
- This function fetches an EDC data field's value, which is declared on the objects building EDC file, under its group. EDC data blocks are most commonly used to pass arbitrary parameters from an application's theme to its code.
- They look like the following:
collections { group { name: "a_group"; data { item: "key1" "value1"; item: "key2" "value2"; } } }
- Remarks:
- EDC data fields always hold strings as values, hence the return type of this function. Check the complete edcref syntax reference for EDC files.
- Warning:
- Do not confuse this call with edje_file_data_get(), which queries for a global EDC data field on an EDC declaration file.
- See also:
- edje_object_file_set()
- Parameters:
-
[in] obj The edje object [in] key The data field's key string
void edje_object_file_get | ( | const Eo * | obj, |
const char ** | file, | ||
const char ** | group | ||
) |
Get the file and group name that a given Edje object is bound to.
- Since :
- 2.3
- Remarks:
- This gets the EDJ file's path, with the respective group set for the given Edje object. If obj is either not an Edje file, or has not had its file/group set previously, by edje_object_file_set(), then both
file
andgroup
will be set toNULL
, indicating an error.
- See also:
- edje_object_file_set()
- Remarks:
- Use
NULL
pointers on the file/group components you're not interested in: they'll be ignored by the function.
- Parameters:
-
[out] file The path to the EDJ file to load from
[out] group The name of the group, in file
, which implements an Edje object
Eina_Bool edje_object_file_set | ( | Eo * | obj, |
const char * | file, | ||
const char * | group | ||
) |
Sets the EDJ file (and group within it) to load an Edje object's contents from.
- Since :
- 2.3
- Returns:
EINA_TRUE
, on success orEINA_FALSE
, on errors (check edje_object_load_error_get() after this call to get errors causes)
- Remarks:
- Edje expects EDJ files, which are theming objects' descriptions and resources packed together in an EET file, to read Edje object definitions from. They usually are created with the
.edj extension. EDJ files, in turn, are assembled from textual object description files, where one describes Edje objects declaratively -- the EDC files (see the syntax for those files).
-
Those description files were designed so that many Edje object definitions -- also called groups (or collections) -- could be packed together in the same EDJ file, so that a whole application's theme could be packed in one file only. This is the reason for the
group
argument. - Use this function after you instantiate a new Edje object, so that you can "give him life", telling where to get its contents from.
- See also:
- edje_object_add()
- edje_object_file_get()
- Parameters:
-
[in] file The path to the EDJ file to load from
[in] group The name of the group, in file
, which implements an Edje object
Edje_Load_Error edje_object_load_error_get | ( | const Edje_Object * | obj | ) |
Gets the (last) file loading error for a given Edje object.
- Since :
- 2.3
- Returns:
- The Edje loading error, one of:
- EDJE_LOAD_ERROR_NONE
- EDJE_LOAD_ERROR_GENERIC
- EDJE_LOAD_ERROR_DOES_NOT_EXIST
- EDJE_LOAD_ERROR_PERMISSION_DENIED
- EDJE_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED
- EDJE_LOAD_ERROR_CORRUPT_FILE
- EDJE_LOAD_ERROR_UNKNOWN_FORMAT
- EDJE_LOAD_ERROR_INCOMPATIBLE_FILE
- EDJE_LOAD_ERROR_UNKNOWN_COLLECTION
- EDJE_LOAD_ERROR_RECURSIVE_REFERENCE
- Remarks:
- This function is meant to be used after an Edje EDJ file loading, what takes place with the edje_object_file_set() function. If that function does not return
EINA_TRUE
, one should check for the reason of failure with this one.
- See also:
- edje_load_error_str()
- Parameters:
-
[in] obj The edje object