VirtualBox

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

Last change on this file since 27512 was 16477, checked in by vboxsync, 16 years ago

LGPL disclaimer by filemuncher

  • 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 fReserved :8;
112} SCRIPT_CONTROL;
113
114typedef struct {
115 DWORD langid :16;
116 DWORD fNumeric :1;
117 DWORD fComplex :1;
118 DWORD fNeedsWordBreaking :1;
119 DWORD fNeedsCaretInfo :1;
120 DWORD bCharSet :8;
121 DWORD fControl :1;
122 DWORD fPrivateUseArea :1;
123 DWORD fNeedsCharacterJustify :1;
124 DWORD fInvalidGlyph :1;
125 DWORD fInvalidLogAttr :1;
126 DWORD fCDM :1;
127 DWORD fAmbiguousCharSet :1;
128 DWORD fClusterSizeVaries :1;
129 DWORD fRejectInvalid :1;
130} SCRIPT_PROPERTIES;
131
132typedef struct tag_SCRIPT_STATE {
133 WORD uBidiLevel :5;
134 WORD fOverrideDirection :1;
135 WORD fInhibitSymSwap :1;
136 WORD fCharShape :1;
137 WORD fDigitSubstitute :1;
138 WORD fInhibitLigate :1;
139 WORD fDisplayZWG :1;
140 WORD fArabicNumContext :1;
141 WORD fGcpClusters :1;
142 WORD fReserved :1;
143 WORD fEngineReserved :2;
144} SCRIPT_STATE;
145
146typedef struct tag_SCRIPT_ANALYSIS {
147 WORD eScript :10;
148 WORD fRTL :1;
149 WORD fLayoutRTL :1;
150 WORD fLinkBefore :1;
151 WORD fLinkAfter :1;
152 WORD fLogicalOrder :1;
153 WORD fNoGlyphIndex :1;
154 SCRIPT_STATE s;
155} SCRIPT_ANALYSIS;
156
157typedef struct tag_SCRIPT_ITEM {
158 int iCharPos;
159 SCRIPT_ANALYSIS a;
160} SCRIPT_ITEM;
161
162typedef struct tag_SCRIPT_DIGITSUBSTITUTE {
163 DWORD NationalDigitLanguage :16;
164 DWORD TraditionalDigitLanguage :16;
165 DWORD DigitSubstitute :8;
166 DWORD dwReserved;
167} SCRIPT_DIGITSUBSTITUTE;
168
169typedef struct tag_SCRIPT_FONTPROPERTIES {
170 int cBytes;
171 WORD wgBlank;
172 WORD wgDefault;
173 WORD wgInvalid;
174 WORD wgKashida;
175 int iKashidaWidth;
176} SCRIPT_FONTPROPERTIES;
177
178typedef struct tag_SCRIPT_TABDEF {
179 int cTabStops;
180 int iScale;
181 int *pTabStops;
182 int iTabOrigin;
183} SCRIPT_TABDEF;
184
185typedef struct tag_SCRIPT_VISATTR {
186 WORD uJustification :4;
187 WORD fClusterStart :1;
188 WORD fDiacritic :1;
189 WORD fZeroWidth :1;
190 WORD fReserved :1;
191 WORD fShapeReserved :8;
192} SCRIPT_VISATTR;
193
194typedef struct tag_SCRIPT_LOGATTR {
195 BYTE fSoftBreak :1;
196 BYTE fWhiteSpace :1;
197 BYTE fCharStop :1;
198 BYTE fWordStop :1;
199 BYTE fInvalid :1;
200 BYTE fReserved :3;
201} SCRIPT_LOGATTR;
202
203typedef void *SCRIPT_CACHE;
204typedef void *SCRIPT_STRING_ANALYSIS;
205
206#ifndef LSDEFS_DEFINED
207typedef struct tagGOFFSET {
208 LONG du;
209 LONG dv;
210} GOFFSET;
211#endif
212
213/* Function Declarations */
214
215HRESULT WINAPI ScriptApplyDigitSubstitution(const SCRIPT_DIGITSUBSTITUTE* psds,
216 SCRIPT_CONTROL* psc, SCRIPT_STATE* pss);
217HRESULT WINAPI ScriptApplyLogicalWidth(const int *piDx, int cChars, int cGlyphs, const WORD *pwLogClust,
218 const SCRIPT_VISATTR *psva, const int *piAdvance,
219 const SCRIPT_ANALYSIS *psa, ABC *pABC, int *piJustify);
220HRESULT WINAPI ScriptRecordDigitSubstitution(LCID Locale, SCRIPT_DIGITSUBSTITUTE *psds);
221HRESULT WINAPI ScriptItemize(const WCHAR *pwcInChars, int cInChars, int cMaxItems,
222 const SCRIPT_CONTROL *psControl, const SCRIPT_STATE *psState,
223 SCRIPT_ITEM *pItems, int *pcItems);
224HRESULT WINAPI ScriptGetCMap(HDC hdc, SCRIPT_CACHE *psc, const WCHAR *pwcInChars, int cChars,
225 DWORD dwFlags, WORD *pwOutGlyphs);
226HRESULT WINAPI ScriptGetFontProperties(HDC hdc, SCRIPT_CACHE *psc, SCRIPT_FONTPROPERTIES *sfp);
227HRESULT WINAPI ScriptGetGlyphABCWidth(HDC hdc, SCRIPT_CACHE *psc, WORD wGlyph, ABC *pABC);
228HRESULT WINAPI ScriptGetLogicalWidths(const SCRIPT_ANALYSIS *psa, int cChars, int cGlyphs,
229 const int *piGlyphWidth, const WORD *pwLogClust,
230 const SCRIPT_VISATTR *psva, int *piDx);
231HRESULT WINAPI ScriptGetProperties(const SCRIPT_PROPERTIES ***ppSp, int *piNumScripts);
232HRESULT WINAPI ScriptStringAnalyse(HDC hdc,
233 const void *pString,
234 int cString,
235 int cGlyphs,
236 int iCharset,
237 DWORD dwFlags,
238 int iReqWidth,
239 SCRIPT_CONTROL *psControl,
240 SCRIPT_STATE *psState,
241 const int *piDx,
242 SCRIPT_TABDEF *pTabdef,
243 const BYTE *pbInClass,
244 SCRIPT_STRING_ANALYSIS *pssa);
245HRESULT WINAPI ScriptStringValidate(SCRIPT_STRING_ANALYSIS ssa);
246HRESULT WINAPI ScriptStringFree(SCRIPT_STRING_ANALYSIS *pssa);
247HRESULT WINAPI ScriptFreeCache(SCRIPT_CACHE *psc);
248HRESULT WINAPI ScriptIsComplex(const WCHAR* pwcInChars, int cInChars, DWORD dwFlags);
249HRESULT WINAPI ScriptJustify(const SCRIPT_VISATTR *psva, const int *piAdvance, int cGlyphs,
250 int iDx, int iMinKashida, int *piJustify);
251HRESULT WINAPI ScriptLayout(int cRuns, const BYTE *pbLevel, int *piVisualToLogical, int *piLogicalToVisual);
252HRESULT WINAPI ScriptShape(HDC hdc, SCRIPT_CACHE *psc, const WCHAR *pwcChars, int cChars, int cMaxGlyphs,
253 SCRIPT_ANALYSIS *psa, WORD *pwOutGlyphs, WORD *pwLogClust, SCRIPT_VISATTR *psva, int *pcGlyphs);
254HRESULT WINAPI ScriptPlace(HDC hdc, SCRIPT_CACHE *psc, const WORD *pwGlyphs, int cGlyphs, const SCRIPT_VISATTR *psva,
255 SCRIPT_ANALYSIS *psa, int *piAdvance, GOFFSET *pGoffset, ABC *pABC );
256HRESULT WINAPI ScriptBreak(const WCHAR *pwcChars, int cChars, const SCRIPT_ANALYSIS *psa, SCRIPT_LOGATTR *psla);
257HRESULT WINAPI ScriptCacheGetHeight(HDC hdc, SCRIPT_CACHE *psc, LONG *tmHeight);
258HRESULT WINAPI ScriptCPtoX(int iCP, BOOL fTrailing, int cChars, int cGlyphs, const WORD *pwLogClust, const SCRIPT_VISATTR *psva,
259 const int *piAdvance, const SCRIPT_ANALYSIS *psa, int *piX);
260HRESULT WINAPI ScriptXtoCP(int iX, int cChars, int cGlyphs, const WORD *pwLogClust, const SCRIPT_VISATTR *psva,
261 const int *piAdvance, const SCRIPT_ANALYSIS *psa, int *piCP, int *piTrailing);
262HRESULT WINAPI ScriptStringCPtoX(SCRIPT_STRING_ANALYSIS ssa, int icp, BOOL fTrailing, int *pX);
263HRESULT WINAPI ScriptStringXtoCP(SCRIPT_STRING_ANALYSIS ssa, int iX, int *piCh , int *piTrailing);
264HRESULT WINAPI ScriptStringGetLogicalWidths(SCRIPT_STRING_ANALYSIS ssa, int *piDx);
265HRESULT WINAPI ScriptStringGetOrder(SCRIPT_STRING_ANALYSIS ssa, UINT *puOrder);
266HRESULT WINAPI ScriptStringOut(SCRIPT_STRING_ANALYSIS ssa, int iX, int iY, UINT uOptions, const RECT *prc,
267 int iMinSel, int iMaxSel, BOOL fDisabled);
268HRESULT WINAPI ScriptTextOut(const HDC hdc, SCRIPT_CACHE *psc, int x, int y, UINT fuOptions, const RECT *lprc,
269 const SCRIPT_ANALYSIS *psa, const WCHAR *pwcReserved, int iReserved, const WORD *pwGlyphs,
270 int cGlyphs, const int *piAdvance, const int *piJustify, const GOFFSET *pGoffset);
271const int* WINAPI ScriptString_pcOutChars(SCRIPT_STRING_ANALYSIS ssa);
272const SCRIPT_LOGATTR* WINAPI ScriptString_pLogAttr(SCRIPT_STRING_ANALYSIS ssa);
273const SIZE* WINAPI ScriptString_pSize(SCRIPT_STRING_ANALYSIS ssa);
274
275#ifdef __cplusplus
276} /* extern "C" */
277#endif
278
279#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