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
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
April 2008
----- 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
4 participants
1278 discussions
Start a n
N
ew thread
Jacek Caban : mshtml: Forward IHTMLWindow2::setTimeout to IHTMLWindow3:: setTimeout.
by Alexandre Julliard
22 Apr '08
22 Apr '08
Module: wine Branch: master Commit: 86409551889d99775aa04c64c48188c8cc32ad68 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=86409551889d99775aa04c64c…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Apr 21 18:12:49 2008 +0200 mshtml: Forward IHTMLWindow2::setTimeout to IHTMLWindow3::setTimeout. --- dlls/mshtml/htmlwindow.c | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index 43c893f..ce98f38 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -184,8 +184,14 @@ static HRESULT WINAPI HTMLWindow2_setTimeout(IHTMLWindow2 *iface, BSTR expressio long msec, VARIANT *language, long *timerID) { HTMLWindow *This = HTMLWINDOW2_THIS(iface); - FIXME("(%p)->(%s %ld %p %p)\n", This, debugstr_w(expression), msec, language, timerID); - return E_NOTIMPL; + VARIANT expr_var; + + TRACE("(%p)->(%s %ld %p %p)\n", This, debugstr_w(expression), msec, language, timerID); + + V_VT(&expr_var) = VT_BSTR; + V_BSTR(&expr_var) = expression; + + return IHTMLWindow3_setTimeout(HTMLWINDOW3(This), &expr_var, msec, language, timerID); } static HRESULT WINAPI HTMLWindow2_clearTimeout(IHTMLWindow2 *iface, long timerID)
1
0
0
0
Jacek Caban : mshtml: Added IHTMLWindow2::get_document implementation.
by Alexandre Julliard
22 Apr '08
22 Apr '08
Module: wine Branch: master Commit: aeb1095b47482fdbdb46814d51a54601712837ef URL:
http://source.winehq.org/git/wine.git/?a=commit;h=aeb1095b47482fdbdb46814d5…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Apr 21 18:12:32 2008 +0200 mshtml: Added IHTMLWindow2::get_document implementation. --- dlls/mshtml/htmlwindow.c | 14 ++++++++++++-- dlls/mshtml/tests/dom.c | 21 ++++++++++++++++++++- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index 5ed5701..43c893f 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -467,8 +467,18 @@ static HRESULT WINAPI HTMLWindow2_get_onscroll(IHTMLWindow2 *iface, VARIANT *p) static HRESULT WINAPI HTMLWindow2_get_document(IHTMLWindow2 *iface, IHTMLDocument2 **p) { HTMLWindow *This = HTMLWINDOW2_THIS(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + + TRACE("(%p)->(%p)\n", This, p); + + if(This->doc) { + /* FIXME: We should return a wrapper object here */ + *p = HTMLDOC(This->doc); + IHTMLDocument2_AddRef(*p); + }else { + *p = NULL; + } + + return S_OK; } static HRESULT WINAPI HTMLWindow2_get_event(IHTMLWindow2 *iface, IHTMLEventObj **p) diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 90ccd4d..59c2a17 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -1081,7 +1081,6 @@ static void test_navigator(IHTMLDocument2 *doc) hres = IHTMLDocument2_get_parentWindow(doc, &window); ok(hres == S_OK, "parentWidnow failed: %08x\n", hres); - test_ifaces((IUnknown*)window, window_iids); hres = IHTMLWindow2_get_navigator(window, &navigator); ok(hres == S_OK, "get_navigator failed: %08x\n", hres); @@ -1187,6 +1186,25 @@ static void test_default_body(IHTMLBodyElement *body) ok(bstr == NULL, "bstr != NULL\n"); } +static void test_window(IHTMLDocument2 *doc) +{ + IHTMLWindow2 *window; + IHTMLDocument2 *doc2 = NULL; + HRESULT hres; + + hres = IHTMLDocument2_get_parentWindow(doc, &window); + ok(hres == S_OK, "get_parentElement failed: %08x\n", hres); + test_ifaces((IUnknown*)window, window_iids); + test_disp((IUnknown*)window, &DIID_DispHTMLWindow2); + + hres = IHTMLWindow2_get_document(window, &doc2); + ok(hres == S_OK, "get_document failed: %08x\n", hres); + ok(doc2 != NULL, "doc2 == NULL\n"); + + IHTMLDocument_Release(doc2); + IHTMLWindow2_Release(window); +} + static void test_defaults(IHTMLDocument2 *doc) { IHTMLStyleSheetsCollection *stylesheetcol; @@ -1209,6 +1227,7 @@ static void test_defaults(IHTMLDocument2 *doc) ok(hres == S_OK, "get_style failed: %08x\n", hres); test_default_style(style); + test_window(doc); test_compatmode(doc); test_location(doc); test_navigator(doc);
1
0
0
0
Jacek Caban : mshtml: Added navigator's IDispatchEx test.
by Alexandre Julliard
22 Apr '08
22 Apr '08
Module: wine Branch: master Commit: 7c63087a5c99c144567095ef65326350fcbd9b92 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7c63087a5c99c144567095ef6…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Apr 21 18:12:10 2008 +0200 mshtml: Added navigator's IDispatchEx test. --- dlls/mshtml/tests/dom.c | 37 +++++++++++++++++++++++++++++++++++++ 1 files changed, 37 insertions(+), 0 deletions(-) diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 5e2acde..90ccd4d 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -30,6 +30,7 @@ #include "mshtmcid.h" #include "mshtmhst.h" #include "docobj.h" +#include "dispex.h" static const char doc_blank[] = "<html></html>"; static const char doc_str1[] = "<html><body>test</body></html>"; @@ -268,6 +269,41 @@ static void _test_ifaces(unsigned line, IUnknown *iface, REFIID *iids) } } +#define test_disp(u,id) _test_disp(__LINE__,u,id) +static void _test_disp(unsigned line, IUnknown *unk, const IID *diid) +{ + IDispatchEx *dispex; + ITypeInfo *typeinfo; + UINT ticnt; + HRESULT hres; + + hres = IUnknown_QueryInterface(unk, &IID_IDispatchEx, (void**)&dispex); + ok_(__FILE__,line) (hres == S_OK, "Could not get IDispatch: %08x\n", hres); + if(FAILED(hres)) + return; + + ticnt = 0xdeadbeef; + hres = IDispatchEx_GetTypeInfoCount(dispex, &ticnt); + ok_(__FILE__,line) (hres == S_OK, "GetTypeInfoCount failed: %08x\n", hres); + ok_(__FILE__,line) (ticnt == 1, "ticnt=%u\n", ticnt); + + hres = IDispatchEx_GetTypeInfo(dispex, 0, 0, &typeinfo); + ok_(__FILE__,line) (hres == S_OK, "GetTypeInfo failed: %08x\n", hres); + + if(SUCCEEDED(hres)) { + TYPEATTR *type_attr; + + hres = ITypeInfo_GetTypeAttr(typeinfo, &type_attr); + ok_(__FILE__,line) (hres == S_OK, "GetTypeAttr failed: %08x\n", hres); + ok_(__FILE__,line) (IsEqualGUID(&type_attr->guid, diid), "unexpected guid %s\n", dbgstr_guid(&type_attr->guid)); + + ITypeInfo_ReleaseTypeAttr(typeinfo, type_attr); + ITypeInfo_Release(typeinfo); + } + + IDispatchEx_Release(dispex); +} + #define test_node_name(u,n) _test_node_name(__LINE__,u,n) static void _test_node_name(unsigned line, IUnknown *unk, const char *exname) { @@ -1050,6 +1086,7 @@ static void test_navigator(IHTMLDocument2 *doc) hres = IHTMLWindow2_get_navigator(window, &navigator); ok(hres == S_OK, "get_navigator failed: %08x\n", hres); ok(navigator != NULL, "navigator == NULL\n"); + test_disp((IUnknown*)navigator, &IID_IOmNavigator); hres = IHTMLWindow2_get_navigator(window, &navigator2); ok(hres == S_OK, "get_navigator failed: %08x\n", hres);
1
0
0
0
Steven Edwards : rpcrt4: Correct the number of aguments for fill_method on unsupported architectures .
by Alexandre Julliard
22 Apr '08
22 Apr '08
Module: wine Branch: master Commit: d0ddece843064b8acbc90bb8a5c293879abca248 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d0ddece843064b8acbc90bb8a…
Author: Steven Edwards <winehacker(a)gmail.com> Date: Mon Apr 21 09:49:59 2008 -0400 rpcrt4: Correct the number of aguments for fill_method on unsupported architectures. --- dlls/rpcrt4/cstub.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/rpcrt4/cstub.c b/dlls/rpcrt4/cstub.c index b416a10..83a5fb2 100644 --- a/dlls/rpcrt4/cstub.c +++ b/dlls/rpcrt4/cstub.c @@ -194,7 +194,7 @@ static void fill_table(IUnknownVtbl *vtbl, void **methods, DWORD num) #else /* __i386__ */ typedef struct {int dummy;} vtbl_method_t; -static void fill_table(IUnknownVtbl *vtbl, DWORD num) +static void fill_table(IUnknownVtbl *vtbl, void **methods, DWORD num) { ERR("delegated stubs are not supported on this architecture\n"); }
1
0
0
0
Dmitry Timoshkov : gdi32: Add a test for EMR_EXTSELECTCLIPRGN, make it pass under Wine.
by Alexandre Julliard
22 Apr '08
22 Apr '08
Module: wine Branch: master Commit: 5201c78b2e07e19158dff8d30f12ac20a2afd6cc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5201c78b2e07e19158dff8d30…
Author: Dmitry Timoshkov <dmitry(a)codeweavers.com> Date: Mon Apr 21 19:38:03 2008 +0900 gdi32: Add a test for EMR_EXTSELECTCLIPRGN, make it pass under Wine. --- dlls/gdi32/enhmetafile.c | 12 +-- dlls/gdi32/tests/metafile.c | 196 ++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 199 insertions(+), 9 deletions(-) diff --git a/dlls/gdi32/enhmetafile.c b/dlls/gdi32/enhmetafile.c index 39b6057..a3e7aa5 100644 --- a/dlls/gdi32/enhmetafile.c +++ b/dlls/gdi32/enhmetafile.c @@ -1172,17 +1172,15 @@ BOOL WINAPI PlayEnhMetaFileRecord( case EMR_EXTSELECTCLIPRGN: { - static int extselectcliprgn_cases; -#if 0 - const EMREXTSELECTCLIPRGN lpRgn = (const EMREXTSELECTCLIPRGN *)mr; - HRGN hRgn = ExtCreateRegion(NULL, lpRgn->cbRgnData, (RGNDATA *)lpRgn->RgnData); + const EMREXTSELECTCLIPRGN *lpRgn = (const EMREXTSELECTCLIPRGN *)mr; + HRGN hRgn = 0; + + if (mr->nSize >= sizeof(*lpRgn) + sizeof(RGNDATAHEADER)) + hRgn = ExtCreateRegion( &info->init_transform, 0, (RGNDATA *)lpRgn->RgnData ); ExtSelectClipRgn(hdc, hRgn, (INT)(lpRgn->iMode)); /* ExtSelectClipRgn created a copy of the region */ DeleteObject(hRgn); -#endif - if(!(extselectcliprgn_cases++)) - FIXME("ExtSelectClipRgn\n"); break; } diff --git a/dlls/gdi32/tests/metafile.c b/dlls/gdi32/tests/metafile.c index 72100c8..473f7e3 100644 --- a/dlls/gdi32/tests/metafile.c +++ b/dlls/gdi32/tests/metafile.c @@ -302,8 +302,6 @@ static int CALLBACK savedc_emf_enum_proc(HDC hdc, HANDLETABLE *handle_table, ok(save_state == 0, "EOF save_state %d\n", save_state); break; } - - return 1; } @@ -1158,6 +1156,199 @@ static void test_emf_ExtTextOut_on_path(void) DestroyWindow(hwnd); } +static const unsigned char EMF_CLIPPING[] = +{ + 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x1e, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, + 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00, + 0xd0, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, + 0x7c, 0x01, 0x00, 0x00, 0x2c, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x60, 0xcc, 0x05, 0x00, + 0xe0, 0x93, 0x04, 0x00, 0x36, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x4b, 0x00, 0x00, 0x00, + 0x40, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, + 0x64, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, + 0x00, 0x04, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, + 0x64, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, + 0x00, 0x04, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00 +}; + +static void translate( POINT *pt, UINT count, const XFORM *xform ) +{ + while (count--) + { + FLOAT x = (FLOAT)pt->x; + FLOAT y = (FLOAT)pt->y; + pt->x = (LONG)floor( x * xform->eM11 + y * xform->eM21 + xform->eDx + 0.5 ); + pt->y = (LONG)floor( x * xform->eM12 + y * xform->eM22 + xform->eDy + 0.5 ); + pt++; + } +} + +static int CALLBACK clip_emf_enum_proc(HDC hdc, HANDLETABLE *handle_table, + const ENHMETARECORD *emr, int n_objs, LPARAM param) +{ + if (emr->iType == EMR_EXTSELECTCLIPRGN) + { + const EMREXTSELECTCLIPRGN *clip = (const EMREXTSELECTCLIPRGN *)emr; + union _rgn + { + RGNDATA data; + char buf[sizeof(RGNDATAHEADER) + sizeof(RECT)]; + }; + const union _rgn *rgn1; + union _rgn rgn2; + RECT rect, rc_transformed; + const RECT *rc = (const RECT *)param; + HRGN hrgn; + XFORM xform; + INT ret; + BOOL is_win9x; + + trace("EMR_EXTSELECTCLIPRGN: cbRgnData %#x, iMode %u\n", + clip->cbRgnData, clip->iMode); + + ok(clip->iMode == RGN_COPY, "expected RGN_COPY, got %u\n", clip->iMode); + ok(clip->cbRgnData >= sizeof(RGNDATAHEADER) + sizeof(RECT), + "too small data block: %u bytes\n", clip->cbRgnData); + if (clip->cbRgnData < sizeof(RGNDATAHEADER) + sizeof(RECT)) + return 0; + + rgn1 = (const union _rgn *)clip->RgnData; + + trace("size %u, type %u, count %u, rgn size %u, bound (%d,%d-%d,%d)\n", + rgn1->data.rdh.dwSize, rgn1->data.rdh.iType, + rgn1->data.rdh.nCount, rgn1->data.rdh.nRgnSize, + rgn1->data.rdh.rcBound.left, rgn1->data.rdh.rcBound.top, + rgn1->data.rdh.rcBound.right, rgn1->data.rdh.rcBound.bottom); + + ok(EqualRect(&rgn1->data.rdh.rcBound, rc), "rects don't match\n"); + + rect = *(const RECT *)rgn1->data.Buffer; + trace("rect (%d,%d-%d,%d)\n", rect.left, rect.top, rect.right, rect.bottom); + ok(EqualRect(&rect, rc), "rects don't match\n"); + + ok(rgn1->data.rdh.dwSize == sizeof(rgn1->data.rdh), "expected sizeof(rdh), got %u", rgn1->data.rdh.dwSize); + ok(rgn1->data.rdh.iType == RDH_RECTANGLES, "expected RDH_RECTANGLES, got %u\n", rgn1->data.rdh.iType); + ok(rgn1->data.rdh.nCount == 1, "expected 1, got %u\n", rgn1->data.rdh.nCount); + ok(rgn1->data.rdh.nRgnSize == sizeof(RECT), "expected sizeof(RECT), got %u\n", rgn1->data.rdh.nRgnSize); + + hrgn = CreateRectRgn(0, 0, 0, 0); + + memset(&xform, 0, sizeof(xform)); + SetLastError(0xdeadbeef); + ret = GetWorldTransform(hdc, &xform); + is_win9x = !ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED; + if (!is_win9x) + ok(ret, "GetWorldTransform error %u\n", GetLastError()); + + trace("xform.eM11 %f, xform.eM22 %f\n", xform.eM11, xform.eM22); + + ret = GetClipRgn(hdc, hrgn); + ok(ret == 0, "GetClipRgn returned %d, expected 0\n", ret); + + PlayEnhMetaFileRecord(hdc, handle_table, emr, n_objs); + + ret = GetClipRgn(hdc, hrgn); + ok(ret == 1, "GetClipRgn returned %d, expected 0\n", ret); + + /* Win9x returns empty clipping region */ + if (is_win9x) return 1; + + ret = GetRegionData(hrgn, 0, NULL); + ok(ret == sizeof(rgn2.data.rdh) + sizeof(RECT), "expected sizeof(rgn), got %u\n", ret); + + ret = GetRegionData(hrgn, sizeof(rgn2), &rgn2.data); + + trace("size %u, type %u, count %u, rgn size %u, bound (%d,%d-%d,%d)\n", + rgn2.data.rdh.dwSize, rgn2.data.rdh.iType, + rgn2.data.rdh.nCount, rgn2.data.rdh.nRgnSize, + rgn2.data.rdh.rcBound.left, rgn2.data.rdh.rcBound.top, + rgn2.data.rdh.rcBound.right, rgn2.data.rdh.rcBound.bottom); + + rect = rgn2.data.rdh.rcBound; + rc_transformed = *rc; + translate((POINT *)&rc_transformed, 2, &xform); + ok(EqualRect(&rect, &rc_transformed), "rects don't match\n"); + + rect = *(const RECT *)rgn2.data.Buffer; + trace("rect (%d,%d-%d,%d)\n", rect.left, rect.top, rect.right, rect.bottom); + rc_transformed = *rc; + translate((POINT *)&rc_transformed, 2, &xform); + ok(EqualRect(&rect, &rc_transformed), "rects don't match\n"); + + ok(rgn2.data.rdh.dwSize == sizeof(rgn1->data.rdh), "expected sizeof(rdh), got %u", rgn2.data.rdh.dwSize); + ok(rgn2.data.rdh.iType == RDH_RECTANGLES, "expected RDH_RECTANGLES, got %u\n", rgn2.data.rdh.iType); + ok(rgn2.data.rdh.nCount == 1, "expected 1, got %u\n", rgn2.data.rdh.nCount); + ok(rgn2.data.rdh.nRgnSize == sizeof(RECT), "expected sizeof(RECT), got %u\n", rgn2.data.rdh.nRgnSize); + + DeleteObject(hrgn); + } + return 1; +} + +static void test_emf_clipping(void) +{ + static const RECT rc = { 0, 0, 100, 100 }; + RECT rc_clip = { 100, 100, 1024, 1024 }; + HWND hwnd; + HDC hdc; + HENHMETAFILE hemf; + HRGN hrgn; + INT ret; + + SetLastError(0xdeadbeef); + hdc = CreateEnhMetaFileA(0, NULL, NULL, NULL); + ok(hdc != 0, "CreateEnhMetaFileA error %d\n", GetLastError()); + + /* Need to write something to the emf, otherwise Windows won't play it back */ + LineTo(hdc, 1, 1); + + hrgn = CreateRectRgn(rc_clip.left, rc_clip.top, rc_clip.right, rc_clip.bottom); + ret = SelectClipRgn(hdc, hrgn); + ok(ret == SIMPLEREGION, "expected SIMPLEREGION, got %d\n", ret); + + SetLastError(0xdeadbeef); + hemf = CloseEnhMetaFile(hdc); + ok(hemf != 0, "CloseEnhMetaFile error %d\n", GetLastError()); + + if (compare_emf_bits(hemf, EMF_CLIPPING, sizeof(EMF_CLIPPING), + "emf_clipping", TRUE) != 0) + { + dump_emf_bits(hemf, "emf_clipping"); + dump_emf_records(hemf, "emf_clipping"); + } + + DeleteObject(hrgn); + + /* Win9x doesn't play EMFs on invisible windows */ + hwnd = CreateWindowExA(0, "static", NULL, WS_POPUP | WS_VISIBLE, + 0, 0, 200, 200, 0, 0, 0, NULL); + ok(hwnd != 0, "CreateWindowExA error %d\n", GetLastError()); + + hdc = GetDC(hwnd); + + ret = EnumEnhMetaFile(hdc, hemf, clip_emf_enum_proc, &rc_clip, &rc); + ok(ret, "EnumEnhMetaFile error %d\n", GetLastError()); + + DeleteEnhMetaFile(hemf); + ReleaseDC(hwnd, hdc); + DestroyWindow(hwnd); +} + static INT CALLBACK EmfEnumProc(HDC hdc, HANDLETABLE *lpHTable, const ENHMETARECORD *lpEMFR, INT nObj, LPARAM lpData) { LPMETAFILEPICT lpMFP = (LPMETAFILEPICT)lpData; @@ -1617,6 +1808,7 @@ START_TEST(metafile) test_SetMetaFileBits(); test_mf_ExtTextOut_on_path(); test_emf_ExtTextOut_on_path(); + test_emf_clipping(); /* For metafile conversions */ test_mf_conversions();
1
0
0
0
Nikolay Sivov : gdiplus: GdipCreateLineBrushI implemented using float args version.
by Alexandre Julliard
22 Apr '08
22 Apr '08
Module: wine Branch: master Commit: 0679e9770a773c166ea1ca25564d6a31748ad65b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0679e9770a773c166ea1ca255…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Mon Apr 21 00:45:52 2008 +0400 gdiplus: GdipCreateLineBrushI implemented using float args version. --- dlls/gdiplus/brush.c | 18 ++++++++++++++++++ dlls/gdiplus/gdiplus.spec | 2 +- 2 files changed, 19 insertions(+), 1 deletions(-) diff --git a/dlls/gdiplus/brush.c b/dlls/gdiplus/brush.c index 7f324f3..1c69518 100644 --- a/dlls/gdiplus/brush.c +++ b/dlls/gdiplus/brush.c @@ -131,6 +131,24 @@ GpStatus WINGDIPAPI GdipCreateLineBrush(GDIPCONST GpPointF* startpoint, return Ok; } +GpStatus WINGDIPAPI GdipCreateLineBrushI(GDIPCONST GpPoint* startpoint, + GDIPCONST GpPoint* endpoint, ARGB startcolor, ARGB endcolor, + GpWrapMode wrap, GpLineGradient **line) +{ + GpPointF stF; + GpPointF endF; + + if(!startpoint || !endpoint) + return InvalidParameter; + + stF.X = (REAL)startpoint->X; + stF.Y = (REAL)startpoint->Y; + endF.X = (REAL)endpoint->X; + endF.X = (REAL)endpoint->Y; + + return GdipCreateLineBrush(&stF, &endF, startcolor, endcolor, wrap, line); +} + GpStatus WINGDIPAPI GdipCreateLineBrushFromRectI(GDIPCONST GpRect* rect, ARGB startcolor, ARGB endcolor, LinearGradientMode mode, GpWrapMode wrap, GpLineGradient **line) diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index fff85c1..cbea1b9 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -103,7 +103,7 @@ @ stdcall GdipCreateLineBrushFromRectI(ptr long long long long ptr) @ stub GdipCreateLineBrushFromRectWithAngle @ stub GdipCreateLineBrushFromRectWithAngleI -@ stub GdipCreateLineBrushI +@ stdcall GdipCreateLineBrushI(ptr ptr long long long ptr) @ stdcall GdipCreateMatrix2(long long long long long long ptr) @ stdcall GdipCreateMatrix3(ptr ptr ptr) @ stdcall GdipCreateMatrix3I(ptr ptr ptr)
1
0
0
0
Nikolay Sivov : gdiplus: Implemented GdipDrawRectangle.
by Alexandre Julliard
22 Apr '08
22 Apr '08
Module: wine Branch: master Commit: 172389e1316dcdee488dd4e85568fcf4c65fbbab URL:
http://source.winehq.org/git/wine.git/?a=commit;h=172389e1316dcdee488dd4e85…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Sun Apr 20 21:27:10 2008 +0400 gdiplus: Implemented GdipDrawRectangle. --- dlls/gdiplus/gdiplus.spec | 2 +- dlls/gdiplus/graphics.c | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index 4f6b300..fff85c1 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -194,7 +194,7 @@ @ stub GdipDrawPieI @ stub GdipDrawPolygon @ stub GdipDrawPolygonI -@ stub GdipDrawRectangle +@ stdcall GdipDrawRectangle(ptr ptr long long long long) @ stdcall GdipDrawRectangleI(ptr ptr long long long long) @ stdcall GdipDrawRectangles(ptr ptr ptr long) @ stub GdipDrawRectanglesI diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index 7356234..4912759 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -1308,8 +1308,8 @@ GpStatus WINGDIPAPI GdipDrawPie(GpGraphics *graphics, GpPen *pen, REAL x, return Ok; } -GpStatus WINGDIPAPI GdipDrawRectangleI(GpGraphics *graphics, GpPen *pen, INT x, - INT y, INT width, INT height) +GpStatus WINGDIPAPI GdipDrawRectangle(GpGraphics *graphics, GpPen *pen, REAL x, + REAL y, REAL width, REAL height) { INT save_state; GpPointF ptf[4]; @@ -1338,6 +1338,12 @@ GpStatus WINGDIPAPI GdipDrawRectangleI(GpGraphics *graphics, GpPen *pen, INT x, return Ok; } +GpStatus WINGDIPAPI GdipDrawRectangleI(GpGraphics *graphics, GpPen *pen, INT x, + INT y, INT width, INT height) +{ + return GdipDrawRectangle(graphics,pen,(REAL)x,(REAL)y,(REAL)width,(REAL)height); +} + GpStatus WINGDIPAPI GdipDrawRectangles(GpGraphics *graphics, GpPen *pen, GDIPCONST GpRectF* rects, INT count) {
1
0
0
0
Nikolay Sivov : gdiplus: Implemented GdipAddPathLine.
by Alexandre Julliard
22 Apr '08
22 Apr '08
Module: wine Branch: master Commit: 1f8f5578922765e2c24dec7ac39458ef72f3640a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1f8f5578922765e2c24dec7ac…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Sun Apr 20 20:00:00 2008 +0400 gdiplus: Implemented GdipAddPathLine. --- dlls/gdiplus/gdiplus.spec | 2 +- dlls/gdiplus/graphicspath.c | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index d6971f9..4f6b300 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -18,7 +18,7 @@ @ stub GdipAddPathEllipseI @ stdcall GdipAddPathLine2(ptr ptr long) @ stdcall GdipAddPathLine2I(ptr ptr long) -@ stub GdipAddPathLine +@ stdcall GdipAddPathLine(ptr long long long long) @ stdcall GdipAddPathLineI(ptr long long long long) @ stdcall GdipAddPathPath(ptr ptr long) @ stub GdipAddPathPie diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c index 0375f8e..d7be43e 100644 --- a/dlls/gdiplus/graphicspath.c +++ b/dlls/gdiplus/graphicspath.c @@ -247,7 +247,7 @@ GpStatus WINGDIPAPI GdipAddPathLine2I(GpPath *path, GDIPCONST GpPoint *points, I return stat; } -GpStatus WINGDIPAPI GdipAddPathLineI(GpPath *path, INT x1, INT y1, INT x2, INT y2) +GpStatus WINGDIPAPI GdipAddPathLine(GpPath *path, REAL x1, REAL y1, REAL x2, REAL y2) { INT old_count; @@ -259,10 +259,10 @@ GpStatus WINGDIPAPI GdipAddPathLineI(GpPath *path, INT x1, INT y1, INT x2, INT y old_count = path->pathdata.Count; - path->pathdata.Points[old_count].X = (REAL) x1; - path->pathdata.Points[old_count].Y = (REAL) y1; - path->pathdata.Points[old_count + 1].X = (REAL) x2; - path->pathdata.Points[old_count + 1].Y = (REAL) y2; + path->pathdata.Points[old_count].X = x1; + path->pathdata.Points[old_count].Y = y1; + path->pathdata.Points[old_count + 1].X = x2; + path->pathdata.Points[old_count + 1].Y = y2; path->pathdata.Types[old_count] = (path->newfigure ? PathPointTypeStart : PathPointTypeLine); @@ -274,6 +274,11 @@ GpStatus WINGDIPAPI GdipAddPathLineI(GpPath *path, INT x1, INT y1, INT x2, INT y return Ok; } +GpStatus WINGDIPAPI GdipAddPathLineI(GpPath *path, INT x1, INT y1, INT x2, INT y2) +{ + return GdipAddPathLine(path, (REAL)x1, (REAL)y1, (REAL)x2, (REAL)y2); +} + GpStatus WINGDIPAPI GdipAddPathPath(GpPath *path, GDIPCONST GpPath* addingPath, BOOL connect) {
1
0
0
0
David Adam : wined3d: Fix a possible null dereference.
by Alexandre Julliard
22 Apr '08
22 Apr '08
Module: wine Branch: master Commit: 7df193676e8de9c9b760ceb10206c81f6b7fe592 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7df193676e8de9c9b760ceb10…
Author: David Adam <david.adam.cnrs(a)gmail.com> Date: Sat Apr 19 20:12:48 2008 +0200 wined3d: Fix a possible null dereference. --- dlls/d3d8/tests/device.c | 37 +++++++++++++++++++++++++++++++++++++ dlls/d3d9/tests/device.c | 36 ++++++++++++++++++++++++++++++++++++ dlls/wined3d/device.c | 2 ++ 3 files changed, 75 insertions(+), 0 deletions(-) diff --git a/dlls/d3d8/tests/device.c b/dlls/d3d8/tests/device.c index 8de4ec7..8617c0c 100644 --- a/dlls/d3d8/tests/device.c +++ b/dlls/d3d8/tests/device.c @@ -1281,6 +1281,42 @@ static void test_render_zero_triangles(void) if(d3d8) IDirect3D8_Release(d3d8); } +static void test_set_material(void) +{ + D3DPRESENT_PARAMETERS present_parameters; + IDirect3DDevice8 *device = NULL; + IDirect3D8 *d3d8; + HWND hwnd; + HRESULT hr; + + d3d8 = pDirect3DCreate8( D3D_SDK_VERSION ); + ok(d3d8 != NULL, "Failed to create IDirect3D8 object\n"); + hwnd = CreateWindow( "static", "d3d8_test", WS_OVERLAPPEDWINDOW, 100, 100, 160, 160, NULL, NULL, NULL, NULL ); + ok(hwnd != NULL, "Failed to create window\n"); + if (!d3d8 || !hwnd) goto cleanup; + + ZeroMemory(&present_parameters, sizeof(present_parameters)); + present_parameters.Windowed = TRUE; + present_parameters.hDeviceWindow = hwnd; + present_parameters.SwapEffect = D3DSWAPEFFECT_DISCARD; + + hr = IDirect3D8_CreateDevice( d3d8, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hwnd, + D3DCREATE_HARDWARE_VERTEXPROCESSING | D3DCREATE_PUREDEVICE, &present_parameters, &device ); + ok(hr == D3D_OK || hr == D3DERR_NOTAVAILABLE, "IDirect3D8_CreateDevice failed with %s\n", DXGetErrorString8(hr)); + if(!device) + { + skip("Failed to create a d3d device\n"); + goto cleanup; + } + + hr = IDirect3DDevice8_SetMaterial(device, NULL); + ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %s\n", DXGetErrorString8(hr)); + + cleanup: + if(device) IDirect3DDevice8_Release(device); + if(d3d8) IDirect3D8_Release(d3d8); +} + START_TEST(device) { HMODULE d3d8_handle = LoadLibraryA( "d3d8.dll" ); @@ -1306,5 +1342,6 @@ START_TEST(device) test_limits(); test_lights(); test_render_zero_triangles(); + test_set_material(); } } diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c index 020b17a..8f4542a 100644 --- a/dlls/d3d9/tests/device.c +++ b/dlls/d3d9/tests/device.c @@ -1994,6 +1994,41 @@ static void test_display_formats() if(d3d9) IDirect3D9_Release(d3d9); } +static void test_set_material(void) +{ + D3DPRESENT_PARAMETERS present_parameters; + IDirect3DDevice9 *device = NULL; + IDirect3D9 *d3d9; + HWND hwnd; + HRESULT hr; + + d3d9 = pDirect3DCreate9( D3D_SDK_VERSION ); + ok(d3d9 != NULL, "Failed to create IDirect3D9 object\n"); + hwnd = CreateWindow( "static", "d3d9_test", WS_OVERLAPPEDWINDOW, 100, 100, 160, 160, NULL, NULL, NULL, NULL ); + ok(hwnd != NULL, "Failed to create window\n"); + if (!d3d9 || !hwnd) goto cleanup; + + ZeroMemory(&present_parameters, sizeof(present_parameters)); + present_parameters.Windowed = TRUE; + present_parameters.hDeviceWindow = hwnd; + present_parameters.SwapEffect = D3DSWAPEFFECT_DISCARD; + + IDirect3D9_CreateDevice( d3d9, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hwnd, + D3DCREATE_HARDWARE_VERTEXPROCESSING | D3DCREATE_PUREDEVICE, &present_parameters, &device ); + if(!device) + { + skip("Failed to create a d3d device\n"); + goto cleanup; + } + + hr = IDirect3DDevice9_SetMaterial(device, NULL); + ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %s\n", DXGetErrorString9(hr)); + + cleanup: + if(device) IDirect3DDevice9_Release(device); + if(d3d9) IDirect3D9_Release(d3d9); +} + START_TEST(device) { HMODULE d3d9_handle = LoadLibraryA( "d3d9.dll" ); @@ -2023,5 +2058,6 @@ START_TEST(device) test_vertex_buffer_alignment(); test_lights(); test_set_stream_source(); + test_set_material(); } } diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 53d669e..c8eafc8 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -3086,6 +3086,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_GetClipStatus(IWineD3DDevice *iface, static HRESULT WINAPI IWineD3DDeviceImpl_SetMaterial(IWineD3DDevice *iface, CONST WINED3DMATERIAL* pMaterial) { IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; + if (!pMaterial) return WINED3DERR_INVALIDCALL; + This->updateStateBlock->changed.material = TRUE; This->updateStateBlock->material = *pMaterial;
1
0
0
0
Alexandre Julliard : libwine: Allow to specify a non-existing directory as WINEPREFIX.
by Alexandre Julliard
22 Apr '08
22 Apr '08
Module: wine Branch: master Commit: 662718160e03586424da4b49b21b99d2263273be URL:
http://source.winehq.org/git/wine.git/?a=commit;h=662718160e03586424da4b49b…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Apr 21 15:48:12 2008 +0200 libwine: Allow to specify a non-existing directory as WINEPREFIX. --- libs/wine/config.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/libs/wine/config.c b/libs/wine/config.c index 9e33f4e..ba89811 100644 --- a/libs/wine/config.c +++ b/libs/wine/config.c @@ -209,10 +209,8 @@ static void init_paths(void) fatal_error( "invalid directory %s in WINEPREFIX: not an absolute path\n", prefix ); if (stat( config_dir, &st ) == -1) { - if (errno != ENOENT) - fatal_perror( "cannot open %s as specified in WINEPREFIX", config_dir ); - fatal_error( "the '%s' directory specified in WINEPREFIX doesn't exist.\n" - "You may want to create it by running 'wineprefixcreate'.\n", config_dir ); + if (errno == ENOENT) return; /* will be created later on */ + fatal_perror( "cannot open %s as specified in WINEPREFIX", config_dir ); } } else
1
0
0
0
← Newer
1
...
42
43
44
45
46
47
48
...
128
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
123
124
125
126
127
128
Results per page:
10
25
50
100
200