Documented GVF_SAVE_VAR alongside other flags, and removed a query/doubt
[AROS.git] / rom / utility / callhookpkt.c
blob11724048c943d52786c296f1054531428ee30605
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Call a callback hook.
6 */
7 #include "intern.h"
9 /*****************************************************************************
11 NAME */
12 #include <utility/hooks.h>
13 #include <aros/asmcall.h>
14 #include <proto/utility.h>
16 AROS_LH3(IPTR, CallHookPkt,
18 /* SYNOPSIS */
19 AROS_LHA(struct Hook *, hook, A0),
20 AROS_LHA(APTR , object, A2),
21 AROS_LHA(APTR , paramPacket, A1),
23 /* LOCATION */
24 struct Library *, UtilityBase, 17, Utility)
26 /* FUNCTION
27 Call the callback hook defined by a Hook structure.
28 This is effectively a long jump to the hook->h_Entry vector
29 of the structure.
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.
38 INPUTS
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.
45 RESULT
46 Depends upon the Hook itself.
48 NOTES
50 EXAMPLE
52 BUGS
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>).
59 SEE ALSO
60 amiga.lib/CallHook()
62 INTERNALS
64 *****************************************************************************/
66 AROS_LIBFUNC_INIT
68 return CALLHOOKPKT(hook, object, paramPacket);
70 AROS_LIBFUNC_EXIT
71 } /* CallHookPkt() */