Ecore Main Loop functions
[Ecore - Main Loop and Job Functions.]

These functions control the Ecore event handling loop. More...

Modules

 File Event Handling Functions
 

Functions that deal with file descriptor handlers.


Functions

EAPI void ecore_main_loop_iterate (void)
 Runs a single iteration of the main loop to process everything on the queue.
EAPI void ecore_main_loop_begin (void)
 Runs the application main loop.
EAPI void ecore_main_loop_quit (void)
 Quits the main loop once all the events currently on the queue have been processed.
EAPI void ecore_main_loop_select_func_set (Ecore_Select_Function func)
 Sets the function to use when monitoring multiple file descriptors, and waiting until one of more of the file descriptors before ready for some class of I/O operation.
EAPI Ecore_Select_Function ecore_main_loop_select_func_get (void)
 Gets the select function set by ecore_select_func_set(), or the native select function if none was set.
EAPI void ecore_main_fd_handler_prepare_callback_set (Ecore_Fd_Handler *fd_handler, Ecore_Fd_Prep_Cb func, const void *data)
 Set the prepare callback with data for a given Ecore_Fd_Handler.

Detailed Description

These functions control the Ecore event handling loop.

This loop is designed to work on embedded systems all the way to large and powerful mutli-cpu workstations.

It serialises all system signals and events into a single event queue, that can be easily processed without needing to worry about concurrency. A properly written, event-driven program using this kind of programming does not need threads. It makes the program very robust and easy to follow.

Here is an example of simple program and its basic event loop flow:

prog_flow.png

For examples of setting up and using a main loop, see event_handler_example::c and timer_example::c.


Function Documentation

EAPI void ecore_main_fd_handler_prepare_callback_set ( Ecore_Fd_Handler fd_handler,
Ecore_Fd_Prep_Cb  func,
const void *  data 
)

Set the prepare callback with data for a given Ecore_Fd_Handler.

Parameters:
fd_handler The fd handler
func The prep function
data The data to pass to the prep function This function will be called prior to the the fd handler's callback function.
EAPI void ecore_main_loop_begin ( void   ) 

Runs the application main loop.

This function will not return until ecore_main_loop_quit is called.

EAPI void ecore_main_loop_select_func_set ( Ecore_Select_Function  func  ) 

Sets the function to use when monitoring multiple file descriptors, and waiting until one of more of the file descriptors before ready for some class of I/O operation.

This function will be used instead of the system call select and could possible be used to integrate the Ecore event loop with an external event loop.

Warning:
you don't know how to use, don't even try to use it.

Referenced by ecore_main_loop_glib_integrate().