9e7b8ab5d742acba86d71b442236bf5784fc2c3d
[reactos.git] / ntoskrnl / include / internal / ex.h
1 /*
2  * internal executive prototypes
3  */
4
5 #ifndef __NTOSKRNL_INCLUDE_INTERNAL_EXECUTIVE_H
6 #define __NTOSKRNL_INCLUDE_INTERNAL_EXECUTIVE_H
7
8 #define NTOS_MODE_KERNEL
9 #include <ntos.h>
10
11 /* one systemcursor for custom cursors */
12 #define SYSCURSORCOUNT (14 + 1)
13
14 typedef struct _CURSORCLIP_INFO
15 {
16   BOOL IsClipped;
17   UINT Left;
18   UINT Top;
19   UINT Right;
20   UINT Bottom;
21 } CURSORCLIP_INFO, *PCURSORCLIP_INFO;
22
23 typedef struct _SYSCURSOR
24 {
25   HANDLE hCursor;
26   LONG cx, cy;
27   LONG hx, hy;
28   PVOID AndImage;
29   PVOID XorImage;
30 } SYSCURSOR, *PSYSCURSOR;
31
32 typedef struct _SYSTEM_CURSORINFO
33 {
34   BOOL Enabled;
35   BOOL SwapButtons;
36   UINT CurrentCursor;
37   LONG x, y;
38   BOOL SafetySwitch, SafetySwitch2;
39   FAST_MUTEX CursorMutex;
40   CURSORCLIP_INFO CursorClipInfo;
41   SYSCURSOR SystemCursors[SYSCURSORCOUNT];
42   UINT DblClickSpeed;
43   UINT DblClickWidth;
44   UINT DblClickHeight;
45   DWORD LastBtnDown;
46   LONG LastBtnDownX;
47   LONG LastBtnDownY;
48 } SYSTEM_CURSORINFO, *PSYSTEM_CURSORINFO;
49
50 typedef struct _WINSTATION_OBJECT
51 {   
52   CSHORT Type;
53   CSHORT Size;
54
55   KSPIN_LOCK Lock;
56   UNICODE_STRING Name;
57   LIST_ENTRY DesktopListHead;
58   PRTL_ATOM_TABLE AtomTable;
59   PVOID HandleTable;
60   HANDLE SystemMenuTemplate;
61   SYSTEM_CURSORINFO SystemCursor;
62   struct _DESKTOP_OBJECT* ActiveDesktop;
63   /* FIXME: Clipboard */
64 } WINSTATION_OBJECT, *PWINSTATION_OBJECT;
65
66 typedef struct _DESKTOP_OBJECT
67 {   
68   CSHORT Type;
69   CSHORT Size;
70   LIST_ENTRY ListEntry;
71   KSPIN_LOCK Lock;
72   UNICODE_STRING Name;
73   /* Pointer to the associated window station. */
74   struct _WINSTATION_OBJECT *WindowStation;
75   /* Pointer to the active queue. */
76   PVOID ActiveMessageQueue;
77   /* Handle of the desktop window. */
78   HANDLE DesktopWindow;
79   HANDLE PrevActiveWindow;
80   struct _WINDOW_OBJECT* CaptureWindow;
81 } DESKTOP_OBJECT, *PDESKTOP_OBJECT;
82
83
84 typedef VOID (*PLOOKASIDE_MINMAX_ROUTINE)(
85   POOL_TYPE PoolType,
86   ULONG Size,
87   PUSHORT MinimumDepth,
88   PUSHORT MaximumDepth);
89
90 /* GLOBAL VARIABLES *********************************************************/
91
92 TIME_ZONE_INFORMATION SystemTimeZoneInfo;
93 extern POBJECT_TYPE ExEventPairObjectType;
94
95
96 /* INITIALIZATION FUNCTIONS *************************************************/
97
98 VOID
99 ExpWin32kInit(VOID);
100
101 VOID 
102 ExInit (VOID);
103 VOID 
104 ExInitTimeZoneInfo (VOID);
105 VOID 
106 ExInitializeWorkerThreads(VOID);
107 VOID
108 ExpInitLookasideLists(VOID);
109
110 /* OTHER FUNCTIONS **********************************************************/
111
112 VOID
113 ExpSwapThreadEventPair(
114         IN struct _ETHREAD* Thread,
115         IN struct _KEVENT_PAIR* EventPair
116         );
117
118
119 #endif /* __NTOSKRNL_INCLUDE_INTERNAL_EXECUTIVE_H */