[PSDK] Add CLSID_ISFBand, IShellFolderBand and IFolderBandPriv
[reactos.git] / sdk / include / reactos / undocuser.h
1 #ifndef _UNDOCUSER_H
2 #define _UNDOCUSER_H
3
4 #ifdef __cplusplus
5 extern "C" {
6 #endif /* defined(__cplusplus) */
7
8 /* Built in class atoms */
9 #define WC_MENU (MAKEINTATOM(0x8000))
10 #define WC_DESKTOP (MAKEINTATOM(0x8001))
11 #define WC_DIALOG (MAKEINTATOM(0x8002))
12 #define WC_SWITCH (MAKEINTATOM(0x8003))
13 #define WC_ICONTITLE (MAKEINTATOM(0x8004))
14
15 /* Non SDK Styles */
16 #define ES_COMBO 0x200 /* Parent is a combobox */
17 #define WS_MAXIMIZED WS_MAXIMIZE
18 #define WS_MINIMIZED WS_MINIMIZE
19
20 /* Non SDK ExStyles */
21 #define WS_EX_DRAGDETECT 0x00000002
22 #define WS_EX_MAKEVISIBLEWHENUNGHOSTED 0x00000800
23 #define WS_EX_FORCELEGACYRESIZENCMETR 0x00800000
24 #define WS_EX_UISTATEACTIVE 0x04000000
25 #define WS_EX_REDIRECTED 0x20000000
26 #define WS_EX_UISTATEKBACCELHIDDEN 0x40000000
27 #define WS_EX_UISTATEFOCUSRECTHIDDEN 0x80000000
28 #define WS_EX_SETANSICREATOR 0x80000000 // For WNDS_ANSICREATOR
29
30 /* Non SDK Window Message types. */
31 #define WM_SETVISIBLE 0x00000009
32 #define WM_ALTTABACTIVE 0x00000029
33 #define WM_ISACTIVEICON 0x00000035
34 #define WM_QUERYPARKICON 0x00000036
35 #define WM_CLIENTSHUTDOWN 0x0000003B
36 #define WM_COPYGLOBALDATA 0x00000049
37 #define WM_LOGONNOTIFY 0x0000004C
38 #define WM_KEYF1 0x0000004D
39 #define WM_KLUDGEMINRECT 0x0000008B
40 #define WM_UAHDRAWMENU 0x00000091
41 #define WM_UAHDRAWITEM 0x00000092 // WM_DRAWITEM
42 #define WM_UAHINITMENU 0x00000093
43 #define WM_UAHMEASUREITEM 0x00000094 // WM_MEASUREITEM
44 #define WM_UAHDRAWMENUNC 0x00000095
45 #define WM_NCUAHDRAWCAPTION 0x000000AE
46 #define WM_NCUAHDRAWFRAME 0x000000AF
47 #define WM_SYSTIMER 0x00000118
48 #define WM_LBTRACKPOINT 0x00000131
49 #define WM_CBLOSTTEXTFOCUS 0x00000167
50 #define LB_CARETON 0x000001a3
51 #define LB_CARETOFF 0x000001a4
52 #define MN_SETHMENU 0x000001e0
53 #define WM_DROPOBJECT 0x0000022A
54 #define WM_QUERYDROPOBJECT 0x0000022B
55 #define WM_BEGINDRAG 0x0000022C
56 #define WM_DRAGLOOP 0x0000022D
57 #define WM_DRAGSELECT 0x0000022E
58 #define WM_DRAGMOVE 0x0000022F
59 #define WM_POPUPSYSTEMMENU 0x00000313
60 #define WM_UAHINIT 0x0000031b
61 #define WM_CBT 0x000003FF // ReactOS only.
62 #define WM_MAXIMUM 0x0001FFFF
63
64 /* Non SDK DCE types.*/
65 #define DCX_USESTYLE 0x00010000
66 #define DCX_KEEPCLIPRGN 0x00040000
67 #define DCX_KEEPLAYOUT 0x40000000
68 #define DCX_PROCESSOWNED 0x80000000
69
70 /* Non SDK TPM types.*/
71 #define TPM_SYSTEM_MENU 0x00000200
72
73 /* NtUserCreateWindowEx dwFlags bits. */
74 #define NUCWE_ANSI 0x00000001
75 #define NUCWE_SIDEBYSIDE 0x40000000
76
77 /* Caret timer ID */
78 #define IDCARETTIMER (0xffff)
79 #define ID_TME_TIMER (0xFFFA)
80
81 /* SetWindowPos undocumented flags */
82 #define SWP_NOCLIENTSIZE 0x0800
83 #define SWP_NOCLIENTMOVE 0x1000
84 #define SWP_STATECHANGED 0x8000
85
86 /* NtUserSetScrollInfo mask to return original position before it is change */
87 #define SIF_PREVIOUSPOS 4096
88
89 /* ScrollWindow uses the window DC, ScrollWindowEx doesn't */
90 #define SW_SCROLLWNDDCE 0x8000
91
92 /* Non SDK Queue state flags. */
93 #define QS_SMRESULT 0x8000 /* see "Undoc. Windows" */
94 //
95 #define QS_EVENT 0x2000
96 #define QS_SYSEVENT (QS_EVENT|QS_SENDMESSAGE)
97 //
98
99 //
100 // Definitions used by WM_CLIENTSHUTDOWN
101 //
102 // Client Shutdown messages
103 #define MCS_ENDSESSION 1
104 #define MCS_QUERYENDSESSION 2
105 // Client Shutdown returns
106 #define MCSR_GOODFORSHUTDOWN 1
107 #define MCSR_SHUTDOWNFINISHED 2
108 #define MCSR_DONOTSHUTDOWN 3
109
110 //
111 // Definitions used by WM_LOGONNOTIFY
112 //
113 #define LN_LOGOFF 0x0
114 #define LN_SHELL_EXITED 0x2
115 #define LN_START_TASK_MANAGER 0x4
116 #define LN_LOCK_WORKSTATION 0x5
117 #define LN_UNLOCK_WORKSTATION 0x6
118 #define LN_MESSAGE_BEEP 0x9
119 #define LN_START_SCREENSAVE 0xA
120 #define LN_LOGOFF_CANCELED 0xB
121
122 //
123 // Undocumented flags for ExitWindowsEx
124 //
125 #define EWX_SHUTDOWN_CANCELED 0x0080
126 #define EWX_CALLER_SYSTEM 0x0100
127 #define EWX_CALLER_WINLOGON 0x0200
128 #define EWX_CALLER_WINLOGON_LOGOFF 0x1000 // WARNING!! Broken flag.
129 // All the range 0x0400 to 0x1000 is reserved for Winlogon.
130 // Flag 0x2000 appears to be a flag set when we call InitiateSystemShutdown* APIs (Winlogon shutdown APIs).
131 // 0x4000 is also reserved.
132 #define EWX_NOTIFY 0x8000
133 #define EWX_NONOTIFY 0x10000
134
135 // From WinCE 6.0 Imm.h SDK
136 // Returns for ImmProcessHotKey
137 #define IPHK_HOTKEY 0x0001
138 #define IPHK_PROCESSBYIME 0x0002
139 #define IPHK_CHECKCTRL 0x0004
140 #define IPHK_SKIPTHISKEY 0x0010
141
142 //
143 // Undocumented flags for DrawCaptionTemp
144 //
145 #define DC_NOVISIBLE 0x0800
146 #define DC_NOSENDMSG 0x2000
147 #define DC_FRAME 0x8000 // Missing from WinUser.H!
148
149 #define DC_DRAWCAPTIONMD 0x10000000
150 #define DC_REDRAWHUNGWND 0x20000000
151 #define DC_DRAWFRAMEMD 0x80000000
152
153 //
154 // Undocumented states for DrawFrameControl
155 //
156 #define DFCS_MENUARROWUP 0x0008
157 #define DFCS_MENUARROWDOWN 0x0010
158
159
160 #define STARTF_SCRNSAVER 0x80000000
161
162 #define MOD_WINLOGON_SAS 0x8000
163
164 #define CW_USEDEFAULT16 ((short)0x8000)
165
166 #define SBRG_SCROLLBAR 0 /* the scrollbar itself */
167 #define SBRG_TOPRIGHTBTN 1 /* the top or right button */
168 #define SBRG_PAGEUPRIGHT 2 /* the page up or page right region */
169 #define SBRG_SCROLLBOX 3 /* the scroll box */
170 #define SBRG_PAGEDOWNLEFT 4 /* the page down or page left region */
171 #define SBRG_BOTTOMLEFTBTN 5 /* the bottom or left button */
172
173 BOOL WINAPI UpdatePerUserSystemParameters(DWORD dwReserved, BOOL bEnable);
174 BOOL WINAPI SetLogonNotifyWindow(HWND Wnd);
175 BOOL WINAPI KillSystemTimer(HWND,UINT_PTR);
176 UINT_PTR WINAPI SetSystemTimer(HWND,UINT_PTR,UINT,TIMERPROC);
177 DWORD_PTR WINAPI SetSysColorsTemp(const COLORREF *, const HBRUSH *, DWORD_PTR);
178 BOOL WINAPI SetDeskWallPaper(LPCSTR);
179 VOID WINAPI ScrollChildren(HWND,UINT,WPARAM,LPARAM);
180 void WINAPI CalcChildScroll(HWND, INT);
181 BOOL WINAPI RegisterLogonProcess(DWORD,BOOL);
182 DWORD WINAPI GetAppCompatFlags(HTASK hTask);
183 DWORD WINAPI GetAppCompatFlags2(HTASK hTask);
184 LONG WINAPI CsrBroadcastSystemMessageExW(DWORD dwflags,
185 LPDWORD lpdwRecipients,
186 UINT uiMessage,
187 WPARAM wParam,
188 LPARAM lParam,
189 PBSMINFO pBSMInfo);
190 BOOL WINAPI CliImmSetHotKey(DWORD dwID, UINT uModifiers, UINT uVirtualKey, HKL hKl);
191 HWND WINAPI SetTaskmanWindow(HWND);
192 HWND WINAPI GetTaskmanWindow(VOID);
193 HWND WINAPI GetProgmanWindow(VOID);
194 BOOL WINAPI SetShellWindow(HWND);
195 BOOL WINAPI SetShellWindowEx(HWND, HWND);
196
197 BOOL WINAPI DrawCaptionTempA(HWND,HDC,const RECT*,HFONT,HICON,LPCSTR,UINT);
198 BOOL WINAPI DrawCaptionTempW(HWND,HDC,const RECT*,HFONT,HICON,LPCWSTR,UINT);
199 BOOL WINAPI PaintMenuBar(HWND hWnd, HDC hDC, ULONG left, ULONG right, ULONG top, BOOL bActive);
200
201 #ifdef UNICODE
202 #define DrawCaptionTemp DrawCaptionTempW
203 #else
204 #define DrawCaptionTemp DrawCaptionTempA
205 #endif
206
207
208 //
209 // User api hook
210 //
211
212 typedef LRESULT(CALLBACK *WNDPROC_OWP)(HWND,UINT,WPARAM,LPARAM,ULONG_PTR,PDWORD);
213 typedef int (WINAPI *SETWINDOWRGN)(HWND hWnd, HRGN hRgn, BOOL bRedraw);
214 typedef BOOL (WINAPI *GETSCROLLINFO)(HWND,INT,LPSCROLLINFO);
215 typedef INT (WINAPI *SETSCROLLINFO)(HWND,int,LPCSCROLLINFO,BOOL);
216 typedef BOOL (WINAPI *ENABLESCROLLBAR)(HWND,UINT,UINT);
217 typedef BOOL (WINAPI *ADJUSTWINDOWRECTEX)(LPRECT,DWORD,BOOL,DWORD);
218 typedef int (WINAPI *GETSYSTEMMETRICS)(int);
219 typedef BOOL (WINAPI *SYSTEMPARAMETERSINFOA)(UINT,UINT,PVOID,UINT);
220 typedef BOOL (WINAPI *SYSTEMPARAMETERSINFOW)(UINT,UINT,PVOID,UINT);
221 typedef BOOL (__fastcall *FORCERESETUSERAPIHOOK)(HINSTANCE);
222 typedef BOOL (WINAPI *DRAWFRAMECONTROL)(HDC,LPRECT,UINT,UINT);
223 typedef BOOL (WINAPI *DRAWCAPTION)(HWND,HDC,LPCRECT,UINT);
224 typedef BOOL (WINAPI *MDIREDRAWFRAME)(HWND,DWORD);
225 typedef DWORD (WINAPI *GETREALWINDOWOWNER)(HWND);
226
227 typedef struct _UAHOWP
228 {
229 BYTE* MsgBitArray;
230 DWORD Size;
231 } UAHOWP, *PUAHOWP;
232
233 #define UAH_HOOK_MESSAGE(uahowp, msg) uahowp.MsgBitArray[msg/8] |= (1 << (msg % 8));
234 #define UAH_IS_MESSAGE_HOOKED(uahowp, msg) (uahowp.MsgBitArray[msg/8] & (1 << (msg % 8)))
235 #define UAHOWP_MAX_SIZE WM_USER/8
236
237 typedef struct tagUSERAPIHOOK
238 {
239 DWORD size;
240 WNDPROC DefWindowProcA;
241 WNDPROC DefWindowProcW;
242 UAHOWP DefWndProcArray;
243 GETSCROLLINFO GetScrollInfo;
244 SETSCROLLINFO SetScrollInfo;
245 ENABLESCROLLBAR EnableScrollBar;
246 ADJUSTWINDOWRECTEX AdjustWindowRectEx;
247 SETWINDOWRGN SetWindowRgn;
248 WNDPROC_OWP PreWndProc;
249 WNDPROC_OWP PostWndProc;
250 UAHOWP WndProcArray;
251 WNDPROC_OWP PreDefDlgProc;
252 WNDPROC_OWP PostDefDlgProc;
253 UAHOWP DlgProcArray;
254 GETSYSTEMMETRICS GetSystemMetrics;
255 SYSTEMPARAMETERSINFOA SystemParametersInfoA;
256 SYSTEMPARAMETERSINFOW SystemParametersInfoW;
257 FORCERESETUSERAPIHOOK ForceResetUserApiHook;
258 DRAWFRAMECONTROL DrawFrameControl;
259 DRAWCAPTION DrawCaption;
260 MDIREDRAWFRAME MDIRedrawFrame;
261 GETREALWINDOWOWNER GetRealWindowOwner;
262 } USERAPIHOOK, *PUSERAPIHOOK;
263
264 typedef enum _UAPIHK
265 {
266 uahLoadInit,
267 uahStop,
268 uahShutdown
269 } UAPIHK, *PUAPIHK;
270
271 typedef BOOL(CALLBACK *USERAPIHOOKPROC)(UAPIHK State, PUSERAPIHOOK puah);
272
273 typedef struct _USERAPIHOOKINFO
274 {
275 DWORD m_size;
276 LPCWSTR m_dllname1;
277 LPCWSTR m_funname1;
278 LPCWSTR m_dllname2;
279 LPCWSTR m_funname2;
280 } USERAPIHOOKINFO,*PUSERAPIHOOKINFO;
281
282 #if (WINVER == _WIN32_WINNT_WINXP)
283 BOOL WINAPI RegisterUserApiHook(HINSTANCE hInstance, USERAPIHOOKPROC CallbackFunc);
284 #elif (WINVER == _WIN32_WINNT_WS03)
285 BOOL WINAPI RegisterUserApiHook(PUSERAPIHOOKINFO puah);
286 #endif
287
288 BOOL WINAPI UnregisterUserApiHook(VOID);
289
290 #ifdef __cplusplus
291 } /* extern "C" */
292 #endif /* defined(__cplusplus) */
293
294 #endif