home *** CD-ROM | disk | FTP | other *** search
/ Amiga Elysian Archive / AmigaElysianArchive.iso / prog / c / gcc233.lha / os-include / inline / diskfont.h < prev    next >
C/C++ Source or Header  |  1992-12-29  |  3KB  |  95 lines

  1. #ifndef _INLINE_DISKFONT_H
  2. #define _INLINE_DISKFONT_H
  3.  
  4. #include <sys/cdefs.h>
  5. #include <inline/stubs.h>
  6.  
  7. __BEGIN_DECLS
  8.  
  9. #ifndef BASE_EXT_DECL
  10. #define BASE_EXT_DECL extern struct Library * DiskfontBase;
  11. #endif
  12. #ifndef BASE_PAR_DECL
  13. #define BASE_PAR_DECL
  14. #define BASE_PAR_DECL0 void
  15. #endif
  16. #ifndef BASE_NAME
  17. #define BASE_NAME DiskfontBase
  18. #endif
  19.  
  20. static __inline LONG 
  21. AvailFonts (BASE_PAR_DECL STRPTR buffer,long bufBytes,long flags)
  22. {
  23.   BASE_EXT_DECL
  24.   register LONG  _res  __asm("d0");
  25.   register struct Library *a6 __asm("a6") = BASE_NAME;
  26.   register STRPTR a0 __asm("a0") = buffer;
  27.   register long d0 __asm("d0") = bufBytes;
  28.   register long d1 __asm("d1") = flags;
  29.   __asm __volatile ("jsr a6@(-0x24)"
  30.   : "=r" (_res)
  31.   : "r" (a6), "r" (a0), "r" (d0), "r" (d1)
  32.   : "a0","a1","d0","d1", "memory");
  33.   return _res;
  34. }
  35. static __inline void 
  36. DisposeFontContents (BASE_PAR_DECL struct FontContentsHeader *fontContentsHeader)
  37. {
  38.   BASE_EXT_DECL
  39.   register struct Library *a6 __asm("a6") = BASE_NAME;
  40.   register struct FontContentsHeader *a1 __asm("a1") = fontContentsHeader;
  41.   __asm __volatile ("jsr a6@(-0x30)"
  42.   : /* no output */
  43.   : "r" (a6), "r" (a1)
  44.   : "a0","a1","d0","d1", "memory");
  45. }
  46. static __inline struct FontContentsHeader *
  47. NewFontContents (BASE_PAR_DECL BPTR fontsLock,STRPTR fontName)
  48. {
  49.   BASE_EXT_DECL
  50.   register struct FontContentsHeader * _res  __asm("d0");
  51.   register struct Library *a6 __asm("a6") = BASE_NAME;
  52.   register BPTR a0 __asm("a0") = fontsLock;
  53.   register STRPTR a1 __asm("a1") = fontName;
  54.   __asm __volatile ("jsr a6@(-0x2a)"
  55.   : "=r" (_res)
  56.   : "r" (a6), "r" (a0), "r" (a1)
  57.   : "a0","a1","d0","d1", "memory");
  58.   return _res;
  59. }
  60. static __inline struct DiskFontHeader *
  61. NewScaledDiskFont (BASE_PAR_DECL struct TextFont *sourceFont,struct TextAttr *destTextAttr)
  62. {
  63.   BASE_EXT_DECL
  64.   register struct DiskFontHeader * _res  __asm("d0");
  65.   register struct Library *a6 __asm("a6") = BASE_NAME;
  66.   register struct TextFont *a0 __asm("a0") = sourceFont;
  67.   register struct TextAttr *a1 __asm("a1") = destTextAttr;
  68.   __asm __volatile ("jsr a6@(-0x36)"
  69.   : "=r" (_res)
  70.   : "r" (a6), "r" (a0), "r" (a1)
  71.   : "a0","a1","d0","d1", "memory");
  72.   return _res;
  73. }
  74. static __inline struct TextFont *
  75. OpenDiskFont (BASE_PAR_DECL struct TextAttr *textAttr)
  76. {
  77.   BASE_EXT_DECL
  78.   register struct TextFont * _res  __asm("d0");
  79.   register struct Library *a6 __asm("a6") = BASE_NAME;
  80.   register struct TextAttr *a0 __asm("a0") = textAttr;
  81.   __asm __volatile ("jsr a6@(-0x1e)"
  82.   : "=r" (_res)
  83.   : "r" (a6), "r" (a0)
  84.   : "a0","a1","d0","d1", "memory");
  85.   return _res;
  86. }
  87. #undef BASE_EXT_DECL
  88. #undef BASE_PAR_DECL
  89. #undef BASE_PAR_DECL0
  90. #undef BASE_NAME
  91.  
  92. __END_DECLS
  93.  
  94. #endif /* _INLINE_DISKFONT_H */
  95.