2 * Function callbacks for the library
4 * Copyright 1997 Alexandre Julliard
11 extern void TASK_Reschedule(void); /* loader/task.c */
13 /**********************************************************************
14 * CALLBACK_CallWndProc
16 static LRESULT WINAPI CALLBACK_CallWndProc( WNDPROC16 proc, HWND16 hwnd,
17 UINT16 msg, WPARAM16 wParam,
20 return proc( hwnd, msg, wParam, lParam );
24 /**********************************************************************
25 * CALLBACK_CallRegisterProc
27 static VOID WINAPI CALLBACK_CallRegisterProc( CONTEXT *context, INT32 offset)
29 fprintf( stderr, "Cannot call a register proc in Winelib\n" );
34 /**********************************************************************
35 * CALLBACK_CallDriverProc
37 static LRESULT WINAPI CALLBACK_CallDriverProc( DRIVERPROC16 proc, DWORD dwId,
38 HDRVR16 hdrvr, UINT16 msg,
39 LPARAM lp1, LPARAM lp2 )
41 return proc( dwId, hdrvr, msg, lp1, lp2 );
45 /**********************************************************************
46 * CALLBACK_CallDriverCallback
48 static LRESULT WINAPI CALLBACK_CallDriverCallback( FARPROC16 proc,
49 HANDLE16 hDev, UINT16 msg,
50 DWORD dwUser, LPARAM lp1,
53 return proc( hDev, msg, dwUser, lp1, lp2 );
57 /**********************************************************************
58 * CALLBACK_CallTimeFuncProc
60 static LRESULT WINAPI CALLBACK_CallTimeFuncProc( FARPROC16 proc, WORD id,
61 UINT16 msg, DWORD dwUser,
62 LPARAM lp1, LPARAM lp2 )
64 return proc( id, msg, dwUser, lp1, lp2 );
68 /**********************************************************************
69 * CALLBACK_CallWindowsExitProc
71 static INT16 WINAPI CALLBACK_CallWindowsExitProc( FARPROC16 proc, INT16 type)
77 /**********************************************************************
78 * CALLBACK_CallWordBreakProc
80 static INT16 WINAPI CALLBACK_CallWordBreakProc( EDITWORDBREAKPROC16 proc,
81 SEGPTR text, INT16 word,
82 INT16 len, INT16 action )
84 return proc( (LPSTR)text, word, len, action );
88 /**********************************************************************
89 * CALLBACK_CallBootAppProc
91 static void WINAPI CALLBACK_CallBootAppProc( FARPROC16 proc, HANDLE16 module,
98 /**********************************************************************
99 * CALLBACK_CallLoadAppSegProc
101 static WORD WINAPI CALLBACK_CallLoadAppSegProc( FARPROC16 proc,
102 HANDLE16 module, HFILE16 file,
105 return proc( module, file, seg );
109 /**********************************************************************
110 * CALLBACK_CallSystemTimerProc
112 static void WINAPI CALLBACK_CallSystemTimerProc( FARPROC16 proc )
118 /**********************************************************************
119 * CALLBACK_CallASPIPostProc
121 static LRESULT WINAPI CALLBACK_CallASPIPostProc( FARPROC16 proc, SEGPTR ptr )
126 /**********************************************************************
127 * CALLBACK_WinelibTable
129 * The callbacks function table for Winelib
131 static const CALLBACKS_TABLE CALLBACK_WinelibTable =
133 CALLBACK_CallRegisterProc, /* CallRegisterProc */
134 TASK_Reschedule, /* CallTaskRescheduleProc */
135 NULL, /* CallFrom16WndProc */
136 CALLBACK_CallWndProc, /* CallWndProc */
137 CALLBACK_CallDriverProc, /* CallDriverProc */
138 CALLBACK_CallDriverCallback, /* CallDriverCallback */
139 CALLBACK_CallTimeFuncProc, /* CallTimeFuncProc */
140 CALLBACK_CallWindowsExitProc, /* CallWindowsExitProc */
141 CALLBACK_CallWordBreakProc, /* CallWordBreakProc */
142 CALLBACK_CallBootAppProc, /* CallBootAppProc */
143 CALLBACK_CallLoadAppSegProc, /* CallLoadAppSegProc */
144 CALLBACK_CallSystemTimerProc, /* CallSystemTimerProc */
145 CALLBACK_CallASPIPostProc, /* CallASPIPostProc */
146 /* The graphics driver callbacks are never used in Winelib */
147 NULL, /* CallDrvControlProc */
148 NULL, /* CallDrvEnableProc */
149 NULL, /* CallDrvEnumDFontsProc */
150 NULL, /* CallDrvEnumObjProc */
151 NULL, /* CallDrvOutputProc */
152 NULL, /* CallDrvRealizeProc */
153 NULL, /* CallDrvStretchBltProc */
154 NULL /* CallDrvExtTextOutProc */
157 const CALLBACKS_TABLE *Callbacks = &CALLBACK_WinelibTable;