Functions
Edje General

This group discusses functions that have general purposes or affect Edje as a whole. More...

Functions

int edje_init (void)
 Initializes the Edje library. More...
 
int edje_shutdown (void)
 Shuts down the Edje library. More...
 
void edje_fontset_append_set (const char *fonts)
 Sets the edje append fontset. More...
 
char * edje_mmap_data_get (const Eina_File *f, const char *key)
 Gets data from the file level data block of an edje mapped file. More...
 
char * edje_file_data_get (const char *file, const char *key)
 Gets data from the file level data block of an edje file. More...
 
Eina_Bool edje_module_load (const char *module)
 Loads a new module in Edje. More...
 
const Eina_Listedje_available_modules_get (void)
 Retrieves all modules that can be loaded. More...
 
const char * edje_fontset_append_get (void)
 Gets the edje append fontset. More...
 
void edje_file_cache_set (int count)
 Sets the file cache size. More...
 
int edje_file_cache_get (void)
 Returns the file cache size. More...
 
void edje_file_cache_flush (void)
 Cleans the file cache. More...
 
void edje_collection_cache_set (int count)
 Sets the collection cache size. More...
 
int edje_collection_cache_get (void)
 Returns the collection cache size. More...
 
void edje_collection_cache_flush (void)
 Cleans the collection cache. More...
 

Detailed Description

This group discusses functions that have general purposes or affect Edje as a whole.

Besides containing the initialize and shutdown functions of the library, which should always be called when we are using Edje, this module contains some other utilities that could be used in many contexts or should do their jobs independent of the context inside Edje.

Function Documentation

◆ edje_init()

int edje_init ( void  )

Initializes the Edje library.

Returns
The new init count. The initial value is zero.

This function initializes the Edje library, making the proper calls to internal initialization functions. It will also initialize its dependencies, making calls to eina_init(), ecore_init(), embryo_init() and eet_init(). So, there is no need to call those functions again, in your code. To shutdown Edje there is the function edje_shutdown().

See also
edje_shutdown()
eina_init()
ecore_init()
embryo_init()
eet_init()
Examples
edje-basic.c, edje-box.c, edje-box2.c, edje-color-class.c, edje-drag.c, edje-perspective.c, edje-signals-messages.c, edje-swallow.c, edje-table.c, edje-text.c, emotion_test_main.c, and evas-aspect-hints.c.

References ecore_init(), eet_init(), efreet_init(), eina_init(), eina_log_domain_register(), EINA_LOG_ERR, EINA_SAFETY_ON_FALSE_RETURN_VAL, embryo_init(), ERR, and evas_init().

Referenced by elm_quicklaunch_init().

◆ edje_shutdown()

int edje_shutdown ( void  )

Shuts down the Edje library.

Returns
The number of times the library has been initialized without being shutdown.

This function shuts down the Edje library. It will also call the shutdown functions of its dependencies, which are eina_shutdown(), ecore_shutdown(), embryo_shutdown() and eet_shutdown(), so there is no need to call these functions again, in your code.

See also
edje_init()
eina_shutdown()
ecore_shutdown()
embryo_shutdown()
eet_shutdown()
Examples
edje-basic.c, edje-box.c, edje-box2.c, edje-color-class.c, edje-drag.c, edje-perspective.c, edje-signals-messages.c, edje-swallow.c, edje-table.c, edje-text.c, emotion_test_main.c, and evas-aspect-hints.c.

References ERR.

Referenced by elm_quicklaunch_sub_shutdown().

◆ edje_fontset_append_set()

void edje_fontset_append_set ( const char *  fonts)

Sets the edje append fontset.

Parameters
fontsThe fontset to append.

This function sets the edje append fontset.

References eina_str_escape().

◆ edje_mmap_data_get()

char * edje_mmap_data_get ( const Eina_File f,
const char *  key 
)

Gets data from the file level data block of an edje mapped file.

Parameters
fThe mapped edje file
keyThe data key
Returns
The string value of the data, or NULL if no key is found. 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"

References eina_hash_find().

Referenced by edje_file_data_get().

◆ edje_file_data_get()

char * edje_file_data_get ( const char *  file,
const char *  key 
)

Gets data from the file level data block of an edje file.

Parameters
fileThe path to the .edj file
keyThe data key
Returns
The string value of the data, or NULL if no key is found. 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"

See also
edje_mmap_data_get()

References edje_mmap_data_get(), EINA_FALSE, eina_file_close(), eina_file_open(), and ERR.

◆ edje_module_load()

Eina_Bool edje_module_load ( const char *  module)

Loads a new module in Edje.

Parameters
moduleThe name of the module that will be added to Edje.
Returns
EINA_TRUE if the module was successfully loaded. Otherwise, EINA_FALSE.

Modules are used to add functionality to Edje. So, when a module is loaded, its functionality should be available for use.

References EINA_FALSE, and EINA_TRUE.

◆ edje_available_modules_get()

const Eina_List * edje_available_modules_get ( void  )

◆ edje_fontset_append_get()

const char * edje_fontset_append_get ( void  )

Gets the edje append fontset.

Returns
The edje append fontset.

This function returns the edje append fontset set by edje_fontset_append_set() function.

See also
edje_fontset_append_set().

◆ edje_file_cache_set()

void edje_file_cache_set ( int  count)

Sets the file cache size.

Parameters
countThe file cache size in edje file units. Default is 16.

This function sets the file cache size. Edje keeps this cache in order to prevent duplicates of edje file entries in memory. The file cache size can be retrieved with edje_file_cache_get().

See also
edje_file_cache_get()
edje_file_cache_flush()

◆ edje_file_cache_get()

int edje_file_cache_get ( void  )

Returns the file cache size.

Returns
The file cache size in edje file units. Default is 16.

This function returns the file cache size set by edje_file_cache_set().

See also
edje_file_cache_set()
edje_file_cache_flush()

◆ edje_file_cache_flush()

void edje_file_cache_flush ( void  )

Cleans the file cache.

This function cleans the file cache entries, but keeps this cache's size to the last value set.

See also
edje_file_cache_set()
edje_file_cache_get()

Referenced by elm_cache_all_flush().

◆ edje_collection_cache_set()

void edje_collection_cache_set ( int  count)

Sets the collection cache size.

Parameters
countThe collection cache size, in edje object units. Default is 16.

This function sets the collection cache size. Edje keeps this cache in order to prevent duplicates of edje {collection,group,part} entries in memory. The collection cache size can be retrieved with edje_collection_cache_get().

See also
edje_collection_cache_get()
edje_collection_cache_flush()

References EINA_LIST_FOREACH.

◆ edje_collection_cache_get()

int edje_collection_cache_get ( void  )

Returns the collection cache size.

Returns
The collection cache size, in edje object units. Default is 16.

This function returns the collection cache size set by edje_collection_cache_set().

See also
edje_collection_cache_set()
edje_collection_cache_flush()

◆ edje_collection_cache_flush()

void edje_collection_cache_flush ( void  )

Cleans the collection cache.

This function cleans the collection cache, but keeps this cache's size to the last value set.

See also
edje_collection_cache_set()
edje_collection_cache_get()

References EINA_LIST_FOREACH.

Referenced by elm_cache_all_flush().