winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
April
March
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
September 2008
----- 2025 -----
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
3 participants
1215 discussions
Start a n
N
ew thread
Jacek Caban : jscript: Added IActiveScript::SetScriptSite.
by Alexandre Julliard
03 Sep '08
03 Sep '08
Module: wine Branch: master Commit: 268a92bed244416b8b049ea41aee557d26539c82 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=268a92bed244416b8b049ea41…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Sep 1 01:17:14 2008 +0200 jscript: Added IActiveScript::SetScriptSite. --- dlls/jscript/jscript.c | 45 +++++++++++++++++++++++++++++++++++++++++++-- dlls/jscript/jscript.h | 1 + 2 files changed, 44 insertions(+), 2 deletions(-) diff --git a/dlls/jscript/jscript.c b/dlls/jscript/jscript.c index 8e3f752..d70db46 100644 --- a/dlls/jscript/jscript.c +++ b/dlls/jscript/jscript.c @@ -34,6 +34,9 @@ typedef struct { DWORD safeopt; script_ctx_t *ctx; + LONG thread_id; + + IActiveScriptSite *site; } JScript; #define ACTSCRIPT(x) ((IActiveScript*) &(x)->lpIActiveScriptVtbl) @@ -50,6 +53,15 @@ void script_release(script_ctx_t *ctx) heap_free(ctx); } +static void change_state(JScript *This, SCRIPTSTATE state) +{ + if(This->ctx->state == state) + return; + + This->ctx->state = state; + IActiveScriptSite_OnStateChange(This->site, state); +} + #define ACTSCRIPT_THIS(iface) DEFINE_THIS(JScript, IActiveScript, iface) static HRESULT WINAPI JScript_QueryInterface(IActiveScript *iface, REFIID riid, void **ppv) @@ -110,6 +122,8 @@ static ULONG WINAPI JScript_Release(IActiveScript *iface) if(!ref) { if(This->ctx) script_release(This->ctx); + if(This->site) + IActiveScriptSite_Release(This->site); heap_free(This); unlock_module(); } @@ -121,8 +135,35 @@ static HRESULT WINAPI JScript_SetScriptSite(IActiveScript *iface, IActiveScriptSite *pass) { JScript *This = ACTSCRIPT_THIS(iface); - FIXME("(%p)->(%p)\n", This, pass); - return E_NOTIMPL; + LCID lcid; + HRESULT hres; + + TRACE("(%p)->(%p)\n", This, pass); + + if(!pass) + return E_POINTER; + + if(This->site) + return E_UNEXPECTED; + + if(!This->ctx) { + hres = IActiveScriptParse_InitNew(ASPARSE(This)); + if(FAILED(hres)) + return hres; + } + + if(InterlockedCompareExchange(&This->thread_id, GetCurrentThreadId(), 0)) + return E_UNEXPECTED; + + This->site = pass; + IActiveScriptSite_AddRef(This->site); + + hres = IActiveScriptSite_GetLCID(This->site, &lcid); + if(hres == S_OK) + This->ctx->lcid = lcid; + + change_state(This, SCRIPTSTATE_INITIALIZED); + return S_OK; } static HRESULT WINAPI JScript_GetScriptSite(IActiveScript *iface, REFIID riid, diff --git a/dlls/jscript/jscript.h b/dlls/jscript/jscript.h index 98948bc..455dee8 100644 --- a/dlls/jscript/jscript.h +++ b/dlls/jscript/jscript.h @@ -33,6 +33,7 @@ struct _script_ctx_t { LONG ref; SCRIPTSTATE state; + LCID lcid; }; HRESULT WINAPI JScriptFactory_CreateInstance(IClassFactory*,IUnknown*,REFIID,void**);
1
0
0
0
Jacek Caban : jscript: Added IActiveScriptParse::InitNew implementation.
by Alexandre Julliard
03 Sep '08
03 Sep '08
Module: wine Branch: master Commit: d19cdef8f85c8aaebdc4a88225b63758c54f644c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d19cdef8f85c8aaebdc4a8822…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Sep 1 01:23:16 2008 +0200 jscript: Added IActiveScriptParse::InitNew implementation. --- dlls/jscript/jscript.c | 37 +++++++++++++++++++++++++++++++++---- dlls/jscript/jscript.h | 9 +++++++++ dlls/jscript/jscript_main.c | 1 - dlls/jscript/tests/jscript.c | 6 ++++++ 4 files changed, 48 insertions(+), 5 deletions(-) diff --git a/dlls/jscript/jscript.c b/dlls/jscript/jscript.c index f058e26..8e3f752 100644 --- a/dlls/jscript/jscript.c +++ b/dlls/jscript/jscript.c @@ -17,7 +17,6 @@ */ #include "jscript.h" -#include "activscp.h" #include "objsafe.h" #include "wine/debug.h" @@ -34,6 +33,7 @@ typedef struct { LONG ref; DWORD safeopt; + script_ctx_t *ctx; } JScript; #define ACTSCRIPT(x) ((IActiveScript*) &(x)->lpIActiveScriptVtbl) @@ -42,6 +42,14 @@ typedef struct { #define ACTSCPPROP(x) ((IActiveScriptProperty*) &(x)->lpIActiveScriptPropertyVtbl) #define OBJSAFETY(x) ((IObjectSafety*) &(x)->lpIObjectSafetyVtbl) +void script_release(script_ctx_t *ctx) +{ + if(--ctx->ref) + return; + + heap_free(ctx); +} + #define ACTSCRIPT_THIS(iface) DEFINE_THIS(JScript, IActiveScript, iface) static HRESULT WINAPI JScript_QueryInterface(IActiveScript *iface, REFIID riid, void **ppv) @@ -100,6 +108,8 @@ static ULONG WINAPI JScript_Release(IActiveScript *iface) TRACE("(%p) ref=%d\n", iface, ref); if(!ref) { + if(This->ctx) + script_release(This->ctx); heap_free(This); unlock_module(); } @@ -251,8 +261,27 @@ static ULONG WINAPI JScriptParse_Release(IActiveScriptParse *iface) static HRESULT WINAPI JScriptParse_InitNew(IActiveScriptParse *iface) { JScript *This = ASPARSE_THIS(iface); - FIXME("(%p)\n", This); - return E_NOTIMPL; + script_ctx_t *ctx; + + TRACE("(%p)\n", This); + + if(This->ctx) + return E_UNEXPECTED; + + ctx = heap_alloc_zero(sizeof(script_ctx_t)); + if(!ctx) + return E_OUTOFMEMORY; + + ctx->ref = 1; + ctx->state = SCRIPTSTATE_UNINITIALIZED; + + ctx = InterlockedCompareExchangePointer((void**)&This->ctx, ctx, NULL); + if(ctx) { + script_release(ctx); + return E_UNEXPECTED; + } + + return S_OK; } static HRESULT WINAPI JScriptParse_AddScriptlet(IActiveScriptParse *iface, @@ -449,7 +478,7 @@ HRESULT WINAPI JScriptFactory_CreateInstance(IClassFactory *iface, IUnknown *pUn lock_module(); - ret = heap_alloc(sizeof(*ret)); + ret = heap_alloc_zero(sizeof(*ret)); ret->lpIActiveScriptVtbl = &JScriptVtbl; ret->lpIActiveScriptParseVtbl = &JScriptParseVtbl; diff --git a/dlls/jscript/jscript.h b/dlls/jscript/jscript.h index afdd0c7..98948bc 100644 --- a/dlls/jscript/jscript.h +++ b/dlls/jscript/jscript.h @@ -25,6 +25,15 @@ #include "winbase.h" #include "winuser.h" #include "ole2.h" +#include "activscp.h" + +typedef struct _script_ctx_t script_ctx_t; + +struct _script_ctx_t { + LONG ref; + + SCRIPTSTATE state; +}; HRESULT WINAPI JScriptFactory_CreateInstance(IClassFactory*,IUnknown*,REFIID,void**); diff --git a/dlls/jscript/jscript_main.c b/dlls/jscript/jscript_main.c index 7cb46bf..045c96e 100644 --- a/dlls/jscript/jscript_main.c +++ b/dlls/jscript/jscript_main.c @@ -22,7 +22,6 @@ #include "winreg.h" #include "advpub.h" -#include "activscp.h" #include "activaut.h" #include "objsafe.h" diff --git a/dlls/jscript/tests/jscript.c b/dlls/jscript/tests/jscript.c index 01a90bf..f7dd162 100644 --- a/dlls/jscript/tests/jscript.c +++ b/dlls/jscript/tests/jscript.c @@ -110,6 +110,12 @@ static void test_jscript(void) test_safety(unk); + hres = IActiveScriptParse_InitNew(parse); + ok(hres == S_OK, "InitNew failed: %08x\n", hres); + + hres = IActiveScriptParse_InitNew(parse); + ok(hres == E_UNEXPECTED, "InitNew failed: %08x, expected E_UNEXPECTED\n", hres); + IActiveScriptParse_Release(parse); IActiveScript_Release(script); IUnknown_Release(unk);
1
0
0
0
Dan Hipschman : oleaut32: Add a widl-generated proxy file for ocidl.idl.
by Alexandre Julliard
03 Sep '08
03 Sep '08
Module: wine Branch: master Commit: 9e6784c2a7dfa6d409069f513c870f253a31ab6e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9e6784c2a7dfa6d409069f513…
Author: Dan Hipschman <dsh(a)linux.ucla.edu> Date: Tue Sep 2 18:02:04 2008 +0200 oleaut32: Add a widl-generated proxy file for ocidl.idl. --- .gitignore | 2 + dlls/oleaut32/Makefile.in | 3 +- dlls/oleaut32/oleaut.c | 3 +- dlls/oleaut32/oleaut32_ocidl.idl | 20 ++++ dlls/oleaut32/usrmarshal.c | 184 ++++++++++++++++++++++++++++++++++++++ 5 files changed, 209 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 6e29909..1b29183 100644 --- a/.gitignore +++ b/.gitignore @@ -81,6 +81,8 @@ dlls/ole32/ole32_unknwn.h dlls/ole32/ole32_unknwn_p.c dlls/oleaut32/oleaut32_oaidl.h dlls/oleaut32/oleaut32_oaidl_p.c +dlls/oleaut32/oleaut32_ocidl.h +dlls/oleaut32/oleaut32_ocidl_p.c dlls/oleaut32/tests/test_tlb.tlb dlls/oleaut32/tests/tmarshal.h dlls/oleaut32/tests/tmarshal.tlb diff --git a/dlls/oleaut32/Makefile.in b/dlls/oleaut32/Makefile.in index c6a7dae..93b19d1 100644 --- a/dlls/oleaut32/Makefile.in +++ b/dlls/oleaut32/Makefile.in @@ -39,7 +39,8 @@ SPEC_SRCS16 = \ RC_SRCS = oleaut32.rc IDL_P_SRCS = \ - oleaut32_oaidl.idl + oleaut32_oaidl.idl \ + oleaut32_ocidl.idl @MAKE_DLL_RULES@ diff --git a/dlls/oleaut32/oleaut.c b/dlls/oleaut32/oleaut.c index 9884416..aa97b31 100644 --- a/dlls/oleaut32/oleaut.c +++ b/dlls/oleaut32/oleaut.c @@ -807,8 +807,7 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv) return S_OK; /*FALLTHROUGH*/ } - FIXME("\n\tCLSID:\t%s,\n\tIID:\t%s\n",debugstr_guid(rclsid),debugstr_guid(iid)); - return CLASS_E_CLASSNOTAVAILABLE; + return OLEAUTPS_DllGetClassObject(rclsid, iid, ppv); } /*********************************************************************** diff --git a/dlls/oleaut32/oleaut32_ocidl.idl b/dlls/oleaut32/oleaut32_ocidl.idl new file mode 100644 index 0000000..379df5b --- /dev/null +++ b/dlls/oleaut32/oleaut32_ocidl.idl @@ -0,0 +1,20 @@ +/* + * Copyright 2007 Google (Dan Hipschman) + * + * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +cpp_quote("#include <winuser.h>") +#include "ocidl.idl" diff --git a/dlls/oleaut32/usrmarshal.c b/dlls/oleaut32/usrmarshal.c index a9a738c..ea5f49e 100644 --- a/dlls/oleaut32/usrmarshal.c +++ b/dlls/oleaut32/usrmarshal.c @@ -36,6 +36,7 @@ #include "oleauto.h" #include "rpcproxy.h" #include "typelib.h" +#include "ocidl.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(ole); @@ -50,9 +51,11 @@ static CStdPSFactoryBuffer PSFactoryBuffer; CSTDSTUBBUFFERRELEASE(&PSFactoryBuffer) extern const ExtendedProxyFileInfo oleaut32_oaidl_ProxyFileInfo; +extern const ExtendedProxyFileInfo oleaut32_ocidl_ProxyFileInfo; static const ProxyFileInfo *OLEAUT32_ProxyFileList[] = { &oleaut32_oaidl_ProxyFileInfo, + &oleaut32_ocidl_ProxyFileInfo, NULL }; @@ -1128,6 +1131,32 @@ void WINAPI LPSAFEARRAY_UserFree(ULONG *pFlags, LPSAFEARRAY *ppsa) SafeArrayDestroy(*ppsa); } + +ULONG WINAPI HFONT_UserSize(ULONG *pFlags, ULONG Start, HFONT *phfont) +{ + FIXME(":stub\n"); + return 0; +} + +unsigned char * WINAPI HFONT_UserMarshal(ULONG *pFlags, unsigned char *Buffer, HFONT *phfont) +{ + FIXME(":stub\n"); + return NULL; +} + +unsigned char * WINAPI HFONT_UserUnmarshal(ULONG *pFlags, unsigned char *Buffer, HFONT *phfont) +{ + FIXME(":stub\n"); + return NULL; +} + +void WINAPI HFONT_UserFree(ULONG *pFlags, HFONT *phfont) +{ + FIXME(":stub\n"); + return; +} + + /* IDispatch */ /* exactly how Invoke is marshalled is not very clear to me yet, * but the way I've done it seems to work for me */ @@ -2029,3 +2058,158 @@ HRESULT __RPC_STUB IPropertyBag_Read_Stub( FIXME("not implemented\n"); return E_FAIL; } + +/* call_as/local stubs for ocidl.idl */ + +HRESULT CALLBACK IClassFactory2_CreateInstanceLic_Proxy( + IClassFactory2* This, + IUnknown *pUnkOuter, + IUnknown *pUnkReserved, + REFIID riid, + BSTR bstrKey, + PVOID *ppvObj) +{ + FIXME("not implemented\n"); + return E_NOTIMPL; +} + +HRESULT __RPC_STUB IClassFactory2_CreateInstanceLic_Stub( + IClassFactory2* This, + REFIID riid, + BSTR bstrKey, + IUnknown **ppvObj) +{ + FIXME("not implemented\n"); + return E_NOTIMPL; +} + +HRESULT CALLBACK IEnumConnections_Next_Proxy( + IEnumConnections* This, + ULONG cConnections, + LPCONNECTDATA rgcd, + ULONG *pcFetched) +{ + FIXME("not implemented\n"); + return E_NOTIMPL; +} + +HRESULT __RPC_STUB IEnumConnections_Next_Stub( + IEnumConnections* This, + ULONG cConnections, + LPCONNECTDATA rgcd, + ULONG *pcFetched) +{ + FIXME("not implemented\n"); + return E_NOTIMPL; +} + +HRESULT CALLBACK IEnumConnectionPoints_Next_Proxy( + IEnumConnectionPoints* This, + ULONG cConnections, + LPCONNECTIONPOINT *ppCP, + ULONG *pcFetched) +{ + FIXME("not implemented\n"); + return E_NOTIMPL; +} + +HRESULT __RPC_STUB IEnumConnectionPoints_Next_Stub( + IEnumConnectionPoints* This, + ULONG cConnections, + LPCONNECTIONPOINT *ppCP, + ULONG *pcFetched) +{ + FIXME("not implemented\n"); + return E_NOTIMPL; +} + +HRESULT CALLBACK IPersistMemory_Load_Proxy( + IPersistMemory* This, + LPVOID pMem, + ULONG cbSize) +{ + FIXME("not implemented\n"); + return E_NOTIMPL; +} + +HRESULT __RPC_STUB IPersistMemory_Load_Stub( + IPersistMemory* This, + BYTE *pMem, + ULONG cbSize) +{ + FIXME("not implemented\n"); + return E_NOTIMPL; +} + +HRESULT CALLBACK IPersistMemory_Save_Proxy( + IPersistMemory* This, + LPVOID pMem, + BOOL fClearDirty, + ULONG cbSize) +{ + FIXME("not implemented\n"); + return E_NOTIMPL; +} + +HRESULT __RPC_STUB IPersistMemory_Save_Stub( + IPersistMemory* This, + BYTE *pMem, + BOOL fClearDirty, + ULONG cbSize) +{ + FIXME("not implemented\n"); + return E_NOTIMPL; +} + +void CALLBACK IAdviseSinkEx_OnViewStatusChange_Proxy( + IAdviseSinkEx* This, + DWORD dwViewStatus) +{ + FIXME("not implemented\n"); +} + +HRESULT __RPC_STUB IAdviseSinkEx_OnViewStatusChange_Stub( + IAdviseSinkEx* This, + DWORD dwViewStatus) +{ + FIXME("not implemented\n"); + return E_NOTIMPL; +} + +HRESULT CALLBACK IEnumOleUndoUnits_Next_Proxy( + IEnumOleUndoUnits* This, + ULONG cElt, + IOleUndoUnit **rgElt, + ULONG *pcEltFetched) +{ + FIXME("not implemented\n"); + return E_NOTIMPL; +} + +HRESULT __RPC_STUB IEnumOleUndoUnits_Next_Stub( + IEnumOleUndoUnits* This, + ULONG cElt, + IOleUndoUnit **rgElt, + ULONG *pcEltFetched) +{ + FIXME("not implemented\n"); + return E_NOTIMPL; +} + +HRESULT CALLBACK IQuickActivate_QuickActivate_Proxy( + IQuickActivate* This, + QACONTAINER *pQaContainer, + QACONTROL *pQaControl) +{ + FIXME("not implemented\n"); + return E_NOTIMPL; +} + +HRESULT __RPC_STUB IQuickActivate_QuickActivate_Stub( + IQuickActivate* This, + QACONTAINER *pQaContainer, + QACONTROL *pQaControl) +{ + FIXME("not implemented\n"); + return E_NOTIMPL; +}
1
0
0
0
Dan Hipschman : widl: Output NULL for inherited methods in the vtbl.
by Alexandre Julliard
03 Sep '08
03 Sep '08
Module: wine Branch: master Commit: a41de877daa3936590d6db5f1456cfd4e7b55cec URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a41de877daa3936590d6db5f1…
Author: Dan Hipschman <dsh(a)linux.ucla.edu> Date: Tue Sep 2 18:01:53 2008 +0200 widl: Output NULL for inherited methods in the vtbl. --- tools/widl/proxy.c | 18 ++++++++++-------- 1 files changed, 10 insertions(+), 8 deletions(-) diff --git a/tools/widl/proxy.c b/tools/widl/proxy.c index 8f1618e..a7d267a 100644 --- a/tools/widl/proxy.c +++ b/tools/widl/proxy.c @@ -553,36 +553,38 @@ static void gen_stub(type_t *iface, const func_t *cur, const char *cas, print_proxy("\n"); } -static int write_proxy_methods(type_t *iface) +static int write_proxy_methods(type_t *iface, int skip) { const func_t *cur; int i = 0; - if (iface->ref) i = write_proxy_methods(iface->ref); + if (iface->ref) i = write_proxy_methods(iface->ref, iface->ref->ref != NULL); if (iface->funcs) LIST_FOR_EACH_ENTRY( cur, iface->funcs, const func_t, entry ) { var_t *def = cur->def; if (!is_callas(def->attrs)) { if (i) fprintf(proxy, ",\n"); - print_proxy( "%s_%s_Proxy", iface->name, get_name(def)); + if (skip) print_proxy( "0 /* %s_%s_Proxy */", iface->name, get_name(def)); + else print_proxy( "%s_%s_Proxy", iface->name, get_name(def)); i++; } } return i; } -static int write_stub_methods(type_t *iface) +static int write_stub_methods(type_t *iface, int skip) { const func_t *cur; int i = 0; - if (iface->ref) i = write_stub_methods(iface->ref); + if (iface->ref) i = write_stub_methods(iface->ref, TRUE); else return i; /* skip IUnknown */ if (iface->funcs) LIST_FOR_EACH_ENTRY( cur, iface->funcs, const func_t, entry ) { var_t *def = cur->def; if (!is_local(def->attrs)) { if (i) fprintf(proxy,",\n"); - print_proxy( "%s_%s_Stub", iface->name, get_name(def)); + if (skip) print_proxy("STUB_FORWARDING_FUNCTION"); + else print_proxy( "%s_%s_Stub", iface->name, get_name(def)); i++; } } @@ -637,7 +639,7 @@ static void write_proxy(type_t *iface, unsigned int *proc_offset) print_proxy( "},\n"); print_proxy( "{\n"); indent++; - write_proxy_methods(iface); + write_proxy_methods(iface, FALSE); fprintf(proxy, "\n"); indent--; print_proxy( "}\n"); @@ -649,7 +651,7 @@ static void write_proxy(type_t *iface, unsigned int *proc_offset) print_proxy( "static const PRPC_STUB_FUNCTION %s_table[] =\n", iface->name); print_proxy( "{\n"); indent++; - stubs = write_stub_methods(iface); + stubs = write_stub_methods(iface, FALSE); fprintf(proxy, "\n"); indent--; fprintf(proxy, "};\n");
1
0
0
0
Dan Hipschman : ole32: Add a widl-generated proxy file for oleidl.idl.
by Alexandre Julliard
03 Sep '08
03 Sep '08
Module: wine Branch: master Commit: 19cccae29d736e1328417ccc7d9d8f58b5eae293 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=19cccae29d736e1328417ccc7…
Author: Dan Hipschman <dsh(a)linux.ucla.edu> Date: Tue Sep 2 16:03:02 2008 +0200 ole32: Add a widl-generated proxy file for oleidl.idl. --- .gitignore | 2 + dlls/ole32/Makefile.in | 1 + dlls/ole32/ole32_oleidl.idl | 20 +++++ dlls/ole32/oleproxy.c | 2 + dlls/ole32/usrmarshal.c | 179 +++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 204 insertions(+), 0 deletions(-) diff --git a/.gitignore b/.gitignore index 638b74d..6e29909 100644 --- a/.gitignore +++ b/.gitignore @@ -75,6 +75,8 @@ dlls/ole32/irot.h dlls/ole32/irot_c.c dlls/ole32/ole32_objidl.h dlls/ole32/ole32_objidl_p.c +dlls/ole32/ole32_oleidl.h +dlls/ole32/ole32_oleidl_p.c dlls/ole32/ole32_unknwn.h dlls/ole32/ole32_unknwn_p.c dlls/oleaut32/oleaut32_oaidl.h diff --git a/dlls/ole32/Makefile.in b/dlls/ole32/Makefile.in index d3dc8bc..9d7040e 100644 --- a/dlls/ole32/Makefile.in +++ b/dlls/ole32/Makefile.in @@ -70,6 +70,7 @@ IDL_C_SRCS = \ IDL_P_SRCS = \ dcom.idl \ ole32_objidl.idl \ + ole32_oleidl.idl \ ole32_unknwn.idl @MAKE_DLL_RULES@ diff --git a/dlls/ole32/ole32_oleidl.idl b/dlls/ole32/ole32_oleidl.idl new file mode 100644 index 0000000..b9315b3 --- /dev/null +++ b/dlls/ole32/ole32_oleidl.idl @@ -0,0 +1,20 @@ +/* + * Copyright 2007 Google (Dan Hipschman) + * + * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +cpp_quote("#include <winuser.h>") +#include "oleidl.idl" diff --git a/dlls/ole32/oleproxy.c b/dlls/ole32/oleproxy.c index c7f0c2d..64f4441 100644 --- a/dlls/ole32/oleproxy.c +++ b/dlls/ole32/oleproxy.c @@ -51,11 +51,13 @@ CSTDSTUBBUFFERRELEASE(&PSFactoryBuffer) extern const ExtendedProxyFileInfo dcom_ProxyFileInfo; extern const ExtendedProxyFileInfo ole32_objidl_ProxyFileInfo; +extern const ExtendedProxyFileInfo ole32_oleidl_ProxyFileInfo; extern const ExtendedProxyFileInfo ole32_unknwn_ProxyFileInfo; static const ProxyFileInfo *OLE32_ProxyFileList[] = { &dcom_ProxyFileInfo, &ole32_objidl_ProxyFileInfo, + &ole32_oleidl_ProxyFileInfo, &ole32_unknwn_ProxyFileInfo, NULL }; diff --git a/dlls/ole32/usrmarshal.c b/dlls/ole32/usrmarshal.c index ed6ec47..b8487c3 100644 --- a/dlls/ole32/usrmarshal.c +++ b/dlls/ole32/usrmarshal.c @@ -2577,3 +2577,182 @@ HRESULT __RPC_STUB IDataObject_SetData_Stub( FIXME(":stub\n"); return E_NOTIMPL; } + +/* call_as/local stubs for oleidl.idl */ + +HRESULT CALLBACK IOleInPlaceActiveObject_TranslateAccelerator_Proxy( + IOleInPlaceActiveObject* This, + LPMSG lpmsg) +{ + FIXME(":stub\n"); + return E_NOTIMPL; +} + +HRESULT __RPC_STUB IOleInPlaceActiveObject_TranslateAccelerator_Stub( + IOleInPlaceActiveObject* This) +{ + FIXME(":stub\n"); + return E_NOTIMPL; +} + +HRESULT CALLBACK IOleInPlaceActiveObject_ResizeBorder_Proxy( + IOleInPlaceActiveObject* This, + LPCRECT prcBorder, + IOleInPlaceUIWindow *pUIWindow, + BOOL fFrameWindow) +{ + FIXME(":stub\n"); + return E_NOTIMPL; +} + +HRESULT __RPC_STUB IOleInPlaceActiveObject_ResizeBorder_Stub( + IOleInPlaceActiveObject* This, + LPCRECT prcBorder, + REFIID riid, + IOleInPlaceUIWindow *pUIWindow, + BOOL fFrameWindow) +{ + FIXME(":stub\n"); + return E_NOTIMPL; +} + +HRESULT CALLBACK IOleCache2_UpdateCache_Proxy( + IOleCache2* This, + LPDATAOBJECT pDataObject, + DWORD grfUpdf, + LPVOID pReserved) +{ + FIXME(":stub\n"); + return E_NOTIMPL; +} + +HRESULT __RPC_STUB IOleCache2_UpdateCache_Stub( + IOleCache2* This, + LPDATAOBJECT pDataObject, + DWORD grfUpdf, + LONG_PTR pReserved) +{ + FIXME(":stub\n"); + return E_NOTIMPL; +} + +HRESULT CALLBACK IEnumOLEVERB_Next_Proxy( + IEnumOLEVERB* This, + ULONG celt, + LPOLEVERB rgelt, + ULONG *pceltFetched) +{ + FIXME(":stub\n"); + return E_NOTIMPL; +} + +HRESULT __RPC_STUB IEnumOLEVERB_Next_Stub( + IEnumOLEVERB* This, + ULONG celt, + LPOLEVERB rgelt, + ULONG *pceltFetched) +{ + FIXME(":stub\n"); + return E_NOTIMPL; +} + +HRESULT CALLBACK IViewObject_Draw_Proxy( + IViewObject* This, + DWORD dwDrawAspect, + LONG lindex, + void *pvAspect, + DVTARGETDEVICE *ptd, + HDC hdcTargetDev, + HDC hdcDraw, + LPCRECTL lprcBounds, + LPCRECTL lprcWBounds, + BOOL (STDMETHODCALLTYPE *pfnContinue)(ULONG_PTR dwContinue), + ULONG_PTR dwContinue) +{ + FIXME(":stub\n"); + return E_NOTIMPL; +} + +HRESULT __RPC_STUB IViewObject_Draw_Stub( + IViewObject* This, + DWORD dwDrawAspect, + LONG lindex, + ULONG_PTR pvAspect, + DVTARGETDEVICE *ptd, + ULONG_PTR hdcTargetDev, + ULONG_PTR hdcDraw, + LPCRECTL lprcBounds, + LPCRECTL lprcWBounds, + IContinue *pContinue) +{ + FIXME(":stub\n"); + return E_NOTIMPL; +} + +HRESULT CALLBACK IViewObject_GetColorSet_Proxy( + IViewObject* This, + DWORD dwDrawAspect, + LONG lindex, + void *pvAspect, + DVTARGETDEVICE *ptd, + HDC hicTargetDev, + LOGPALETTE **ppColorSet) +{ + FIXME(":stub\n"); + return E_NOTIMPL; +} + +HRESULT __RPC_STUB IViewObject_GetColorSet_Stub( + IViewObject* This, + DWORD dwDrawAspect, + LONG lindex, + ULONG_PTR pvAspect, + DVTARGETDEVICE *ptd, + ULONG_PTR hicTargetDev, + LOGPALETTE **ppColorSet) +{ + FIXME(":stub\n"); + return E_NOTIMPL; +} + +HRESULT CALLBACK IViewObject_Freeze_Proxy( + IViewObject* This, + DWORD dwDrawAspect, + LONG lindex, + void *pvAspect, + DWORD *pdwFreeze) +{ + FIXME(":stub\n"); + return E_NOTIMPL; +} + +HRESULT __RPC_STUB IViewObject_Freeze_Stub( + IViewObject* This, + DWORD dwDrawAspect, + LONG lindex, + ULONG_PTR pvAspect, + DWORD *pdwFreeze) +{ + FIXME(":stub\n"); + return E_NOTIMPL; +} + +HRESULT CALLBACK IViewObject_GetAdvise_Proxy( + IViewObject* This, + DWORD *pAspects, + DWORD *pAdvf, + IAdviseSink **ppAdvSink) +{ + FIXME(":stub\n"); + return E_NOTIMPL; +} + +HRESULT __RPC_STUB IViewObject_GetAdvise_Stub( + IViewObject* This, + DWORD *pAspects, + DWORD *pAdvf, + IAdviseSink **ppAdvSink) +{ + FIXME(":stub\n"); + return E_NOTIMPL; +}
1
0
0
0
Dan Hipschman : ole32: Add a widl-generated proxy file for objidl.idl.
by Alexandre Julliard
03 Sep '08
03 Sep '08
Module: wine Branch: master Commit: 44800b6ad4570b0f0b47c696d7e129523b6ce468 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=44800b6ad4570b0f0b47c696d…
Author: Dan Hipschman <dsh(a)linux.ucla.edu> Date: Tue Sep 2 16:02:29 2008 +0200 ole32: Add a widl-generated proxy file for objidl.idl. --- .gitignore | 2 + dlls/ole32/Makefile.in | 1 + dlls/ole32/ole32_objidl.idl | 25 ++ dlls/ole32/oleproxy.c | 2 + dlls/ole32/tests/moniker.c | 16 -- dlls/ole32/usrmarshal.c | 576 +++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 606 insertions(+), 16 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=44800b6ad4570b0f0b47c…
1
0
0
0
Dan Hipschman : ole32: Add widl-generated proxies for unknwn.idl and dcom. idl.
by Alexandre Julliard
03 Sep '08
03 Sep '08
Module: wine Branch: master Commit: 4afc326638201375438ed56b714453bc73421824 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4afc326638201375438ed56b7…
Author: Dan Hipschman <dsh(a)linux.ucla.edu> Date: Tue Sep 2 16:00:33 2008 +0200 ole32: Add widl-generated proxies for unknwn.idl and dcom.idl. --- .gitignore | 3 + dlls/ole32/Makefile.in | 7 +- dlls/ole32/ole32_unknwn.idl | 25 ++ dlls/ole32/oleproxy.c | 954 +------------------------------------------ dlls/ole32/usrmarshal.c | 44 ++ 5 files changed, 87 insertions(+), 946 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=4afc326638201375438ed…
1
0
0
0
Stefan Dösinger : ddraw: Add some overlay tests.
by Alexandre Julliard
02 Sep '08
02 Sep '08
Module: wine Branch: master Commit: 09d0a3587254a5e0afb66232176e59b5740ed9bb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=09d0a3587254a5e0afb662321…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Thu Aug 28 09:38:32 2008 -0500 ddraw: Add some overlay tests. --- dlls/ddraw/tests/Makefile.in | 1 + dlls/ddraw/tests/overlay.c | 219 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 220 insertions(+), 0 deletions(-) diff --git a/dlls/ddraw/tests/Makefile.in b/dlls/ddraw/tests/Makefile.in index a0930a7..74e20d7 100644 --- a/dlls/ddraw/tests/Makefile.in +++ b/dlls/ddraw/tests/Makefile.in @@ -9,6 +9,7 @@ CTESTS = \ d3d.c \ ddrawmodes.c \ dsurface.c \ + overlay.c \ refcount.c \ visual.c diff --git a/dlls/ddraw/tests/overlay.c b/dlls/ddraw/tests/overlay.c new file mode 100644 index 0000000..8d38f98 --- /dev/null +++ b/dlls/ddraw/tests/overlay.c @@ -0,0 +1,219 @@ +/* + * Unit tests for DirectDraw overlay functions + * + * Copyright (C) 2008 Stefan D�singer 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ +#define COBJMACROS + +#include <assert.h> +#include "wine/test.h" +#include "ddraw.h" +#include "unknwn.h" + +static IDirectDraw7 *ddraw = NULL; +static IDirectDrawSurface7 *primary = NULL; + +static IDirectDrawSurface7 *create_overlay(DWORD width, DWORD height, DWORD format) { + DDSURFACEDESC2 ddsd; + HRESULT hr; + IDirectDrawSurface7 *ret; + + memset(&ddsd, 0, sizeof(ddsd)); + ddsd.dwSize = sizeof(ddsd); + ddsd.dwFlags = DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH | DDSD_PIXELFORMAT; + ddsd.dwWidth = width; + ddsd.dwHeight = height; + ddsd.ddsCaps.dwCaps = DDSCAPS_OVERLAY; + ddsd.ddpfPixelFormat.dwSize = sizeof(ddsd.ddpfPixelFormat); + ddsd.ddpfPixelFormat.dwFlags = DDPF_FOURCC; + ddsd.ddpfPixelFormat.dwFourCC = format; + hr = IDirectDraw7_CreateSurface(ddraw, &ddsd, &ret, NULL); + if(FAILED(hr)) return NULL; + else return ret; +} + +static BOOL CreateDirectDraw(void) +{ + HRESULT hr; + DDSURFACEDESC2 ddsd; + IDirectDrawSurface7 *overlay = NULL; + + hr = DirectDrawCreateEx(NULL, (void**)&ddraw, &IID_IDirectDraw7, NULL); + ok(hr == DD_OK || hr == DDERR_NODIRECTDRAWSUPPORT, "DirectDrawCreateEx returned: %x\n", hr); + if (!ddraw) { + trace("DirectDrawCreateEx() failed with an error %x\n", hr); + return FALSE; + } + + hr = IDirectDraw_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); + ok(hr == DD_OK, "SetCooperativeLevel returned: %x\n", hr ); + + memset(&ddsd, 0, sizeof(ddsd)); + ddsd.dwSize = sizeof(ddsd); + ddsd.dwFlags = DDSD_CAPS; + ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; + hr = IDirectDraw7_CreateSurface(ddraw, &ddsd, &primary, NULL); + if (!SUCCEEDED(hr)) { + IDirectDraw7_Release(ddraw); + trace("IDirectDraw7_CreateSurface() failed with an error %x\n", hr); + return FALSE; + } + + overlay = create_overlay(64, 64, MAKEFOURCC('U','Y','V','Y')); + if (!overlay) { + IDirectDrawSurface7_Release(primary); + IDirectDraw7_Release(ddraw); + skip("Failed to create an overlay - assuming not supported\n"); + return FALSE; + } + IDirectDraw7_Release(overlay); + + return TRUE; +} + +static void rectangle_settings(void) { + IDirectDrawSurface7 *overlay = create_overlay(64, 64, MAKEFOURCC('U','Y','V','Y')); + HRESULT hr; + RECT rect = {0, 0, 64, 64}; + LONG posx, posy; + + /* The dx sdk sort of implies that rect must be set when DDOVER_SHOW is used. Show that this is wrong */ + hr = IDirectDrawSurface7_UpdateOverlay(overlay, NULL, primary, &rect, DDOVER_SHOW, NULL); + ok(hr == DD_OK, "IDirectDrawSurface7_UpdateOverlay failed with hr=0x%08x\n", hr); + hr = IDirectDrawSurface7_UpdateOverlay(overlay, NULL, primary, NULL, DDOVER_HIDE, NULL); + ok(hr == DD_OK, "IDirectDrawSurface7_UpdateOverlay failed with hr=0x%08x\n", hr); + hr = IDirectDrawSurface7_UpdateOverlay(overlay, NULL, primary, NULL, DDOVER_SHOW, NULL); + ok(hr == DD_OK, "IDirectDrawSurface7_UpdateOverlay failed with hr=0x%08x\n", hr); + + /* Show that the overlay position is the (top, left) coordinate of the dest rectangle */ + rect.top += 16; + rect.left += 32; + rect.bottom += 16; + rect.right += 32; + hr = IDirectDrawSurface7_UpdateOverlay(overlay, NULL, primary, &rect, DDOVER_SHOW, NULL); + ok(hr == DD_OK, "IDirectDrawSurface7_UpdateOverlay failed with hr=0x%08x\n", hr); + posx = -1; posy = -1; + hr = IDirectDrawSurface7_GetOverlayPosition(overlay, &posx, &posy); + ok(hr == DD_OK, "IDirectDrawSurface7_GetOverlayPosition failed with hr=0x%08x\n", hr); + ok(posx == rect.left && posy == rect.top, "Overlay position is (%d, %d), expected (%d, %d)\n", + posx, posy, rect.left, rect.top); + + /* Passing a NULL dest rect sets the position to 0/0 . Visually it can be seen that the overlay overlays the whole primary(==screen)*/ + hr = IDirectDrawSurface7_UpdateOverlay(overlay, NULL, primary, NULL, 0, NULL); + ok(hr == DD_OK, "IDirectDrawSurface7_UpdateOverlay failed with hr=0x%08x\n", hr); + hr = IDirectDrawSurface7_GetOverlayPosition(overlay, &posx, &posy); + ok(hr == DD_OK, "IDirectDrawSurface7_GetOverlayPosition failed with hr=0x%08x\n", hr); + ok(posx == 0 && posy == 0, "Overlay position is (%d, %d), expected (%d, %d)\n", + posx, posy, 0, 0); + + /* The position cannot be retrieved when the overlay is not shown */ + hr = IDirectDrawSurface7_UpdateOverlay(overlay, NULL, primary, &rect, DDOVER_HIDE, NULL); + ok(hr == DD_OK, "IDirectDrawSurface7_UpdateOverlay failed with hr=0x%08x\n", hr); + posx = -1; posy = -1; + hr = IDirectDrawSurface7_GetOverlayPosition(overlay, &posx, &posy); + ok(hr == DDERR_OVERLAYNOTVISIBLE, "IDirectDrawSurface7_GetOverlayPosition failed with hr=0x%08x\n", hr); + ok(posx == 0 && posy == 0, "Overlay position is (%d, %d), expected (%d, %d)\n", + posx, posy, 0, 0); + + IDirectDrawSurface7_Release(overlay); +} + +static void offscreen_test(void) { + IDirectDrawSurface7 *overlay = create_overlay(64, 64, MAKEFOURCC('U','Y','V','Y')), *offscreen = NULL; + HRESULT hr; + DDSURFACEDESC2 ddsd; + + /* Try to overlay a NULL surface */ + hr = IDirectDrawSurface7_UpdateOverlay(overlay, NULL, NULL, NULL, DDOVER_SHOW, NULL); + ok(hr == DDERR_INVALIDPARAMS, "IDirectDrawSurface7_UpdateOverlay failed with hr=0x%08x\n", hr); + hr = IDirectDrawSurface7_UpdateOverlay(overlay, NULL, NULL, NULL, DDOVER_HIDE, NULL); + ok(hr == DDERR_INVALIDPARAMS, "IDirectDrawSurface7_UpdateOverlay failed with hr=0x%08x\n", hr); + + /* Try to overlay an offscreen surface */ + memset(&ddsd, 0, sizeof(ddsd)); + ddsd.dwSize = sizeof(ddsd); + ddsd.dwFlags = DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH | DDSD_PIXELFORMAT; + ddsd.dwWidth = 64; + ddsd.dwHeight = 64; + ddsd.ddpfPixelFormat.dwSize = sizeof(ddsd.ddpfPixelFormat); + ddsd.ddpfPixelFormat.dwFlags = DDPF_RGB; + ddsd.ddpfPixelFormat.dwFourCC = 0; + ddsd.ddpfPixelFormat.dwRGBBitCount = 16; + ddsd.ddpfPixelFormat.dwRBitMask = 0xF800; + ddsd.ddpfPixelFormat.dwGBitMask = 0x07e0; + ddsd.ddpfPixelFormat.dwBBitMask = 0x001F; + ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; + hr = IDirectDraw7_CreateSurface(ddraw, &ddsd, &offscreen, NULL); + ok(hr == DD_OK, "IDirectDraw7_CreateSurface failed with hr=0x%08x\n", hr); + + hr = IDirectDrawSurface7_UpdateOverlay(overlay, NULL, offscreen, NULL, DDOVER_SHOW, NULL); + ok(hr == DD_OK, "IDirectDrawSurface7_UpdateOverlay failed with hr=0x%08x\n", hr); + + /* Try to overlay the primary with a non-overlay surface */ + hr = IDirectDrawSurface7_UpdateOverlay(offscreen, NULL, primary, NULL, DDOVER_SHOW, NULL); + ok(hr == DDERR_NOTAOVERLAYSURFACE, "IDirectDrawSurface7_UpdateOverlay failed with hr=0x%08x\n", hr); + + IDirectDrawSurface7_Release(offscreen); + IDirectDrawSurface7_Release(overlay); +} + +static void yv12_test(void) +{ + HRESULT hr; + DDSURFACEDESC2 desc; + IDirectDrawSurface7 *surface; + + surface = create_overlay(256, 256, MAKEFOURCC('Y','V','1','2')); + if(!surface) { + skip("YV12 surfaces not available\n"); + return; + } + + memset(&desc, 0, sizeof(desc)); + desc.dwSize = sizeof(desc); + hr = IDirectDrawSurface7_Lock(surface, NULL, &desc, 0, NULL); + ok(hr == DD_OK, "IDirectDrawSurface7_Lock returned 0x%08x, expected DD_OK\n", hr); + + ok(desc.dwFlags == (DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT | DDSD_CAPS | DDSD_PITCH), + "Unexpected desc.dwFlags 0x%08x\n", desc.dwFlags); + ok(desc.ddsCaps.dwCaps == (DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM), + "Unexpected desc.ddsCaps.dwCaps 0x%08x\n", desc.ddsCaps.dwCaps); + ok(desc.dwWidth == 256 && desc.dwHeight == 256, "Expected size 64x64, got %ux%u\n", + desc.dwWidth, desc.dwHeight); + /* The overlay pitch seems to have 256 byte alignment */ + ok(desc.lPitch == 256, "Unexpected pitch %u, expected 256\n", desc.lPitch); + + hr = IDirectDrawSurface7_Unlock(surface, NULL); + ok(hr == DD_OK, "IDirectDrawSurface7_Unlock returned 0x%08x, expected DD_OK\n", hr); + + IDirectDrawSurface7_Release(surface); +} + +START_TEST(overlay) +{ + if(CreateDirectDraw() == FALSE) { + skip("Failed to initialize ddraw\n"); + return; + } + + rectangle_settings(); + offscreen_test(); + yv12_test(); + + if(primary) IDirectDrawSurface7_Release(primary); + if(ddraw) IDirectDraw7_Release(ddraw); +}
1
0
0
0
Stefan Dösinger : wined3d: Optimize the projected bump map handling.
by Alexandre Julliard
02 Sep '08
02 Sep '08
Module: wine Branch: master Commit: ab74030ec5bc22637da0f99b15855a8b5bbc8155 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ab74030ec5bc22637da0f99b1…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Wed Aug 27 14:39:29 2008 -0500 wined3d: Optimize the projected bump map handling. --- dlls/wined3d/arb_program_shader.c | 17 +++++++---------- 1 files changed, 7 insertions(+), 10 deletions(-) diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c index 335e54b..ca65e3e 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c @@ -2790,25 +2790,22 @@ static GLuint gen_arbfp_ffp_shader(struct ffp_settings *settings, IWineD3DStateB shader_addline(&buffer, "DP3 ret.g, arg1, tex%u;\n", stage - 1); /* with projective textures, texbem only divides the static texture coord, not the displacement, - * so we can't let the GL handle this. + * so multiply the displacement with the dividing parameter before passing it to TXP */ if (settings->op[stage].projected != proj_none) { - /* Note: Currently always divide by .a because the vertex pipeline moves the correct value - * into the 4th component - */ if(settings->op[stage].projected == proj_count4) { - shader_addline(&buffer, "RCP arg1.a, fragment.texcoord[%u].a;\n", stage); + shader_addline(&buffer, "MOV ret.a, fragment.texcoord[%u].a;\n", stage); + shader_addline(&buffer, "MUL ret.rgb, ret, fragment.texcoord[%u].a, fragment.texcoord[%u];\n", stage, stage); } else { - shader_addline(&buffer, "RCP arg1.a, fragment.texcoord[%u].b;\n", stage); + shader_addline(&buffer, "MOV ret.a, fragment.texcoord[%u].b;\n", stage); + shader_addline(&buffer, "MAD ret.rgb, ret, fragment.texcoord[%u].b, fragment.texcoord[%u];\n", stage, stage); } - shader_addline(&buffer, "MUL arg1.rg, fragment.texcoord[%u], arg1.a;\n", stage); - shader_addline(&buffer, "ADD ret, ret, arg1;\n"); } else { shader_addline(&buffer, "ADD ret, ret, fragment.texcoord[%u];\n", stage); } - shader_addline(&buffer, "TEX%s tex%u, ret, texture[%u], %s;\n", - sat, stage, stage, textype); + shader_addline(&buffer, "%s%s tex%u, ret, texture[%u], %s;\n", + instr, sat, stage, stage, textype); if(settings->op[stage - 1].cop == WINED3DTOP_BUMPENVMAPLUMINANCE) { shader_addline(&buffer, "MAD_SAT ret.r, tex%u.b, luminance%u.r, luminance%u.g;\n", stage - 1, stage - 1, stage - 1);
1
0
0
0
Stefan Dösinger : ddraw: Pass proper parameters to CheckDeviceFormat.
by Alexandre Julliard
02 Sep '08
02 Sep '08
Module: wine Branch: master Commit: ddec94bf0f3422e8e5032b76242226a26c38a865 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ddec94bf0f3422e8e5032b762…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Wed Aug 27 14:03:26 2008 -0500 ddraw: Pass proper parameters to CheckDeviceFormat. --- dlls/ddraw/device.c | 46 +++++++++++++++++++++++++++++++++++----------- 1 files changed, 35 insertions(+), 11 deletions(-) diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index 94f3949..84d55e0 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -1164,6 +1164,7 @@ IDirect3DDeviceImpl_7_EnumTextureFormats(IDirect3DDevice7 *iface, { ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice7, iface); HRESULT hr; + WINED3DDISPLAYMODE mode; int i; WINED3DFORMAT FormatList[] = { @@ -1202,14 +1203,25 @@ IDirect3DDeviceImpl_7_EnumTextureFormats(IDirect3DDevice7 *iface, return DDERR_INVALIDPARAMS; EnterCriticalSection(&ddraw_cs); + + memset(&mode, 0, sizeof(mode)); + hr = IWineD3DDevice_GetDisplayMode(This->ddraw->wineD3DDevice, + 0, + &mode); + if(FAILED(hr)) { + LeaveCriticalSection(&ddraw_cs); + WARN("Cannot get the current adapter format\n"); + return hr; + } + for(i = 0; i < sizeof(FormatList) / sizeof(WINED3DFORMAT); i++) { hr = IWineD3D_CheckDeviceFormat(This->ddraw->wineD3D, - 0 /* Adapter */, - 0 /* DeviceType */, - 0 /* AdapterFormat */, + WINED3DADAPTER_DEFAULT, + WINED3DDEVTYPE_HAL, + mode.Format, 0 /* Usage */, - 0 /* ResourceType */, + WINED3DRTYPE_TEXTURE, FormatList[i], SURFACE_OPENGL); if(hr == D3D_OK) @@ -1234,11 +1246,11 @@ IDirect3DDeviceImpl_7_EnumTextureFormats(IDirect3DDevice7 *iface, for(i = 0; i < sizeof(BumpFormatList) / sizeof(WINED3DFORMAT); i++) { hr = IWineD3D_CheckDeviceFormat(This->ddraw->wineD3D, - 0 /* Adapter */, - 0 /* DeviceType */, - 0 /* AdapterFormat */, + WINED3DADAPTER_DEFAULT, + WINED3DDEVTYPE_HAL, + mode.Format, WINED3DUSAGE_QUERY_LEGACYBUMPMAP, - 0 /* ResourceType */, + WINED3DRTYPE_TEXTURE, BumpFormatList[i], SURFACE_OPENGL); if(hr == D3D_OK) @@ -1317,6 +1329,7 @@ IDirect3DDeviceImpl_2_EnumTextureFormats(IDirect3DDevice2 *iface, ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice2, iface); HRESULT hr; int i; + WINED3DDISPLAYMODE mode; WINED3DFORMAT FormatList[] = { /* 32 bit */ @@ -1341,14 +1354,25 @@ IDirect3DDeviceImpl_2_EnumTextureFormats(IDirect3DDevice2 *iface, return DDERR_INVALIDPARAMS; EnterCriticalSection(&ddraw_cs); + + memset(&mode, 0, sizeof(mode)); + hr = IWineD3DDevice_GetDisplayMode(This->ddraw->wineD3DDevice, + 0, + &mode); + if(FAILED(hr)) { + LeaveCriticalSection(&ddraw_cs); + WARN("Cannot get the current adapter format\n"); + return hr; + } + for(i = 0; i < sizeof(FormatList) / sizeof(WINED3DFORMAT); i++) { hr = IWineD3D_CheckDeviceFormat(This->ddraw->wineD3D, 0 /* Adapter */, - 0 /* DeviceType */, - 0 /* AdapterFormat */, + WINED3DDEVTYPE_HAL, + mode.Format, 0 /* Usage */, - 0 /* ResourceType */, + WINED3DRTYPE_TEXTURE, FormatList[i], SURFACE_OPENGL); if(hr == D3D_OK)
1
0
0
0
← Newer
1
...
109
110
111
112
113
114
115
...
122
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
Results per page:
10
25
50
100
200