2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
5 Desc: amiga.lib function HookEntry()
9 #include <aros/system.h>
11 #include "alib_intern.h"
13 /******************************************************************************
16 #include <aros/asmcall.h>
17 #include <proto/alib.h>
19 AROS_UFH3(IPTR
, HookEntry
,
22 AROS_UFHA(struct Hook
*, hook
, A0
),
23 AROS_UFHA(APTR
, object
, A2
),
24 AROS_UFHA(APTR
, param
, A1
))
27 Some high level languages (HLL) don't allow to pass arguments in
28 registers. For these HLLs, it's not possible to call a hook
29 directly. To use hooks with these HLLs, you must put HookEntry into
30 hook->h_Entry and the real callback function into hook->h_SubEntry.
31 HookEntry will push the registers on the stack and then call
35 hook - Call this hook.
36 object - This is the object which is passed to the hook. The valid
37 values for this parameter depends on the definition of the called
39 param - Pass these parameters to the specified object
42 The return value depends on the definition of the hook.
51 CallHookA(), CallHook()
54 28.11.96 digulla created
56 ******************************************************************************/
59 return ((IPTR (*)(struct Hook
*, APTR
, APTR
))(hook
->h_SubEntry
))
60 (hook
, object
, param
);