wineoss: Use mmdevapi's AudioClient3.
[wine.git] / include / usp10.h
blob00f2fc2f2d40903cc8c6cd45be6a7f4a2018c657
1 /*
2 * Copyright (C) 2005 Steven Edwards
3 * Copyright (C) 2005 Vijay Kiran Kamuju
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 #ifndef __USP10_H
21 #define __USP10_H
23 #include <windows.h>
24 /* FIXME: #include <specstrings.h> */
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
30 /** ScriptStringAnalyse */
31 #define SSA_PASSWORD 0x00000001
32 #define SSA_TAB 0x00000002
33 #define SSA_CLIP 0x00000004
34 #define SSA_FIT 0x00000008
35 #define SSA_DZWG 0x00000010
36 #define SSA_FALLBACK 0x00000020
37 #define SSA_BREAK 0x00000040
38 #define SSA_GLYPHS 0x00000080
39 #define SSA_RTL 0x00000100
40 #define SSA_GCP 0x00000200
41 #define SSA_HOTKEY 0x00000400
42 #define SSA_METAFILE 0x00000800
43 #define SSA_LINK 0x00001000
44 #define SSA_HIDEHOTKEY 0x00002000
45 #define SSA_HOTKEYONLY 0x00002400
46 #define SSA_FULLMEASURE 0x04000000
47 #define SSA_LPKANSIFALLBACK 0x08000000
48 #define SSA_PIDX 0x10000000
49 #define SSA_LAYOUTRTL 0x20000000
50 #define SSA_DONTGLYPH 0x40000000
51 #define SSA_NOKASHIDA 0x80000000
53 /** StringIsComplex */
54 #define SIC_COMPLEX 1
55 #define SIC_ASCIIDIGIT 2
56 #define SIC_NEUTRAL 4
58 /** ScriptGetCMap */
59 #define SGCM_RTL 0x00000001
61 /** ScriptApplyDigitSubstitution */
62 #define SCRIPT_DIGITSUBSTITUTE_CONTEXT 0
63 #define SCRIPT_DIGITSUBSTITUTE_NONE 1
64 #define SCRIPT_DIGITSUBSTITUTE_NATIONAL 2
65 #define SCRIPT_DIGITSUBSTITUTE_TRADITIONAL 3
67 #define SCRIPT_UNDEFINED 0
69 #define USP_E_SCRIPT_NOT_IN_FONT MAKE_HRESULT(SEVERITY_ERROR,FACILITY_ITF,0x200)
71 typedef enum tag_SCRIPT_JUSTIFY {
72 SCRIPT_JUSTIFY_NONE = 0,
73 SCRIPT_JUSTIFY_ARABIC_BLANK = 1,
74 SCRIPT_JUSTIFY_CHARACTER = 2,
75 SCRIPT_JUSTIFY_RESERVED1 = 3,
76 SCRIPT_JUSTIFY_BLANK = 4,
77 SCRIPT_JUSTIFY_RESERVED2 = 5,
78 SCRIPT_JUSTIFY_RESERVED3 = 6,
79 SCRIPT_JUSTIFY_ARABIC_NORMAL = 7,
80 SCRIPT_JUSTIFY_ARABIC_KASHIDA = 8,
81 SCRIPT_JUSTIFY_ARABIC_ALEF = 9,
82 SCRIPT_JUSTIFY_ARABIC_HA = 10,
83 SCRIPT_JUSTIFY_ARABIC_RA = 11,
84 SCRIPT_JUSTIFY_ARABIC_BA = 12,
85 SCRIPT_JUSTIFY_ARABIC_BARA = 13,
86 SCRIPT_JUSTIFY_ARABIC_SEEN = 14,
87 SCRIPT_JUSTIFY_ARABIC_SEEN_M = 15,
88 } SCRIPT_JUSTIFY;
90 typedef struct tag_SCRIPT_CONTROL {
91 DWORD uDefaultLanguage :16;
92 DWORD fContextDigits :1;
93 DWORD fInvertPreBoundDir :1;
94 DWORD fInvertPostBoundDir :1;
95 DWORD fLinkStringBefore :1;
96 DWORD fLinkStringAfter :1;
97 DWORD fNeutralOverride :1;
98 DWORD fNumericOverride :1;
99 DWORD fLegacyBidiClass :1;
100 DWORD fMergeNeutralItems :1;
101 DWORD fUseStandardBidi :1;
102 DWORD fReserved :6;
103 } SCRIPT_CONTROL;
105 typedef struct {
106 DWORD langid :16;
107 DWORD fNumeric :1;
108 DWORD fComplex :1;
109 DWORD fNeedsWordBreaking :1;
110 DWORD fNeedsCaretInfo :1;
111 DWORD bCharSet :8;
112 DWORD fControl :1;
113 DWORD fPrivateUseArea :1;
114 DWORD fNeedsCharacterJustify :1;
115 DWORD fInvalidGlyph :1;
116 DWORD fInvalidLogAttr :1;
117 DWORD fCDM :1;
118 DWORD fAmbiguousCharSet :1;
119 DWORD fClusterSizeVaries :1;
120 DWORD fRejectInvalid :1;
121 } SCRIPT_PROPERTIES;
123 typedef struct tag_SCRIPT_STATE {
124 WORD uBidiLevel :5;
125 WORD fOverrideDirection :1;
126 WORD fInhibitSymSwap :1;
127 WORD fCharShape :1;
128 WORD fDigitSubstitute :1;
129 WORD fInhibitLigate :1;
130 WORD fDisplayZWG :1;
131 WORD fArabicNumContext :1;
132 WORD fGcpClusters :1;
133 WORD fReserved :1;
134 WORD fEngineReserved :2;
135 } SCRIPT_STATE;
137 typedef struct tag_SCRIPT_ANALYSIS {
138 WORD eScript :10;
139 WORD fRTL :1;
140 WORD fLayoutRTL :1;
141 WORD fLinkBefore :1;
142 WORD fLinkAfter :1;
143 WORD fLogicalOrder :1;
144 WORD fNoGlyphIndex :1;
145 SCRIPT_STATE s;
146 } SCRIPT_ANALYSIS;
148 typedef struct tag_SCRIPT_ITEM {
149 int iCharPos;
150 SCRIPT_ANALYSIS a;
151 } SCRIPT_ITEM;
153 typedef struct tag_SCRIPT_DIGITSUBSTITUTE {
154 DWORD NationalDigitLanguage :16;
155 DWORD TraditionalDigitLanguage :16;
156 DWORD DigitSubstitute :8;
157 DWORD dwReserved;
158 } SCRIPT_DIGITSUBSTITUTE;
160 typedef struct tag_SCRIPT_FONTPROPERTIES {
161 int cBytes;
162 WORD wgBlank;
163 WORD wgDefault;
164 WORD wgInvalid;
165 WORD wgKashida;
166 int iKashidaWidth;
167 } SCRIPT_FONTPROPERTIES;
169 typedef struct tag_SCRIPT_TABDEF {
170 int cTabStops;
171 int iScale;
172 int *pTabStops;
173 int iTabOrigin;
174 } SCRIPT_TABDEF;
176 typedef struct tag_SCRIPT_VISATTR {
177 WORD uJustification :4;
178 WORD fClusterStart :1;
179 WORD fDiacritic :1;
180 WORD fZeroWidth :1;
181 WORD fReserved :1;
182 WORD fShapeReserved :8;
183 } SCRIPT_VISATTR;
185 typedef struct tag_SCRIPT_LOGATTR {
186 BYTE fSoftBreak :1;
187 BYTE fWhiteSpace :1;
188 BYTE fCharStop :1;
189 BYTE fWordStop :1;
190 BYTE fInvalid :1;
191 BYTE fReserved :3;
192 } SCRIPT_LOGATTR;
194 typedef void *SCRIPT_CACHE;
195 typedef void *SCRIPT_STRING_ANALYSIS;
197 #ifndef LSDEFS_DEFINED
198 typedef struct tagGOFFSET {
199 LONG du;
200 LONG dv;
201 } GOFFSET;
202 #endif
204 typedef ULONG OPENTYPE_TAG;
206 typedef struct tagOPENTYPE_FEATURE_RECORD
208 OPENTYPE_TAG tagFeature;
209 LONG lParameter;
210 } OPENTYPE_FEATURE_RECORD;
212 typedef struct tagSCRIPT_GLYPHPROP
214 SCRIPT_VISATTR sva;
215 WORD reserved;
216 } SCRIPT_GLYPHPROP;
218 typedef struct tagSCRIPT_CHARPROP
220 WORD fCanGlyphAlone :1;
221 WORD reserved :15;
222 } SCRIPT_CHARPROP;
224 typedef struct tagTEXTRANGE_PROPERTIES
226 OPENTYPE_FEATURE_RECORD *potfRecords;
227 INT cotfRecords;
228 } TEXTRANGE_PROPERTIES;
230 /* Function Declarations */
232 HRESULT WINAPI ScriptApplyDigitSubstitution(const SCRIPT_DIGITSUBSTITUTE* psds,
233 SCRIPT_CONTROL* psc, SCRIPT_STATE* pss);
234 HRESULT WINAPI ScriptApplyLogicalWidth(const int *piDx, int cChars, int cGlyphs, const WORD *pwLogClust,
235 const SCRIPT_VISATTR *psva, const int *piAdvance,
236 const SCRIPT_ANALYSIS *psa, ABC *pABC, int *piJustify);
237 HRESULT WINAPI ScriptRecordDigitSubstitution(LCID Locale, SCRIPT_DIGITSUBSTITUTE *psds);
238 HRESULT WINAPI ScriptItemize(const WCHAR *pwcInChars, int cInChars, int cMaxItems,
239 const SCRIPT_CONTROL *psControl, const SCRIPT_STATE *psState,
240 SCRIPT_ITEM *pItems, int *pcItems);
241 HRESULT WINAPI ScriptItemizeOpenType(const WCHAR *pwcInChars, int cInChars, int cMaxItems,
242 const SCRIPT_CONTROL *psControl, const SCRIPT_STATE *psState, SCRIPT_ITEM *pItems,
243 OPENTYPE_TAG *pScriptTags, int *pcItems);
244 HRESULT WINAPI ScriptGetCMap(HDC hdc, SCRIPT_CACHE *psc, const WCHAR *pwcInChars, int cChars,
245 DWORD dwFlags, WORD *pwOutGlyphs);
246 HRESULT WINAPI ScriptGetFontFeatureTags(HDC hdc, SCRIPT_CACHE *psc, SCRIPT_ANALYSIS *psa,
247 OPENTYPE_TAG tagScript, OPENTYPE_TAG tagLangSys, int cMaxTags, OPENTYPE_TAG *pFeatureTags,
248 int *pcTags);
249 HRESULT WINAPI ScriptGetFontLanguageTags(HDC hdc, SCRIPT_CACHE *psc, SCRIPT_ANALYSIS *psa,
250 OPENTYPE_TAG tagScript, int cMaxTags, OPENTYPE_TAG *pLangsysTags, int *pcTags);
251 HRESULT WINAPI ScriptGetFontProperties(HDC hdc, SCRIPT_CACHE *psc, SCRIPT_FONTPROPERTIES *sfp);
252 HRESULT WINAPI ScriptGetFontScriptTags(HDC hdc, SCRIPT_CACHE *psc, SCRIPT_ANALYSIS *psa,
253 int cMaxTags, OPENTYPE_TAG *pScriptTags, int *pcTags);
254 HRESULT WINAPI ScriptGetGlyphABCWidth(HDC hdc, SCRIPT_CACHE *psc, WORD wGlyph, ABC *pABC);
255 HRESULT WINAPI ScriptGetLogicalWidths(const SCRIPT_ANALYSIS *psa, int cChars, int cGlyphs,
256 const int *piGlyphWidth, const WORD *pwLogClust,
257 const SCRIPT_VISATTR *psva, int *piDx);
258 HRESULT WINAPI ScriptGetProperties(const SCRIPT_PROPERTIES ***ppSp, int *piNumScripts);
259 HRESULT WINAPI ScriptStringAnalyse(HDC hdc,
260 const void *pString,
261 int cString,
262 int cGlyphs,
263 int iCharset,
264 DWORD dwFlags,
265 int iReqWidth,
266 SCRIPT_CONTROL *psControl,
267 SCRIPT_STATE *psState,
268 const int *piDx,
269 SCRIPT_TABDEF *pTabdef,
270 const BYTE *pbInClass,
271 SCRIPT_STRING_ANALYSIS *pssa);
272 HRESULT WINAPI ScriptStringValidate(SCRIPT_STRING_ANALYSIS ssa);
273 HRESULT WINAPI ScriptStringFree(SCRIPT_STRING_ANALYSIS *pssa);
274 HRESULT WINAPI ScriptFreeCache(SCRIPT_CACHE *psc);
275 HRESULT WINAPI ScriptIsComplex(const WCHAR* pwcInChars, int cInChars, DWORD dwFlags);
276 HRESULT WINAPI ScriptJustify(const SCRIPT_VISATTR *psva, const int *piAdvance, int cGlyphs,
277 int iDx, int iMinKashida, int *piJustify);
278 HRESULT WINAPI ScriptLayout(int cRuns, const BYTE *pbLevel, int *piVisualToLogical, int *piLogicalToVisual);
279 HRESULT WINAPI ScriptShape(HDC hdc, SCRIPT_CACHE *psc, const WCHAR *pwcChars, int cChars, int cMaxGlyphs,
280 SCRIPT_ANALYSIS *psa, WORD *pwOutGlyphs, WORD *pwLogClust, SCRIPT_VISATTR *psva, int *pcGlyphs);
281 HRESULT WINAPI ScriptShapeOpenType(HDC hdc, SCRIPT_CACHE *psc, SCRIPT_ANALYSIS *psa, OPENTYPE_TAG tagScript,
282 OPENTYPE_TAG tagLangSys, int *rcRangeChars, TEXTRANGE_PROPERTIES **rpRangeProperties,
283 int cRanges, const WCHAR *pwcChars, int cChars, int cMaxGlyphs, WORD *pwLogClust,
284 SCRIPT_CHARPROP *pCharProps, WORD *pwOutGlyphs, SCRIPT_GLYPHPROP *pOutGlyphProps,
285 int *pcGlyphs);
286 HRESULT WINAPI ScriptPlace(HDC hdc, SCRIPT_CACHE *psc, const WORD *pwGlyphs, int cGlyphs, const SCRIPT_VISATTR *psva,
287 SCRIPT_ANALYSIS *psa, int *piAdvance, GOFFSET *pGoffset, ABC *pABC );
288 HRESULT WINAPI ScriptPlaceOpenType(HDC hdc, SCRIPT_CACHE *psc, SCRIPT_ANALYSIS *psa, OPENTYPE_TAG tagScript,
289 OPENTYPE_TAG tagLangSys, int *rcRangeChars, TEXTRANGE_PROPERTIES **rpRangeProperties,
290 int cRanges, const WCHAR *pwcChars, WORD *pwLogClust, SCRIPT_CHARPROP *pCharProps,
291 int cChars, const WORD *pwGlyphs, const SCRIPT_GLYPHPROP *pGlyphProps, int cGlyphs,
292 int *piAdvance, GOFFSET *pGoffset, ABC *pABC);
293 HRESULT WINAPI ScriptBreak(const WCHAR *pwcChars, int cChars, const SCRIPT_ANALYSIS *psa, SCRIPT_LOGATTR *psla);
294 HRESULT WINAPI ScriptCacheGetHeight(HDC hdc, SCRIPT_CACHE *psc, LONG *tmHeight);
295 HRESULT WINAPI ScriptCPtoX(int iCP, BOOL fTrailing, int cChars, int cGlyphs, const WORD *pwLogClust, const SCRIPT_VISATTR *psva,
296 const int *piAdvance, const SCRIPT_ANALYSIS *psa, int *piX);
297 HRESULT WINAPI ScriptXtoCP(int iX, int cChars, int cGlyphs, const WORD *pwLogClust, const SCRIPT_VISATTR *psva,
298 const int *piAdvance, const SCRIPT_ANALYSIS *psa, int *piCP, int *piTrailing);
299 HRESULT WINAPI ScriptStringCPtoX(SCRIPT_STRING_ANALYSIS ssa, int icp, BOOL fTrailing, int *pX);
300 HRESULT WINAPI ScriptStringXtoCP(SCRIPT_STRING_ANALYSIS ssa, int iX, int *piCh , int *piTrailing);
301 HRESULT WINAPI ScriptStringGetLogicalWidths(SCRIPT_STRING_ANALYSIS ssa, int *piDx);
302 HRESULT WINAPI ScriptStringGetOrder(SCRIPT_STRING_ANALYSIS ssa, UINT *puOrder);
303 HRESULT WINAPI ScriptStringOut(SCRIPT_STRING_ANALYSIS ssa, int iX, int iY, UINT uOptions, const RECT *prc,
304 int iMinSel, int iMaxSel, BOOL fDisabled);
305 HRESULT WINAPI ScriptTextOut(const HDC hdc, SCRIPT_CACHE *psc, int x, int y, UINT fuOptions, const RECT *lprc,
306 const SCRIPT_ANALYSIS *psa, const WCHAR *pwcReserved, int iReserved, const WORD *pwGlyphs,
307 int cGlyphs, const int *piAdvance, const int *piJustify, const GOFFSET *pGoffset);
308 const int* WINAPI ScriptString_pcOutChars(SCRIPT_STRING_ANALYSIS ssa);
309 const SCRIPT_LOGATTR* WINAPI ScriptString_pLogAttr(SCRIPT_STRING_ANALYSIS ssa);
310 const SIZE* WINAPI ScriptString_pSize(SCRIPT_STRING_ANALYSIS ssa);
312 #ifdef __cplusplus
313 } /* extern "C" */
314 #endif
316 #endif /* __USP10_H */