Add stub implementation of the Uniscribe Script Processor.

oldstable
Steven Edwards 2005-07-27 11:02:52 +00:00 committed by Alexandre Julliard
parent 7d00bb387e
commit 54508df527
8 changed files with 239 additions and 1 deletions

3
configure vendored

File diff suppressed because one or more lines are too long

View File

@ -1702,6 +1702,7 @@ dlls/urlmon/Makefile
dlls/urlmon/tests/Makefile
dlls/user/Makefile
dlls/user/tests/Makefile
dlls/usp10/Makefile
dlls/uuid/Makefile
dlls/uxtheme/Makefile
dlls/vdhcp.vxd/Makefile

View File

@ -137,6 +137,7 @@ BASEDIRS = \
url \
urlmon \
user \
usp10 \
uxtheme \
vdhcp.vxd \
vdmdbg \
@ -385,6 +386,7 @@ SYMLINKS_SO = \
url.dll.so \
urlmon.dll.so \
user32.dll.so \
usp10.dll.so \
uxtheme.dll.so \
vdhcp.vxd.so \
vdmdbg.dll.so \
@ -892,6 +894,9 @@ ddeml.dll.so display.drv.so keyboard.drv.so \
mouse.drv.so user.exe.so : user32.dll.so
$(RM) $@ && $(LN_S) user32.dll.so $@
usp10.dll.so: usp10/usp10.dll.so
$(RM) $@ && $(LN_S) usp10/usp10.dll.so $@
uxtheme.dll.so: uxtheme/uxtheme.dll.so
$(RM) $@ && $(LN_S) uxtheme/uxtheme.dll.so $@
@ -1166,6 +1171,7 @@ IMPORT_LIBS = \
url/liburl.$(IMPLIBEXT) \
urlmon/liburlmon.$(IMPLIBEXT) \
user/libuser32.$(IMPLIBEXT) \
usp10/libusp10.$(IMPLIBEXT) \
uxtheme/libuxtheme.$(IMPLIBEXT) \
vdmdbg/libvdmdbg.$(IMPLIBEXT) \
version/libversion.$(IMPLIBEXT) \
@ -1484,6 +1490,9 @@ urlmon/liburlmon.$(IMPLIBEXT): urlmon/urlmon.spec $(WINEBUILD)
user/libuser32.$(IMPLIBEXT): user/user32.spec $(WINEBUILD)
@cd user && $(MAKE) libuser32.$(IMPLIBEXT)
usp10/libusp10.$(IMPLIBEXT): usp10/usp10.spec $(WINEBUILD)
@cd usp10 && $(MAKE) libusp10.$(IMPLIBEXT)
uxtheme/libuxtheme.$(IMPLIBEXT): uxtheme/uxtheme.spec $(WINEBUILD)
@cd uxtheme && $(MAKE) libuxtheme.$(IMPLIBEXT)
@ -1727,6 +1736,7 @@ unicows/unicows.dll.so: unicows
url/url.dll.so: url
urlmon/urlmon.dll.so: urlmon
user/user32.dll.so: user
usp10/usp10.dll.so: usp10
uxtheme/uxtheme.dll.so: uxtheme
vdhcp.vxd/vdhcp.vxd.so: vdhcp.vxd
vdmdbg/vdmdbg.dll.so: vdmdbg

View File

@ -0,0 +1,3 @@
Makefile
libusp10.def
usp10.dll.dbg.c

View File

@ -0,0 +1,14 @@
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = usp10.dll
IMPORTLIB = libusp10.$(IMPLIBEXT)
IMPORTS = kernel32
C_SRCS = \
usp10.c
@MAKE_DLL_RULES@
### Dependencies:

74
dlls/usp10/usp10.c 100644
View File

@ -0,0 +1,74 @@
/*
* Implementation of Uniscribe Script Processor (usp10.dll)
*
* Copyright 2005 Steven Edwards for CodeWeavers
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Notes:
* Uniscribe allows for processing of complex scripts such as joining
* and filtering characters and bi-directional text with custom line breaks.
*/
#include <stdarg.h>
#include <windef.h>
#include <winbase.h>
#include <winuser.h>
#include <usp10.h>
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(uniscribe);
BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
{
switch(fdwReason) {
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls(hInstDLL);
break;
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
HRESULT WINAPI ScriptGetProperties(const SCRIPT_PROPERTIES ***ppSp, int *piNumScripts)
{
FIXME("%p,%p\n",ppSp,piNumScripts);
return E_NOTIMPL;
}
HRESULT WINAPI ScriptRecordDigitSubstitution(LCID Locale,SCRIPT_DIGITSUBSTITUTE *psds)
{
FIXME("%ld,%p\n",Locale,psds);
return E_NOTIMPL;
}
HRESULT WINAPI ScriptApplyDigitSubstitution(const SCRIPT_DIGITSUBSTITUTE* psds,
SCRIPT_CONTROL* psc, SCRIPT_STATE* pss)
{
FIXME("%p,%p,%p\n",psds,psc,pss);
return E_NOTIMPL;
}
HRESULT WINAPI ScriptItemize(const WCHAR *pwcInChars, int cInChars, int cMaxItems,
const SCRIPT_CONTROL *psControl, const SCRIPT_STATE *psState,
SCRIPT_ITEM *pItems, int *pcItems)
{
FIXME("%s,%d,%d,%p,%p,%p,%p\n", debugstr_w(pwcInChars), cInChars, cMaxItems,
psControl, psState, pItems, pcItems);
return E_INVALIDARG;
}

View File

@ -0,0 +1,35 @@
@ stub LpkPresent
@ stdcall ScriptApplyDigitSubstitution(ptr ptr ptr)
@ stub ScriptApplyLogicalWidth
@ stub ScriptBreak
@ stub ScriptCacheGetHeight
@ stub ScriptCPtoX
@ stub ScriptFreeCache
@ stub ScriptGetCMap
@ stub ScriptGetFontProperties
@ stub ScriptGetGlyphABCWidth
@ stub ScriptGetLogicalWidths
@ stdcall ScriptGetProperties(ptr long)
@ stub ScriptIsComplex
@ stdcall ScriptItemize(wstr long long ptr ptr ptr ptr)
@ stub ScriptJustify
@ stub ScriptLayout
@ stub ScriptPlace
@ stdcall ScriptRecordDigitSubstitution(ptr ptr)
@ stub ScriptShape
@ stub ScriptString_pcOutChars
@ stub ScriptString_pLogAttr
@ stub ScriptString_pSize
@ stub ScriptStringAnalyse
@ stub ScriptStringCPtoX
@ stub ScriptStringFree
@ stub ScriptStringGetLogicalWidths
@ stub ScriptStringGetOrder
@ stub ScriptStringOut
@ stub ScriptStringValidate
@ stub ScriptStringXtoCP
@ stub ScriptTextOut
@ stub ScriptXtoCP
@ stub UspAllocCache
@ stub UspAllocTemp
@ stub UspFreeMem

100
include/usp10.h 100644
View File

@ -0,0 +1,100 @@
/*
* Copyright (C) 2005 Steven Edwards
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __USP10_H
#define __USP10_H
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 {
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;
/* Function Declairations */
HRESULT WINAPI ScriptGetProperties(const SCRIPT_PROPERTIES ***ppSp, int *piNumScripts);
HRESULT WINAPI ScriptRecordDigitSubstitution(LCID Locale, SCRIPT_DIGITSUBSTITUTE *psds);
HRESULT WINAPI ScriptApplyDigitSubstitution(const SCRIPT_DIGITSUBSTITUTE* psds,
SCRIPT_CONTROL* psc, SCRIPT_STATE* pss);
HRESULT WINAPI ScriptItemize(const WCHAR *pwcInChars, int cInChars, int cMaxItems,
const SCRIPT_CONTROL *psControl, const SCRIPT_STATE *psState,
SCRIPT_ITEM *pItems, int *pcItems);
#endif /* __USP10_H */