1 #pragma once 2 3 typedef struct _TIMER 4 { 5 HEAD head; 6 LIST_ENTRY ptmrList; 7 PTHREADINFO pti; 8 PWND pWnd; // hWnd 9 UINT_PTR nID; // Specifies a nonzero timer identifier. 10 INT cmsCountdown; // uElapse 11 INT cmsRate; // uElapse 12 FLONG flags; 13 TIMERPROC pfn; // lpTimerFunc 14 } TIMER, *PTIMER; 15 16 // 17 // Timer structure flags. 18 // 19 #define TMRF_READY 0x0001 20 #define TMRF_SYSTEM 0x0002 21 #define TMRF_RIT 0x0004 22 #define TMRF_INIT 0x0008 23 #define TMRF_ONESHOT 0x0010 24 #define TMRF_WAITING 0x0020 25 #define TMRF_TIFROMWND 0x0040 26 27 #define ID_EVENT_SYSTIMER_MOUSEHOVER ID_TME_TIMER 28 #define ID_EVENT_SYSTIMER_FLASHWIN (0xFFF8) 29 #define ID_EVENT_SYSTIMER_TRACKWIN (0xFFF7) 30 #define ID_EVENT_SYSTIMER_ANIMATEDFADE (0xFFF6) 31 #define ID_EVENT_SYSTIMER_INVALIDATEDCES (0xFFF5) 32 33 extern PKTIMER MasterTimer; 34 35 CODE_SEG("INIT") NTSTATUS NTAPI InitTimerImpl(VOID); 36 BOOL FASTCALL DestroyTimersForThread(PTHREADINFO pti); 37 BOOL FASTCALL DestroyTimersForWindow(PTHREADINFO pti, PWND Window); 38 BOOL FASTCALL IntKillTimer(PWND Window, UINT_PTR IDEvent, BOOL SystemTimer); 39 UINT_PTR FASTCALL IntSetTimer(PWND Window, UINT_PTR IDEvent, UINT Elapse, TIMERPROC TimerFunc, INT Type); 40 PTIMER FASTCALL FindSystemTimer(PMSG); 41 BOOL FASTCALL ValidateTimerCallback(PTHREADINFO,LPARAM); 42 VOID CALLBACK SystemTimerProc(HWND,UINT,UINT_PTR,DWORD); 43 UINT_PTR FASTCALL SystemTimerSet(PWND,UINT_PTR,UINT,TIMERPROC); 44 BOOL FASTCALL PostTimerMessages(PWND); 45 VOID FASTCALL ProcessTimers(VOID); 46 VOID FASTCALL StartTheTimers(VOID); 47