Removed a lot of unnecessary includes and fixed the compile errors.
[wine] / include / callback.h
1 /*
2  * Callback functions
3  *
4  * Copyright 1995 Alexandre Julliard
5  */
6
7 #ifndef __WINE_CALLBACK_H
8 #define __WINE_CALLBACK_H
9
10 #include "windef.h"
11 #include "winnt.h"
12 #include "wingdi.h"
13 #include "wine/winuser16.h"
14
15 extern int (*IF1632_CallLargeStack)( int (*func)(void), void *arg );
16
17 #define CALL_LARGE_STACK(func,arg) \
18     (IF1632_CallLargeStack ? \
19      IF1632_CallLargeStack( (int(*)())(func), (void *)(arg) ) : \
20      ((int(*)())(func))((void *)arg))
21
22 typedef void (*RELAY)();
23 extern FARPROC THUNK_Alloc( FARPROC16 func, RELAY relay );
24 extern void THUNK_Free( FARPROC thunk );
25
26 typedef struct
27 {
28     LONG (CALLBACK *CallRegisterShortProc)( CONTEXT86 *, INT );
29     LONG (CALLBACK *CallRegisterLongProc)( CONTEXT86 *, INT );
30     INT16 (CALLBACK *CallWindowsExitProc)( FARPROC16, INT16 );
31     INT16 (CALLBACK *CallWordBreakProc)( EDITWORDBREAKPROC16, SEGPTR, INT16,
32                                          INT16, INT16 );
33     VOID (CALLBACK *CallBootAppProc)( FARPROC16, HANDLE16, HFILE16 );
34     WORD (CALLBACK *CallLoadAppSegProc)( FARPROC16, HANDLE16, HFILE16, WORD );
35     WORD (CALLBACK *CallLocalNotifyFunc)( FARPROC16, WORD, HLOCAL16, WORD );
36     HGLOBAL16 (CALLBACK *CallResourceHandlerProc)( FARPROC16, HGLOBAL16, HMODULE16, HRSRC16 );
37     DWORD (CALLBACK *CallUTProc)( FARPROC16, DWORD, DWORD );
38     LRESULT (CALLBACK *CallASPIPostProc)( FARPROC16, SEGPTR );
39 } CALLBACKS_TABLE;
40
41 extern const CALLBACKS_TABLE *Callbacks;
42
43 typedef struct
44 {
45     BOOL16 WINAPI (*PeekMessage16)( LPMSG16 msg, HWND16 hwnd, 
46                                     UINT16 first, UINT16 last, UINT16 flags );
47     BOOL WINAPI (*PeekMessageA)( LPMSG lpmsg, HWND hwnd,
48                                      UINT min, UINT max, UINT wRemoveMsg );
49     BOOL WINAPI (*PeekMessageW)( LPMSG lpmsg, HWND hwnd, 
50                                      UINT min, UINT max, UINT wRemoveMsg );
51
52     BOOL16 WINAPI (*GetMessage16)( SEGPTR msg, HWND16 hwnd, 
53                                    UINT16 first, UINT16 last );
54     BOOL WINAPI (*GetMessageA)( MSG* lpmsg, HWND hwnd, 
55                                     UINT min, UINT max );
56     BOOL WINAPI (*GetMessageW)( MSG* lpmsg, HWND hwnd, 
57                                     UINT min, UINT max );
58
59     LRESULT WINAPI (*SendMessage16)( HWND16 hwnd, UINT16 msg, 
60                                      WPARAM16 wParam, LPARAM lParam );
61     LRESULT WINAPI (*SendMessageA)( HWND hwnd, UINT msg, 
62                                       WPARAM wParam, LPARAM lParam );
63     LRESULT WINAPI (*SendMessageW)( HWND hwnd, UINT msg, 
64                                       WPARAM wParam, LPARAM lParam );
65
66     BOOL16 WINAPI (*PostMessage16)( HWND16 hwnd, UINT16 message, 
67                                     WPARAM16 wParam, LPARAM lParam );
68     BOOL WINAPI (*PostMessageA)( HWND hwnd, UINT message, 
69                                      WPARAM wParam, LPARAM lParam );
70     BOOL WINAPI (*PostMessageW)( HWND hwnd, UINT message, 
71                                      WPARAM wParam, LPARAM lParam );
72
73     BOOL16 WINAPI (*PostAppMessage16)( HTASK16 hTask, UINT16 message, 
74                                        WPARAM16 wParam, LPARAM lParam );
75     BOOL WINAPI (*PostThreadMessageA)( DWORD idThread , UINT message,
76                                            WPARAM wParam, LPARAM lParam );
77     BOOL WINAPI (*PostThreadMessageW)( DWORD idThread , UINT message,
78                                            WPARAM wParam, LPARAM lParam );
79
80     BOOL16 WINAPI (*TranslateMessage16)( const MSG16 *msg );
81     BOOL WINAPI (*TranslateMessage)( const MSG *msg );
82
83     LONG WINAPI (*DispatchMessage16)( const MSG16* msg );
84     LONG WINAPI (*DispatchMessageA)( const MSG* msg );
85     LONG WINAPI (*DispatchMessageW)( const MSG* msg );
86
87     BOOL16 WINAPI (*RedrawWindow16)( HWND16 hwnd, const RECT16 *rectUpdate,
88                                      HRGN16 hrgnUpdate, UINT16 flags );
89
90     BOOL WINAPI (*RedrawWindow)( HWND hwnd, const RECT *rectUpdate,
91                                      HRGN hrgnUpdate, UINT flags );
92
93     WORD WINAPI (*UserSignalProc)( UINT uCode, DWORD dwThreadOrProcessID,
94                                    DWORD dwFlags, HMODULE16 hModule );
95     void WINAPI (*FinalUserInit16)( void );
96
97     INT16 WINAPI (*InitApp16)( HINSTANCE16 hInst );
98     HQUEUE16 WINAPI (*InitThreadInput16)( WORD unknown, WORD flags );
99     void WINAPI (*UserYield16)( void );
100     WORD WINAPI (*DestroyIcon32)( HGLOBAL16 handle, UINT16 flags );
101     DWORD WINAPI (*WaitForInputIdle)( HANDLE hProcess, DWORD dwTimeOut );
102     
103 }  CALLOUT_TABLE;
104
105 extern CALLOUT_TABLE Callout;
106
107
108 #endif /* __WINE_CALLBACK_H */