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
September 2012
----- 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
2 participants
828 discussions
Start a n
N
ew thread
Alexandre Julliard : winex11: Add window data locking to the mouse functions.
by Alexandre Julliard
18 Sep '12
18 Sep '12
Module: wine Branch: master Commit: 1cfed8922e3b865b7a8fde20a29bdfff7330d6bf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1cfed8922e3b865b7a8fde20a…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Sep 17 16:37:26 2012 +0200 winex11: Add window data locking to the mouse functions. --- dlls/winex11.drv/mouse.c | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c index 72b85b3..5808420 100644 --- a/dlls/winex11.drv/mouse.c +++ b/dlls/winex11.drv/mouse.c @@ -488,15 +488,18 @@ BOOL clip_fullscreen_window( HWND hwnd, BOOL reset ) struct x11drv_thread_data *thread_data; RECT rect; DWORD style; + BOOL fullscreen; if (hwnd == GetDesktopWindow()) return FALSE; - if (!(data = X11DRV_get_win_data( hwnd ))) return FALSE; style = GetWindowLongW( hwnd, GWL_STYLE ); if (!(style & WS_VISIBLE)) return FALSE; if ((style & (WS_POPUP | WS_CHILD)) == WS_CHILD) return FALSE; /* maximized windows don't count as full screen */ if ((style & WS_MAXIMIZE) && (style & WS_CAPTION) == WS_CAPTION) return FALSE; - if (!is_window_rect_fullscreen( &data->whole_rect )) return FALSE; + if (!(data = get_win_data( hwnd ))) return FALSE; + fullscreen = is_window_rect_fullscreen( &data->whole_rect ); + release_win_data( data ); + if (!fullscreen) return FALSE; if (!(thread_data = x11drv_thread_data())) return FALSE; if (GetTickCount() - thread_data->clip_reset < 1000) return FALSE; if (!reset && clipping_cursor && thread_data->clip_hwnd) return FALSE; /* already clipping */ @@ -541,7 +544,7 @@ static void send_mouse_input( HWND hwnd, Window window, unsigned int state, INPU return; } - if (!(data = X11DRV_get_win_data( hwnd ))) return; + if (!(data = get_win_data( hwnd ))) return; if (window == data->whole_window) { @@ -565,6 +568,7 @@ static void send_mouse_input( HWND hwnd, Window window, unsigned int state, INPU sync_window_cursor( data->whole_window ); last_cursor_change = input->u.mi.time; } + release_win_data( data ); if (hwnd != GetDesktopWindow()) {
1
0
0
0
Dmitry Timoshkov : windowscodecs: Use symbolic names for GIF extensions.
by Alexandre Julliard
18 Sep '12
18 Sep '12
Module: wine Branch: master Commit: 9db35b9ceac74de7349bee10dab39d7148227f7b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9db35b9ceac74de7349bee10d…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Tue Sep 18 13:02:51 2012 +0900 windowscodecs: Use symbolic names for GIF extensions. --- dlls/windowscodecs/gifformat.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/windowscodecs/gifformat.c b/dlls/windowscodecs/gifformat.c index e3c2661..1dce11d 100644 --- a/dlls/windowscodecs/gifformat.c +++ b/dlls/windowscodecs/gifformat.c @@ -348,7 +348,8 @@ static HRESULT load_APE_metadata(IStream *stream, const GUID *vendor, DWORD opti hr = IStream_Read(stream, &ape_data, sizeof(ape_data), &bytesread); if (FAILED(hr) || bytesread != sizeof(ape_data)) return S_OK; - if (ape_data.extension_introducer != 0x21 || ape_data.extension_label != 0xff || + if (ape_data.extension_introducer != 0x21 || + ape_data.extension_label != APPLICATION_EXT_FUNC_CODE || ape_data.block_size != 11) return S_OK; @@ -455,7 +456,8 @@ static HRESULT load_GifComment_metadata(IStream *stream, const GUID *vendor, DWO hr = IStream_Read(stream, &ext_data, sizeof(ext_data), &bytesread); if (FAILED(hr) || bytesread != sizeof(ext_data)) return S_OK; - if (ext_data.extension_introducer != 0x21 || ext_data.extension_label != 0xfe) + if (ext_data.extension_introducer != 0x21 || + ext_data.extension_label != COMMENT_EXT_FUNC_CODE) return S_OK; data = NULL;
1
0
0
0
Dmitry Timoshkov : windowscodecs: Correct some typos.
by Alexandre Julliard
18 Sep '12
18 Sep '12
Module: wine Branch: master Commit: 45504e90efb29b3ecdfc7aef288c4de94e596d9c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=45504e90efb29b3ecdfc7aef2…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Tue Sep 18 13:02:10 2012 +0900 windowscodecs: Correct some typos. --- dlls/windowscodecs/tests/metadata.c | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-) diff --git a/dlls/windowscodecs/tests/metadata.c b/dlls/windowscodecs/tests/metadata.c index 9f5f4e3..928cba0 100644 --- a/dlls/windowscodecs/tests/metadata.c +++ b/dlls/windowscodecs/tests/metadata.c @@ -1112,7 +1112,7 @@ static void test_metadata_gif(void) { hr = IWICMetadataReader_GetMetadataFormat(reader, &format); ok(IsEqualGUID(&format, &GUID_MetadataFormatLSD), /* Logical Screen Descriptor */ - "wrong container format %s\n", debugstr_guid(&format)); + "wrong metadata format %s\n", debugstr_guid(&format)); hr = IWICMetadataReader_GetCount(reader, &count); ok(hr == S_OK, "GetCount error %#x\n", hr); @@ -1160,7 +1160,7 @@ static void test_metadata_gif(void) { hr = IWICMetadataReader_GetMetadataFormat(reader, &format); ok(IsEqualGUID(&format, &GUID_MetadataFormatIMD), /* Image Descriptor */ - "wrong container format %s\n", debugstr_guid(&format)); + "wrong metadata format %s\n", debugstr_guid(&format)); hr = IWICMetadataReader_GetCount(reader, &count); ok(hr == S_OK, "GetCount error %#x\n", hr); @@ -1213,7 +1213,7 @@ static void test_metadata_gif(void) { hr = IWICMetadataReader_GetMetadataFormat(reader, &format); ok(IsEqualGUID(&format, &GUID_MetadataFormatLSD), /* Logical Screen Descriptor */ - "wrong container format %s\n", debugstr_guid(&format)); + "wrong metadata format %s\n", debugstr_guid(&format)); hr = IWICMetadataReader_GetCount(reader, &count); ok(hr == S_OK, "GetCount error %#x\n", hr); @@ -1231,7 +1231,7 @@ static void test_metadata_gif(void) { hr = IWICMetadataReader_GetMetadataFormat(reader, &format); ok(IsEqualGUID(&format, &GUID_MetadataFormatAPE), /* Application Extension */ - "wrong container format %s\n", debugstr_guid(&format)); + "wrong metadata format %s\n", debugstr_guid(&format)); hr = IWICMetadataReader_GetCount(reader, &count); ok(hr == S_OK, "GetCount error %#x\n", hr); @@ -1249,7 +1249,7 @@ static void test_metadata_gif(void) { hr = IWICMetadataReader_GetMetadataFormat(reader, &format); ok(IsEqualGUID(&format, &GUID_MetadataFormatGifComment), /* Comment Extension */ - "wrong container format %s\n", debugstr_guid(&format)); + "wrong metadata format %s\n", debugstr_guid(&format)); hr = IWICMetadataReader_GetCount(reader, &count); ok(hr == S_OK, "GetCount error %#x\n", hr); @@ -1267,7 +1267,7 @@ static void test_metadata_gif(void) { hr = IWICMetadataReader_GetMetadataFormat(reader, &format); ok(IsEqualGUID(&format, &GUID_MetadataFormatUnknown), - "wrong container format %s\n", debugstr_guid(&format)); + "wrong metadata format %s\n", debugstr_guid(&format)); hr = IWICMetadataReader_GetCount(reader, &count); ok(hr == S_OK, "GetCount error %#x\n", hr); @@ -1315,7 +1315,7 @@ static void test_metadata_gif(void) { hr = IWICMetadataReader_GetMetadataFormat(reader, &format); ok(IsEqualGUID(&format, &GUID_MetadataFormatIMD), /* Image Descriptor */ - "wrong container format %s\n", debugstr_guid(&format)); + "wrong metadata format %s\n", debugstr_guid(&format)); hr = IWICMetadataReader_GetCount(reader, &count); ok(hr == S_OK, "GetCount error %#x\n", hr); @@ -1333,7 +1333,7 @@ static void test_metadata_gif(void) { hr = IWICMetadataReader_GetMetadataFormat(reader, &format); ok(IsEqualGUID(&format, &GUID_MetadataFormatGifComment), /* Comment Extension */ - "wrong container format %s\n", debugstr_guid(&format)); + "wrong metadata format %s\n", debugstr_guid(&format)); hr = IWICMetadataReader_GetCount(reader, &count); ok(hr == S_OK, "GetCount error %#x\n", hr); @@ -1352,7 +1352,7 @@ static void test_metadata_gif(void) { hr = IWICMetadataReader_GetMetadataFormat(reader, &format); ok(IsEqualGUID(&format, &GUID_MetadataFormatUnknown), - "wrong container format %s\n", debugstr_guid(&format)); + "wrong metadata format %s\n", debugstr_guid(&format)); hr = IWICMetadataReader_GetCount(reader, &count); ok(hr == S_OK, "GetCount error %#x\n", hr); @@ -1370,7 +1370,7 @@ static void test_metadata_gif(void) { hr = IWICMetadataReader_GetMetadataFormat(reader, &format); ok(IsEqualGUID(&format, &GUID_MetadataFormatGCE), /* Graphic Control Extension */ - "wrong container format %s\n", debugstr_guid(&format)); + "wrong metadata format %s\n", debugstr_guid(&format)); hr = IWICMetadataReader_GetCount(reader, &count); ok(hr == S_OK, "GetCount error %#x\n", hr);
1
0
0
0
Dmitry Timoshkov : windowscodecs: Create frame metadata readers from GIF decoder data.
by Alexandre Julliard
18 Sep '12
18 Sep '12
Module: wine Branch: master Commit: a0ca998e08b7fe0d9464f0be74a248a334025693 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a0ca998e08b7fe0d9464f0be7…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Tue Sep 18 13:01:27 2012 +0900 windowscodecs: Create frame metadata readers from GIF decoder data. --- dlls/windowscodecs/gifformat.c | 162 +++++++++++++++-------------------- dlls/windowscodecs/tests/metadata.c | 5 - 2 files changed, 70 insertions(+), 97 deletions(-) diff --git a/dlls/windowscodecs/gifformat.c b/dlls/windowscodecs/gifformat.c index 4adcf17..e3c2661 100644 --- a/dlls/windowscodecs/gifformat.c +++ b/dlls/windowscodecs/gifformat.c @@ -547,6 +547,37 @@ static IStream *create_stream(const void *data, int data_size) return FAILED(hr) ? NULL : stream; } +static HRESULT create_metadata_reader(const void *data, int data_size, + const CLSID *clsid, IWICMetadataReader **reader) +{ + HRESULT hr; + IWICMetadataReader *metadata_reader; + IWICPersistStream *persist; + IStream *stream; + + /* FIXME: Use IWICComponentFactory_CreateMetadataReader once it's implemented */ + + hr = CoCreateInstance(clsid, NULL, CLSCTX_INPROC_SERVER, + &IID_IWICMetadataReader, (void **)&metadata_reader); + if (FAILED(hr)) return hr; + + hr = IWICMetadataReader_QueryInterface(metadata_reader, &IID_IWICPersistStream, (void **)&persist); + if (FAILED(hr)) + { + IWICMetadataReader_Release(metadata_reader); + return hr; + } + + stream = create_stream(data, data_size); + IWICPersistStream_LoadEx(persist, stream, NULL, WICPersistOptionsDefault); + IStream_Release(stream); + + IWICPersistStream_Release(persist); + + *reader = metadata_reader; + return S_OK; +} + typedef struct { IWICBitmapDecoder IWICBitmapDecoder_iface; IWICMetadataBlockReader IWICMetadataBlockReader_iface; @@ -850,19 +881,6 @@ static HRESULT WINAPI GifFrameDecode_Block_GetContainerFormat(IWICMetadataBlockR return S_OK; } -static const void *get_GCE_data(GifFrameDecode *This) -{ - int i; - - for (i = 0; i < This->frame->Extensions.ExtensionBlockCount; i++) - { - if (This->frame->Extensions.ExtensionBlocks[i].Function == GRAPHICS_EXT_FUNC_CODE && - This->frame->Extensions.ExtensionBlocks[i].ByteCount == 8) - return This->frame->Extensions.ExtensionBlocks[i].Bytes + 3; - } - return NULL; -} - static HRESULT WINAPI GifFrameDecode_Block_GetCount(IWICMetadataBlockReader *iface, UINT *count) { @@ -872,8 +890,7 @@ static HRESULT WINAPI GifFrameDecode_Block_GetCount(IWICMetadataBlockReader *ifa if (!count) return E_INVALIDARG; - *count = 1; - if (get_GCE_data(This)) *count += 1; + *count = This->frame->Extensions.ExtensionBlockCount + 1; return S_OK; } @@ -926,64 +943,56 @@ static HRESULT create_IMD_metadata_reader(GifFrameDecode *This, IWICMetadataRead return S_OK; } -static HRESULT create_GCE_metadata_reader(const void *GCE_data, IWICMetadataReader **reader) -{ - HRESULT hr; - IWICMetadataReader *metadata_reader; - IWICPersistStream *persist; - IStream *stream; - - /* FIXME: Use IWICComponentFactory_CreateMetadataReader once it's implemented */ - - hr = CoCreateInstance(&CLSID_WICGCEMetadataReader, NULL, CLSCTX_INPROC_SERVER, - &IID_IWICMetadataReader, (void **)&metadata_reader); - if (FAILED(hr)) return hr; - - hr = IWICMetadataReader_QueryInterface(metadata_reader, &IID_IWICPersistStream, (void **)&persist); - if (FAILED(hr)) - { - IWICMetadataReader_Release(metadata_reader); - return hr; - } - - stream = create_stream(GCE_data, 4); - IWICPersistStream_LoadEx(persist, stream, NULL, WICPersistOptionsDefault); - IStream_Release(stream); - - IWICPersistStream_Release(persist); - - *reader = metadata_reader; - return S_OK; -} - static HRESULT WINAPI GifFrameDecode_Block_GetReaderByIndex(IWICMetadataBlockReader *iface, UINT index, IWICMetadataReader **reader) { GifFrameDecode *This = frame_from_IWICMetadataBlockReader(iface); - UINT block_count = 1; - const void *GCE_data; + int i, gce_index = -1, gce_skipped = 0; TRACE("(%p,%u,%p)\n", iface, index, reader); - GCE_data = get_GCE_data(This); - if (GCE_data) block_count++; - /* FIXME: add support for Application Extension metadata block - APE_data = get_APE_data(This); - if (APE_data) block_count++; - */ - if (!reader || index >= block_count) return E_INVALIDARG; + if (!reader) return E_INVALIDARG; if (index == 0) return create_IMD_metadata_reader(This, reader); - if (index == 1 && GCE_data) - return create_GCE_metadata_reader(GCE_data, reader); + if (index >= This->frame->Extensions.ExtensionBlockCount + 1) + return E_INVALIDARG; - /* FIXME: add support for Application Extension metadata block - if (APE_data) - return create_APE_metadata_reader(APE_data, reader); - */ - return E_INVALIDARG; + for (i = 0; i < This->frame->Extensions.ExtensionBlockCount; i++) + { + const CLSID *clsid; + const void *data; + int data_size; + + if (index != i + 1 - gce_skipped) continue; + + if (This->frame->Extensions.ExtensionBlocks[i].Function == GRAPHICS_EXT_FUNC_CODE) + { + gce_index = i; + gce_skipped = 1; + continue; + } + else if (This->frame->Extensions.ExtensionBlocks[i].Function == COMMENT_EXT_FUNC_CODE) + { + clsid = &CLSID_WICGifCommentMetadataReader; + data = This->frame->Extensions.ExtensionBlocks[i].Bytes; + data_size = This->frame->Extensions.ExtensionBlocks[i].ByteCount; + } + else + { + clsid = &CLSID_WICUnknownMetadataReader; + data = This->frame->Extensions.ExtensionBlocks[i].Bytes; + data_size = This->frame->Extensions.ExtensionBlocks[i].ByteCount; + } + return create_metadata_reader(data, data_size, clsid, reader); + } + + if (gce_index == -1) return E_INVALIDARG; + + return create_metadata_reader(This->frame->Extensions.ExtensionBlocks[gce_index].Bytes + 3, + This->frame->Extensions.ExtensionBlocks[gce_index].ByteCount - 4, + &CLSID_WICGCEMetadataReader, reader); } static HRESULT WINAPI GifFrameDecode_Block_GetEnumerator(IWICMetadataBlockReader *iface, @@ -1295,37 +1304,6 @@ static HRESULT WINAPI GifDecoder_Block_GetCount(IWICMetadataBlockReader *iface, return S_OK; } -static HRESULT create_metadata_reader(const void *data, int data_size, - const CLSID *clsid, IWICMetadataReader **reader) -{ - HRESULT hr; - IWICMetadataReader *metadata_reader; - IWICPersistStream *persist; - IStream *stream; - - /* FIXME: Use IWICComponentFactory_CreateMetadataReader once it's implemented */ - - hr = CoCreateInstance(clsid, NULL, CLSCTX_INPROC_SERVER, - &IID_IWICMetadataReader, (void **)&metadata_reader); - if (FAILED(hr)) return hr; - - hr = IWICMetadataReader_QueryInterface(metadata_reader, &IID_IWICPersistStream, (void **)&persist); - if (FAILED(hr)) - { - IWICMetadataReader_Release(metadata_reader); - return hr; - } - - stream = create_stream(data, data_size); - IWICPersistStream_LoadEx(persist, stream, NULL, WICPersistOptionsDefault); - IStream_Release(stream); - - IWICPersistStream_Release(persist); - - *reader = metadata_reader; - return S_OK; -} - static HRESULT WINAPI GifDecoder_Block_GetReaderByIndex(IWICMetadataBlockReader *iface, UINT index, IWICMetadataReader **reader) { diff --git a/dlls/windowscodecs/tests/metadata.c b/dlls/windowscodecs/tests/metadata.c index 343b873..9f5f4e3 100644 --- a/dlls/windowscodecs/tests/metadata.c +++ b/dlls/windowscodecs/tests/metadata.c @@ -1306,7 +1306,6 @@ static void test_metadata_gif(void) hr = IWICMetadataBlockReader_GetCount(blockreader, &count); ok(hr == S_OK, "GetCount error %#x\n", hr); -todo_wine ok(count == 4, "expected 4, got %u\n", count); hr = IWICMetadataBlockReader_GetReaderByIndex(blockreader, 0, &reader); @@ -1333,13 +1332,11 @@ todo_wine if (SUCCEEDED(hr)) { hr = IWICMetadataReader_GetMetadataFormat(reader, &format); -todo_wine ok(IsEqualGUID(&format, &GUID_MetadataFormatGifComment), /* Comment Extension */ "wrong container format %s\n", debugstr_guid(&format)); hr = IWICMetadataReader_GetCount(reader, &count); ok(hr == S_OK, "GetCount error %#x\n", hr); -todo_wine ok(count == sizeof(animated_gif_comment_2)/sizeof(animated_gif_comment_2[0]), "unexpected count %u\n", count); if (count == 1) @@ -1349,7 +1346,6 @@ todo_wine } hr = IWICMetadataBlockReader_GetReaderByIndex(blockreader, 2, &reader); -todo_wine ok(hr == S_OK, "GetReaderByIndex error %#x\n", hr); if (SUCCEEDED(hr)) @@ -1368,7 +1364,6 @@ todo_wine } hr = IWICMetadataBlockReader_GetReaderByIndex(blockreader, 3, &reader); -todo_wine ok(hr == S_OK, "GetReaderByIndex error %#x\n", hr); if (SUCCEEDED(hr))
1
0
0
0
Dmitry Timoshkov : windowscodecs: Create global metadata readers from GIF decoder data.
by Alexandre Julliard
18 Sep '12
18 Sep '12
Module: wine Branch: master Commit: 609b9a4da8778ecc72985f7c03a924e64264ab29 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=609b9a4da8778ecc72985f7c0…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Tue Sep 18 13:00:33 2012 +0900 windowscodecs: Create global metadata readers from GIF decoder data. --- dlls/windowscodecs/gifformat.c | 38 +++++++++++++++++++++++++++++----- dlls/windowscodecs/tests/metadata.c | 4 --- 2 files changed, 32 insertions(+), 10 deletions(-) diff --git a/dlls/windowscodecs/gifformat.c b/dlls/windowscodecs/gifformat.c index 7b88735..4adcf17 100644 --- a/dlls/windowscodecs/gifformat.c +++ b/dlls/windowscodecs/gifformat.c @@ -1285,15 +1285,18 @@ static HRESULT WINAPI GifDecoder_Block_GetContainerFormat(IWICMetadataBlockReade static HRESULT WINAPI GifDecoder_Block_GetCount(IWICMetadataBlockReader *iface, UINT *count) { + GifDecoder *This = impl_from_IWICMetadataBlockReader(iface); + TRACE("%p,%p\n", iface, count); if (!count) return E_INVALIDARG; - *count = 1; + *count = This->gif->Extensions.ExtensionBlockCount + 1; return S_OK; } -static HRESULT create_LSD_metadata_reader(GifDecoder *This, IWICMetadataReader **reader) +static HRESULT create_metadata_reader(const void *data, int data_size, + const CLSID *clsid, IWICMetadataReader **reader) { HRESULT hr; IWICMetadataReader *metadata_reader; @@ -1302,7 +1305,7 @@ static HRESULT create_LSD_metadata_reader(GifDecoder *This, IWICMetadataReader * /* FIXME: Use IWICComponentFactory_CreateMetadataReader once it's implemented */ - hr = CoCreateInstance(&CLSID_WICLSDMetadataReader, NULL, CLSCTX_INPROC_SERVER, + hr = CoCreateInstance(clsid, NULL, CLSCTX_INPROC_SERVER, &IID_IWICMetadataReader, (void **)&metadata_reader); if (FAILED(hr)) return hr; @@ -1313,7 +1316,7 @@ static HRESULT create_LSD_metadata_reader(GifDecoder *This, IWICMetadataReader * return hr; } - stream = create_stream(This->LSD_data, sizeof(This->LSD_data)); + stream = create_stream(data, data_size); IWICPersistStream_LoadEx(persist, stream, NULL, WICPersistOptionsDefault); IStream_Release(stream); @@ -1327,12 +1330,35 @@ static HRESULT WINAPI GifDecoder_Block_GetReaderByIndex(IWICMetadataBlockReader UINT index, IWICMetadataReader **reader) { GifDecoder *This = impl_from_IWICMetadataBlockReader(iface); + int i; TRACE("(%p,%u,%p)\n", iface, index, reader); - if (!reader || index != 0) return E_INVALIDARG; + if (!reader) return E_INVALIDARG; + + if (index == 0) + return create_metadata_reader(&This->LSD_data, sizeof(This->LSD_data), + &CLSID_WICLSDMetadataReader, reader); + + for (i = 0; i < This->gif->Extensions.ExtensionBlockCount; i++) + { + const CLSID *clsid; + + if (index != i + 1) continue; + + if (This->gif->Extensions.ExtensionBlocks[i].Function == APPLICATION_EXT_FUNC_CODE) + clsid = &CLSID_WICAPEMetadataReader; + else if (This->gif->Extensions.ExtensionBlocks[i].Function == COMMENT_EXT_FUNC_CODE) + clsid = &CLSID_WICGifCommentMetadataReader; + else + clsid = &CLSID_WICUnknownMetadataReader; - return create_LSD_metadata_reader(This, reader); + return create_metadata_reader(This->gif->Extensions.ExtensionBlocks[i].Bytes, + This->gif->Extensions.ExtensionBlocks[i].ByteCount, + clsid, reader); + } + + return E_INVALIDARG; } static HRESULT WINAPI GifDecoder_Block_GetEnumerator(IWICMetadataBlockReader *iface, diff --git a/dlls/windowscodecs/tests/metadata.c b/dlls/windowscodecs/tests/metadata.c index ed02e2f..343b873 100644 --- a/dlls/windowscodecs/tests/metadata.c +++ b/dlls/windowscodecs/tests/metadata.c @@ -1204,7 +1204,6 @@ static void test_metadata_gif(void) hr = IWICMetadataBlockReader_GetCount(blockreader, &count); ok(hr == S_OK, "GetCount error %#x\n", hr); -todo_wine ok(count == 4, "expected 4, got %u\n", count); hr = IWICMetadataBlockReader_GetReaderByIndex(blockreader, 0, &reader); @@ -1226,7 +1225,6 @@ todo_wine } hr = IWICMetadataBlockReader_GetReaderByIndex(blockreader, 1, &reader); -todo_wine ok(hr == S_OK, "GetReaderByIndex error %#x\n", hr); if (SUCCEEDED(hr)) @@ -1245,7 +1243,6 @@ todo_wine } hr = IWICMetadataBlockReader_GetReaderByIndex(blockreader, 2, &reader); -todo_wine ok(hr == S_OK, "GetReaderByIndex error %#x\n", hr); if (SUCCEEDED(hr)) @@ -1264,7 +1261,6 @@ todo_wine } hr = IWICMetadataBlockReader_GetReaderByIndex(blockreader, 3, &reader); -todo_wine ok(hr == S_OK, "GetReaderByIndex error %#x\n", hr); if (SUCCEEDED(hr))
1
0
0
0
Dmitry Timoshkov : windowscodecs: GIF decoder should add header and trailer to extension blocks.
by Alexandre Julliard
18 Sep '12
18 Sep '12
Module: wine Branch: master Commit: 47864728792e14287f6619e05444afcc3dc940a9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=47864728792e14287f6619e05…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Tue Sep 18 12:59:50 2012 +0900 windowscodecs: GIF decoder should add header and trailer to extension blocks. Metadata readers now have access to complete and correctly formatted data stream. --- dlls/windowscodecs/gifformat.c | 4 ++-- dlls/windowscodecs/ungif.c | 19 ++++++++++++------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/dlls/windowscodecs/gifformat.c b/dlls/windowscodecs/gifformat.c index 05bf2db..7b88735 100644 --- a/dlls/windowscodecs/gifformat.c +++ b/dlls/windowscodecs/gifformat.c @@ -857,8 +857,8 @@ static const void *get_GCE_data(GifFrameDecode *This) for (i = 0; i < This->frame->Extensions.ExtensionBlockCount; i++) { if (This->frame->Extensions.ExtensionBlocks[i].Function == GRAPHICS_EXT_FUNC_CODE && - This->frame->Extensions.ExtensionBlocks[i].ByteCount == 4) - return This->frame->Extensions.ExtensionBlocks[i].Bytes; + This->frame->Extensions.ExtensionBlocks[i].ByteCount == 8) + return This->frame->Extensions.ExtensionBlocks[i].Bytes + 3; } return NULL; } diff --git a/dlls/windowscodecs/ungif.c b/dlls/windowscodecs/ungif.c index 2330192..0f55242 100644 --- a/dlls/windowscodecs/ungif.c +++ b/dlls/windowscodecs/ungif.c @@ -209,13 +209,18 @@ AddExtensionBlock(Extensions *New, ep = &New->ExtensionBlocks[New->ExtensionBlockCount++]; - ep->ByteCount=Len; - ep->Bytes = ungif_alloc(ep->ByteCount); + ep->ByteCount=Len + 3; + ep->Bytes = ungif_alloc(ep->ByteCount + 3); if (ep->Bytes == NULL) return (GIF_ERROR); + /* Extension Header */ + ep->Bytes[0] = 0x21; + ep->Bytes[1] = New->Function; + ep->Bytes[2] = Len; + if (ExtData) { - memcpy(ep->Bytes, ExtData, Len); + memcpy(ep->Bytes + 3, ExtData, Len); ep->Function = New->Function; } @@ -238,12 +243,12 @@ AppendExtensionBlock(Extensions *New, if (ep->Bytes == NULL) return (GIF_ERROR); + ep->Bytes[ep->ByteCount] = Len; + if (ExtData) - { - ep->Bytes[ep->ByteCount] = Len; memcpy(ep->Bytes + ep->ByteCount + 1, ExtData, Len); - ep->ByteCount += Len + 1; - } + + ep->ByteCount += Len + 1; return (GIF_OK); }
1
0
0
0
Dmitry Timoshkov : windowscodecs: GIF decoder should append a sub-block to current extension.
by Alexandre Julliard
18 Sep '12
18 Sep '12
Module: wine Branch: master Commit: aaa682950d4fa818dc08810de927f18dfcab8767 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=aaa682950d4fa818dc08810de…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Tue Sep 18 12:59:11 2012 +0900 windowscodecs: GIF decoder should append a sub-block to current extension. --- dlls/windowscodecs/ungif.c | 50 +++++++++++++++++++++++++++++++++++++++---- 1 files changed, 45 insertions(+), 5 deletions(-) diff --git a/dlls/windowscodecs/ungif.c b/dlls/windowscodecs/ungif.c index 7984e3a..2330192 100644 --- a/dlls/windowscodecs/ungif.c +++ b/dlls/windowscodecs/ungif.c @@ -222,6 +222,32 @@ AddExtensionBlock(Extensions *New, return (GIF_OK); } +static int +AppendExtensionBlock(Extensions *New, + int Len, + const unsigned char ExtData[]) +{ + ExtensionBlock *ep; + + if (New->ExtensionBlocks == NULL) + return (GIF_ERROR); + + ep = &New->ExtensionBlocks[New->ExtensionBlockCount - 1]; + + ep->Bytes = ungif_realloc(ep->Bytes, ep->ByteCount + Len + 1); + if (ep->Bytes == NULL) + return (GIF_ERROR); + + if (ExtData) + { + ep->Bytes[ep->ByteCount] = Len; + memcpy(ep->Bytes + ep->ByteCount + 1, ExtData, Len); + ep->ByteCount += Len + 1; + } + + return (GIF_OK); +} + static void FreeExtension(Extensions *Extensions) { @@ -898,16 +924,30 @@ DGifSlurp(GifFileType * GifFile) { Extensions->Function = Function; + /* Create an extension block with our data */ + if (AddExtensionBlock(Extensions, ExtData[0], &ExtData[1]) == GIF_ERROR) + return (GIF_ERROR); + while (ExtData != NULL) { + int Len; + GifByteType *Data; - /* Create an extension block with our data */ - if (AddExtensionBlock(Extensions, ExtData[0], &ExtData[1]) - == GIF_ERROR) + if (DGifGetExtensionNext(GifFile, &ExtData) == GIF_ERROR) return (GIF_ERROR); - if (DGifGetExtensionNext(GifFile, &ExtData) == GIF_ERROR) + if (ExtData) + { + Len = ExtData[0]; + Data = &ExtData[1]; + } + else + { + Len = 0; + Data = NULL; + } + + if (AppendExtensionBlock(Extensions, Len, Data) == GIF_ERROR) return (GIF_ERROR); - temp_save.Function = 0; } break; }
1
0
0
0
Dmitry Timoshkov : windowscodecs: GIF Graphic Control Extension block belongs to the image which follows it.
by Alexandre Julliard
18 Sep '12
18 Sep '12
Module: wine Branch: master Commit: 880b98bf23f3031f4a0b6c2a1fd5f96e672e1927 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=880b98bf23f3031f4a0b6c2a1…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Tue Sep 18 12:58:25 2012 +0900 windowscodecs: GIF Graphic Control Extension block belongs to the image which follows it. --- dlls/windowscodecs/ungif.c | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/dlls/windowscodecs/ungif.c b/dlls/windowscodecs/ungif.c index 66310cb..7984e3a 100644 --- a/dlls/windowscodecs/ungif.c +++ b/dlls/windowscodecs/ungif.c @@ -885,16 +885,19 @@ DGifSlurp(GifFileType * GifFile) { case EXTENSION_RECORD_TYPE: { + int Function; Extensions *Extensions; - if (GifFile->ImageCount) + if (DGifGetExtension(GifFile, &Function, &ExtData) == GIF_ERROR) + return (GIF_ERROR); + + if (GifFile->ImageCount || Function == GRAPHICS_EXT_FUNC_CODE) Extensions = &temp_save; else Extensions = &GifFile->Extensions; - if (DGifGetExtension(GifFile, &Extensions->Function, &ExtData) == - GIF_ERROR) - return (GIF_ERROR); + Extensions->Function = Function; + while (ExtData != NULL) { /* Create an extension block with our data */
1
0
0
0
Dmitry Timoshkov : windowscodecs: Create global metadata blocks in the GIF decoder.
by Alexandre Julliard
18 Sep '12
18 Sep '12
Module: wine Branch: master Commit: 88faba8e1a1b1e38a320765c6b32bb08d8094f82 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=88faba8e1a1b1e38a320765c6…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Tue Sep 18 12:57:19 2012 +0900 windowscodecs: Create global metadata blocks in the GIF decoder. --- dlls/windowscodecs/ungif.c | 15 +++++++++++++-- dlls/windowscodecs/ungif.h | 1 + 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/dlls/windowscodecs/ungif.c b/dlls/windowscodecs/ungif.c index 97038d9..66310cb 100644 --- a/dlls/windowscodecs/ungif.c +++ b/dlls/windowscodecs/ungif.c @@ -884,13 +884,21 @@ DGifSlurp(GifFileType * GifFile) { break; case EXTENSION_RECORD_TYPE: - if (DGifGetExtension(GifFile, &temp_save.Function, &ExtData) == + { + Extensions *Extensions; + + if (GifFile->ImageCount) + Extensions = &temp_save; + else + Extensions = &GifFile->Extensions; + + if (DGifGetExtension(GifFile, &Extensions->Function, &ExtData) == GIF_ERROR) return (GIF_ERROR); while (ExtData != NULL) { /* Create an extension block with our data */ - if (AddExtensionBlock(&temp_save, ExtData[0], &ExtData[1]) + if (AddExtensionBlock(Extensions, ExtData[0], &ExtData[1]) == GIF_ERROR) return (GIF_ERROR); @@ -899,6 +907,7 @@ DGifSlurp(GifFileType * GifFile) { temp_save.Function = 0; } break; + } case TERMINATE_RECORD_TYPE: break; @@ -1003,6 +1012,8 @@ DGifCloseFile(GifFileType * GifFile) { GifFile->SavedImages = NULL; } + FreeExtension(&GifFile->Extensions); + ungif_free(GifFile); return GIF_OK; diff --git a/dlls/windowscodecs/ungif.h b/dlls/windowscodecs/ungif.h index 6c9f418..6caa600 100644 --- a/dlls/windowscodecs/ungif.h +++ b/dlls/windowscodecs/ungif.h @@ -117,6 +117,7 @@ typedef struct GifFileType { SBackGroundColor, /* I hope you understand this one... */ SAspectRatio; /* Pixel aspect ratio, in 1/64 units, starting at 1:4. */ ColorMapObject *SColorMap; /* NULL if not exists. */ + Extensions Extensions; int ImageCount; /* Number of current image */ GifImageDesc Image; /* Block describing current image */ struct SavedImage *SavedImages; /* Use this to accumulate file state */
1
0
0
0
Dmitry Timoshkov : windowscodecs: Store GIF frame extensions in a dedicated Extensions structure.
by Alexandre Julliard
18 Sep '12
18 Sep '12
Module: wine Branch: master Commit: 629e7f44cbc9e7987c82b2321ea48b81e7e53852 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=629e7f44cbc9e7987c82b2321…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Tue Sep 18 12:56:34 2012 +0900 windowscodecs: Store GIF frame extensions in a dedicated Extensions structure. --- dlls/windowscodecs/gifformat.c | 12 ++++++------ dlls/windowscodecs/ungif.c | 30 +++++++++++++++--------------- dlls/windowscodecs/ungif.h | 24 ++++++++++++++---------- 3 files changed, 35 insertions(+), 31 deletions(-) diff --git a/dlls/windowscodecs/gifformat.c b/dlls/windowscodecs/gifformat.c index 06047e7..05bf2db 100644 --- a/dlls/windowscodecs/gifformat.c +++ b/dlls/windowscodecs/gifformat.c @@ -699,8 +699,8 @@ static HRESULT WINAPI GifFrameDecode_CopyPalette(IWICBitmapFrameDecode *iface, } /* look for the transparent color extension */ - for (i = 0; i < This->frame->ExtensionBlockCount; ++i) { - eb = This->frame->ExtensionBlocks + i; + for (i = 0; i < This->frame->Extensions.ExtensionBlockCount; ++i) { + eb = This->frame->Extensions.ExtensionBlocks + i; if (eb->Function == 0xF9 && eb->ByteCount == 4) { if ((eb->Bytes[0] & 1) == 1) { trans = (unsigned char)eb->Bytes[3]; @@ -854,11 +854,11 @@ static const void *get_GCE_data(GifFrameDecode *This) { int i; - for (i = 0; i < This->frame->ExtensionBlockCount; i++) + for (i = 0; i < This->frame->Extensions.ExtensionBlockCount; i++) { - if (This->frame->ExtensionBlocks[i].Function == GRAPHICS_EXT_FUNC_CODE && - This->frame->ExtensionBlocks[i].ByteCount == 4) - return This->frame->ExtensionBlocks[i].Bytes; + if (This->frame->Extensions.ExtensionBlocks[i].Function == GRAPHICS_EXT_FUNC_CODE && + This->frame->Extensions.ExtensionBlocks[i].ByteCount == 4) + return This->frame->Extensions.ExtensionBlocks[i].Bytes; } return NULL; } diff --git a/dlls/windowscodecs/ungif.c b/dlls/windowscodecs/ungif.c index 0efe065..97038d9 100644 --- a/dlls/windowscodecs/ungif.c +++ b/dlls/windowscodecs/ungif.c @@ -191,7 +191,7 @@ FreeMapObject(ColorMapObject * Object) { } static int -AddExtensionBlock(SavedImage * New, +AddExtensionBlock(Extensions *New, int Len, const unsigned char ExtData[]) { @@ -223,18 +223,18 @@ AddExtensionBlock(SavedImage * New, } static void -FreeExtension(SavedImage * Image) +FreeExtension(Extensions *Extensions) { ExtensionBlock *ep; - if ((Image == NULL) || (Image->ExtensionBlocks == NULL)) { + if ((Extensions == NULL) || (Extensions->ExtensionBlocks == NULL)) { return; } - for (ep = Image->ExtensionBlocks; - ep < (Image->ExtensionBlocks + Image->ExtensionBlockCount); ep++) + for (ep = Extensions->ExtensionBlocks; + ep < (Extensions->ExtensionBlocks + Extensions->ExtensionBlockCount); ep++) ungif_free(ep->Bytes); - ungif_free(Image->ExtensionBlocks); - Image->ExtensionBlocks = NULL; + ungif_free(Extensions->ExtensionBlocks); + Extensions->ExtensionBlocks = NULL; } /****************************************************************************** @@ -258,8 +258,8 @@ FreeSavedImages(GifFileType * GifFile) { ungif_free(sp->RasterBits); - if (sp->ExtensionBlocks) - FreeExtension(sp); + if (sp->Extensions.ExtensionBlocks) + FreeExtension(&sp->Extensions); } ungif_free(GifFile->SavedImages); GifFile->SavedImages=NULL; @@ -424,8 +424,8 @@ DGifGetImageDesc(GifFileType * GifFile) { sp->ImageDesc.ColorMap->SortFlag = GifFile->Image.ColorMap->SortFlag; } sp->RasterBits = NULL; - sp->ExtensionBlockCount = 0; - sp->ExtensionBlocks = NULL; + sp->Extensions.ExtensionBlockCount = 0; + sp->Extensions.ExtensionBlocks = NULL; GifFile->ImageCount++; @@ -845,7 +845,7 @@ DGifSlurp(GifFileType * GifFile) { GifRecordType RecordType; SavedImage *sp; GifByteType *ExtData; - SavedImage temp_save; + Extensions temp_save; temp_save.ExtensionBlocks = NULL; temp_save.ExtensionBlockCount = 0; @@ -870,8 +870,8 @@ DGifSlurp(GifFileType * GifFile) { GIF_ERROR) return (GIF_ERROR); if (temp_save.ExtensionBlocks) { - sp->ExtensionBlocks = temp_save.ExtensionBlocks; - sp->ExtensionBlockCount = temp_save.ExtensionBlockCount; + sp->Extensions.ExtensionBlocks = temp_save.ExtensionBlocks; + sp->Extensions.ExtensionBlockCount = temp_save.ExtensionBlockCount; temp_save.ExtensionBlocks = NULL; temp_save.ExtensionBlockCount = 0; @@ -879,7 +879,7 @@ DGifSlurp(GifFileType * GifFile) { /* FIXME: The following is wrong. It is left in only for * backwards compatibility. Someday it should go away. Use * the sp->ExtensionBlocks->Function variable instead. */ - sp->Function = sp->ExtensionBlocks[0].Function; + sp->Extensions.Function = sp->Extensions.ExtensionBlocks[0].Function; } break; diff --git a/dlls/windowscodecs/ungif.h b/dlls/windowscodecs/ungif.h index 5e377d2..6c9f418 100644 --- a/dlls/windowscodecs/ungif.h +++ b/dlls/windowscodecs/ungif.h @@ -98,6 +98,19 @@ typedef struct GifImageDesc { ColorMapObject *ColorMap; /* The local color map */ } GifImageDesc; +/* This is the in-core version of an extension record */ +typedef struct { + int Function; /* Holds the type of the Extension block. */ + int ByteCount; + char *Bytes; +} ExtensionBlock; + +typedef struct { + int Function; /* DEPRECATED: Use ExtensionBlocks[x].Function instead */ + int ExtensionBlockCount; + ExtensionBlock *ExtensionBlocks; +} Extensions; + typedef struct GifFileType { GifWord SWidth, SHeight, /* Screen dimensions. */ SColorResolution, /* How many colors can we generate? */ @@ -152,20 +165,11 @@ int DGifCloseFile(GifFileType * GifFile) DECLSPEC_HIDDEN; * Support for the in-core structures allocation (slurp mode). *****************************************************************************/ -/* This is the in-core version of an extension record */ -typedef struct { - int ByteCount; - char *Bytes; - int Function; /* Holds the type of the Extension block. */ -} ExtensionBlock; - /* This holds an image header, its unpacked raster bits, and extensions */ typedef struct SavedImage { GifImageDesc ImageDesc; unsigned char *RasterBits; - int Function; /* DEPRECATED: Use ExtensionBlocks[x].Function instead */ - int ExtensionBlockCount; - ExtensionBlock *ExtensionBlocks; + Extensions Extensions; } SavedImage; #endif /* _UNGIF_H_ */
1
0
0
0
← Newer
1
...
37
38
39
40
41
42
43
...
83
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
Results per page:
10
25
50
100
200