## 2.8 Processing Events

After an application has created and displayed its widgets, it is ready to process events. There are three routines that can be used for event processing.

`void EZ_EventMainLoop(void)`

This is the main event loop. It is an infinite loop that waits and processes user inputs. It will call as necessary the call backs registered with the EZ widget library.

`void EZ_ServiceEvents(void)`

This function checks the event queue, processes them if there are any, and returns. This function is useful for the "polling" style programming, especially for interactive graphics applications.

`void EZ_WaitAndServiceNextEvent(void)`

This function checks the event queue, if there are no events on the queue, it waits for the next event to arrive. It processes the first event on the queue and then returns.

HTML Documentation Maintainance:`Arturo Espinosa <arturo@nuclecu.unam.mx>`