Also scan HKEY_CURRENT_USER for shell namespace extensions in
[wine/multimedia.git] / include / usp10.h
blob886a7c1aef62a846e54b17f9a04de8213c4dcaf7
1 /*
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
19 #ifndef __USP10_H
20 #define __USP10_H
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 */
46 #define SIC_COMPLEX 1
47 #define SIC_ASCIIDIGIT 2
48 #define SIC_NEUTRAL 4
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;
60 DWORD fReserved :8;
61 } SCRIPT_CONTROL;
63 typedef struct {
64 DWORD langid :16;
65 DWORD fNumeric :1;
66 DWORD fComplex :1;
67 DWORD fNeedsWordBreaking :1;
68 DWORD fNeedsCaretInfo :1;
69 DWORD bCharSet :8;
70 DWORD fControl :1;
71 DWORD fPrivateUseArea :1;
72 DWORD fNeedsCharacterJustify :1;
73 DWORD fInvalidGlyph :1;
74 DWORD fInvalidLogAttr :1;
75 DWORD fCDM :1;
76 DWORD fAmbiguousCharSet :1;
77 DWORD fClusterSizeVaries :1;
78 DWORD fRejectInvalid :1;
79 } SCRIPT_PROPERTIES;
81 typedef struct tag_SCRIPT_STATE {
82 WORD uBidiLevel :5;
83 WORD fOverrideDirection :1;
84 WORD fInhibitSymSwap :1;
85 WORD fCharShape :1;
86 WORD fDigitSubstitute :1;
87 WORD fInhibitLigate :1;
88 WORD fDisplayZWG :1;
89 WORD fArabicNumContext :1;
90 WORD fGcpClusters :1;
91 WORD fReserved :1;
92 WORD fEngineReserved :2;
93 } SCRIPT_STATE;
95 typedef struct tag_SCRIPT_ANALYSIS {
96 WORD eScript :10;
97 WORD fRTL :1;
98 WORD fLayoutRTL :1;
99 WORD fLinkBefore :1;
100 WORD fLinkAfter :1;
101 WORD fLogicalOrder :1;
102 WORD fNoGlyphIndex :1;
103 SCRIPT_STATE s;
104 } SCRIPT_ANALYSIS;
106 typedef struct tag_SCRIPT_ITEM {
107 int iCharPos;
108 SCRIPT_ANALYSIS a;
109 } SCRIPT_ITEM;
111 typedef struct tag_SCRIPT_DIGITSUBSTITUTE {
112 DWORD NationalDigitLanguage :16;
113 DWORD TraditionalDigitLanguage :16;
114 DWORD DigitSubstitute :8;
115 DWORD dwReserved;
116 } SCRIPT_DIGITSUBSTITUTE;
118 typedef struct tag_SCRIPT_FONTPROPERTIES {
119 int cBytes;
120 WORD wgBlank;
121 WORD wgDefault;
122 WORD wgInvalid;
123 WORD wgKashida;
124 int iKashidaWidth;
125 } SCRIPT_FONTPROPERTIES;
127 typedef struct tag_SCRIPT_TABDEF {
128 int cTabStops;
129 int iScale;
130 int *pTabStops;
131 int iTabOrigin;
132 } 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,
148 const void *pString,
149 int cString,
150 int cGlyphs,
151 int iCharset,
152 DWORD dwFlags,
153 int iReqWidth,
154 SCRIPT_CONTROL *psControl,
155 SCRIPT_STATE *psState,
156 const int *piDx,
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 */