[YAROTOWS] Reintegrate the branch. For a brighter future.
[reactos.git] / reactos / subsystems / win32 / win32k / include / timer.h
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 extern PKTIMER MasterTimer;
28
29 NTSTATUS FASTCALL InitTimerImpl(VOID);
30 BOOL FASTCALL DestroyTimersForThread(PTHREADINFO pti);
31 BOOL FASTCALL DestroyTimersForWindow(PTHREADINFO pti, PWND Window);
32 BOOL FASTCALL IntKillTimer(PWND Window, UINT_PTR IDEvent, BOOL SystemTimer);
33 UINT_PTR FASTCALL IntSetTimer(PWND Window, UINT_PTR IDEvent, UINT Elapse, TIMERPROC TimerFunc, INT Type);
34 PTIMER FASTCALL FindSystemTimer(PMSG);
35 BOOL FASTCALL ValidateTimerCallback(PTHREADINFO,LPARAM);
36 VOID CALLBACK SystemTimerProc(HWND,UINT,UINT_PTR,DWORD);
37 UINT_PTR FASTCALL SystemTimerSet(PWND,UINT_PTR,UINT,TIMERPROC);
38 BOOL FASTCALL PostTimerMessages(PWND);
39 VOID FASTCALL ProcessTimers(VOID);
40 VOID FASTCALL StartTheTimers(VOID);