[user32/win32k]
[reactos.git] / reactos / include / reactos / undocuser.h
1 #ifndef _UNDOCUSER_H
2 #define _UNDOCUSER_H
3
4 /* Built in class atoms */
5 #define WC_MENU (MAKEINTATOM(0x8000))
6 #define WC_DESKTOP (MAKEINTATOM(0x8001))
7 #define WC_DIALOG (MAKEINTATOM(0x8002))
8 #define WC_SWITCH (MAKEINTATOM(0x8003))
9 #define WC_ICONTITLE (MAKEINTATOM(0x8004))
10
11 /* Non SDK Styles */
12 #define ES_COMBO 0x200 /* Parent is a combobox */
13 #define WS_MAXIMIZED WS_MAXIMIZE
14 #define WS_MINIMIZED WS_MINIMIZE
15
16 /* Non SDK ExStyles */
17 #define WS_EX_DRAGDETECT 0x00000002
18 #define WS_EX_MAKEVISIBLEWHENUNGHOSTED 0x00000800
19 #define WS_EX_FORCELEGACYRESIZENCMETR 0x00800000
20 #define WS_EX_UISTATEACTIVE 0x04000000
21 #define WS_EX_REDIRECTED 0x20000000
22 #define WS_EX_UISTATEKBACCELHIDDEN 0x40000000
23 #define WS_EX_UISTATEFOCUSRECTHIDDEN 0x80000000
24 #define WS_EX_SETANSICREATOR 0x80000000 // For WNDS_ANSICREATOR
25
26 /* Non SDK Window Message types. */
27 #define WM_SETVISIBLE 0x00000009
28 #define WM_CTLCOLOR 0x00000019
29 #define WM_ALTTABACTIVE 0x00000029
30 #define WM_ISACTIVEICON 0x00000035
31 #define WM_QUERYPARKICON 0x00000036
32 #define WM_CLIENTSHUTDOWN 0x0000003B
33 #define WM_COPYGLOBALDATA 0x00000049
34 #define WM_LOGONNOTIFY 0x0000004c
35 #define WM_KEYF1 0x0000004d
36 #define WM_SYSTIMER 0x00000118
37 #define WM_LBTRACKPOINT 0x00000131
38 #define LB_CARETON 0x000001a3
39 #define LB_CARETOFF 0x000001a4
40 #define WM_DROPOBJECT 0x0000022A
41 #define WM_QUERYDROPOBJECT 0x0000022B
42 #define WM_BEGINDRAG 0x0000022C
43 #define WM_DRAGLOOP 0x0000022D
44 #define WM_DRAGSELECT 0x0000022E
45 #define WM_DRAGMOVE 0x0000022F
46 #define WM_POPUPSYSTEMMENU 0x00000313
47 #define WM_CBT 0x000003FF // ReactOS only.
48 #define WM_MAXIMUM 0x0001FFFF
49
50 /* Non SDK DCE types.*/
51 #define DCX_USESTYLE 0x00010000
52 #define DCX_KEEPCLIPRGN 0x00040000
53 #define DCX_KEEPLAYOUT 0x40000000
54 #define DCX_PROCESSOWNED 0x80000000
55
56 /* Caret timer ID */
57 #define IDCARETTIMER (0xffff)
58
59 /* SetWindowPos undocumented flags */
60 #define SWP_NOCLIENTSIZE 0x0800
61 #define SWP_NOCLIENTMOVE 0x1000
62 #define SWP_STATECHANGED 0x8000
63
64 /* Non SDK Queue state flags. */
65 #define QS_SMRESULT 0x8000 /* see "Undoc. Windows" */
66
67 //
68 // Definitions used by WM_CLIENTSHUTDOWN
69 //
70 // Client Shutdown messages
71 #define MCS_SHUTDOWNTIMERS 1
72 #define MCS_QUERYENDSESSION 2
73 // Client Shutdown returns
74 #define MCSR_GOODFORSHUTDOWN 1
75 #define MCSR_SHUTDOWNFINISHED 2
76 #define MCSR_DONOTSHUTDOWN 3
77
78 //
79 // Definitions used by WM_LOGONNOTIFY
80 //
81 #define LN_START_TASK_MANAGER 0x4
82 #define LN_LOCK_WORKSTATION 0x5
83 #define LN_UNLOCK_WORKSTATION 0x6
84 #define LN_MESSAGE_BEEP 0x9
85
86 #define CW_USEDEFAULT16 ((short)0x8000)
87
88 #define SBRG_SCROLLBAR 0 /* the scrollbar itself */
89 #define SBRG_TOPRIGHTBTN 1 /* the top or right button */
90 #define SBRG_PAGEUPRIGHT 2 /* the page up or page right region */
91 #define SBRG_SCROLLBOX 3 /* the scroll box */
92 #define SBRG_PAGEDOWNLEFT 4 /* the page down or page left region */
93 #define SBRG_BOTTOMLEFTBTN 5 /* the bottom or left button */
94
95 BOOL WINAPI SetLogonNotifyWindow(HWND Wnd, HWINSTA WinSta);
96 BOOL WINAPI KillSystemTimer(HWND,UINT_PTR);
97 UINT_PTR WINAPI SetSystemTimer(HWND,UINT_PTR,UINT,TIMERPROC);
98 DWORD_PTR WINAPI SetSysColorsTemp(const COLORREF *, const HBRUSH *, DWORD_PTR);
99 BOOL WINAPI SetDeskWallPaper(LPCSTR);
100 VOID WINAPI ScrollChildren(HWND,UINT,WPARAM,LPARAM);
101 void WINAPI CalcChildScroll(HWND, INT);
102 BOOL WINAPI RegisterLogonProcess(DWORD,BOOL);
103 DWORD WINAPI GetAppCompatFlags(HTASK hTask);
104 DWORD WINAPI GetAppCompatFlags2(HTASK hTask);
105 LONG WINAPI CsrBroadcastSystemMessageExW(DWORD dwflags,
106 LPDWORD lpdwRecipients,
107 UINT uiMessage,
108 WPARAM wParam,
109 LPARAM lParam,
110 PBSMINFO pBSMInfo);
111 BOOL WINAPI CliImmSetHotKey(DWORD dwID, UINT uModifiers, UINT uVirtualKey, HKL hKl);
112 HWND WINAPI GetTaskmanWindow(VOID);
113 HWND WINAPI GetProgmanWindow(VOID);
114
115 //
116 // User api hook
117 //
118
119 typedef struct _USERAPIHOOKINFO
120 {
121 DWORD m_size;
122 LPCWSTR m_dllname1;
123 LPCWSTR m_funname1;
124 LPCWSTR m_dllname2;
125 LPCWSTR m_funname2;
126 } USERAPIHOOKINFO,*PUSERAPIHOOKINFO;
127
128 typedef enum _UAPIHK
129 {
130 uahLoadInit,
131 uahStop,
132 uahShutdown
133 } UAPIHK, *PUAPIHK;
134
135 typedef DWORD (CALLBACK * USERAPIHOOKPROC)(UAPIHK State, ULONG_PTR Info);
136
137 typedef LRESULT(CALLBACK *WNDPROC_OWP)(HWND,UINT,WPARAM,LPARAM,ULONG_PTR,PDWORD);
138
139 typedef struct _UAHOWP
140 {
141 BYTE* MsgBitArray;
142 DWORD Size;
143 } UAHOWP, *PUAHOWP;
144
145 typedef struct tagUSERAPIHOOK
146 {
147 DWORD size;
148 WNDPROC DefWindowProcA;
149 WNDPROC DefWindowProcW;
150 UAHOWP DefWndProcArray;
151 FARPROC GetScrollInfo;
152 FARPROC SetScrollInfo;
153 FARPROC EnableScrollBar;
154 FARPROC AdjustWindowRectEx;
155 FARPROC SetWindowRgn;
156 WNDPROC_OWP PreWndProc;
157 WNDPROC_OWP PostWndProc;
158 UAHOWP WndProcArray;
159 WNDPROC_OWP PreDefDlgProc;
160 WNDPROC_OWP PostDefDlgProc;
161 UAHOWP DlgProcArray;
162 FARPROC GetSystemMetrics;
163 FARPROC SystemParametersInfoA;
164 FARPROC SystemParametersInfoW;
165 FARPROC ForceResetUserApiHook;
166 FARPROC DrawFrameControl;
167 FARPROC DrawCaption;
168 FARPROC MDIRedrawFrame;
169 FARPROC GetRealWindowOwner;
170 } USERAPIHOOK, *PUSERAPIHOOK;
171
172 BOOL WINAPI RegisterUserApiHook(PUSERAPIHOOKINFO puah);
173 BOOL WINAPI UnregisterUserApiHook(VOID);
174
175 #endif