usp10: Add stub for ScriptStringOut

Jeff L lats at yless4u.com.au
Tue May 23 07:15:15 CDT 2006


This is in preparation for adding actual functionality.  This is my 
first patch done with git so bear with me if there are problems with the 
format of the patch etc of the patch and let me kow how to fix.

Jeff

Changelog:
Adding stub for ScriptStringOut and some basic tests.
-------------- next part --------------
---

 dlls/usp10/tests/usp10.c |   36 ++++++++++++++++++++++++++++++++++++
 dlls/usp10/usp10.c       |   22 ++++++++++++++++++++++
 dlls/usp10/usp10.spec    |    2 +-
 3 files changed, 59 insertions(+), 1 deletions(-)

0fcddae8ed4183cac33928d3c203d29cb556eee9
diff --git a/dlls/usp10/tests/usp10.c b/dlls/usp10/tests/usp10.c
index bf90b0f..a864107 100644
--- a/dlls/usp10/tests/usp10.c
+++ b/dlls/usp10/tests/usp10.c
@@ -447,6 +447,41 @@ void test_ScriptTextOut(void)
     DestroyWindow(hwnd);
 }
 
+void test_ScriptString()
+{
+    HRESULT         hr;
+    HDC             hdc = 0;
+    WCHAR           teststr[6] = {'T', 'e', 's', 't', '1', '\0'};
+    void            *pString = (WCHAR *) &teststr;
+    int             cString = 5;
+    int             cGlyphs = cString * 2 + 16;
+    int             iCharset = -1;
+    DWORD           dwFlags = SSA_GLYPHS;
+    int             iReqWidth = 100;
+    SCRIPT_CONTROL  psControl;
+    SCRIPT_STATE    psState;
+    const int       piDx[5] = {10, 10, 10, 10, 10};
+    SCRIPT_TABDEF   pTabdef;
+    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;
+    hr = ScriptStringAnalyse( hdc, pString, cString, cGlyphs, iCharset, dwFlags,
+                              iReqWidth, &psControl, &psState, piDx, &pTabdef,
+                              pbInClass, &pssa);
+    ok(hr == E_INVALIDARG, "ScriptStringAnalyse Stub should return E_INVALIDARG not %08x\n", (unsigned int) hr);
+    hr = ScriptStringOut(pssa, iX, iY, uOptions, &prc, iMinSel, iMaxSel,fDisabled);
+    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);
+}
+
 START_TEST(usp10)
 {
     unsigned short  pwOutGlyphs[256];
@@ -455,4 +490,5 @@ START_TEST(usp10)
     test_ScriptGetCMap(pwOutGlyphs);
     test_ScriptGetFontProperties();
     test_ScriptTextOut();
+    test_ScriptString();
 }
diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c
index 4b54959..69cf023 100644
--- a/dlls/usp10/usp10.c
+++ b/dlls/usp10/usp10.c
@@ -295,6 +295,28 @@ HRESULT WINAPI ScriptStringAnalyse(HDC h
 }
 
 /***********************************************************************
+ *      ScriptStringOut (USP10.@)
+ *
+ */
+HRESULT WINAPI ScriptStringOut(SCRIPT_STRING_ANALYSIS ssa, 
+                               int iX, 
+                               int iY, 
+                               UINT uOptions, 
+                               const RECT *prc, 
+                               int iMinSel, 
+                               int iMaxSel, 
+                               BOOL fDisabled)
+{
+    FIXME("(%p,%d,%d,0x%1x,%p,%d,%d,%d): stub\n",
+         ssa, iX, iY, uOptions, prc, iMinSel, iMaxSel, fDisabled);
+    if  (!ssa) {
+        return E_INVALIDARG;
+    }
+
+    return E_NOTIMPL;
+}
+
+/***********************************************************************
  *      ScriptStringFree (USP10.@)
  *
  */
diff --git a/dlls/usp10/usp10.spec b/dlls/usp10/usp10.spec
index ea7a50d..518a04e 100644
--- a/dlls/usp10/usp10.spec
+++ b/dlls/usp10/usp10.spec
@@ -22,7 +22,7 @@
 @ stdcall ScriptStringFree(ptr)
 @ stub ScriptStringGetLogicalWidths
 @ stub ScriptStringGetOrder
-@ stub ScriptStringOut
+@ stdcall ScriptStringOut(ptr long long long ptr long long long)
 @ stub ScriptStringValidate
 @ stub ScriptStringXtoCP
 @ stub ScriptString_pLogAttr
-- 
1.3.3



More information about the wine-patches mailing list