Edje General

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

Functions

int edje_init (void)
 Initialize the Edje library. More...
 
int edje_shutdown (void)
 Shutdown the Edje library. More...
 
void edje_fontset_append_set (const char *fonts)
 Set the edje append fontset. More...
 
char * edje_mmap_data_get (const Eina_File *f, const char *key)
 Get data from the file level data block of an edje mapped file. More...
 
char * edje_file_data_get (const char *file, const char *key)
 Get data from the file level data block of an edje file. More...
 
Eina_Bool edje_module_load (const char *module)
 Load 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)
 Get the edje append fontset. More...
 
void edje_file_cache_set (int count)
 Set the file cache size. More...
 
int edje_file_cache_get (void)
 Return the file cache size. More...
 
void edje_file_cache_flush (void)
 Clean the file cache. More...
 
void edje_collection_cache_set (int count)
 Set the collection cache size. More...
 
int edje_collection_cache_get (void)
 Return the collection cache size. More...
 
void edje_collection_cache_flush (void)
 Clean 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

int edje_init ( void  )

Initialize 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, and evas-aspect-hints.c.

References EAPI, ecore_imf_shutdown(), ecore_init(), ecore_shutdown(), eet_init(), eet_shutdown(), eina_cow_add(), eina_cow_del(), eina_init(), eina_log_domain_register(), eina_log_domain_unregister(), EINA_LOG_ERR, eina_log_timing(), eina_shutdown(), EINA_TRUE, eio_init(), eio_shutdown(), embryo_init(), and embryo_shutdown().

Referenced by edje_edit_script_program_set().

int edje_shutdown ( void  )

Shutdown 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, and evas-aspect-hints.c.

References ecore_animator_del(), ecore_imf_init(), eina_hash_find(), eina_hash_free(), eina_hash_iterator_key_new(), EINA_ITERATOR_FOREACH, eina_iterator_free(), eina_list_append(), EINA_LIST_FREE, eina_list_remove(), eina_stringshare_del(), EINA_TRUE, and evas_object_del().

void edje_fontset_append_set ( const char *  fonts)

Set the edje append fontset.

Parameters
fontsThe fontset to append.

This function sets the edje append fontset.

References EAPI.

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

Get 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 EAPI, and eina_hash_find().

Referenced by edje_file_data_get().

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

Get 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 ecore_event_handler_del(), ecore_timer_del(), EDJE_LOAD_ERROR_DOES_NOT_EXIST, EDJE_LOAD_ERROR_NONE, EDJE_LOAD_ERROR_RECURSIVE_REFERENCE, EDJE_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED, edje_mmap_data_get(), edje_module_load(), edje_object_add(), edje_object_load_error_get(), edje_object_mirrored_get(), edje_object_part_box_append(), edje_object_part_drag_page_set(), edje_object_part_drag_size_set(), edje_object_part_drag_step_set(), edje_object_part_drag_value_set(), edje_object_part_swallow(), edje_object_part_table_pack(), edje_object_part_text_set(), edje_object_part_unswallow(), edje_object_signal_emit(), edje_object_size_min_calc(), edje_object_size_min_get(), EDJE_PART_TYPE_SPACER, eet_close(), eina_array_flush(), eina_array_step_set(), eina_convert_itoa(), eina_cow_alloc(), eina_cow_free(), EINA_FALSE, eina_file_close(), eina_file_filename_get(), eina_file_open(), eina_hash_find(), eina_hash_foreach(), eina_hash_free(), eina_hash_iterator_data_new(), EINA_ITERATOR_FOREACH, eina_iterator_free(), eina_list_append(), eina_list_data_get(), EINA_LIST_FOREACH, eina_list_free(), EINA_LIST_FREE, eina_list_remove(), eina_list_sort(), eina_rbtree_delete(), EINA_RBTREE_FREE_CB, eina_strbuf_append_printf(), eina_strbuf_free(), eina_strbuf_new(), eina_strbuf_string_get(), eina_stringshare_add(), eina_stringshare_del(), eina_stringshare_ref(), EINA_TRUE, eio_monitor_del(), embryo_program_free(), EPHYSICS_CALLBACK_WORLD_UPDATE, ephysics_init(), ephysics_shutdown(), ephysics_world_del(), ephysics_world_event_callback_add(), ephysics_world_gravity_set(), ephysics_world_new(), ephysics_world_rate_set(), EVAS_ASPECT_CONTROL_BOTH, EVAS_ASPECT_CONTROL_HORIZONTAL, EVAS_ASPECT_CONTROL_NEITHER, EVAS_ASPECT_CONTROL_NONE, EVAS_ASPECT_CONTROL_VERTICAL, evas_event_freeze(), evas_event_thaw(), evas_event_thaw_eval(), evas_object_box_add(), evas_object_box_children_get(), evas_object_box_iterator_new(), evas_object_clip_set(), evas_object_clipees_get(), evas_object_color_set(), evas_object_data_get(), evas_object_data_set(), evas_object_del(), evas_object_evas_get(), evas_object_image_add(), evas_object_name_get(), evas_object_name_set(), evas_object_pass_events_set(), EVAS_OBJECT_POINTER_MODE_AUTOGRAB, EVAS_OBJECT_POINTER_MODE_NOGRAB, evas_object_pointer_mode_set(), evas_object_precise_is_inside_set(), evas_object_rectangle_add(), evas_object_repeat_events_set(), evas_object_resize(), evas_object_show(), evas_object_size_hint_align_set(), evas_object_size_hint_aspect_set(), evas_object_size_hint_max_set(), evas_object_size_hint_min_set(), evas_object_size_hint_padding_set(), evas_object_size_hint_request_set(), evas_object_size_hint_weight_set(), evas_object_smart_member_add(), evas_object_table_add(), evas_object_table_iterator_new(), evas_object_text_add(), evas_object_text_font_source_set(), evas_object_textblock_add(), evas_object_textblock_style_get(), evas_object_textblock_style_set(), and evas_object_visible_get().

Eina_Bool edje_module_load ( const char *  module)

Load 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 EAPI, EINA_FALSE, EINA_FREE_CB, eina_hash_add(), eina_hash_find(), eina_hash_free(), eina_hash_string_small_new(), eina_list_append(), EINA_LIST_FOREACH, EINA_LIST_FREE, eina_module_environment_path_get(), eina_module_free(), eina_module_load(), eina_module_new(), eina_module_symbol_path_get(), eina_stringshare_del(), and EINA_TRUE.

Referenced by edje_file_data_get().

const Eina_List* edje_available_modules_get ( void  )

Retrieves all modules that can be loaded.

Returns
A list of all loadable modules.

This function retrieves all modules that can be loaded by edje_module_load().

See also
edje_module_load().

References ecore_file_exists(), eina_file_direct_ls(), EINA_ITERATOR_FOREACH, eina_iterator_free(), eina_list_append(), EINA_LIST_FOREACH, EINA_LIST_FREE, eina_stringshare_add(), eina_stringshare_del(), _Eina_File_Direct_Info::name_start, and _Eina_File_Direct_Info::path.

const char* edje_fontset_append_get ( void  )

Get 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().

References EAPI.

void edje_file_cache_set ( int  count)

Set 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()

References EAPI.

int edje_file_cache_get ( void  )

Return 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()

References EAPI.

void edje_file_cache_flush ( void  )

Clean 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()

References EAPI.

void edje_collection_cache_set ( int  count)

Set 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 EAPI, and EINA_LIST_FOREACH.

int edje_collection_cache_get ( void  )

Return 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()

References EAPI.

void edje_collection_cache_flush ( void  )

Clean 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.