home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / coders / jËzyki_programowania / ace_basic / ace / include / diskfont / diskfont.h next >
C/C++ Source or Header  |  1977-12-31  |  4KB  |  141 lines

  1. #ifndef DISKFONT_DISKFONT_H
  2. #define DISKFONT_DISKFONT_H 1
  3. /*
  4. ** diskfont.h for ACE Basic
  5. **
  6. ** Note: Translated to ACE by ConvertC2ACE
  7. **       @ MapMeadow Software, Nils Sjoholm
  8. **
  9. **
  10. ** Date: 09/02/95
  11. **
  12. **
  13. */
  14.  
  15. /*
  16. ** This are the StructPointer defines for diskfont.h
  17. */
  18. #ifndef AvailFontsPtr
  19. #define AvailFontsPtr ADDRESS
  20. #endif
  21. #ifndef AvailFontsHeaderPtr
  22. #define AvailFontsHeaderPtr ADDRESS
  23. #endif
  24. #ifndef DiskFontHeaderPtr
  25. #define DiskFontHeaderPtr ADDRESS
  26. #endif
  27. #ifndef FontContentsPtr
  28. #define FontContentsPtr ADDRESS
  29. #endif
  30. #ifndef FontContentsHeaderPtr
  31. #define FontContentsHeaderPtr ADDRESS
  32. #endif
  33. #ifndef TAvailFontsPtr
  34. #define TAvailFontsPtr ADDRESS
  35. #endif
  36. #ifndef TFontContentsPtr
  37. #define TFontContentsPtr ADDRESS
  38. #endif
  39. /*
  40. ** End of StructPointer defines for diskfont.h
  41. */
  42.                  
  43. #ifndef     EXEC_NODES_H
  44. #include <exec/nodes.h>
  45. #endif
  46. #ifndef     EXEC_LISTS_H
  47. #include <exec/lists.h>
  48. #endif
  49. #ifndef     GRAPHICS_TEXT_H
  50. #include <graphics/text.h>
  51. #endif
  52.  
  53.  
  54. #define     MAXFONTPATH 256   /* including null terminator */
  55.  
  56. STRUCT FontContents  
  57.     STRING fc_FileName SIZE 256  /* MAXFONTPATH */
  58.     SHORTINT   fc_YSize 
  59.     BYTE    fc_Style 
  60.     BYTE    fc_Flags 
  61. END STRUCT 
  62.  
  63. STRUCT TFontContents  
  64.     STRING tfc_FileName SIZE 254  /* MAXFONTPATH-2 */
  65.     SHORTINT   tfc_TagCount    /* including the TAG_DONE tag */
  66.     /*
  67.      *  if tfc_TagCount is non-zero,  tfc_FileName is overlayed with
  68.      *  Text Tags starting at:  (STRUCT TagItem *)
  69.      *      &tfc_FileName[MAXFONTPATH-(tfc_TagCount*sizeof(STRUCT TagItem))]
  70.      */
  71.     SHORTINT   tfc_YSize 
  72.     BYTE    tfc_Style 
  73.     BYTE    tfc_Flags 
  74. END STRUCT 
  75.  
  76.  
  77. #define  FCH_ID     &H0f00  /* FontContentsHeader,  then FontContents */
  78. #define  TFCH_ID    &H0f02  /* FontContentsHeader,  then TFontContents */
  79. #define  OFCH_ID    &H0f03  /* FontContentsHeader,  then TFontContents, 
  80.                  * associated with outline font */
  81.  
  82. STRUCT FontContentsHeader  
  83.     SHORTINT   fch_FileID      /* FCH_ID */
  84.     SHORTINT   fch_NumEntries  /* the number of FontContents elements */
  85.     /* STRUCT FontContents fch_FC[],  or STRUCT TFontContents fch_TFC[]  */
  86. END STRUCT 
  87.  
  88.  
  89. #define  DFH_ID     &H0f80
  90. #define  MAXFONTNAME    32  /* font name including ".font\0" */
  91.  
  92. STRUCT DiskFontHeader  
  93.     /* the following 8 bytes are not actually considered a part of the  */
  94.     /* DiskFontHeader,  but immediately preceed it. The NextSegment is   */
  95.     /* supplied by the linker/loader,  and the ReturnCode is the code    */
  96.     /* at the beginning of the font in case someone runs it...      */
  97.     /*   LONGINT dfh_NextSegment          \* actually a ADDRESS  */
  98.     /*   LONGINT dfh_ReturnCode           \* MOVEQ #0, D0 : RTS    */
  99.     /* here then is the official start of the DiskFontHeader...     */
  100.     Node dfh_DF      /* node to link disk fonts */
  101.     SHORTINT   dfh_FileID      /* DFH_ID */
  102.     SHORTINT   dfh_Revision    /* the font revision */
  103.     LONGINT    dfh_Segment     /* the segment address when loaded */
  104.     STRING dfh_Name SIZE 32  /* MAXFONTNAME */  /* the FONT NAME (NULL terminated) */
  105.     TextFont dfh_TF  /* loaded TextFont structure */
  106. END STRUCT 
  107.  
  108. /* unfortunately,  this needs to be explicitly typed */
  109. /* used only if dfh_TF.tf_Style FSB_TAGGED bit is set */
  110. #define dfh_TagList dfh_Segment /* destroyed during loading */
  111.  
  112.  
  113. #define     AFB_MEMORY  0
  114. #define     AFF_MEMORY  &H0001
  115. #define     AFB_DISK    1
  116. #define     AFF_DISK    &H0002
  117. #define     AFB_SCALED  2
  118. #define     AFF_SCALED  &H0004
  119. #define     AFB_BITMAP  3
  120. #define     AFF_BITMAP  &H0008
  121.  
  122. #define     AFB_TAGGED  16  /* return TAvailFonts */
  123. #define     AFF_TAGGED  &H10000L
  124.  
  125. STRUCT AvailFonts  
  126.     SHORTINT   af_Type         /* MEMORY,  DISK,  or SCALED */
  127.     TextAttr af_Attr     /* text attributes for font */
  128. END STRUCT 
  129.  
  130. STRUCT TAvailFonts  
  131.     SHORTINT   taf_Type        /* MEMORY,  DISK,  or SCALED */
  132.     TTextAttr taf_Attr   /* text attributes for font */
  133. END STRUCT 
  134.  
  135. STRUCT AvailFontsHeader  
  136.     SHORTINT   afh_NumEntries   /* number of AvailFonts elements */
  137.     /* STRUCT AvailFonts afh_AF[],  or STRUCT TAvailFonts afh_TAF[]  */
  138. END STRUCT 
  139.  
  140. #endif  /* DISKFONT_DISKFONT_H */
  141.