1 /* USP - Unicode Complex Script processor
2  * http://msdn2.microsoft.com/library/ms776488 */
3 
4 
5 module win32.usp10;
6 version(Windows):
7 import win32.windows;
8 
9 
10 
11 /* Uniscribe Enumeration Types
12  * http://msdn2.microsoft.com/library/ms776518 */
13 
14 enum : WORD {
15 	SCRIPT_UNDEFINED = 0,
16 }
17 
18 enum : DWORD {
19 	SGCM_RTL = 0x00000001,
20 }
21 
22 enum : DWORD {
23 	SSA_PASSWORD        = 0x00000001,
24 	SSA_TAB             = 0x00000002,
25 	SSA_CLIP            = 0x00000004,
26 	SSA_FIT             = 0x00000008,
27 	SSA_DZWG            = 0x00000010,
28 	SSA_FALLBACK        = 0x00000020,
29 	SSA_BREAK           = 0x00000040,
30 	SSA_GLYPHS          = 0x00000080,
31 	SSA_RTL             = 0x00000100,
32 	SSA_GCP             = 0x00000200,
33 	SSA_HOTKEY          = 0x00000400,
34 	SSA_METAFILE        = 0x00000800,
35 	SSA_LINK            = 0x00001000,
36 	SSA_HIDEHOTKEY      = 0x00002000,
37 	SSA_HOTKEYONLY      = 0x00002400,
38 	SSA_FULLMEASURE     = 0x04000000,
39 	SSA_LPKANSIFALLBACK = 0x08000000,
40 	SSA_PIDX            = 0x10000000,
41 	SSA_LAYOUTRTL       = 0x20000000,
42 	SSA_DONTGLYPH       = 0x40000000,
43 	SSA_NOKASHIDA       = 0x80000000,
44 }
45 
46 enum : DWORD {
47 	SIC_COMPLEX    = 1,
48 	SIC_ASCIIDIGIT = 2,
49 	SIC_NEUTRAL    = 4,
50 }
51 
52 enum : DWORD {
53 	SCRIPT_DIGITSUBSTITUTE_CONTEXT,
54 	SCRIPT_DIGITSUBSTITUTE_NONE,
55 	SCRIPT_DIGITSUBSTITUTE_NATIONAL,
56 	SCRIPT_DIGITSUBSTITUTE_TRADITIONAL,
57 }
58 
59 enum SCRIPT_JUSTIFY : WORD {
60     SCRIPT_JUSTIFY_NONE,
61     SCRIPT_JUSTIFY_ARABIC_BLANK,
62     SCRIPT_JUSTIFY_CHARACTER,
63     SCRIPT_JUSTIFY_RESERVED1,
64     SCRIPT_JUSTIFY_BLANK,
65     SCRIPT_JUSTIFY_RESERVED2,
66     SCRIPT_JUSTIFY_RESERVED3,
67     SCRIPT_JUSTIFY_ARABIC_NORMAL,
68     SCRIPT_JUSTIFY_ARABIC_KASHIDA,
69     SCRIPT_JUSTIFY_ARABIC_ALEF,
70     SCRIPT_JUSTIFY_ARABIC_HA,
71     SCRIPT_JUSTIFY_ARABIC_RA,
72     SCRIPT_JUSTIFY_ARABIC_BA,
73     SCRIPT_JUSTIFY_ARABIC_BARA,
74     SCRIPT_JUSTIFY_ARABIC_SEEN,
75     SCRIPT_JUSTIFY_ARABIC_SEEN_M,
76 }
77 
78 
79 
80 /* Uniscribe Structures
81  * http://msdn2.microsoft.com/library/ms776479 */
82 
83 alias void* SCRIPT_CACHE;
84 alias void* SCRIPT_STRING_ANALYSIS;
85 
86 extern (C)
87 {
88 	struct SCRIPT_CONTROL
89 	{
90 		private DWORD _bitfield;
91 		DWORD uDefaultLanguage()             { return (_bitfield >> 0) & 0xFFFF; }
92 		DWORD uDefaultLanguage(DWORD val)    { _bitfield = cast(DWORD)((_bitfield & 0xFFFFFFFFFFFF0000) | (val << 0)); return val; }
93 		DWORD fContextDigits()               { return (_bitfield >> 16) & 0x1; }
94 		DWORD fContextDigits(DWORD val)      { _bitfield = cast(DWORD)((_bitfield & 0xFFFFFFFFFFFEFFFF) | (val << 16)); return val; }
95 		DWORD fInvertPreBoundDir()           { return (_bitfield >> 17) & 0x1; }
96 		DWORD fInvertPreBoundDir(DWORD val)  { _bitfield = cast(DWORD)((_bitfield & 0xFFFFFFFFFFFDFFFF) | (val << 17)); return val; }
97 		DWORD fInvertPostBoundDir()          { return (_bitfield >> 18) & 0x1; }
98 		DWORD fInvertPostBoundDir(DWORD val) { _bitfield = cast(DWORD)((_bitfield & 0xFFFFFFFFFFFBFFFF) | (val << 18)); return val; }
99 		DWORD fLinkStringBefore()            { return (_bitfield >> 19) & 0x1; }
100 		DWORD fLinkStringBefore(DWORD val)   { _bitfield = cast(DWORD)((_bitfield & 0xFFFFFFFFFFF7FFFF) | (val << 19)); return val; }
101 		DWORD fLinkStringAfter()             { return (_bitfield >> 20) & 0x1; }
102 		DWORD fLinkStringAfter(DWORD val)    { _bitfield = cast(DWORD)((_bitfield & 0xFFFFFFFFFFEFFFFF) | (val << 20)); return val; }
103 		DWORD fNeutralOverride()             { return (_bitfield >> 21) & 0x1; }
104 		DWORD fNeutralOverride(DWORD val)    { _bitfield = cast(DWORD)((_bitfield & 0xFFFFFFFFFFDFFFFF) | (val << 21)); return val; }
105 		DWORD fNumericOverride()             { return (_bitfield >> 22) & 0x1; }
106 		DWORD fNumericOverride(DWORD val)    { _bitfield = cast(DWORD)((_bitfield & 0xFFFFFFFFFFBFFFFF) | (val << 22)); return val; }
107 		DWORD fLegacyBidiClass()             { return (_bitfield >> 23) & 0x1; }
108 		DWORD fLegacyBidiClass(DWORD val)    { _bitfield = cast(DWORD)((_bitfield & 0xFFFFFFFFFF7FFFFF) | (val << 23)); return val; }
109 		DWORD fReserved()                    { return (_bitfield >> 24) & 0xFF; }
110 		DWORD fReserved(DWORD val)           { _bitfield = cast(DWORD)((_bitfield & 0xFFFFFFFF00FFFFFF) | (val << 24)); return val; }
111 	}
112 
113 	struct SCRIPT_STATE
114 	{
115 		private WORD _bitfield;
116 		WORD uBidiLevel()                 { return cast(WORD)((_bitfield >> 0) & 0x1F); }
117 		WORD uBidiLevel(WORD val)         { _bitfield = cast(WORD)((_bitfield & 0xFFFFFFFFFFFFFFE0) | (val << 0)); return val; }
118 		WORD fOverrideDirection()         { return cast(WORD)((_bitfield >> 5) & 0x1); }
119 		WORD fOverrideDirection(WORD val) { _bitfield = cast(WORD)((_bitfield & 0xFFFFFFFFFFFFFFDF) | (val << 5)); return val; }
120 		WORD fInhibitSymSwap()            { return cast(WORD)((_bitfield >> 6) & 0x1); }
121 		WORD fInhibitSymSwap(WORD val)    { _bitfield = cast(WORD)((_bitfield & 0xFFFFFFFFFFFFFFBF) | (val << 6)); return val; }
122 		WORD fCharShape()                 { return cast(WORD)((_bitfield >> 7) & 0x1); }
123 		WORD fCharShape(WORD val)         { _bitfield = cast(WORD)((_bitfield & 0xFFFFFFFFFFFFFF7F) | (val << 7)); return val; }
124 		WORD fDigitSubstitute()           { return cast(WORD)((_bitfield >> 8) & 0x1); }
125 		WORD fDigitSubstitute(WORD val)   { _bitfield = cast(WORD)((_bitfield & 0xFFFFFFFFFFFFFEFF) | (val << 8)); return val; }
126 		WORD fInhibitLigate()             { return cast(WORD)((_bitfield >> 9) & 0x1); }
127 		WORD fInhibitLigate(WORD val)     { _bitfield = cast(WORD)((_bitfield & 0xFFFFFFFFFFFFFDFF) | (val << 9)); return val; }
128 		WORD fDisplayZWG()                { return cast(WORD)((_bitfield >> 10) & 0x1); }
129 		WORD fDisplayZWG(WORD val)        { _bitfield = cast(WORD)((_bitfield & 0xFFFFFFFFFFFFFBFF) | (val << 10)); return val; }
130 		WORD fArabicNumContext()          { return cast(WORD)((_bitfield >> 11) & 0x1); }
131 		WORD fArabicNumContext(WORD val)  { _bitfield = cast(WORD)((_bitfield & 0xFFFFFFFFFFFFF7FF) | (val << 11)); return val; }
132 		WORD fGcpClusters()               { return cast(WORD)((_bitfield >> 12) & 0x1); }
133 		WORD fGcpClusters(WORD val)       { _bitfield = cast(WORD)((_bitfield & 0xFFFFFFFFFFFFEFFF) | (val << 12)); return val; }
134 		WORD fReserved()                  { return cast(WORD)((_bitfield >> 13) & 0x1); }
135 		WORD fReserved(WORD val)          { _bitfield = cast(WORD)((_bitfield & 0xFFFFFFFFFFFFDFFF) | (val << 13)); return val; }
136 		WORD fEngineReserved()            { return cast(WORD)((_bitfield >> 14) & 0x3); }
137 		WORD fEngineReserved(WORD val)    { _bitfield = cast(WORD)((_bitfield & 0xFFFFFFFFFFFF3FFF) | (val << 14)); return val; }
138 	}
139 
140 
141 	struct SCRIPT_ANALYSIS
142 	{
143 		private WORD _bitfield;
144 		WORD eScript()               { return cast(WORD)((_bitfield >> 0) & 0x3FF); }
145 		WORD eScript(WORD val)       { _bitfield = cast(WORD)((_bitfield & 0xFFFFFFFFFFFFFC00) | (val << 0)); return val; }
146 		WORD fRTL()                  { return cast(WORD)((_bitfield >> 10) & 0x1); }
147 		WORD fRTL(WORD val)          { _bitfield = cast(WORD)((_bitfield & 0xFFFFFFFFFFFFFBFF) | (val << 10)); return val; }
148 		WORD fLayoutRTL()            { return cast(WORD)((_bitfield >> 11) & 0x1); }
149 		WORD fLayoutRTL(WORD val)    { _bitfield = cast(WORD)((_bitfield & 0xFFFFFFFFFFFFF7FF) | (val << 11)); return val; }
150 		WORD fLinkBefore()           { return cast(WORD)((_bitfield >> 12) & 0x1); }
151 		WORD fLinkBefore(WORD val)   { _bitfield = cast(WORD)((_bitfield & 0xFFFFFFFFFFFFEFFF) | (val << 12)); return val; }
152 		WORD fLinkAfter()            { return cast(WORD)((_bitfield >> 13) & 0x1); }
153 		WORD fLinkAfter(WORD val)    { _bitfield = cast(WORD)((_bitfield & 0xFFFFFFFFFFFFDFFF) | (val << 13)); return val; }
154 		WORD fLogicalOrder()         { return cast(WORD)((_bitfield >> 14) & 0x1); }
155 		WORD fLogicalOrder(WORD val) { _bitfield = cast(WORD)((_bitfield & 0xFFFFFFFFFFFFBFFF) | (val << 14)); return val; }
156 		WORD fNoGlyphIndex()         { return cast(WORD)((_bitfield >> 15) & 0x1); }
157 		WORD fNoGlyphIndex(WORD val) { _bitfield = cast(WORD)((_bitfield & 0xFFFFFFFFFFFF7FFF) | (val << 15)); return val; }
158 		SCRIPT_STATE s;
159 	}
160 
161 
162 	struct SCRIPT_ITEM
163 	{
164 		int iCharPos;
165 		SCRIPT_ANALYSIS a;
166 	}
167 
168 	struct SCRIPT_VISATTR
169 	{
170 		private WORD _bitfield;
171 		WORD uJustification()         { return cast(WORD)((_bitfield >> 0) & 0xF); }
172 		WORD uJustification(WORD val) { _bitfield = cast(WORD)((_bitfield & 0xFFFFFFFFFFFFFFF0) | (val << 0)); return val; }
173 		WORD fClusterStart()          { return cast(WORD)((_bitfield >> 4) & 0x1); }
174 		WORD fClusterStart(WORD val)  { _bitfield = cast(WORD)((_bitfield & 0xFFFFFFFFFFFFFFEF) | (val << 4)); return val; }
175 		WORD fDiacritic()             { return cast(WORD)((_bitfield >> 5) & 0x1); }
176 		WORD fDiacritic(WORD val)     { _bitfield = cast(WORD)((_bitfield & 0xFFFFFFFFFFFFFFDF) | (val << 5)); return val; }
177 		WORD fZeroWidth()             { return cast(WORD)((_bitfield >> 6) & 0x1); }
178 		WORD fZeroWidth(WORD val)     { _bitfield = cast(WORD)((_bitfield & 0xFFFFFFFFFFFFFFBF) | (val << 6)); return val; }
179 		WORD fReserved()              { return cast(WORD)((_bitfield >> 7) & 0x1); }
180 		WORD fReserved(WORD val)      { _bitfield = cast(WORD)((_bitfield & 0xFFFFFFFFFFFFFF7F) | (val << 7)); return val; }
181 		WORD fShapeReserved()         { return cast(WORD)((_bitfield >> 8) & 0xFF); }
182 		WORD fShapeReserved(WORD val) { _bitfield = cast(WORD)((_bitfield & 0xFFFFFFFFFFFF00FF) | (val << 8)); return val; }
183 	}
184 
185 	struct GOFFSET
186 	{
187 		LONG du;
188 		LONG dv;
189 	}
190 
191 	struct SCRIPT_LOGATTR
192 	{
193 		BYTE _bitfield;
194 		BYTE fSoftBreak()          { return cast(BYTE)((_bitfield >> 0) & 0x1); }
195 		BYTE fSoftBreak(BYTE val)  { _bitfield = cast(BYTE)((_bitfield & 0xFFFFFFFFFFFFFFFE) | (val << 0)); return val; }
196 		BYTE fWhiteSpace()         { return cast(BYTE)((_bitfield >> 1) & 0x1); }
197 		BYTE fWhiteSpace(BYTE val) { _bitfield = cast(BYTE)((_bitfield & 0xFFFFFFFFFFFFFFFD) | (val << 1)); return val; }
198 		BYTE fCharStop()           { return cast(BYTE)((_bitfield >> 2) & 0x1); }
199 		BYTE fCharStop(BYTE val)   { _bitfield = cast(BYTE)((_bitfield & 0xFFFFFFFFFFFFFFFB) | (val << 2)); return val; }
200 		BYTE fWordStop()           { return cast(BYTE)((_bitfield >> 3) & 0x1); }
201 		BYTE fWordStop(BYTE val)   { _bitfield = cast(BYTE)((_bitfield & 0xFFFFFFFFFFFFFFF7) | (val << 3)); return val; }
202 		BYTE fInvalid()            { return cast(BYTE)((_bitfield >> 4) & 0x1); }
203 		BYTE fInvalid(BYTE val)    { _bitfield = cast(BYTE)((_bitfield & 0xFFFFFFFFFFFFFFEF) | (val << 4)); return val; }
204 		BYTE fReserved()           { return cast(BYTE)((_bitfield >> 5) & 0x7); }
205 		BYTE fReserved(BYTE val)   { _bitfield = cast(BYTE)((_bitfield & 0xFFFFFFFFFFFFFF1F) | (val << 5)); return val; }
206 	}
207 
208 	struct SCRIPT_PROPERTIES
209 	{
210 		private DWORD _bitfield1;
211 		DWORD langid()                          { return (_bitfield1 >> 0) & 0xFFFF; }
212 		DWORD langid(DWORD val)                 { _bitfield1 = cast(DWORD)((_bitfield1 & 0xFFFFFFFFFFFF0000) | (val << 0)); return val; }
213 		DWORD fNumeric()                        { return (_bitfield1 >> 16) & 0x1; }
214 		DWORD fNumeric(DWORD val)               { _bitfield1 = cast(DWORD)((_bitfield1 & 0xFFFFFFFFFFFEFFFF) | (val << 16)); return val; }
215 		DWORD fComplex()                        { return (_bitfield1 >> 17) & 0x1; }
216 		DWORD fComplex(DWORD val)               { _bitfield1 = cast(DWORD)((_bitfield1 & 0xFFFFFFFFFFFDFFFF) | (val << 17)); return val; }
217 		DWORD fNeedsWordBreaking()              { return (_bitfield1 >> 18) & 0x1; }
218 		DWORD fNeedsWordBreaking(DWORD val)     { _bitfield1 = cast(DWORD)((_bitfield1 & 0xFFFFFFFFFFFBFFFF) | (val << 18)); return val; }
219 		DWORD fNeedsCaretInfo()                 { return (_bitfield1 >> 19) & 0x1; }
220 		DWORD fNeedsCaretInfo(DWORD val)        { _bitfield1 = cast(DWORD)((_bitfield1 & 0xFFFFFFFFFFF7FFFF) | (val << 19)); return val; }
221 		DWORD bCharSet()                        { return (_bitfield1 >> 20) & 0xFF; }
222 		DWORD bCharSet(DWORD val)               { _bitfield1 = cast(DWORD)((_bitfield1 & 0xFFFFFFFFF00FFFFF) | (val << 20)); return val; }
223 		DWORD fControl()                        { return (_bitfield1 >> 28) & 0x1; }
224 		DWORD fControl(DWORD val)               { _bitfield1 = cast(DWORD)((_bitfield1 & 0xFFFFFFFFEFFFFFFF) | (val << 28)); return val; }
225 		DWORD fPrivateUseArea()                 { return (_bitfield1 >> 29) & 0x1; }
226 		DWORD fPrivateUseArea(DWORD val)        { _bitfield1 = cast(DWORD)((_bitfield1 & 0xFFFFFFFFDFFFFFFF) | (val << 29)); return val; }
227 		DWORD fNeedsCharacterJustify()          { return (_bitfield1 >> 30) & 0x1; }
228 		DWORD fNeedsCharacterJustify(DWORD val) { _bitfield1 = cast(DWORD)((_bitfield1 & 0xFFFFFFFFBFFFFFFF) | (val << 30)); return val; }
229 		DWORD fInvalidGlyph()                   { return (_bitfield1 >> 31) & 0x1; }
230 		DWORD fInvalidGlyph(DWORD val)          { _bitfield1 = cast(DWORD)((_bitfield1 & 0xFFFFFFFF7FFFFFFF) | (val << 31)); return val; }
231 		private DWORD _bitfield2;
232 		DWORD fInvalidLogAttr()                 { return (_bitfield2 >> 0) & 0x1; }
233 		DWORD fInvalidLogAttr(DWORD val)        { _bitfield2 = cast(DWORD)((_bitfield2 & 0xFFFFFFFFFFFFFFFE) | (val << 0)); return val; }
234 		DWORD fCDM()                            { return (_bitfield2 >> 1) & 0x1; }
235 		DWORD fCDM(DWORD val)                   { _bitfield2 = cast(DWORD)((_bitfield2 & 0xFFFFFFFFFFFFFFFD) | (val << 1)); return val; }
236 		DWORD fAmbiguousCharSet()               { return (_bitfield2 >> 2) & 0x1; }
237 		DWORD fAmbiguousCharSet(DWORD val)      { _bitfield2 = cast(DWORD)((_bitfield2 & 0xFFFFFFFFFFFFFFFB) | (val << 2)); return val; }
238 		DWORD fClusterSizeVaries()              { return (_bitfield2 >> 3) & 0x1; }
239 		DWORD fClusterSizeVaries(DWORD val)     { _bitfield2 = cast(DWORD)((_bitfield2 & 0xFFFFFFFFFFFFFFF7) | (val << 3)); return val; }
240 		DWORD fRejectInvalid()                  { return (_bitfield2 >> 4) & 0x1; }
241 		DWORD fRejectInvalid(DWORD val)         { _bitfield2 = cast(DWORD)((_bitfield2 & 0xFFFFFFFFFFFFFFEF) | (val << 4)); return val; }
242 	}
243 
244 	struct SCRIPT_FONTPROPERTIES
245 	{
246 		int cBytes = SCRIPT_FONTPROPERTIES.sizeof;
247 		WORD wgBlank;
248 		WORD wgDefault;
249 		WORD wgInvalid;
250 		WORD wgKashida;
251 		int iKashidaWidth;
252 	}
253 
254 	struct SCRIPT_TABDEF
255 	{
256 		int cTabStops;
257 		int iScale;
258 		int* pTabStops;
259 		int iTabOrigin;
260 	}
261 
262 	struct SCRIPT_DIGITSUBSTITUTE
263 	{
264 		private DWORD _bitfield1;
265 		DWORD NationalDigitLanguage()             { return (_bitfield1 >> 0) & 0xFFFF; }
266 		DWORD NationalDigitLanguage(DWORD val)    { _bitfield1 = cast(DWORD)((_bitfield1 & 0xFFFFFFFFFFFF0000) | (val << 0)); return val; }
267 		DWORD TraditionalDigitLanguage()          { return (_bitfield1 >> 16) & 0xFFFF; }
268 		DWORD TraditionalDigitLanguage(DWORD val) { _bitfield1 = cast(DWORD)((_bitfield1 & 0xFFFFFFFF0000FFFF) | (val << 16)); return val; }
269 		private DWORD _bitfield2;
270 		DWORD DigitSubstitute()                   { return (_bitfield2 >> 0) & 0xFF; }
271 		DWORD DigitSubstitute(DWORD val)          { _bitfield2 = cast(DWORD)((_bitfield2 & 0xFFFFFFFFFFFFFF00) | (val << 0)); return val; }
272 		DWORD dwReserved;
273 	}
274 
275 	/* TODO: Windows Vista fearured structs
276 	OPENTYPE_FEATURE_RECORD
277 	OPENTYPE_TAG
278 	SCRIPT_CHARPROP
279 	SCRIPT_GLYPHPROP
280 	TEXTRANGE_PROPERTIES
281 	*/
282 }
283 
284 
285 /* Uniscribe Functions
286  * http://msdn2.microsoft.com/library/ms776469 */
287 extern (Windows)
288 {
289 	HRESULT ScriptFreeCache(SCRIPT_CACHE*);
290 	HRESULT ScriptItemize(const(WCHAR)*, int, int, const(SCRIPT_CONTROL)*, const(SCRIPT_STATE)*, SCRIPT_ITEM*, int*);
291 	HRESULT ScriptLayout(int, const(BYTE)*, int*, int*);
292 	HRESULT ScriptShape(HDC, SCRIPT_CACHE*, const(WCHAR)*, int, int, SCRIPT_ANALYSIS*, WORD*, WORD*, SCRIPT_VISATTR*, int*);
293 	HRESULT ScriptPlace(HDC, SCRIPT_CACHE*, const(WORD)*, int, const(SCRIPT_VISATTR)*, SCRIPT_ANALYSIS*, int*, GOFFSET*, ABC*);
294 	HRESULT ScriptTextOut(HDC, SCRIPT_CACHE*, int, int, UINT, const(RECT)*, const(SCRIPT_ANALYSIS)*, const(WCHAR)*, int, const(WORD)*, int, const(int)*, int*, const(GOFFSET)*);
295 	HRESULT ScriptJustify(const(SCRIPT_VISATTR)*, const(int)*, int, int, int, int*);
296 	HRESULT ScriptBreak(const(WCHAR)*, int, const(SCRIPT_ANALYSIS)*, const(SCRIPT_LOGATTR)*);
297 	HRESULT ScriptCPtoX(int, BOOL, int, int, const(WORD)*, const(SCRIPT_VISATTR)*, const(int)*, const(SCRIPT_ANALYSIS)*, int*);
298 	HRESULT ScriptXtoCP(int, int, int, const(WORD)*, const(SCRIPT_VISATTR)*, const(int)*, const(SCRIPT_ANALYSIS)*, int*, int*);
299 	HRESULT ScriptGetLogicalWidths(const(SCRIPT_ANALYSIS)*, int, int, const(int)*, const(WORD)*, const(SCRIPT_VISATTR)*, int*);
300 	HRESULT ScriptApplyLogicalWidth(const(int)*, int, int, const(WORD)*, const(SCRIPT_VISATTR)*, const(int)*, const(SCRIPT_ANALYSIS)*, ABC*, int*);
301 	HRESULT ScriptGetCMap(HDC, SCRIPT_CACHE*, const(WCHAR)*, int, DWORD, WORD*);
302 	HRESULT ScriptGetGlyphABCWidth(HDC, SCRIPT_CACHE*, WORD, ABC*);
303 	HRESULT ScriptGetProperties(const(SCRIPT_PROPERTIES**)*, int*);
304 	HRESULT ScriptGetFontProperties(HDC, SCRIPT_CACHE*, SCRIPT_FONTPROPERTIES*);
305 	HRESULT ScriptCacheGetHeight(HDC, SCRIPT_CACHE*, int*);
306 	HRESULT ScriptIsComplex(const(WCHAR)*, int, DWORD);
307 	HRESULT ScriptRecordDigitSubstitution(LCID, SCRIPT_DIGITSUBSTITUTE*);
308 	HRESULT ScriptApplyDigitSubstitution(const(SCRIPT_DIGITSUBSTITUTE)*, SCRIPT_CONTROL*, SCRIPT_STATE*);
309 
310 	/* ScriptString Functions
311 	 * http://msdn2.microsoft.com/library/ms776485 */
312 	HRESULT ScriptStringAnalyse(HDC, const(void)*, int, int, int, DWORD, int, SCRIPT_CONTROL*, SCRIPT_STATE*, const(int)*, SCRIPT_TABDEF*, const(BYTE)*, SCRIPT_STRING_ANALYSIS*);
313 	HRESULT ScriptStringFree(SCRIPT_STRING_ANALYSIS*);
314 	const(SIZE)* ScriptString_pSize(SCRIPT_STRING_ANALYSIS);
315 	const(int)* ScriptString_pcOutChars(SCRIPT_STRING_ANALYSIS);
316 	const(SCRIPT_LOGATTR)* ScriptString_pLogAttr(SCRIPT_STRING_ANALYSIS);
317 	HRESULT ScriptStringGetOrder(SCRIPT_STRING_ANALYSIS, UINT*);
318 	HRESULT ScriptStringCPtoX(SCRIPT_STRING_ANALYSIS, int, BOOL, int*);
319 	HRESULT ScriptStringXtoCP(SCRIPT_STRING_ANALYSIS, int, int*, int*);
320 	HRESULT ScriptStringGetLogicalWidths(SCRIPT_STRING_ANALYSIS, int*);
321 	HRESULT ScriptStringValidate(SCRIPT_STRING_ANALYSIS);
322 	HRESULT ScriptStringOut(SCRIPT_STRING_ANALYSIS, int, int, UINT, const(RECT)*, int, int, BOOL);
323 
324 	/* TODO: Windows Vista fearured functions
325 	ScriptGetFontAlternateGlyphs()
326 	ScriptGetFontFeatureTags()
327 	ScriptGetFontLanguageTags()
328 	ScriptGetFontScriptTags()
329 	ScriptItemizeOpenType()
330 	ScriptPlaceOpenType()
331 	ScriptPositionSingleGlyph()
332 	ScriptShapeOpenType()
333 	ScriptSubstituteSingleGlyph()
334 	*/
335 }