- Removed unused HandleEvent method.
[AROS.git] / compiler / include / graphics / text.h
blob84b463916d5991ff014919d8434c7c8b8e604554
1 #ifndef GRAPHICS_TEXT_H
2 #define GRAPHICS_TEXT_H
4 /*
5 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
6 $Id$
8 Desc: Text output
9 Lang: english
12 #ifndef EXEC_PORTS_H
13 # include <exec/ports.h>
14 #endif
15 #ifndef GRAPHICS_GFX_H
16 # include <graphics/gfx.h>
17 #endif
18 #ifndef UTILITY_TAGITEM_H
19 # include <utility/tagitem.h>
20 #endif
22 struct TextFont
24 struct Message tf_Message;
25 UWORD tf_YSize;
26 UBYTE tf_Style;
27 UBYTE tf_Flags;
28 UWORD tf_XSize;
29 UWORD tf_Baseline;
30 UWORD tf_BoldSmear;
31 UWORD tf_Accessors;
32 UBYTE tf_LoChar;
33 UBYTE tf_HiChar;
34 APTR tf_CharData;
35 UWORD tf_Modulo;
36 APTR tf_CharLoc;
37 APTR tf_CharSpace;
38 APTR tf_CharKern;
40 #define tf_Extension tf_Message.mn_ReplyPort
41 #ifdef __GNUC__
42 #define GetTextFontReplyPort(font) \
43 ({ \
44 struct TextFontExtension * tfe; \
46 tfe = ExtendFont (font, NULL); \
47 tfe \
48 ? tfe->tfe_OrigReplyPort \
49 : font->tf_Message.mn_ReplyPort \
51 #endif /* __GNUC__ */
53 struct TextFontExtension
55 UWORD tfe_MatchWord;
56 UBYTE tfe_Flags0;
57 UBYTE tfe_Flags1;
59 struct TextFont * tfe_BackPtr;
60 struct MsgPort * tfe_OrigReplyPort;
61 struct TagItem * tfe_Tags;
63 UWORD * tfe_OFontPatchS;
64 UWORD * tfe_OFontPatchK;
67 /* tfe_Flags0 */
68 #define TE0B_NOREMFONT 0
69 #define TE0F_NOREMFONT (1<<0)
71 /* Text Attributes */
72 struct TextAttr
74 STRPTR ta_Name;
75 UWORD ta_YSize;
76 UBYTE ta_Style;
77 UBYTE ta_Flags;
80 struct TTextAttr
82 /* like TextAttr */
83 STRPTR tta_Name;
84 UWORD tta_YSize;
85 UBYTE tta_Style;
86 UBYTE tta_Flags;
88 /* TTextAttr specific extension */
89 struct TagItem * tta_Tags;
92 /* ta_Style/tta_Style */
93 #define FS_NORMAL 0
94 #define FSB_UNDERLINED 0
95 #define FSF_UNDERLINED (1<<0)
96 #define FSB_BOLD 1
97 #define FSF_BOLD (1<<1)
98 #define FSB_ITALIC 2
99 #define FSF_ITALIC (1<<2)
100 #define FSB_EXTENDED 3
101 #define FSF_EXTENDED (1<<3)
102 #define FSB_COLORFONT 6
103 #define FSF_COLORFONT (1<<6)
104 #define FSB_TAGGED 7
105 #define FSF_TAGGED (1<<7)
107 /* ta_Flags/tta_Flags */
108 #define FPB_ROMFONT 0
109 #define FPF_ROMFONT (1<<0)
110 #define FPB_DISKFONT 1
111 #define FPF_DISKFONT (1<<1)
112 #define FPB_REVPATH 2
113 #define FPF_REVPATH (1<<2)
114 #define FPB_TALLDOT 3
115 #define FPF_TALLDOT (1<<3)
116 #define FPB_WIDEDOT 4
117 #define FPF_WIDEDOT (1<<4)
118 #define FPB_PROPORTIONAL 5
119 #define FPF_PROPORTIONAL (1<<5)
120 #define FPB_DESIGNED 6
121 #define FPF_DESIGNED (1<<6)
122 #define FPB_REMOVED 7
123 #define FPF_REMOVED (1<<7)
125 /* tta_Tags */
126 #define TA_DeviceDPI (TAG_USER + 1)
128 #define MAXFONTMATCHWEIGHT 32767
130 struct ColorFontColors
132 UWORD cfc_Reserved;
133 UWORD cfc_Count;
134 UWORD * cfc_ColorTable;
137 struct ColorTextFont
139 struct TextFont ctf_TF;
141 UWORD ctf_Flags;
142 UBYTE ctf_Depth;
143 UBYTE ctf_FgColor;
144 UBYTE ctf_Low;
145 UBYTE ctf_High;
146 UBYTE ctf_PlanePick;
147 UBYTE ctf_PlaneOnOff;
149 struct ColorFontColors * ctf_ColorFontColors;
151 APTR ctf_CharData[8];
154 /* ctf_Flags */
155 #define CTB_MAPCOLOR 0
156 #define CTF_MAPCOLOR (1<<0)
157 #define CT_COLORFONT (1<<0)
158 #define CT_GREYFONT (1<<1)
159 #define CT_ANTIALIAS (1<<2)
160 #define CT_COLORMASK 0x000F
162 struct TextExtent
164 UWORD te_Width;
165 UWORD te_Height;
167 struct Rectangle te_Extent;
170 #endif /* GRAPHICS_TEXT_H */