Data Structures | |
struct | Ecore_Config_Prop |
The actual property for storing a key-value pair. More... | |
Typedefs | |
typedef int(*) | Ecore_Config_Listener (const char *key, const Ecore_Config_Type type, const int tag, void *data) |
Property change callback function prototype. | |
Enumerations | |
enum | Ecore_Config_Type { ECORE_CONFIG_NIL = 0, ECORE_CONFIG_INT = 1, ECORE_CONFIG_FLT = 2, ECORE_CONFIG_STR = 3, ECORE_CONFIG_RGB = 4, ECORE_CONFIG_THM = 5, ECORE_CONFIG_BLN = 6, ECORE_CONFIG_SCT = 7 } |
Valid configuration property types. More... | |
Functions | |
EAPI Ecore_Config_Prop * | ecore_config_get (const char *key) |
Returns the property with the given key. | |
EAPI const char * | ecore_config_type_get (const Ecore_Config_Prop *e) |
Returns the type of the property. | |
EAPI int | ecore_config_boolean_get (const char *key) |
Returns the specified property as an integer. | |
EAPI char * | ecore_config_string_get (const char *key) |
Returns the specified property as a string. | |
EAPI long | ecore_config_int_get (const char *key) |
Returns the specified property as a long integer. | |
EAPI int | ecore_config_argb_get (const char *key, int *a, int *r, int *g, int *b) |
Finds the alpha, red, green and blue values of a color property. | |
EAPI long | ecore_config_argbint_get (const char *key) |
Returns a color property as a long. | |
EAPI char * | ecore_config_argbstr_get (const char *key) |
Returns a color property as a string of hexadecimal characters. | |
EAPI float | ecore_config_float_get (const char *key) |
Returns the specified property as a float. | |
EAPI char * | ecore_config_theme_get (const char *key) |
Returns a theme property. | |
EAPI char * | ecore_config_as_string_get (const char *key) |
Retrieves the key as a string. | |
EAPI int | ecore_config_describe (const char *key, const char *desc) |
Sets the description field of the indicated property. | |
EAPI int | ecore_config_short_opt_set (const char *key, char short_opt) |
Set the short option character of a property. | |
EAPI int | ecore_config_long_opt_set (const char *key, const char *long_opt) |
Set the long option string of the property. | |
EAPI int | ecore_config_set (const char *key, const char *val) |
Sets the indicated property to the value indicated by val. | |
EAPI int | ecore_config_typed_set (const char *key, const void *val, int type) |
Sets the indicated property to the given value and type. | |
EAPI int | ecore_config_boolean_set (const char *key, int val) |
Sets the indicated property to the given boolean. | |
EAPI int | ecore_config_string_set (const char *key, const char *val) |
Sets the indicated property to the given string. | |
EAPI int | ecore_config_int_set (const char *key, int val) |
Sets the indicated property to the given integer. | |
EAPI int | ecore_config_argb_set (const char *key, int a, int r, int g, int b) |
Sets the indicated property to a color value. | |
EAPI int | ecore_config_argbint_set (const char *key, long argb) |
Sets the indicated property to a color value. | |
EAPI int | ecore_config_argbstr_set (const char *key, const char *val) |
Sets the indicated property to a color value. | |
EAPI int | ecore_config_float_set (const char *key, float val) |
Sets the indicated property to the given float value. | |
EAPI int | ecore_config_theme_set (const char *key, const char *val) |
Sets the indicated property to a theme name. | |
EAPI int | ecore_config_theme_preview_group_set (const char *key, const char *group) |
Sets the theme preview group of an indicated property. | |
EAPI int | ecore_config_as_string_set (const char *key, const char *val) |
Sets the indicated property to the value given in the string. | |
EAPI int | ecore_config_default (const char *key, const char *val, float lo, float hi, float step) |
Sets the indicated property if it has not already been set or loaded. | |
EAPI int | ecore_config_boolean_default (const char *key, int val) |
Sets the indicated property to the given boolean if the property has not yet been set. | |
EAPI int | ecore_config_int_default (const char *key, int val) |
Sets the indicated property to the given integer if the property has not yet been set. | |
EAPI int | ecore_config_int_default_bound (const char *key, int val, int lo, int hi, int step) |
Sets the indicated property to the given integer if the property has not yet been set. | |
EAPI int | ecore_config_string_default (const char *key, const char *val) |
Sets the indicated property to the given string if the property has not yet been set. | |
EAPI int | ecore_config_float_default (const char *key, float val) |
Sets the indicated property to the given float if the property has not yet been set. | |
EAPI int | ecore_config_float_default_bound (const char *key, float val, float lo, float hi, float step) |
Sets the indicated property to the given float if the property has not yet been set. | |
EAPI int | ecore_config_argb_default (const char *key, int a, int r, int g, int b) |
Sets the indicated property to a color value if the property has not yet been set. | |
EAPI int | ecore_config_argbint_default (const char *key, long argb) |
Sets the indicated property to a color value if the property has not yet been set. | |
EAPI int | ecore_config_argbstr_default (const char *key, const char *val) |
Sets the indicated property to a color value if the property has not yet been set. | |
EAPI int | ecore_config_theme_default (const char *key, const char *val) |
Sets the indicated property to a theme name if the property has not yet been set. | |
EAPI int | ecore_config_struct_int_add (const char *key, const char *name, int val) |
Add an int property to the named structure. | |
EAPI int | ecore_config_struct_float_add (const char *key, const char *name, float val) |
Add a float property to the named structure. | |
EAPI int | ecore_config_struct_create (const char *key) |
Sets the indicated property to a structure if the property has not yet been set. | |
EAPI int | ecore_config_struct_string_add (const char *key, const char *name, const char *val) |
Add a string property to the named structure. | |
EAPI int | ecore_config_struct_theme_add (const char *key, const char *name, const char *val) |
Add a theme property to the named structure. | |
EAPI int | ecore_config_struct_argb_add (const char *key, const char *name, int a, int r, int g, int b) |
Add an argb property to the named structure. | |
EAPI int | ecore_config_struct_boolean_add (const char *key, const char *name, int val) |
Add a boolean property to the named structure. | |
EAPI int | ecore_config_struct_get (const char *key, void *data) |
Get the contents of a defined structure property and load it into the passed C struct. | |
EAPI int | ecore_config_listen (const char *name, const char *key, Ecore_Config_Listener listener, int tag, void *data) |
Adds a callback function to the list of functions called when a property changes. | |
EAPI int | ecore_config_deaf (const char *name, const char *key, Ecore_Config_Listener listener) |
Removes a listener callback. | |
EAPI Ecore_Config_Prop * | ecore_config_dst (Ecore_Config_Prop *e) |
Removes the given property from the local configuration and destroys it. | |
EAPI int | ecore_config_type_guess (const char *key, const char *val) |
Tries to guess the type of a property. | |
EAPI Ecore_Config_Bundle * | ecore_config_bundle_new (Ecore_Config_Server *srv, const char *id) |
Creates a new Ecore_Config_Bundle. | |
EAPI Ecore_Config_Bundle * | ecore_config_bundle_1st_get (Ecore_Config_Server *srv) |
Locates the first configuration bundle on the given server. | |
EAPI Ecore_Config_Bundle * | ecore_config_bundle_next_get (Ecore_Config_Bundle *ns) |
Locates the configuration bundle after the given one. | |
EAPI Ecore_Config_Bundle * | ecore_config_bundle_by_serial_get (Ecore_Config_Server *srv, long serial) |
Locates a configuration bundle on a configuration server based on its serial number. | |
EAPI Ecore_Config_Bundle * | ecore_config_bundle_by_label_get (Ecore_Config_Server *srv, const char *label) |
Gets the Ecore_Config_Bundle with the given identifier from the given server. | |
EAPI long | ecore_config_bundle_serial_get (Ecore_Config_Bundle *ns) |
Retrieves the bundle's serial number. | |
EAPI char * | ecore_config_bundle_label_get (Ecore_Config_Bundle *ns) |
Retrieves the bundle's identifier. | |
EAPI int | ecore_config_init (const char *name) |
Initializes the Enlightened Property Library. | |
EAPI int | ecore_config_shutdown (void) |
Frees memory and shuts down the library for an application. | |
EAPI int | ecore_config_system_init (void) |
Initializes the Enlightened Property Library. | |
EAPI int | ecore_config_system_shutdown (void) |
Frees memory and shuts down the library for other programming libraries. | |
EAPI int | ecore_config_load (void) |
Loads the default configuration. | |
EAPI int | ecore_config_file_load (const char *file) |
Load the given configuration file to the local configuration. | |
EAPI int | ecore_config_save (void) |
Saves the current configuration to the default file. | |
EAPI int | ecore_config_file_save (const char *file) |
Saves the local configuration to the given file. | |
EAPI int | ecore_config_evas_font_path_apply (Evas *evas) |
Calls evas_font_path_append on evas for each of the font names stored in the property "/e/font/path". | |
EAPI char * | ecore_config_theme_search_path_get (void) |
Retrieves the search path used to find themes. | |
EAPI int | ecore_config_theme_search_path_append (char *append) |
Adds the given path to the search path used to find themes. | |
EAPI char * | ecore_config_theme_default_path_get (void) |
Retrieves the default theme search path. | |
EAPI char * | ecore_config_theme_with_path_from_name_get (char *name) |
Retrieve a theme file's full path. | |
EAPI char * | ecore_config_theme_with_path_get (const char *key) |
Retrieves the full path to the theme file of the theme stored in the given property. | |
EAPI void | ecore_config_args_display (void) |
Prints the property list of the local configuration bundle to output. | |
EAPI int | ecore_config_args_parse (void) |
Parse the arguments set by ecore_app_args_set and set properties accordingly. | |
EAPI void | ecore_config_app_describe (char *description) |
Sets the description string used by ecore_config_args_display . | |
EAPI int | ecore_config_create (const char *key, void *val, char short_opt, char *long_opt, char *desc) |
Creates a new property, if it does not already exist, and sets its attributes to those given. | |
EAPI int | ecore_config_typed_create (const char *key, void *val, int type, char short_opt, char *long_opt, char *desc) |
Creates a new property, if it does not already exist, and sets its attributes to those given. | |
EAPI int | ecore_config_boolean_create (const char *key, int val, char short_opt, char *long_opt, char *desc) |
Creates a new boolean property, if it does not already exist, and sets its attributes to those given. | |
EAPI int | ecore_config_int_create (const char *key, int val, char short_opt, char *long_opt, char *desc) |
Creates a new integer property, if it does not already exist, and sets its attributes to those given. | |
EAPI int | ecore_config_int_create_bound (const char *key, int val, int low, int high, int step, char short_opt, char *long_opt, char *desc) |
Creates a new integer property, if it does not already exist, and sets its attributes to those given. | |
EAPI int | ecore_config_string_create (const char *key, char *val, char short_opt, char *long_opt, char *desc) |
Creates a new string property, if it does not already exist, and sets its attributes to those given. | |
EAPI int | ecore_config_float_create (const char *key, float val, char short_opt, char *long_opt, char *desc) |
Creates a new float property, if it does not already exist, and sets its attributes to those given. | |
EAPI int | ecore_config_float_create_bound (const char *key, float val, float low, float high, float step, char short_opt, char *long_opt, char *desc) |
Creates a new float property, if it does not already exist, and sets its attributes to those given. | |
EAPI int | ecore_config_argb_create (const char *key, char *val, char short_opt, char *long_opt, char *desc) |
Creates a new color property, if it does not already exist, and sets its attributes to those given. | |
EAPI int | ecore_config_theme_create (const char *key, char *val, char short_opt, char *long_opt, char *desc) |
Creates a new theme property, if it does not already exist, and sets its attributes to those given. |
This file provies all headers and structs for use with Ecore_Config. Using individual header files should not be necessary.
enum Ecore_Config_Type |
Valid configuration property types.
EAPI void ecore_config_app_describe | ( | char * | description | ) |
Sets the description string used by ecore_config_args_display .
description | Description of application. |
EAPI int ecore_config_args_parse | ( | void | ) |
Parse the arguments set by ecore_app_args_set and set properties accordingly.
ECORE_CONFIG_PARSE_CONTINUE
if successful. ECORE_CONFIG_PARSE_EXIT
is returned if an unrecognised option is found. ECORE_CONFIG_PARSE_HELP
is returned if help was displayed. EAPI Ecore_Config_Bundle* ecore_config_bundle_1st_get | ( | Ecore_Config_Server * | srv | ) |
Locates the first configuration bundle on the given server.
srv | The configuration server. |
EAPI Ecore_Config_Bundle* ecore_config_bundle_by_label_get | ( | Ecore_Config_Server * | srv, | |
const char * | label | |||
) |
Gets the Ecore_Config_Bundle with the given identifier from the given server.
srv | The configuration server. | |
label | The bundle's identifier string. |
NULL
if it could not be found. EAPI Ecore_Config_Bundle* ecore_config_bundle_by_serial_get | ( | Ecore_Config_Server * | srv, | |
long | serial | |||
) |
Locates a configuration bundle on a configuration server based on its serial number.
srv | The configuration server. | |
serial | Serial number. |
EAPI char* ecore_config_bundle_label_get | ( | Ecore_Config_Bundle * | ns | ) |
Retrieves the bundle's identifier.
ns | The configuration bundle. |
EAPI Ecore_Config_Bundle* ecore_config_bundle_new | ( | Ecore_Config_Server * | srv, | |
const char * | identifier | |||
) |
Creates a new Ecore_Config_Bundle.
srv | Config server. | |
identifier | Identifier string for the new bundle. |
NULL
is returned if the structure couldn't be allocated. EAPI Ecore_Config_Bundle* ecore_config_bundle_next_get | ( | Ecore_Config_Bundle * | ns | ) |
Locates the configuration bundle after the given one.
ns | The configuration bundle. |
EAPI long ecore_config_bundle_serial_get | ( | Ecore_Config_Bundle * | ns | ) |
Retrieves the bundle's serial number.
ns | The configuration bundle. |
NULL
. EAPI int ecore_config_evas_font_path_apply | ( | Evas * | evas | ) |
Calls evas_font_path_append on evas
for each of the font names stored in the property "/e/font/path".
evas | Evas object to append the font names to. |
ECORE_CONFIG_ERR_SUCC
on success. ECORE_CONFIG_ERR_NODATA
is returned if the property has not been set. EAPI char* ecore_config_theme_default_path_get | ( | void | ) |
Retrieves the default theme search path.
EAPI int ecore_config_theme_search_path_append | ( | char * | path | ) |
Adds the given path to the search path used to find themes.
If the search path is successfully, the new search path will be saved into the property "/e/themes/search_path". Therefore, this function should be called after ecore_config_load to allow a user to override the default search path.
path | The given |
ECORE_CONFIG_ERR_SUCC
on success. ECORE_CONFIG_ERR_FAIL
will be returned if path
already exists in the search path. ECORE_CONFIG_ERR_FAIL
is returned if path
is NULL
. EAPI char* ecore_config_theme_search_path_get | ( | void | ) |
Retrieves the search path used to find themes.
The search path is stored in the property "/e/themes/search_path". If the property has not been set, the default path used is "/usr/local/share/<app_name>/themes|~/.e/apps/<app_name>/themes". See ecore_config_theme_default_path_get for more information about the default path.
NULL
is returned if there is no memory left. EAPI char* ecore_config_theme_with_path_from_name_get | ( | char * | name | ) |
Retrieve a theme file's full path.
The search path for theme files is given by ecore_config_theme_search_path_get .
name | The name of the theme. |
NULL
will be returned if name
is NULL
or no theme matching the given name could be found. EAPI char* ecore_config_theme_with_path_get | ( | const char * | key | ) |
Retrieves the full path to the theme file of the theme stored in the given property.
The search path for themes is given by ecore_config_theme_search_path_get .
key | The given property. |
NULL
on failure. This function will fail if no key is specified or not theme matching that given by the property key
could be found. EAPI int ecore_config_type_guess | ( | const char * | key, | |
const char * | val | |||
) |
Tries to guess the type of a property.
This function first checks to see if the property exists. If it does, then the type of the stored property is returned. Otherwise, the function tries to guess the type of the property based on val
.
key | The property key. | |
val | The value in string form. |
NULL
, ECORE_CONFIG_NIL
will be returned.