Work on activation/focus.
[reactos.git] / reactos / 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 typedef struct _CURSORCLIP_INFO
12 {
13 BOOL IsClipped;
14 UINT Left;
15 UINT Top;
16 UINT Right;
17 UINT Bottom;
18 } CURSORCLIP_INFO, *PCURSORCLIP_INFO;
19
20 typedef struct _CURICONS
21 {
22 FAST_MUTEX LockHandles;
23 PVOID Handles;
24 PVOID Objects;
25 UINT Count;
26 } CURICONS, *PCURICONS;
27
28 typedef struct _SYSTEM_CURSORINFO
29 {
30 BOOL Enabled;
31 BOOL SwapButtons;
32 UINT ButtonsDown;
33 LONG x, y;
34 BOOL SafetySwitch, SafetySwitch2;
35 FAST_MUTEX CursorMutex;
36 CURSORCLIP_INFO CursorClipInfo;
37 CURICONS CurIcons;
38 PVOID CurrentCursorObject;
39 BYTE ShowingCursor;
40 UINT DblClickSpeed;
41 UINT DblClickWidth;
42 UINT DblClickHeight;
43 DWORD LastBtnDown;
44 LONG LastBtnDownX;
45 LONG LastBtnDownY;
46 HANDLE LastClkWnd;
47 } SYSTEM_CURSORINFO, *PSYSTEM_CURSORINFO;
48
49 typedef struct _WINSTATION_OBJECT
50 {
51 CSHORT Type;
52 CSHORT Size;
53
54 KSPIN_LOCK Lock;
55 UNICODE_STRING Name;
56 LIST_ENTRY DesktopListHead;
57 PRTL_ATOM_TABLE AtomTable;
58 PVOID HandleTable;
59 HANDLE SystemMenuTemplate;
60 SYSTEM_CURSORINFO SystemCursor;
61 UINT CaretBlinkRate;
62 struct _DESKTOP_OBJECT* ActiveDesktop;
63 /* FIXME: Clipboard */
64 LIST_ENTRY HotKeyListHead;
65 FAST_MUTEX HotKeyListLock;
66 } WINSTATION_OBJECT, *PWINSTATION_OBJECT;
67
68 typedef struct _DESKTOP_OBJECT
69 {
70 CSHORT Type;
71 CSHORT Size;
72 LIST_ENTRY ListEntry;
73 KSPIN_LOCK Lock;
74 UNICODE_STRING Name;
75 /* Pointer to the associated window station. */
76 struct _WINSTATION_OBJECT *WindowStation;
77 /* Pointer to the active queue. */
78 PVOID ActiveMessageQueue;
79 /* Rectangle of the work area */
80 #ifdef __WIN32K__
81 RECT WorkArea;
82 #else
83 LONG WorkArea[4];
84 #endif
85 /* Handle of the desktop window. */
86 HANDLE DesktopWindow;
87 HANDLE PrevActiveWindow;
88 } DESKTOP_OBJECT, *PDESKTOP_OBJECT;
89
90
91 typedef VOID (*PLOOKASIDE_MINMAX_ROUTINE)(
92 POOL_TYPE PoolType,
93 ULONG Size,
94 PUSHORT MinimumDepth,
95 PUSHORT MaximumDepth);
96
97 /* GLOBAL VARIABLES *********************************************************/
98
99 TIME_ZONE_INFORMATION SystemTimeZoneInfo;
100 extern POBJECT_TYPE ExEventPairObjectType;
101
102
103 /* INITIALIZATION FUNCTIONS *************************************************/
104
105 VOID
106 ExpWin32kInit(VOID);
107
108 VOID
109 ExInit2 (VOID);
110 VOID
111 ExInit3 (VOID);
112 VOID
113 ExInitTimeZoneInfo (VOID);
114 VOID
115 ExInitializeWorkerThreads(VOID);
116 VOID
117 ExpInitLookasideLists(VOID);
118
119 /* OTHER FUNCTIONS **********************************************************/
120
121 VOID
122 ExpSwapThreadEventPair(
123 IN struct _ETHREAD* Thread,
124 IN struct _KEVENT_PAIR* EventPair
125 );
126
127
128 #endif /* __NTOSKRNL_INCLUDE_INTERNAL_EXECUTIVE_H */