VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/usp10.h@ 28475

Last change on this file since 28475 was 28475, checked in by vboxsync, 15 years ago

crOpenGL: update to wine 1.1.43

  • Property svn:eol-style set to native
File size: 10.5 KB
Line 
1/*
2 * Copyright (C) 2005 Steven Edwards
3 * Copyright (C) 2005 Vijay Kiran Kamuju
4 *
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.
9 *
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.
14 *
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
18 */
19
20/*
21 * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
22 * other than GPL or LGPL is available it will apply instead, Sun elects to use only
23 * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
24 * a choice of LGPL license versions is made available with the language indicating
25 * that LGPLv2 or any later version may be used, or where a choice of which version
26 * of the LGPL is applied is otherwise unspecified.
27 */
28
29#ifndef __USP10_H
30#define __USP10_H
31
32#ifndef __WINESRC__
33# include <windows.h>
34#endif
35/* FIXME: #include <specstrings.h> */
36
37#ifdef __cplusplus
38extern "C" {
39#endif
40
41/** ScriptStringAnalyse */
42#define SSA_PASSWORD 0x00000001
43#define SSA_TAB 0x00000002
44#define SSA_CLIP 0x00000004
45#define SSA_FIT 0x00000008
46#define SSA_DZWG 0x00000010
47#define SSA_FALLBACK 0x00000020
48#define SSA_BREAK 0x00000040
49#define SSA_GLYPHS 0x00000080
50#define SSA_RTL 0x00000100
51#define SSA_GCP 0x00000200
52#define SSA_HOTKEY 0x00000400
53#define SSA_METAFILE 0x00000800
54#define SSA_LINK 0x00001000
55#define SSA_HIDEHOTKEY 0x00002000
56#define SSA_HOTKEYONLY 0x00002400
57#define SSA_FULLMEASURE 0x04000000
58#define SSA_LPKANSIFALLBACK 0x08000000
59#define SSA_PIDX 0x10000000
60#define SSA_LAYOUTRTL 0x20000000
61#define SSA_DONTGLYPH 0x40000000
62#define SSA_NOKASHIDA 0x80000000
63
64/** StringIsComplex */
65#define SIC_COMPLEX 1
66#define SIC_ASCIIDIGIT 2
67#define SIC_NEUTRAL 4
68
69/** ScriptGetCMap */
70#define SGCM_RTL 0x00000001
71
72/** ScriptApplyDigitSubstitution */
73#define SCRIPT_DIGITSUBSTITUTE_CONTEXT 0
74#define SCRIPT_DIGITSUBSTITUTE_NONE 1
75#define SCRIPT_DIGITSUBSTITUTE_NATIONAL 2
76#define SCRIPT_DIGITSUBSTITUTE_TRADITIONAL 3
77
78#define SCRIPT_UNDEFINED 0
79
80#define USP_E_SCRIPT_NOT_IN_FONT MAKE_HRESULT(SEVERITY_ERROR,FACILITY_ITF,0x200)
81
82typedef enum tag_SCRIPT_JUSTIFY {
83 SCRIPT_JUSTIFY_NONE = 0,
84 SCRIPT_JUSTIFY_ARABIC_BLANK = 1,
85 SCRIPT_JUSTIFY_CHARACTER = 2,
86 SCRIPT_JUSTIFY_RESERVED1 = 3,
87 SCRIPT_JUSTIFY_BLANK = 4,
88 SCRIPT_JUSTIFY_RESERVED2 = 5,
89 SCRIPT_JUSTIFY_RESERVED3 = 6,
90 SCRIPT_JUSTIFY_ARABIC_NORMAL = 7,
91 SCRIPT_JUSTIFY_ARABIC_KASHIDA = 8,
92 SCRIPT_JUSTIFY_ARABIC_ALEF = 9,
93 SCRIPT_JUSTIFY_ARABIC_HA = 10,
94 SCRIPT_JUSTIFY_ARABIC_RA = 11,
95 SCRIPT_JUSTIFY_ARABIC_BA = 12,
96 SCRIPT_JUSTIFY_ARABIC_BARA = 13,
97 SCRIPT_JUSTIFY_ARABIC_SEEN = 14,
98 SCRIPT_JUSTIFY_RESERVED4 = 15,
99} SCRIPT_JUSTIFY;
100
101typedef struct tag_SCRIPT_CONTROL {
102 DWORD uDefaultLanguage :16;
103 DWORD fContextDigits :1;
104 DWORD fInvertPreBoundDir :1;
105 DWORD fInvertPostBoundDir :1;
106 DWORD fLinkStringBefore :1;
107 DWORD fLinkStringAfter :1;
108 DWORD fNeutralOverride :1;
109 DWORD fNumericOverride :1;
110 DWORD fLegacyBidiClass :1;
111 DWORD fMergeNeutralItems :1;
112 DWORD fReserved :7;
113} SCRIPT_CONTROL;
114
115typedef struct {
116 DWORD langid :16;
117 DWORD fNumeric :1;
118 DWORD fComplex :1;
119 DWORD fNeedsWordBreaking :1;
120 DWORD fNeedsCaretInfo :1;
121 DWORD bCharSet :8;
122 DWORD fControl :1;
123 DWORD fPrivateUseArea :1;
124 DWORD fNeedsCharacterJustify :1;
125 DWORD fInvalidGlyph :1;
126 DWORD fInvalidLogAttr :1;
127 DWORD fCDM :1;
128 DWORD fAmbiguousCharSet :1;
129 DWORD fClusterSizeVaries :1;
130 DWORD fRejectInvalid :1;
131} SCRIPT_PROPERTIES;
132
133typedef struct tag_SCRIPT_STATE {
134 WORD uBidiLevel :5;
135 WORD fOverrideDirection :1;
136 WORD fInhibitSymSwap :1;
137 WORD fCharShape :1;
138 WORD fDigitSubstitute :1;
139 WORD fInhibitLigate :1;
140 WORD fDisplayZWG :1;
141 WORD fArabicNumContext :1;
142 WORD fGcpClusters :1;
143 WORD fReserved :1;
144 WORD fEngineReserved :2;
145} SCRIPT_STATE;
146
147typedef struct tag_SCRIPT_ANALYSIS {
148 WORD eScript :10;
149 WORD fRTL :1;
150 WORD fLayoutRTL :1;
151 WORD fLinkBefore :1;
152 WORD fLinkAfter :1;
153 WORD fLogicalOrder :1;
154 WORD fNoGlyphIndex :1;
155 SCRIPT_STATE s;
156} SCRIPT_ANALYSIS;
157
158typedef struct tag_SCRIPT_ITEM {
159 int iCharPos;
160 SCRIPT_ANALYSIS a;
161} SCRIPT_ITEM;
162
163typedef struct tag_SCRIPT_DIGITSUBSTITUTE {
164 DWORD NationalDigitLanguage :16;
165 DWORD TraditionalDigitLanguage :16;
166 DWORD DigitSubstitute :8;
167 DWORD dwReserved;
168} SCRIPT_DIGITSUBSTITUTE;
169
170typedef struct tag_SCRIPT_FONTPROPERTIES {
171 int cBytes;
172 WORD wgBlank;
173 WORD wgDefault;
174 WORD wgInvalid;
175 WORD wgKashida;
176 int iKashidaWidth;
177} SCRIPT_FONTPROPERTIES;
178
179typedef struct tag_SCRIPT_TABDEF {
180 int cTabStops;
181 int iScale;
182 int *pTabStops;
183 int iTabOrigin;
184} SCRIPT_TABDEF;
185
186typedef struct tag_SCRIPT_VISATTR {
187 WORD uJustification :4;
188 WORD fClusterStart :1;
189 WORD fDiacritic :1;
190 WORD fZeroWidth :1;
191 WORD fReserved :1;
192 WORD fShapeReserved :8;
193} SCRIPT_VISATTR;
194
195typedef struct tag_SCRIPT_LOGATTR {
196 BYTE fSoftBreak :1;
197 BYTE fWhiteSpace :1;
198 BYTE fCharStop :1;
199 BYTE fWordStop :1;
200 BYTE fInvalid :1;
201 BYTE fReserved :3;
202} SCRIPT_LOGATTR;
203
204typedef void *SCRIPT_CACHE;
205typedef void *SCRIPT_STRING_ANALYSIS;
206
207#ifndef LSDEFS_DEFINED
208typedef struct tagGOFFSET {
209 LONG du;
210 LONG dv;
211} GOFFSET;
212#endif
213
214/* Function Declarations */
215
216HRESULT WINAPI ScriptApplyDigitSubstitution(const SCRIPT_DIGITSUBSTITUTE* psds,
217 SCRIPT_CONTROL* psc, SCRIPT_STATE* pss);
218HRESULT WINAPI ScriptApplyLogicalWidth(const int *piDx, int cChars, int cGlyphs, const WORD *pwLogClust,
219 const SCRIPT_VISATTR *psva, const int *piAdvance,
220 const SCRIPT_ANALYSIS *psa, ABC *pABC, int *piJustify);
221HRESULT WINAPI ScriptRecordDigitSubstitution(LCID Locale, SCRIPT_DIGITSUBSTITUTE *psds);
222HRESULT WINAPI ScriptItemize(const WCHAR *pwcInChars, int cInChars, int cMaxItems,
223 const SCRIPT_CONTROL *psControl, const SCRIPT_STATE *psState,
224 SCRIPT_ITEM *pItems, int *pcItems);
225HRESULT WINAPI ScriptGetCMap(HDC hdc, SCRIPT_CACHE *psc, const WCHAR *pwcInChars, int cChars,
226 DWORD dwFlags, WORD *pwOutGlyphs);
227HRESULT WINAPI ScriptGetFontProperties(HDC hdc, SCRIPT_CACHE *psc, SCRIPT_FONTPROPERTIES *sfp);
228HRESULT WINAPI ScriptGetGlyphABCWidth(HDC hdc, SCRIPT_CACHE *psc, WORD wGlyph, ABC *pABC);
229HRESULT WINAPI ScriptGetLogicalWidths(const SCRIPT_ANALYSIS *psa, int cChars, int cGlyphs,
230 const int *piGlyphWidth, const WORD *pwLogClust,
231 const SCRIPT_VISATTR *psva, int *piDx);
232HRESULT WINAPI ScriptGetProperties(const SCRIPT_PROPERTIES ***ppSp, int *piNumScripts);
233HRESULT WINAPI ScriptStringAnalyse(HDC hdc,
234 const void *pString,
235 int cString,
236 int cGlyphs,
237 int iCharset,
238 DWORD dwFlags,
239 int iReqWidth,
240 SCRIPT_CONTROL *psControl,
241 SCRIPT_STATE *psState,
242 const int *piDx,
243 SCRIPT_TABDEF *pTabdef,
244 const BYTE *pbInClass,
245 SCRIPT_STRING_ANALYSIS *pssa);
246HRESULT WINAPI ScriptStringValidate(SCRIPT_STRING_ANALYSIS ssa);
247HRESULT WINAPI ScriptStringFree(SCRIPT_STRING_ANALYSIS *pssa);
248HRESULT WINAPI ScriptFreeCache(SCRIPT_CACHE *psc);
249HRESULT WINAPI ScriptIsComplex(const WCHAR* pwcInChars, int cInChars, DWORD dwFlags);
250HRESULT WINAPI ScriptJustify(const SCRIPT_VISATTR *psva, const int *piAdvance, int cGlyphs,
251 int iDx, int iMinKashida, int *piJustify);
252HRESULT WINAPI ScriptLayout(int cRuns, const BYTE *pbLevel, int *piVisualToLogical, int *piLogicalToVisual);
253HRESULT WINAPI ScriptShape(HDC hdc, SCRIPT_CACHE *psc, const WCHAR *pwcChars, int cChars, int cMaxGlyphs,
254 SCRIPT_ANALYSIS *psa, WORD *pwOutGlyphs, WORD *pwLogClust, SCRIPT_VISATTR *psva, int *pcGlyphs);
255HRESULT WINAPI ScriptPlace(HDC hdc, SCRIPT_CACHE *psc, const WORD *pwGlyphs, int cGlyphs, const SCRIPT_VISATTR *psva,
256 SCRIPT_ANALYSIS *psa, int *piAdvance, GOFFSET *pGoffset, ABC *pABC );
257HRESULT WINAPI ScriptBreak(const WCHAR *pwcChars, int cChars, const SCRIPT_ANALYSIS *psa, SCRIPT_LOGATTR *psla);
258HRESULT WINAPI ScriptCacheGetHeight(HDC hdc, SCRIPT_CACHE *psc, LONG *tmHeight);
259HRESULT WINAPI ScriptCPtoX(int iCP, BOOL fTrailing, int cChars, int cGlyphs, const WORD *pwLogClust, const SCRIPT_VISATTR *psva,
260 const int *piAdvance, const SCRIPT_ANALYSIS *psa, int *piX);
261HRESULT WINAPI ScriptXtoCP(int iX, int cChars, int cGlyphs, const WORD *pwLogClust, const SCRIPT_VISATTR *psva,
262 const int *piAdvance, const SCRIPT_ANALYSIS *psa, int *piCP, int *piTrailing);
263HRESULT WINAPI ScriptStringCPtoX(SCRIPT_STRING_ANALYSIS ssa, int icp, BOOL fTrailing, int *pX);
264HRESULT WINAPI ScriptStringXtoCP(SCRIPT_STRING_ANALYSIS ssa, int iX, int *piCh , int *piTrailing);
265HRESULT WINAPI ScriptStringGetLogicalWidths(SCRIPT_STRING_ANALYSIS ssa, int *piDx);
266HRESULT WINAPI ScriptStringGetOrder(SCRIPT_STRING_ANALYSIS ssa, UINT *puOrder);
267HRESULT WINAPI ScriptStringOut(SCRIPT_STRING_ANALYSIS ssa, int iX, int iY, UINT uOptions, const RECT *prc,
268 int iMinSel, int iMaxSel, BOOL fDisabled);
269HRESULT WINAPI ScriptTextOut(const HDC hdc, SCRIPT_CACHE *psc, int x, int y, UINT fuOptions, const RECT *lprc,
270 const SCRIPT_ANALYSIS *psa, const WCHAR *pwcReserved, int iReserved, const WORD *pwGlyphs,
271 int cGlyphs, const int *piAdvance, const int *piJustify, const GOFFSET *pGoffset);
272const int* WINAPI ScriptString_pcOutChars(SCRIPT_STRING_ANALYSIS ssa);
273const SCRIPT_LOGATTR* WINAPI ScriptString_pLogAttr(SCRIPT_STRING_ANALYSIS ssa);
274const SIZE* WINAPI ScriptString_pSize(SCRIPT_STRING_ANALYSIS ssa);
275
276#ifdef __cplusplus
277} /* extern "C" */
278#endif
279
280#endif /* __USP10_H */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette