- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files
- Examples

Typedefs | Enumerations | Functions
Edje Object File
Edje » Edje Object

Functions to deals with EDJ files. More...

## Typedefs
typedef enum _Edje_Load_Error | Edje_Load_Error
| Edje file loading error codes one can get - see edje_load_error_str() too. More...

## Enumerations
enum | _Edje_Load_Error { EDJE_LOAD_ERROR_NONE = 0, EDJE_LOAD_ERROR_GENERIC = 1, EDJE_LOAD_ERROR_DOES_NOT_EXIST = 2, EDJE_LOAD_ERROR_PERMISSION_DENIED = 3, EDJE_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED = 4, EDJE_LOAD_ERROR_CORRUPT_FILE = 5, EDJE_LOAD_ERROR_UNKNOWN_FORMAT = 6, EDJE_LOAD_ERROR_INCOMPATIBLE_FILE = 7, EDJE_LOAD_ERROR_UNKNOWN_COLLECTION = 8, EDJE_LOAD_ERROR_RECURSIVE_REFERENCE = 9 }

## Functions
Eina_List * | edje_mmap_collection_list (Eina_File *f)
| Get a list of groups in an edje mapped file. More...
void | edje_mmap_collection_list_free (Eina_List *lst)
| Free file collection list. More...
Eina_Bool | edje_mmap_group_exists (Eina_File *f, const char *glob)
| Determine whether a group matching glob exists in an edje mapped file. More...
Eina_List * | edje_file_collection_list (const char *file)
| Get a list of groups in an edje file. More...
void | edje_file_collection_list_free (Eina_List *lst)
| Free file collection list. More...
Eina_Bool | edje_file_group_exists (const char *file, const char *glob)
| Determine whether a group matching glob exists in an edje file. More...
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. More...

## Detailed Description

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
EDJE_LOAD_ERROR_NONE | No error happened, the loading was successful.
EDJE_LOAD_ERROR_GENERIC | A generic error happened during the loading.
EDJE_LOAD_ERROR_DOES_NOT_EXIST | The file pointed to did not exist.
EDJE_LOAD_ERROR_PERMISSION_DENIED | Permission to read the given file was denied.
EDJE_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED | Resource allocation failed during the loading.
EDJE_LOAD_ERROR_CORRUPT_FILE | The file pointed to was corrupt.
EDJE_LOAD_ERROR_UNKNOWN_FORMAT | The file pointed to had an unknown format.
EDJE_LOAD_ERROR_INCOMPATIBLE_FILE | The file pointed to is incompatible, i.e., it doesn't match the library's current version's format.
EDJE_LOAD_ERROR_UNKNOWN_COLLECTION | The group/collection set to load from was not found in the file.
EDJE_LOAD_ERROR_RECURSIVE_REFERENCE | The group/collection set to load from had recursive references on its components.

## Function Documentation

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 using edje_mmap_collection_list_free() when you are done with it.

References eina_hash_iterator_key_new(), EINA_ITERATOR_FOREACH, eina_iterator_free(), eina_list_append(), and eina_stringshare_add().

Referenced by edje_file_collection_list().

void edje_mmap_collection_list_free | ( | Eina_List * | lst | ) |

Free file collection list.

Parameters

  lst | The Eina_List of groups

Frees the list returned by edje_mmap_collection_list().

References edje_file_collection_list_free().

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

References DBG, EINA_FALSE, eina_file_filename_get(), eina_hash_find(), eina_hash_iterator_data_new(), EINA_ITERATOR_FOREACH, eina_iterator_free(), eina_list_append(), eina_list_free(), and EINA_TRUE.

Referenced by edje_file_group_exists().

Eina_List* edje_file_collection_list | ( | const char * | file | ) |

Get a list of groups in an edje file.

Parameters

  file | The path to the edje file

Returns
  The Eina_List of group names (char *)

See also
  edje_mmap_collection_list()

Note: the list must be freed using edje_file_collection_list_free() when you are done with it.

See also
  edje_mmap_group_exists()

References edje_mmap_collection_list(), EINA_FALSE, eina_file_close(), and eina_file_open().

void edje_file_collection_list_free | ( | Eina_List * | lst | ) |

Free file collection list.

Parameters

  lst | The Eina_List of groups

Frees the list returned by edje_file_collection_list().

References eina_list_data_get(), eina_list_remove(), and eina_stringshare_del().

Referenced by edje_mmap_collection_list_free().

Eina_Bool edje_file_group_exists | ( | const char * | file,
|  | const char * | glob
| ) |  |

Determine whether a group matching glob exists in an edje file.

Parameters

  file | The file path
  glob | A glob to match on

Returns
  1 if a match is found, 0 otherwise

References edje_mmap_group_exists(), EINA_FALSE, eina_file_close(), and eina_file_open().

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.

Parameters

  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.

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.

Examples:
  edje-basic.c, edje-signals-messages.c, and evas-aspect-hints.c.

References EDJE_LOAD_ERROR_CORRUPT_FILE, EDJE_LOAD_ERROR_DOES_NOT_EXIST, EDJE_LOAD_ERROR_GENERIC, EDJE_LOAD_ERROR_INCOMPATIBLE_FILE, EDJE_LOAD_ERROR_NONE, EDJE_LOAD_ERROR_PERMISSION_DENIED, EDJE_LOAD_ERROR_RECURSIVE_REFERENCE, EDJE_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED, EDJE_LOAD_ERROR_UNKNOWN_COLLECTION, and EDJE_LOAD_ERROR_UNKNOWN_FORMAT.