2 Copyright © 1995-2003, The AROS Development Team. All rights reserved.
6 #define NO_INLINE_STDARG /* turn off inline def */
8 #include <aros/asmcall.h>
10 #include <intuition/classusr.h>
11 #include <intuition/classes.h>
14 #include <proto/exec.h>
15 #include <proto/intuition.h>
16 #include <proto/muimaster.h>
19 #include "alib_intern.h"
20 #include "desktop_intern.h"
22 #include <clib/alib_protos.h>
25 #include <aros/debug.h>
28 All of the functions here have been copied from amiga.lib. This means we
29 can convenient things like DoMethod() in desktop.library.
32 static ULONG dbgDoMethodCount
= 0;
33 static ULONG dbgDoMethodNULLCount
= 0;
35 IPTR
DoMethodA(Object
* obj
, Msg message
)
38 D(bug("*** DoMethod count: %d\n", dbgDoMethodCount
));
39 ASSERT_VALID_PTR(obj
);
42 dbgDoMethodNULLCount
++;
43 D(bug("*** DoMethodNULL count: %d\n", dbgDoMethodNULLCount
));
46 ASSERT_VALID_PTR(OCLASS(obj
));
47 ASSERT_VALID_PTR(message
);
49 return (CallHookPkt((struct Hook
*) OCLASS(obj
), obj
, message
));
52 ULONG
DoMethod(Object
* obj
, ULONG MethodID
, ...)
54 AROS_SLOWSTACKMETHODS_PRE(MethodID
)
57 D(bug("*** DoMethod count: %d\n", dbgDoMethodCount
));
59 ASSERT_VALID_PTR(obj
);
63 dbgDoMethodNULLCount
++;
64 D(bug("*** DoMethodNULL count: %d\n", dbgDoMethodNULLCount
));
69 ASSERT_VALID_PTR(OCLASS(obj
));
72 (struct Hook
*) OCLASS(obj
), obj
,
73 AROS_SLOWSTACKMETHODS_ARG(MethodID
)
77 AROS_SLOWSTACKMETHODS_POST
80 IPTR
DoSuperMethodA(Class
* cl
, Object
* obj
, Msg message
)
84 return CallHookPkt((struct Hook
*) cl
->cl_Super
, obj
, message
);
85 } /* DoSuperMethodA */
87 ULONG
DoSuperMethod(Class
* cl
, Object
* obj
, ULONG MethodID
, ...)
89 AROS_SLOWSTACKMETHODS_PRE(MethodID
)
96 (struct Hook
*) cl
->cl_Super
, obj
,
97 AROS_SLOWSTACKMETHODS_ARG(MethodID
)
100 AROS_SLOWSTACKMETHODS_POST
101 } /* DoSuperMethod */
103 /* Putchar procedure needed by RawDoFmt() */
104 AROS_UFH2(void, __putChr
,
105 AROS_UFHA(UBYTE
, chr
, D0
),
106 AROS_UFHA(STRPTR
*, p
, A3
)
116 VOID
__sprintf(UBYTE
* buffer
, UBYTE
* format
, ...)
118 RawDoFmt(format
, &format
+ 1, (VOID_FUNC
) __putChr
, &buffer
);