add animator runtime stuff to run animator for fixed timelength and an
[profile/ivi/ecore.git] / src / lib / ecore / Ecore.h
1 #ifndef _ECORE_H
2 #define _ECORE_H
3
4 #ifdef _MSC_VER
5 # include <Evil.h>
6 #endif
7
8 #include <Eina.h>
9
10 #ifdef EAPI
11 # undef EAPI
12 #endif
13
14 #ifdef _WIN32
15 # ifdef EFL_ECORE_BUILD
16 #  ifdef DLL_EXPORT
17 #   define EAPI __declspec(dllexport)
18 #  else
19 #   define EAPI
20 #  endif /* ! DLL_EXPORT */
21 # else
22 #  define EAPI __declspec(dllimport)
23 # endif /* ! EFL_ECORE_BUILD */
24 #else
25 # ifdef __GNUC__
26 #  if __GNUC__ >= 4
27 #   define EAPI __attribute__ ((visibility("default")))
28 #  else
29 #   define EAPI
30 #  endif
31 # else
32 #  define EAPI
33 # endif
34 #endif /* ! _WIN32 */
35
36 #ifdef _WIN32
37 # include <winsock2.h>
38 #elif (defined (__FreeBSD__) && (__FreeBSD_version >= 420001)) || defined (__OpenBSD__)
39 # include <sys/select.h>
40 # include <signal.h>
41 #else
42 # include <sys/time.h>
43 # include <signal.h>
44 #endif
45
46 #include <sys/types.h>
47
48 #ifdef __cplusplus
49 extern "C" {
50 #endif
51
52   /**
53    * @file Ecore.h
54    * @defgroup Ecore_Group Ecore - Main Loop and Job Functions.
55    * @brief The file that provides the program utility, main loop and timer
56    *        functions.
57    *
58    * This header provides the Ecore event handling loop.  For more
59    * details, see @ref Ecore_Main_Loop_Group.
60    *
61    * For the main loop to be of any use, you need to be able to add events
62    * and event handlers.  Events for file descriptor events are covered in
63    * @ref Ecore_FD_Handler_Group.
64    *
65    * Time functions are covered in @ref Ecore_Time_Group.
66    *
67    * There is also provision for callbacks for when the loop enters or
68    * exits an idle state. See @ref Idle_Group for more information.
69    *
70    * Functions are also provided for spawning child processes using fork.
71    * See @ref Ecore_Exe_Group for more details.
72    *
73    * @{
74    */
75
76 #define ECORE_VERSION_MAJOR 1
77 #define ECORE_VERSION_MINOR 0
78
79    typedef struct _Ecore_Version
80      {
81         int major;
82         int minor;
83         int micro;
84         int revision;
85      } Ecore_Version;
86    
87    EAPI extern Ecore_Version *ecore_version;
88
89 #define ECORE_CALLBACK_CANCEL EINA_FALSE /**< Return value to remove a callback */
90 #define ECORE_CALLBACK_RENEW EINA_TRUE  /**< Return value to keep a callback */
91
92 #define ECORE_CALLBACK_PASS_ON EINA_TRUE /**< Return value to pass event to next handler */
93 #define ECORE_CALLBACK_DONE EINA_FALSE /**< Return value to stop event handling */
94
95 #define ECORE_EVENT_NONE            0
96 #define ECORE_EVENT_SIGNAL_USER     1 /**< User signal event */
97 #define ECORE_EVENT_SIGNAL_HUP      2 /**< Hup signal event */
98 #define ECORE_EVENT_SIGNAL_EXIT     3 /**< Exit signal event */
99 #define ECORE_EVENT_SIGNAL_POWER    4 /**< Power signal event */
100 #define ECORE_EVENT_SIGNAL_REALTIME 5 /**< Realtime signal event */
101 #define ECORE_EVENT_COUNT           6
102
103 #define ECORE_EXE_PRIORITY_INHERIT 9999
104    
105    EAPI extern int ECORE_EXE_EVENT_ADD; /**< A child process has been added */
106    EAPI extern int ECORE_EXE_EVENT_DEL; /**< A child process has been deleted (it exited, naming consistent with the rest of ecore). */
107    EAPI extern int ECORE_EXE_EVENT_DATA; /**< Data from a child process. */
108    EAPI extern int ECORE_EXE_EVENT_ERROR; /**< Errors from a child process. */
109
110    enum _Ecore_Fd_Handler_Flags
111      {
112         ECORE_FD_READ = 1, /**< Fd Read mask */
113         ECORE_FD_WRITE = 2, /**< Fd Write mask */
114         ECORE_FD_ERROR = 4 /**< Fd Error mask */
115      };
116    typedef enum _Ecore_Fd_Handler_Flags Ecore_Fd_Handler_Flags;
117
118    enum _Ecore_Exe_Flags /* flags for executing a child with its stdin and/or stdout piped back */
119      {
120         ECORE_EXE_NONE = 0, /**< No exe flags at all */
121         ECORE_EXE_PIPE_READ = 1, /**< Exe Pipe Read mask */
122         ECORE_EXE_PIPE_WRITE = 2, /**< Exe Pipe Write mask */
123         ECORE_EXE_PIPE_ERROR = 4, /**< Exe Pipe error mask */
124         ECORE_EXE_PIPE_READ_LINE_BUFFERED = 8, /**< Reads are buffered until a newline and delivered 1 event per line */
125         ECORE_EXE_PIPE_ERROR_LINE_BUFFERED = 16, /**< Errors are buffered until a newline and delivered 1 event per line */
126         ECORE_EXE_PIPE_AUTO = 32, /**< stdout and stderr are buffered automatically */
127         ECORE_EXE_RESPAWN = 64, /**< FIXME: Exe is restarted if it dies */
128         ECORE_EXE_USE_SH = 128, /**< Use /bin/sh to run the command. */
129         ECORE_EXE_NOT_LEADER = 256 /**< Do not use setsid() to have the executed process be its own session leader */
130      };
131    typedef enum _Ecore_Exe_Flags Ecore_Exe_Flags;
132
133    enum _Ecore_Exe_Win32_Priority
134      {
135        ECORE_EXE_WIN32_PRIORITY_IDLE, /**< Idle priority, for monitoring the system */
136        ECORE_EXE_WIN32_PRIORITY_BELOW_NORMAL, /**< Below default priority */
137        ECORE_EXE_WIN32_PRIORITY_NORMAL, /**< Default priority */
138        ECORE_EXE_WIN32_PRIORITY_ABOVE_NORMAL, /**< Above default priority */
139        ECORE_EXE_WIN32_PRIORITY_HIGH, /**< High priority, use with care as other threads in the system will not get processor time */
140        ECORE_EXE_WIN32_PRIORITY_REALTIME /**< Realtime priority, should be almost never used as it can interrupt system threads that manage mouse input, keyboard input, and background disk flushing */
141      };
142    typedef enum _Ecore_Exe_Win32_Priority Ecore_Exe_Win32_Priority;
143
144    enum _Ecore_Poller_Type /* Poller types */
145      {
146         ECORE_POLLER_CORE = 0 /**< The core poller interval */
147      };
148    typedef enum _Ecore_Poller_Type Ecore_Poller_Type;
149    
150    enum _Ecore_Pos_Map /* Position mappings */
151      {
152         ECORE_POS_MAP_LINEAR,     /**< Linear 0.0 -> 1.0 */
153         ECORE_POS_MAP_ACCELERATE, /**< Start slow then speed up */
154         ECORE_POS_MAP_DECELERATE, /**< Start fast then slow down */
155         ECORE_POS_MAP_SINUSOIDAL, /**< Start slow, speed up then slow down at end */
156         ECORE_POS_MAP_ACCELERATE_FACTOR, /**< Start slow then speed up, v1 being a power factor, 0.0 being linear, 1.0 being normal accelerate, 2.0 being much more pronounced accelerate (squared), 3.0 being cubed, etc. */
157         ECORE_POS_MAP_DECELERATE_FACTOR, /**< Start fast then slow down, v1 being a power factor, 0.0 being linear, 1.0 being normal decelerate, 2.0 being much more pronounced decelerate (squared), 3.0 being cubed, etc. */
158         ECORE_POS_MAP_SINUSOIDAL_FACTOR, /**< Start slow, speed up then slow down at end, v1 being a power factor, 0.0 being linear, 1.0 being normal sinusoidal, 2.0 being much more pronounced sinusoidal (squared), 3.0 being cubed, etc. */
159         ECORE_POS_MAP_DIVISOR_INTERP, /**< Start at gradient * v1, interpolated via power of v2 curve */
160         ECORE_POS_MAP_BOUNCE, /**< Start at 0.0 then "drop" like a ball bouncing to the ground at 1.0, and bounce v2 times, with decay factor of v1 */
161         ECORE_POS_MAP_SPRING  /**< Start at 0.0 then "wobble" like a sping rest position 1.0, and wobble v2 times, with decay factor of v1 */
162      };
163    typedef enum _Ecore_Pos_Map Ecore_Pos_Map;
164
165    typedef struct _Ecore_Exe                   Ecore_Exe; /**< A handle for spawned processes */
166    typedef struct _Ecore_Timer                 Ecore_Timer; /**< A handle for timers */
167    typedef struct _Ecore_Idler                 Ecore_Idler; /**< A handle for idlers */
168    typedef struct _Ecore_Idle_Enterer          Ecore_Idle_Enterer; /**< A handle for idle enterers */
169    typedef struct _Ecore_Idle_Exiter           Ecore_Idle_Exiter; /**< A handle for idle exiters */
170    typedef struct _Ecore_Fd_Handler            Ecore_Fd_Handler; /**< A handle for Fd handlers */
171    typedef struct _Ecore_Win32_Handler         Ecore_Win32_Handler; /**< A handle for HANDLE handlers on Windows */
172    typedef struct _Ecore_Event_Handler         Ecore_Event_Handler; /**< A handle for an event handler */
173    typedef struct _Ecore_Event_Filter          Ecore_Event_Filter; /**< A handle for an event filter */
174    typedef struct _Ecore_Event                 Ecore_Event; /**< A handle for an event */
175    typedef struct _Ecore_Animator              Ecore_Animator; /**< A handle for animators */
176    typedef struct _Ecore_Pipe                  Ecore_Pipe; /**< A handle for pipes */
177    typedef struct _Ecore_Poller                Ecore_Poller; /**< A handle for pollers */
178    typedef struct _Ecore_Event_Signal_User     Ecore_Event_Signal_User; /**< User signal event */
179    typedef struct _Ecore_Event_Signal_Hup      Ecore_Event_Signal_Hup; /**< Hup signal event */
180    typedef struct _Ecore_Event_Signal_Exit     Ecore_Event_Signal_Exit; /**< Exit signal event */
181    typedef struct _Ecore_Event_Signal_Power    Ecore_Event_Signal_Power; /**< Power signal event */
182    typedef struct _Ecore_Event_Signal_Realtime Ecore_Event_Signal_Realtime; /**< Realtime signal event */
183    typedef struct _Ecore_Exe_Event_Add         Ecore_Exe_Event_Add; /**< Spawned Exe add event */
184    typedef struct _Ecore_Exe_Event_Del         Ecore_Exe_Event_Del; /**< Spawned Exe exit event */
185    typedef struct _Ecore_Exe_Event_Data_Line   Ecore_Exe_Event_Data_Line; /**< Lines from a child process */
186    typedef struct _Ecore_Exe_Event_Data        Ecore_Exe_Event_Data; /**< Data from a child process */
187    typedef struct _Ecore_Thread                Ecore_Thread;
188
189    /**
190     * @typedef Ecore_Data_Cb Ecore_Data_Cb
191     * A callback which is used to return data to the main function
192     */
193    typedef void *(*Ecore_Data_Cb) (void *data);
194    /**
195     * @typedef Ecore_Filter_Cb
196     * A callback used for filtering events from the main loop.
197     */
198    typedef Eina_Bool (*Ecore_Filter_Cb) (void *data, void *loop_data, int type, void *event);
199    /**
200     * @typedef Ecore_Eselect_Function Ecore_Eselect_Function
201     * A function which can be used to replace select() in the main loop
202     */
203    typedef int (*Ecore_Select_Function)(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout);
204    /**
205     * @typedef Ecore_End_Cb Ecore_End_Cb
206     * This is the callback which is called at the end of a function, usually for cleanup purposes.
207     */
208    typedef void (*Ecore_End_Cb) (void *user_data, void *func_data);
209    /**
210     * @typedef Ecore_Pipe_Cb Ecore_Pipe_Cb
211     * The callback that data written to the pipe is sent to.
212     */
213    typedef void (*Ecore_Pipe_Cb) (void *data, void *buffer, unsigned int nbyte);
214    /**
215     * @typedef Ecore_Exe_Cb Ecore_Exe_Cb
216     * A callback to run with the associated @ref Ecore_Exe, usually for cleanup purposes.
217     */
218    typedef void (*Ecore_Exe_Cb)(void *data, const Ecore_Exe *exe);
219    /**
220     * @typedef Ecore_Event_Handler_Cb Ecore_Event_Handler_Cb
221     * A callback used by the main loop to handle events of a specified type.
222     */
223    typedef Eina_Bool (*Ecore_Event_Handler_Cb) (void *data, int type, void *event);
224    /**
225     * @typedef Ecore_Thread_Cb Ecore_Thread_Cb
226     * A callback used by Ecore_Thread helper.
227     */
228   typedef void (*Ecore_Thread_Cb) (void *data, Ecore_Thread *thread);
229    /**
230     * @typedef Ecore_Thread_Notify_Cb Ecore_Thread_Notify_Cb
231     * A callback used by the main loop to receive data sent by an @ref Ecore_Thread_Group.
232     */
233   typedef void (*Ecore_Thread_Notify_Cb) (void *data, Ecore_Thread *thread, void *msg_data);
234    /**
235     * @typedef Ecore_Task_Cb Ecore_Task_Cb
236     * A callback run for a task (timer, idler, poller, animator, etc)
237     */
238    typedef Eina_Bool (*Ecore_Task_Cb) (void *data);
239    /**
240     * @typedef Ecore_Timeline_Cb Ecore_Timeline_Cb
241     * A callback run for a task (animators with runtimes)
242     */
243    typedef Eina_Bool (*Ecore_Timeline_Cb) (void *data, double pos);
244    /**
245     * @typedef Ecore_Cb Ecore_Cb
246     * A generic callback called as a hook when a certain point in execution is reached.
247     */
248    typedef void (*Ecore_Cb) (void *data);
249    /**
250     * @typedef Ecore_Fd_Cb Ecore_Fd_Cb
251     * A callback used by an @ref Ecore_Fd_Handler.
252     */
253    typedef Eina_Bool (*Ecore_Fd_Cb) (void *data, Ecore_Fd_Handler *fd_handler);
254    /**
255     * @typedef Ecore_Fd_Prep_Cb Ecore_Fd_Prep_Cb
256     * A callback used by an @ref Ecore_Fd_Handler.
257     */
258    typedef void (*Ecore_Fd_Prep_Cb) (void *data, Ecore_Fd_Handler *fd_handler);
259    /**
260     * @typedef Ecore_Win32_Handle_Cb Ecore_Win32_Handle_Cb
261     * A callback used by an @ref Ecore_Win32_Handler.
262     */
263    typedef Eina_Bool (*Ecore_Win32_Handle_Cb) (void *data, Ecore_Win32_Handler *wh);
264
265
266    typedef struct _Ecore_Job Ecore_Job; /**< A job handle */
267
268    struct _Ecore_Event_Signal_User /** User signal event */
269      {
270         int   number; /**< The signal number. Either 1 or 2 */
271         void *ext_data; /**< Extension data - not used */
272
273 #ifndef _WIN32
274         siginfo_t data; /**< Signal info */
275 #endif
276      };
277
278    struct _Ecore_Event_Signal_Hup /** Hup signal event */
279      {
280         void *ext_data; /**< Extension data - not used */
281
282 #ifndef _WIN32
283         siginfo_t data; /**< Signal info */
284 #endif
285      };
286
287    struct _Ecore_Event_Signal_Exit /** Exit request event */
288      {
289         Eina_Bool   interrupt : 1; /**< Set if the exit request was an interrupt  signal*/
290         Eina_Bool   quit      : 1; /**< set if the exit request was a quit signal */
291         Eina_Bool   terminate : 1; /**< Set if the exit request was a terminate singal */
292         void          *ext_data; /**< Extension data - not used */
293
294 #ifndef _WIN32
295         siginfo_t data; /**< Signal info */
296 #endif
297      };
298
299    struct _Ecore_Event_Signal_Power /** Power event */
300      {
301         void *ext_data; /**< Extension data - not used */
302
303 #ifndef _WIN32
304         siginfo_t data; /**< Signal info */
305 #endif
306      };
307
308    struct _Ecore_Event_Signal_Realtime /** Realtime event */
309      {
310         int num; /**< The realtime signal's number */
311
312 #ifndef _WIN32
313         siginfo_t data; /**< Signal info */
314 #endif
315      };
316
317    struct _Ecore_Exe_Event_Add /** Process add event */
318      {
319         Ecore_Exe *exe; /**< The handle to the added process */
320         void      *ext_data; /**< Extension data - not used */
321      };
322
323    struct _Ecore_Exe_Event_Del /** Process exit event */
324      {
325         pid_t         pid; /**< The process ID of the process that exited */
326         int           exit_code; /**< The exit code of the process */
327         Ecore_Exe    *exe; /**< The handle to the exited process, or NULL if not found */
328         int           exit_signal; /** < The signal that caused the process to exit */
329         Eina_Bool  exited    : 1; /** < set to 1 if the process exited of its own accord */
330         Eina_Bool  signalled : 1; /** < set to 1 id the process exited due to uncaught signal */
331         void         *ext_data; /**< Extension data - not used */
332 #ifndef _WIN32
333         siginfo_t     data; /**< Signal info */
334 #endif
335      };
336
337    struct _Ecore_Exe_Event_Data_Line /**< Lines from a child process */
338       {
339          char *line;
340          int   size;
341       };
342
343    struct _Ecore_Exe_Event_Data /** Data from a child process event */
344      {
345         Ecore_Exe *exe; /**< The handle to the process */
346         void *data; /**< the raw binary data from the child process that was received */
347         int   size; /**< the size of this data in bytes */
348         Ecore_Exe_Event_Data_Line *lines; /**< an array of line data if line buffered, the last one has it's line member set to NULL */
349      };
350
351   /**
352    * @defgroup Ecore_Init_Group Ecore initialisation and shutdown functions.
353    */
354
355    EAPI int  ecore_init(void);
356    EAPI int  ecore_shutdown(void);
357
358   /**
359    * @}
360    */
361
362   /**
363    * @defgroup Ecore_Application_Group Ecore Application functions
364    *
365    * @{
366    */
367
368    EAPI void ecore_app_args_set(int argc, const char **argv);
369    EAPI void ecore_app_args_get(int *argc, char ***argv);
370    EAPI void ecore_app_restart(void);
371
372   /**
373    * @}
374    */
375
376   /**
377    * @defgroup Ecore_Event_Group Ecore Event functions
378    *
379    * @{
380    */
381
382    EAPI Ecore_Event_Handler *ecore_event_handler_add(int type, Ecore_Event_Handler_Cb func, const void *data);
383    EAPI void                *ecore_event_handler_del(Ecore_Event_Handler *event_handler);
384    EAPI Ecore_Event         *ecore_event_add(int type, void *ev, Ecore_End_Cb func_free, void *data);
385    EAPI void                *ecore_event_del(Ecore_Event *event);
386    EAPI void                *ecore_event_handler_data_get(Ecore_Event_Handler *eh);
387    EAPI void                *ecore_event_handler_data_set(Ecore_Event_Handler *eh, void *data);
388    EAPI int                  ecore_event_type_new(void);
389    EAPI Ecore_Event_Filter  *ecore_event_filter_add(Ecore_Data_Cb func_start, Ecore_Filter_Cb func_filter, Ecore_End_Cb func_end, const void *data);
390    EAPI void                *ecore_event_filter_del(Ecore_Event_Filter *ef);
391    EAPI int                  ecore_event_current_type_get(void);
392    EAPI void                *ecore_event_current_event_get(void);
393
394   /**
395    * @}
396    */
397
398   /**
399    * @defgroup Ecore_Exe_Group Process Spawning Functions
400    *
401    * @{
402    */
403
404    EAPI void        ecore_exe_run_priority_set(int pri);
405    EAPI int         ecore_exe_run_priority_get(void);
406    EAPI Ecore_Exe  *ecore_exe_run(const char *exe_cmd, const void *data);
407    EAPI Ecore_Exe  *ecore_exe_pipe_run(const char *exe_cmd, Ecore_Exe_Flags flags, const void *data);
408    EAPI void        ecore_exe_callback_pre_free_set(Ecore_Exe *exe, Ecore_Exe_Cb func);
409    EAPI Eina_Bool   ecore_exe_send(Ecore_Exe *exe, const void *data, int size);
410    EAPI void        ecore_exe_close_stdin(Ecore_Exe *exe);
411    EAPI void        ecore_exe_auto_limits_set(Ecore_Exe *exe, int start_bytes, int end_bytes, int start_lines, int end_lines);
412    EAPI Ecore_Exe_Event_Data *ecore_exe_event_data_get(Ecore_Exe *exe, Ecore_Exe_Flags flags);
413    EAPI void        ecore_exe_event_data_free(Ecore_Exe_Event_Data *data);
414    EAPI void       *ecore_exe_free(Ecore_Exe *exe);
415    EAPI pid_t       ecore_exe_pid_get(const Ecore_Exe *exe);
416    EAPI void        ecore_exe_tag_set(Ecore_Exe *exe, const char *tag);
417    EAPI const char *ecore_exe_tag_get(const Ecore_Exe *exe);
418    EAPI const char *ecore_exe_cmd_get(const Ecore_Exe *exe);
419    EAPI void       *ecore_exe_data_get(const Ecore_Exe *exe);
420    EAPI void       *ecore_exe_data_set(Ecore_Exe *exe, void *data);
421    EAPI Ecore_Exe_Flags ecore_exe_flags_get(const Ecore_Exe *exe);
422    EAPI void        ecore_exe_pause(Ecore_Exe *exe);
423    EAPI void        ecore_exe_continue(Ecore_Exe *exe);
424    EAPI void        ecore_exe_interrupt(Ecore_Exe *exe);
425    EAPI void        ecore_exe_quit(Ecore_Exe *exe);
426    EAPI void        ecore_exe_terminate(Ecore_Exe *exe);
427    EAPI void        ecore_exe_kill(Ecore_Exe *exe);
428    EAPI void        ecore_exe_signal(Ecore_Exe *exe, int num);
429    EAPI void        ecore_exe_hup(Ecore_Exe *exe);
430
431   /**
432    * @}
433    */
434
435   /**
436    * @defgroup Ecore_Idle_Group Ecore Idle functions
437    *
438    * @{
439    */
440
441    EAPI Ecore_Idler *ecore_idler_add(Ecore_Task_Cb func, const void *data);
442    EAPI void        *ecore_idler_del(Ecore_Idler *idler);
443
444    EAPI Ecore_Idle_Enterer *ecore_idle_enterer_add(Ecore_Task_Cb func, const void *data);
445    EAPI Ecore_Idle_Enterer *ecore_idle_enterer_before_add(Ecore_Task_Cb func, const void *data);
446    EAPI void               *ecore_idle_enterer_del(Ecore_Idle_Enterer *idle_enterer);
447
448    EAPI Ecore_Idle_Exiter *ecore_idle_exiter_add(Ecore_Task_Cb func, const void *data);
449    EAPI void              *ecore_idle_exiter_del(Ecore_Idle_Exiter *idle_exiter);
450
451   /**
452    * @}
453    */
454
455   /**
456    * @defgroup Ecore_Main Loop_Group Ecore Main Loop functions
457    *
458    * @{
459    */
460
461    EAPI void              ecore_main_loop_iterate(void);
462
463    EAPI void              ecore_main_loop_select_func_set(Ecore_Select_Function func);
464    EAPI Ecore_Select_Function ecore_main_loop_select_func_get(void);
465
466    EAPI Eina_Bool         ecore_main_loop_glib_integrate(void);
467    EAPI void              ecore_main_loop_glib_always_integrate_disable(void);
468        
469    EAPI void              ecore_main_loop_begin(void);
470    EAPI void              ecore_main_loop_quit(void);
471    EAPI Ecore_Fd_Handler *ecore_main_fd_handler_add(int fd, Ecore_Fd_Handler_Flags flags, Ecore_Fd_Cb func, const void *data,
472                                                     Ecore_Fd_Cb buf_func, const void *buf_data);
473    EAPI void              ecore_main_fd_handler_prepare_callback_set(Ecore_Fd_Handler *fd_handler, Ecore_Fd_Prep_Cb func, const void *data);
474    EAPI void             *ecore_main_fd_handler_del(Ecore_Fd_Handler *fd_handler);
475    EAPI int               ecore_main_fd_handler_fd_get(Ecore_Fd_Handler *fd_handler);
476    EAPI Eina_Bool         ecore_main_fd_handler_active_get(Ecore_Fd_Handler *fd_handler, Ecore_Fd_Handler_Flags flags);
477    EAPI void              ecore_main_fd_handler_active_set(Ecore_Fd_Handler *fd_handler, Ecore_Fd_Handler_Flags flags);
478
479    EAPI Ecore_Win32_Handler *ecore_main_win32_handler_add(void *h, Ecore_Win32_Handle_Cb func, const void *data);
480    EAPI void                *ecore_main_win32_handler_del(Ecore_Win32_Handler *win32_handler);
481
482   /**
483    * @}
484    */
485
486   /**
487    * @defgroup Ecore_Pipe_Group Pipe wrapper
488    *
489    * @{
490    */
491
492    EAPI Ecore_Pipe  *ecore_pipe_add(Ecore_Pipe_Cb handler, const void *data);
493    EAPI void        *ecore_pipe_del(Ecore_Pipe *p);
494    EAPI Eina_Bool    ecore_pipe_write(Ecore_Pipe *p, const void *buffer, unsigned int nbytes);
495    EAPI void         ecore_pipe_write_close(Ecore_Pipe *p);
496    EAPI void         ecore_pipe_read_close(Ecore_Pipe *p);
497
498   /**
499    * @}
500    */
501
502   /**
503    * @defgroup Ecore_Thread_Group Ecore Thread functions
504    *
505    * @{
506    */
507
508    EAPI Ecore_Thread *ecore_thread_run(Ecore_Thread_Cb func_blocking,
509                                        Ecore_Thread_Cb func_end,
510                                        Ecore_Thread_Cb func_cancel,
511                                        const void *data);
512    EAPI Ecore_Thread *ecore_thread_feedback_run(Ecore_Thread_Cb func_heavy,
513                                                 Ecore_Thread_Notify_Cb func_notify,
514                                                 Ecore_Thread_Cb func_end,
515                                                 Ecore_Thread_Cb func_cancel,
516                                                 const void *data,
517                                                 Eina_Bool try_no_queue);
518    EAPI Eina_Bool     ecore_thread_cancel(Ecore_Thread *thread);
519    EAPI Eina_Bool     ecore_thread_check(Ecore_Thread *thread);
520    EAPI Eina_Bool     ecore_thread_feedback(Ecore_Thread *thread, const void *msg_data);
521    EAPI Eina_Bool     ecore_thread_reschedule(Ecore_Thread *thread);
522    EAPI int           ecore_thread_active_get(void);
523    EAPI int           ecore_thread_pending_get(void);
524    EAPI int           ecore_thread_pending_feedback_get(void);
525    EAPI int           ecore_thread_pending_total_get(void);
526    EAPI int           ecore_thread_max_get(void);
527    EAPI void          ecore_thread_max_set(int num);
528    EAPI void          ecore_thread_max_reset(void);
529    EAPI int           ecore_thread_available_get(void);
530    EAPI Eina_Bool     ecore_thread_local_data_add(Ecore_Thread *thread, const char *key, void *value, Eina_Free_Cb cb, Eina_Bool direct);
531    EAPI void         *ecore_thread_local_data_set(Ecore_Thread *thread, const char *key, void *value, Eina_Free_Cb cb);
532    EAPI void         *ecore_thread_local_data_find(Ecore_Thread *thread, const char *key);
533    EAPI Eina_Bool     ecore_thread_local_data_del(Ecore_Thread *thread, const char *key);
534
535    EAPI Eina_Bool     ecore_thread_global_data_add(const char *key, void *value, Eina_Free_Cb cb, Eina_Bool direct);
536    EAPI void         *ecore_thread_global_data_set(const char *key, void *value, Eina_Free_Cb cb);
537    EAPI void         *ecore_thread_global_data_find(const char *key);
538    EAPI Eina_Bool     ecore_thread_global_data_del(const char *key);
539    EAPI void         *ecore_thread_global_data_wait(const char *key, double seconds);
540
541   /**
542    * @}
543    */
544
545   /**
546    * @defgroup Ecore_Time_Group Ecore Time functions
547    *
548    * @{
549    */
550
551    EAPI double ecore_time_get(void);
552    EAPI double ecore_time_unix_get(void);
553    EAPI double ecore_loop_time_get(void);
554
555    EAPI Ecore_Timer *ecore_timer_add(double in, Ecore_Task_Cb func, const void *data);
556    EAPI Ecore_Timer *ecore_timer_loop_add(double in, Ecore_Task_Cb func, const void *data);
557    EAPI void        *ecore_timer_del(Ecore_Timer *timer);
558    EAPI void         ecore_timer_interval_set(Ecore_Timer *timer, double in);
559    EAPI double       ecore_timer_interval_get(Ecore_Timer *timer);
560    EAPI void         ecore_timer_freeze(Ecore_Timer *timer);
561    EAPI void         ecore_timer_thaw(Ecore_Timer *timer);
562    EAPI void         ecore_timer_delay(Ecore_Timer *timer, double add);
563    EAPI double       ecore_timer_pending_get(Ecore_Timer *timer);
564    EAPI double       ecore_timer_precision_get(void);
565    EAPI void         ecore_timer_precision_set(double precision);
566
567   /**
568    * @}
569    */
570
571   /**
572    * @defgroup Ecore_Animator_Group Ecore Animator functions
573    *
574    * @{
575    */
576
577    EAPI Ecore_Animator *ecore_animator_add(Ecore_Task_Cb func, const void *data);
578    EAPI Ecore_Animator *ecore_animator_run_add(double runtime, Ecore_Timeline_Cb func, const void *data);
579    EAPI void           *ecore_animator_del(Ecore_Animator *animator);
580    EAPI void            ecore_animator_freeze(Ecore_Animator *animator);
581    EAPI void            ecore_animator_thaw(Ecore_Animator *animator);
582    EAPI void            ecore_animator_frametime_set(double frametime);
583    EAPI double          ecore_animator_frametime_get(void);
584    EAPI double          ecore_animator_pos_map(double pos, Ecore_Pos_Map map, double v1, double v2);
585          
586   /**
587    * @}
588    */
589
590   /**
591    * @defgroup Ecore_Poller_Group Ecore Poll functions
592    *
593    * @{
594    */
595
596    EAPI void          ecore_poller_poll_interval_set(Ecore_Poller_Type type, double poll_time);
597    EAPI double        ecore_poller_poll_interval_get(Ecore_Poller_Type type);
598    EAPI Eina_Bool     ecore_poller_poller_interval_set(Ecore_Poller *poller, int interval);
599    EAPI int           ecore_poller_poller_interval_get(Ecore_Poller *poller);
600    EAPI Ecore_Poller *ecore_poller_add(Ecore_Poller_Type type, int interval, Ecore_Task_Cb func, const void *data);
601    EAPI void         *ecore_poller_del(Ecore_Poller *poller);
602
603   /**
604    * @}
605    */
606
607   /**
608    * @defgroup Ecore_Job_Group Ecore Job functions
609    *
610    * @{
611    */
612
613    EAPI Ecore_Job *ecore_job_add(Ecore_Cb func, const void *data);
614    EAPI void      *ecore_job_del(Ecore_Job *job);
615
616   /**
617    * @}
618    */
619
620   /**
621    * @}
622    */
623
624 #ifdef __cplusplus
625 }
626 #endif
627 #endif