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
26 /** ScriptStringAnalyse */
27 #define SSA_PASSWORD 0x00000001
28 #define SSA_TAB 0x00000002
29 #define SSA_CLIP 0x00000004
30 #define SSA_FIT 0x00000008
31 #define SSA_DZWG 0x00000010
32 #define SSA_FALLBACK 0x00000020
33 #define SSA_BREAK 0x00000040
34 #define SSA_GLYPHS 0x00000080
35 #define SSA_RTL 0x00000100
36 #define SSA_GCP 0x00000200
37 #define SSA_HOTKEY 0x00000400
38 #define SSA_METAFILE 0x00000800
39 #define SSA_LINK 0x00001000
40 #define SSA_HIDEHOTKEY 0x00002000
41 #define SSA_HOTKEYONLY 0x00002400
42 #define SSA_FULLMEASURE 0x04000000
43 #define SSA_LPKANSIFALLBACK 0x08000000
44 #define SSA_PIDX 0x10000000
45 #define SSA_LAYOUTRTL 0x20000000
46 #define SSA_DONTGLYPH 0x40000000
47 #define SSA_NOKASHIDA 0x80000000
49 /** StringIsComplex */
51 #define SIC_ASCIIDIGIT 2
54 typedef struct tag_SCRIPT_CONTROL
{
55 DWORD uDefaultLanguage
:16;
56 DWORD fContextDigits
:1;
57 DWORD fInvertPreBoundDir
:1;
58 DWORD fInvertPostBoundDir
:1;
59 DWORD fLinkStringBefore
:1;
60 DWORD fLinkStringAfter
:1;
61 DWORD fNeutralOverride
:1;
62 DWORD fNumericOverride
:1;
63 DWORD fLegacyBidiClass
:1;
71 DWORD fNeedsWordBreaking
:1;
72 DWORD fNeedsCaretInfo
:1;
75 DWORD fPrivateUseArea
:1;
76 DWORD fNeedsCharacterJustify
:1;
77 DWORD fInvalidGlyph
:1;
78 DWORD fInvalidLogAttr
:1;
80 DWORD fAmbiguousCharSet
:1;
81 DWORD fClusterSizeVaries
:1;
82 DWORD fRejectInvalid
:1;
85 typedef struct tag_SCRIPT_STATE
{
87 WORD fOverrideDirection
:1;
88 WORD fInhibitSymSwap
:1;
90 WORD fDigitSubstitute
:1;
91 WORD fInhibitLigate
:1;
93 WORD fArabicNumContext
:1;
96 WORD fEngineReserved
:2;
99 typedef struct tag_SCRIPT_ANALYSIS
{
105 WORD fLogicalOrder
:1;
106 WORD fNoGlyphIndex
:1;
110 typedef struct tag_SCRIPT_ITEM
{
115 typedef struct tag_SCRIPT_DIGITSUBSTITUTE
{
116 DWORD NationalDigitLanguage
:16;
117 DWORD TraditionalDigitLanguage
:16;
118 DWORD DigitSubstitute
:8;
120 } SCRIPT_DIGITSUBSTITUTE
;
122 typedef struct tag_SCRIPT_FONTPROPERTIES
{
129 } SCRIPT_FONTPROPERTIES
;
131 typedef struct tag_SCRIPT_TABDEF
{
138 typedef void *SCRIPT_CACHE
;
139 typedef void *SCRIPT_STRING_ANALYSIS
;
141 /* Function Declairations */
143 HRESULT WINAPI
ScriptGetProperties(const SCRIPT_PROPERTIES
***ppSp
, int *piNumScripts
);
144 HRESULT WINAPI
ScriptRecordDigitSubstitution(LCID Locale
, SCRIPT_DIGITSUBSTITUTE
*psds
);
145 HRESULT WINAPI
ScriptApplyDigitSubstitution(const SCRIPT_DIGITSUBSTITUTE
* psds
,
146 SCRIPT_CONTROL
* psc
, SCRIPT_STATE
* pss
);
147 HRESULT WINAPI
ScriptItemize(const WCHAR
*pwcInChars
, int cInChars
, int cMaxItems
,
148 const SCRIPT_CONTROL
*psControl
, const SCRIPT_STATE
*psState
,
149 SCRIPT_ITEM
*pItems
, int *pcItems
);
150 HRESULT WINAPI
ScriptGetFontProperties(HDC hdc
, SCRIPT_CACHE
*psc
, SCRIPT_FONTPROPERTIES
*sfp
);
151 HRESULT WINAPI
ScriptStringAnalyse(HDC hdc
,
158 SCRIPT_CONTROL
*psControl
,
159 SCRIPT_STATE
*psState
,
161 SCRIPT_TABDEF
*pTabdef
,
162 const BYTE
*pbInClass
,
163 SCRIPT_STRING_ANALYSIS
*pssa
);
164 HRESULT WINAPI
ScriptStringFree(SCRIPT_STRING_ANALYSIS
*pssa
);
165 HRESULT WINAPI
ScriptIsComplex(const WCHAR
* pwcInChars
, int cInChars
, DWORD dwFlags
);
171 #endif /* __USP10_H */