These three procedures are event dispatchers.
EZ_EventMainLoop is the main event loop. It is an infinite
loop that wait for user interactions. When an event arrives, it
calls the responsible event handlers to handle the event.
EZ_ServiceEvents checks the event queue for
outstanding events. If there are any, it dispatches
all of them to the responsible event handlers and then returns.
EZ_WaitAndServiceNextEvent checks the event queue. It waits
for the next event to arrive if the event queue is empty. It
then processes the first outstanding event and returns.