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