move fireTimer to linux-common code

This commit is contained in:
ehouse 2005-09-09 03:12:24 +00:00
parent ecce7f9d2e
commit 6b3b5c0f90

View file

@ -1034,14 +1034,6 @@ gtk_util_engineProgressCallback( XW_UtilCtxt* uc )
#endif #endif
} /* gtk_util_engineProgressCallback */ } /* gtk_util_engineProgressCallback */
static void
fireTimer( GtkAppGlobals* globals, XWTimerReason why )
{
TimerProc proc = globals->cGlobals.timerProcs[why];
void* closure = globals->cGlobals.timerClosures[why];
(*proc)( closure, why );
} /* fireTimer */
static void static void
cancelTimer( GtkAppGlobals* globals, XWTimerReason why ) cancelTimer( GtkAppGlobals* globals, XWTimerReason why )
{ {
@ -1062,7 +1054,7 @@ pentimer_idle_func( gpointer data )
gettimeofday( &tv, NULL ); gettimeofday( &tv, NULL );
if ( (tv.tv_usec - globals->penTv.tv_usec) >= globals->penTimerInterval) { if ( (tv.tv_usec - globals->penTv.tv_usec) >= globals->penTimerInterval) {
fireTimer( globals, TIMER_PENDOWN ); linuxFireTimer( globals, TIMER_PENDOWN );
callAgain = XP_FALSE; callAgain = XP_FALSE;
} }
@ -1074,7 +1066,7 @@ score_timer_func( gpointer data )
{ {
GtkAppGlobals* globals = (GtkAppGlobals*)data; GtkAppGlobals* globals = (GtkAppGlobals*)data;
fireTimer( globals, TIMER_TIMERTICK ); linuxFireTimer( globals, TIMER_TIMERTICK );
return XP_FALSE; return XP_FALSE;
} /* score_timer_func */ } /* score_timer_func */
@ -1085,7 +1077,7 @@ heartbeat_timer_func( gpointer data )
GtkAppGlobals* globals = (GtkAppGlobals*)data; GtkAppGlobals* globals = (GtkAppGlobals*)data;
if ( !globals->cGlobals.params->noHeartbeat ) { if ( !globals->cGlobals.params->noHeartbeat ) {
fireTimer( globals, TIMER_HEARTBEAT ); linuxFireTimer( globals, TIMER_HEARTBEAT );
} }
return (gint)0; return (gint)0;