summaryrefslogtreecommitdiffstats
path: root/vendor/winapi/src/um/usp10.rs
blob: b2f24be06eac34650c936b8e43b0f3df70e98dc6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
// Licensed under the Apache License, Version 2.0
// <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
// All files in the project carrying such notice may not be copied, modified, or distributed
// except according to those terms.
//! Unicode Complex Script processor API declarations
use ctypes::{c_int, c_long, c_void};
use shared::minwindef::{BOOL, BYTE, DWORD, UINT, ULONG, WORD};
use shared::ntdef::LCID;
use shared::windef::{HDC, RECT, SIZE};
use shared::winerror::{FACILITY_ITF, SEVERITY_ERROR};
use um::wingdi::ABC;
use um::winnt::{HRESULT, LONG, WCHAR};
pub const SCRIPT_UNDEFINED: WORD = 0;
pub const USP_E_SCRIPT_NOT_IN_FONT: HRESULT = MAKE_HRESULT!(SEVERITY_ERROR, FACILITY_ITF, 0x200);
DECLARE_HANDLE!{SCRIPT_CACHE, SCRIPT_CACHE__}
extern "system" {
    pub fn ScriptFreeCache(
        psc: *mut SCRIPT_CACHE,
    ) -> HRESULT;
}
STRUCT!{struct SCRIPT_CONTROL {
    bit_fields: DWORD,
}}
BITFIELD!{SCRIPT_CONTROL bit_fields: DWORD [
    uDefaultLanguage set_uDefaultLanguage[0..16],
    fContextDigits set_fContextDigits[16..17],
    fInvertPreBoundDir set_fInvertPreBoundDir[17..18],
    fInvertPostBoundDir set_fInvertPostBoundDir[18..19],
    fLinkStringBefore set_fLinkStringBefore[19..20],
    fLinkStringAfter set_fLinkStringAfter[20..21],
    fNeutralOverride set_fNeutralOverride[21..22],
    fNumericOverride set_fNumericOverride[22..23],
    fLegacyBidiClass set_fLegacyBidiClass[23..24],
    fMergeNeutralItems set_fMergeNeutralItems[24..25],
    fReserved set_fReserved[25..32],
]}
STRUCT!{struct SCRIPT_STATE {
    bit_fields: WORD,
}}
BITFIELD!{SCRIPT_STATE bit_fields: WORD [
    uBidiLevel set_uBidiLevel[0..5],
    fOverrideDirection set_fOverrideDirection[5..6],
    fInhibitSymSwap set_fInhibitSymSwap[6..7],
    fCharShape set_fCharShape[7..8],
    fDigitSubstitute set_fDigitSubstitute[8..9],
    fInhibitLigate set_fInhibitLigate[9..10],
    fDisplayZWG set_fDisplayZWG[10..11],
    fArabicNumContext set_fArabicNumContext[11..12],
    fGcpClusters set_fGcpClusters[12..13],
    fReserved set_fReserved[13..14],
    fEngineReserved set_fEngineReserved[14..16],
]}
STRUCT!{struct SCRIPT_ANALYSIS {
    bit_fields: WORD,
    s: SCRIPT_STATE,
}}
BITFIELD!{SCRIPT_ANALYSIS bit_fields: WORD [
    eScript set_eScript[0..10],
    fRTL set_fRTL[10..11],
    fLayoutRTL set_fLayoutRTL[11..12],
    fLinkBefore set_fLinkBefore[12..13],
    fLinkAfter set_fLinkAfter[13..14],
    fLogicalOrder set_fLogicalOrder[14..15],
    fNoGlyphIndex set_fNoGlyphIndex[15..16],
]}
STRUCT!{struct SCRIPT_ITEM {
    iCharPos: c_int,
    a: SCRIPT_ANALYSIS,
}}
extern "system" {
    pub fn ScriptItemize(
        pwcInChars: *const WCHAR,
        cInChars: c_int,
        cMaxItems: c_int,
        psControl: *const SCRIPT_CONTROL,
        psState: *const SCRIPT_STATE,
        pItems: *mut SCRIPT_ITEM,
        pcItems: *mut c_int,
    ) -> HRESULT;
    pub fn ScriptLayout(
        cRuns: c_int,
        pbLevel: *const BYTE,
        piVisualToLogical: *mut c_int,
        piLogicalToVisual: *mut c_int,
    ) -> HRESULT;
}
pub const SCRIPT_JUSTIFY_NONE: WORD = 0;
pub const SCRIPT_JUSTIFY_ARABIC_BLANK: WORD = 1;
pub const SCRIPT_JUSTIFY_CHARACTER: WORD = 2;
pub const SCRIPT_JUSTIFY_RESERVED1: WORD = 3;
pub const SCRIPT_JUSTIFY_BLANK: WORD = 4;
pub const SCRIPT_JUSTIFY_RESERVED2: WORD = 5;
pub const SCRIPT_JUSTIFY_RESERVED3: WORD = 6;
pub const SCRIPT_JUSTIFY_ARABIC_NORMAL: WORD = 7;
pub const SCRIPT_JUSTIFY_ARABIC_KASHIDA: WORD = 8;
pub const SCRIPT_JUSTIFY_ARABIC_ALEF: WORD = 9;
pub const SCRIPT_JUSTIFY_ARABIC_HA: WORD = 10;
pub const SCRIPT_JUSTIFY_ARABIC_RA: WORD = 11;
pub const SCRIPT_JUSTIFY_ARABIC_BA: WORD = 12;
pub const SCRIPT_JUSTIFY_ARABIC_BARA: WORD = 13;
pub const SCRIPT_JUSTIFY_ARABIC_SEEN: WORD = 14;
pub const SCRIPT_JUSTIFY_ARABIC_SEEN_M: WORD = 15;
STRUCT!{struct SCRIPT_VISATTR {
    bit_fields: WORD,
}}
BITFIELD!{SCRIPT_VISATTR bit_fields: WORD [
    uJustification set_uJustification[0..4],
    fClusterStart set_fClusterStart[4..5],
    fDiacritic set_fDiacritic[5..6],
    fZeroWidth set_fZeroWidth[6..7],
    fReserved set_fReserved[7..8],
    fShapeReserved set_fShapeReserved[8..16],
]}
extern "system" {
    pub fn ScriptShape(
        hdc: HDC,
        psc: *mut SCRIPT_CACHE,
        pwcChars: *const WCHAR,
        cChars: c_int,
        cMaxGlyphs: c_int,
        psa: *mut SCRIPT_ANALYSIS,
        pwOutGlyphs: *mut WORD,
        pwLogClust: *mut WORD,
        psva: *mut SCRIPT_VISATTR,
        pcGlyphs: *mut c_int,
    ) -> HRESULT;
}
STRUCT!{struct GOFFSET {
    du: LONG,
    dv: LONG,
}}
extern "system" {
    pub fn ScriptPlace(
        hdc: HDC,
        psc: *mut SCRIPT_CACHE,
        pwGlyphs: *const WORD,
        cGlyphs: c_int,
        psva: *const SCRIPT_VISATTR,
        psa: *mut SCRIPT_ANALYSIS,
        piAdvance: *mut c_int,
        pGoffset: *mut GOFFSET,
        pABC: *mut ABC,
    ) -> HRESULT;
    pub fn ScriptTextOut(
        hdc: HDC,
        psc: *mut SCRIPT_CACHE,
        x: c_int,
        y: c_int,
        fuOptions: UINT,
        lprc: *const RECT,
        psa: *const SCRIPT_ANALYSIS,
        pwcReserved: *const WCHAR,
        iReserved: c_int,
        pwGlyphs: *const WORD,
        cGlyphs: c_int,
        piAdvance: *const c_int,
        piJustify: *const c_int,
        pGoffset: *const GOFFSET,
    ) -> HRESULT;
    pub fn ScriptJustify(
        psva: *const SCRIPT_VISATTR,
        piAdvance: *const c_int,
        cGlyphs: c_int,
        iDx: c_int,
        iMinKashida: c_int,
        piJustify: *mut c_int,
    ) -> HRESULT;
}
STRUCT!{struct SCRIPT_LOGATTR {
    bit_fields: BYTE,
}}
BITFIELD!{SCRIPT_LOGATTR bit_fields: BYTE [
    fSoftBreak set_fSoftBreak[0..1],
    fWhiteSpace set_fWhiteSpace[1..2],
    fCharStop set_fCharStop[2..3],
    fWordStop set_fWordStop[3..4],
    fInvalid set_fInvalid[4..5],
    fReserved set_fReserved[5..8],
]}
extern "system" {
    pub fn ScriptBreak(
        pwcChars: *const WCHAR,
        cChars: c_int,
        psa: *const SCRIPT_ANALYSIS,
        psla: *mut SCRIPT_LOGATTR,
    ) -> HRESULT;
    pub fn ScriptCPtoX(
        iCP: c_int,
        fTrailing: BOOL,
        cChars: c_int,
        cGlyphs: c_int,
        pwLogClust: *const WORD,
        psva: *const SCRIPT_VISATTR,
        piAdvance: *const c_int,
        psa: *const SCRIPT_ANALYSIS,
        piX: *mut c_int,
    ) -> HRESULT;
    pub fn ScriptXtoCP(
        iX: c_int,
        cChars: c_int,
        cGlyphs: c_int,
        pwLogClust: *const WORD,
        psva: *const SCRIPT_VISATTR,
        piAdvance: *const c_int,
        psa: *const SCRIPT_ANALYSIS,
        piCP: *mut c_int,
        piTrailing: *mut c_int,
    ) -> HRESULT;
    pub fn ScriptGetLogicalWidths(
        psa: *const SCRIPT_ANALYSIS,
        cChars: c_int,
        cGlyphs: c_int,
        piGlyphWidth: *const c_int,
        pwLogClust: *const WORD,
        psva: *const SCRIPT_VISATTR,
        piDx: *mut c_int,
    ) -> HRESULT;
    pub fn ScriptApplyLogicalWidth(
        piDx: *const c_int,
        cChars: c_int,
        cGlyphs: c_int,
        pwLogClust: *const WORD,
        psva: *const SCRIPT_VISATTR,
        piAdvance: *const c_int,
        psa: *const SCRIPT_ANALYSIS,
        pABC: *mut ABC,
        piJustify: *mut c_int,
    ) -> HRESULT;
}
pub const SGCM_RTL: DWORD = 0x00000001;
extern "system" {
    pub fn ScriptGetCMap(
        hdc: HDC,
        psc: *mut SCRIPT_CACHE,
        pwcInChars: *const WCHAR,
        cChars: c_int,
        dwFlags: DWORD,
        pwOutGlyphs: *mut WORD,
    ) -> HRESULT;
    pub fn ScriptGetGlyphABCWidth(
        hdc: HDC,
        psc: *mut SCRIPT_CACHE,
        wGlyph: WORD,
        pABC: *mut ABC,
    ) -> HRESULT;
}
STRUCT!{struct SCRIPT_PROPERTIES {
    bit_fields1: DWORD,
    bit_fields2: DWORD,
}}
BITFIELD!{SCRIPT_PROPERTIES bit_fields1: DWORD [
    langid set_langid[0..16],
    fNumeric set_fNumeric[16..17],
    fComplex set_fComplex[17..18],
    fNeedsWordBreaking set_fNeedsWordBreaking[18..19],
    fNeedsCaretInfo set_fNeedsCaretInfo[19..20],
    bCharSet set_bCharSet[20..28],
    fControl set_fControl[28..29],
    fPrivateUseArea set_fPrivateUseArea[29..30],
    fNeedsCharacterJustify set_fNeedsCharacterJustify[30..31],
    fInvalidGlyph set_fInvalidGlyph[31..32],
]}
BITFIELD!{SCRIPT_PROPERTIES bit_fields2: DWORD [
    fInvalidLogAttr set_fInvalidLogAttr[0..1],
    fCDM set_fCDM[1..2],
    fAmbiguousCharSet set_fAmbiguousCharSet[2..3],
    fClusterSizeVaries set_fClusterSizeVaries[3..4],
    fRejectInvalid set_fRejectInvalid[4..5],
]}
extern "system" {
    pub fn ScriptGetProperties(
        ppSp: *mut *mut *const SCRIPT_PROPERTIES,
        piNumScripts: *mut c_int,
    ) -> HRESULT;
}
STRUCT!{struct SCRIPT_FONTPROPERTIES {
    cBytes: c_int,
    wgBlank: WORD,
    wgDefault: WORD,
    wgInvalid: WORD,
    wgKashida: WORD,
    iKashidaWidth: c_int,
}}
extern "system" {
    pub fn ScriptGetFontProperties(
        hdc: HDC,
        psc: *mut SCRIPT_CACHE,
        sfp: *mut SCRIPT_FONTPROPERTIES,
    ) -> HRESULT;
    pub fn ScriptCacheGetHeight(
        hdc: HDC,
        psc: *mut SCRIPT_CACHE,
        tmHeight: *mut c_long,
    ) -> HRESULT;
}
pub const SSA_PASSWORD: DWORD = 0x00000001;
pub const SSA_TAB: DWORD = 0x00000002;
pub const SSA_CLIP: DWORD = 0x00000004;
pub const SSA_FIT: DWORD = 0x00000008;
pub const SSA_DZWG: DWORD = 0x00000010;
pub const SSA_FALLBACK: DWORD = 0x00000020;
pub const SSA_BREAK: DWORD = 0x00000040;
pub const SSA_GLYPHS: DWORD = 0x00000080;
pub const SSA_RTL: DWORD = 0x00000100;
pub const SSA_GCP: DWORD = 0x00000200;
pub const SSA_HOTKEY: DWORD = 0x00000400;
pub const SSA_METAFILE: DWORD = 0x00000800;
pub const SSA_LINK: DWORD = 0x00001000;
pub const SSA_HIDEHOTKEY: DWORD = 0x00002000;
pub const SSA_HOTKEYONLY: DWORD = 0x00002400;
pub const SSA_FULLMEASURE: DWORD = 0x04000000;
pub const SSA_LPKANSIFALLBACK: DWORD = 0x08000000;
pub const SSA_PIDX: DWORD = 0x10000000;
pub const SSA_LAYOUTRTL: DWORD = 0x20000000;
pub const SSA_DONTGLYPH: DWORD = 0x40000000;
pub const SSA_NOKASHIDA: DWORD = 0x80000000;
STRUCT!{struct SCRIPT_TABDEF {
    cTabStops: c_int,
    iScale: c_int,
    pTabStops: *mut c_int,
    iTabOrigin: c_int,
}}
DECLARE_HANDLE!{SCRIPT_STRING_ANALYSIS, SCRIPT_STRING_ANALYSIS__}
extern "system" {
    pub fn ScriptStringAnalyse(
        hdc: HDC,
        pString: *const c_void,
        cString: c_int,
        cGlyphs: c_int,
        iCharset: c_int,
        dwFlags: DWORD,
        iReqWidth: c_int,
        psControl: *mut SCRIPT_CONTROL,
        psState: *mut SCRIPT_STATE,
        piDx: *const c_int,
        pTabdef: *mut SCRIPT_TABDEF,
        pbInClass: *const BYTE,
        pssa: *mut SCRIPT_STRING_ANALYSIS,
    ) -> HRESULT;
    pub fn ScriptStringFree(
        pssa: *mut SCRIPT_STRING_ANALYSIS,
    ) -> HRESULT;
    pub fn ScriptString_pSize(
        ssa: SCRIPT_STRING_ANALYSIS,
    ) -> *const SIZE;
    pub fn ScriptString_pcOutChars(
        ssa: SCRIPT_STRING_ANALYSIS,
    ) -> *const c_int;
    pub fn ScriptString_pLogAttr(
        ssa: SCRIPT_STRING_ANALYSIS,
    ) -> *const SCRIPT_LOGATTR;
    pub fn ScriptStringGetOrder(
        ssa: SCRIPT_STRING_ANALYSIS,
        puOrder: *mut UINT,
    ) -> HRESULT;
    pub fn ScriptStringCPtoX(
        ssa: SCRIPT_STRING_ANALYSIS,
        icp: c_int,
        fTrailing: BOOL,
        pX: *mut c_int,
    ) -> HRESULT;
    pub fn ScriptStringXtoCP(
        ssa: SCRIPT_STRING_ANALYSIS,
        iX: c_int,
        piCh: *mut c_int,
        piTrailing: *mut c_int,
    ) -> HRESULT;
    pub fn ScriptStringGetLogicalWidths(
        ssa: SCRIPT_STRING_ANALYSIS,
        dpiDx: *mut c_int,
    ) -> HRESULT;
    pub fn ScriptStringValidate(
        ssa: SCRIPT_STRING_ANALYSIS,
    ) -> HRESULT;
    pub fn ScriptStringOut(
        ssa: SCRIPT_STRING_ANALYSIS,
        iX: c_int,
        iY: c_int,
        uOptions: UINT,
        prc: *const RECT,
        iMinSel: c_int,
        iMaxSel: c_int,
        fDisabled: BOOL,
    ) -> HRESULT;
}
pub const SIC_COMPLEX: DWORD = 1;
pub const SIC_ASCIIDIGIT: DWORD = 2;
pub const SIC_NEUTRAL: DWORD = 4;
extern "system" {
    pub fn ScriptIsComplex(
        pwcInChars: *const WCHAR,
        cInChars: c_int,
        dwFlags: DWORD,
    ) -> HRESULT;
}
STRUCT!{struct SCRIPT_DIGITSUBSTITUTE {
    bit_fields1: DWORD,
    bit_fields2: DWORD,
    dwReserved: DWORD,
}}
BITFIELD!{SCRIPT_DIGITSUBSTITUTE bit_fields1: DWORD [
    NationalDigitLanguage set_NationalDigitLanguage[0..16],
    TraditionalDigitLanguage set_TraditionalDigitLanguage[16..32],
]}
BITFIELD!{SCRIPT_DIGITSUBSTITUTE bit_fields2: DWORD [
    DigitSubstitute set_DigitSubstitute[0..8],
]}
extern "system" {
    pub fn ScriptRecordDigitSubstitution(
        Locale: LCID,
        psds: *mut SCRIPT_DIGITSUBSTITUTE,
    ) -> HRESULT;
}
pub const SCRIPT_DIGITSUBSTITUTE_CONTEXT: BYTE = 0;
pub const SCRIPT_DIGITSUBSTITUTE_NONE: BYTE = 1;
pub const SCRIPT_DIGITSUBSTITUTE_NATIONAL: BYTE = 2;
pub const SCRIPT_DIGITSUBSTITUTE_TRADITIONAL: BYTE = 3;
extern "system" {
    pub fn ScriptApplyDigitSubstitution(
        psds: *const SCRIPT_DIGITSUBSTITUTE,
        psc: *mut SCRIPT_CONTROL,
        pss: *mut SCRIPT_STATE,
    ) -> HRESULT;
}
pub type OPENTYPE_TAG = ULONG;
pub const SCRIPT_TAG_UNKNOWN: OPENTYPE_TAG = 0x00000000;
STRUCT!{struct OPENTYPE_FEATURE_RECORD {
    tagFeature: OPENTYPE_TAG,
    lParameter: LONG,
}}
STRUCT!{struct TEXTRANGE_PROPERTIES {
    potfRecords: *mut OPENTYPE_FEATURE_RECORD,
    cotfRecords: c_int,
}}
STRUCT!{struct SCRIPT_CHARPROP {
    bit_fields: WORD,
}}
BITFIELD!{SCRIPT_CHARPROP bit_fields: WORD [
    fCanGlyphAlone set_fCanGlyphAlone[0..1],
    reserved set_reserved[1..16],
]}
STRUCT!{struct SCRIPT_GLYPHPROP {
    sva: SCRIPT_VISATTR,
    reserved: WORD,
}}
extern "system" {
    pub fn ScriptShapeOpenType(
        hdc: HDC,
        psc: *mut SCRIPT_CACHE,
        psa: *mut SCRIPT_ANALYSIS,
        tagScript: OPENTYPE_TAG,
        tagLangSys: OPENTYPE_TAG,
        rcRangeChars: *mut c_int,
        rpRangeProperties: *mut *mut TEXTRANGE_PROPERTIES,
        cRanges: c_int,
        pwcChars: *const WCHAR,
        cChars: c_int,
        cMaxGlyphs: c_int,
        pwLogClust: *mut WORD,
        pCharProps: *mut SCRIPT_CHARPROP,
        pwOutGlyphs: *mut WORD,
        pOutGlyphProps: *mut SCRIPT_GLYPHPROP,
        pcGlyphs: *mut c_int,
    ) -> HRESULT;
    pub fn ScriptPlaceOpenType(
        hdc: HDC,
        psc: *mut SCRIPT_CACHE,
        psa: *mut SCRIPT_ANALYSIS,
        tagScript: OPENTYPE_TAG,
        tagLangSys: OPENTYPE_TAG,
        rcRangeChars: *mut c_int,
        rpRangeProperties: *mut *mut TEXTRANGE_PROPERTIES,
        cRanges: c_int,
        pwcChars: *const WCHAR,
        pwLogClust: *mut WORD,
        pCharProps: *mut SCRIPT_CHARPROP,
        cChars: c_int,
        pwGlyphs: *const WORD,
        pGlyphProps: *const SCRIPT_GLYPHPROP,
        cGlyphs: c_int,
        piAdvance: *mut c_int,
        pGoffset: *mut GOFFSET,
        pABC: *mut ABC,
    ) -> HRESULT;
    pub fn ScriptItemizeOpenType(
        pwcInChars: *const WCHAR,
        cInChars: c_int,
        cMaxItems: c_int,
        psControl: *const SCRIPT_CONTROL,
        psState: *const SCRIPT_STATE,
        pItems: *mut SCRIPT_ITEM,
        pScriptTags: *mut OPENTYPE_TAG,
        pcItems: *mut c_int,
    ) -> HRESULT;
    pub fn ScriptGetFontScriptTags(
        hdc: HDC,
        psc: *mut SCRIPT_CACHE,
        psa: *mut SCRIPT_ANALYSIS,
        cMaxTags: c_int,
        pScriptTags: *mut OPENTYPE_TAG,
        pcTags: *mut c_int,
    ) -> HRESULT;
    pub fn ScriptGetFontLanguageTags(
        hdc: HDC,
        psc: *mut SCRIPT_CACHE,
        psa: *mut SCRIPT_ANALYSIS,
        tagScript: OPENTYPE_TAG,
        cMaxTags: c_int,
        pLangsysTags: *mut OPENTYPE_TAG,
        pcTags: *mut c_int,
    ) -> HRESULT;
    pub fn ScriptGetFontFeatureTags(
        hdc: HDC,
        psc: *mut SCRIPT_CACHE,
        psa: *mut SCRIPT_ANALYSIS,
        tagScript: OPENTYPE_TAG,
        tagLangSys: OPENTYPE_TAG,
        cMaxTags: c_int,
        pFeatureTags: *mut OPENTYPE_TAG,
        pcTags: *mut c_int,
    ) -> HRESULT;
    pub fn ScriptGetFontAlternateGlyphs(
        hdc: HDC,
        psc: *mut SCRIPT_CACHE,
        psa: *mut SCRIPT_ANALYSIS,
        tagScript: OPENTYPE_TAG,
        tagLangSys: OPENTYPE_TAG,
        tagFeature: OPENTYPE_TAG,
        wGlyphId: WORD,
        cMaxAlternates: c_int,
        pAlternateGlyphs: *mut WORD,
        pcAlternates: *mut c_int,
    ) -> HRESULT;
    pub fn ScriptSubstituteSingleGlyph(
        hdc: HDC,
        psc: *mut SCRIPT_CACHE,
        psa: *mut SCRIPT_ANALYSIS,
        tagScript: OPENTYPE_TAG,
        tagLangSys: OPENTYPE_TAG,
        tagFeature: OPENTYPE_TAG,
        lParameter: LONG,
        wGlyphId: WORD,
        pwOutGlyphId: *mut WORD,
    ) -> HRESULT;
    pub fn ScriptPositionSingleGlyph(
        hdc: HDC,
        psc: *mut SCRIPT_CACHE,
        psa: *mut SCRIPT_ANALYSIS,
        tagScript: OPENTYPE_TAG,
        tagLangSys: OPENTYPE_TAG,
        tagFeature: OPENTYPE_TAG,
        lParameter: LONG,
        wGlyphId: WORD,
        iAdvance: c_int,
        GOffset: GOFFSET,
        piOutAdvance: *mut c_int,
        pOutGoffset: *mut GOFFSET,
    ) -> HRESULT;
}