Something went wrong. Try again.
Reactos
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543/* * Copyright (C) 2005 Steven Edwards * Copyright (C) 2005 Vijay Kiran Kamuju * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
#ifndef __USP10_H#define __USP10_H
#ifndef __WINESRC__# include <windows.h>#endif/* FIXME: #include <specstrings.h> */
#ifdef __cplusplusextern "C" {#endif
/** ScriptStringAnalyse */#define SSA_PASSWORD 0x00000001#define SSA_TAB 0x00000002#define SSA_CLIP 0x00000004#define SSA_FIT 0x00000008#define SSA_DZWG 0x00000010#define SSA_FALLBACK 0x00000020#define SSA_BREAK 0x00000040#define SSA_GLYPHS 0x00000080#define SSA_RTL 0x00000100#define SSA_GCP 0x00000200#define SSA_HOTKEY 0x00000400#define SSA_METAFILE 0x00000800#define SSA_LINK 0x00001000#define SSA_HIDEHOTKEY 0x00002000#define SSA_HOTKEYONLY 0x00002400#define SSA_FULLMEASURE 0x04000000#define SSA_LPKANSIFALLBACK 0x08000000#define SSA_PIDX 0x10000000#define SSA_LAYOUTRTL 0x20000000#define SSA_DONTGLYPH 0x40000000#define SSA_NOKASHIDA 0x80000000
/** StringIsComplex */#define SIC_COMPLEX 1#define SIC_ASCIIDIGIT 2#define SIC_NEUTRAL 4
/** ScriptGetCMap */#define SGCM_RTL 0x00000001
/** ScriptApplyDigitSubstitution */#define SCRIPT_DIGITSUBSTITUTE_CONTEXT 0#define SCRIPT_DIGITSUBSTITUTE_NONE 1#define SCRIPT_DIGITSUBSTITUTE_NATIONAL 2#define SCRIPT_DIGITSUBSTITUTE_TRADITIONAL 3
#define SCRIPT_UNDEFINED 0
#define USP_E_SCRIPT_NOT_IN_FONT MAKE_HRESULT(SEVERITY_ERROR,FACILITY_ITF,0x200)
typedef enum tag_SCRIPT_JUSTIFY { SCRIPT_JUSTIFY_NONE = 0, SCRIPT_JUSTIFY_ARABIC_BLANK = 1, SCRIPT_JUSTIFY_CHARACTER = 2, SCRIPT_JUSTIFY_RESERVED1 = 3, SCRIPT_JUSTIFY_BLANK = 4, SCRIPT_JUSTIFY_RESERVED2 = 5, SCRIPT_JUSTIFY_RESERVED3 = 6, SCRIPT_JUSTIFY_ARABIC_NORMAL = 7, SCRIPT_JUSTIFY_ARABIC_KASHIDA = 8, SCRIPT_JUSTIFY_ARABIC_ALEF = 9, SCRIPT_JUSTIFY_ARABIC_HA = 10, SCRIPT_JUSTIFY_ARABIC_RA = 11, SCRIPT_JUSTIFY_ARABIC_BA = 12, SCRIPT_JUSTIFY_ARABIC_BARA = 13, SCRIPT_JUSTIFY_ARABIC_SEEN = 14, SCRIPT_JUSTIFY_ARABIC_SEEN_M = 15,} SCRIPT_JUSTIFY;
typedef struct tag_SCRIPT_CONTROL { DWORD uDefaultLanguage :16; DWORD fContextDigits :1; DWORD fInvertPreBoundDir :1; DWORD fInvertPostBoundDir :1; DWORD fLinkStringBefore :1; DWORD fLinkStringAfter :1; DWORD fNeutralOverride :1; DWORD fNumericOverride :1; DWORD fLegacyBidiClass :1; DWORD fMergeNeutralItems :1; DWORD fReserved :7;} SCRIPT_CONTROL;
typedef struct { DWORD langid :16; DWORD fNumeric :1; DWORD fComplex :1; DWORD fNeedsWordBreaking :1; DWORD fNeedsCaretInfo :1; DWORD bCharSet :8; DWORD fControl :1; DWORD fPrivateUseArea :1; DWORD fNeedsCharacterJustify :1; DWORD fInvalidGlyph :1; DWORD fInvalidLogAttr :1; DWORD fCDM :1; DWORD fAmbiguousCharSet :1; DWORD fClusterSizeVaries :1; DWORD fRejectInvalid :1;} SCRIPT_PROPERTIES;
typedef struct tag_SCRIPT_STATE { WORD uBidiLevel :5; WORD fOverrideDirection :1; WORD fInhibitSymSwap :1; WORD fCharShape :1; WORD fDigitSubstitute :1; WORD fInhibitLigate :1; WORD fDisplayZWG :1; WORD fArabicNumContext :1; WORD fGcpClusters :1; WORD fReserved :1; WORD fEngineReserved :2;} SCRIPT_STATE;
typedef struct tag_SCRIPT_ANALYSIS { WORD eScript :10; WORD fRTL :1; WORD fLayoutRTL :1; WORD fLinkBefore :1; WORD fLinkAfter :1; WORD fLogicalOrder :1; WORD fNoGlyphIndex :1; SCRIPT_STATE s;} SCRIPT_ANALYSIS;
typedef struct tag_SCRIPT_ITEM { int iCharPos; SCRIPT_ANALYSIS a;} SCRIPT_ITEM;
typedef struct tag_SCRIPT_DIGITSUBSTITUTE { DWORD NationalDigitLanguage :16; DWORD TraditionalDigitLanguage :16; DWORD DigitSubstitute :8; DWORD dwReserved;} SCRIPT_DIGITSUBSTITUTE;
typedef struct tag_SCRIPT_FONTPROPERTIES { int cBytes; WORD wgBlank; WORD wgDefault; WORD wgInvalid; WORD wgKashida; int iKashidaWidth;} SCRIPT_FONTPROPERTIES;
typedef struct tag_SCRIPT_TABDEF { int cTabStops; int iScale; int *pTabStops; int iTabOrigin;} SCRIPT_TABDEF;
typedef struct tag_SCRIPT_VISATTR { WORD uJustification :4; WORD fClusterStart :1; WORD fDiacritic :1; WORD fZeroWidth :1; WORD fReserved :1; WORD fShapeReserved :8;} SCRIPT_VISATTR;
typedef struct tag_SCRIPT_LOGATTR { BYTE fSoftBreak :1; BYTE fWhiteSpace :1; BYTE fCharStop :1; BYTE fWordStop :1; BYTE fInvalid :1; BYTE fReserved :3;} SCRIPT_LOGATTR;
typedef void *SCRIPT_CACHE;typedef void *SCRIPT_STRING_ANALYSIS;
#ifndef LSDEFS_DEFINEDtypedef struct tagGOFFSET { LONG du; LONG dv;} GOFFSET;#endif
typedef ULONG OPENTYPE_TAG;
typedef struct tagOPENTYPE_FEATURE_RECORD{ OPENTYPE_TAG tagFeature; LONG lParameter;} OPENTYPE_FEATURE_RECORD;
typedef struct tagSCRIPT_GLYPHPROP{ SCRIPT_VISATTR sva; WORD reserved;} SCRIPT_GLYPHPROP;
typedef struct tagSCRIPT_CHARPROP{ WORD fCanGlyphAlone :1; WORD reserved :15;} SCRIPT_CHARPROP;
typedef struct tagTEXTRANGE_PROPERTIES{ OPENTYPE_FEATURE_RECORD *potfRecords; INT cotfRecords;} TEXTRANGE_PROPERTIES;
/* Function Declarations */
_Check_return_HRESULTWINAPIScriptApplyDigitSubstitution( _In_reads_(1) const SCRIPT_DIGITSUBSTITUTE* psds, _Out_writes_(1) SCRIPT_CONTROL* psc, _Out_writes_(1) SCRIPT_STATE* pss);
_Check_return_HRESULTWINAPIScriptApplyLogicalWidth( _In_reads_(cChars) const int *piDx, _In_ int cChars, _In_ int cGlyphs, _In_reads_(cChars) const WORD *pwLogClust, _In_reads_(cGlyphs) const SCRIPT_VISATTR *psva, _In_reads_(cGlyphs) const int *piAdvance, _In_reads_(1) const SCRIPT_ANALYSIS *psa, _Inout_updates_opt_(1) ABC *pABC, _Out_writes_all_(cGlyphs) int *piJustify);
_Check_return_HRESULTWINAPIScriptRecordDigitSubstitution( _In_ LCID Locale, _Out_writes_(1) SCRIPT_DIGITSUBSTITUTE *psds);
_Check_return_HRESULTWINAPIScriptItemize( _In_reads_(cInChars) const WCHAR *pwcInChars, _In_ int cInChars, _In_ int cMaxItems, _In_reads_opt_(1) const SCRIPT_CONTROL *psControl, _In_reads_opt_(1) const SCRIPT_STATE *psState, _Out_writes_to_(cMaxItems, *pcItems) SCRIPT_ITEM *pItems, _Out_writes_(1) int *pcItems);
_Check_return_HRESULTWINAPIScriptGetCMap( _In_ HDC hdc, _Inout_updates_(1) SCRIPT_CACHE *psc, _In_reads_(cChars) const WCHAR *pwcInChars, _In_ int cChars, _In_ DWORD dwFlags, _Out_writes_(cChars) WORD *pwOutGlyphs);
_Check_return_HRESULTWINAPIScriptGetFontProperties( _In_ HDC hdc, _Inout_updates_(1) SCRIPT_CACHE *psc, _Out_writes_(1) SCRIPT_FONTPROPERTIES *sfp);
_Check_return_HRESULTWINAPIScriptGetGlyphABCWidth( _In_ HDC hdc, _Inout_updates_(1) SCRIPT_CACHE *psc, _In_ WORD wGlyph, _Out_writes_(1) ABC *pABC);
_Check_return_HRESULTWINAPIScriptGetLogicalWidths( _In_reads_(1) const SCRIPT_ANALYSIS *psa, _In_ int cChars, _In_ int cGlyphs, _In_reads_(cGlyphs) const int *piGlyphWidth, _In_reads_(cChars) const WORD *pwLogClust, _In_reads_(cGlyphs) const SCRIPT_VISATTR *psva, _In_reads_(cChars) int *piDx);
_Check_return_HRESULTWINAPIScriptGetProperties( _Outptr_result_buffer_(*piNumScripts) const SCRIPT_PROPERTIES ***ppSp, _Out_ int *piNumScripts);
_Check_return_HRESULTWINAPIScriptStringAnalyse( _In_ HDC hdc, _In_ const void *pString, _In_ int cString, _In_ int cGlyphs, _In_ int iCharset, _In_ DWORD dwFlags, _In_ int iReqWidth, _In_reads_opt_(1) SCRIPT_CONTROL *psControl, _In_reads_opt_(1) SCRIPT_STATE *psState, _In_reads_opt_(cString) const int *piDx, _In_reads_opt_(1) SCRIPT_TABDEF *pTabdef, _In_ const BYTE *pbInClass, _Outptr_result_buffer_(1) SCRIPT_STRING_ANALYSIS *pssa);
_Check_return_HRESULTWINAPIScriptStringValidate( _In_reads_(1) SCRIPT_STRING_ANALYSIS ssa);
_Check_return_HRESULTWINAPIScriptStringFree( _Inout_updates_(1) SCRIPT_STRING_ANALYSIS *pssa);
_Check_return_HRESULTWINAPIScriptFreeCache( _Inout_updates_(1) _At_(*psc, _Post_null_) SCRIPT_CACHE *psc);
_Check_return_HRESULTWINAPIScriptIsComplex( _In_reads_(cInChars) const WCHAR *pwcInChars, _In_ int cInChars, _In_ DWORD dwFlags);
_Check_return_HRESULTWINAPIScriptJustify( _In_reads_(cGlyphs) const SCRIPT_VISATTR *psva, _In_reads_(cGlyphs) const int *piAdvance, _In_ int cGlyphs, _In_ int iDx, _In_ int iMinKashida, _Out_writes_all_(cGlyphs) int *piJustify);
_Check_return_HRESULTWINAPIScriptLayout( int cRuns, _In_reads_(cRuns) const BYTE *pbLevel, _Out_writes_all_opt_(cRuns) int *piVisualToLogical, _Out_writes_all_opt_(cRuns) int *piLogicalToVisual);
_Check_return_HRESULTWINAPIScriptShape( _In_ HDC hdc, _Inout_updates_(1) SCRIPT_CACHE *psc, _In_reads_(cChars) const WCHAR *pwcChars, _In_ int cChars, _In_ int cMaxGlyphs, _Inout_updates_(1) SCRIPT_ANALYSIS *psa, _Out_writes_to_(cMaxGlyphs, *pcGlyphs) WORD *pwOutGlyphs, _Out_writes_all_(cChars) WORD *pwLogClust, _Out_writes_to_(cMaxGlyphs, *pcGlyphs) SCRIPT_VISATTR *psva, _Out_writes_(1) int *pcGlyphs);
_Check_return_HRESULTWINAPIScriptPlace( _In_ HDC hdc, _Inout_updates_(1) SCRIPT_CACHE *psc, _In_reads_(cGlyphs) const WORD *pwGlyphs, _In_ int cGlyphs, _In_reads_(cGlyphs) const SCRIPT_VISATTR *psva, _Inout_updates_(1) SCRIPT_ANALYSIS *psa, _Out_writes_all_(cGlyphs) int *piAdvance, _Out_writes_all_opt_(cGlyphs) GOFFSET *pGoffset, _Out_writes_(1) ABC *pABC);
_Check_return_HRESULTWINAPIScriptBreak( _In_reads_(cChars) const WCHAR *pwcChars, _In_ int cChars, _In_reads_(1) const SCRIPT_ANALYSIS *psa, _Out_writes_all_(cChars) SCRIPT_LOGATTR *psla);
_Check_return_HRESULTWINAPIScriptCacheGetHeight( _In_ HDC hdc, _Inout_updates_(1) SCRIPT_CACHE *psc, _Out_writes_(1) LONG *tmHeight);
_Check_return_HRESULTWINAPIScriptCPtoX( _In_ int iCP, _In_ BOOL fTrailing, _In_ int cChars, _In_ int cGlyphs, _In_reads_(cChars) const WORD *pwLogClust, _In_reads_(cGlyphs) const SCRIPT_VISATTR *psva, _In_reads_(cGlyphs) const int *piAdvance, _In_reads_(1) const SCRIPT_ANALYSIS *psa, _Out_ int *piX);
_Check_return_HRESULTWINAPIScriptXtoCP( _In_ int iX, _In_ int cChars, _In_ int cGlyphs, _In_reads_(cChars) const WORD *pwLogClust, _In_reads_(cGlyphs) const SCRIPT_VISATTR *psva, _In_reads_(cGlyphs) const int *piAdvance, _In_reads_(1) const SCRIPT_ANALYSIS *psa, _Out_writes_(1) int *piCP, _Out_writes_(1) int *piTrailing);
_Check_return_HRESULTWINAPIScriptStringCPtoX( _In_reads_(1) SCRIPT_STRING_ANALYSIS ssa, _In_ int icp, _In_ BOOL fTrailing, _Out_writes_(1) int *pX);
_Check_return_HRESULTWINAPIScriptStringXtoCP( _In_reads_(1) SCRIPT_STRING_ANALYSIS ssa, _In_ int iX, _Out_writes_(1) int *piCh, _Out_writes_(1) int *piTrailing);
_Check_return_HRESULTWINAPIScriptStringGetLogicalWidths( _In_reads_(1) SCRIPT_STRING_ANALYSIS ssa, _Out_ int *piDx);
_Check_return_HRESULTWINAPIScriptStringGetOrder( _In_reads_(1) SCRIPT_STRING_ANALYSIS ssa, _Out_ UINT *puOrder);
_Check_return_HRESULTWINAPIScriptStringOut( _In_reads_(1) SCRIPT_STRING_ANALYSIS ssa, _In_ int iX, _In_ int iY, _In_ UINT uOptions, _In_reads_opt_(1) const RECT *prc, _In_ int iMinSel, _In_ int iMaxSel, _In_ BOOL fDisabled);
_Check_return_HRESULTWINAPIScriptTextOut( _In_ const HDC hdc, _Inout_updates_(1) SCRIPT_CACHE *psc, _In_ int x, _In_ int y, _In_ UINT fuOptions, _In_reads_opt_(1) const RECT *lprc, _In_reads_(1) const SCRIPT_ANALYSIS *psa, _Reserved_ const WCHAR *pwcReserved, _Reserved_ int iReserved, _In_reads_(cGlyphs) const WORD *pwGlyphs, _In_ int cGlyphs, _In_reads_(cGlyphs) const int *piAdvance, _In_reads_opt_(cGlyphs) const int *piJustify, _In_reads_(cGlyphs) const GOFFSET *pGoffset);
const int*WINAPIScriptString_pcOutChars( _In_reads_(1) SCRIPT_STRING_ANALYSIS ssa);
const SCRIPT_LOGATTR*WINAPIScriptString_pLogAttr( _In_reads_(1) SCRIPT_STRING_ANALYSIS ssa);
const SIZE*WINAPIScriptString_pSize( _In_reads_(1) SCRIPT_STRING_ANALYSIS ssa);
#ifdef __cplusplus} /* extern "C" */#endif
#endif /* __USP10_H */