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