Ecore_Con module documentation, timer functions cleaned up, Time functions linked into Ecore.h docs.
SVN revision: 11704
This commit is contained in:
parent
0d31f7f17b
commit
fa6db0a70e
|
@ -13,6 +13,8 @@
|
||||||
* and event handlers. Events for file descriptor events are covered in
|
* and event handlers. Events for file descriptor events are covered in
|
||||||
* @ref Ecore_FD_Handler_Group.
|
* @ref Ecore_FD_Handler_Group.
|
||||||
*
|
*
|
||||||
|
* Time functions are covered in @ref Ecore_Time_Group.
|
||||||
|
*
|
||||||
* There is also provision for callbacks for when the loop enters or
|
* There is also provision for callbacks for when the loop enters or
|
||||||
* exits an idle state. See @ref Idle_Group for more information.
|
* exits an idle state. See @ref Idle_Group for more information.
|
||||||
*
|
*
|
||||||
|
|
|
@ -4,12 +4,9 @@
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the current system time as a floating point value in seconds.
|
* Retrieves the current system time as a floating point value in seconds.
|
||||||
* @return The current time (since the epoch start) in seconds
|
* @return The number of seconds since 12.00AM 1st January 1970.
|
||||||
*
|
* @ingroup Ecore_Time_Group
|
||||||
* This function returns the current system time in seconds from 12:00am
|
|
||||||
* 1st Janruary 1970. The time is returned as a double precision floating point
|
|
||||||
* value to allow for fractions of a second to be determined.
|
|
||||||
*/
|
*/
|
||||||
double
|
double
|
||||||
ecore_time_get(void)
|
ecore_time_get(void)
|
||||||
|
|
|
@ -8,26 +8,20 @@ static int timers_delete_me = 0;
|
||||||
static Ecore_Timer *timers = NULL;
|
static Ecore_Timer *timers = NULL;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a timer to tick off in a specified time during main loop execution.
|
* @defgroup Ecore_Time_Group Ecore Time Functions
|
||||||
* @param in The number of seconds in which to expire the timer
|
*
|
||||||
* @param func The function to call when it expires
|
* Functions that deal with time. These functions include those that simply
|
||||||
* @param data The data to pass to the function
|
* retrieve it in a given format, and those that create events based on it.
|
||||||
* @return A handle to the new timer
|
*/
|
||||||
* @ingroup Ecore_Timer_Group
|
|
||||||
*
|
/**
|
||||||
* This function adds a timer and returns its handle on success and NULL on
|
* Creates a timer to call the given function in the given period of time.
|
||||||
* failure. The function @p func will be called in @p in seconds from the
|
* @param in The interval in seconds.
|
||||||
* time this function call was made. The function @p func is passed the
|
* @param func The given function. If @p func returns 1, the timer is
|
||||||
* @p data pointer as its parameter.
|
* rescheduled for the next interval @p in.
|
||||||
*
|
* @param data Data to pass to @p func when it is called.
|
||||||
* When the timer @p func is called, it must return a value of either 1 or 0.
|
* @return A timer object on success. @c NULL on failure.
|
||||||
* If it returns 1, it will be re-scheduled to repeat in the same interval
|
* @ingroup Ecore_Time_Group
|
||||||
* after this timer was triggered (ie if this timer was triggered with an
|
|
||||||
* @p in value of 1.0 then the next timer will be triggered at the time this
|
|
||||||
* timer was called plus 1.0).
|
|
||||||
*
|
|
||||||
* For more information, see the @link timer_example.c ecore_timer @endlink
|
|
||||||
* example.
|
|
||||||
*/
|
*/
|
||||||
Ecore_Timer *
|
Ecore_Timer *
|
||||||
ecore_timer_add(double in, int (*func) (void *data), const void *data)
|
ecore_timer_add(double in, int (*func) (void *data), const void *data)
|
||||||
|
@ -47,15 +41,10 @@ ecore_timer_add(double in, int (*func) (void *data), const void *data)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete the specified timer from the timer list.
|
* Delete the specified timer from the timer list.
|
||||||
* @param timer The timer to delete
|
* @param timer The timer to delete.
|
||||||
* @return The data pointer set for the timer
|
* @return The data pointer set for the timer when @ref ecore_timer_add was
|
||||||
* @ingroup Ecore_Timer_Group
|
* called. @c NULL is returned if the function is unsuccessful.
|
||||||
*
|
* @ingroup Ecore_Time_Group
|
||||||
* Delete the specified @p timer from the set of timers that are executed
|
|
||||||
* during main loop execution. This function returns the data parameter that
|
|
||||||
* was being passed to the callback on success, or NULL on failure. After this
|
|
||||||
* call returns the specified timer object @p timer is invalid and should not
|
|
||||||
* be used again. It will not get called again after deletion.
|
|
||||||
*/
|
*/
|
||||||
void *
|
void *
|
||||||
ecore_timer_del(Ecore_Timer *timer)
|
ecore_timer_del(Ecore_Timer *timer)
|
||||||
|
|
|
@ -4,6 +4,33 @@
|
||||||
/**
|
/**
|
||||||
* @file Ecore_Con.h
|
* @file Ecore_Con.h
|
||||||
* @brief Sockets functions.
|
* @brief Sockets functions.
|
||||||
|
*
|
||||||
|
* The Ecore Connection Library ( @c Ecore_Con ) provides simple mechanisms
|
||||||
|
* for communications between programs using reliable sockets. It saves
|
||||||
|
* the programmer from having to worry about file descripters and waiting
|
||||||
|
* for incoming connections.
|
||||||
|
*
|
||||||
|
* There are two main objects in the @c Ecore_Con library: the @c
|
||||||
|
* Ecore_Con_Server and the @c Ecore_Con_Client.
|
||||||
|
*
|
||||||
|
* The @c Ecore_Con_Server represents a server to connect to. It is
|
||||||
|
* represents a server that can be connected to. It is used regardless
|
||||||
|
* of whether the program is acting as a server or client itself.
|
||||||
|
*
|
||||||
|
* To create a listening server, call @c ecore_con_server_add().
|
||||||
|
*
|
||||||
|
* To connect to a server, call @c ecore_Con_server_connect(). Data can
|
||||||
|
* then be sent to the server using the @c ecore_con_server_send().
|
||||||
|
*
|
||||||
|
* Whenever a client connection is made to an @c Ecore_Con_Server, a
|
||||||
|
* @c ECORE_CON_CLIENT_ADD event is emitted. Any event callbacks that are
|
||||||
|
* called receive a @c Ecore_Con_Client object, which represents a
|
||||||
|
* connection that that particular client.
|
||||||
|
*
|
||||||
|
* Functions are described in the following groupings:
|
||||||
|
* @li @ref Ecore_Con_Lib_Group
|
||||||
|
* @li @ref Ecore_Con_Server_Group
|
||||||
|
* @li @ref Ecore_Con_Client_Group
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define HAVE_ECORE_CON_OPENSSL @USE_OPENSSL@
|
#define HAVE_ECORE_CON_OPENSSL @USE_OPENSSL@
|
||||||
|
|
Loading…
Reference in New Issue