usp10: Add stubs for ScriptCPtoX, ScriptXtoCP and ScriptBreak and some basic tests.
This commit is contained in:
parent
c0fcba798b
commit
5f529fe0d8
|
@ -352,6 +352,11 @@ void test_ScriptTextOut(void)
|
|||
GOFFSET pGoffset[256];
|
||||
ABC pABC[256];
|
||||
RECT rect;
|
||||
int piX;
|
||||
int iCP = 1;
|
||||
BOOL fTrailing = FALSE;
|
||||
SCRIPT_LOGATTR *psla;
|
||||
SCRIPT_LOGATTR sla[256];
|
||||
|
||||
/* We need a valid HDC to drive a lot of Script functions which requires the following *
|
||||
* to set up for the tests. */
|
||||
|
@ -438,6 +443,15 @@ void test_ScriptTextOut(void)
|
|||
ok (hr == 0, "ScriptTextOut should return 0 not (%08x)\n", (unsigned int) hr);
|
||||
ok (psc != NULL, "psc should not be null and have SCRIPT_CACHE buffer address\n");
|
||||
|
||||
iCP = 1;
|
||||
hr = ScriptCPtoX(iCP, fTrailing, cChars, pcGlyphs, (const WORD *) &pwLogClust,
|
||||
(const SCRIPT_VISATTR *) &psva, (const int *)&piAdvance, &pItem[0].a, &piX);
|
||||
ok(hr == S_OK, "ScriptCPtoX Stub should return S_OK not %08x\n", (unsigned int) hr);
|
||||
|
||||
psla = (SCRIPT_LOGATTR *)&sla;
|
||||
hr = ScriptBreak(TestItem1, cChars, &pItem[0].a, psla);
|
||||
ok(hr == S_OK, "ScriptBreak Stub should return S_OK not %08x\n", (unsigned int) hr);
|
||||
|
||||
/* Clean up and go */
|
||||
ScriptFreeCache(&psc);
|
||||
ok( psc == NULL, "Expected psc to be NULL, got %p\n", psc);
|
||||
|
|
|
@ -321,8 +321,66 @@ HRESULT WINAPI ScriptStringOut(SCRIPT_STRING_ANALYSIS ssa,
|
|||
*
|
||||
*/
|
||||
HRESULT WINAPI ScriptStringFree(SCRIPT_STRING_ANALYSIS *pssa) {
|
||||
FIXME("(%p): stub\n",pssa);
|
||||
return S_OK;
|
||||
FIXME("(%p): stub\n",pssa);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* ScriptCPtoX (USP10.@)
|
||||
*
|
||||
*/
|
||||
HRESULT WINAPI ScriptCPtoX(int iCP,
|
||||
BOOL fTrailing,
|
||||
int cChars,
|
||||
int cGlyphs,
|
||||
const WORD *pwLogClust,
|
||||
const SCRIPT_VISATTR *psva,
|
||||
const int *piAdvance,
|
||||
const SCRIPT_ANALYSIS *psa,
|
||||
int *piX)
|
||||
{
|
||||
FIXME("(%d,%d,%d,%d,%p,%p,%p,%p,%p): stub\n",
|
||||
iCP, fTrailing, cChars, cGlyphs, pwLogClust, psva, piAdvance,
|
||||
psa, piX);
|
||||
|
||||
*piX = 1; /* Return something in range */
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* ScriptXtoCP (USP10.@)
|
||||
*
|
||||
*/
|
||||
HRESULT WINAPI ScriptXtoCP(int iX,
|
||||
int cChars,
|
||||
int cGlyphs,
|
||||
const WORD *pwLogClust,
|
||||
const SCRIPT_VISATTR *psva,
|
||||
const int *piAdvance,
|
||||
const SCRIPT_ANALYSIS *psa,
|
||||
int *piCP,
|
||||
int *piTrailing)
|
||||
{
|
||||
FIXME("(%d,%d,%d,%p,%p,%p,%p,%p,%p): stub\n",
|
||||
iX, cChars, cGlyphs, pwLogClust, psva, piAdvance,
|
||||
psa, piCP, piTrailing);
|
||||
|
||||
*piCP = 1; /* Return something in range */
|
||||
*piTrailing = 0;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* ScriptBreak (USP10.@)
|
||||
*
|
||||
*/
|
||||
HRESULT WINAPI ScriptBreak(const WCHAR *pwcChars, int cChars, const SCRIPT_ANALYSIS *psa,
|
||||
SCRIPT_LOGATTR *psla)
|
||||
{
|
||||
FIXME("(%p,%d,%p,%p): stub\n",
|
||||
pwcChars, cChars, psa, psla);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
@ stub LpkPresent
|
||||
@ stdcall ScriptApplyDigitSubstitution(ptr ptr ptr)
|
||||
@ stub ScriptApplyLogicalWidth
|
||||
@ stub ScriptBreak
|
||||
@ stub ScriptCPtoX
|
||||
@ stdcall ScriptBreak(ptr long ptr ptr)
|
||||
@ stdcall ScriptCPtoX(long long long long ptr ptr ptr ptr ptr)
|
||||
@ stub ScriptCacheGetHeight
|
||||
@ stdcall ScriptFreeCache(ptr)
|
||||
@ stdcall ScriptGetCMap(ptr ptr ptr long long ptr)
|
||||
|
@ -29,7 +29,7 @@
|
|||
@ stub ScriptString_pSize
|
||||
@ stub ScriptString_pcOutChars
|
||||
@ stdcall ScriptTextOut(ptr ptr long long long ptr ptr ptr long ptr long ptr ptr ptr)
|
||||
@ stub ScriptXtoCP
|
||||
@ stdcall ScriptXtoCP(long long long ptr ptr ptr ptr ptr ptr)
|
||||
@ stub UspAllocCache
|
||||
@ stub UspAllocTemp
|
||||
@ stub UspFreeMem
|
||||
|
|
Loading…
Reference in New Issue