home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Misc / DC-POS24.LZX / pOS / pOSxA.lzx / pOSxA / graphics / text.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-03-12  |  2.8 KB  |  115 lines

  1. #ifndef    GRAPHICS_TEXT_H
  2. #define    GRAPHICS_TEXT_H
  3.  
  4. /*******************************************************************
  5.  pOS / Amiga adapt
  6. *******************************************************************/
  7.  
  8. #ifndef EXEC_TYPES_H
  9. #include <exec/types.h>
  10. #endif
  11. #ifndef __INC_POS_PGFX_TEXT_H
  12. #include <p:pGFX/Text.h>
  13. #endif
  14. #ifndef    EXEC_PORTS_H
  15. #include <exec/ports.h>
  16. #endif    /* EXEC_PORTS_H */
  17. #ifndef    GRAPHICS_GFX_H
  18. #include <graphics/gfx.h>
  19. #endif    /* GRAPHICS_GFX_H */
  20. #ifndef    UTILITY_TAGITEM_H
  21. #include <utility/tagitem.h>
  22. #endif    /* UTILITY_TAGITEM_H */
  23.  
  24. /*------ Font Styles ------------------------------------------------*/
  25. #define    FS_NORMAL    FNTSTY_Normal
  26. #define    FSB_UNDERLINED    FNTSTYB_Underline
  27. #define    FSF_UNDERLINED    FNTSTYF_Underline
  28. #define    FSB_BOLD    FNTSTYB_Bold
  29. #define    FSF_BOLD    FNTSTYF_Bold
  30. #define    FSB_ITALIC    FNTSTYB_Italic
  31. #define    FSF_ITALIC    FNTSTYF_Italic
  32. #define    FSB_EXTENDED    FNTSTYB_Extended
  33. #define    FSF_EXTENDED    FNTSTYF_Extended
  34.  
  35. #define    FSB_COLORFONT    FNTSTYB_Colorfont
  36. #define    FSF_COLORFONT    FNTSTYF_Colorfont
  37.  
  38. /*------ Font Flags -------------------------------------------------*/
  39. #define    FPB_ROMFONT    FNTFLGB_RomFont
  40. #define    FPF_ROMFONT    FNTFLGF_RomFont
  41. #define    FPB_DISKFONT    FNTFLGB_DiskFont
  42. #define    FPF_DISKFONT    FNTFLGF_DiskFont
  43. #define    FPB_REVPATH    FNTFLGB_RevPath
  44. #define    FPF_REVPATH    FNTFLGF_RevPath
  45. #define    FPB_TALLDOT    FNTFLGB_TallDot
  46. #define    FPF_TALLDOT    FNTFLGF_TallDot
  47. #define    FPB_WIDEDOT    FNTFLGB_WideDot
  48. #define    FPF_WIDEDOT    FNTFLGF_WideDot
  49. #define    FPB_PROPORTIONAL FNTFLGB_Proportional
  50. #define    FPF_PROPORTIONAL FNTFLGF_Proportional
  51. #define    FPB_DESIGNED    FNTFLGB_Designed
  52. #define    FPF_DESIGNED    FNTFLGF_Designed
  53.  
  54. struct TextAttr
  55. {
  56.   UBYTE          *ta_Name;
  57.   UWORD           ta_YSize;
  58.   UWORD           ta_Style;
  59.   UWORD           ta_Flags;
  60.   struct TagItem *ta_Tags;
  61. };
  62.  
  63.  
  64. struct TTextAttr
  65. {
  66.   UBYTE          *tta_Name;
  67.   UWORD           tta_YSize;
  68.   UWORD           tta_Style;
  69.   UWORD           tta_Flags;
  70.   struct TagItem *tta_Tags;
  71. };
  72.  
  73.  
  74. #define    TA_DeviceDPI (1|TAG_USER)
  75. #define    MAXFONTMATCHWEIGHT 32767
  76.  
  77. struct TextFont
  78. {
  79.   struct {
  80.     struct Node   mn_Node;
  81.   } tf_Message;
  82.   UWORD           tf_YSize;
  83.   UWORD           tf_Style;
  84.   UWORD           tf_Flags;
  85.   UWORD           tf_XSize;
  86.   UWORD           tf_Baseline;
  87.   UWORD           tf_BoldSmear;
  88.   UWORD           tf_Accessors;
  89.   UBYTE           tf_LoChar;
  90.   UBYTE           tf_HiChar;
  91.   APTR            tf_CharData;
  92.   UWORD           tf_Modulo;
  93.   APTR            tf_CharLoc;
  94.   APTR            tf_CharSpace;
  95.   APTR            tf_CharKern;
  96. // ...
  97. };
  98.  
  99. struct TextExtent
  100. {
  101.   UWORD            te_Width;
  102.   UWORD            te_Height;
  103.   struct Rectangle te_Extend;
  104. };
  105.  
  106. #ifdef __IGNORE_NOT_SUPPORTED__
  107.  #define    FSB_TAGGED     0
  108.  #define    FSF_TAGGED     0
  109. #else
  110.  #define    FSB_TAGGED     _PxA_IGNORE
  111.  #define    FSF_TAGGED     _PxA_IGNORE
  112. #endif /* __IGNORE_NOT_SUPPORTED__ */
  113.  
  114. #endif    /* GRAPHICS_TEXT_H */
  115.