Release 970415
[wine.git] / include / callback.h
blob4c2ed26dab68e39a0535f8e138bff9795be03407
1 /*
2 * Callback functions
4 * Copyright 1995 Alexandre Julliard
5 */
7 #ifndef __WINE_CALLBACK_H
8 #define __WINE_CALLBACK_H
10 #include "wintypes.h"
11 #include "winnt.h"
13 extern
14 int CallTo32_LargeStack( int (*func)(), int nbargs, ... );
16 /* List of the 16-bit callback functions. This list is used */
17 /* by the build program to generate the file if1632/callto16.S */
19 /* func parameters */
20 extern WORD CallTo16_word_ ( FARPROC16 );
22 #ifndef WINELIB
24 extern void CallTo16_regs_ ( const CONTEXT *context );
25 extern WORD CallTo16_word_w ( FARPROC16, WORD );
26 extern WORD CallTo16_word_ww ( FARPROC16, WORD, WORD );
27 extern WORD CallTo16_word_wl ( FARPROC16, WORD, LONG );
28 extern WORD CallTo16_word_ll ( FARPROC16, LONG, LONG );
29 extern WORD CallTo16_word_www ( FARPROC16, WORD, WORD, WORD );
30 extern WORD CallTo16_word_wwl ( FARPROC16, WORD, WORD, LONG );
31 extern WORD CallTo16_word_wlw ( FARPROC16, WORD, LONG, WORD );
32 extern LONG CallTo16_long_wwl ( FARPROC16, WORD, WORD, LONG );
33 extern WORD CallTo16_word_llwl ( FARPROC16, LONG, LONG, WORD, LONG );
34 extern LONG CallTo16_long_wwwl ( FARPROC16, WORD, WORD, WORD, LONG );
35 extern WORD CallTo16_word_lwww ( FARPROC16, LONG, WORD, WORD, WORD );
36 extern WORD CallTo16_word_wwll ( FARPROC16, WORD, WORD, LONG, LONG );
37 extern WORD CallTo16_word_wllwl( FARPROC16, WORD, LONG, LONG, WORD, LONG );
38 extern LONG CallTo16_long_lwwll( FARPROC16, LONG, WORD, WORD, LONG, LONG );
39 extern WORD CallTo16_word_wwlll( FARPROC16, WORD, WORD, LONG, LONG, LONG );
40 extern LONG CallTo16_long_lllllllwlwwwl( FARPROC16, LONG, LONG, LONG,
41 LONG, LONG, LONG, LONG, WORD, LONG,
42 WORD, WORD, WORD, LONG );
43 extern WORD CallTo16_word_lwll ( FARPROC16, LONG, WORD, LONG, LONG);
44 extern WORD CallTo16_word_lwlll( FARPROC16, LONG, WORD, LONG, LONG, LONG );
45 extern WORD CallTo16_word_llll ( FARPROC16, LONG, LONG, LONG, LONG);
46 extern LONG CallTo16_long_lwlll( FARPROC16, LONG, WORD, LONG, LONG, LONG );
47 extern LONG CallTo16_long_lwwllwlllllw( FARPROC16, LONG, WORD, WORD, LONG,
48 LONG, WORD, LONG, LONG, LONG, LONG,
49 LONG, WORD);
51 #define CallDriverProc( func, dwId, msg, hdrvr, lparam1, lparam2 ) \
52 CallTo16_long_lwwll( func, dwId, msg, hdrvr, lparam1, lparam2 )
53 #define CallTimeFuncProc( func, id, msg, dwUser, dw1, dw2 ) \
54 CallTo16_word_wwlll( func, id, msg, dwUser, dw1, dw2 )
55 #define CallWindowsExitProc( func, nExitType ) \
56 CallTo16_word_w( func, nExitType )
57 #define CallWndProc16( func, hwnd, msg, wParam, lParam ) \
58 CallTo16_long_wwwl( (FARPROC16)(func), hwnd, msg, wParam, lParam )
59 #define CallWordBreakProc16( func, lpch, ichCurrent, cch, code ) \
60 CallTo16_word_lwww( func, lpch, ichCurrent, cch, code )
61 #define CallWndProcNCCREATE16( func, exStyle, clsName, winName, style, \
62 x, y, cx, cy, hparent, hmenu, instance, \
63 params, hwnd, msg, wParam, lParam ) \
64 CallTo16_long_lllllllwlwwwl( (FARPROC16)(func), exStyle, clsName, winName,\
65 style, MAKELONG(y,x), MAKELONG(cy,cx), \
66 MAKELONG(hmenu,hparent), instance, params, \
67 hwnd, msg, wParam, lParam )
70 /* List of the 32-bit callback functions. This list is used */
71 /* by the build program to generate the file if1632/callto32.S */
73 extern LONG CallTo32_0( FARPROC32 );
74 extern LONG CallTo32_1( FARPROC32, DWORD );
75 extern LONG CallTo32_2( FARPROC32, DWORD, DWORD );
76 extern LONG CallTo32_3( FARPROC32, DWORD, DWORD, DWORD );
77 extern LONG CallTo32_4( FARPROC32, DWORD, DWORD, DWORD, DWORD );
78 extern LONG CallTo32_5( FARPROC32, DWORD, DWORD, DWORD, DWORD, DWORD );
80 #define CallTaskStart32( func ) \
81 CallTo32_0( func )
82 #define CallDLLEntryProc32( func, hmodule, a, b ) \
83 CallTo32_3( func, hmodule, a, b )
84 #define CallWndProc32( func, hwnd, msg, wParam, lParam ) \
85 CallTo32_4( func, hwnd, msg, wParam, lParam )
86 #define CallWordBreakProc32A( func, lpch, ichCurrent, cch, code ) \
87 CallTo32_4( func, (DWORD)lpch, ichCurrent, cch, code )
90 #else /* WINELIB */
92 #define CallDriverProc( func, dwId, msg, hdrvr, lparam1, lparam2 ) \
93 (*func)( dwId, msg, hdrvr, lparam1, lparam2 )
94 #define CallTimeFuncProc( func, id, msg, dwUser, dw1, dw2 ) \
95 (*func)( id, msg, dwUser, dw1, dw2 )
96 #define CallWindowsExitProc( func, nExitType ) \
97 (*func)( nExitType )
98 #define CallWndProc16( func, hwnd, msg, wParam, lParam ) \
99 (*func)( hwnd, msg, wParam, lParam )
100 #define CallWndProc32( func, hwnd, msg, wParam, lParam ) \
101 (*func)( hwnd, msg, wParam, lParam )
102 #define CallWordBreakProc16( func, lpch, ichCurrent, cch, code ) \
103 (*func)( lpch, ichCurrent, cch, code )
104 #define CallWordBreakProc32A( func, lpch, ichCurrent, cch, code ) \
105 (*func)( lpch, ichCurrent, cch, code )
107 #endif /* WINELIB */
110 #endif /* __WINE_CALLBACK_H */