2 * Copyright (C) 2005 Steven Edwards
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 /** ScriptStringAnalyse */
23 #define SSA_PASSWORD 0x00000001
24 #define SSA_TAB 0x00000002
25 #define SSA_CLIP 0x00000004
26 #define SSA_FIT 0x00000008
27 #define SSA_DZWG 0x00000010
28 #define SSA_FALLBACK 0x00000020
29 #define SSA_BREAK 0x00000040
30 #define SSA_GLYPHS 0x00000080
31 #define SSA_RTL 0x00000100
32 #define SSA_GCP 0x00000200
33 #define SSA_HOTKEY 0x00000400
34 #define SSA_METAFILE 0x00000800
35 #define SSA_LINK 0x00001000
36 #define SSA_HIDEHOTKEY 0x00002000
37 #define SSA_HOTKEYONLY 0x00002400
38 #define SSA_FULLMEASURE 0x04000000
39 #define SSA_LPKANSIFALLBACK 0x08000000
40 #define SSA_PIDX 0x10000000
41 #define SSA_LAYOUTRTL 0x20000000
42 #define SSA_DONTGLYPH 0x40000000
43 #define SSA_NOKASHIDA 0x80000000
45 /** StringIsComplex */
47 #define SIC_ASCIIDIGIT 2
50 typedef struct tag_SCRIPT_CONTROL {
51 DWORD uDefaultLanguage :16;
52 DWORD fContextDigits :1;
53 DWORD fInvertPreBoundDir :1;
54 DWORD fInvertPostBoundDir :1;
55 DWORD fLinkStringBefore :1;
56 DWORD fLinkStringAfter :1;
57 DWORD fNeutralOverride :1;
58 DWORD fNumericOverride :1;
59 DWORD fLegacyBidiClass :1;
67 DWORD fNeedsWordBreaking :1;
68 DWORD fNeedsCaretInfo :1;
71 DWORD fPrivateUseArea :1;
72 DWORD fNeedsCharacterJustify :1;
73 DWORD fInvalidGlyph :1;
74 DWORD fInvalidLogAttr :1;
76 DWORD fAmbiguousCharSet :1;
77 DWORD fClusterSizeVaries :1;
78 DWORD fRejectInvalid :1;
81 typedef struct tag_SCRIPT_STATE {
83 WORD fOverrideDirection :1;
84 WORD fInhibitSymSwap :1;
86 WORD fDigitSubstitute :1;
87 WORD fInhibitLigate :1;
89 WORD fArabicNumContext :1;
92 WORD fEngineReserved :2;
95 typedef struct tag_SCRIPT_ANALYSIS {
101 WORD fLogicalOrder :1;
102 WORD fNoGlyphIndex :1;
106 typedef struct tag_SCRIPT_ITEM {
111 typedef struct tag_SCRIPT_DIGITSUBSTITUTE {
112 DWORD NationalDigitLanguage :16;
113 DWORD TraditionalDigitLanguage :16;
114 DWORD DigitSubstitute :8;
116 } SCRIPT_DIGITSUBSTITUTE;
118 typedef struct tag_SCRIPT_FONTPROPERTIES {
125 } SCRIPT_FONTPROPERTIES;
127 typedef struct tag_SCRIPT_TABDEF {
134 typedef void *SCRIPT_CACHE;
135 typedef void *SCRIPT_STRING_ANALYSIS;
137 /* Function Declairations */
139 HRESULT WINAPI ScriptGetProperties(const SCRIPT_PROPERTIES ***ppSp, int *piNumScripts);
140 HRESULT WINAPI ScriptRecordDigitSubstitution(LCID Locale, SCRIPT_DIGITSUBSTITUTE *psds);
141 HRESULT WINAPI ScriptApplyDigitSubstitution(const SCRIPT_DIGITSUBSTITUTE* psds,
142 SCRIPT_CONTROL* psc, SCRIPT_STATE* pss);
143 HRESULT WINAPI ScriptItemize(const WCHAR *pwcInChars, int cInChars, int cMaxItems,
144 const SCRIPT_CONTROL *psControl, const SCRIPT_STATE *psState,
145 SCRIPT_ITEM *pItems, int *pcItems);
146 HRESULT WINAPI ScriptGetFontProperties(HDC hdc, SCRIPT_CACHE *psc, SCRIPT_FONTPROPERTIES *sfp);
147 HRESULT WINAPI ScriptStringAnalyse(HDC hdc,
154 SCRIPT_CONTROL *psControl,
155 SCRIPT_STATE *psState,
157 SCRIPT_TABDEF *pTabdef,
158 const BYTE *pbInClass,
159 SCRIPT_STRING_ANALYSIS *pssa);
160 HRESULT WINAPI ScriptStringFree(SCRIPT_STRING_ANALYSIS *pssa);
161 HRESULT WINAPI ScriptIsComplex(const WCHAR* pwcInChars, int cInChars, DWORD dwFlags);
163 #endif /* __USP10_H */