New file, wrapper for IShellBrowser class.
[wine/multimedia.git] / include / x11font.h
blob268fe1a7f3337605c7498ea6c1cc08c19a5593be
1 /*
2 * X11 physical font definitions
4 * Copyright 1997 Alex Korobka
5 */
7 #ifndef __WINE_X11FONT_H
8 #define __WINE_X11FONT_H
10 #include "gdi.h"
12 #pragma pack(1)
14 /* this is a part of the font resource header, should
15 * make it easier to implement dynamic softfont loading */
17 typedef struct
19 INT16 dfType;
20 INT16 dfPoints;
21 INT16 dfVertRes;
22 INT16 dfHorizRes;
23 INT16 dfAscent;
24 INT16 dfInternalLeading;
25 INT16 dfExternalLeading;
26 CHAR dfItalic;
27 CHAR dfUnderline;
28 CHAR dfStrikeOut;
29 INT16 dfWeight;
30 CHAR dfCharSet;
31 INT16 dfPixWidth;
32 INT16 dfPixHeight;
33 CHAR dfPitchAndFamily;
34 INT16 dfAvgWidth;
35 INT16 dfMaxWidth;
36 CHAR dfFirstChar;
37 CHAR dfLastChar;
38 CHAR dfDefaultChar;
39 CHAR dfBreakChar;
40 INT16 dfWidthBytes;
41 LPCSTR dfDevice;
42 LPCSTR dfFace;
43 } IFONTINFO16, *LPIFONTINFO16;
45 #pragma pack(4)
47 /* internal flags */
49 #define FI_POLYWEIGHT 0x0001
50 #define FI_POLYSLANT 0x0002
51 #define FI_OBLIQUE 0x0004
52 #define FI_SCALABLE 0x0008
53 #define FI_FW_BOOK 0x0010
54 #define FI_FW_DEMI 0x0020
55 #define FI_VARIABLEPITCH 0x0040
56 #define FI_FIXEDPITCH 0x0080
58 #define FI_ENC_ISO8859 0x0100 /* iso8859-* */
59 #define FI_ENC_ISO646 0x0200 /* iso646* */
60 #define FI_ENC_ANSI 0x0400 /* ansi-0 */
61 #define FI_ENC_MSCODEPAGE 0x0800 /* cp125-* */
63 #define FI_FIXEDEX 0x1000
64 #define FI_NORMAL 0x2000
65 #define FI_SUBSET 0x4000
66 #define FI_TRUETYPE 0x8000
68 typedef struct tagFontInfo
70 struct tagFontInfo* next;
71 UINT16 fi_flags;
73 /* LFD parameters can be quite different from the actual metrics */
75 UINT16 lfd_height;
76 UINT16 lfd_width;
77 UINT16 lfd_decipoints;
78 UINT16 lfd_resolution;
79 IFONTINFO16 df;
80 } fontInfo;
82 /* Font resource list for EnumFont() purposes */
84 #define FR_SOFTFONT 0x1000 /* - .FON or .FOT file */
85 #define FR_SOFTRESOURCE 0x2000 /* - resource handle */
86 #define FR_REMOVED 0x4000 /* delayed remove */
87 #define FR_NAMESET 0x8000
89 typedef struct tagFontResource
91 struct tagFontResource* next;
92 UINT16 fr_flags;
93 UINT16 count;
94 fontInfo* fi;
95 char* resource;
96 CHAR lfFaceName[LF_FACESIZE];
97 } fontResource;
99 typedef struct {
100 float a,b,c,d; /* pixelsize matrix */
101 unsigned long RAW_ASCENT;
102 unsigned long RAW_DESCENT;
103 float pixelsize;
104 float ascent;
105 float descent;
106 } XFONTTRANS;
108 #define FO_RESOURCE_MASK 0x000F
109 #define FO_SYSTEM 0x0001 /* resident in cache */
110 #define FO_SOFTFONT 0x0002 /* installed at runtime */
111 #define FO_SHARED 0x0004 /* MITSHM */
112 #define FO_REMOVED 0x0008 /* remove when count falls to 0 */
114 #define FO_MATCH_MASK 0x00F0
115 #define FO_MATCH_NORASTER 0x0010
116 #define FO_MATCH_PAF 0x0020
117 #define FO_MATCH_XYINDEP 0x0040
119 #define FO_SYNTH_MASK 0xFF00
120 #define FO_SYNTH_HEIGHT 0x2000
121 #define FO_SYNTH_WIDTH 0x4000
122 #define FO_SYNTH_ROTATE 0x8000
123 #define FO_SYNTH_BOLD 0x0100
124 #define FO_SYNTH_ITALIC 0x0200
125 #define FO_SYNTH_UNDERLINE 0x0400
126 #define FO_SYNTH_STRIKEOUT 0x0800
128 /* Realized screen font */
130 typedef struct
132 XFontStruct* fs; /* text metrics */
133 fontResource* fr; /* font family */
134 fontInfo* fi; /* font instance info */
135 LPMAT2* lpXForm; /* optional transformation matrix */
136 Pixmap* lpPixmap; /* optional character bitmasks for synth fonts */
138 XFONTTRANS *lpX11Trans; /* Info for X11R6 transform */
139 INT16 foInternalLeading;
140 INT16 foAvgCharWidth;
141 INT16 foMaxCharWidth;
142 UINT16 fo_flags;
144 /* font cache housekeeping */
146 UINT16 count;
147 UINT16 lru;
148 UINT16 lfchecksum;
149 LOGFONT16 lf;
150 } fontObject;
152 typedef struct
154 fontResource* pfr;
155 fontInfo* pfi;
156 UINT16 height;
157 UINT16 flags;
158 LPLOGFONT16 plf;
159 } fontMatch;
161 typedef struct
163 LPLOGFONT16 lpLogFontParam;
164 FONTENUMPROC16 lpEnumFunc;
165 LPARAM lpData;
167 LPNEWTEXTMETRICEX16 lpTextMetric;
168 LPENUMLOGFONTEX16 lpLogFont;
169 SEGPTR segTextMetric;
170 SEGPTR segLogFont;
171 } fontEnum16;
173 typedef struct
175 LPLOGFONT32W lpLogFontParam;
176 FONTENUMPROC32W lpEnumFunc;
177 LPARAM lpData;
179 LPNEWTEXTMETRICEX32W lpTextMetric;
180 LPENUMLOGFONTEX32W lpLogFont;
181 DWORD dwFlags;
182 } fontEnum32;
184 extern fontObject* XFONT_GetFontObject( X_PHYSFONT pFont );
185 extern XFontStruct* XFONT_GetFontStruct( X_PHYSFONT pFont );
186 extern LPIFONTINFO16 XFONT_GetFontInfo( X_PHYSFONT pFont );
188 #endif __WINE_X11FONT_H