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
January 2013
----- 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
736 discussions
Start a n
N
ew thread
Christian Costa : d3dx9_36: Add support for RT_BITMAP resource type since it is in DIB format D3DXIFF_DIB .
by Alexandre Julliard
07 Jan '13
07 Jan '13
Module: wine Branch: master Commit: 4778a5e27d000b906684de76e91d37ddb61f223e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4778a5e27d000b906684de76e…
Author: Christian Costa <titan.costa(a)gmail.com> Date: Mon Jan 7 09:40:08 2013 +0100 d3dx9_36: Add support for RT_BITMAP resource type since it is in DIB format D3DXIFF_DIB. --- dlls/d3dx9_36/surface.c | 50 ++++++++++++++++++----------------------- dlls/d3dx9_36/tests/surface.c | 6 ++-- dlls/d3dx9_36/texture.c | 26 +++++---------------- 3 files changed, 31 insertions(+), 51 deletions(-) diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c index 923f17d..ea77497 100644 --- a/dlls/d3dx9_36/surface.c +++ b/dlls/d3dx9_36/surface.c @@ -878,8 +878,12 @@ HRESULT WINAPI D3DXGetImageInfoFromResourceA(HMODULE module, LPCSTR resource, D3 TRACE("(%p, %s, %p)\n", module, debugstr_a(resource), info); - resinfo = FindResourceA(module, resource, (LPCSTR)RT_RCDATA); - if(resinfo) { + resinfo = FindResourceA(module, resource, (const char *)RT_RCDATA); + if (!resinfo) /* Try loading the resource as bitmap data (which is in DIB format D3DXIFF_DIB) */ + resinfo = FindResourceA(module, resource, (const char *)RT_BITMAP); + + if (resinfo) + { LPVOID buffer; HRESULT hr; DWORD size; @@ -889,11 +893,6 @@ HRESULT WINAPI D3DXGetImageInfoFromResourceA(HMODULE module, LPCSTR resource, D3 return D3DXGetImageInfoFromFileInMemory(buffer, size, info); } - resinfo = FindResourceA(module, resource, (LPCSTR)RT_BITMAP); - if(resinfo) { - FIXME("Implement loading bitmaps from resource type RT_BITMAP\n"); - return E_NOTIMPL; - } return D3DXERR_INVALIDDATA; } @@ -903,8 +902,12 @@ HRESULT WINAPI D3DXGetImageInfoFromResourceW(HMODULE module, LPCWSTR resource, D TRACE("(%p, %s, %p)\n", module, debugstr_w(resource), info); - resinfo = FindResourceW(module, resource, (LPCWSTR)RT_RCDATA); - if(resinfo) { + resinfo = FindResourceW(module, resource, (const WCHAR *)RT_RCDATA); + if (!resinfo) /* Try loading the resource as bitmap data (which is in DIB format D3DXIFF_DIB) */ + resinfo = FindResourceW(module, resource, (const WCHAR *)RT_BITMAP); + + if (resinfo) + { LPVOID buffer; HRESULT hr; DWORD size; @@ -914,11 +917,6 @@ HRESULT WINAPI D3DXGetImageInfoFromResourceW(HMODULE module, LPCWSTR resource, D return D3DXGetImageInfoFromFileInMemory(buffer, size, info); } - resinfo = FindResourceW(module, resource, (LPCWSTR)RT_BITMAP); - if(resinfo) { - FIXME("Implement loading bitmaps from resource type RT_BITMAP\n"); - return E_NOTIMPL; - } return D3DXERR_INVALIDDATA; } @@ -1138,7 +1136,11 @@ HRESULT WINAPI D3DXLoadSurfaceFromResourceA(IDirect3DSurface9 *dst_surface, if (!dst_surface) return D3DERR_INVALIDCALL; - if ((hResInfo = FindResourceA(src_module, resource, (const char *)RT_RCDATA))) + hResInfo = FindResourceA(src_module, resource, (const char *)RT_RCDATA); + if (!hResInfo) /* Try loading the resource as bitmap data (which is in DIB format D3DXIFF_DIB) */ + hResInfo = FindResourceA(src_module, resource, (const char *)RT_BITMAP); + + if (hResInfo) { UINT data_size; void *data; @@ -1150,12 +1152,6 @@ HRESULT WINAPI D3DXLoadSurfaceFromResourceA(IDirect3DSurface9 *dst_surface, data, data_size, src_rect, filter, color_key, src_info); } - if ((hResInfo = FindResourceA(src_module, resource, (const char *)RT_BITMAP))) - { - FIXME("Implement loading bitmaps from resource type RT_BITMAP.\n"); - return E_NOTIMPL; - } - return D3DXERR_INVALIDDATA; } @@ -1173,7 +1169,11 @@ HRESULT WINAPI D3DXLoadSurfaceFromResourceW(IDirect3DSurface9 *dst_surface, if (!dst_surface) return D3DERR_INVALIDCALL; - if ((hResInfo = FindResourceW(src_module, resource, (const WCHAR *)RT_RCDATA))) + hResInfo = FindResourceW(src_module, resource, (const WCHAR *)RT_RCDATA); + if (!hResInfo) /* Try loading the resource as bitmap data (which is in DIB format D3DXIFF_DIB) */ + hResInfo = FindResourceW(src_module, resource, (const WCHAR *)RT_BITMAP); + + if (hResInfo) { UINT data_size; void *data; @@ -1185,12 +1185,6 @@ HRESULT WINAPI D3DXLoadSurfaceFromResourceW(IDirect3DSurface9 *dst_surface, data, data_size, src_rect, filter, color_key, src_info); } - if ((hResInfo = FindResourceW(src_module, resource, (const WCHAR *)RT_BITMAP))) - { - FIXME("Implement loading bitmaps from resource type RT_BITMAP.\n"); - return E_NOTIMPL; - } - return D3DXERR_INVALIDDATA; } diff --git a/dlls/d3dx9_36/tests/surface.c b/dlls/d3dx9_36/tests/surface.c index 7ae7df9..bad9d43 100644 --- a/dlls/d3dx9_36/tests/surface.c +++ b/dlls/d3dx9_36/tests/surface.c @@ -380,11 +380,11 @@ static void test_D3DXGetImageInfo(void) todo_wine { hr = D3DXGetImageInfoFromResourceA(NULL, MAKEINTRESOURCEA(IDB_BITMAP_1x1), &info); /* RT_BITMAP */ ok(hr == D3D_OK, "D3DXGetImageInfoFromResource returned %#x, expected %#x\n", hr, D3D_OK); - - hr = D3DXGetImageInfoFromResourceA(NULL, MAKEINTRESOURCEA(IDB_BITMAP_1x1), NULL); - ok(hr == D3D_OK, "D3DXGetImageInfoFromResource returned %#x, expected %#x\n", hr, D3D_OK); } + hr = D3DXGetImageInfoFromResourceA(NULL, MAKEINTRESOURCEA(IDB_BITMAP_1x1), NULL); + ok(hr == D3D_OK, "D3DXGetImageInfoFromResource returned %#x, expected %#x\n", hr, D3D_OK); + hr = D3DXGetImageInfoFromResourceA(NULL, MAKEINTRESOURCEA(IDD_BITMAPDATA_1x1), &info); /* RT_RCDATA */ ok(hr == D3D_OK, "D3DXGetImageInfoFromResource returned %#x, expected %#x\n", hr, D3D_OK); diff --git a/dlls/d3dx9_36/texture.c b/dlls/d3dx9_36/texture.c index 3809b02..788a572 100644 --- a/dlls/d3dx9_36/texture.c +++ b/dlls/d3dx9_36/texture.c @@ -791,7 +791,9 @@ HRESULT WINAPI D3DXCreateTextureFromResourceExA(struct IDirect3DDevice9 *device, if (!device || !texture) return D3DERR_INVALIDCALL; - resinfo = FindResourceA(srcmodule, resource, (LPCSTR) RT_RCDATA); + resinfo = FindResourceA(srcmodule, resource, (const char *)RT_RCDATA); + if (!resinfo) /* Try loading the resource as bitmap data (which is in DIB format D3DXIFF_DIB) */ + resinfo = FindResourceA(srcmodule, resource, (const char *)RT_BITMAP); if (resinfo) { @@ -810,15 +812,6 @@ HRESULT WINAPI D3DXCreateTextureFromResourceExA(struct IDirect3DDevice9 *device, srcinfo, palette, texture); } - /* Try loading the resource as bitmap data */ - resinfo = FindResourceA(srcmodule, resource, (LPCSTR) RT_BITMAP); - - if (resinfo) - { - FIXME("Implement loading bitmaps from resource type RT_BITMAP\n"); - return E_NOTIMPL; - } - return D3DXERR_INVALIDDATA; } @@ -834,7 +827,9 @@ HRESULT WINAPI D3DXCreateTextureFromResourceExW(struct IDirect3DDevice9 *device, if (!device || !texture) return D3DERR_INVALIDCALL; - resinfo = FindResourceW(srcmodule, resource, (LPCWSTR) RT_RCDATA); + resinfo = FindResourceW(srcmodule, resource, (const WCHAR *)RT_RCDATA); + if (!resinfo) /* Try loading the resource as bitmap data (which is in DIB format D3DXIFF_DIB) */ + resinfo = FindResourceW(srcmodule, resource, (const WCHAR *)RT_BITMAP); if (resinfo) { @@ -853,15 +848,6 @@ HRESULT WINAPI D3DXCreateTextureFromResourceExW(struct IDirect3DDevice9 *device, srcinfo, palette, texture); } - /* Try loading the resource as bitmap data */ - resinfo = FindResourceW(srcmodule, resource, (LPCWSTR) RT_BITMAP); - - if (resinfo) - { - FIXME("Implement loading bitmaps from resource type RT_BITMAP\n"); - return E_NOTIMPL; - } - return D3DXERR_INVALIDDATA; }
1
0
0
0
Christian Costa : d3drm: Avoid LP stuff and rename some variables.
by Alexandre Julliard
07 Jan '13
07 Jan '13
Module: wine Branch: master Commit: 26640c8e7c3e86ba8a1c43ee265ed1b9fbfc860d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=26640c8e7c3e86ba8a1c43ee2…
Author: Christian Costa <titan.costa(a)gmail.com> Date: Mon Jan 7 09:41:05 2013 +0100 d3drm: Avoid LP stuff and rename some variables. --- dlls/d3drm/meshbuilder.c | 60 +++++++++++++++++++++++----------------------- 1 files changed, 30 insertions(+), 30 deletions(-) diff --git a/dlls/d3drm/meshbuilder.c b/dlls/d3drm/meshbuilder.c index b7883ba..3e6aa6d 100644 --- a/dlls/d3drm/meshbuilder.c +++ b/dlls/d3drm/meshbuilder.c @@ -1554,18 +1554,18 @@ end: /*** IDirect3DRMMeshBuilder3 methods ***/ static HRESULT WINAPI IDirect3DRMMeshBuilder3Impl_Load(IDirect3DRMMeshBuilder3* iface, - LPVOID filename, LPVOID name, + void *filename, void *name, D3DRMLOADOPTIONS loadflags, - D3DRMLOADTEXTURE3CALLBACK cb, LPVOID arg) + D3DRMLOADTEXTURE3CALLBACK cb, void *arg) { IDirect3DRMMeshBuilderImpl *This = impl_from_IDirect3DRMMeshBuilder3(iface); DXFILELOADOPTIONS load_options; - LPDIRECTXFILE pDXFile = NULL; - LPDIRECTXFILEENUMOBJECT pEnumObject = NULL; - LPDIRECTXFILEDATA pData = NULL; - const GUID* pGuid; + IDirectXFile *dxfile = NULL; + IDirectXFileEnumObject *enum_object = NULL; + IDirectXFileData *data = NULL; + const GUID* guid; DWORD size; - Header* pHeader; + Header* header; HRESULT hr; HRESULT ret = D3DRMERR_BADOBJECT; @@ -1588,82 +1588,82 @@ static HRESULT WINAPI IDirect3DRMMeshBuilder3Impl_Load(IDirect3DRMMeshBuilder3* return E_NOTIMPL; } - hr = DirectXFileCreate(&pDXFile); + hr = DirectXFileCreate(&dxfile); if (hr != DXFILE_OK) goto end; - hr = IDirectXFile_RegisterTemplates(pDXFile, templates, strlen(templates)); + hr = IDirectXFile_RegisterTemplates(dxfile, templates, strlen(templates)); if (hr != DXFILE_OK) goto end; - hr = IDirectXFile_CreateEnumObject(pDXFile, filename, load_options, &pEnumObject); + hr = IDirectXFile_CreateEnumObject(dxfile, filename, load_options, &enum_object); if (hr != DXFILE_OK) goto end; - hr = IDirectXFileEnumObject_GetNextDataObject(pEnumObject, &pData); + hr = IDirectXFileEnumObject_GetNextDataObject(enum_object, &data); if (hr != DXFILE_OK) goto end; - hr = IDirectXFileData_GetType(pData, &pGuid); + hr = IDirectXFileData_GetType(data, &guid); if (hr != DXFILE_OK) goto end; - TRACE("Found object type whose GUID = %s\n", debugstr_guid(pGuid)); + TRACE("Found object type whose GUID = %s\n", debugstr_guid(guid)); - if (!IsEqualGUID(pGuid, &TID_DXFILEHeader)) + if (!IsEqualGUID(guid, &TID_DXFILEHeader)) { ret = D3DRMERR_BADFILE; goto end; } - hr = IDirectXFileData_GetData(pData, NULL, &size, (void**)&pHeader); + hr = IDirectXFileData_GetData(data, NULL, &size, (void**)&header); if ((hr != DXFILE_OK) || (size != sizeof(Header))) goto end; - TRACE("Version is %d %d %d\n", pHeader->major, pHeader->minor, pHeader->flags); + TRACE("Version is %d %d %d\n", header->major, header->minor, header->flags); /* Version must be 1.0.x */ - if ((pHeader->major != 1) || (pHeader->minor != 0)) + if ((header->major != 1) || (header->minor != 0)) { ret = D3DRMERR_BADFILE; goto end; } - IDirectXFileData_Release(pData); - pData = NULL; + IDirectXFileData_Release(data); + data = NULL; - hr = IDirectXFileEnumObject_GetNextDataObject(pEnumObject, &pData); + hr = IDirectXFileEnumObject_GetNextDataObject(enum_object, &data); if (hr != DXFILE_OK) { ret = D3DRMERR_NOTFOUND; goto end; } - hr = IDirectXFileData_GetType(pData, &pGuid); + hr = IDirectXFileData_GetType(data, &guid); if (hr != DXFILE_OK) goto end; - TRACE("Found object type whose GUID = %s\n", debugstr_guid(pGuid)); + TRACE("Found object type whose GUID = %s\n", debugstr_guid(guid)); - if (!IsEqualGUID(pGuid, &TID_D3DRMMesh)) + if (!IsEqualGUID(guid, &TID_D3DRMMesh)) { ret = D3DRMERR_NOTFOUND; goto end; } /* We don't care about the texture interface version since we rely on QueryInterface */ - hr = load_mesh_data(iface, pData, (D3DRMLOADTEXTURECALLBACK)cb, arg); + hr = load_mesh_data(iface, data, (D3DRMLOADTEXTURECALLBACK)cb, arg); if (hr == S_OK) ret = D3DRM_OK; end: - if (pData) - IDirectXFileData_Release(pData); - if (pEnumObject) - IDirectXFileEnumObject_Release(pEnumObject); - if (pDXFile) - IDirectXFile_Release(pDXFile); + if (data) + IDirectXFileData_Release(data); + if (enum_object) + IDirectXFileEnumObject_Release(enum_object); + if (dxfile) + IDirectXFile_Release(dxfile); if (ret != D3DRM_OK) clean_mesh_builder_data(This);
1
0
0
0
Marcus Meissner : kernel32: Improve condition variable test case.
by Alexandre Julliard
07 Jan '13
07 Jan '13
Module: wine Branch: master Commit: 8e0d3abd0fd7f0b3c3f3ace95292e140d5902f55 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8e0d3abd0fd7f0b3c3f3ace95…
Author: Marcus Meissner <meissner(a)suse.de> Date: Mon Jan 7 09:54:53 2013 +0100 kernel32: Improve condition variable test case. --- dlls/kernel32/tests/sync.c | 48 ++++++++++++++++++++++++++++++++----------- 1 files changed, 35 insertions(+), 13 deletions(-) diff --git a/dlls/kernel32/tests/sync.c b/dlls/kernel32/tests/sync.c index 10f1682..0ab82f0 100644 --- a/dlls/kernel32/tests/sync.c +++ b/dlls/kernel32/tests/sync.c @@ -1243,23 +1243,30 @@ static void test_initonce(void) ok(initonce.Ptr == (void*)0xdeadbee2, "got %p\n", initonce.Ptr); } -static CONDITION_VARIABLE buffernotempty,buffernotfull; +static CONDITION_VARIABLE buffernotempty = CONDITION_VARIABLE_INIT; +static CONDITION_VARIABLE buffernotfull = CONDITION_VARIABLE_INIT; static CRITICAL_SECTION buffercrit; static BOOL condvar_stop = FALSE, condvar_sleeperr = FALSE; static LONG bufferlen,totalproduced,totalconsumed; static LONG condvar_producer_sleepcnt,condvar_consumer_sleepcnt; -#define BUFFER_SIZE 10 +#define BUFFER_SIZE 5 static DWORD WINAPI condvar_producer(LPVOID x) { + DWORD sleepinterval = 50; + while (1) { - Sleep(rand() % 10); + Sleep(sleepinterval); + if (sleepinterval > 10) + sleepinterval -= 10; EnterCriticalSection(&buffercrit); while ((bufferlen == BUFFER_SIZE) && !condvar_stop) { condvar_producer_sleepcnt++; - if (!pSleepConditionVariableCS(&buffernotfull, &buffercrit, 2000)) - condvar_sleeperr = TRUE; + if (!pSleepConditionVariableCS(&buffernotfull, &buffercrit, sleepinterval)) { + if (GetLastError() != ERROR_TIMEOUT) + condvar_sleeperr = TRUE; + } } if (condvar_stop) { LeaveCriticalSection(&buffercrit); @@ -1275,13 +1282,16 @@ static DWORD WINAPI condvar_producer(LPVOID x) { static DWORD WINAPI condvar_consumer(LPVOID x) { DWORD *cnt = (DWORD*)x; + DWORD sleepinterval = 10; while (1) { EnterCriticalSection(&buffercrit); while ((bufferlen == 0) && !condvar_stop) { condvar_consumer_sleepcnt++; - if (!pSleepConditionVariableCS (&buffernotempty, &buffercrit, 2000)) - condvar_sleeperr = TRUE; + if (!pSleepConditionVariableCS (&buffernotempty, &buffercrit, sleepinterval)) { + if (GetLastError() != ERROR_TIMEOUT) + condvar_sleeperr = TRUE; + } } if (condvar_stop && (bufferlen == 0)) { LeaveCriticalSection(&buffercrit); @@ -1292,16 +1302,17 @@ static DWORD WINAPI condvar_consumer(LPVOID x) { (*cnt)++; LeaveCriticalSection(&buffercrit); pWakeConditionVariable(&buffernotfull); - Sleep(rand() % 10); + Sleep(sleepinterval); + if (sleepinterval < 50) sleepinterval += 10; } return 0; } static void test_condvars(void) { - HANDLE hp1,hp2,hc1,hc2; + HANDLE hp1,hp2,hp3,hc1,hc2,hc3; DWORD dummy; - DWORD cnt1,cnt2; + DWORD cnt1,cnt2,cnt3; if (!pInitializeConditionVariable) { /* function is not yet in XP, only in newer Windows */ @@ -1311,15 +1322,22 @@ static void test_condvars(void) } /* Implement a producer / consumer scheme with non-full / non-empty triggers */ - pInitializeConditionVariable(&buffernotfull); + + /* If we have static initialized condition variables, InitializeConditionVariable + * is not strictly necessary. + * pInitializeConditionVariable(&buffernotfull); + */ pInitializeConditionVariable(&buffernotempty); + InitializeCriticalSection(&buffercrit); - bufferlen = totalproduced = totalconsumed = cnt1 = cnt2 = 0; + bufferlen = totalproduced = totalconsumed = cnt1 = cnt2 = cnt3 = 0; hp1 = CreateThread(NULL, 0, condvar_producer, NULL, 0, &dummy); hp2 = CreateThread(NULL, 0, condvar_producer, NULL, 0, &dummy); + hp3 = CreateThread(NULL, 0, condvar_producer, NULL, 0, &dummy); hc1 = CreateThread(NULL, 0, condvar_consumer, (PVOID)&cnt1, 0, &dummy); hc2 = CreateThread(NULL, 0, condvar_consumer, (PVOID)&cnt2, 0, &dummy); + hc3 = CreateThread(NULL, 0, condvar_consumer, (PVOID)&cnt3, 0, &dummy); /* Limit run to 0.5 seconds. */ Sleep(500); @@ -1331,10 +1349,14 @@ static void test_condvars(void) pWakeAllConditionVariable (&buffernotfull); pWakeAllConditionVariable (&buffernotempty); + ok(buffernotfull.Ptr == NULL, "buffernotfull.Ptr is %p\n", buffernotfull.Ptr); + WaitForSingleObject(hp1, 1000); WaitForSingleObject(hp2, 1000); + WaitForSingleObject(hp3, 1000); WaitForSingleObject(hc1, 1000); WaitForSingleObject(hc2, 1000); + WaitForSingleObject(hc3, 1000); ok(totalconsumed == totalproduced, "consumed %d != produced %d\n", totalconsumed, totalproduced); @@ -1342,7 +1364,7 @@ static void test_condvars(void) /* Checking cnt1 - cnt2 for non-0 would be not good, the case where * one consumer does not get anything to do is possible. */ - trace("produced %d, c1 %d, c2 %d\n", totalproduced, cnt1, cnt2); + trace("produced %d, c1 %d, c2 %d, c3 %d\n", totalproduced, cnt1, cnt2, cnt3); /* The sleeps of the producer or consumer should not go above 100* produced count, * otherwise the implementation does not sleep correctly. But yet again, this is * not hard defined. */
1
0
0
0
Jacek Caban : mshtml: Fixed leak in get_nsstyle_pos.
by Alexandre Julliard
07 Jan '13
07 Jan '13
Module: wine Branch: master Commit: 64df55eb8489333c3e0b710e4617fedeedfc391c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=64df55eb8489333c3e0b710e4…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Jan 7 14:33:25 2013 +0100 mshtml: Fixed leak in get_nsstyle_pos. --- dlls/mshtml/htmlstyle.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c index efa3d5b..2cf252d 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -637,7 +637,7 @@ static HRESULT get_nsstyle_pos(HTMLStyle *This, styleid_t sid, float *p) { nsAString_Finish(&str_value); FIXME("only px values are currently supported\n"); - return E_FAIL; + hres = E_FAIL; } } } @@ -645,7 +645,6 @@ static HRESULT get_nsstyle_pos(HTMLStyle *This, styleid_t sid, float *p) TRACE("ret %f\n", *p); nsAString_Finish(&str_value); - return hres; }
1
0
0
0
Jacek Caban : mshtml: Added IHTMLStyle::put_pixelLeft implementation.
by Alexandre Julliard
07 Jan '13
07 Jan '13
Module: wine Branch: master Commit: 0f60681a5ab0081ba765cddf2621eb7f559d755b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0f60681a5ab0081ba765cddf2…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Jan 7 14:33:12 2013 +0100 mshtml: Added IHTMLStyle::put_pixelLeft implementation. --- dlls/mshtml/htmlstyle.c | 6 ++++-- dlls/mshtml/tests/style.c | 15 +++++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c index 2496077..efa3d5b 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -2412,8 +2412,10 @@ static HRESULT WINAPI HTMLStyle_get_pixelTop(IHTMLStyle *iface, LONG *p) static HRESULT WINAPI HTMLStyle_put_pixelLeft(IHTMLStyle *iface, LONG v) { HTMLStyle *This = impl_from_IHTMLStyle(iface); - FIXME("(%p)->()\n", This); - return E_NOTIMPL; + + TRACE("(%p)->(%d)\n", This, v); + + return set_style_pxattr(This->nsstyle, STYLEID_LEFT, v); } static HRESULT WINAPI HTMLStyle_get_pixelLeft(IHTMLStyle *iface, LONG *p) diff --git a/dlls/mshtml/tests/style.c b/dlls/mshtml/tests/style.c index bcfd0e4..8ec69a6 100644 --- a/dlls/mshtml/tests/style.c +++ b/dlls/mshtml/tests/style.c @@ -984,6 +984,21 @@ static void test_body_style(IHTMLStyle *style) ok(hres == S_OK, "get_pixelLeft failed: %08x\n", hres); ok(!l, "pixelLeft = %d\n", l); + hres = IHTMLStyle_put_pixelLeft(style, 6); + ok(hres == S_OK, "put_pixelLeft failed: %08x\n", hres); + + l = 0xdeadbeef; + hres = IHTMLStyle_get_pixelLeft(style, &l); + ok(hres == S_OK, "get_pixelLeft failed: %08x\n", hres); + ok(l == 6, "pixelLeft = %d\n", l); + + V_VT(&v) = VT_EMPTY; + hres = IHTMLStyle_get_left(style, &v); + ok(hres == S_OK, "get_left failed: %08x\n", hres); + ok(V_VT(&v) == VT_BSTR, "V_VT(v)=%d\n", V_VT(&v)); + ok(!strcmp_wa(V_BSTR(&v), "6px"), "V_BSTR(v) = %s\n", wine_dbgstr_w(V_BSTR(&v))); + VariantClear(&v); + /* Test posTop */ hres = IHTMLStyle_get_posTop(style, NULL); ok(hres == E_POINTER, "get_posTop failed: %08x\n", hres);
1
0
0
0
Jacek Caban : mshtml: Added IHTMLStyle::get_pixelLeft implementation.
by Alexandre Julliard
07 Jan '13
07 Jan '13
Module: wine Branch: master Commit: 85368869e8b91893887a30df305d022af4cf462b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=85368869e8b91893887a30df3…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Jan 7 14:32:56 2013 +0100 mshtml: Added IHTMLStyle::get_pixelLeft implementation. --- dlls/mshtml/htmlstyle.c | 40 +++++++++++++++++++++++++++++++++++++--- dlls/mshtml/tests/style.c | 16 ++++++++++++++++ 2 files changed, 53 insertions(+), 3 deletions(-) diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c index 95d7a88..2496077 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -180,6 +180,9 @@ static const WCHAR attrWordWrap[] = static const WCHAR attrZIndex[] = {'z','-','i','n','d','e','x',0}; + +static const WCHAR pxW[] = {'p','x',0}; + typedef struct { const WCHAR *name; DISPID dispid; @@ -612,7 +615,6 @@ static HRESULT get_nsstyle_pos(HTMLStyle *This, styleid_t sid, float *p) { nsAString str_value; HRESULT hres; - WCHAR pxW[] = {'p','x',0}; TRACE("%p %d %p\n", This, sid, p); @@ -647,6 +649,36 @@ static HRESULT get_nsstyle_pos(HTMLStyle *This, styleid_t sid, float *p) return hres; } +static HRESULT get_nsstyle_pixel_val(HTMLStyle *This, styleid_t sid, LONG *p) +{ + nsAString str_value; + HRESULT hres; + + nsAString_Init(&str_value, NULL); + + hres = get_nsstyle_attr_nsval(This->nsstyle, sid, &str_value); + if(hres == S_OK) { + WCHAR *ptr; + const PRUnichar *value; + + nsAString_GetData(&str_value, &value); + if(value) { + *p = strtolW(value, &ptr, 10); + + if(*ptr && strcmpW(ptr, pxW)) { + nsAString_Finish(&str_value); + FIXME("only px values are currently supported\n"); + hres = E_NOTIMPL; + } + }else { + *p = 0; + } + } + + nsAString_Finish(&str_value); + return hres; +} + static BOOL is_valid_border_style(BSTR v) { static const WCHAR styleDotted[] = {'d','o','t','t','e','d',0}; @@ -2387,8 +2419,10 @@ static HRESULT WINAPI HTMLStyle_put_pixelLeft(IHTMLStyle *iface, LONG v) static HRESULT WINAPI HTMLStyle_get_pixelLeft(IHTMLStyle *iface, LONG *p) { HTMLStyle *This = impl_from_IHTMLStyle(iface); - FIXME("(%p)->()\n", This); - return E_NOTIMPL; + + TRACE("(%p)->(%p)\n", This, p); + + return get_nsstyle_pixel_val(This, STYLEID_LEFT, p); } static HRESULT WINAPI HTMLStyle_put_pixelWidth(IHTMLStyle *iface, LONG v) diff --git a/dlls/mshtml/tests/style.c b/dlls/mshtml/tests/style.c index 08b3a3c..bcfd0e4 100644 --- a/dlls/mshtml/tests/style.c +++ b/dlls/mshtml/tests/style.c @@ -465,6 +465,7 @@ static void test_body_style(IHTMLStyle *style) float f; BSTR sOverflowDefault; BSTR sDefault; + LONG l; VARIANT vDefault; test_style_csstext(style, NULL); @@ -904,6 +905,11 @@ static void test_body_style(IHTMLStyle *style) ok(!V_BSTR(&v), "V_BSTR(v) != NULL\n"); VariantClear(&v); + l = 0xdeadbeef; + hres = IHTMLStyle_get_pixelLeft(style, &l); + ok(hres == S_OK, "get_pixelLeft failed: %08x\n", hres); + ok(!l, "pixelLeft = %d\n", l); + /* Test posLeft */ hres = IHTMLStyle_get_posLeft(style, NULL); ok(hres == E_POINTER, "get_posLeft failed: %08x\n", hres); @@ -943,6 +949,11 @@ static void test_body_style(IHTMLStyle *style) ok(hres == S_OK, "get_posLeft failed: %08x\n", hres); ok(f == 3.0, "expected 3.0 got %f\n", f); + l = 0xdeadbeef; + hres = IHTMLStyle_get_pixelLeft(style, &l); + ok(hres == S_OK, "get_pixelLeft failed: %08x\n", hres); + ok(l == 3, "pixelLeft = %d\n", l); + V_VT(&v) = VT_EMPTY; hres = IHTMLStyle_get_left(style, &v); ok(hres == S_OK, "get_left failed: %08x\n", hres); @@ -968,6 +979,11 @@ static void test_body_style(IHTMLStyle *style) ok(!V_BSTR(&v), "V_BSTR(v) != NULL\n"); VariantClear(&v); + l = 0xdeadbeef; + hres = IHTMLStyle_get_pixelLeft(style, &l); + ok(hres == S_OK, "get_pixelLeft failed: %08x\n", hres); + ok(!l, "pixelLeft = %d\n", l); + /* Test posTop */ hres = IHTMLStyle_get_posTop(style, NULL); ok(hres == E_POINTER, "get_posTop failed: %08x\n", hres);
1
0
0
0
André Hentschel : ipconfig: Distinguish between IPv4 and IPv6 addresses.
by Alexandre Julliard
07 Jan '13
07 Jan '13
Module: wine Branch: master Commit: c5f15727444ccd29d72a13464d5e7fd34311d633 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c5f15727444ccd29d72a13464…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Sat Jan 5 16:38:00 2013 +0100 ipconfig: Distinguish between IPv4 and IPv6 addresses. --- po/ar.po | 10 +++++++++- po/bg.po | 10 +++++++++- po/ca.po | 14 +++++++++++++- po/cs.po | 14 +++++++++++++- po/da.po | 14 +++++++++++++- po/de.po | 14 +++++++++++++- po/el.po | 10 +++++++++- po/en.po | 10 +++++++++- po/en_US.po | 10 +++++++++- po/eo.po | 10 +++++++++- po/es.po | 14 +++++++++++++- po/fa.po | 10 +++++++++- po/fi.po | 14 +++++++++++++- po/fr.po | 14 +++++++++++++- po/he.po | 14 +++++++++++++- po/hi.po | 10 +++++++++- po/hu.po | 14 +++++++++++++- po/it.po | 14 +++++++++++++- po/ja.po | 14 +++++++++++++- po/ko.po | 14 +++++++++++++- po/lt.po | 14 +++++++++++++- po/ml.po | 10 +++++++++- po/nb_NO.po | 14 +++++++++++++- po/nl.po | 14 +++++++++++++- po/or.po | 10 +++++++++- po/pa.po | 10 +++++++++- po/pl.po | 14 +++++++++++++- po/pt_BR.po | 14 +++++++++++++- po/pt_PT.po | 14 +++++++++++++- po/rm.po | 10 +++++++++- po/ro.po | 14 +++++++++++++- po/ru.po | 14 +++++++++++++- po/sk.po | 14 +++++++++++++- po/sl.po | 14 +++++++++++++- po/sr_RS(a)cyrillic.po | 14 +++++++++++++- po/sr_RS(a)latin.po | 14 +++++++++++++- po/sv.po | 14 +++++++++++++- po/te.po | 10 +++++++++- po/th.po | 10 +++++++++- po/tr.po | 14 +++++++++++++- po/uk.po | 14 +++++++++++++- po/wa.po | 10 +++++++++- po/wine.pot | 10 +++++++++- po/zh_CN.po | 10 +++++++++- po/zh_TW.po | 14 +++++++++++++- programs/ipconfig/ipconfig.c | 6 +++++- programs/ipconfig/ipconfig.h | 1 + programs/ipconfig/ipconfig.rc | 3 ++- 48 files changed, 525 insertions(+), 47 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=c5f15727444ccd29d72a1…
1
0
0
0
Francois Gouget : d3dx9_36: Make error_dxfile_to_d3dxfile() and test_templates() static.
by Alexandre Julliard
07 Jan '13
07 Jan '13
Module: wine Branch: master Commit: a41f63dfcbaf160178853aa5b9ab83917c48a465 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a41f63dfcbaf160178853aa5b…
Author: Francois Gouget <fgouget(a)free.fr> Date: Mon Jan 7 07:45:35 2013 +0100 d3dx9_36: Make error_dxfile_to_d3dxfile() and test_templates() static. --- dlls/d3dx9_36/tests/xfile.c | 2 +- dlls/d3dx9_36/xfile.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/d3dx9_36/tests/xfile.c b/dlls/d3dx9_36/tests/xfile.c index 08a2ae1..3ab30a9 100644 --- a/dlls/d3dx9_36/tests/xfile.c +++ b/dlls/d3dx9_36/tests/xfile.c @@ -47,7 +47,7 @@ char templates[] = "}\n"; -void test_templates(void) +static void test_templates(void) { ID3DXFile *d3dxfile; HRESULT ret; diff --git a/dlls/d3dx9_36/xfile.c b/dlls/d3dx9_36/xfile.c index 5d4d6aa..6c9403e 100644 --- a/dlls/d3dx9_36/xfile.c +++ b/dlls/d3dx9_36/xfile.c @@ -26,7 +26,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3dx); -HRESULT error_dxfile_to_d3dxfile(HRESULT error) +static HRESULT error_dxfile_to_d3dxfile(HRESULT error) { switch (error) {
1
0
0
0
Francois Gouget : urlmon: Fix the message warning about installing ActiveX components.
by Alexandre Julliard
07 Jan '13
07 Jan '13
Module: wine Branch: master Commit: 968ccaa60f13ce6d8c360f284da73b8284bb9deb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=968ccaa60f13ce6d8c360f284…
Author: Francois Gouget <fgouget(a)free.fr> Date: Sat Jan 5 18:05:33 2013 +0100 urlmon: Fix the message warning about installing ActiveX components. --- dlls/urlmon/urlmon.rc | 5 +++-- po/ar.po | 10 +++++----- po/bg.po | 10 +++++----- po/ca.po | 10 +++++----- po/cs.po | 10 +++++----- po/da.po | 10 +++++----- po/de.po | 14 +++++++++----- po/el.po | 10 +++++----- po/en.po | 14 +++++++------- po/en_US.po | 14 +++++++------- po/eo.po | 10 +++++----- po/es.po | 10 +++++----- po/fa.po | 10 +++++----- po/fi.po | 14 +++++++++----- po/fr.po | 14 +++++++++----- po/he.po | 10 +++++----- po/hi.po | 10 +++++----- po/hu.po | 10 +++++----- po/it.po | 10 +++++----- po/ja.po | 10 +++++----- po/ko.po | 14 +++++++++----- po/lt.po | 14 +++++++++----- po/ml.po | 10 +++++----- po/nb_NO.po | 10 +++++----- po/nl.po | 10 +++++----- po/or.po | 10 +++++----- po/pa.po | 10 +++++----- po/pl.po | 10 +++++----- po/pt_BR.po | 10 +++++----- po/pt_PT.po | 10 +++++----- po/rm.po | 10 +++++----- po/ro.po | 10 +++++----- po/ru.po | 10 +++++----- po/sk.po | 10 +++++----- po/sl.po | 10 +++++----- po/sr_RS(a)cyrillic.po | 10 +++++----- po/sr_RS(a)latin.po | 10 +++++----- po/sv.po | 10 +++++----- po/te.po | 10 +++++----- po/th.po | 10 +++++----- po/tr.po | 10 +++++----- po/uk.po | 10 +++++----- po/wa.po | 10 +++++----- po/wine.pot | 10 +++++----- po/zh_CN.po | 10 +++++----- po/zh_TW.po | 10 +++++----- 46 files changed, 252 insertions(+), 231 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=968ccaa60f13ce6d8c360…
1
0
0
0
Daniel Jelinski : comctl32/tests: Add tests for listview header image list.
by Alexandre Julliard
07 Jan '13
07 Jan '13
Module: wine Branch: master Commit: 19641457136f1b531db43afadfb6403de06000ca URL:
http://source.winehq.org/git/wine.git/?a=commit;h=19641457136f1b531db43afad…
Author: Daniel Jelinski <djelinski1(a)gmail.com> Date: Sun Jan 6 15:32:38 2013 +0100 comctl32/tests: Add tests for listview header image list. --- dlls/comctl32/tests/listview.c | 97 ++++++++++++++++++++++++++++++++++++++++ 1 files changed, 97 insertions(+), 0 deletions(-) diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c index 0a42dad..01b90ae 100644 --- a/dlls/comctl32/tests/listview.c +++ b/dlls/comctl32/tests/listview.c @@ -339,6 +339,17 @@ static const struct message parent_header_divider_dclick_seq[] = { { 0 } }; +static const struct message listview_set_imagelist[] = { + { LVM_SETIMAGELIST, sent|id, 0, 0, LISTVIEW_ID }, + { 0 } +}; + +static const struct message listview_header_set_imagelist[] = { + { LVM_SETIMAGELIST, sent|id, 0, 0, LISTVIEW_ID }, + { HDM_SETIMAGELIST, sent|id, 0, 0, HEADER_ID }, + { 0 } +}; + static LRESULT WINAPI parent_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { static LONG defwndproc_counter = 0; @@ -5195,6 +5206,91 @@ static void test_LVM_SETITEMTEXT(void) DestroyWindow(hwnd); } +static void test_imagelists(void) +{ + HWND hwnd, header; + HIMAGELIST himl1, himl2, himl3; + LRESULT ret; + + himl1 = ImageList_Create(40, 40, 0, 4, 4); + himl2 = ImageList_Create(40, 40, 0, 4, 4); + himl3 = ImageList_Create(40, 40, 0, 4, 4); + ok(himl1 != NULL, "Failed to create imagelist\n"); + ok(himl2 != NULL, "Failed to create imagelist\n"); + ok(himl3 != NULL, "Failed to create imagelist\n"); + + hwnd = create_listview_control(LVS_REPORT | LVS_SHAREIMAGELISTS); + header = subclass_header(hwnd); + + ok(header != NULL, "Expected header\n"); + ret = SendMessage(header, HDM_GETIMAGELIST, 0, 0); + ok(ret == 0, "Expected no imagelist, got %p\n", (HIMAGELIST)ret); + + flush_sequences(sequences, NUM_MSG_SEQUENCES); + + ret = SendMessageW(hwnd, LVM_SETIMAGELIST, LVSIL_NORMAL, (LPARAM)himl1); + ok(ret == 0, "Expected no imagelist, got %p\n", (HIMAGELIST)ret); + ok_sequence(sequences, LISTVIEW_SEQ_INDEX, listview_set_imagelist, + "set normal image list", FALSE); + + flush_sequences(sequences, NUM_MSG_SEQUENCES); + + ret = SendMessageW(hwnd, LVM_SETIMAGELIST, LVSIL_STATE, (LPARAM)himl2); + ok(ret == 0, "Expected no imagelist, got %p\n", (HIMAGELIST)ret); + ok_sequence(sequences, LISTVIEW_SEQ_INDEX, listview_set_imagelist, + "set state image list", TRUE); + + ret = SendMessage(header, HDM_GETIMAGELIST, 0, 0); + ok(ret == 0, "Expected no imagelist, got %p\n", (HIMAGELIST)ret); + + flush_sequences(sequences, NUM_MSG_SEQUENCES); + + ret = SendMessageW(hwnd, LVM_SETIMAGELIST, LVSIL_SMALL, (LPARAM)himl3); + ok(ret == 0, "Expected no imagelist, got %p\n", (HIMAGELIST)ret); + ok_sequence(sequences, LISTVIEW_SEQ_INDEX, listview_header_set_imagelist, + "set small image list", FALSE); + + ret = SendMessage(header, HDM_GETIMAGELIST, 0, 0); + ok((HIMAGELIST)ret == himl3, "Expected imagelist %p, got %p\n", himl3, (HIMAGELIST)ret); + DestroyWindow(hwnd); + + hwnd = create_listview_control(WS_VISIBLE | LVS_ICON); + + flush_sequences(sequences, NUM_MSG_SEQUENCES); + + ret = SendMessageW(hwnd, LVM_SETIMAGELIST, LVSIL_NORMAL, (LPARAM)himl1); + ok(ret == 0, "Expected no imagelist, got %p\n", (HIMAGELIST)ret); + ok_sequence(sequences, LISTVIEW_SEQ_INDEX, listview_set_imagelist, + "set normal image list", FALSE); + + flush_sequences(sequences, NUM_MSG_SEQUENCES); + + ret = SendMessageW(hwnd, LVM_SETIMAGELIST, LVSIL_STATE, (LPARAM)himl2); + ok(ret == 0, "Expected no imagelist, got %p\n", (HIMAGELIST)ret); + ok_sequence(sequences, LISTVIEW_SEQ_INDEX, listview_set_imagelist, + "set state image list", FALSE); + + flush_sequences(sequences, NUM_MSG_SEQUENCES); + + ret = SendMessageW(hwnd, LVM_SETIMAGELIST, LVSIL_SMALL, (LPARAM)himl3); + ok(ret == 0, "Expected no imagelist, got %p\n", (HIMAGELIST)ret); + ok_sequence(sequences, LISTVIEW_SEQ_INDEX, listview_set_imagelist, + "set small image list", FALSE); + + header = ListView_GetHeader(hwnd); + ok(header == NULL, "Expected no header, got %p\n", header); + + SetWindowLongPtr(hwnd, GWL_STYLE, GetWindowLongPtr(hwnd, GWL_STYLE) | LVS_REPORT); + + header = (HWND)SendMessage(hwnd, LVM_GETHEADER, 0, 0); + ok(header != NULL, "Expected header, got NULL\n"); + + ret = SendMessage(header, HDM_GETIMAGELIST, 0, 0); + ok((HIMAGELIST)ret == himl3, "Expected imagelist %p, got %p\n", himl3, (HIMAGELIST)ret); + + DestroyWindow(hwnd); +} + START_TEST(listview) { HMODULE hComctl32; @@ -5261,6 +5357,7 @@ START_TEST(listview) test_createdragimage(); test_dispinfo(); test_LVM_SETITEMTEXT(); + test_imagelists(); if (!load_v6_module(&ctx_cookie, &hCtx)) {
1
0
0
0
← Newer
1
...
59
60
61
62
63
64
65
...
74
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
Results per page:
10
25
50
100
200