Release 20000227.
[wine/multimedia.git] / include / callback.h
blob31a22f6e07d670797bd894e85ab976d1ad7074bf
1 /*
2 * Callback functions
4 * Copyright 1995 Alexandre Julliard
5 */
7 #ifndef __WINE_CALLBACK_H
8 #define __WINE_CALLBACK_H
10 #include "windef.h"
11 #include "winnt.h"
12 #include "wingdi.h"
13 #include "wine/winuser16.h"
15 extern int (*IF1632_CallLargeStack)( int (*func)(void), void *arg );
17 #define CALL_LARGE_STACK(func,arg) \
18 (IF1632_CallLargeStack ? \
19 IF1632_CallLargeStack( (int(*)())(func), (void *)(arg) ) : \
20 ((int(*)())(func))((void *)arg))
22 typedef void (*RELAY)();
23 extern FARPROC THUNK_Alloc( FARPROC16 func, RELAY relay );
24 extern void THUNK_Free( FARPROC thunk );
26 typedef struct
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;
41 extern const CALLBACKS_TABLE *Callbacks;
43 typedef struct
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 );
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 );
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 );
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 );
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 );
80 BOOL16 WINAPI (*TranslateMessage16)( const MSG16 *msg );
81 BOOL WINAPI (*TranslateMessage)( const MSG *msg );
83 LONG WINAPI (*DispatchMessage16)( const MSG16* msg );
84 LONG WINAPI (*DispatchMessageA)( const MSG* msg );
85 LONG WINAPI (*DispatchMessageW)( const MSG* msg );
87 BOOL16 WINAPI (*RedrawWindow16)( HWND16 hwnd, const RECT16 *rectUpdate,
88 HRGN16 hrgnUpdate, UINT16 flags );
90 BOOL WINAPI (*RedrawWindow)( HWND hwnd, const RECT *rectUpdate,
91 HRGN hrgnUpdate, UINT flags );
93 WORD WINAPI (*UserSignalProc)( UINT uCode, DWORD dwThreadOrProcessID,
94 DWORD dwFlags, HMODULE16 hModule );
95 void WINAPI (*FinalUserInit16)( void );
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 );
103 } CALLOUT_TABLE;
105 extern CALLOUT_TABLE Callout;
108 #endif /* __WINE_CALLBACK_H */