usp10: Add more stubs
Jeff L
lats at yless4u.com.au
Thu May 25 08:15:54 CDT 2006
Changelog:
Add stubs and basic tests for ScriptBreak ScriptCPtoX and ScriptXtoCP.
Jeff Latimer
-------------- next part --------------
---
dlls/usp10/tests/usp10.c | 35 +++++++++++++++++++++-----
dlls/usp10/usp10.c | 62 +++++++++++++++++++++++++++++++++++++++++++++-
dlls/usp10/usp10.spec | 6 ++--
3 files changed, 91 insertions(+), 12 deletions(-)
9e725541b7a522ca34c7ae1e9421a2f7f0db86ce
diff --git a/dlls/usp10/tests/usp10.c b/dlls/usp10/tests/usp10.c
index 48ded43..a80e5c9 100644
--- a/dlls/usp10/tests/usp10.c
+++ b/dlls/usp10/tests/usp10.c
@@ -465,13 +465,29 @@ static void test_ScriptString(void)
const BYTE pbInClass = 0;
SCRIPT_STRING_ANALYSIS pssa;
- int iX = 10;
- int iY = 100;
- UINT uOptions = 0;
- const RECT prc = {0, 50, 100, 100};
- int iMinSel = 0;
- int iMaxSel = 0;
- BOOL fDisabled = FALSE;
+ int iX = 10;
+ int iY = 100;
+ UINT uOptions = 0;
+ const RECT prc = {0, 50, 100, 100};
+ int iMinSel = 0;
+ int iMaxSel = 0;
+ BOOL fDisabled = FALSE;
+
+ int iCP = 1;
+ BOOL fTrailing = FALSE;
+ int cChars = 1;
+ int cGlyphs2 = 2;
+ const WORD pwLogClust;
+ const SCRIPT_VISATTR psva;
+ const int piAdvance;
+ const SCRIPT_ANALYSIS psa;
+ int piX;
+
+ const WCHAR *pwcChars;
+ int cChars3;
+ const SCRIPT_ANALYSIS *psa2;
+ SCRIPT_LOGATTR *psla;
+
hr = ScriptStringAnalyse( hdc, pString, cString, cGlyphs, iCharset, dwFlags,
iReqWidth, &psControl, &psState, piDx, &pTabdef,
pbInClass, &pssa);
@@ -480,6 +496,11 @@ static void test_ScriptString(void)
ok(hr == E_NOTIMPL, "ScriptStringOut Stub should return E_NOTIMPL not %08x\n", (unsigned int) hr);
hr = ScriptStringFree(&pssa);
ok(hr == S_OK, "ScriptStringFree Stub should return S_OK not %08x\n", (unsigned int) hr);
+ hr = ScriptCPtoX(iCP, fTrailing, cChars, cGlyphs2, &pwLogClust, &psva, &piAdvance, &psa, &piX);
+ ok(hr == S_OK, "ScriptCPtoX Stub should return S_OK not %08x\n", (unsigned int) hr);
+ hr = ScriptBreak(pwcChars, cChars3, &psa2, &psla);
+ ok(hr == S_OK, "ScriptBreak Stub should return S_OK not %08x\n", (unsigned int) hr);
+
}
START_TEST(usp10)
diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c
index f24a7f0..163b66f 100644
--- a/dlls/usp10/usp10.c
+++ b/dlls/usp10/usp10.c
@@ -321,8 +321,66 @@ HRESULT WINAPI ScriptStringOut(SCRIPT_ST
*
*/
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;
}
/***********************************************************************
diff --git a/dlls/usp10/usp10.spec b/dlls/usp10/usp10.spec
index 518a04e..22ee688 100644
--- a/dlls/usp10/usp10.spec
+++ b/dlls/usp10/usp10.spec
@@ -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
--
1.3.3
More information about the wine-patches
mailing list