Ecore Config Create Functions

Convenience functions that set default values, bounds, option values and descriptions in one call. More...

Functions

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

Detailed Description

Convenience functions that set default values, bounds, option values and descriptions in one call.


Function Documentation

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.

Parameters:
keyThe property key.
valDefault color value of key, as a hexadecimal string.
short_optShort option used to set the property from command line.
long_optLong option used to set the property from command line.
descString description of property.
Returns:
ECORE_CONFIG_ERR_SUCC on success.

References ECORE_CONFIG_RGB, and ecore_config_typed_create().

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.

Parameters:
keyThe property key.
valDefault boolean value of key.
short_optShort option used to set the property from command line.
long_optLong option used to set the property from command line.
descString description of property.
Returns:
ECORE_CONFIG_ERR_SUCC on success.

References ECORE_CONFIG_BLN, and ecore_config_typed_create().

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.

The type of the property is guessed from the key and the value given.

Parameters:
keyThe property key.
valPointer to default value of key.
short_optShort option used to set the property from command line.
long_optLong option used to set the property from command line.
descString description of property.
Returns:
ECORE_CONFIG_ERR_SUCC on success.

References ecore_config_typed_create().

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.

Parameters:
keyThe property key.
valDefault float value of key.
short_optShort option used to set the property from command line.
long_optLong option used to set the property from command line.
descString description of property.
Returns:
ECORE_CONFIG_ERR_SUCC on success.

References ECORE_CONFIG_FLT, and ecore_config_typed_create().

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.

Parameters:
keyThe property key.
valDefault float value of key.
lowLowest valid float value for the property.
highHighest valid float value for the property.
stepIncrement value for the property.
short_optShort option used to set the property from command line.
long_optLong option used to set the property from command line.
descString description of property.
Returns:
ECORE_CONFIG_ERR_SUCC on success.

References ECORE_CONFIG_FLT, ecore_config_get(), and ecore_config_typed_create().

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.

Parameters:
keyThe property key.
valDefault integer value of key.
short_optShort option used to set the property from command line.
long_optLong option used to set the property from command line.
descString description of property.
Returns:
ECORE_CONFIG_ERR_SUCC on success.

References ECORE_CONFIG_INT, and ecore_config_typed_create().

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.

Parameters:
keyThe property key.
valDefault integer value of key.
lowLowest valid integer value for the property.
highHighest valid integer value for the property.
stepIncrement value for the property.
short_optShort option used to set the property from command line.
long_optLong option used to set the property from command line.
descString description of property.
Returns:
ECORE_CONFIG_ERR_SUCC on success.

References ecore_config_get(), ECORE_CONFIG_INT, and ecore_config_typed_create().

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.

Parameters:
keyThe property key.
valDefault value of key.
short_optShort option used to set the property from command line.
long_optLong option used to set the property from command line.
descString description of property.
Returns:
ECORE_CONFIG_ERR_SUCC on success.

References ECORE_CONFIG_STR, and ecore_config_typed_create().

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.

Parameters:
keyThe property key.
valDefault theme name for the property.
short_optShort option used to set the property from command line.
long_optLong option used to set the property from command line.
descString description of property.
Returns:
ECORE_CONFIG_ERR_SUCC on success.

References ECORE_CONFIG_THM, and ecore_config_typed_create().

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.

Parameters:
keyThe property key.
valPointer to default value of key.
typeType of the property.
short_optShort option used to set the property from command line.
long_optLong option used to set the property from command line.
descString description of property.
Returns:
ECORE_CONFIG_ERR_SUCC on success.

References ecore_config_describe(), ecore_config_long_opt_set(), and ecore_config_short_opt_set().

Referenced by ecore_config_argb_create(), ecore_config_boolean_create(), ecore_config_create(), ecore_config_float_create(), ecore_config_float_create_bound(), ecore_config_int_create(), ecore_config_int_create_bound(), ecore_config_string_create(), and ecore_config_theme_create().