xref: /reactos/win32ss/include/callback.h (revision cc439606)
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_MAXIMUM               (16)
22 
23 typedef struct _WINDOWPROC_CALLBACK_ARGUMENTS
24 {
25   WNDPROC Proc;
26   BOOL IsAnsiProc;
27   HWND Wnd;
28   UINT Msg;
29   WPARAM wParam;
30   LPARAM lParam;
31   INT lParamBufferSize;
32   LRESULT Result;
33   /* char Buffer[]; */
34 } WINDOWPROC_CALLBACK_ARGUMENTS, *PWINDOWPROC_CALLBACK_ARGUMENTS;
35 
36 typedef struct _SENDASYNCPROC_CALLBACK_ARGUMENTS
37 {
38   SENDASYNCPROC Callback;
39   HWND Wnd;
40   UINT Msg;
41   ULONG_PTR Context;
42   LRESULT Result;
43 } SENDASYNCPROC_CALLBACK_ARGUMENTS, *PSENDASYNCPROC_CALLBACK_ARGUMENTS;
44 
45 typedef struct _CALL_BACK_INFO
46 {
47    SENDASYNCPROC CallBack;
48    ULONG_PTR Context;
49 } CALL_BACK_INFO, * PCALL_BACK_INFO;
50 
51 
52 typedef struct _HOOKPROC_CALLBACK_ARGUMENTS
53 {
54   INT HookId;
55   INT Code;
56   WPARAM wParam;
57   LPARAM lParam;
58   HOOKPROC Proc;
59   INT Mod;
60   ULONG_PTR offPfn;
61   BOOLEAN Ansi;
62   LRESULT Result;
63   WCHAR ModuleName[512];
64 } HOOKPROC_CALLBACK_ARGUMENTS, *PHOOKPROC_CALLBACK_ARGUMENTS;
65 
66 typedef struct _HOOKPROC_CBT_CREATEWND_EXTRA_ARGUMENTS
67 {
68   CREATESTRUCTW Cs; /* lpszName and lpszClass replaced by offsets */
69   HWND WndInsertAfter;
70   /* WCHAR szName[] */
71   /* WCHAR szClass[] */
72 } HOOKPROC_CBT_CREATEWND_EXTRA_ARGUMENTS, *PHOOKPROC_CBT_CREATEWND_EXTRA_ARGUMENTS;
73 
74 typedef struct _EVENTPROC_CALLBACK_ARGUMENTS
75 {
76   HWINEVENTHOOK hook;
77   DWORD event;
78   HWND hwnd;
79   LONG idObject;
80   LONG idChild;
81   DWORD dwEventThread;
82   DWORD dwmsEventTime;
83   WINEVENTPROC Proc;
84   INT_PTR Mod;
85   ULONG_PTR offPfn;
86 } EVENTPROC_CALLBACK_ARGUMENTS, *PEVENTPROC_CALLBACK_ARGUMENTS;
87 
88 typedef struct _LOADMENU_CALLBACK_ARGUMENTS
89 {
90   HINSTANCE hModule;
91   LPCWSTR InterSource;
92   WCHAR MenuName[1];
93 } LOADMENU_CALLBACK_ARGUMENTS, *PLOADMENU_CALLBACK_ARGUMENTS;
94 
95 typedef struct _COPYIMAGE_CALLBACK_ARGUMENTS
96 {
97   HANDLE hImage;
98   UINT uType;
99   int cxDesired;
100   int cyDesired;
101   UINT fuFlags;
102 } COPYIMAGE_CALLBACK_ARGUMENTS, *PCOPYIMAGE_CALLBACK_ARGUMENTS;
103 
104 typedef struct _CLIENT_LOAD_LIBRARY_ARGUMENTS
105 {
106     UNICODE_STRING strLibraryName;
107     UNICODE_STRING strInitFuncName;
108     BOOL Unload;
109     BOOL ApiHook;
110 } CLIENT_LOAD_LIBRARY_ARGUMENTS, *PCLIENT_LOAD_LIBRARY_ARGUMENTS;
111 
112 typedef struct _GET_CHARSET_INFO
113 {
114     LCID Locale;
115     CHARSETINFO Cs;
116 } GET_CHARSET_INFO, *PGET_CHARSET_INFO;
117 
118 typedef struct _SETWNDICONS_CALLBACK_ARGUMENTS
119 {
120     HICON hIconSample;
121     HICON hIconHand;
122     HICON hIconQuestion;
123     HICON hIconBang;
124     HICON hIconNote;
125     HICON hIconWindows;
126     HICON hIconSmWindows;
127 } SETWNDICONS_CALLBACK_ARGUMENTS, *PSETWNDICONS_CALLBACK_ARGUMENTS;
128 
129 typedef struct _DDEPOSTGET_CALLBACK_ARGUMENTS
130 {
131     INT Type;
132     MSG;
133     int size;
134     PVOID pvData;
135     BYTE buffer[1];
136 } DDEPOSTGET_CALLBACK_ARGUMENTS, *PDDEPOSTGET_CALLBACK_ARGUMENTS;
137 
138 typedef struct _SETOBM_CALLBACK_ARGUMENTS
139 {
140     struct tagOEMBITMAPINFO oembmi[93];
141 } SETOBM_CALLBACK_ARGUMENTS, *PSETOBM_CALLBACK_ARGUMENTS;
142 
143 typedef struct _LPK_CALLBACK_ARGUMENTS
144 {
145     LPWSTR lpString;
146     HDC hdc;
147     INT x;
148     INT y;
149     UINT flags;
150     RECT rect;
151     UINT count;
152     BOOL bRect;
153 } LPK_CALLBACK_ARGUMENTS, *PLPK_CALLBACK_ARGUMENTS;
154 
155 NTSTATUS WINAPI
156 User32CallCopyImageFromKernel(PVOID Arguments, ULONG ArgumentLength);
157 NTSTATUS WINAPI
158 User32CallSetWndIconsFromKernel(PVOID Arguments, ULONG ArgumentLength);
159 NTSTATUS WINAPI
160 User32CallWindowProcFromKernel(PVOID Arguments, ULONG ArgumentLength);
161 NTSTATUS WINAPI
162 User32CallSendAsyncProcForKernel(PVOID Arguments, ULONG ArgumentLength);
163 NTSTATUS WINAPI
164 User32LoadSysMenuTemplateForKernel(PVOID Arguments, ULONG ArgumentLength);
165 NTSTATUS WINAPI
166 User32SetupDefaultCursors(PVOID Arguments, ULONG ArgumentLength);
167 NTSTATUS WINAPI
168 User32CallHookProcFromKernel(PVOID Arguments, ULONG ArgumentLength);
169 NTSTATUS WINAPI
170 User32CallEventProcFromKernel(PVOID Arguments, ULONG ArgumentLength);
171 NTSTATUS WINAPI
172 User32CallLoadMenuFromKernel(PVOID Arguments, ULONG ArgumentLength);
173 NTSTATUS WINAPI
174 User32CallClientThreadSetupFromKernel(PVOID Arguments, ULONG ArgumentLength);
175 NTSTATUS WINAPI
176 User32CallClientLoadLibraryFromKernel(PVOID Arguments, ULONG ArgumentLength);
177 NTSTATUS WINAPI
178 User32CallGetCharsetInfo(PVOID Arguments, ULONG ArgumentLength);
179 NTSTATUS WINAPI
180 User32DeliverUserAPC(PVOID Arguments, ULONG ArgumentLength);
181 NTSTATUS WINAPI
182 User32CallDDEPostFromKernel(PVOID Arguments, ULONG ArgumentLength);
183 NTSTATUS WINAPI
184 User32CallDDEGetFromKernel(PVOID Arguments, ULONG ArgumentLength);
185 NTSTATUS WINAPI
186 User32CallOBMFromKernel(PVOID Arguments, ULONG ArgumentLength);
187 NTSTATUS WINAPI
188 User32CallLPKFromKernel(PVOID Arguments, ULONG ArgumentLength);
189 #endif /* __INCLUDE_USER32_CALLBACK_H */
190