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