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
August 2009
----- 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
1042 discussions
Start a n
N
ew thread
Huw Davies : include: Remove const from [out] parameter.
by Alexandre Julliard
18 Aug '09
18 Aug '09
Module: wine Branch: master Commit: 85342a1562eccc126e0cf9853adc4db76fe05489 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=85342a1562eccc126e0cf9853…
Author: Huw Davies <huw(a)codeweavers.com> Date: Tue Aug 18 10:37:32 2009 +0100 include: Remove const from [out] parameter. --- dlls/msdaps/usrmarshal.c | 4 ++-- include/sesprp.idl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/msdaps/usrmarshal.c b/dlls/msdaps/usrmarshal.c index 281b1f7..917b426 100644 --- a/dlls/msdaps/usrmarshal.c +++ b/dlls/msdaps/usrmarshal.c @@ -209,7 +209,7 @@ HRESULT __RPC_STUB IDBDataSourceAdmin_ModifyDataSource_Stub(IDBDataSourceAdmin* HRESULT CALLBACK ISessionProperties_GetProperties_Proxy(ISessionProperties* This, ULONG cPropertyIDSets, const DBPROPIDSET rgPropertyIDSets[], ULONG *pcPropertySets, - const DBPROPSET **prgPropertySets) + DBPROPSET **prgPropertySets) { FIXME("(%p, %d, %p, %p, %p): stub\n", This, cPropertyIDSets, rgPropertyIDSets, pcPropertySets, prgPropertySets); @@ -218,7 +218,7 @@ HRESULT CALLBACK ISessionProperties_GetProperties_Proxy(ISessionProperties* This HRESULT __RPC_STUB ISessionProperties_GetProperties_Stub(ISessionProperties* This, ULONG cPropertyIDSets, const DBPROPIDSET *rgPropertyIDSets, ULONG *pcPropertySets, - const DBPROPSET **prgPropertySets, IErrorInfo **ppErrorInfoRem) + DBPROPSET **prgPropertySets, IErrorInfo **ppErrorInfoRem) { FIXME("(%p, %d, %p, %p, %p, %p): stub\n", This, cPropertyIDSets, rgPropertyIDSets, pcPropertySets, prgPropertySets, ppErrorInfoRem); diff --git a/include/sesprp.idl b/include/sesprp.idl index 11e6391..b4aa727 100644 --- a/include/sesprp.idl +++ b/include/sesprp.idl @@ -27,13 +27,13 @@ interface ISessionProperties : IUnknown HRESULT GetProperties([in] ULONG cPropertyIDSets, [in, size_is(cPropertyIDSets)] const DBPROPIDSET rgPropertyIDSets[], [in, out] ULONG *pcPropertySets, - [out, size_is(,*pcPropertySets)] const DBPROPSET **prgPropertySets); + [out, size_is(,*pcPropertySets)] DBPROPSET **prgPropertySets); [call_as(GetProperties)] HRESULT RemoteGetProperties([in] ULONG cPropertyIDSets, [in, unique, size_is(cPropertyIDSets)] const DBPROPIDSET *rgPropertyIDSets, [in, out] ULONG *pcPropertySets, - [out, size_is(,*pcPropertySets)] const DBPROPSET **prgPropertySets, + [out, size_is(,*pcPropertySets)] DBPROPSET **prgPropertySets, [out] IErrorInfo **ppErrorInfoRem);
1
0
0
0
Vincent Povirk : windowscodecs: Implement CopyPalette for the GIF decoder.
by Alexandre Julliard
18 Aug '09
18 Aug '09
Module: wine Branch: master Commit: 548cd05ceb018314228a60d384e461cca6b02d26 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=548cd05ceb018314228a60d38…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Mon Aug 17 10:56:34 2009 -0500 windowscodecs: Implement CopyPalette for the GIF decoder. --- dlls/windowscodecs/gifformat.c | 39 +++++++++++++++++++++++++++++++++++++-- 1 files changed, 37 insertions(+), 2 deletions(-) diff --git a/dlls/windowscodecs/gifformat.c b/dlls/windowscodecs/gifformat.c index a900043..9423ec3 100644 --- a/dlls/windowscodecs/gifformat.c +++ b/dlls/windowscodecs/gifformat.c @@ -129,8 +129,43 @@ static HRESULT WINAPI GifFrameDecode_GetResolution(IWICBitmapFrameDecode *iface, static HRESULT WINAPI GifFrameDecode_CopyPalette(IWICBitmapFrameDecode *iface, IWICPalette *pIPalette) { - FIXME("(%p,%p): stub\n", iface, pIPalette); - return E_NOTIMPL; + GifFrameDecode *This = (GifFrameDecode*)iface; + WICColor colors[256]; + ColorMapObject *cm = This->frame->ImageDesc.ColorMap; + int i, trans; + ExtensionBlock *eb; + TRACE("(%p,%p)\n", iface, pIPalette); + + if (!cm) cm = This->parent->gif->SColorMap; + + if (cm->ColorCount > 256) + { + ERR("GIF contains %i colors???\n", cm->ColorCount); + return E_FAIL; + } + + for (i = 0; i < cm->ColorCount; i++) { + colors[i] = 0xff000000| /* alpha */ + cm->Colors[i].Red << 16| + cm->Colors[i].Green << 8| + cm->Colors[i].Blue; + } + + /* look for the transparent color extension */ + for (i = 0; i < This->frame->ExtensionBlockCount; ++i) { + eb = This->frame->ExtensionBlocks + i; + if (eb->Function == 0xF9 && eb->ByteCount == 4) { + if ((eb->Bytes[0] & 1) == 1) { + trans = (unsigned char)eb->Bytes[3]; + colors[trans] &= 0xffffff; /* set alpha to 0 */ + break; + } + } + } + + IWICPalette_InitializeCustom(pIPalette, colors, cm->ColorCount); + + return S_OK; } static HRESULT WINAPI GifFrameDecode_CopyPixels(IWICBitmapFrameDecode *iface,
1
0
0
0
Vincent Povirk : windowscodecs: Implement GetSize for the GIF decoder.
by Alexandre Julliard
18 Aug '09
18 Aug '09
Module: wine Branch: master Commit: d095d27d929c20b74d75212a2674485648701272 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d095d27d929c20b74d75212a2…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Mon Aug 17 10:43:10 2009 -0500 windowscodecs: Implement GetSize for the GIF decoder. --- dlls/windowscodecs/gifformat.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/dlls/windowscodecs/gifformat.c b/dlls/windowscodecs/gifformat.c index d236ca3..a900043 100644 --- a/dlls/windowscodecs/gifformat.c +++ b/dlls/windowscodecs/gifformat.c @@ -102,8 +102,13 @@ static ULONG WINAPI GifFrameDecode_Release(IWICBitmapFrameDecode *iface) static HRESULT WINAPI GifFrameDecode_GetSize(IWICBitmapFrameDecode *iface, UINT *puiWidth, UINT *puiHeight) { - FIXME("(%p,%p,%p): stub\n", iface, puiWidth, puiHeight); - return E_NOTIMPL; + GifFrameDecode *This = (GifFrameDecode*)iface; + TRACE("(%p,%p,%p)\n", iface, puiWidth, puiHeight); + + *puiWidth = This->frame->ImageDesc.Width; + *puiHeight = This->frame->ImageDesc.Height; + + return S_OK; } static HRESULT WINAPI GifFrameDecode_GetPixelFormat(IWICBitmapFrameDecode *iface,
1
0
0
0
Vincent Povirk : windowscodecs: Implement GetFrameCount and GetFrame for the GIF decoder.
by Alexandre Julliard
18 Aug '09
18 Aug '09
Module: wine Branch: master Commit: 45e9804a8e000c1c7b394811063ad8e1ba28b905 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=45e9804a8e000c1c7b3948110…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Mon Aug 17 10:30:28 2009 -0500 windowscodecs: Implement GetFrameCount and GetFrame for the GIF decoder. --- dlls/windowscodecs/gifformat.c | 162 +++++++++++++++++++++++++++++++++++++++- 1 files changed, 158 insertions(+), 4 deletions(-) diff --git a/dlls/windowscodecs/gifformat.c b/dlls/windowscodecs/gifformat.c index 77010dd..d236ca3 100644 --- a/dlls/windowscodecs/gifformat.c +++ b/dlls/windowscodecs/gifformat.c @@ -42,6 +42,134 @@ typedef struct { GifFileType *gif; } GifDecoder; +typedef struct { + const IWICBitmapFrameDecodeVtbl *lpVtbl; + LONG ref; + SavedImage *frame; + GifDecoder *parent; +} GifFrameDecode; + +static HRESULT WINAPI GifFrameDecode_QueryInterface(IWICBitmapFrameDecode *iface, REFIID iid, + void **ppv) +{ + GifFrameDecode *This = (GifFrameDecode*)iface; + TRACE("(%p,%s,%p)\n", iface, debugstr_guid(iid), ppv); + + if (!ppv) return E_INVALIDARG; + + if (IsEqualIID(&IID_IUnknown, iid) || + IsEqualIID(&IID_IWICBitmapSource, iid) || + IsEqualIID(&IID_IWICBitmapFrameDecode, iid)) + { + *ppv = This; + } + else + { + *ppv = NULL; + return E_NOINTERFACE; + } + + IUnknown_AddRef((IUnknown*)*ppv); + return S_OK; +} + +static ULONG WINAPI GifFrameDecode_AddRef(IWICBitmapFrameDecode *iface) +{ + GifFrameDecode *This = (GifFrameDecode*)iface; + ULONG ref = InterlockedIncrement(&This->ref); + + TRACE("(%p) refcount=%u\n", iface, ref); + + return ref; +} + +static ULONG WINAPI GifFrameDecode_Release(IWICBitmapFrameDecode *iface) +{ + GifFrameDecode *This = (GifFrameDecode*)iface; + ULONG ref = InterlockedDecrement(&This->ref); + + TRACE("(%p) refcount=%u\n", iface, ref); + + if (ref == 0) + { + IUnknown_Release((IUnknown*)This->parent); + HeapFree(GetProcessHeap(), 0, This); + } + + return ref; +} + +static HRESULT WINAPI GifFrameDecode_GetSize(IWICBitmapFrameDecode *iface, + UINT *puiWidth, UINT *puiHeight) +{ + FIXME("(%p,%p,%p): stub\n", iface, puiWidth, puiHeight); + return E_NOTIMPL; +} + +static HRESULT WINAPI GifFrameDecode_GetPixelFormat(IWICBitmapFrameDecode *iface, + WICPixelFormatGUID *pPixelFormat) +{ + memcpy(pPixelFormat, &GUID_WICPixelFormat8bppIndexed, sizeof(GUID)); + + return S_OK; +} + +static HRESULT WINAPI GifFrameDecode_GetResolution(IWICBitmapFrameDecode *iface, + double *pDpiX, double *pDpiY) +{ + FIXME("(%p,%p,%p): stub\n", iface, pDpiX, pDpiY); + return E_NOTIMPL; +} + +static HRESULT WINAPI GifFrameDecode_CopyPalette(IWICBitmapFrameDecode *iface, + IWICPalette *pIPalette) +{ + FIXME("(%p,%p): stub\n", iface, pIPalette); + return E_NOTIMPL; +} + +static HRESULT WINAPI GifFrameDecode_CopyPixels(IWICBitmapFrameDecode *iface, + const WICRect *prc, UINT cbStride, UINT cbBufferSize, BYTE *pbBuffer) +{ + FIXME("(%p,%p,%u,%u,%p): stub\n", iface, prc, cbStride, cbBufferSize, pbBuffer); + return E_NOTIMPL; +} + +static HRESULT WINAPI GifFrameDecode_GetMetadataQueryReader(IWICBitmapFrameDecode *iface, + IWICMetadataQueryReader **ppIMetadataQueryReader) +{ + TRACE("(%p,%p)\n", iface, ppIMetadataQueryReader); + return WINCODEC_ERR_UNSUPPORTEDOPERATION; +} + +static HRESULT WINAPI GifFrameDecode_GetColorContexts(IWICBitmapFrameDecode *iface, + UINT cCount, IWICColorContext **ppIColorContexts, UINT *pcActualCount) +{ + TRACE("(%p,%u,%p,%p)\n", iface, cCount, ppIColorContexts, pcActualCount); + return WINCODEC_ERR_UNSUPPORTEDOPERATION; +} + +static HRESULT WINAPI GifFrameDecode_GetThumbnail(IWICBitmapFrameDecode *iface, + IWICBitmapSource **ppIThumbnail) +{ + TRACE("(%p,%p)\n", iface, ppIThumbnail); + return WINCODEC_ERR_CODECNOTHUMBNAIL; +} + +static const IWICBitmapFrameDecodeVtbl GifFrameDecode_Vtbl = { + GifFrameDecode_QueryInterface, + GifFrameDecode_AddRef, + GifFrameDecode_Release, + GifFrameDecode_GetSize, + GifFrameDecode_GetPixelFormat, + GifFrameDecode_GetResolution, + GifFrameDecode_CopyPalette, + GifFrameDecode_CopyPixels, + GifFrameDecode_GetMetadataQueryReader, + GifFrameDecode_GetColorContexts, + GifFrameDecode_GetThumbnail +}; + static HRESULT WINAPI GifDecoder_QueryInterface(IWICBitmapDecoder *iface, REFIID iid, void **ppv) { @@ -199,15 +327,41 @@ static HRESULT WINAPI GifDecoder_GetThumbnail(IWICBitmapDecoder *iface, static HRESULT WINAPI GifDecoder_GetFrameCount(IWICBitmapDecoder *iface, UINT *pCount) { - FIXME("(%p,%p): stub\n", iface, pCount); - return E_NOTIMPL; + GifDecoder *This = (GifDecoder*)iface; + TRACE("(%p,%p)\n", iface, pCount); + + if (!This->initialized) return WINCODEC_ERR_NOTINITIALIZED; + + *pCount = This->gif->ImageCount; + + TRACE("<- %u\n", *pCount); + + return S_OK; } static HRESULT WINAPI GifDecoder_GetFrame(IWICBitmapDecoder *iface, UINT index, IWICBitmapFrameDecode **ppIBitmapFrame) { - FIXME("(%p,%u,%p): stub\n", iface, index, ppIBitmapFrame); - return E_NOTIMPL; + GifDecoder *This = (GifDecoder*)iface; + GifFrameDecode *result; + TRACE("(%p,%u,%p)\n", iface, index, ppIBitmapFrame); + + if (!This->initialized) return WINCODEC_ERR_NOTINITIALIZED; + + if (index >= This->gif->ImageCount) return E_INVALIDARG; + + result = HeapAlloc(GetProcessHeap(), 0, sizeof(GifFrameDecode)); + if (!result) return E_OUTOFMEMORY; + + result->lpVtbl = &GifFrameDecode_Vtbl; + result->ref = 1; + result->frame = &This->gif->SavedImages[index]; + IWICBitmapDecoder_AddRef(iface); + result->parent = This; + + *ppIBitmapFrame = (IWICBitmapFrameDecode*)result; + + return S_OK; } static const IWICBitmapDecoderVtbl GifDecoder_Vtbl = {
1
0
0
0
Vincent Povirk : windowscodecs: Implement Initialize for the GIF decoder.
by Alexandre Julliard
18 Aug '09
18 Aug '09
Module: wine Branch: master Commit: e6eb982ca66017781b56e695b08bfbd27f6971d9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e6eb982ca66017781b56e695b…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Mon Aug 17 10:18:31 2009 -0500 windowscodecs: Implement Initialize for the GIF decoder. --- dlls/windowscodecs/Makefile.in | 3 +- dlls/windowscodecs/gifformat.c | 54 ++- dlls/windowscodecs/ungif.c | 999 ++++++++++++++++++++++++++++++++++++++++ dlls/windowscodecs/ungif.h | 169 +++++++ 4 files changed, 1222 insertions(+), 3 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=e6eb982ca66017781b56e…
1
0
0
0
Vincent Povirk : windowscodecs: Register the GIF decoder.
by Alexandre Julliard
18 Aug '09
18 Aug '09
Module: wine Branch: master Commit: b9b06bc2c914b4ee19be0a27ff6b199455762a3e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b9b06bc2c914b4ee19be0a27f…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Mon Aug 17 09:50:31 2009 -0500 windowscodecs: Register the GIF decoder. --- dlls/windowscodecs/regsvr.c | 27 ++++++++++++++++++++++++++- 1 files changed, 26 insertions(+), 1 deletions(-) diff --git a/dlls/windowscodecs/regsvr.c b/dlls/windowscodecs/regsvr.c index 8e3328a..5860a82 100644 --- a/dlls/windowscodecs/regsvr.c +++ b/dlls/windowscodecs/regsvr.c @@ -759,8 +759,9 @@ static struct regsvr_coclass const coclass_list[] = { /*********************************************************************** * decoder list */ +static const BYTE mask_all[] = {0xff,0xff,0xff,0xff,0xff,0xff}; + static const BYTE bmp_magic[] = {0x42,0x4d}; -static const BYTE mask_all[] = {0xff,0xff}; static GUID const * const bmp_formats[] = { &GUID_WICPixelFormat1bppIndexed, @@ -780,6 +781,20 @@ static struct decoder_pattern const bmp_patterns[] = { {0} }; +static const BYTE gif87a_magic[6] = "GIF87a"; +static const BYTE gif89a_magic[6] = "GIF89a"; + +static GUID const * const gif_formats[] = { + &GUID_WICPixelFormat8bppIndexed, + NULL +}; + +static struct decoder_pattern const gif_patterns[] = { + {6,0,gif87a_magic,mask_all,0}, + {6,0,gif89a_magic,mask_all,0}, + {0} +}; + static struct regsvr_decoder const decoder_list[] = { { &CLSID_WICBmpDecoder, "The Wine Project", @@ -791,6 +806,16 @@ static struct regsvr_decoder const decoder_list[] = { bmp_formats, bmp_patterns }, + { &CLSID_WICGifDecoder, + "The Wine Project", + "GIF Decoder", + "1.0.0.0", + &GUID_VendorMicrosoft, + "image/gif", + ".gif", + gif_formats, + gif_patterns + }, { NULL } /* list terminator */ };
1
0
0
0
Vincent Povirk : windowscodecs: Add stub GIF decoder.
by Alexandre Julliard
18 Aug '09
18 Aug '09
Module: wine Branch: master Commit: 0c4a5620e832eaf3e37d4c3cb854ef5f9e2aaeb4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0c4a5620e832eaf3e37d4c3cb…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Mon Aug 17 09:45:28 2009 -0500 windowscodecs: Add stub GIF decoder. --- dlls/windowscodecs/Makefile.in | 1 + dlls/windowscodecs/clsfactory.c | 1 + dlls/windowscodecs/gifformat.c | 203 ++++++++++++++++++++++++++++++++ dlls/windowscodecs/regsvr.c | 6 + dlls/windowscodecs/wincodecs_private.h | 1 + 5 files changed, 212 insertions(+), 0 deletions(-) diff --git a/dlls/windowscodecs/Makefile.in b/dlls/windowscodecs/Makefile.in index aaf2c94..c347496 100644 --- a/dlls/windowscodecs/Makefile.in +++ b/dlls/windowscodecs/Makefile.in @@ -11,6 +11,7 @@ C_SRCS = \ bmpencode.c \ clsfactory.c \ converter.c \ + gifformat.c \ imgfactory.c \ info.c \ main.c \ diff --git a/dlls/windowscodecs/clsfactory.c b/dlls/windowscodecs/clsfactory.c index 3adb99b..876cbbb 100644 --- a/dlls/windowscodecs/clsfactory.c +++ b/dlls/windowscodecs/clsfactory.c @@ -45,6 +45,7 @@ static classinfo wic_classes[] = { {&CLSID_WICImagingFactory, ImagingFactory_CreateInstance}, {&CLSID_WICBmpDecoder, BmpDecoder_CreateInstance}, {&CLSID_WICBmpEncoder, BmpEncoder_CreateInstance}, + {&CLSID_WICGifDecoder, GifDecoder_CreateInstance}, {&CLSID_WICDefaultFormatConverter, FormatConverter_CreateInstance}, {0}}; diff --git a/dlls/windowscodecs/gifformat.c b/dlls/windowscodecs/gifformat.c new file mode 100644 index 0000000..0ecbd3c --- /dev/null +++ b/dlls/windowscodecs/gifformat.c @@ -0,0 +1,203 @@ +/* + * Copyright 2009 Vincent Povirk 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 + */ + +#include "config.h" + +#include <stdarg.h> + +#define COBJMACROS + +#include "windef.h" +#include "winbase.h" +#include "objbase.h" +#include "wincodec.h" + +#include "wincodecs_private.h" + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(wincodecs); + +typedef struct { + const IWICBitmapDecoderVtbl *lpVtbl; + LONG ref; +} GifDecoder; + +static HRESULT WINAPI GifDecoder_QueryInterface(IWICBitmapDecoder *iface, REFIID iid, + void **ppv) +{ + GifDecoder *This = (GifDecoder*)iface; + TRACE("(%p,%s,%p)\n", iface, debugstr_guid(iid), ppv); + + if (!ppv) return E_INVALIDARG; + + if (IsEqualIID(&IID_IUnknown, iid) || IsEqualIID(&IID_IWICBitmapDecoder, iid)) + { + *ppv = This; + } + else + { + *ppv = NULL; + return E_NOINTERFACE; + } + + IUnknown_AddRef((IUnknown*)*ppv); + return S_OK; +} + +static ULONG WINAPI GifDecoder_AddRef(IWICBitmapDecoder *iface) +{ + GifDecoder *This = (GifDecoder*)iface; + ULONG ref = InterlockedIncrement(&This->ref); + + TRACE("(%p) refcount=%u\n", iface, ref); + + return ref; +} + +static ULONG WINAPI GifDecoder_Release(IWICBitmapDecoder *iface) +{ + GifDecoder *This = (GifDecoder*)iface; + ULONG ref = InterlockedDecrement(&This->ref); + + TRACE("(%p) refcount=%u\n", iface, ref); + + if (ref == 0) + { + HeapFree(GetProcessHeap(), 0, This); + } + + return ref; +} + +static HRESULT WINAPI GifDecoder_QueryCapability(IWICBitmapDecoder *iface, IStream *pIStream, + DWORD *pdwCapability) +{ + FIXME("(%p,%p,%p): stub\n", iface, pIStream, pdwCapability); + return E_NOTIMPL; +} + +static HRESULT WINAPI GifDecoder_Initialize(IWICBitmapDecoder *iface, IStream *pIStream, + WICDecodeOptions cacheOptions) +{ + FIXME("(%p,%p,%x): stub\n", iface, pIStream, cacheOptions); + return E_NOTIMPL; +} + +static HRESULT WINAPI GifDecoder_GetContainerFormat(IWICBitmapDecoder *iface, + GUID *pguidContainerFormat) +{ + FIXME("(%p,%s): stub\n", iface, debugstr_guid(pguidContainerFormat)); + return E_NOTIMPL; +} + +static HRESULT WINAPI GifDecoder_GetDecoderInfo(IWICBitmapDecoder *iface, + IWICBitmapDecoderInfo **ppIDecoderInfo) +{ + FIXME("(%p,%p): stub\n", iface, ppIDecoderInfo); + return E_NOTIMPL; +} + +static HRESULT WINAPI GifDecoder_CopyPalette(IWICBitmapDecoder *iface, + IWICPalette *pIPalette) +{ + TRACE("(%p,%p)\n", iface, pIPalette); + return WINCODEC_ERR_PALETTEUNAVAILABLE; +} + +static HRESULT WINAPI GifDecoder_GetMetadataQueryReader(IWICBitmapDecoder *iface, + IWICMetadataQueryReader **ppIMetadataQueryReader) +{ + TRACE("(%p,%p)\n", iface, ppIMetadataQueryReader); + return WINCODEC_ERR_UNSUPPORTEDOPERATION; +} + +static HRESULT WINAPI GifDecoder_GetPreview(IWICBitmapDecoder *iface, + IWICBitmapSource **ppIBitmapSource) +{ + TRACE("(%p,%p)\n", iface, ppIBitmapSource); + return WINCODEC_ERR_UNSUPPORTEDOPERATION; +} + +static HRESULT WINAPI GifDecoder_GetColorContexts(IWICBitmapDecoder *iface, + UINT cCount, IWICColorContext **ppIColorContexts, UINT *pcActualCount) +{ + TRACE("(%p,%u,%p,%p)\n", iface, cCount, ppIColorContexts, pcActualCount); + return WINCODEC_ERR_UNSUPPORTEDOPERATION; +} + +static HRESULT WINAPI GifDecoder_GetThumbnail(IWICBitmapDecoder *iface, + IWICBitmapSource **ppIThumbnail) +{ + TRACE("(%p,%p)\n", iface, ppIThumbnail); + return WINCODEC_ERR_CODECNOTHUMBNAIL; +} + +static HRESULT WINAPI GifDecoder_GetFrameCount(IWICBitmapDecoder *iface, + UINT *pCount) +{ + FIXME("(%p,%p): stub\n", iface, pCount); + return E_NOTIMPL; +} + +static HRESULT WINAPI GifDecoder_GetFrame(IWICBitmapDecoder *iface, + UINT index, IWICBitmapFrameDecode **ppIBitmapFrame) +{ + FIXME("(%p,%u,%p): stub\n", iface, index, ppIBitmapFrame); + return E_NOTIMPL; +} + +static const IWICBitmapDecoderVtbl GifDecoder_Vtbl = { + GifDecoder_QueryInterface, + GifDecoder_AddRef, + GifDecoder_Release, + GifDecoder_QueryCapability, + GifDecoder_Initialize, + GifDecoder_GetContainerFormat, + GifDecoder_GetDecoderInfo, + GifDecoder_CopyPalette, + GifDecoder_GetMetadataQueryReader, + GifDecoder_GetPreview, + GifDecoder_GetColorContexts, + GifDecoder_GetThumbnail, + GifDecoder_GetFrameCount, + GifDecoder_GetFrame +}; + +HRESULT GifDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) +{ + GifDecoder *This; + HRESULT ret; + + TRACE("(%p,%s,%p)\n", pUnkOuter, debugstr_guid(iid), ppv); + + *ppv = NULL; + + if (pUnkOuter) return CLASS_E_NOAGGREGATION; + + This = HeapAlloc(GetProcessHeap(), 0, sizeof(GifDecoder)); + if (!This) return E_OUTOFMEMORY; + + This->lpVtbl = &GifDecoder_Vtbl; + This->ref = 1; + + ret = IUnknown_QueryInterface((IUnknown*)This, iid, ppv); + IUnknown_Release((IUnknown*)This); + + return ret; +} diff --git a/dlls/windowscodecs/regsvr.c b/dlls/windowscodecs/regsvr.c index 4191366..8e3328a 100644 --- a/dlls/windowscodecs/regsvr.c +++ b/dlls/windowscodecs/regsvr.c @@ -741,6 +741,12 @@ static struct regsvr_coclass const coclass_list[] = { "windowscodecs.dll", "Apartment" }, + { &CLSID_WICGifDecoder, + "WIC GIF Decoder", + NULL, + "windowscodecs.dll", + "Apartment" + }, { &CLSID_WICDefaultFormatConverter, "WIC Default Format Converter", NULL, diff --git a/dlls/windowscodecs/wincodecs_private.h b/dlls/windowscodecs/wincodecs_private.h index 70e3c16..6dcd47e 100644 --- a/dlls/windowscodecs/wincodecs_private.h +++ b/dlls/windowscodecs/wincodecs_private.h @@ -23,6 +23,7 @@ extern HRESULT FormatConverter_CreateInstance(IUnknown *pUnkOuter, REFIID riid, extern HRESULT ImagingFactory_CreateInstance(IUnknown *pUnkOuter, REFIID riid, void** ppv); extern HRESULT BmpDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID riid, void** ppv); extern HRESULT BmpEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv); +extern HRESULT GifDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID riid, void** ppv); extern HRESULT PaletteImpl_Create(IWICPalette **palette);
1
0
0
0
Vincent Povirk : windowscodecs: Add test for pixel format conversion.
by Alexandre Julliard
18 Aug '09
18 Aug '09
Module: wine Branch: master Commit: 83d8f615b3a94179365fceef3dead218bb6a5eed URL:
http://source.winehq.org/git/wine.git/?a=commit;h=83d8f615b3a94179365fceef3…
Author: Vincent Povirk <madewokherd(a)gmail.com> Date: Wed Aug 5 21:41:38 2009 -0500 windowscodecs: Add test for pixel format conversion. --- dlls/windowscodecs/tests/Makefile.in | 3 +- dlls/windowscodecs/tests/converter.c | 332 ++++++++++++++++++++++++++++++++++ 2 files changed, 334 insertions(+), 1 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=83d8f615b3a94179365fc…
1
0
0
0
Alistair Leslie-Hughes : mshtml: Implement IHTMLLocation get_href.
by Alexandre Julliard
18 Aug '09
18 Aug '09
Module: wine Branch: master Commit: 447e5d1fac0e870b188439a588e816d28bec5725 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=447e5d1fac0e870b188439a58…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Sun Aug 16 19:57:58 2009 +1000 mshtml: Implement IHTMLLocation get_href. --- dlls/mshtml/htmllocation.c | 16 ++++++++++++++-- dlls/mshtml/tests/dom.c | 7 +++++++ 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/htmllocation.c b/dlls/mshtml/htmllocation.c index e2001bb..2026a06 100644 --- a/dlls/mshtml/htmllocation.c +++ b/dlls/mshtml/htmllocation.c @@ -128,8 +128,20 @@ static HRESULT WINAPI HTMLLocation_put_href(IHTMLLocation *iface, BSTR v) static HRESULT WINAPI HTMLLocation_get_href(IHTMLLocation *iface, BSTR *p) { HTMLLocation *This = HTMLLOCATION_THIS(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + + TRACE("(%p)->(%p)\n", This, p); + + if(!p) + return E_POINTER; + + if(!This->doc || !This->doc->url) { + FIXME("No current URL\n"); + return E_NOTIMPL; + } + + *p = SysAllocString(This->doc->url); + + return S_OK; } static HRESULT WINAPI HTMLLocation_put_protocol(IHTMLLocation *iface, BSTR v) diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 8bf29a8..42512be 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -2411,6 +2411,13 @@ static void test_location(IHTMLDocument2 *doc) ok(hres == S_OK, "get_pathname failed: %08x\n", hres); ok(!strcmp_wa(str, "blank"), "unexpected pathname %s\n", dbgstr_w(str)); + hres = IHTMLLocation_get_href(location, NULL); + ok(hres == E_POINTER, "get_href passed: %08x\n", hres); + + hres = IHTMLLocation_get_href(location, &str); + ok(hres == S_OK, "get_href failed: %08x\n", hres); + ok(!strcmp_wa(str, "about:blank"), "unexpected href %s\n", dbgstr_w(str)); + ref = IHTMLLocation_Release(location); ok(!ref, "location chould be destroyed here\n"); }
1
0
0
0
Alexandre Julliard : comctl32/tests: Fix the property sheet tests on older Windows versions.
by Alexandre Julliard
18 Aug '09
18 Aug '09
Module: wine Branch: master Commit: d6493200456c3ae809f9ab55552033bd2df7ae40 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d6493200456c3ae809f9ab555…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Aug 18 14:49:21 2009 +0200 comctl32/tests: Fix the property sheet tests on older Windows versions. --- dlls/comctl32/tests/propsheet.c | 25 +++++++++++++++++-------- 1 files changed, 17 insertions(+), 8 deletions(-) diff --git a/dlls/comctl32/tests/propsheet.c b/dlls/comctl32/tests/propsheet.c index f7e7174..cf5c201 100644 --- a/dlls/comctl32/tests/propsheet.c +++ b/dlls/comctl32/tests/propsheet.c @@ -203,7 +203,7 @@ static void test_disableowner(void) DestroyWindow(parent); } -static LRESULT CALLBACK nav_page_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) +static INT_PTR CALLBACK nav_page_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) { switch(msg){ case WM_NOTIFY: @@ -212,7 +212,7 @@ static LRESULT CALLBACK nav_page_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM switch(hdr->code){ case PSN_SETACTIVE: active_page = PropSheet_HwndToIndex(hdr->hwndFrom, hwnd); - break; + return TRUE; case PSN_KILLACTIVE: /* prevent navigation away from the fourth page */ if(active_page == 3){ @@ -223,7 +223,7 @@ static LRESULT CALLBACK nav_page_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM break; } } - return DefWindowProc(hwnd, msg, wparam, lparam); + return FALSE; } static void test_wiznavigation(void) @@ -234,6 +234,7 @@ static void test_wiznavigation(void) HWND hdlg, control; LONG_PTR controlID; LRESULT defidres; + BOOL hwndtoindex_supported = TRUE; const INT nextID = 12324; const INT backID = 12323; @@ -282,7 +283,9 @@ static void test_wiznavigation(void) /* simulate pressing the Next button */ SendMessage(hdlg, PSM_PRESSBUTTON, PSBTN_NEXT, 0); - ok(active_page == 1, "Active page should be 1 after pressing Next. Is: %d\n", active_page); + if (!active_page) hwndtoindex_supported = FALSE; + if (hwndtoindex_supported) + ok(active_page == 1, "Active page should be 1 after pressing Next. Is: %d\n", active_page); control = GetFocus(); controlID = GetWindowLongPtr(control, GWLP_ID); @@ -296,7 +299,8 @@ static void test_wiznavigation(void) /* press next again */ SendMessage(hdlg, PSM_PRESSBUTTON, PSBTN_NEXT, 0); - ok(active_page == 2, "Active page should be 2 after pressing Next. Is: %d\n", active_page); + if (hwndtoindex_supported) + ok(active_page == 2, "Active page should be 2 after pressing Next. Is: %d\n", active_page); control = GetFocus(); controlID = GetWindowLongPtr(control, GWLP_ID); @@ -304,7 +308,8 @@ static void test_wiznavigation(void) /* back button */ SendMessage(hdlg, PSM_PRESSBUTTON, PSBTN_BACK, 0); - ok(active_page == 1, "Active page should be 1 after pressing Back. Is: %d\n", active_page); + if (hwndtoindex_supported) + ok(active_page == 1, "Active page should be 1 after pressing Back. Is: %d\n", active_page); control = GetFocus(); controlID = GetWindowLongPtr(control, GWLP_ID); @@ -315,9 +320,13 @@ static void test_wiznavigation(void) /* press next twice */ SendMessage(hdlg, PSM_PRESSBUTTON, PSBTN_NEXT, 0); - ok(active_page == 2, "Active page should be 2 after pressing Next. Is: %d\n", active_page); + if (hwndtoindex_supported) + ok(active_page == 2, "Active page should be 2 after pressing Next. Is: %d\n", active_page); SendMessage(hdlg, PSM_PRESSBUTTON, PSBTN_NEXT, 0); - ok(active_page == 3, "Active page should be 3 after pressing Next. Is: %d\n", active_page); + if (hwndtoindex_supported) + ok(active_page == 3, "Active page should be 3 after pressing Next. Is: %d\n", active_page); + else + active_page = 3; control = GetFocus(); controlID = GetWindowLongPtr(control, GWLP_ID);
1
0
0
0
← Newer
1
...
45
46
47
48
49
50
51
...
105
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
Results per page:
10
25
50
100
200