Jeff Latimer : usp10: Add stub for ScriptStringOut.

Alexandre Julliard julliard at wine.codeweavers.com
Tue May 23 11:04:48 CDT 2006


Module: wine
Branch: refs/heads/master
Commit: 42b576e8693790f10b7d6f47884a8a2ba3f7c0da
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=42b576e8693790f10b7d6f47884a8a2ba3f7c0da

Author: Jeff Latimer <lats at yless4u.com.au>
Date:   Tue May 23 22:15:15 2006 +1000

usp10: Add stub for ScriptStringOut.

---

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

diff --git a/dlls/usp10/tests/usp10.c b/dlls/usp10/tests/usp10.c
index d38e625..48ded43 100644
--- a/dlls/usp10/tests/usp10.c
+++ b/dlls/usp10/tests/usp10.c
@@ -447,6 +447,41 @@ void test_ScriptTextOut(void)
     DestroyWindow(hwnd);
 }
 
+static void test_ScriptString(void)
+{
+    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 8fd1ac7..f24a7f0 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




More information about the wine-cvs mailing list