2005-07-27 13:02:52 +02:00
|
|
|
/*
|
|
|
|
* 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>
|
|
|
|
|
2005-08-10 11:51:40 +02:00
|
|
|
#include "windef.h"
|
|
|
|
#include "winbase.h"
|
2005-11-28 11:52:55 +01:00
|
|
|
#include "wingdi.h"
|
2005-08-10 11:51:40 +02:00
|
|
|
#include "winuser.h"
|
|
|
|
#include "usp10.h"
|
2005-07-27 13:02:52 +02:00
|
|
|
|
|
|
|
#include "wine/debug.h"
|
|
|
|
|
2005-11-15 13:02:16 +01:00
|
|
|
/**
|
|
|
|
* some documentation here:
|
|
|
|
* http://www.microsoft.com/typography/developers/uniscribe/uniscribe.htm
|
|
|
|
*/
|
|
|
|
|
2005-07-27 13:02:52 +02:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2006-01-09 17:16:57 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* ScriptFreeCache (USP10.@)
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
HRESULT WINAPI ScriptFreeCache(SCRIPT_CACHE *psc)
|
|
|
|
{
|
|
|
|
FIXME("%p\n", psc);
|
|
|
|
|
|
|
|
if (psc) *psc = NULL;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2005-11-23 20:14:04 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* ScriptGetProperties (USP10.@)
|
|
|
|
*
|
|
|
|
*/
|
2005-07-27 13:02:52 +02:00
|
|
|
HRESULT WINAPI ScriptGetProperties(const SCRIPT_PROPERTIES ***ppSp, int *piNumScripts)
|
|
|
|
{
|
|
|
|
FIXME("%p,%p\n",ppSp,piNumScripts);
|
2006-01-09 17:16:57 +01:00
|
|
|
|
|
|
|
if (piNumScripts) *piNumScripts = 0;
|
|
|
|
return 0;
|
2005-07-27 13:02:52 +02:00
|
|
|
}
|
|
|
|
|
2005-11-23 20:14:04 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* ScriptGetFontProperties (USP10.@)
|
|
|
|
*
|
|
|
|
*/
|
2005-08-01 11:18:53 +02:00
|
|
|
HRESULT WINAPI ScriptGetFontProperties(HDC hdc, SCRIPT_CACHE *psc, SCRIPT_FONTPROPERTIES *sfp)
|
|
|
|
{
|
|
|
|
FIXME("%p,%p,%p\n", hdc, psc, sfp);
|
|
|
|
/* return something sensible? */
|
|
|
|
if (NULL != sfp) {
|
|
|
|
sfp->cBytes = sizeof(SCRIPT_FONTPROPERTIES);
|
|
|
|
sfp->wgBlank = 0;
|
|
|
|
sfp->wgDefault = 0;
|
|
|
|
sfp->wgInvalid = 0;
|
|
|
|
sfp->wgKashida = 1;
|
|
|
|
sfp->iKashidaWidth = 0;
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2005-11-23 20:14:04 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* ScriptRecordDigitSubstitution (USP10.@)
|
|
|
|
*
|
|
|
|
*/
|
2005-07-27 13:02:52 +02:00
|
|
|
HRESULT WINAPI ScriptRecordDigitSubstitution(LCID Locale,SCRIPT_DIGITSUBSTITUTE *psds)
|
|
|
|
{
|
|
|
|
FIXME("%ld,%p\n",Locale,psds);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2005-11-23 20:14:04 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* ScriptApplyDigitSubstitution (USP10.@)
|
|
|
|
*
|
|
|
|
*/
|
2005-07-27 13:02:52 +02:00
|
|
|
HRESULT WINAPI ScriptApplyDigitSubstitution(const SCRIPT_DIGITSUBSTITUTE* psds,
|
|
|
|
SCRIPT_CONTROL* psc, SCRIPT_STATE* pss)
|
|
|
|
{
|
|
|
|
FIXME("%p,%p,%p\n",psds,psc,pss);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2005-11-23 20:14:04 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* ScriptItemize (USP10.@)
|
|
|
|
*
|
|
|
|
*/
|
2005-07-27 13:02:52 +02:00
|
|
|
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);
|
2006-01-09 17:16:57 +01:00
|
|
|
|
|
|
|
if (!pwcInChars || !cInChars || !pItems || cMaxItems < 2)
|
|
|
|
return E_INVALIDARG;
|
|
|
|
|
|
|
|
*pcItems = 0;
|
|
|
|
return 0;
|
2005-07-27 13:02:52 +02:00
|
|
|
}
|
2005-11-15 13:02:16 +01:00
|
|
|
|
2005-11-23 20:14:04 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* ScriptStringAnalyse (USP10.@)
|
|
|
|
*
|
|
|
|
*/
|
2005-11-15 13:02:16 +01:00
|
|
|
HRESULT WINAPI ScriptStringAnalyse(HDC hdc,
|
|
|
|
const void *pString,
|
|
|
|
int cString,
|
|
|
|
int cGlyphs,
|
|
|
|
int iCharset,
|
|
|
|
DWORD dwFlags,
|
|
|
|
int iReqWidth,
|
|
|
|
SCRIPT_CONTROL *psControl,
|
|
|
|
SCRIPT_STATE *psState,
|
|
|
|
const int *piDx,
|
|
|
|
SCRIPT_TABDEF *pTabdef,
|
|
|
|
const BYTE *pbInClass,
|
|
|
|
SCRIPT_STRING_ANALYSIS *pssa)
|
|
|
|
{
|
|
|
|
FIXME("(%p,%p,%d,%d,%d,0x%lx,%d,%p,%p,%p,%p,%p,%p): stub\n",
|
|
|
|
hdc, pString, cString, cGlyphs, iCharset, dwFlags,
|
|
|
|
iReqWidth, psControl, psState, piDx, pTabdef, pbInClass, pssa);
|
|
|
|
if (1 > cString || NULL == pString) {
|
|
|
|
return E_INVALIDARG;
|
|
|
|
}
|
|
|
|
if ((dwFlags & SSA_GLYPHS) && NULL == hdc) {
|
|
|
|
return E_INVALIDARG;
|
|
|
|
}
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2005-11-23 20:14:04 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* ScriptStringFree (USP10.@)
|
|
|
|
*
|
|
|
|
*/
|
2005-11-15 13:02:16 +01:00
|
|
|
HRESULT WINAPI ScriptStringFree(SCRIPT_STRING_ANALYSIS *pssa) {
|
|
|
|
FIXME("(%p): stub\n",pssa);
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2005-11-23 20:14:04 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* ScriptIsComplex (USP10.@)
|
|
|
|
*
|
|
|
|
*/
|
2005-11-15 13:02:16 +01:00
|
|
|
HRESULT WINAPI ScriptIsComplex(const WCHAR* pwcInChars, int cInChars, DWORD dwFlags) {
|
|
|
|
FIXME("(%s,%d,0x%lx): stub\n", debugstr_w(pwcInChars), cInChars, dwFlags);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|