source: Daodan/MinGW/include/usp10.h@ 1106

Last change on this file since 1106 was 1046, checked in by alloc, 8 years ago

Daodan: Added Windows MinGW and build batch file

File size: 8.9 KB
Line 
1#ifndef _USP10_H
2#define _USP10_H
3#if __GNUC__ >= 3
4#pragma GCC system_header
5#endif
6
7#include <windows.h>
8
9#ifdef __cplusplus
10extern "C" {
11#endif
12#pragma pack(push,1)
13
14#define SCRIPT_UNDEFINED 0
15#define USP_E_SCRIPT_NOT_IN_FONT MAKE_HRESULT(SEVERITY_ERROR,FACILITY_ITF,0x200)
16#define SGCM_RTL 0x00000001
17#define SSA_PASSWORD 0x00000001
18#define SSA_TAB 0x00000002
19#define SSA_CLIP 0x00000004
20#define SSA_FIT 0x00000008
21#define SSA_DZWG 0x00000010
22#define SSA_FALLBACK 0x00000020
23#define SSA_BREAK 0x00000040
24#define SSA_GLYPHS 0x00000080
25#define SSA_RTL 0x00000100
26#define SSA_GCP 0x00000200
27#define SSA_HOTKEY 0x00000400
28#define SSA_METAFILE 0x00000800
29#define SSA_LINK 0x00001000
30#define SSA_HIDEHOTKEY 0x00002000
31#define SSA_HOTKEYONLY 0x00002400
32#define SSA_FULLMEASURE 0x04000000
33#define SSA_LPKANSIFALLBACK 0x08000000
34#define SSA_PIDX 0x10000000
35#define SSA_LAYOUTRTL 0x20000000
36#define SSA_DONTGLYPH 0x40000000
37#define SSA_NOKASHIDA 0x80000000
38#define SIC_COMPLEX 1
39#define SIC_ASCIIDIGIT 2
40#define SIC_NEUTRAL 4
41#define SCRIPT_DIGITSUBSTITUTE_CONTEXT 0
42#define SCRIPT_DIGITSUBSTITUTE_NONE 1
43#define SCRIPT_DIGITSUBSTITUTE_NATIONAL 2
44#define SCRIPT_DIGITSUBSTITUTE_TRADITIONAL 3
45
46typedef enum tag_SCRIPT_JUSTIFY {
47 SCRIPT_JUSTIFY_NONE = 0,
48 SCRIPT_JUSTIFY_ARABIC_BLANK = 1,
49 SCRIPT_JUSTIFY_CHARACTER = 2,
50 SCRIPT_JUSTIFY_RESERVED1 = 3,
51 SCRIPT_JUSTIFY_BLANK = 4,
52 SCRIPT_JUSTIFY_RESERVED2 = 5,
53 SCRIPT_JUSTIFY_RESERVED3 = 6,
54 SCRIPT_JUSTIFY_ARABIC_NORMAL = 7,
55 SCRIPT_JUSTIFY_ARABIC_KASHIDA = 8,
56 SCRIPT_JUSTIFY_ARABIC_ALEF = 9,
57 SCRIPT_JUSTIFY_ARABIC_HA = 10,
58 SCRIPT_JUSTIFY_ARABIC_RA = 11,
59 SCRIPT_JUSTIFY_ARABIC_BA = 12,
60 SCRIPT_JUSTIFY_ARABIC_BARA = 13,
61 SCRIPT_JUSTIFY_ARABIC_SEEN = 14,
62 SCRIPT_JUSTIFY_ARABIC_SEEN_M = 15
63} SCRIPT_JUSTIFY;
64
65typedef struct tagGOFFSET {
66 LONG du;
67 LONG dv;
68} GOFFSET;
69typedef ULONG OPENTYPE_TAG;
70typedef struct opentype_feature_record{
71 OPENTYPE_TAG tagFeature;
72 LONG lParameter;
73} OPENTYPE_FEATURE_RECORD;
74typedef struct tag_SCRIPT_STATE {
75 WORD uBidiLevel :5;
76 WORD fOverrideDirection :1;
77 WORD fInhibitSymSwap :1;
78 WORD fCharShape :1;
79 WORD fDigitSubstitute :1;
80 WORD fInhibitLigate :1;
81 WORD fDisplayZWG :1;
82 WORD fArabicNumContext :1;
83 WORD fGcpClusters :1;
84 WORD fReserved :1;
85 WORD fEngineReserved :2;
86} SCRIPT_STATE;
87typedef struct tag_SCRIPT_ANALYSIS {
88 WORD eScript :10;
89 WORD fRTL :1;
90 WORD fLayoutRTL :1;
91 WORD fLinkBefore :1;
92 WORD fLinkAfter :1;
93 WORD fLogicalOrder :1;
94 WORD fNoGlyphIndex :1;
95 SCRIPT_STATE s ;
96} SCRIPT_ANALYSIS;
97typedef void *SCRIPT_CACHE;
98typedef struct script_charprop {
99 WORD fCanGlyphAlone : 1;
100 WORD reserved : 15;
101} SCRIPT_CHARPROP;
102typedef struct tag_SCRIPT_CONTROL {
103 DWORD uDefaultLanguage :16;
104 DWORD fContextDigits :1;
105 DWORD fInvertPreBoundDir :1;
106 DWORD fInvertPostBoundDir :1;
107 DWORD fLinkStringBefore :1;
108 DWORD fLinkStringAfter :1;
109 DWORD fNeutralOverride :1;
110 DWORD fNumericOverride :1;
111 DWORD fLegacyBidiClass :1;
112 DWORD fReserved :8;
113} SCRIPT_CONTROL;
114typedef struct tag_SCRIPT_DIGITSUBSTITUTE {
115 DWORD NationalDigitLanguage : 16;
116 DWORD TraditionalDigitLanguage : 16;
117 DWORD DigitSubstitute :8;
118 DWORD dwReserved;
119} SCRIPT_DIGITSUBSTITUTE;
120typedef struct {
121 int cBytes;
122 WORD wgBlank;
123 WORD wgDefault;
124 WORD wgInvalid;
125 WORD wgKashida;
126 int iKashidaWidth;
127} SCRIPT_FONTPROPERTIES;
128typedef struct tag_SCRIPT_VISATTR {
129 WORD uJustification :4;
130 WORD fClusterStart :1;
131 WORD fDiacritic :1;
132 WORD fZeroWidth :1;
133 WORD fReserved :1;
134 WORD fShapeReserved :8;
135} SCRIPT_VISATTR;
136typedef struct script_glyphprop {
137 SCRIPT_VISATTR sva;
138 WORD reserved;
139} SCRIPT_GLYPHPROP;
140typedef struct tag_SCRIPT_ITEM {
141 int iCharPos;
142 SCRIPT_ANALYSIS a;
143} SCRIPT_ITEM;
144typedef struct tag_SCRIPT_LOGATTR {
145 BYTE fSoftBreak :1;
146 BYTE fWhiteSpace :1;
147 BYTE fCharStop :1;
148 BYTE fWordStop :1;
149 BYTE fInvalid :1;
150 BYTE fReserved :3;
151} SCRIPT_LOGATTR;
152typedef struct {
153 DWORD langid :16;
154 DWORD fNumeric :1;
155 DWORD fComplex :1;
156 DWORD fNeedsWordBreaking :1;
157 DWORD fNeedsCaretInfo :1;
158 DWORD bCharSet :8;
159 DWORD fControl :1;
160 DWORD fPrivateUseArea :1;
161 DWORD fNeedsCharacterJustify :1;
162 DWORD fInvalidGlyph :1;
163 DWORD fInvalidLogAttr :1;
164 DWORD fCDM :1;
165 DWORD fAmbiguousCharSet :1;
166 DWORD fClusterSizeVaries :1;
167 DWORD fRejectInvalid :1;
168} SCRIPT_PROPERTIES;
169typedef void *SCRIPT_STRING_ANALYSIS;
170typedef struct tag_SCRIPT_TABDEF {
171 int cTabStops;
172 int iScale;
173 int *pTabStops;
174 int iTabOrigin;
175} SCRIPT_TABDEF;
176typedef struct textrange_properties{
177 OPENTYPE_FEATURE_RECORD* potfRecords;
178 int cotfRecords;
179} TEXTRANGE_PROPERTIES;
180
181
182HRESULT WINAPI ScriptApplyDigitSubstitution(const SCRIPT_DIGITSUBSTITUTE*,SCRIPT_CONTROL*,SCRIPT_STATE*);
183HRESULT WINAPI ScriptApplyLogicalWidth(const int *,int,int,const WORD *,const SCRIPT_VISATTR *,const int *,const SCRIPT_ANALYSIS *,ABC *,int *);
184HRESULT WINAPI ScriptBreak(const WCHAR *,int,const SCRIPT_ANALYSIS *,SCRIPT_LOGATTR *);
185HRESULT WINAPI ScriptCacheGetHeight(HDC,SCRIPT_CACHE *,long *);
186HRESULT WINAPI ScriptCPtoX(int,BOOL,int,int,const WORD *,const SCRIPT_VISATTR *,const int *,const SCRIPT_ANALYSIS *,int *);
187HRESULT WINAPI ScriptFreeCache(SCRIPT_CACHE *);
188HRESULT WINAPI ScriptGetCMap(HDC,SCRIPT_CACHE *,const WCHAR*,int,DWORD,WORD *);
189HRESULT WINAPI ScriptGetFontAlternateGlyphs(HDC,SCRIPT_CACHE*,SCRIPT_ANALYSIS*,OPENTYPE_TAG,OPENTYPE_TAG,OPENTYPE_TAG,WORD,int,WORD*,int*);
190HRESULT WINAPI ScriptGetFontFeatureTags(HDC,SCRIPT_CACHE*,SCRIPT_ANALYSIS*,OPENTYPE_TAG,OPENTYPE_TAG,int,OPENTYPE_TAG*,int*);
191HRESULT WINAPI ScriptGetFontLanguageTags(HDC,SCRIPT_CACHE*,SCRIPT_ANALYSIS*,OPENTYPE_TAG,int,OPENTYPE_TAG*,int*);
192HRESULT WINAPI ScriptGetFontProperties(HDC,SCRIPT_CACHE *,SCRIPT_FONTPROPERTIES *);
193HRESULT WINAPI ScriptGetFontScriptTags(HDC,SCRIPT_CACHE*,SCRIPT_ANALYSIS*,int,OPENTYPE_TAG*,int*);
194HRESULT WINAPI ScriptGetGlyphABCWidth(HDC,SCRIPT_CACHE *,WORD,ABC *);
195HRESULT WINAPI ScriptGetLogicalWidths(const SCRIPT_ANALYSIS *,int,int,const int *,const WORD *,const SCRIPT_VISATTR *,int *);
196HRESULT WINAPI ScriptGetProperties(const SCRIPT_PROPERTIES ***,int *);
197HRESULT WINAPI ScriptIsComplex(const WCHAR *,int,DWORD);
198HRESULT WINAPI ScriptItemize(const WCHAR *,int,int,const SCRIPT_CONTROL *,const SCRIPT_STATE *,SCRIPT_ITEM *,int *);
199HRESULT WINAPI ScriptItemizeOpenType(const WCHAR*,int,int,const SCRIPT_CONTROL*,const SCRIPT_STATE*,SCRIPT_ITEM*,OPENTYPE_TAG*,int*);
200HRESULT WINAPI ScriptJustify(const SCRIPT_VISATTR *,const int *,int,int,int,int *);
201HRESULT WINAPI ScriptLayout(int,const BYTE *,int *,int *);
202HRESULT WINAPI ScriptPlace(HDC,SCRIPT_CACHE *,const WORD *,int,const SCRIPT_VISATTR *,SCRIPT_ANALYSIS *,int *,GOFFSET *,ABC *);
203HRESULT WINAPI ScriptPlaceOpenType(HDC,SCRIPT_CACHE*,SCRIPT_ANALYSIS*,OPENTYPE_TAG,OPENTYPE_TAG,int*,TEXTRANGE_PROPERTIES**,int,const WCHAR*,const WORD*,const SCRIPT_CHARPROP*,int,const WORD*,const SCRIPT_GLYPHPROP*,int,int*,GOFFSET*,ABC*);
204HRESULT WINAPI ScriptPositionSingleGlyph(HDC,SCRIPT_CACHE*,SCRIPT_ANALYSIS*,OPENTYPE_TAG,OPENTYPE_TAG,OPENTYPE_TAG,LONG,WORD,int,GOFFSET,int*,GOFFSET*);
205HRESULT WINAPI ScriptRecordDigitSubstitution(LCID,SCRIPT_DIGITSUBSTITUTE *);
206HRESULT WINAPI ScriptShape(HDC,SCRIPT_CACHE *,const WCHAR *,int,int,SCRIPT_ANALYSIS *,WORD *,WORD *,SCRIPT_VISATTR *,int *);
207HRESULT WINAPI ScriptShapeOpenType(HDC,SCRIPT_CACHE*,SCRIPT_ANALYSIS*,OPENTYPE_TAG,OPENTYPE_TAG,int*,TEXTRANGE_PROPERTIES**,int,const WCHAR*,int,int,WORD*,SCRIPT_CHARPROP*,WORD*,SCRIPT_GLYPHPROP*,int*);
208HRESULT WINAPI ScriptStringAnalyse(HDC,const void *,int,int,int,DWORD,int,SCRIPT_CONTROL *,SCRIPT_STATE *,const int *,SCRIPT_TABDEF *,const BYTE *,SCRIPT_STRING_ANALYSIS *);
209HRESULT WINAPI ScriptStringCPtoX(SCRIPT_STRING_ANALYSIS,int,BOOL,int *);
210HRESULT WINAPI ScriptStringFree(SCRIPT_STRING_ANALYSIS *);
211HRESULT WINAPI ScriptStringGetLogicalWidths(SCRIPT_STRING_ANALYSIS,int *);
212HRESULT WINAPI ScriptStringGetOrder(SCRIPT_STRING_ANALYSIS,UINT *);
213HRESULT WINAPI ScriptStringOut(SCRIPT_STRING_ANALYSIS,int,int,UINT,const RECT *,int,int,BOOL);
214const int*WINAPI ScriptString_pcOutChars(SCRIPT_STRING_ANALYSIS);
215const SCRIPT_LOGATTR* WINAPI ScriptString_pLogAttr(SCRIPT_STRING_ANALYSIS);
216const SIZE* WINAPI ScriptString_pSize(SCRIPT_STRING_ANALYSIS);
217HRESULT WINAPI ScriptStringValidate(SCRIPT_STRING_ANALYSIS);
218HRESULT WINAPI ScriptStringXtoCP(SCRIPT_STRING_ANALYSIS,int,int *,int *);
219HRESULT WINAPI ScriptSubstituteSingleGlyph(HDC,SCRIPT_CACHE*,SCRIPT_ANALYSIS*,OPENTYPE_TAG,OPENTYPE_TAG,OPENTYPE_TAG,LONG,WORD,WORD*);
220HRESULT WINAPI ScriptTextOut(const HDC,SCRIPT_CACHE *,int,int,UINT,const RECT *,const SCRIPT_ANALYSIS *,const WCHAR *,int,const WORD *,int,const int *,const int *,const GOFFSET *);
221HRESULT WINAPI ScriptXtoCP(int,int,int,const WORD *,const SCRIPT_VISATTR *,const int *,const SCRIPT_ANALYSIS *,int *,int *);
222
223
224#pragma pack(pop)
225#ifdef __cplusplus
226}
227#endif
228
229#endif /* ndef _USP10_H_ */
Note: See TracBrowser for help on using the repository browser.