2006-03-26 Hansres Engel <engel@node.ch>

Add Uniscribe API for typography and for complex scripts.
	 * include/usp10.h: New file.
         * lib/usp10.def: New file.

	* include/winver.h:  Change first argument of GetFileVersionInfo[...] to const.

        * include/imm.h (IMECHARPOSITION): Add structure.
	(RECONVERTSTRING): Likwise.

	* include/commdlg.h (OPENFILENAME_SIZE_VERSION_400): Define.

        * lib/uuid.c (CMultiLanguage): Add UUID definition.
	(IMLangFontLink2): Likewise.
	(IMultiLanguage): Likewise.
This commit is contained in:
Danny Smith 2006-03-25 21:43:55 +00:00
parent b4e1e4e287
commit 489d553f75
8 changed files with 318 additions and 4 deletions

View File

@ -1,3 +1,20 @@
2006-03-26 Hansres Engel <engel@node.ch>
Add Uniscribe API for typography and for complex scripts.
* include/usp10.h: New file.
* lib/usp10.def: New file.
* include/winver.h: Change first argument of GetFileVersionInfo[...] to const.
* include/imm.h (IMECHARPOSITION): Add structure.
(RECONVERTSTRING): Likwise.
* include/commdlg.h (OPENFILENAME_SIZE_VERSION_400): Define.
* lib/uuid.c (CMultiLanguage): Add UUID definition.
(IMLangFontLink2): Likewise.
(IMultiLanguage): Likewise.
2006-03-18 Julien Lecomte <julienlecomte@users.sourceforge.net>
* include/wincon.h (ENABLE_*): Add more defines.

View File

@ -193,6 +193,9 @@ extern "C" {
#define CD_LBSELSUB 1
#define CD_LBSELADD 2
#define DN_DEFAULTPRN 1
#if (_WIN32_WINNT >= 0x0500)
#define OPENFILENAME_SIZE_VERSION_400 76
#endif /* (_WIN32_WINNT >= 0x0500) */
#ifndef SNDMSG
#ifdef __cplusplus

View File

@ -207,6 +207,8 @@ extern "C" {
#define IME_REGWORD_STYLE_EUDC 1
#define IME_REGWORD_STYLE_USER_FIRST 0x80000000
#define IME_REGWORD_STYLE_USER_LAST 0xFFFFFFFF
#define IMR_RECONVERTSTRING 4
#define IMR_QUERYCHARPOSITION 6
#define SOFTKEYBOARD_TYPE_T1 1
#define SOFTKEYBOARD_TYPE_C1 2
#define IMEMENUITEM_STRING_SIZE 80
@ -267,6 +269,23 @@ typedef struct tagCANDIDATELIST {
DWORD dwPageSize;
DWORD dwOffset[1];
} CANDIDATELIST,*PCANDIDATELIST,*LPCANDIDATELIST;
typedef struct tagIMECHARPOSITION {
DWORD dwSize;
DWORD dwCharPos;
POINT pt;
UINT cLineHeight;
RECT rcDocument;
} IMECHARPOSITION, *PIMECHARPOSITION;
typedef struct tagRECONVERTSTRING {
DWORD dwSize;
DWORD dwVersion;
DWORD dwStrLen;
DWORD dwStrOffset;
DWORD dwCompStrLen;
DWORD dwCompStrOffset;
DWORD dwTargetStrLen;
DWORD dwTargetStrOffset;
} RECONVERTSTRING, *PRECONVERTSTRING;
typedef struct tagREGISTERWORDA {
LPSTR lpReading;
LPSTR lpWord;

229
winsup/w32api/include/usp10.h Executable file
View File

@ -0,0 +1,229 @@
#ifndef _USP10_H
#define _USP10_H
#if __GNUC__ >= 3
#pragma GCC system_header
#endif
#include <windows.h>
#ifdef __cplusplus
extern "C" {
#endif
#pragma pack(push,1)
#define SCRIPT_UNDEFINED 0
#define USP_E_SCRIPT_NOT_IN_FONT MAKE_HRESULT(SEVERITY_ERROR,FACILITY_ITF,0x200)
#define SGCM_RTL 0x00000001
#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
#define SIC_COMPLEX 1
#define SIC_ASCIIDIGIT 2
#define SIC_NEUTRAL 4
#define SCRIPT_DIGITSUBSTITUTE_CONTEXT 0
#define SCRIPT_DIGITSUBSTITUTE_NONE 1
#define SCRIPT_DIGITSUBSTITUTE_NATIONAL 2
#define SCRIPT_DIGITSUBSTITUTE_TRADITIONAL 3
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 tagGOFFSET {
LONG du;
LONG dv;
} GOFFSET;
typedef ULONG OPENTYPE_TAG;
typedef struct opentype_feature_record{
OPENTYPE_TAG tagFeature;
LONG lParameter;
} OPENTYPE_FEATURE_RECORD;
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 void *SCRIPT_CACHE;
typedef struct script_charprop {
WORD fCanGlyphAlone : 1;
WORD reserved : 15;
} SCRIPT_CHARPROP;
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 fReserved :8;
} SCRIPT_CONTROL;
typedef struct tag_SCRIPT_DIGITSUBSTITUTE {
DWORD NationalDigitLanguage : 16;
DWORD TraditionalDigitLanguage : 16;
DWORD DigitSubstitute :8;
DWORD dwReserved;
} SCRIPT_DIGITSUBSTITUTE;
typedef struct {
int cBytes;
WORD wgBlank;
WORD wgDefault;
WORD wgInvalid;
WORD wgKashida;
int iKashidaWidth;
} SCRIPT_FONTPROPERTIES;
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 script_glyphprop {
SCRIPT_VISATTR sva;
WORD reserved;
} SCRIPT_GLYPHPROP;
typedef struct tag_SCRIPT_ITEM {
int iCharPos;
SCRIPT_ANALYSIS a;
} SCRIPT_ITEM;
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 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 void *SCRIPT_STRING_ANALYSIS;
typedef struct tag_SCRIPT_TABDEF {
int cTabStops;
int iScale;
int *pTabStops;
int iTabOrigin;
} SCRIPT_TABDEF;
typedef struct textrange_properties{
OPENTYPE_FEATURE_RECORD* potfRecords;
int cotfRecords;
} TEXTRANGE_PROPERTIES;
HRESULT WINAPI ScriptApplyDigitSubstitution(const SCRIPT_DIGITSUBSTITUTE*,SCRIPT_CONTROL*,SCRIPT_STATE*);
HRESULT WINAPI ScriptApplyLogicalWidth(const int *,int,int,const WORD *,const SCRIPT_VISATTR *,const int *,const SCRIPT_ANALYSIS *,ABC *,int *);
HRESULT WINAPI ScriptBreak(const WCHAR *,int,const SCRIPT_ANALYSIS *,SCRIPT_LOGATTR *);
HRESULT WINAPI ScriptCacheGetHeight(HDC,SCRIPT_CACHE *,long *);
HRESULT WINAPI ScriptCPtoX(int,BOOL,int,int,const WORD *,const SCRIPT_VISATTR *,const int *,const SCRIPT_ANALYSIS *,int *);
HRESULT WINAPI ScriptFreeCache(SCRIPT_CACHE *);
HRESULT WINAPI ScriptGetCMap(HDC,SCRIPT_CACHE *,const WCHAR*,int,DWORD,WORD *);
HRESULT WINAPI ScriptGetFontAlternateGlyphs(HDC,SCRIPT_CACHE*,SCRIPT_ANALYSIS*,OPENTYPE_TAG,OPENTYPE_TAG,OPENTYPE_TAG,WORD,int,WORD*,int*);
HRESULT WINAPI ScriptGetFontFeatureTags(HDC,SCRIPT_CACHE*,SCRIPT_ANALYSIS*,OPENTYPE_TAG,OPENTYPE_TAG,int,OPENTYPE_TAG*,int*);
HRESULT WINAPI ScriptGetFontLanguageTags(HDC,SCRIPT_CACHE*,SCRIPT_ANALYSIS*,OPENTYPE_TAG,int,OPENTYPE_TAG*,int*);
HRESULT WINAPI ScriptGetFontProperties(HDC,SCRIPT_CACHE *,SCRIPT_FONTPROPERTIES *);
HRESULT WINAPI ScriptGetFontScriptTags(HDC,SCRIPT_CACHE*,SCRIPT_ANALYSIS*,int,OPENTYPE_TAG*,int*);
HRESULT WINAPI ScriptGetGlyphABCWidth(HDC,SCRIPT_CACHE *,WORD,ABC *);
HRESULT WINAPI ScriptGetLogicalWidths(const SCRIPT_ANALYSIS *,int,int,const int *,const WORD *,const SCRIPT_VISATTR *,int *);
HRESULT WINAPI ScriptGetProperties(const SCRIPT_PROPERTIES ***,int *);
HRESULT WINAPI ScriptIsComplex(const WCHAR *,int,DWORD);
HRESULT WINAPI ScriptItemize(const WCHAR *,int,int,const SCRIPT_CONTROL *,const SCRIPT_STATE *,SCRIPT_ITEM *,int *);
HRESULT WINAPI ScriptItemizeOpenType(const WCHAR*,int,int,const SCRIPT_CONTROL*,const SCRIPT_STATE*,SCRIPT_ITEM*,OPENTYPE_TAG*,int*);
HRESULT WINAPI ScriptJustify(const SCRIPT_VISATTR *,const int *,int,int,int,int *);
HRESULT WINAPI ScriptLayout(int,const BYTE *,int *,int *);
HRESULT WINAPI ScriptPlace(HDC,SCRIPT_CACHE *,const WORD *,int,const SCRIPT_VISATTR *,SCRIPT_ANALYSIS *,int *,GOFFSET *,ABC *);
HRESULT WINAPI ScriptPlaceOpenType(HDC,SCRIPT_CACHE*,SCRIPT_ANALYSIS*,OPENTYPE_TAG,OPENTYPE_TAG,int*,TEXTRANGE_PROPERTIES**,int,const WCHAR*,const WORD*,const SCRIPT_CHARPROP*,int,const WORD*,const SCRIPT_GLYPHPROP*,int,int*,GOFFSET*,ABC*);
HRESULT WINAPI ScriptPositionSingleGlyph(HDC,SCRIPT_CACHE*,SCRIPT_ANALYSIS*,OPENTYPE_TAG,OPENTYPE_TAG,OPENTYPE_TAG,LONG,WORD,int,GOFFSET,int*,GOFFSET*);
HRESULT WINAPI ScriptRecordDigitSubstitution(LCID,SCRIPT_DIGITSUBSTITUTE *);
HRESULT WINAPI ScriptShape(HDC,SCRIPT_CACHE *,const WCHAR *,int,int,SCRIPT_ANALYSIS *,WORD *,WORD *,SCRIPT_VISATTR *,int *);
HRESULT WINAPI ScriptShapeOpenType(HDC,SCRIPT_CACHE*,SCRIPT_ANALYSIS*,OPENTYPE_TAG,OPENTYPE_TAG,int*,TEXTRANGE_PROPERTIES**,int,const WCHAR*,int,int,WORD*,SCRIPT_CHARPROP*,WORD*,SCRIPT_GLYPHPROP*,int*);
HRESULT WINAPI ScriptStringAnalyse(HDC,const void *,int,int,int,DWORD,int,SCRIPT_CONTROL *,SCRIPT_STATE *,const int *,SCRIPT_TABDEF *,const BYTE *,SCRIPT_STRING_ANALYSIS *);
HRESULT WINAPI ScriptStringCPtoX(SCRIPT_STRING_ANALYSIS,int,BOOL,int *);
HRESULT WINAPI ScriptStringFree(SCRIPT_STRING_ANALYSIS *);
HRESULT WINAPI ScriptStringGetLogicalWidths(SCRIPT_STRING_ANALYSIS,int *);
HRESULT WINAPI ScriptStringGetOrder(SCRIPT_STRING_ANALYSIS,UINT *);
HRESULT WINAPI ScriptStringOut(SCRIPT_STRING_ANALYSIS,int,int,UINT,const RECT *,int,int,BOOL);
const int*WINAPI ScriptString_pcOutChars(SCRIPT_STRING_ANALYSIS);
const SCRIPT_LOGATTR* WINAPI ScriptString_pLogAttr(SCRIPT_STRING_ANALYSIS);
const SIZE* WINAPI ScriptString_pSize(SCRIPT_STRING_ANALYSIS);
HRESULT WINAPI ScriptStringValidate(SCRIPT_STRING_ANALYSIS);
HRESULT WINAPI ScriptStringXtoCP(SCRIPT_STRING_ANALYSIS,int,int *,int *);
HRESULT WINAPI ScriptSubstituteSingleGlyph(HDC,SCRIPT_CACHE*,SCRIPT_ANALYSIS*,OPENTYPE_TAG,OPENTYPE_TAG,OPENTYPE_TAG,LONG,WORD,WORD*);
HRESULT WINAPI ScriptTextOut(const HDC,SCRIPT_CACHE *,int,int,UINT,const RECT *,const SCRIPT_ANALYSIS *,const WCHAR *,int,const WORD *,int,const int *,const int *,const GOFFSET *);
HRESULT WINAPI ScriptXtoCP(int,int,int,const WORD *,const SCRIPT_VISATTR *,const int *,const SCRIPT_ANALYSIS *,int *,int *);
#pragma pack(pop)
#ifdef __cplusplus
}
#endif
#endif /* ndef _USP10_H_ */

View File

@ -101,10 +101,10 @@ DWORD WINAPI VerFindFileA(DWORD,LPSTR,LPSTR,LPSTR,LPSTR,PUINT,LPSTR,PUINT);
DWORD WINAPI VerFindFileW(DWORD,LPWSTR,LPWSTR,LPWSTR,LPWSTR,PUINT,LPWSTR,PUINT);
DWORD WINAPI VerInstallFileA(DWORD,LPSTR,LPSTR,LPSTR,LPSTR,LPSTR,LPSTR,PUINT);
DWORD WINAPI VerInstallFileW(DWORD,LPWSTR,LPWSTR,LPWSTR,LPWSTR,LPWSTR,LPWSTR,PUINT);
DWORD WINAPI GetFileVersionInfoSizeA(LPSTR,PDWORD);
DWORD WINAPI GetFileVersionInfoSizeW(LPWSTR,PDWORD);
BOOL WINAPI GetFileVersionInfoA(LPSTR,DWORD,DWORD,PVOID);
BOOL WINAPI GetFileVersionInfoW(LPWSTR,DWORD,DWORD,PVOID);
DWORD WINAPI GetFileVersionInfoSizeA(LPCSTR,PDWORD);
DWORD WINAPI GetFileVersionInfoSizeW(LPCWSTR,PDWORD);
BOOL WINAPI GetFileVersionInfoA(LPCSTR,DWORD,DWORD,PVOID);
BOOL WINAPI GetFileVersionInfoW(LPCWSTR,DWORD,DWORD,PVOID);
DWORD WINAPI VerLanguageNameA(DWORD,LPSTR,DWORD);
DWORD WINAPI VerLanguageNameW(DWORD,LPWSTR,DWORD);
BOOL WINAPI VerQueryValueA(const LPVOID,LPSTR,LPVOID*,PUINT);

View File

@ -83,6 +83,7 @@
#include <dhcpcsdk.h>
#include <errorrep.h>
#include <windns.h>
#include <usp10.h>
#ifndef __OBJC__ /* problems with BOOL */
#include <ole2.h>

42
winsup/w32api/lib/usp10.def Executable file
View File

@ -0,0 +1,42 @@
LIBRARY USP10.DLL
EXPORTS
ScriptApplyDigitSubstitution@12
ScriptApplyLogicalWidth@36
ScriptBreak@16
ScriptCPtoX@36
ScriptCacheGetHeight@12
ScriptFreeCache@4
ScriptGetCMap@24
ScriptGetFontAlternateGlyphs@40
ScriptGetFontFeatureTags@32
ScriptGetFontLanguageTags@28
ScriptGetFontProperties@12
ScriptGetFontScriptTags@24
ScriptGetGlyphABCWidth@16
ScriptGetLogicalWidths@28
ScriptGetProperties@8
ScriptIsComplex@12
ScriptItemize@28
ScriptItemizeOpenType@32
ScriptJustify@24
ScriptLayout@16
ScriptPlace@36
ScriptPlaceOpenType@72
ScriptPositionSingleGlyph@52
ScriptRecordDigitSubstitution@8
ScriptShape@40
ScriptShapeOpenType@64
ScriptStringAnalyse@52
ScriptStringCPtoX@16
ScriptStringFree@4
ScriptStringGetLogicalWidths@8
ScriptStringGetOrder@8
ScriptStringOut@32
ScriptStringValidate@4
ScriptStringXtoCP@16
ScriptString_pLogAttr@4
ScriptString_pSize@4
ScriptString_pcOutChars@4
ScriptSubstituteSingleGlyph@36
ScriptTextOut@56
ScriptXtoCP@36

View File

@ -35,6 +35,7 @@ DEFINE_GUID(CATID_SafeForScripting,0x7dd95801,0x9882,0x11cf,0x9f,0xa9,0,0xaa,0,0
DEFINE_GUID(CLSID_AllClasses,0x330,0,0,0xc0,0,0,0,0,0,0,0x46);
DEFINE_GUID(CLSID_CColorPropPage,0xbe35201,0x8f91,0x11ce,0x9d,0xe3,0,0xaa,0,0x4b,0xb8,0x51);
DEFINE_GUID(CLSID_CFontPropPage, 0x0be35200,0x8f91,0x11ce,0x9d,0xe3,0x00,0xaa,0x00,0x4b,0xb8,0x51);
DEFINE_GUID(CLSID_CMultiLanguage,0x275c23e2,0x3747,0x11d0,0x9f,0xea,0,0xaa,0,0x3f,0x86,0x46);
DEFINE_GUID(CLSID_CPicturePropPage,0xbe35202,0x8f91,0x11ce,0x9d,0xe3,0,0xaa,0,0x4b,0xb8,0x51);
DEFINE_GUID(CLSID_ConvertVBX,0xfb8f0822,0x164,0x101b,0x84,0xed,0x8,0,0x2b,0x2e,0xc7,0x13);
DEFINE_GUID(CLSID_CurrentUserClasses,0x332,0,0,0xc0,0,0,0,0,0,0,0x46);
@ -190,7 +191,9 @@ DEFINE_GUID(IID_IMallocSpy,0x1d,0,0,0xc0,0,0,0,0,0,0,0x46);
DEFINE_GUID(IID_IMarshal,0x3,0,0,0xc0,0,0,0,0,0,0,0x46);
DEFINE_GUID(IID_IMessageFilter,0x16,0,0,0xc0,0,0,0,0,0,0,0x46);
DEFINE_GUID(IID_IMimeInfo,0xf77459a0,0xbf9a,0x11cf,0xba,0x4e,0,0xc0,0x4f,0xd7,0x8,0x16);
DEFINE_GUID(IID_IMLangFontLink2,0xdccfc162,0x2b38,0x11d2,0xb7,0xec,0,0xc0,0x4f,0x8f,0x5d,0x9a);
DEFINE_GUID(IID_IMoniker,0xf,0,0,0xc0,0,0,0,0,0,0,0x46);
DEFINE_GUID(IID_IMultiLanguage,0x275c23e1,0x3747,0x11d0,0x9f,0xea,0,0xaa,0,0x3f,0x86,0x46);
DEFINE_GUID(IID_IMultiQI,0x20,0,0,0xc0,0,0,0,0,0,0,0x46);
DEFINE_GUID(IID_IObjectSafety,0xcb5bdc81,0x93c1,0x11cf,0x8f,0x20,0,0x80,0x5f,0x2c,0xd0,0x64);
DEFINE_GUID(IID_IObjectWithSite,0xfc4801a3,0x2ba9,0x11cf,0xa2,0x29,0,0xaa,0,0x3d,0x73,0x52);