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
Maarten Lankhorst : quartz: Handle failures better in acmwrapper.
by Alexandre Julliard
29 Apr '08
29 Apr '08
Module: wine Branch: master Commit: 1ba8ece76e1b87f43270edb1324c31b818e8162e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1ba8ece76e1b87f43270edb13…
Author: Maarten Lankhorst <m.b.lankhorst(a)gmail.com> Date: Mon Apr 28 16:32:57 2008 -0700 quartz: Handle failures better in acmwrapper. --- dlls/quartz/acmwrapper.c | 96 ++++++++++++++++++++++++++++++++++++++------- 1 files changed, 81 insertions(+), 15 deletions(-) diff --git a/dlls/quartz/acmwrapper.c b/dlls/quartz/acmwrapper.c index c7b1e42..92d0298 100644 --- a/dlls/quartz/acmwrapper.c +++ b/dlls/quartz/acmwrapper.c @@ -48,6 +48,9 @@ typedef struct ACMWrapperImpl LPWAVEFORMATEX pWfIn; LPWAVEFORMATEX pWfOut; + IMediaSample *recv, *xmit; + ULONG done; + LONGLONG lasttime_real; LONGLONG lasttime_sent; } ACMWrapperImpl; @@ -66,32 +69,61 @@ static HRESULT ACMWrapper_ProcessSampleData(TransformFilterImpl* pTransformFilte HRESULT hr; LONGLONG tStart = -1, tStop = -1, tMed; + assert(pSample); + + if (This->xmit) + { + hr = OutputPin_SendSample((OutputPin*)This->tf.ppPins[1], This->xmit); + if (hr != S_OK) + return hr; + IMediaSample_Release(This->xmit); + This->xmit = NULL; + } + hr = IMediaSample_GetPointer(pSample, &pbSrcStream); if (FAILED(hr)) { ERR("Cannot get pointer to sample data (%x)\n", hr); return hr; } - - preroll = (IMediaSample_IsPreroll(pSample) == S_OK); - - IMediaSample_GetTime(pSample, &tStart, &tStop); cbSrcStream = IMediaSample_GetActualDataLength(pSample); + preroll = (IMediaSample_IsPreroll(pSample) == S_OK); - /* Prevent discontinuities when codecs 'absorb' data but not give anything back in return */ - if (IMediaSample_IsDiscontinuity(pSample) == S_OK) + if (pSample != This->recv) { - This->lasttime_real = tStart; - This->lasttime_sent = tStart; + if (This->recv) + { + /* Get rid of buffered sample first */ + hr = ACMWrapper_ProcessSampleData(pTransformFilter, This->recv); + if (hr != S_OK) + return hr; + if (This->recv) + return S_FALSE; + } + + IMediaSample_GetTime(pSample, &tStart, &tStop); + + /* Prevent discontinuities when codecs 'absorb' data but not give anything back in return */ + if (IMediaSample_IsDiscontinuity(pSample) == S_OK) + { + This->lasttime_real = tStart; + This->lasttime_sent = tStart; + } + else if (This->lasttime_real == tStart) + tStart = This->lasttime_sent; + else + WARN("Discontinuity\n"); } - else if (This->lasttime_real == tStart) - tStart = This->lasttime_sent; else - WARN("Discontinuity\n"); - + { + tStart = This->lasttime_sent; + tStop = This->lasttime_real; + cbSrcStream -= This->done; + pbSrcStream += This->done; + } tMed = tStart; - TRACE("Sample data ptr = %p, size = %ld\n", pbSrcStream, (long)cbSrcStream); + TRACE("Sample data ptr = %p, size = %u\n", pbSrcStream, cbSrcStream); hr = IPin_ConnectionMediaType(This->tf.ppPins[0], &amt); if (FAILED(hr)) { @@ -201,17 +233,44 @@ error: ash.pbSrc += ash.cbSrcLengthUsed; ash.cbSrcLength -= ash.cbSrcLengthUsed; + if (hr == S_FALSE) + { + This->xmit = pOutSample; + if (ash.cbSrcLength && !This->recv) + { + This->recv = pSample; + IMediaSample_AddRef(This->recv); + } + else if (This->recv) + { + IMediaSample_Release(This->recv); + This->recv = NULL; + } + + This->done = IMediaSample_GetActualDataLength(pSample) - ash.cbSrcLength; + break; + } + if (pOutSample) IMediaSample_Release(pOutSample); pOutSample = NULL; - } This->lasttime_real = tStop; This->lasttime_sent = tMed; + if (hr != S_OK) FIXME("FATALITY: %08x\n", hr); + else if (This->recv) + { + assert(This->recv == pSample); + IMediaSample_Release(This->recv); + This->recv = NULL; + } + + if (hr == S_FALSE) + return S_OK; return hr; } @@ -277,7 +336,13 @@ static HRESULT ACMWrapper_Cleanup(TransformFilterImpl* pTransformFilter) This->has = 0; This->lasttime_real = This->lasttime_sent = -1; - + if (This->recv) + IMediaSample_Release(This->recv); + + if (This->xmit) + IMediaSample_Release(This->xmit); + + This->recv = This->xmit = NULL; return S_OK; } @@ -313,6 +378,7 @@ HRESULT ACMWrapper_create(IUnknown * pUnkOuter, LPVOID * ppv) *ppv = (LPVOID)This; This->lasttime_real = This->lasttime_sent = -1; + This->recv = This->xmit = NULL; return hr; }
1
0
0
0
Maarten Lankhorst : quartz: Keep track of the time in the video renderer.
by Alexandre Julliard
29 Apr '08
29 Apr '08
Module: wine Branch: master Commit: 37847b0d9b884752e86eedc96bc3294b78a9b51b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=37847b0d9b884752e86eedc96…
Author: Maarten Lankhorst <m.b.lankhorst(a)gmail.com> Date: Mon Apr 28 15:00:51 2008 -0700 quartz: Keep track of the time in the video renderer. --- dlls/quartz/videorenderer.c | 54 +++++++++++++++++++++++++++++++++++++++--- 1 files changed, 50 insertions(+), 4 deletions(-) diff --git a/dlls/quartz/videorenderer.c b/dlls/quartz/videorenderer.c index f009eda..db80b65 100644 --- a/dlls/quartz/videorenderer.c +++ b/dlls/quartz/videorenderer.c @@ -85,6 +85,7 @@ typedef struct VideoRendererImpl IUnknown * pUnkOuter; BOOL bUnkOuterValid; BOOL bAggregatable; + REFERENCE_TIME rtLastStop; } VideoRendererImpl; static LRESULT CALLBACK VideoWndProcA(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) @@ -361,9 +362,26 @@ static HRESULT VideoRenderer_Sample(LPVOID iface, IMediaSample * pSample) TRACE("%p %p\n", iface, pSample); + hr = IMediaSample_GetTime(pSample, &tStart, &tStop); + if (FAILED(hr)) + ERR("Cannot get sample time (%x)\n", hr); + + if (This->rtLastStop != tStart) + { + if (IMediaSample_IsDiscontinuity(pSample) == S_FALSE) + ERR("Unexpected discontinuity: Last: %u.%03u, tStart: %u.%03u\n", + (DWORD)(This->rtLastStop / 10000000), + (DWORD)((This->rtLastStop / 10000)%1000), + (DWORD)(tStart / 10000000), (DWORD)((tStart / 10000)%1000)); + This->rtLastStop = tStart; + } + /* Preroll means the sample isn't shown, this is used for key frames and things like that */ if (IMediaSample_IsPreroll(pSample) == S_OK) + { + This->rtLastStop = tStop; return S_OK; + } hr = IMediaSample_GetPointer(pSample, &pbSrcStream); if (FAILED(hr)) @@ -372,10 +390,6 @@ static HRESULT VideoRenderer_Sample(LPVOID iface, IMediaSample * pSample) return hr; } - hr = IMediaSample_GetTime(pSample, &tStart, &tStop); - if (FAILED(hr)) - ERR("Cannot get sample time (%x)\n", hr); - cbSrcStream = IMediaSample_GetActualDataLength(pSample); TRACE("val %p %ld\n", pbSrcStream, cbSrcStream); @@ -393,6 +407,37 @@ static HRESULT VideoRenderer_Sample(LPVOID iface, IMediaSample * pSample) } #endif + if (This->pClock && This->state == State_Running) + { + REFERENCE_TIME time, trefstart, trefstop; + LONG delta; + + /* Perhaps I <SHOULD> use the reference clock AdviseTime function here + * I'm not going to! When I tried, it seemed to generate lag and + * it caused instability. + */ + IReferenceClock_GetTime(This->pClock, &time); + + trefstart = This->rtStreamStart; + trefstop = (REFERENCE_TIME)((double)(tStop - tStart) / This->pInputPin->dRate) + This->rtStreamStart; + delta = (LONG)((trefstart-time)/10000); + This->rtStreamStart = trefstop; + This->rtLastStop = tStop; + + if (delta > 0) + { + TRACE("Sleeping for %u ms\n", delta); + Sleep(delta); + } + else if (time > trefstop) + { + TRACE("Dropping sample: Time: %lld ms trefstop: %lld ms!\n", time/10000, trefstop/10000); + This->rtLastStop = tStop; + return S_OK; + } + } + This->rtLastStop = tStop; + VideoRenderer_SendSampleData(This, pbSrcStream, cbSrcStream); return S_OK; @@ -464,6 +509,7 @@ HRESULT VideoRenderer_create(IUnknown * pUnkOuter, LPVOID * ppv) pVideoRenderer->pClock = NULL; pVideoRenderer->init = 0; pVideoRenderer->AutoShow = 1; + pVideoRenderer->rtLastStop = -1; ZeroMemory(&pVideoRenderer->filterInfo, sizeof(FILTER_INFO)); /* construct input pin */
1
0
0
0
Maarten Lankhorst : quartz: Fix bug in memallocator with test.
by Alexandre Julliard
29 Apr '08
29 Apr '08
Module: wine Branch: master Commit: 1fad872961499c48c2b33851636f8408d67321cc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1fad872961499c48c2b338516…
Author: Maarten Lankhorst <m.b.lankhorst(a)gmail.com> Date: Mon Apr 28 09:26:20 2008 -0700 quartz: Fix bug in memallocator with test. --- dlls/quartz/memallocator.c | 6 +++--- dlls/quartz/tests/memallocator.c | 34 +++++++++++++++++++++++++++------- 2 files changed, 30 insertions(+), 10 deletions(-) diff --git a/dlls/quartz/memallocator.c b/dlls/quartz/memallocator.c index cd87a34..12effbb 100644 --- a/dlls/quartz/memallocator.c +++ b/dlls/quartz/memallocator.c @@ -237,13 +237,13 @@ static HRESULT WINAPI BaseMemAllocator_Commit(IMemAllocator * iface) { if (!This->pProps) hr = VFW_E_SIZENOTSET; - else if (This->bCommitted) - hr = S_OK; - else if (This->bDecommitQueued) + else if (This->bDecommitQueued && This->bCommitted) { This->bDecommitQueued = FALSE; hr = S_OK; } + else if (This->bCommitted) + hr = S_OK; else { if (!(This->hSemWaiting = CreateSemaphoreW(NULL, This->pProps->cBuffers, This->pProps->cBuffers, NULL))) diff --git a/dlls/quartz/tests/memallocator.c b/dlls/quartz/tests/memallocator.c index 0a01db9..b0638e8 100644 --- a/dlls/quartz/tests/memallocator.c +++ b/dlls/quartz/tests/memallocator.c @@ -37,13 +37,15 @@ static void CommitDecommitTest(void) if (hr == S_OK) { - ALLOCATOR_PROPERTIES RequestedProps; - ALLOCATOR_PROPERTIES ActualProps; + ALLOCATOR_PROPERTIES RequestedProps; + ALLOCATOR_PROPERTIES ActualProps; - RequestedProps.cBuffers = 1; - RequestedProps.cbBuffer = 65536; - RequestedProps.cbAlign = 1; - RequestedProps.cbPrefix = 0; + IMediaSample *sample = NULL, *sample2 = NULL; + + RequestedProps.cBuffers = 2; + RequestedProps.cbBuffer = 65536; + RequestedProps.cbAlign = 1; + RequestedProps.cbPrefix = 0; hr = IMemAllocator_SetProperties(pMemAllocator, &RequestedProps, &ActualProps); ok(hr==S_OK, "SetProperties returned: %x\n", hr); @@ -53,12 +55,30 @@ static void CommitDecommitTest(void) hr = IMemAllocator_Commit(pMemAllocator); ok(hr==S_OK, "Commit returned: %x\n", hr); + hr = IMemAllocator_GetBuffer(pMemAllocator, &sample, NULL, NULL, 0); + ok(hr==S_OK, "Could not get a buffer: %x\n", hr); + hr = IMemAllocator_Decommit(pMemAllocator); ok(hr==S_OK, "Decommit returned: %x\n", hr); hr = IMemAllocator_Decommit(pMemAllocator); ok(hr==S_OK, "Cecommit returned: %x\n", hr); - IMemAllocator_Release(pMemAllocator); + /* Decommit and recommit while holding a sample */ + if (sample) + { + hr = IMemAllocator_Commit(pMemAllocator); + ok(hr==S_OK, "Commit returned: %x\n", hr); + + hr = IMemAllocator_GetBuffer(pMemAllocator, &sample2, NULL, NULL, 0); + ok(hr==S_OK, "Could not get a buffer: %x\n", hr); + IUnknown_Release(sample); + if (sample2) + IUnknown_Release(sample2); + + hr = IMemAllocator_Decommit(pMemAllocator); + ok(hr==S_OK, "Cecommit returned: %x\n", hr); + } + IMemAllocator_Release(pMemAllocator); } }
1
0
0
0
Maarten Lankhorst : quartz: Some state changes fixes.
by Alexandre Julliard
29 Apr '08
29 Apr '08
Module: wine Branch: master Commit: 4e761d26135ba73bc8916fa3a3579512c1c3978b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4e761d26135ba73bc8916fa3a…
Author: Maarten Lankhorst <m.b.lankhorst(a)gmail.com> Date: Mon Apr 28 16:35:53 2008 -0700 quartz: Some state changes fixes. --- dlls/quartz/pin.c | 18 +++++++++++------- 1 files changed, 11 insertions(+), 7 deletions(-) diff --git a/dlls/quartz/pin.c b/dlls/quartz/pin.c index 803a751..8619776 100644 --- a/dlls/quartz/pin.c +++ b/dlls/quartz/pin.c @@ -1145,7 +1145,6 @@ HRESULT OutputPin_CommitAllocator(OutputPin * This) TRACE("(%p)->()\n", This); EnterCriticalSection(This->pin.pCritSec); - if (!This->custom_allocator) { if (!This->pin.pConnectedTo || !This->pMemInputPin) hr = VFW_E_NOT_CONNECTED; @@ -1164,6 +1163,7 @@ HRESULT OutputPin_CommitAllocator(OutputPin * This) } LeaveCriticalSection(This->pin.pCritSec); + TRACE("--> %08x\n", hr); return hr; } @@ -1474,10 +1474,6 @@ static void CALLBACK PullPin_Thread_Process(PullPin *This) IMediaSample * pSample = NULL; ALLOCATOR_PROPERTIES allocProps; - EnterCriticalSection(This->pin.pCritSec); - SetEvent(This->hEventStateChanged); - LeaveCriticalSection(This->pin.pCritSec); - hr = IMemAllocator_GetProperties(This->pAlloc, &allocProps); This->cbAlign = allocProps.cbAlign; @@ -1502,6 +1498,10 @@ static void CALLBACK PullPin_Thread_Process(PullPin *This) if (FAILED(hr)) ERR("Request error: %x\n", hr); + EnterCriticalSection(This->pin.pCritSec); + SetEvent(This->hEventStateChanged); + LeaveCriticalSection(This->pin.pCritSec); + do { DWORD_PTR dwUser; @@ -1568,9 +1568,11 @@ static void CALLBACK PullPin_Thread_Process(PullPin *This) /* Can't reset state to Sleepy here because that might race, instead PauseProcessing will do that for us * Flush remaining samples */ - PullPin_Flush(This); + TRACE("Almost done..\n"); + if (This->fnDone) This->fnDone(This->pin.pUserData); + PullPin_Flush(This); TRACE("End: %08x, %d\n", hr, This->stop_playback); } @@ -1706,6 +1708,9 @@ HRESULT PullPin_PauseProcessing(PullPin * This) PullPin_WaitForStateChange(This, INFINITE); EnterCriticalSection(This->pin.pCritSec); + /* Faster! */ + IAsyncReader_BeginFlush(This->pReader); + assert(!This->stop_playback); assert(This->state == Req_Run|| This->state == Req_Sleepy); @@ -1737,7 +1742,6 @@ HRESULT PullPin_StopProcessing(PullPin * This) assert(WaitForSingleObject(This->thread_sleepy, 0) == WAIT_TIMEOUT); ResetEvent(This->hEventStateChanged); SetEvent(This->thread_sleepy); - return S_OK; }
1
0
0
0
Alexandre Julliard : winex11: Don' t put window manager decorations on shaped windows.
by Alexandre Julliard
29 Apr '08
29 Apr '08
Module: wine Branch: master Commit: 2bbf00ed084f422c66f67f2c3d9738d6211dc885 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2bbf00ed084f422c66f67f2c3…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Apr 29 12:46:16 2008 +0200 winex11: Don't put window manager decorations on shaped windows. --- dlls/winex11.drv/window.c | 3 +++ dlls/winex11.drv/x11drv.h | 1 + 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 0f84ae2..ad56a70 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -163,6 +163,7 @@ static unsigned long get_mwm_decorations( struct x11drv_win_data *data, if (!decorated_mode) return 0; if (IsRectEmpty( &data->window_rect )) return 0; + if (data->shaped) return 0; if (ex_style & WS_EX_TOOLWINDOW) return 0; @@ -321,6 +322,7 @@ static void sync_window_region( Display *display, struct x11drv_win_data *data, { #ifdef HAVE_LIBXSHAPE if (!data->whole_window) return; + data->shaped = FALSE; if (!hrgn) { @@ -341,6 +343,7 @@ static void sync_window_region( Display *display, struct x11drv_win_data *data, pRegionData->rdh.nCount, ShapeSet, YXBanded ); wine_tsx11_unlock(); HeapFree(GetProcessHeap(), 0, pRegionData); + data->shaped = TRUE; } } #endif /* HAVE_LIBXSHAPE */ diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index f46eaaa..2f2e583 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -690,6 +690,7 @@ struct x11drv_win_data BOOL mapped : 1; /* is window mapped? (in either normal or iconic state) */ BOOL iconic : 1; /* is window in iconic state? */ BOOL embedded : 1; /* is window an XEMBED client? */ + BOOL shaped : 1; /* is window using a custom region shape? */ int wm_state; /* current value of the WM_STATE property */ DWORD net_wm_state; /* bit mask of active x11drv_net_wm_state values */ HBITMAP hWMIconBitmap;
1
0
0
0
Alexandre Julliard : documentation: Remove PACKAGING, this is maintained on the wiki now.
by Alexandre Julliard
29 Apr '08
29 Apr '08
Module: wine Branch: master Commit: 6ff4ba7e680466b5966a4c8ed76017f7d51750c1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6ff4ba7e680466b5966a4c8ed…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Apr 29 12:46:30 2008 +0200 documentation: Remove PACKAGING, this is maintained on the wiki now. --- documentation/PACKAGING | 500 ----------------------------------------------- 1 files changed, 0 insertions(+), 500 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=6ff4ba7e680466b5966a4…
1
0
0
0
Jacek Caban : mshtml: Added IDispatchEx support to HTMLInputElement.
by Alexandre Julliard
29 Apr '08
29 Apr '08
Module: wine Branch: master Commit: 7582518e18b50bf4ebbd2cda30822d25be3d81a9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7582518e18b50bf4ebbd2cda3…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Apr 29 01:39:09 2008 +0200 mshtml: Added IDispatchEx support to HTMLInputElement. --- dlls/mshtml/dispex.c | 2 ++ dlls/mshtml/htmlinput.c | 16 ++++++++++++++++ dlls/mshtml/mshtml_private.h | 2 ++ 3 files changed, 20 insertions(+), 0 deletions(-) diff --git a/dlls/mshtml/dispex.c b/dlls/mshtml/dispex.c index 834f3b3..37a3b3d 100644 --- a/dlls/mshtml/dispex.c +++ b/dlls/mshtml/dispex.c @@ -54,6 +54,7 @@ static REFIID tid_ids[] = { &DIID_DispHTMLDocument, &DIID_DispHTMLDOMTextNode, &DIID_DispHTMLElementCollection, + &DIID_DispHTMLInputElement, &DIID_DispHTMLUnknownElement, &DIID_DispHTMLWindow2, &IID_IHTMLDocument2, @@ -66,6 +67,7 @@ static REFIID tid_ids[] = { &IID_IHTMLElement, &IID_IHTMLElement2, &IID_IHTMLElementCollection, + &IID_IHTMLInputElement, &IID_IHTMLWindow2, &IID_IHTMLWindow3, &IID_IOmNavigator diff --git a/dlls/mshtml/htmlinput.c b/dlls/mshtml/htmlinput.c index dd0a8b5..3ba954f 100644 --- a/dlls/mshtml/htmlinput.c +++ b/dlls/mshtml/htmlinput.c @@ -1059,6 +1059,20 @@ static const NodeImplVtbl HTMLInputElementImplVtbl = { HTMLInputElement_destructor }; +static dispex_static_data_t HTMLInputElement_dispex = { + NULL, + DispHTMLInputElement_tid, + NULL, + { + IHTMLDOMNode_tid, + IHTMLDOMNode2_tid, + IHTMLElement_tid, + IHTMLElement2_tid, + IHTMLInputElement_tid, + 0 + } +}; + HTMLElement *HTMLInputElement_Create(nsIDOMHTMLElement *nselem) { HTMLInputElement *ret = heap_alloc_zero(sizeof(HTMLInputElement)); @@ -1069,6 +1083,8 @@ HTMLElement *HTMLInputElement_Create(nsIDOMHTMLElement *nselem) ret->lpHTMLInputElementVtbl = &HTMLInputElementVtbl; ret->element.node.vtbl = &HTMLInputElementImplVtbl; + init_dispex(&ret->element.node.dispex, (IUnknown*)HTMLINPUT(ret), &HTMLInputElement_dispex); + nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLInputElement, (void**)&ret->nsinput); if(NS_FAILED(nsres)) diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 42381b5..911abe0 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -64,6 +64,7 @@ typedef enum { DispHTMLDocument_tid, DispHTMLDOMTextNode_tid, DispHTMLElementCollection_tid, + DispHTMLInputElement_tid, DispHTMLUnknownElement_tid, DispHTMLWindow2_tid, IHTMLDocument2_tid, @@ -76,6 +77,7 @@ typedef enum { IHTMLElement_tid, IHTMLElement2_tid, IHTMLElementCollection_tid, + IHTMLInputElement_tid, IHTMLWindow2_tid, IHTMLWindow3_tid, IOmNavigator_tid,
1
0
0
0
Jacek Caban : mshtml: Added IDispatchEx support to HTMLOptionElement.
by Alexandre Julliard
29 Apr '08
29 Apr '08
Module: wine Branch: master Commit: 928914c81ebbbb21ff66e3b044036bf7a4172d08 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=928914c81ebbbb21ff66e3b04…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Apr 29 01:39:38 2008 +0200 mshtml: Added IDispatchEx support to HTMLOptionElement. --- dlls/mshtml/dispex.c | 2 ++ dlls/mshtml/htmloption.c | 16 ++++++++++++++++ dlls/mshtml/mshtml_private.h | 2 ++ dlls/mshtml/tests/dom.c | 4 ++-- 4 files changed, 22 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/dispex.c b/dlls/mshtml/dispex.c index 37a3b3d..6f17a9d 100644 --- a/dlls/mshtml/dispex.c +++ b/dlls/mshtml/dispex.c @@ -55,6 +55,7 @@ static REFIID tid_ids[] = { &DIID_DispHTMLDOMTextNode, &DIID_DispHTMLElementCollection, &DIID_DispHTMLInputElement, + &DIID_DispHTMLOptionElement, &DIID_DispHTMLUnknownElement, &DIID_DispHTMLWindow2, &IID_IHTMLDocument2, @@ -68,6 +69,7 @@ static REFIID tid_ids[] = { &IID_IHTMLElement2, &IID_IHTMLElementCollection, &IID_IHTMLInputElement, + &IID_IHTMLOptionElement, &IID_IHTMLWindow2, &IID_IHTMLWindow3, &IID_IOmNavigator diff --git a/dlls/mshtml/htmloption.c b/dlls/mshtml/htmloption.c index 7252dde..a642295 100644 --- a/dlls/mshtml/htmloption.c +++ b/dlls/mshtml/htmloption.c @@ -331,6 +331,20 @@ static const NodeImplVtbl HTMLOptionElementImplVtbl = { HTMLOptionElement_destructor }; +static dispex_static_data_t HTMLOptionElement_dispex = { + NULL, + DispHTMLOptionElement_tid, + NULL, + { + IHTMLDOMNode_tid, + IHTMLDOMNode2_tid, + IHTMLElement_tid, + IHTMLElement2_tid, + IHTMLOptionElement_tid, + 0 + } +}; + HTMLElement *HTMLOptionElement_Create(nsIDOMHTMLElement *nselem) { HTMLOptionElement *ret = heap_alloc_zero(sizeof(HTMLOptionElement)); @@ -345,6 +359,8 @@ HTMLElement *HTMLOptionElement_Create(nsIDOMHTMLElement *nselem) if(NS_FAILED(nsres)) ERR("Could not get nsIDOMHTMLOptionElement interface: %08x\n", nsres); + init_dispex(&ret->element.node.dispex, (IUnknown*)HTMLOPTION(ret), &HTMLOptionElement_dispex); + return &ret->element; } diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 911abe0..55c0090 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -65,6 +65,7 @@ typedef enum { DispHTMLDOMTextNode_tid, DispHTMLElementCollection_tid, DispHTMLInputElement_tid, + DispHTMLOptionElement_tid, DispHTMLUnknownElement_tid, DispHTMLWindow2_tid, IHTMLDocument2_tid, @@ -78,6 +79,7 @@ typedef enum { IHTMLElement2_tid, IHTMLElementCollection_tid, IHTMLInputElement_tid, + IHTMLOptionElement_tid, IHTMLWindow2_tid, IHTMLWindow3_tid, IOmNavigator_tid, diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 7d607d7..7a9b05d 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -221,10 +221,10 @@ static const elem_type_info_t elem_type_infos[] = { {"TITLE", elem_iids, NULL}, {"BODY", body_iids, NULL}, {"A", anchor_iids, NULL}, - {"INPUT", input_iids, NULL}, + {"INPUT", input_iids, &DIID_DispHTMLInputElement}, {"SELECT", select_iids, NULL}, {"TEXTAREA", textarea_iids, NULL}, - {"OPTION", option_iids, NULL}, + {"OPTION", option_iids, &DIID_DispHTMLOptionElement}, {"STYLE", elem_iids, NULL}, {"BLOCKQUOTE",elem_iids, NULL}, {"P", elem_iids, NULL},
1
0
0
0
Jacek Caban : mshtml: Added indexed access to HTMLElementCollection object support.
by Alexandre Julliard
29 Apr '08
29 Apr '08
Module: wine Branch: master Commit: 1597967417caa123153bec5b307f31ed7fd5fa18 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1597967417caa123153bec5b3…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Apr 29 01:38:41 2008 +0200 mshtml: Added indexed access to HTMLElementCollection object support. --- dlls/mshtml/htmlelem.c | 52 +++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 51 insertions(+), 1 deletions(-) diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c index faf888c..f9b416a 100644 --- a/dlls/mshtml/htmlelem.c +++ b/dlls/mshtml/htmlelem.c @@ -1651,6 +1651,51 @@ static HRESULT WINAPI HTMLElementCollection_tags(IHTMLElementCollection *iface, return S_OK; } +#define DISPID_ELEMCOL_0 MSHTML_DISPID_CUSTOM_MIN + +static HRESULT HTMLElementCollection_get_dispid(IUnknown *iface, BSTR name, DWORD flags, DISPID *dispid) +{ + HTMLElementCollection *This = ELEMCOL_THIS(iface); + WCHAR *ptr; + DWORD idx=0; + + for(ptr = name; *ptr && isdigitW(*ptr); ptr++) + idx = idx*10 + (*ptr-'0'); + + if(*ptr || idx >= This->len) + return DISP_E_UNKNOWNNAME; + + *dispid = DISPID_ELEMCOL_0 + idx; + TRACE("ret %x\n", *dispid); + return S_OK; +} + +static HRESULT HTMLElementCollection_invoke(IUnknown *iface, DISPID id, LCID lcid, WORD flags, DISPPARAMS *params, + VARIANT *res, EXCEPINFO *ei, IServiceProvider *caller) +{ + HTMLElementCollection *This = ELEMCOL_THIS(iface); + DWORD idx; + + TRACE("(%p)->(%x %x %x %p %p %p %p)\n", This, id, lcid, flags, params, res, ei, caller); + + idx = id - DISPID_ELEMCOL_0; + if(idx >= This->len) + return DISP_E_UNKNOWNNAME; + + switch(flags) { + case INVOKE_PROPERTYGET: + V_VT(res) = VT_DISPATCH; + V_DISPATCH(res) = (IDispatch*)HTMLELEM(This->elems[idx]); + IHTMLElement_AddRef(HTMLELEM(This->elems[idx])); + break; + default: + FIXME("unimplemented flags %x\n", flags); + return E_NOTIMPL; + } + + return S_OK; +} + #undef ELEMCOL_THIS static const IHTMLElementCollectionVtbl HTMLElementCollectionVtbl = { @@ -1669,8 +1714,13 @@ static const IHTMLElementCollectionVtbl HTMLElementCollectionVtbl = { HTMLElementCollection_tags }; +static const dispex_static_data_vtbl_t HTMLElementColection_dispex_vtbl = { + HTMLElementCollection_get_dispid, + HTMLElementCollection_invoke +}; + static dispex_static_data_t HTMLElementCollection_dispex = { - NULL, + &HTMLElementColection_dispex_vtbl, DispHTMLElementCollection_tid, NULL, {
1
0
0
0
Jacek Caban : mshtml: Added support for custom DISPIDs.
by Alexandre Julliard
29 Apr '08
29 Apr '08
Module: wine Branch: master Commit: ef4200fcf78159e1b7f1d5f87f98b054d15dbf75 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ef4200fcf78159e1b7f1d5f87…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Apr 29 01:38:09 2008 +0200 mshtml: Added support for custom DISPIDs. --- dlls/mshtml/dispex.c | 16 ++++++++++++++++ dlls/mshtml/htmldoc.c | 1 + dlls/mshtml/htmlelem.c | 2 ++ dlls/mshtml/htmltextnode.c | 1 + dlls/mshtml/htmlwindow.c | 1 + dlls/mshtml/mshtml_private.h | 11 ++++++++++- dlls/mshtml/omnavigator.c | 1 + 7 files changed, 32 insertions(+), 1 deletions(-) diff --git a/dlls/mshtml/dispex.c b/dlls/mshtml/dispex.c index 153d864..834f3b3 100644 --- a/dlls/mshtml/dispex.c +++ b/dlls/mshtml/dispex.c @@ -277,6 +277,11 @@ void call_disp_func(HTMLDocument *doc, IDispatch *disp) VariantClear(&res); } +static inline BOOL is_custom_dispid(DISPID id) +{ + return MSHTML_DISPID_CUSTOM_MIN <= id && id <= MSHTML_DISPID_CUSTOM_MAX; +} + #define DISPATCHEX_THIS(iface) DEFINE_THIS(DispatchEx, IDispatchEx, iface) static HRESULT WINAPI DispatchEx_QueryInterface(IDispatchEx *iface, REFIID riid, void **ppv) @@ -395,6 +400,14 @@ static HRESULT WINAPI DispatchEx_GetDispID(IDispatchEx *iface, BSTR bstrName, DW min = n+1; } + if(This->data->vtbl && This->data->vtbl->get_dispid) { + HRESULT hres; + + hres = This->data->vtbl->get_dispid(This->outer, bstrName, grfdex, pid); + if(hres != DISP_E_UNKNOWNNAME) + return hres; + } + TRACE("not found %s\n", debugstr_w(bstrName)); return DISP_E_UNKNOWNNAME; } @@ -412,6 +425,9 @@ static HRESULT WINAPI DispatchEx_InvokeEx(IDispatchEx *iface, DISPID id, LCID lc TRACE("(%p)->(%x %x %x %p %p %p %p)\n", This, id, lcid, wFlags, pdp, pvarRes, pei, pspCaller); + if(is_custom_dispid(id) && This->data->vtbl && This->data->vtbl->invoke) + return This->data->vtbl->invoke(This->outer, id, lcid, wFlags, pdp, pvarRes, pei, pspCaller); + if(wFlags == DISPATCH_CONSTRUCT) { FIXME("DISPATCH_CONSTRUCT not implemented\n"); return E_NOTIMPL; diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c index 425fb39..73e31f1 100644 --- a/dlls/mshtml/htmldoc.c +++ b/dlls/mshtml/htmldoc.c @@ -1491,6 +1491,7 @@ static const IDispatchExVtbl DocDispatchExVtbl = { }; static dispex_static_data_t HTMLDocument_dispex = { + NULL, DispHTMLDocument_tid, NULL, { diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c index c44e2e5..faf888c 100644 --- a/dlls/mshtml/htmlelem.c +++ b/dlls/mshtml/htmlelem.c @@ -1283,6 +1283,7 @@ static const NodeImplVtbl HTMLElementImplVtbl = { }; static dispex_static_data_t HTMLElement_dispex = { + NULL, DispHTMLUnknownElement_tid, NULL, { @@ -1669,6 +1670,7 @@ static const IHTMLElementCollectionVtbl HTMLElementCollectionVtbl = { }; static dispex_static_data_t HTMLElementCollection_dispex = { + NULL, DispHTMLElementCollection_tid, NULL, { diff --git a/dlls/mshtml/htmltextnode.c b/dlls/mshtml/htmltextnode.c index fa6308e..b98821b 100644 --- a/dlls/mshtml/htmltextnode.c +++ b/dlls/mshtml/htmltextnode.c @@ -186,6 +186,7 @@ static const NodeImplVtbl HTMLDOMTextNodeImplVtbl = { }; static dispex_static_data_t HTMLDOMTextNode_dispex = { + NULL, DispHTMLDOMTextNode_tid, 0, { diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index 82b03e6..2073132 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -1108,6 +1108,7 @@ static const IDispatchExVtbl WindowDispExVtbl = { }; static dispex_static_data_t HTMLWindow_dispex = { + NULL, DispHTMLWindow2_tid, NULL, { diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 126bc2e..42381b5 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -1,5 +1,5 @@ /* - * Copyright 2005-2006 Jacek Caban for CodeWeavers + * Copyright 2005-2008 Jacek Caban for CodeWeavers * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -84,7 +84,16 @@ typedef enum { typedef struct dispex_data_t dispex_data_t; +#define MSHTML_DISPID_CUSTOM_MIN 0x60000000 +#define MSHTML_DISPID_CUSTOM_MAX 0x6fffffff + +typedef struct { + HRESULT (*get_dispid)(IUnknown*,BSTR,DWORD,DISPID*); + HRESULT (*invoke)(IUnknown*,DISPID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,IServiceProvider*); +} dispex_static_data_vtbl_t; + typedef struct { + const dispex_static_data_vtbl_t *vtbl; const tid_t disp_tid; dispex_data_t *data; const tid_t iface_tids[]; diff --git a/dlls/mshtml/omnavigator.c b/dlls/mshtml/omnavigator.c index 742df19..74b2cfd 100644 --- a/dlls/mshtml/omnavigator.c +++ b/dlls/mshtml/omnavigator.c @@ -301,6 +301,7 @@ static const IOmNavigatorVtbl OmNavigatorVtbl = { }; static dispex_static_data_t OmNavigator_dispex = { + NULL, IOmNavigator_tid, NULL, {
1
0
0
0
← Newer
1
...
6
7
8
9
10
11
12
...
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