home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD1.bin / gnu / os-include / inline / diskfont.h < prev    next >
C/C++ Source or Header  |  1994-09-22  |  3KB  |  100 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
  11. #define BASE_EXT_DECL0 extern struct Library * DiskfontBase;
  12. #endif
  13. #ifndef BASE_PAR_DECL
  14. #define BASE_PAR_DECL
  15. #define BASE_PAR_DECL0 void
  16. #endif
  17. #ifndef BASE_NAME
  18. #define BASE_NAME DiskfontBase
  19. #endif
  20.  
  21. BASE_EXT_DECL0
  22.  
  23. extern __inline LONG 
  24. AvailFonts (BASE_PAR_DECL STRPTR buffer,long bufBytes,long flags)
  25. {
  26.   BASE_EXT_DECL
  27.   register LONG  _res  __asm("d0");
  28.   register struct Library *a6 __asm("a6") = BASE_NAME;
  29.   register STRPTR a0 __asm("a0") = buffer;
  30.   register long d0 __asm("d0") = bufBytes;
  31.   register long d1 __asm("d1") = flags;
  32.   __asm __volatile ("jsr a6@(-0x24)"
  33.   : "=r" (_res)
  34.   : "r" (a6), "r" (a0), "r" (d0), "r" (d1)
  35.   : "a0","a1","d0","d1", "memory");
  36.   return _res;
  37. }
  38. extern __inline void 
  39. DisposeFontContents (BASE_PAR_DECL struct FontContentsHeader *fontContentsHeader)
  40. {
  41.   BASE_EXT_DECL
  42.   register struct Library *a6 __asm("a6") = BASE_NAME;
  43.   register struct FontContentsHeader *a1 __asm("a1") = fontContentsHeader;
  44.   __asm __volatile ("jsr a6@(-0x30)"
  45.   : /* no output */
  46.   : "r" (a6), "r" (a1)
  47.   : "a0","a1","d0","d1", "memory");
  48. }
  49. extern __inline struct FontContentsHeader *
  50. NewFontContents (BASE_PAR_DECL BPTR fontsLock,STRPTR fontName)
  51. {
  52.   BASE_EXT_DECL
  53.   register struct FontContentsHeader * _res  __asm("d0");
  54.   register struct Library *a6 __asm("a6") = BASE_NAME;
  55.   register BPTR a0 __asm("a0") = fontsLock;
  56.   register STRPTR a1 __asm("a1") = fontName;
  57.   __asm __volatile ("jsr a6@(-0x2a)"
  58.   : "=r" (_res)
  59.   : "r" (a6), "r" (a0), "r" (a1)
  60.   : "a0","a1","d0","d1", "memory");
  61.   return _res;
  62. }
  63. extern __inline struct DiskFont *
  64. NewScaledDiskFont (BASE_PAR_DECL struct TextFont *sourceFont,struct TextAttr *destTextAttr)
  65. {
  66.   BASE_EXT_DECL
  67.   register struct DiskFont * _res  __asm("d0");
  68.   register struct Library *a6 __asm("a6") = BASE_NAME;
  69.   register struct TextFont *a0 __asm("a0") = sourceFont;
  70.   register struct TextAttr *a1 __asm("a1") = destTextAttr;
  71.   __asm __volatile ("jsr a6@(-0x36)"
  72.   : "=r" (_res)
  73.   : "r" (a6), "r" (a0), "r" (a1)
  74.   : "a0","a1","d0","d1", "memory");
  75.   return _res;
  76. }
  77. extern __inline struct TextFont *
  78. OpenDiskFont (BASE_PAR_DECL struct TextAttr *textAttr)
  79. {
  80.   BASE_EXT_DECL
  81.   register struct TextFont * _res  __asm("d0");
  82.   register struct Library *a6 __asm("a6") = BASE_NAME;
  83.   register struct TextAttr *a0 __asm("a0") = textAttr;
  84.   __asm __volatile ("jsr a6@(-0x1e)"
  85.   : "=r" (_res)
  86.   : "r" (a6), "r" (a0)
  87.   : "a0","a1","d0","d1", "memory");
  88.   return _res;
  89. }
  90.  
  91. #undef BASE_EXT_DECL
  92. #undef BASE_EXT_DECL0
  93. #undef BASE_PAR_DECL
  94. #undef BASE_PAR_DECL0
  95. #undef BASE_NAME
  96.  
  97. __END_DECLS
  98.  
  99. #endif /* _INLINE_DISKFONT_H */
  100.