2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
9 /*****************************************************************************
12 #include <utility/hooks.h>
13 #include <aros/asmcall.h>
14 #include <proto/utility.h>
16 AROS_LH3(IPTR
, CallHookPkt
,
19 AROS_LHA(struct Hook
*, hook
, A0
),
20 AROS_LHA(APTR
, object
, A2
),
21 AROS_LHA(APTR
, paramPacket
, A1
),
24 struct Library
*, UtilityBase
, 17, Utility
)
27 Call the callback hook defined by a Hook structure.
28 This is effectively a long jump to the hook->h_Entry vector
31 The Hook will be called with the same arguments as this function.
32 If your compiler cannot support correctly registered arguments
33 (most can), you can use the HookEntry function defined in amiga.lib
34 to push the arguments on the stack and call your function.
36 See the include file utility/hooks.h for more information.
39 hook - Pointer to an initialized Hook structure. See the
40 include file <utility/hooks.h> for a definition.
41 object - The object that this Hook is to act upon.
42 paramPacket - The arguments to this callback. This will depend
43 entirely on the type of the object.
46 Depends upon the Hook itself.
53 If your callback function does not have the correct register
54 definitions, the result of this function is entirely unreliable.
56 You can get the correct register definitions by using the AROS_UFHA()
57 macros (See <utility/hooks.h>).
64 *****************************************************************************/
68 return CALLHOOKPKT(hook
, object
, paramPacket
);