xref: /reactos/win32ss/include/callback.h (revision 3c5a56ed)
1 #ifndef __INCLUDE_USER32_CALLBACK_H
2 #define __INCLUDE_USER32_CALLBACK_H
3 
4 #define USER32_CALLBACK_WINDOWPROC            (0)
5 #define USER32_CALLBACK_SENDASYNCPROC         (1)
6 #define USER32_CALLBACK_LOADSYSMENUTEMPLATE   (2)
7 #define USER32_CALLBACK_LOADDEFAULTCURSORS    (3)
8 #define USER32_CALLBACK_HOOKPROC              (4)
9 #define USER32_CALLBACK_EVENTPROC             (5)
10 #define USER32_CALLBACK_LOADMENU              (6)
11 #define USER32_CALLBACK_CLIENTTHREADSTARTUP   (7)
12 #define USER32_CALLBACK_CLIENTLOADLIBRARY     (8)
13 #define USER32_CALLBACK_GETCHARSETINFO        (9)
14 #define USER32_CALLBACK_COPYIMAGE             (10)
15 #define USER32_CALLBACK_SETWNDICONS           (11)
16 #define USER32_CALLBACK_DELIVERUSERAPC        (12)
17 #define USER32_CALLBACK_DDEPOST               (13)
18 #define USER32_CALLBACK_DDEGET                (14)
19 #define USER32_CALLBACK_SETOBM                (15)
20 #define USER32_CALLBACK_LPK                   (16)
21 #define USER32_CALLBACK_UMPD                  (17)
22 #define USER32_CALLBACK_IMMPROCESSKEY         (18)
23 #define USER32_CALLBACK_IMMLOADLAYOUT         (19)
24 #define USER32_CALLBACK_MAXIMUM               USER32_CALLBACK_IMMLOADLAYOUT
25 
26 typedef struct _WINDOWPROC_CALLBACK_ARGUMENTS
27 {
28   WNDPROC Proc;
29   BOOL IsAnsiProc;
30   HWND Wnd;
31   UINT Msg;
32   WPARAM wParam;
33   LPARAM lParam;
34   INT lParamBufferSize;
35   LRESULT Result;
36   /* char Buffer[]; */
37 } WINDOWPROC_CALLBACK_ARGUMENTS, *PWINDOWPROC_CALLBACK_ARGUMENTS;
38 
39 typedef struct _SENDASYNCPROC_CALLBACK_ARGUMENTS
40 {
41   SENDASYNCPROC Callback;
42   HWND Wnd;
43   UINT Msg;
44   ULONG_PTR Context;
45   LRESULT Result;
46 } SENDASYNCPROC_CALLBACK_ARGUMENTS, *PSENDASYNCPROC_CALLBACK_ARGUMENTS;
47 
48 typedef struct _CALL_BACK_INFO
49 {
50    SENDASYNCPROC CallBack;
51    ULONG_PTR Context;
52 } CALL_BACK_INFO, * PCALL_BACK_INFO;
53 
54 
55 typedef struct _HOOKPROC_CALLBACK_ARGUMENTS
56 {
57   INT HookId;
58   INT Code;
59   WPARAM wParam;
60   LPARAM lParam;
61   HOOKPROC Proc;
62   INT Mod;
63   ULONG_PTR offPfn;
64   BOOLEAN Ansi;
65   LRESULT Result;
66   UINT lParamSize;
67   WCHAR ModuleName[512];
68 } HOOKPROC_CALLBACK_ARGUMENTS, *PHOOKPROC_CALLBACK_ARGUMENTS;
69 
70 typedef struct _HOOKPROC_CBT_CREATEWND_EXTRA_ARGUMENTS
71 {
72   CREATESTRUCTW Cs; /* lpszName and lpszClass replaced by offsets */
73   HWND WndInsertAfter;
74   /* WCHAR szName[] */
75   /* WCHAR szClass[] */
76 } HOOKPROC_CBT_CREATEWND_EXTRA_ARGUMENTS, *PHOOKPROC_CBT_CREATEWND_EXTRA_ARGUMENTS;
77 
78 typedef struct tagCWP_Struct
79 {
80    HOOKPROC_CALLBACK_ARGUMENTS hpca;
81    CWPSTRUCT cwps;
82    PBYTE Extra[4];
83 } CWP_Struct, *PCWP_Struct;
84 
85 typedef struct tagCWPR_Struct
86 {
87    HOOKPROC_CALLBACK_ARGUMENTS hpca;
88    CWPRETSTRUCT cwprs;
89    PBYTE Extra[4];
90 } CWPR_Struct, *PCWPR_Struct;
91 
92 typedef struct _EVENTPROC_CALLBACK_ARGUMENTS
93 {
94   HWINEVENTHOOK hook;
95   DWORD event;
96   HWND hwnd;
97   LONG idObject;
98   LONG idChild;
99   DWORD dwEventThread;
100   DWORD dwmsEventTime;
101   WINEVENTPROC Proc;
102   INT_PTR Mod;
103   ULONG_PTR offPfn;
104 } EVENTPROC_CALLBACK_ARGUMENTS, *PEVENTPROC_CALLBACK_ARGUMENTS;
105 
106 typedef struct _LOADMENU_CALLBACK_ARGUMENTS
107 {
108   HINSTANCE hModule;
109   LPCWSTR InterSource;
110   WCHAR MenuName[1];
111 } LOADMENU_CALLBACK_ARGUMENTS, *PLOADMENU_CALLBACK_ARGUMENTS;
112 
113 typedef struct _COPYIMAGE_CALLBACK_ARGUMENTS
114 {
115   HANDLE hImage;
116   UINT uType;
117   int cxDesired;
118   int cyDesired;
119   UINT fuFlags;
120 } COPYIMAGE_CALLBACK_ARGUMENTS, *PCOPYIMAGE_CALLBACK_ARGUMENTS;
121 
122 typedef struct _CLIENT_LOAD_LIBRARY_ARGUMENTS
123 {
124     UNICODE_STRING strLibraryName;
125     UNICODE_STRING strInitFuncName;
126     BOOL Unload;
127     BOOL ApiHook;
128 } CLIENT_LOAD_LIBRARY_ARGUMENTS, *PCLIENT_LOAD_LIBRARY_ARGUMENTS;
129 
130 typedef struct _GET_CHARSET_INFO
131 {
132     LCID Locale;
133     CHARSETINFO Cs;
134 } GET_CHARSET_INFO, *PGET_CHARSET_INFO;
135 
136 typedef struct _SETWNDICONS_CALLBACK_ARGUMENTS
137 {
138     HICON hIconSample;
139     HICON hIconHand;
140     HICON hIconQuestion;
141     HICON hIconBang;
142     HICON hIconNote;
143     HICON hIconWindows;
144     HICON hIconSmWindows;
145 } SETWNDICONS_CALLBACK_ARGUMENTS, *PSETWNDICONS_CALLBACK_ARGUMENTS;
146 
147 typedef struct _DDEPOSTGET_CALLBACK_ARGUMENTS
148 {
149     INT Type;
150     MSG;
151     int size;
152     PVOID pvData;
153     BYTE buffer[1];
154 } DDEPOSTGET_CALLBACK_ARGUMENTS, *PDDEPOSTGET_CALLBACK_ARGUMENTS;
155 
156 typedef struct _SETOBM_CALLBACK_ARGUMENTS
157 {
158     struct tagOEMBITMAPINFO oembmi[93];
159 } SETOBM_CALLBACK_ARGUMENTS, *PSETOBM_CALLBACK_ARGUMENTS;
160 
161 typedef struct _LPK_CALLBACK_ARGUMENTS
162 {
163     LPWSTR lpString;
164     HDC hdc;
165     INT x;
166     INT y;
167     UINT flags;
168     RECT rect;
169     UINT count;
170     BOOL bRect;
171 } LPK_CALLBACK_ARGUMENTS, *PLPK_CALLBACK_ARGUMENTS;
172 
173 typedef struct _IMMPROCESSKEY_CALLBACK_ARGUMENTS
174 {
175     HWND    hWnd;
176     HKL     hKL;
177     UINT    vKey;
178     LPARAM  lParam;
179     DWORD   dwHotKeyID;
180 } IMMPROCESSKEY_CALLBACK_ARGUMENTS, *PIMMPROCESSKEY_CALLBACK_ARGUMENTS;
181 
182 typedef struct _IMMLOADLAYOUT_CALLBACK_ARGUMENTS
183 {
184     HKL hKL;
185 } IMMLOADLAYOUT_CALLBACK_ARGUMENTS, *PIMMLOADLAYOUT_CALLBACK_ARGUMENTS;
186 
187 typedef struct _IMMLOADLAYOUT_CALLBACK_OUTPUT
188 {
189     BOOL ret;
190     IMEINFOEX iiex;
191 } IMMLOADLAYOUT_CALLBACK_OUTPUT, *PIMMLOADLAYOUT_CALLBACK_OUTPUT;
192 
193 NTSTATUS WINAPI
194 User32CallCopyImageFromKernel(PVOID Arguments, ULONG ArgumentLength);
195 NTSTATUS WINAPI
196 User32CallSetWndIconsFromKernel(PVOID Arguments, ULONG ArgumentLength);
197 NTSTATUS WINAPI
198 User32CallWindowProcFromKernel(PVOID Arguments, ULONG ArgumentLength);
199 NTSTATUS WINAPI
200 User32CallSendAsyncProcForKernel(PVOID Arguments, ULONG ArgumentLength);
201 NTSTATUS WINAPI
202 User32LoadSysMenuTemplateForKernel(PVOID Arguments, ULONG ArgumentLength);
203 NTSTATUS WINAPI
204 User32SetupDefaultCursors(PVOID Arguments, ULONG ArgumentLength);
205 NTSTATUS WINAPI
206 User32CallHookProcFromKernel(PVOID Arguments, ULONG ArgumentLength);
207 NTSTATUS WINAPI
208 User32CallEventProcFromKernel(PVOID Arguments, ULONG ArgumentLength);
209 NTSTATUS WINAPI
210 User32CallLoadMenuFromKernel(PVOID Arguments, ULONG ArgumentLength);
211 NTSTATUS WINAPI
212 User32CallClientThreadSetupFromKernel(PVOID Arguments, ULONG ArgumentLength);
213 NTSTATUS WINAPI
214 User32CallClientLoadLibraryFromKernel(PVOID Arguments, ULONG ArgumentLength);
215 NTSTATUS WINAPI
216 User32CallGetCharsetInfo(PVOID Arguments, ULONG ArgumentLength);
217 NTSTATUS WINAPI
218 User32DeliverUserAPC(PVOID Arguments, ULONG ArgumentLength);
219 NTSTATUS WINAPI
220 User32CallDDEPostFromKernel(PVOID Arguments, ULONG ArgumentLength);
221 NTSTATUS WINAPI
222 User32CallDDEGetFromKernel(PVOID Arguments, ULONG ArgumentLength);
223 NTSTATUS WINAPI
224 User32CallOBMFromKernel(PVOID Arguments, ULONG ArgumentLength);
225 NTSTATUS WINAPI
226 User32CallLPKFromKernel(PVOID Arguments, ULONG ArgumentLength);
227 NTSTATUS WINAPI
228 User32CallUMPDFromKernel(PVOID Arguments, ULONG ArgumentLength);
229 NTSTATUS WINAPI
230 User32CallImmProcessKeyFromKernel(PVOID Arguments, ULONG ArgumentLength);
231 NTSTATUS WINAPI
232 User32CallImmLoadLayoutFromKernel(PVOID Arguments, ULONG ArgumentLength);
233 
234 #endif /* __INCLUDE_USER32_CALLBACK_H */
235