more docs from nicholas curran

SVN revision: 10170
This commit is contained in:
atmosphere 2004-05-12 14:40:08 +00:00 committed by atmosphere
parent 67a93c6f68
commit 3bf171d7d0
9 changed files with 720 additions and 356 deletions

View File

@ -18,9 +18,64 @@ These routines are used for Ecore Library interaction
@author Chris Ross <chris\@darkrock.co.uk>
@author Term <term\@twistedpath.org>
@author Tilman Sauerbeck <tilman\@code-monkey.de>
@date 2000-2003
@date 2000-2004
@section intro Introduction
Ecore is a library of convenience functions.
Currently, Ecore provides the following modules:
@li @ref Ecore_Main_Loop_Page
@li @ref Ecore_Config_Page
@li @ref X_Window_System_Page
@section compiling How to compile using Ecore?
This section has to be documented. Below is just a quick line to handle all
Ecore modules at once.
@verbatim
gcc *.c \
-I/usr/local/include -I/usr/X11R6/include \
-L/usr/local/lib -L/usr/X11R6/lib \
-lecore -lecore_evas -lecore_x -lecore_fb -lecore_job \
`evas-config --cflags --libs`
@endverbatim
@section install How is it installed?
Suggested configure options for evas for a Linux desktop X display:
@verbatim
./configure \
--enable-ecore-x \
--enable-ecore-fb \
--enable-ecore-evas \
--enable-ecore-evas-gl \
--enable-ecore-job \
--enable-ecore-con \
--enable-ecore-ipc \
--enable-ecore-txt
make CFLAGS="-O9 -mpentiumpro -march=pentiumpro -mcpu=pentiumpro"
@endverbatim
@section tutorial Ecore Tutorial
You will find a more comprehensive @ref tut here, going through many examples
with tips and hints as to how best do some things.
@todo (1.0) Document API
*/
/** @page tut Ecore Tutorial
Here is a tutotial for using Ecore...
*/
/**
@page Ecore_Main_Loop_Page The Ecore Main Loop
@section intro What is Ecore?
@ -141,125 +196,198 @@ things, but in principle, programs don't get any more complex. You add more
event handlers, for more events, will have more timers and such, BUT it all
follows the same principles as shown in this example.
@section compiling How to compile using Ecore?
This section has to be documented. Below is just a quick line to handle all
Ecore modules at once.
@verbatim
gcc *.c \
-I/usr/local/include -I/usr/X11R6/include \
-L/usr/local/lib -L/usr/X11R6/lib \
-lecore -lecore_evas -lecore_x -lecore_fb -lecore_job \
`evas-config --cflags --libs`
@endverbatim
@section install How is it installed?
Suggested configure options for evas for a Linux desktop X display:
@verbatim
./configure \
--enable-ecore-x \
--enable-ecore-fb \
--enable-ecore-evas \
--enable-ecore-evas-gl \
--enable-ecore-job \
--enable-ecore-con \
--enable-ecore-ipc \
--enable-ecore-txt
make CFLAGS="-O9 -mpentiumpro -march=pentiumpro -mcpu=pentiumpro"
@endverbatim
@section tutorial Ecore Tutorial
You will find a more comprehensive @ref tut here, going through many examples
with tips and hints as to how best do some things.
@todo (1.0) Document API
*/
/** @page tut Ecore Tutorial
Here is a tutotial for using Ecore...
*/
/**
@page The Enlightened Property Library
@page Ecore_Config_Page The Enlightened Property Library
The Enlightened Property Library (Ecore_Config) is an adbstraction
from the complexities of writing your own configuration. It provides
many features using the Enlightenment 17 development libraries.
To use the library, you:
@li Set the default values of your properties.
@li Load the configuration from a file. You must set the default values
first, so that the library knows the correct type of each argument.
See @ref config_basic_example.c for an example.
*/
*/
/**
@page Ecore_ADT_Page Ecore Abstract Data Types
This page briefly describes the different abstract data types
that are provided by the Ecore library for general usage. You need to
include the @link Ecore_Data.h Ecore_Data.h @endlink to use them.
@section Ecore_ADT_List List
A list is a simple data type where one each piece of data points to
another piece of data.
Associated modules include the following:
@li @ref Ecore_Data_List_Add_Item_Group
@section Ecore_ADT_DList Doubly Linked List
A doubly linked list is like a linked list, only each piece of data
can also point to the piece before it.
@section Ecore_ADT_Hash Hash
@todo Finish this.
*/
/**
@page X_Window_System_Page X Window System
The Ecore library includes a wrapper for handling the X window system.
This page briefly explains what the X window system is and various terms
that are used.
*/
// GROUP DEFINITIONS
/**
* @defgroup Ecore_Main_Loop_Group Main Loop Functions
*
* Functions used to control the main loop.
@defgroup Ecore_Main_Loop_Group Main Loop Functions
Functions used to control the main loop.
*/
/**
@defgroup Ecore_Timer_Group Ecore Timer
The timer allows callbacks to be called at specific intervals.
*/
/**
* @defgroup Ecore_Timer_Group Ecore Timer
*
* The timer allows callbacks to be called at specific intervals.
*/
@defgroup Ecore_Job_Group Ecore Jobs
You can queue jobs that are to be done by the main loop when the current
event is dealt with.
*/
/**
* @defgroup Idle_Group Idle Handlers
*
* Callbacks that are called when the program enters or exits an idle state.
*
* The ecore main loop enters an idle state when it is waiting for
* timers to time out, data to come in on a file descriptor or any
* other event to occur. You can set callbacks to be called when the
* main loop enters an idle state, during an idle state or just after
* the program wakes up.
*
* Enterer callbacks are good for updating your program's state, if it
* has a state engine. Once all of the enterer handlers are called,
* the program will enter a "sleeping" state.
*
* Idler callbacks are called when the main loop has called all
* enterer handlers. They are useful for interfaces that require
* polling and timers would be too slow to use.
*
* If no idler callbacks are specified, then the process literally
* goes to sleep. Otherwise, the idler callbacks are called
* continuously while the loop is "idle", using as much CPU as is
* available to the process.
*
* Exiter callbacks are called when the main loop wakes up from an idle
* state.
*/
@defgroup Idle_Group Idle Handlers
Callbacks that are called when the program enters or exits an idle state.
The ecore main loop enters an idle state when it is waiting for timers
to time out, data to come in on a file descriptor or any other event
to occur. You can set callbacks to be called when the main loop
enters an idle state, during an idle state or just after the program
wakes up.
Enterer callbacks are good for updating your program's state, if it
has a state engine. Once all of the enterer handlers are called, the
program will enter a "sleeping" state.
Idler callbacks are called when the main loop has called all enterer
handlers. They are useful for interfaces that require polling and
timers would be too slow to use.
If no idler callbacks are specified, then the process literally goes
to sleep. Otherwise, the idler callbacks are called continuously
while the loop is "idle", using as much CPU as is available to the
process.
Exiter callbacks are called when the main loop wakes up from an idle
state.
*/
/**
@defgroup Ecore_Data_List_Creation_Group List Creation/Destruction Functions
Functions that create, initialize and destory Ecore_Lists.
*/
/**
@defgroup Ecore_Data_List_Add_Item_Group List Item Adding Functions
Functions that are used to add nodes to an Ecore_List.
*/
/**
@defgroup Ecore_Data_List_Remove_Item_Group List Item Removing Functions
Functions that remove nodes from an Ecore_List.
*/
/**
@defgroup Ecore_Data_List_Traverse_Group List Traversal Functions
Functions that can be used to traverse an Ecore_List.
*/
/**
@defgroup Ecore_Data_List_Node_Group List Node Functions
Functions that are used in the creation, maintenance and destruction of
Ecore_List nodes.
*/
/**
@defgroup Ecore_Config_Lib_Group Ecore Config Library Functions
Functions that are used to start up and shutdown the Ecore Configuration
Library.
*/
/**
@defgroup Ecore_Config_Property_Group Ecore Config Property Functions
Functions that retrieve or set the attributes relating to a property.
*/
/**
@defgroup Ecore_Config_Get_Group Ecore Config Retrievers
Functions that return the value of a property, based on its key.
*/
/**
@defgroup Ecore_Config_Default_Group Ecore Config Defaults
Functions that are used to set the default values of properties.
*/
/**
@defgroup Ecore_Config_Create_Group Ecore Config Create Functions
Convenience functions that set default values, bounds, option values and
descriptions in one call.
*/
/**
@defgroup Ecore_Config_Set_Group Ecore Config Setters
Functions that set the value of a property.
*/
/**
@defgroup Ecore_Config_Listeners_Group Ecore Config Listeners
Functions that set and unset property listener callbacks.
*/
/**
@defgroup Ecore_Config_File_Group Ecore Config File Functions
Functions that are used to load and save properties from and to files.
*/
// EXAMPLES
/**
* @example args_example.c
* Shows how to set and retrieve the program arguments.
*/
@example args_example.c
Shows how to set and retrieve the program arguments.
*/
/**
* @example event_handler_example.c
* Shows how to use event handlers.
*/
@example event_handler_example.c
Shows how to use event handlers.
*/
/**
* @example timer_example.c

View File

@ -1,6 +1,6 @@
## Process this file with automake to produce Makefile.in
bin_PROGRAMS = \
noinst_PROGRAMS = \
timer_example \
event_handler_example \
args_example \

View File

@ -31,7 +31,6 @@ int timer1_tick(void *data) {
int main(int argc, char **argv) {
ecore_init();
ecore_app_args_set(argc, argv);
timer1 = ecore_timer_add(5.0, timer1_tick, data1);
timer2 = ecore_timer_add(0.5, timer2_tick, data2);
timer3 = ecore_timer_add(1.0, timer3_tick, data3);

View File

@ -202,8 +202,9 @@ _ecore_list_find(void *in_list, void *in_item)
/* XXX: End deprecated code */
/**
* @brief Create and initialize a new list.
* @return Returns a new initialized list on success, NULL on failure.
* Create and initialize a new list.
* @return A new initialized list on success, @c NULL on failure.
* @ingroup Ecore_Data_List_Creation_Group
*/
Ecore_List *ecore_list_new()
{
@ -222,9 +223,10 @@ Ecore_List *ecore_list_new()
}
/**
* @brief Initialize a list to some sane starting values.
* @param list: the list to initialize
* @return Returns FALSE if an error occurs, TRUE if successful
* Initialize a list to some sane starting values.
* @param list The list to initialize.
* @return @c TRUE if successful, @c FALSE if an error occurs.
* @ingroup Ecore_Data_List_Creation_Group
*/
int ecore_list_init(Ecore_List *list)
{
@ -238,9 +240,9 @@ int ecore_list_init(Ecore_List *list)
}
/**
* @brief Free a list and all of it's nodes.
* @param list: the list to be freed
* @return Returns no value
* Free a list and all of it's nodes.
* @param list The list to be freed.
* @ingroup Ecore_Data_List_Creation_Group
*/
void ecore_list_destroy(Ecore_List * list)
{
@ -263,10 +265,11 @@ void ecore_list_destroy(Ecore_List * list)
}
/**
* @brief Set the function for freeing data
* @param list: the list that will use this function when nodes are destroyed.
* @param free_func: the function that will free the key data
* @return Returns TRUE on successful set, FALSE otherwise.
* Set the function for freeing data.
* @param list The list that will use this function when nodes are
* destroyed.
* @param free_func The function that will free the key data.
* @return @c TRUE on successful set, @c FALSE otherwise.
*/
int ecore_list_set_free_cb(Ecore_List * list, Ecore_Free_Cb free_func)
{
@ -282,9 +285,9 @@ int ecore_list_set_free_cb(Ecore_List * list, Ecore_Free_Cb free_func)
}
/**
* @brief Checks the list for any nodes.
* @param list: the list to check for nodes
* @return Returns TRUE if no nodes in list, FALSE if the list contains nodes
* Checks the list for any nodes.
* @param list The list to check for nodes
* @return @c TRUE if no nodes in list, @c FALSE if the list contains nodes
*/
int ecore_list_is_empty(Ecore_List * list)
{
@ -303,9 +306,9 @@ int ecore_list_is_empty(Ecore_List * list)
}
/**
* @brief Returns the number of the current node
* @param list: the list to return the number of the current node
* @return Returns the number of the current node in the list.
* Returns the number of the current node.
* @param list The list to return the number of the current node.
* @return The number of the current node in the list.
*/
int ecore_list_index(Ecore_List * list)
{
@ -323,9 +326,9 @@ int ecore_list_index(Ecore_List * list)
}
/**
* @brief Find the number of nodes in the list.
* @param list: the list to find the number of nodes
* @return Returns the number of nodes in the list.
* Find the number of nodes in the list.
* @param list The list to find the number of nodes
* @return The number of nodes in the list.
*/
int ecore_list_nodes(Ecore_List * list)
{
@ -343,10 +346,11 @@ int ecore_list_nodes(Ecore_List * list)
}
/**
* @brief Append data to the list.
* @param list The list to append @a data
* @param data The data to append to @a list.
* @return FALSE if an error occurs, TRUE if appended successfully
* Append data to the list.
* @param list The list.
* @param data The data to append.
* @return @c FALSE if an error occurs, @c TRUE if appended successfully
* @ingroup Ecore_Data_List_Add_Item_Group
*/
inline int ecore_list_append(Ecore_List * list, void *data)
{
@ -390,9 +394,10 @@ static int _ecore_list_append_0(Ecore_List * list, Ecore_List_Node *end)
/**
* Prepend data to the beginning of the list.
* @param list The list to prepend @a data.
* @param data The data to prepend to @a list.
* @return FALSE if an error occurs, TRUE if prepended successfully
* @param list The list.
* @param data The data to prepend.
* @return @c FALSE if an error occurs, @c TRUE if prepended successfully.
* @ingroup Ecore_Data_List_Add_Item_Group
*/
inline int ecore_list_prepend(Ecore_List * list, void *data)
{
@ -433,9 +438,10 @@ static int _ecore_list_prepend_0(Ecore_List * list, Ecore_List_Node *start)
/**
* Insert data at the current point in the list.
* @param list The list to hold the inserted @a data.
* @param data The data to insert into @a list.
* @return FALSE if there is an error, TRUE on success
* @param list The list to hold the inserted @p data.
* @param data The data to insert into @p list.
* @return @c FALSE if there is an error, @c TRUE on success
* @ingroup Ecore_Data_List_Add_Item_Group
*/
inline int ecore_list_insert(Ecore_List * list, void *data)
{
@ -494,9 +500,10 @@ static int _ecore_list_insert(Ecore_List * list, Ecore_List_Node *new_node)
}
/**
* @brief Remove the current item from the list.
* @param list: the list to remove the current item
* @return Returns a pointer to the removed data on success, NULL on failure.
* Remove the current item from the list.
* @param list The list to remove the current item
* @return A pointer to the removed data on success, @c NULL on failure.
* @ingroup Ecore_Data_List_Remove_Item_Group
*/
inline void *ecore_list_remove(Ecore_List * list)
{
@ -556,9 +563,10 @@ static void *_ecore_list_remove_0(Ecore_List * list)
}
/**
* @brief Remove and free the data in lists current position
* @param list: the list to remove and free the current item
* @return Returns TRUE on success, FALSE on error
* Remove and free the data in lists current position.
* @param list The list to remove and free the current item.
* @return @c TRUE on success, @c FALSE on error
* @ingroup Ecore_Data_List_Remove_Item_Group
*/
int ecore_list_remove_destroy(Ecore_List *list)
{
@ -577,9 +585,11 @@ int ecore_list_remove_destroy(Ecore_List *list)
}
/**
* @brief Remove the first item from the list.
* @param list: the list to remove the current item
* @return Returns a pointer to the removed data on success, NULL on failure.
* Remove the first item from the list.
* @param list The list to remove the current item
* @return Returns a pointer to the removed data on success, @c NULL on
* failure.
* @ingroup Ecore_Data_List_Remove_Item_Group
*/
inline void *ecore_list_remove_first(Ecore_List * list)
{
@ -635,9 +645,10 @@ static void *_ecore_list_remove_first(Ecore_List * list)
}
/**
* @brief Remove the last item from the list.
* @param list: the list to remove the last node from
* @return Returns a pointer to the removed data on success, NULL on failure.
* Remove the last item from the list.
* @param list The list to remove the last node from
* @return A pointer to the removed data on success, @c NULL on failure.
* @ingroup Ecore_Data_List_Remove_Item_Group
*/
inline void *ecore_list_remove_last(Ecore_List * list)
{
@ -698,10 +709,11 @@ static void *_ecore_list_remove_last(Ecore_List * list)
}
/**
* @brief Move the current item to the index number
* @param list: the list to move the current item
* @param index: the position to move the current item
* @return Returns a pointer to new current item on success, NULL on failure.
* Make the current item the item with the given index number.
* @param list The list.
* @param index The position to move the current item.
* @return A pointer to new current item on success, @c NULL on failure.
* @ingroup Ecore_Data_List_Traverse_Group
*/
inline void *ecore_list_goto_index(Ecore_List * list, int index)
{
@ -741,11 +753,11 @@ static void *_ecore_list_goto_index(Ecore_List *list, int index)
}
/**
* @brief Move the current item to the node that contains data
* @param list: the list to move the current item in
* @param data: the data to find and set the current item to
*
* @return Returns a pointer to @a data on success, NULL on failure.
* Make the current item the node that contains @p data.
* @param list The list.
* @param data The data to find.
* @return A pointer to @p data on success, @c NULL on failure.
* @ingroup Ecore_Data_List_Traverse_Group
*/
inline void *ecore_list_goto(Ecore_List * list, void *data)
{
@ -799,9 +811,10 @@ static void *_ecore_list_goto(Ecore_List * list, void *data)
}
/**
* @brief Move the current pointer to the first item in the list
* @param list: the list to move the current pointer in
* @return Returns a pointer to the first item on success, NULL on failure
* Make the current item the first item in the list
* @param list The list.
* @return A pointer to the first item on success, @c NULL on failure
* @ingroup Ecore_Data_List_Traverse_Group
*/
inline void *ecore_list_goto_first(Ecore_List *list)
{
@ -831,9 +844,10 @@ static void *_ecore_list_goto_first(Ecore_List * list)
}
/**
* @brief Move the pointer to current to the last item in the list
* @param list: the list to move the current pointer in
* @return Returns a pointer to the last item on success, NULL on failure.
* Make the current item the last item in the list.
* @param list The list.
* @return A pointer to the last item on success, @c NULL on failure.
* @ingroup Ecore_Data_List_Traverse_Group
*/
inline void *ecore_list_goto_last(Ecore_List * list)
{
@ -861,9 +875,9 @@ static void *_ecore_list_goto_last(Ecore_List * list)
}
/**
* @brief Retrieve the data in the current node
* @param list: the list to retrieve the current data from
* @return Returns the data at current position, can be NULL.
* Retrieve the data pointed to by the current item in @p list.
* @param list The list.
* @return Returns the data at current position, can be @c NULL.
*/
inline void *ecore_list_current(Ecore_List * list)
{
@ -892,10 +906,10 @@ static void *_ecore_list_current(Ecore_List * list)
}
/**
* @brief Retrieve the data at the current node and move to the next
* @param list: the list to move to the next item
*
* @return Returns the current item in the list on success, NULL on failure.
* Retrieve the data pointed to by the current item, and make the next item
* the current item.
* @param list The list to retrieve data from.
* @return The current item in the list on success, @c NULL on failure.
*/
inline void *ecore_list_next(Ecore_List * list)
{
@ -936,11 +950,11 @@ static void *_ecore_list_next(Ecore_List * list)
}
/**
* @brief Remove all nodes from the list
* @param list: the list that will have it's nodes removed
* @return Returns TRUE on success, FALSE on error.
*
* The data for each item on the list is not freed by ecore_list_clear.
* Remove all nodes from @p list.
* @param list The list.
* @return Returns @c TRUE on success, @c FALSE on error.
* @note The data for each item on the list is not freed by
* @c ecore_list_clear().
*/
int ecore_list_clear(Ecore_List * list)
{
@ -957,11 +971,11 @@ int ecore_list_clear(Ecore_List * list)
}
/**
* @brief Execute function for each node in the list.
* @param list: the list to retrieve nodes from.
* @param function: The function to pass each node from the list to.
*
* @return Returns TRUE on success, FALSE on failure.
* Execute function for each node in @p list.
* @param list The list.
* @param function The function to pass each node from @p list to.
* @return Returns @c TRUE on success, @c FALSE on failure.
* @ingroup Ecore_Data_List_Traverse_Group
*/
int ecore_list_for_each(Ecore_List *list, Ecore_For_Each function)
{
@ -1005,7 +1019,11 @@ int ecore_list_node_init(Ecore_List_Node * node)
return TRUE;
}
/* Allocate and initialize a new list node */
/**
* Allocate and initialize a new list node
* @return A new Ecore_List_Node on success, @c NULL otherwise.
* @ingroup Ecore_Data_List_Node_Group
*/
Ecore_List_Node *ecore_list_node_new()
{
Ecore_List_Node *new_node;
@ -1020,7 +1038,13 @@ Ecore_List_Node *ecore_list_node_new()
return new_node;
}
/* Here we actually call the function to free the data and free the node */
/**
* Here we actually call the function to free the data and free the node
* @param node Node to destroy.
* @param free_func Function to call if @p node points to data to free.
* @return @c TRUE.
* @ingroup Ecore_Data_List_Node_Group
*/
int ecore_list_node_destroy(Ecore_List_Node * node, Ecore_Free_Cb free_func)
{
CHECK_PARAM_POINTER_RETURN("node", node, FALSE);

View File

@ -10,6 +10,22 @@ extern int ecore_config_bound(Ecore_Config_Prop * e);
/* shorthand prop setup code to make client apps a little smaller ;) */
/**
* 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.
*
* @param key The property key.
* @param val Pointer to default value of key.
* @param short_opt Short option used to set the property from command
* line.
* @param long_opt Long option used to set the property from command line.
* @param desc String description of property.
* @return @c ECORE_CONFIG_ERR_SUCC on success.
* @ingroup Ecore_Config_Create_Group
*/
int
ecore_config_create(const char *key, void *val, char short_opt, char *long_opt,
char *desc)
@ -19,6 +35,19 @@ ecore_config_create(const char *key, void *val, char short_opt, char *long_opt,
return ecore_config_typed_create(key, val, type, short_opt, long_opt, desc);
}
/**
* Creates a new property, if it does not already exist, and sets its
* attributes to those given.
* @param key The property key.
* @param val Pointer to default value of key.
* @param type Type of the property.
* @param short_opt Short option used to set the property from
* command line.
* @param long_opt Long option used to set the property from command line.
* @param desc String description of property.
* @return @c ECORE_CONFIG_ERR_SUCC on success.
* @ingroup Ecore_Config_Create_Group
*/
int
ecore_config_typed_create(const char *key, void *val, int type, char short_opt,
char *long_opt, char *desc)
@ -38,6 +67,18 @@ ecore_config_typed_create(const char *key, void *val, int type, char short_opt,
return ret;
}
/**
* Creates a new integer property, if it does not already exist, and sets its
* attributes to those given.
* @param key The property key.
* @param val Default integer value of key.
* @param short_opt Short option used to set the property from command
* line.
* @param long_opt Long option used to set the property from command line.
* @param desc String description of property.
* @return @c ECORE_CONFIG_ERR_SUCC on success.
* @ingroup Ecore_Config_Create_Group
*/
int
ecore_config_int_create(const char *key, int val, char short_opt,
char *long_opt, char *desc)
@ -47,6 +88,21 @@ ecore_config_int_create(const char *key, int val, char short_opt,
desc);
}
/**
* Creates a new integer property, if it does not already exist, and sets its
* attributes to those given.
* @param key The property key.
* @param val Default integer value of key.
* @param low Lowest valid integer value for the property.
* @param high Highest valid integer value for the property.
* @param step Increment value for the property.
* @param short_opt Short option used to set the property from command
* line.
* @param long_opt Long option used to set the property from command line.
* @param desc String description of property.
* @return @c ECORE_CONFIG_ERR_SUCC on success.
* @ingroup Ecore_Config_Create_Group
*/
int
ecore_config_int_create_bound(const char *key, int val, int low, int high,
int step, char short_opt, char *long_opt,
@ -72,6 +128,18 @@ ecore_config_int_create_bound(const char *key, int val, int low, int high,
return ret;
}
/**
* Creates a new string property, if it does not already exist, and sets its
* attributes to those given.
* @param key The property key.
* @param val Default value of key.
* @param short_opt Short option used to set the property from command
* line.
* @param long_opt Long option used to set the property from command line.
* @param desc String description of property.
* @return @c ECORE_CONFIG_ERR_SUCC on success.
* @ingroup Ecore_Config_Create_Group
*/
int
ecore_config_string_create(const char *key, char *val, char short_opt,
char *long_opt, char *desc)
@ -81,6 +149,18 @@ ecore_config_string_create(const char *key, char *val, char short_opt,
desc);
}
/**
* Creates a new float property, if it does not already exist, and sets its
* attributes to those given.
* @param key The property key.
* @param val Default float value of key.
* @param short_opt Short option used to set the property from command
* line.
* @param long_opt Long option used to set the property from command line.
* @param desc String description of property.
* @return @c ECORE_CONFIG_ERR_SUCC on success.
* @ingroup Ecore_Config_Create_Group
*/
int
ecore_config_float_create(const char *key, float val, char short_opt,
char *long_opt, char *desc)
@ -90,6 +170,21 @@ ecore_config_float_create(const char *key, float val, char short_opt,
desc);
}
/**
* Creates a new float property, if it does not already exist, and sets its
* attributes to those given.
* @param key The property key.
* @param val Default float value of key.
* @param low Lowest valid float value for the property.
* @param high Highest valid float value for the property.
* @param step Increment value for the property.
* @param short_opt Short option used to set the property from command
* line.
* @param long_opt Long option used to set the property from command line.
* @param desc String description of property.
* @return @c ECORE_CONFIG_ERR_SUCC on success.
* @ingroup Ecore_Config_Create_Group
*/
int
ecore_config_float_create_bound(const char *key, float val, float low,
float high, float step, char short_opt,
@ -113,6 +208,18 @@ ecore_config_float_create_bound(const char *key, float val, float low,
return ret;
}
/**
* Creates a new color property, if it does not already exist, and sets its
* attributes to those given.
* @param key The property key.
* @param val Default color value of key, as a hexadecimal string.
* @param short_opt Short option used to set the property from command
* line.
* @param long_opt Long option used to set the property from command line.
* @param desc String description of property.
* @return @c ECORE_CONFIG_ERR_SUCC on success.
* @ingroup Ecore_Config_Create_Group
*/
int
ecore_config_rgb_create(const char *key, char *val, char short_opt,
char *long_opt, char *desc)
@ -122,6 +229,18 @@ ecore_config_rgb_create(const char *key, char *val, char short_opt,
desc);
}
/**
* Creates a new theme property, if it does not already exist, and sets its
* attributes to those given.
* @param key The property key.
* @param val Default theme name for the property.
* @param short_opt Short option used to set the property from command
* line.
* @param long_opt Long option used to set the property from command line.
* @param desc String description of property.
* @return @c ECORE_CONFIG_ERR_SUCC on success.
* @ingroup Ecore_Config_Create_Group
*/
int
ecore_config_theme_create(const char *key, char *val, char short_opt,
char *long_opt, char *desc)
@ -134,10 +253,10 @@ ecore_config_theme_create(const char *key, char *val, char short_opt,
/* this should only be built if evas is present */
/**
* Calls evas_font_path_append on @evas for each of the font names stored
* Calls evas_font_path_append on @p evas for each of the font names stored
* in the property "/e/font/path".
* @param evas Evas object to append the font names to.
* @return ECORE_CONFIG_ERR_SUCC on success. ECORE_CONFIG_ERR_NODATA
* @return @c ECORE_CONFIG_ERR_SUCC on success. @c ECORE_CONFIG_ERR_NODATA
* is returned if the property has not been set.
*/
int
@ -206,7 +325,7 @@ ecore_config_args_display(void)
}
}
int
static int
ecore_config_parse_set(Ecore_Config_Prop * prop, char *arg, char *opt,
char opt2)
{
@ -223,6 +342,15 @@ ecore_config_parse_set(Ecore_Config_Prop * prop, char *arg, char *opt,
return ECORE_CONFIG_PARSE_CONTINUE;
}
/**
* Parse the arguments set by @ref ecore_app_args_set and set properties
* accordingly.
*
* @return 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.
*/
int
ecore_config_args_parse(void)
{
@ -331,6 +459,10 @@ ecore_config_args_parse(void)
return ECORE_CONFIG_PARSE_CONTINUE;
}
/**
* Sets the description string used by @ref ecore_config_args_display .
* @param description Description of application.
*/
void
ecore_config_app_describe(char *description)
{

View File

@ -27,7 +27,7 @@ static char *_ecore_config_type[] =
/**
* Removes the given property from the local configuration and destroys it.
* @param e Property to destroy.
* @return NULL
* @return @c NULL
*/
Ecore_Config_Prop *
ecore_config_dst(Ecore_Config_Prop * e)
@ -78,11 +78,11 @@ ecore_config_dst(Ecore_Config_Prop * e)
}
/**
* Returns the property of the config bundle with the given key.
* @param t Ecore_Config_Bundle to search.
* @param key The unique name of the wanted property.
* @return The property that corresponds to tnhe given key. NULL if the key
* could not be found.
* Returns the property with the given key.
* @param key The unique name of the wanted property.
* @return The property that corresponds to the given key. @c NULL if the
* key could not be found.
* @ingroup Ecore_Config_Get_Group
*/
Ecore_Config_Prop *
ecore_config_get(const char *key)
@ -108,6 +108,7 @@ ecore_config_get(const char *key)
* @param e Property to get the type of.
* @returns The type of the property. If the property is invalid, then the
* string "not found" is returned.
* @ingroup Ecore_Config_Property_Group
*/
const char *
ecore_config_type_get(const Ecore_Config_Prop * e)
@ -121,8 +122,9 @@ ecore_config_type_get(const Ecore_Config_Prop * e)
/**
* Obtains the data pointed to by the specified property.
* @param key The property key.
* @return Data pointer used by the property.
* @param key The property key.
* @return Data pointer used by the property.
* @ingroup Ecore_Config_Get_Group
*/
void *
ecore_config_data_get(const char *key)
@ -136,9 +138,10 @@ ecore_config_data_get(const char *key)
/**
* Returns the specified property as a string.
* @param key The property key.
* @return The string value of the property. The function returns NULL if the
* property is not a string or is not set.
* @param key The property key.
* @return The string value of the property. The function returns @c NULL if
* the property is not a string or is not set.
* @ingroup Ecore_Config_Get_Group
*/
char *
ecore_config_string_get(const char *key)
@ -151,9 +154,10 @@ ecore_config_string_get(const char *key)
/**
* Returns the specified property as a long integer.
* @param key The property key.
* @return The integer value of the property. The function returns 0 if the
* property is not an integer or is not set.
* @param key The property key.
* @return The integer value of the property. The function returns 0 if the
* property is not an integer or is not set.
* @ingroup Ecore_Config_Get_Group
*/
long
ecore_config_int_get(const char *key)
@ -166,9 +170,10 @@ ecore_config_int_get(const char *key)
/**
* Returns the specified property as a float.
* @param key The property key.
* @return The float value of the property. The function returns 0.0 if the
* property is not a float or is not set.
* @param key The property key.
* @return The float value of the property. The function returns 0.0 if the
* property is not a float or is not set.
* @ingroup Ecore_Config_Get_Group
*/
float
ecore_config_float_get(const char *key)
@ -183,12 +188,13 @@ ecore_config_float_get(const char *key)
/**
* Finds the red, green and blue values of a color property.
* @param key The property key.
* @param r A pointer to an integer to store the red value into.
* @param g A pointer to an integer to store the green value into.
* @param b A pointer to an integer to store the blue value into.
* @return @a ECORE_CONFIG_ERR_SUCC on success. @a ECORE_CONFIG_ERR_FAIL
* otherwise.
* @param key The property key.
* @param r A pointer to an integer to store the red value into.
* @param g A pointer to an integer to store the green value into.
* @param b A pointer to an integer to store the blue value into.
* @return @c ECORE_CONFIG_ERR_SUCC on success. @c ECORE_CONFIG_ERR_FAIL
* otherwise.
* @ingroup Ecore_Config_Get_Group
*/
int
ecore_config_rgb_get(const char *key, int *r, int *g, int *b)
@ -209,8 +215,9 @@ ecore_config_rgb_get(const char *key, int *r, int *g, int *b)
/**
* Returns a color property as a string of hexadecimal characters.
* @param key The property key.
* @return A string of hexadecimal characters in the format #rrggbb.
* @param key The property key.
* @return A string of hexadecimal characters in the format #rrggbb.
* @ingroup Ecore_Config_Get_Group
*/
char *
ecore_config_rgbstr_get(const char *key)
@ -224,9 +231,10 @@ ecore_config_rgbstr_get(const char *key)
/**
* Returns a theme property.
* @param key The property key.
* @return The name of the theme the property refers to. The function returns
* NULL if the property is not a theme or is not set.
* @param key The property key.
* @return The name of the theme the property refers to. The function returns
* @c NULL if the property is not a theme or is not set.
* @ingroup Ecore_Config_Get_Group
*/
char *
ecore_config_theme_get(const char *key)
@ -239,9 +247,10 @@ ecore_config_theme_get(const char *key)
/**
* Retrieves the key as a string.
* @param key The property key.
* @return Returns a character array in the form of 'key:type=value'. NULL is
* returned if the property does not exist.
* @param key The property key.
* @return Returns a character array in the form of 'key:type=value'. @c NULL
* is returned if the property does not exist.
* @ingroup Ecore_Config_Get_Group
*/
char *
ecore_config_as_string_get(const char *key)
@ -346,12 +355,12 @@ ecore_config_bound(Ecore_Config_Prop * e)
*
* 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 @a val.
* to guess the type of the property based on @p val.
*
* @param key The property key.
* @param val The value in string form.
* @return The type of the property determined by the function. Note that if
* val is NULL, PT_NIL will be returned.
* val is @c NULL, @c PT_NIL will be returned.
*/
int
ecore_config_type_guess(const char *key, char *val)
@ -504,8 +513,9 @@ ecore_config_add(const char *key, char *val)
* Sets the description field of the indicated property.
* @param key The property key.
* @param desc Description string.
* @note The description string is copied for the property's use. You can
* free @a desc once this function is called.
* @note The description string is copied for the property's use. You can
* free @p desc once this function is called.
* @ingroup Ecore_Config_Property_Group
*/
int
ecore_config_describe(const char *key, char *desc)
@ -518,6 +528,14 @@ ecore_config_describe(const char *key, char *desc)
return ECORE_CONFIG_ERR_SUCC;
}
/**
* Set the short option character of a property.
* @param key The property key.
* @param short_opt Character used to indicate the value of a property
* given on the command line.
* @return @c ECORE_CONFIG_ERR_SUCC on success. @c ECORE_CONFIG_ERR_NODATA
* is returned if the property does not exist.
*/
int
ecore_config_short_opt_set(const char *key, char short_opt)
{
@ -529,6 +547,14 @@ ecore_config_short_opt_set(const char *key, char short_opt)
return ECORE_CONFIG_ERR_SUCC;
}
/**
* Set the long option string of the property.
* @param key The property key.
* @param long_opt String used to indicate the value of a property given
* on the command line.
* @return @c ECORE_CONFIG_ERR_SUCC on success. @c ECORE_CONFIG_ERR_NODATA
* is returned if the property does not exist.
*/
int
ecore_config_long_opt_set(const char *key, char *long_opt)
{
@ -544,11 +570,10 @@ ecore_config_long_opt_set(const char *key, char *long_opt)
/**
* Sets the indicated property to the given value and type.
* @param t Configuration bundle to use.
* @param key The property key.
* @param val A pointer to the value to set the property to.
* @param type The type of the property.
* @return ECORE_CONFIG_ERR_SUCC if the property is set successfully.
* @return @c ECORE_CONFIG_ERR_SUCC if the property is set successfully.
*/
int
ecore_config_typed_set(const char *key, void *val, int type)
@ -573,7 +598,7 @@ ecore_config_typed_set(const char *key, void *val, int type)
if ((ret = ecore_config_typed_val(e, val, type)) == ECORE_CONFIG_ERR_SUCC)
{
for (l = e->listeners; l; l = l->next)
l->listener(e->key, e->type, l->tag, l->data);
l->listener(e->key, e->type, l->tag, l->data);
}
else
{
@ -587,10 +612,10 @@ ecore_config_typed_set(const char *key, void *val, int type)
/**
* Sets the indicated property to the value indicated by @a val.
* @param t Configuration bundle to use.
* @param key The property key.
* @param val String representation of value to set.
* @return ECORE_CONFIG_ERR_SUCC if the property is set successfully.
* @param key The property key.
* @param val String representation of value to set.
* @return @c ECORE_CONFIG_ERR_SUCC if the property is set successfully.
* @ingroup Ecore_Config_Set_Group
*/
int
ecore_config_set(const char *key, char *val)
@ -616,9 +641,10 @@ ecore_config_set(const char *key, char *val)
/**
* Sets the indicated property to the value given in the string.
* @param key The property key.
* @param val String representation of the value.
* @return ECORE_CONFIG_ERR_SUCC if the property is set successfully.
* @param key The property key.
* @param val String representation of the value.
* @return @c ECORE_CONFIG_ERR_SUCC if the property is set successfully.
* @ingroup Ecore_Config_Set_Group
*/
int
ecore_config_as_string_set(const char *key, char *val)
@ -628,9 +654,10 @@ ecore_config_as_string_set(const char *key, char *val)
/**
* Sets the indicated property to the given integer.
* @param key The property key.
* @param val Integer to set the property to.
* @return ECORE_CONFIG_ERR_SUCC if the property is set successfully.
* @param key The property key.
* @param val Integer to set the property to.
* @return @c ECORE_CONFIG_ERR_SUCC if the property is set successfully.
* @ingroup Ecore_Config_Set_Group
*/
int
ecore_config_int_set(const char *key, int val)
@ -640,9 +667,10 @@ ecore_config_int_set(const char *key, int val)
/**
* Sets the indicated property to the given string.
* @param key The property key.
* @param val String to set the property to.
* @return ECORE_CONFIG_ERR_SUCC if the property is set successfully.
* @param key The property key.
* @param val String to set the property to.
* @return @c ECORE_CONFIG_ERR_SUCC if the property is set successfully.
* @ingroup Ecore_Config_Set_Group
*/
int
ecore_config_string_set(const char *key, char *val)
@ -652,9 +680,10 @@ ecore_config_string_set(const char *key, char *val)
/**
* Sets the indicated property to the given float value.
* @param key The property key.
* @param val Float to set the property to.
* @return ECORE_CONFIG_ERR_SUCC if the property is set successfully.
* @param key The property key.
* @param val Float to set the property to.
* @return @c ECORE_CONFIG_ERR_SUCC if the property is set successfully.
* @ingroup Ecore_Config_Set_Group
*/
int
ecore_config_float_set(const char *key, float val)
@ -664,9 +693,10 @@ ecore_config_float_set(const char *key, float val)
/**
* Sets the indicated property to a color value.
* @param key The property key
* @param val Color value in RGB format.
* @return ECORE_CONFIG_ERR_SUCC if the property is set successfully.
* @param key The property key
* @param val Color value in RGB format.
* @return @c ECORE_CONFIG_ERR_SUCC if the property is set successfully.
* @ingroup Ecore_Config_Set_Group
*/
int
ecore_config_rgb_set(const char *key, char *val)
@ -676,9 +706,10 @@ ecore_config_rgb_set(const char *key, char *val)
/**
* Sets the indicated property to a theme name.
* @param key The property key.
* @param val String giving the name of the theme.
* @return ECORE_CONFIG_ERR_SUCC if the property is set successfully.
* @param key The property key.
* @param val String giving the name of the theme.
* @return @c ECORE_CONFIG_ERR_SUCC if the property is set successfully.
* @ingroup Ecore_Config_Set_Group
*/
int
ecore_config_theme_set(const char *key, char *val)
@ -688,9 +719,10 @@ ecore_config_theme_set(const char *key, char *val)
/**
* Sets the theme preview group of an indicated property.
* @param key The property key.
* @param group The group name.
* @return ECORE_CONFIG_ERR_SUCC on success.
* @param key The property key.
* @param group The group name.
* @return @c ECORE_CONFIG_ERR_SUCC on success.
* @ingroup Ecore_Config_Set_Group
*/
int
ecore_config_theme_preview_group_set(const char *key, char *group)
@ -735,14 +767,15 @@ ecore_config_typed_default(const char *key, void *val, int type)
/**
* Sets the indicated property if it has not already been set or loaded.
* @param key The property key.
* @param val Default value of the key.
* @param lo Lowest valid value for the key.
* @param hi Highest valid value for the key.
* @param step Used by integer and float values.
* @return ECORE_CONFIG_ERR_SUCC if there are no errors.
* @note The lo, hi and step parameters are only used when storing integer and
* float properties.
* @param key The property key.
* @param val Default value of the key.
* @param lo Lowest valid value for the key.
* @param hi Highest valid value for the key.
* @param step Used by integer and float values.
* @return @c ECORE_CONFIG_ERR_SUCC if there are no errors.
* @note The @p lo, @p hi and @p step parameters are only used when storing
* integer and float properties.
* @ingroup Ecore_Config_Default_Group
*/
int
ecore_config_default(const char *key, char *val, float lo, float hi, float step)
@ -779,9 +812,10 @@ ecore_config_default(const char *key, char *val, float lo, float hi, float step)
/**
* Sets the indicated property to the given integer if the property has not yet
* been set.
* @param key The property key.
* @param val Integer to set the value to.
* @return ECORE_CONFIG_ERR_SUCC if there are no problems.
* @param key The property key.
* @param val Integer to set the value to.
* @return @c ECORE_CONFIG_ERR_SUCC if there are no problems.
* @ingroup Ecore_Config_Default_Group
*/
int
ecore_config_int_default(const char *key, int val)
@ -795,12 +829,13 @@ ecore_config_int_default(const char *key, int val)
*
* The bounds and step values are set regardless.
*
* @param key The property key.
* @param val Integer to set the property to.
* @param low Lowest valid integer value for the property.
* @param high Highest valid integer value for the property.
* @param step Increment value for the property.
* @return ECORE_CONFIG_ERR_SUCC if there were no problems.
* @param key The property key.
* @param val Integer to set the property to.
* @param low Lowest valid integer value for the property.
* @param high Highest valid integer value for the property.
* @param step Increment value for the property.
* @return @c ECORE_CONFIG_ERR_SUCC if there were no problems.
* @ingroup Ecore_Config_Default_Group
*/
int
ecore_config_int_default_bound(const char *key, int val, int low, int high,
@ -826,9 +861,10 @@ ecore_config_int_default_bound(const char *key, int val, int low, int high,
/**
* Sets the indicated property to the given string if the property has not yet
* been set.
* @param key The property key.
* @param val String to set the property to.
* @return ECORE_CONFIG_ERR_SUCC if there were no problems.
* @param key The property key.
* @param val String to set the property to.
* @return @c ECORE_CONFIG_ERR_SUCC if there were no problems.
* @ingroup Ecore_Config_Default_Group
*/
int
ecore_config_string_default(const char *key, char *val)
@ -839,9 +875,10 @@ ecore_config_string_default(const char *key, char *val)
/**
* Sets the indicated property to the given float if the property has not yet
* been set.
* @param key The property key.
* @param val Float to set the property to.
* @return ECORE_CONFIG_ERR_SUCC if there were no problems.
* @param key The property key.
* @param val Float to set the property to.
* @return @c ECORE_CONFIG_ERR_SUCC if there were no problems.
* @ingroup Ecore_Config_Default_Group
*/
int
ecore_config_float_default(const char *key, float val)
@ -855,12 +892,13 @@ ecore_config_float_default(const char *key, float val)
*
* The bounds and step values are set regardless.
*
* @param key The property key.
* @param val Float to set the property to.
* @param low Lowest valid integer value for the property.
* @param high Highest valid float value for the property.
* @param step Increment value for the property.
* @return ECORE_CONFIG_ERR_SUCC if there were no problems.
* @param key The property key.
* @param val Float to set the property to.
* @param low Lowest valid integer value for the property.
* @param high Highest valid float value for the property.
* @param step Increment value for the property.
* @return @c ECORE_CONFIG_ERR_SUCC if there were no problems.
* @ingroup Ecore_Config_Default_Group
*/
int
ecore_config_float_default_bound(const char *key, float val, float low,
@ -888,7 +926,8 @@ ecore_config_float_default_bound(const char *key, float val, float low,
* been set.
* @param key The property key.
* @param val Color value in RGB format.
* @return ECORE_CONFIG_ERR_SUCC if there are no problems.
* @return @c ECORE_CONFIG_ERR_SUCC if there are no problems.
* @ingroup Ecore_Config_Default_Group
*/
int
ecore_config_rgb_default(const char *key, char *val)
@ -899,9 +938,10 @@ ecore_config_rgb_default(const char *key, char *val)
/**
* Sets the indicated property to a theme name if the property has not yet
* been set.
* @param key The property key.
* @param val String giving the name of the theme.
* @return ECORE_CONFIG_ERR_SUCC if the property is set successfully.
* @param key The property key.
* @param val String giving the name of the theme.
* @return @c ECORE_CONFIG_ERR_SUCC if the property is set successfully.
* @ingroup Ecore_Config_Default_Group
*/
int
ecore_config_theme_default(const char *key, char *val)
@ -912,12 +952,13 @@ ecore_config_theme_default(const char *key, char *val)
/**
* Adds a callback function to the list of functions called when a property
* changes.
* @param name Name of the callback.
* @param key The key of the property to listen to.
* @param listener Listener callback function.
* @param tag Tag to pass to the callback when it is called.
* @param data Data to pass to the callback when it is called.
* @return ECORE_CONFIG_ERR_SUCC if successful in setting up the callback.
* @param name Name of the callback.
* @param key The key of the property to listen to.
* @param listener Listener callback function.
* @param tag Tag to pass to @p listener when it is called.
* @param data Data to pass to @p listener when it is called.
* @return @c ECORE_CONFIG_ERR_SUCC if successful in setting up the callback.
* @ingroup Ecore_Config_Listeners_Group
*/
int
ecore_config_listen(const char *name, const char *key,
@ -980,10 +1021,11 @@ ecore_config_listen(const char *name, const char *key,
* @param name Name of the callback to remove.
* @param key The property key the callback is listening to.
* @param listener The callback function to remove.
* @return ECORE_CONFIG_ERR_SUCC if successful in removing the callback.
* @return @c ECORE_CONFIG_ERR_SUCC if successful in removing the callback.
* If no callback matches the given parameters, then
* ECORE_CONFIG_ERR_NOTFOUND is returned. If NULL is passed for NULL,
* ECORE_CONFIG_ERR_NODATA is returned.
* @c ECORE_CONFIG_ERR_NOTFOUND is returned. If @c NULL is passed
* for the key pointer, @c ECORE_CONFIG_ERR_NODATA is returned.
* @ingroup Ecore_Config_Listeners_Group
*/
int
ecore_config_deaf(const char *name, const char *key,
@ -1077,8 +1119,8 @@ ecore_config_bundle_by_serial_get(Ecore_Config_Server * srv, long serial)
* server.
* @param srv The configuration server.
* @param label The bundle's identifier string.
* @return The bundle with the given identifier string, or NULL if it could not
* be found.
* @return The bundle with the given identifier string, or @c NULL if it
* could not be found.
*/
Ecore_Config_Bundle *
ecore_config_bundle_by_label_get(Ecore_Config_Server * srv, const char *label)
@ -1099,7 +1141,7 @@ ecore_config_bundle_by_label_get(Ecore_Config_Server * srv, const char *label)
/**
* Retrieves the bundle's serial number.
* @param ns The configuration bundle.
* @return The bundle's identifier string, or -1 if ns is NULL.
* @return The bundle's identifier string, or -1 if ns is @c NULL.
*/
long
ecore_config_bundle_serial_get(Ecore_Config_Bundle * ns)
@ -1122,7 +1164,7 @@ ecore_config_bundle_label_get(Ecore_Config_Bundle * ns)
* Creates a new Ecore_Config_Bundle.
* @param srv Config server.
* @param identifier Identifier string for the new bundle.
* @return A pointer to a new Ecore_Config_Bundle. NULL is returned if the
* @return A pointer to a new Ecore_Config_Bundle. @c NULL is returned if the
* structure couldn't be allocated.
*/
Ecore_Config_Bundle *
@ -1198,14 +1240,15 @@ ecore_config_init_global(char *name)
/**
* Initializes the Enlightened Property Library.
*
* This function must be run before any other function in the Enlightened
* Property Library, even if you have run ecore_init(). The name given is
* used to determine the default configuration to load.
* This function must be run before any other function in the
* Enlightened Property Library, even if you have run @ref ecore_init .
* The name given is used to determine the default configuration to
* load.
*
* @param name Application name
* @return ECORE_CONFIG_ERR_SUCC if the library is successfully set up.
* ECORE_CONFIG_ERR_FAIL otherwise.
* @todo FIXME in here to, er, fix.
* @return @c ECORE_CONFIG_ERR_SUCC if the library is successfully set up.
* @c ECORE_CONFIG_ERR_FAIL otherwise.
* @ingroup Ecore_Config_Lib_Group
*/
int
ecore_config_init(char *name)
@ -1252,7 +1295,8 @@ ecore_config_init(char *name)
/**
* Frees memory and shuts down the library.
* @return ECORE_CONFIG_ERR_IGNORED
* @return @c ECORE_CONFIG_ERR_IGNORED
* @ingroup Ecore_Config_Lib_Group
*/
int
ecore_config_shutdown(void)

View File

@ -12,8 +12,9 @@
/**
* Loads the default configuration.
* @return ECORE_CONFIG_ERR_SUCC on success. ECORE_CONFIG_ERR_NODATA is
* returned if the file cannot be loaded.
* @return @c ECORE_CONFIG_ERR_SUCC on success. @c ECORE_CONFIG_ERR_NODATA
* is returned if the file cannot be loaded.
* @ingroup Ecore_Config_File_Group
*/
int
ecore_config_load(void)
@ -27,8 +28,10 @@ ecore_config_load(void)
/**
* Saves the current configuration to the default file.
* @return ECORE_CONFIG_ERR_SUCC is returned on success.
* ECORE_CONFIG_ERR_FAIL is returned if the data cannot be saved.
* @return @c ECORE_CONFIG_ERR_SUCC is returned on success.
* @c ECORE_CONFIG_ERR_FAIL is returned if the data cannot be
* saved.
* @ingroup Ecore_Config_File_Group
*/
int
ecore_config_save(void)
@ -42,9 +45,10 @@ ecore_config_save(void)
/**
* Load the given configuration file to the local configuration.
* @param file Name of the file to load.
* @return ECORE_CONFIG_ERR_SUCC on success. ECORE_CONFIG_ERR_NODATA is
* returned if the file cannot be loaded.
* @param file Name of the file to load.
* @return @c ECORE_CONFIG_ERR_SUCC on success. @c ECORE_CONFIG_ERR_NODATA
* is returned if the file cannot be loaded.
* @ingroup Ecore_Config_File_Group
*/
int
ecore_config_file_load(char *file)
@ -160,9 +164,11 @@ _ecore_config_recurse_mkdir(char *file)
/**
* Saves the local configuration to the given file.
* @param file Name of the file to save to.
* @return ECORE_CONFIG_ERR_SUCC is returned on success.
* ECORE_CONFIG_ERR_FAIL is returned if the data cannot be saved.
* @param file Name of the file to save to.
* @return @c ECORE_CONFIG_ERR_SUCC is returned on success.
* @c ECORE_CONFIG_ERR_FAIL is returned if the data cannot be
* saved.
* @ingroup Ecore_Config_File_Group
*/
int
ecore_config_file_save(char *file)

View File

@ -8,15 +8,14 @@ static int _ecore_job_event_handler(void *data, int type, void *ev);
static int ecore_event_job_type = 0;
/**
* Add a job to the event queue
* @param func The function to be called when the job gets handled
* @param data The data to be passed to the job function
* @return A job handle
*
* Add a job to the queue to be executed by the event system later on and
* return a pointer to the job handle. When the job is to be executed, the
* function @p func is called and passed the pointer @p data. once the job has
* been executed the job handle is no longer valid.
* Add a job to the event queue.
* @param func The function to call when the job gets handled.
* @param data Data pointer to be passed to the job function when the job is
* handled.
* @return The handle of the job. @c NULL is returned if the job could not be
* added to the queue.
* @ingroup Ecore_Job_Group
* @note Once the job has been executed, the job handle is invalid.
*/
Ecore_Job *
ecore_job_add(void (*func) (void *data), const void *data)
@ -44,12 +43,10 @@ ecore_job_add(void (*func) (void *data), const void *data)
}
/**
* Delete a queued job
* @param job The job to delete
* @return The data pointer to be passed to the job
*
* This removed a job from the queue (if it hasn't been executed yet) and
* returns the data pointer that was to be passed to it.
* Delete a queued job that has not yet been executed.
* @param job Handle of the job to delete.
* @return The data pointer that was to be passed to the job.
* @ingroup Ecore_Job_Group
*/
void *
ecore_job_del(Ecore_Job *job)

View File

@ -210,11 +210,19 @@ int ECORE_X_LOCK_NUM = 0;
int ECORE_X_LOCK_CAPS = 0;
/**
* Init the X display connection.
* @param name Display target name
* @return greater than 1 on success, 0 on failure
*
* Set up an X display connection and event handlers for event processing
* @defgroup Ecore_X_Init_Group Ecore X Library Init and Shutdown Functions
*
* Functions that start and shut down the Ecore X Library.
*/
/**
* Initialize the X display connection to the given display.
*
* @param name Display target name. If @c NULL, the default display is
* assumed.
* @return The number of times the library has been initialized without
* being shut down. 0 is returned if an error occurs.
* @ingroup Ecore_X_Init_Group
*/
int
ecore_x_init(const char *name)
@ -476,10 +484,14 @@ ecore_x_init(const char *name)
}
/**
* Shut down the X syystem.
* @return The number of times ecore X has left to be shut down
*
* This closes the X display connection and removes the handlers for it.
* Shuts down the Ecore X library.
*
* In shutting down the library, the X display connection is terminated
* and any event handlers for it are removed.
*
* @return The number of times the library has been initialized without
* being shut down.
* @ingroup Ecore_X_Init_Group
*/
int
ecore_x_shutdown(void)
@ -501,10 +513,15 @@ ecore_x_shutdown(void)
}
/**
* Get the X display pointer handle.
* @return The X Display handle
*
* This returns the X Display handle used for the X connection.
* @defgroup Ecore_X_Display_Attr_Group Ecore X Display Attributes
*
* Functions that set and retrieve X display attributes.
*/
/**
* Retrieves the Ecore_X_Display handle used for the current X connection.
* @return The current X display.
* @ingroup Ecore_X_Display_Attr_Group
*/
Ecore_X_Display *
ecore_x_display_get(void)
@ -513,10 +530,9 @@ ecore_x_display_get(void)
}
/**
* Get the X display fd.
* @return The X Display fd
*
* This returns the X Display file descriptor.
* Retrieves the X display file descriptor.
* @return The current X display file descriptor.
* @ingroup Ecore_X_Display_Attr_Group
*/
int
ecore_x_fd_get(void)
@ -525,12 +541,14 @@ ecore_x_fd_get(void)
}
/**
* Set the timeout for double/triple click to be flagged.
* @param t The time in seconds
* Set the timeout for a double and triple clicks to be flagged.
*
* This sets the time between clicks before the double_click flag is set in a
* button down event. If 3 clicks occur within double this time then the
* triple_click flag is also set.
* This sets the time between clicks before the double_click flag is
* set in a button down event. If 3 clicks occur within double this
* time, the triple_click flag is also set.
*
* @param t The time in seconds
* @ingroup Ecore_X_Display_Attr_Group
*/
void
ecore_x_double_click_time_set(double t)
@ -540,10 +558,12 @@ ecore_x_double_click_time_set(double t)
}
/**
* Get the double/triple click timeout.
* @return The timeout for double clicks in seconds
*
* This returns the tiemout that can be set by ecore_x_double_click_time_set()
* Get the double and triple click flag timeout.
*
* See @ref ecore_x_double_click_time_set for more information.
*
* @return The timeout for double clicks in seconds.
* @ingroup Ecore_X_Display_Attr_Group
*/
double
ecore_x_double_click_time_get(void)
@ -552,9 +572,15 @@ ecore_x_double_click_time_get(void)
}
/**
* Flush the command buffer.
*
* This flushes the x command buffer
* @defgroup Ecore_X_Flush_Group Ecore X Synchronization Functions
*
* Functions that ensure that all commands that have been issued by the
* Ecore X library have been sent to the server.
*/
/**
* Sends all X commands in the X Display buffer.
* @ingroup Ecore_X_Flush_Group
*/
void
ecore_x_flush(void)
@ -563,9 +589,9 @@ ecore_x_flush(void)
}
/**
* Sync with the server.
*
* This flushes the command buffer and waits for a round trip from the server
* Flushes the command buffer and waits until all requests have been
* processed by the server.
* @ingroup Ecore_X_Flush_Group
*/
void
ecore_x_sync(void)
@ -574,13 +600,13 @@ ecore_x_sync(void)
}
/**
* Kill all clients under a specified root window.
* @param root The root window whose children will be killed.
* Kill all clients with subwindows under a given window.
*
* This function will start from the given root window and kill the owner of
* every child window under it. To kill all clients connected to an X server,
* use the ecore_x_window_root_list() function to obtain an array of root
* windows, and then pass each window to this function.
* You can kill all clients connected to the X server by using
* @ref ecore_x_window_root_list to get a list of root windows, and
* then passing each root window to this function.
*
* @param root The window whose children will be killed.
*/
void
ecore_x_killall(Ecore_X_Window root)
@ -804,6 +830,14 @@ ecore_x_drawable_depth_get(Ecore_X_Drawable d)
return (int) depth_ret;
}
/**
* Get a list of all the root windows on the server.
*
* @note The returned array will need to be freed after use.
* @param num_ret Pointer to integer to put number of windows returned in.
* @return An array of all the root windows. @c NULL is returned if memory
* could not be allocated for the list, or if @p num_ret is @c NULL.
*/
Ecore_X_Window *
ecore_x_window_root_list(int *num_ret)
{