1999-09-09 13:46:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
2001-03-20 23:46:57 +00:00
|
|
|
* Handle events for non-GUI based applications
|
1999-09-09 13:46:59 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include "WINGsP.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void
|
1999-09-10 20:13:44 +00:00
|
|
|
WHandleEvents()
|
|
|
|
|
{
|
1999-09-09 13:46:59 +00:00
|
|
|
/* Check any expired timers */
|
2001-03-20 23:46:57 +00:00
|
|
|
W_CheckTimerHandlers();
|
1999-09-09 13:46:59 +00:00
|
|
|
|
2001-03-21 01:29:22 +00:00
|
|
|
/* Do idle and timer stuff while there are no input events */
|
|
|
|
|
/* Do not wait for input here. just peek to se if input is available */
|
|
|
|
|
while (!W_HandleInputEvents(False, -1) && W_CheckIdleHandlers()) {
|
1999-09-10 20:13:44 +00:00
|
|
|
/* dispatch timer events */
|
2001-03-20 23:46:57 +00:00
|
|
|
W_CheckTimerHandlers();
|
1999-09-09 13:46:59 +00:00
|
|
|
}
|
|
|
|
|
|
2001-03-20 23:46:57 +00:00
|
|
|
W_HandleInputEvents(True, -1);
|
1999-09-10 20:13:44 +00:00
|
|
|
|
|
|
|
|
/* Check any expired timers */
|
2001-03-20 23:46:57 +00:00
|
|
|
W_CheckTimerHandlers();
|
1999-09-09 13:46:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|