x11gfx.hidd: support 32 bit modes
[AROS.git] / test / sdi / examples / libraries / libproto.h
blobf8b68d9b924b4b079d94411f19c878c16638b420
1 #ifndef LIBPROTO_H
2 #define LIBPROTO_H
4 #include <exec/types.h>
5 #include <exec/libraries.h>
6 #include <dos/bptr.h>
8 #include <SDI_lib.h>
10 #if defined(__amigaos4__)
11 #define __BASE_OR_IFACE_TYPE struct ExampleIFace *
12 #define __BASE_OR_IFACE_VAR IExample
13 #else
14 #define __BASE_OR_IFACE_TYPE struct LibraryHeader *
15 #define __BASE_OR_IFACE_VAR ExampleBase
16 #endif
17 #define __BASE_OR_IFACE __BASE_OR_IFACE_TYPE __BASE_OR_IFACE_VAR
19 struct LibraryHeader
21 struct Library libBase;
22 struct Library *sysBase;
23 BPTR segList;
26 // first the prototypes of all our public library functions
27 LIBPROTO(SayHelloOS4, char *, REG(a6, UNUSED __BASE_OR_IFACE));
28 LIBPROTO(SayHelloOS3, char *, REG(a6, UNUSED __BASE_OR_IFACE));
29 LIBPROTO(SayHelloMOS, char *, REG(a6, UNUSED __BASE_OR_IFACE));
30 LIBPROTO(Uppercase, char *, REG(a6, UNUSED __BASE_OR_IFACE), REG(a0, char *txt));
31 LIBPROTO(SPrintfA, char *, REG(a6, UNUSED __BASE_OR_IFACE), REG(a0, char *buf), REG(a1, char *format), REG(a2, RAWARG args));
32 LIBPROTOVA(SPrintf, char *, REG(a6, UNUSED __BASE_OR_IFACE), REG(a0, char *buf), REG(a1, char *format), ...);
34 #if defined(__AROS__)
35 AROS_LD0(char *, SayHelloOS4, struct LibraryHeader *, __BASE_OR_IFACE_VAR, 0, LIBSTUB);
36 AROS_LD0(char *, SayHelloOS3, struct LibraryHeader *, __BASE_OR_IFACE_VAR, 0, LIBSTUB);
37 AROS_LD0(char *, SayHelloMOS, struct LibraryHeader *, __BASE_OR_IFACE_VAR, 0, LIBSTUB);
38 AROS_LD1(char *, Uppercase, AROS_LDA(char *, txt, A0), struct LibraryHeader *, __BASE_OR_IFACE_VAR, 0, LIBSTUB);
39 AROS_LD3(char *, SPrintfA,
40 AROS_LDA(char *, buf, A0),
41 AROS_LDA(char *, format, A1),
42 AROS_LDA(RAWARG, args, A1),
43 struct LibraryHeader *, __BASE_OR_IFACE_VAR, 0, LIBSTUB);
44 #endif
46 #endif