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
May 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
737 discussions
Start a n
N
ew thread
Dmitry Timoshkov : gdiplus: Reimplement GdipIsEmptyRegion.
by Alexandre Julliard
25 May '12
25 May '12
Module: wine Branch: master Commit: a7d14b0d2cbbc6efe954ed2949c012fb92495279 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a7d14b0d2cbbc6efe954ed294…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Mon May 21 17:53:13 2012 +0900 gdiplus: Reimplement GdipIsEmptyRegion. --- dlls/gdiplus/region.c | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-) diff --git a/dlls/gdiplus/region.c b/dlls/gdiplus/region.c index 485c3a3..e77a79b 100644 --- a/dlls/gdiplus/region.c +++ b/dlls/gdiplus/region.c @@ -399,6 +399,8 @@ GpStatus WINGDIPAPI GdipCreateRegion(GpRegion **region) if(!*region) return OutOfMemory; + TRACE("=> %p\n", *region); + return init_region(*region, RegionDataInfiniteRect); } @@ -680,6 +682,7 @@ GpStatus WINGDIPAPI GdipGetRegionBounds(GpRegion *region, GpGraphics *graphics, if(!hrgn){ rect->X = rect->Y = -(REAL)(1 << 22); rect->Width = rect->Height = (REAL)(1 << 23); + TRACE("%p => infinite\n", region); return Ok; } @@ -688,6 +691,7 @@ GpStatus WINGDIPAPI GdipGetRegionBounds(GpRegion *region, GpGraphics *graphics, rect->Y = r.top; rect->Width = r.right - r.left; rect->Height = r.bottom - r.top; + TRACE("%p => %s\n", region, debugstr_rectf(rect)); } else status = GenericError; @@ -1080,12 +1084,19 @@ GpStatus WINGDIPAPI GdipGetRegionHRgn(GpRegion *region, GpGraphics *graphics, HR GpStatus WINGDIPAPI GdipIsEmptyRegion(GpRegion *region, GpGraphics *graphics, BOOL *res) { + GpStatus status; + GpRectF rect; + TRACE("(%p, %p, %p)\n", region, graphics, res); if(!region || !graphics || !res) return InvalidParameter; - *res = (region->node.type == RegionDataEmptyRect); + status = GdipGetRegionBounds(region, graphics, &rect); + if (status != Ok) return status; + + *res = rect.Width == 0.0 && rect.Height == 0.0; + TRACE("=> %d\n", *res); return Ok; }
1
0
0
0
Alexandre Julliard : oleaut32/tests: Fix handle sign extension on 64-bit.
by Alexandre Julliard
25 May '12
25 May '12
Module: wine Branch: master Commit: 4b9a55852345edb4c925c0f5223d076c7ee378aa URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4b9a55852345edb4c925c0f52…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri May 25 10:29:28 2012 +0200 oleaut32/tests: Fix handle sign extension on 64-bit. --- dlls/oleaut32/tests/olepicture.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/oleaut32/tests/olepicture.c b/dlls/oleaut32/tests/olepicture.c index a70f0b7..353334c 100644 --- a/dlls/oleaut32/tests/olepicture.c +++ b/dlls/oleaut32/tests/olepicture.c @@ -979,7 +979,7 @@ static void test_load_save_bmp(void) hr = IPicture_get_Handle(pic, &handle); ok(hr == S_OK,"get_Handle error %#8x\n", hr); - ok(UIntToPtr(handle) == desc.u.bmp.hbitmap, "get_Handle returned wrong handle %#x\n", handle); + ok(IntToPtr(handle) == desc.u.bmp.hbitmap, "get_Handle returned wrong handle %#x\n", handle); hmem = GlobalAlloc(GMEM_ZEROINIT, 4096); hr = CreateStreamOnHGlobal(hmem, FALSE, &dst_stream);
1
0
0
0
Alexandre Julliard : gdi32/tests: Add tests for color mappings in monochrome bitmaps.
by Alexandre Julliard
25 May '12
25 May '12
Module: wine Branch: master Commit: 8761bb29ea4f58b5db07190a2cd423d11876d53d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8761bb29ea4f58b5db07190a2…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu May 17 22:22:46 2012 +0200 gdi32/tests: Add tests for color mappings in monochrome bitmaps. --- dlls/gdi32/tests/bitmap.c | 128 +++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 119 insertions(+), 9 deletions(-) diff --git a/dlls/gdi32/tests/bitmap.c b/dlls/gdi32/tests/bitmap.c index d28b74f..2abf237 100644 --- a/dlls/gdi32/tests/bitmap.c +++ b/dlls/gdi32/tests/bitmap.c @@ -339,16 +339,18 @@ static void test_dib_info(HBITMAP hbm, const void *bits, const BITMAPINFOHEADER ok(ret == 0, "%d != 0\n", ret); } -#define test_color(hdc, color, exp) \ -{ \ - COLORREF c; \ - c = SetPixel(hdc, 0, 0, color); \ - ok(c == exp, "SetPixel failed: got 0x%06x expected 0x%06x\n", c, (UINT)exp); \ - c = GetPixel(hdc, 0, 0); \ - ok(c == exp, "GetPixel failed: got 0x%06x expected 0x%06x\n", c, (UINT)exp); \ - c = GetNearestColor(hdc, color); \ - ok(c == exp, "GetNearestColor failed: got 0x%06x expected 0x%06x\n", c, (UINT)exp); \ +static void _test_color( int line, HDC hdc, COLORREF color, COLORREF exp ) +{ + COLORREF c; + c = SetPixel(hdc, 0, 0, color); + ok_(__FILE__, line)(c == exp, "SetPixel failed: got 0x%06x expected 0x%06x\n", c, exp); + c = GetPixel(hdc, 0, 0); + ok_(__FILE__, line)(c == exp, "GetPixel failed: got 0x%06x expected 0x%06x\n", c, exp); + c = GetNearestColor(hdc, color); + ok_(__FILE__, line)(c == exp, "GetNearestColor failed: got 0x%06x expected 0x%06x\n", c, exp); } +#define test_color(hdc, color, exp) _test_color( __LINE__, hdc, color, exp ) + static void test_dib_bits_access( HBITMAP hdib, void *bits ) { @@ -1514,6 +1516,113 @@ static void test_bitmap(void) DeleteDC(hdc); } +static COLORREF get_nearest( int r, int g, int b ) +{ + return (r*r + g*g + b*b < (255-r)*(255-r) + (255-g)*(255-g) + (255-b)*(255-b)) ? 0x000000 : 0xffffff; +} + +static int is_black_pen( COLORREF fg, COLORREF bg, int r, int g, int b ) +{ + if (fg == 0 || bg == 0xffffff) return RGB(r,g,b) != 0xffffff && RGB(r,g,b) != bg; + return RGB(r,g,b) == 0x000000 || RGB(r,g,b) == bg; +} + +static void test_bitmap_colors( HDC hdc, COLORREF fg, COLORREF bg, int r, int g, int b ) +{ + static const WORD pattern_bits[] = { 0x5555, 0xaaaa, 0x5555, 0xaaaa, 0x5555, 0xaaaa, 0x5555, 0xaaaa }; + WORD bits[16]; + COLORREF res; + HBRUSH old_brush; + HPEN old_pen; + HBITMAP pattern; + + res = SetPixel( hdc, 0, 0, RGB(r,g,b) ); + ok( res == get_nearest( r, g, b ), + "wrong result %06x for %02x,%02x,%02x fg %06x bg %06x\n", res, r, g, b, fg, bg ); + res = GetPixel( hdc, 0, 0 ); + ok( res == get_nearest( r, g, b ), + "wrong result %06x for %02x,%02x,%02x fg %06x bg %06x\n", res, r, g, b, fg, bg ); + res = GetNearestColor( hdc, RGB(r,g,b) ); + ok( res == get_nearest( r, g, b ), + "wrong result %06x for %02x,%02x,%02x fg %06x bg %06x\n", res, r, g, b, fg, bg ); + + /* solid pen */ + old_pen = SelectObject( hdc, CreatePen( PS_SOLID, 1, RGB(r,g,b) )); + MoveToEx( hdc, 0, 0, NULL ); + LineTo( hdc, 16, 0 ); + res = GetPixel( hdc, 0, 0 ); + ok( res == (is_black_pen( fg, bg, r, g, b ) ? 0 : 0xffffff), + "wrong result %06x for %02x,%02x,%02x fg %06x bg %06x\n", res, r, g, b, fg, bg ); + GetBitmapBits( GetCurrentObject( hdc, OBJ_BITMAP ), sizeof(bits), bits ); + ok( bits[0] == (is_black_pen( fg, bg, r, g, b ) ? 0x00 : 0xffff), + "wrong bits %04x for %02x,%02x,%02x fg %06x bg %06x\n", bits[0], r, g, b, fg, bg ); + DeleteObject( SelectObject( hdc, old_pen )); + + /* mono DDB pattern brush */ + pattern = CreateBitmap( 16, 8, 1, 1, pattern_bits ); + old_brush = SelectObject( hdc, CreatePatternBrush( pattern )); + PatBlt( hdc, 0, 0, 16, 16, PATCOPY ); + GetBitmapBits( GetCurrentObject( hdc, OBJ_BITMAP ), sizeof(bits), bits ); + ok( bits[0] == 0x5555, + "wrong bits %04x for %02x,%02x,%02x fg %06x bg %06x\n", bits[0], r, g, b, fg, bg ); + DeleteObject( SelectObject( hdc, old_brush )); + DeleteObject( pattern ); +} + +static void test_mono_bitmap(void) +{ + static const COLORREF colors[][2] = + { + { RGB(0x00,0x00,0x00), RGB(0xff,0xff,0xff) }, + { RGB(0xff,0xff,0xff), RGB(0x00,0x00,0x00) }, + { RGB(0x00,0x00,0x00), RGB(0xff,0xff,0xfe) }, + { RGB(0x00,0x01,0x00), RGB(0xff,0xff,0xff) }, + { RGB(0x00,0x00,0x00), RGB(0x80,0x80,0x80) }, + { RGB(0x80,0x80,0x80), RGB(0xff,0xff,0xff) }, + { RGB(0x30,0x40,0x50), RGB(0x60,0x70,0x80) }, + { RGB(0xa0,0xa0,0xa0), RGB(0x20,0x30,0x10) }, + { PALETTEINDEX(0), PALETTEINDEX(255) }, + { PALETTEINDEX(1), PALETTEINDEX(2) }, + }; + + HBITMAP hbmp; + HDC hdc; + DWORD col; + int i, r, g, b; + + hdc = CreateCompatibleDC(0); + assert(hdc != 0); + + hbmp = CreateBitmap(16, 16, 1, 1, NULL); + assert(hbmp != NULL); + + SelectObject( hdc, hbmp ); + + for (col = 0; col < sizeof(colors) / sizeof(colors[0]); col++) + { + SetTextColor( hdc, colors[col][0] ); + SetBkColor( hdc, colors[col][1] ); + + for (i = 0; i < 256; i++) + { + HPALETTE pal = GetCurrentObject( hdc, OBJ_PAL ); + PALETTEENTRY ent; + + if (!GetPaletteEntries( pal, i, 1, &ent )) GetPaletteEntries( pal, 0, 1, &ent ); + test_color( hdc, PALETTEINDEX(i), get_nearest( ent.peRed, ent.peGreen, ent.peBlue )); + test_color( hdc, DIBINDEX(i), (i == 1) ? 0xffffff : 0x000000 ); + } + + for (r = 0; r < 256; r += 15) + for (g = 0; g < 256; g += 15) + for (b = 0; b < 256; b += 15) + test_bitmap_colors( hdc, colors[col][0], colors[col][1], r, g, b ); + } + + DeleteDC(hdc); + DeleteObject(hbmp); +} + static void test_bmBits(void) { BYTE bits[4]; @@ -5386,6 +5495,7 @@ START_TEST(bitmap) test_dib_formats(); test_mono_dibsection(); test_bitmap(); + test_mono_bitmap(); test_bmBits(); test_GetDIBits_selected_DIB(1); test_GetDIBits_selected_DIB(4);
1
0
0
0
Alexandre Julliard : gdi32: Always use the DIB engine for monochrome bitmap rendering.
by Alexandre Julliard
25 May '12
25 May '12
Module: wine Branch: master Commit: b81a7d976e3c3de36a01401d125871d3014e6c67 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b81a7d976e3c3de36a01401d1…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri May 25 11:47:46 2012 +0200 gdi32: Always use the DIB engine for monochrome bitmap rendering. --- dlls/gdi32/bitmap.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/dlls/gdi32/bitmap.c b/dlls/gdi32/bitmap.c index 1a0e6bb..cc6a409 100644 --- a/dlls/gdi32/bitmap.c +++ b/dlls/gdi32/bitmap.c @@ -518,8 +518,13 @@ static HGDIOBJ BITMAP_SelectObject( HGDIOBJ handle, HDC hdc ) if (dc->dibdrv) old_physdev = pop_dc_driver( dc, dc->dibdrv ); - physdev = GET_DC_PHYSDEV( dc, pSelectBitmap ); - createdev = GET_DC_PHYSDEV( dc, pCreateBitmap ); + if (bitmap->dib.dsBm.bmBitsPixel > 1) + { + physdev = GET_DC_PHYSDEV( dc, pSelectBitmap ); + createdev = GET_DC_PHYSDEV( dc, pCreateBitmap ); + } + else physdev = createdev = &dc->nulldrv; /* force use of the DIB engine for 1-bpp */ + if (physdev->funcs == &null_driver) { physdev = dc->dibdrv;
1
0
0
0
Alexandre Julliard : gdi32: Check that the bitmap depth matches the DC when selecting it.
by Alexandre Julliard
25 May '12
25 May '12
Module: wine Branch: master Commit: 294faf5ef37d9131408e1dd48b6f3bd23d0ee1c4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=294faf5ef37d9131408e1dd48…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri May 25 11:19:36 2012 +0200 gdi32: Check that the bitmap depth matches the DC when selecting it. --- dlls/gdi32/bitmap.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/dlls/gdi32/bitmap.c b/dlls/gdi32/bitmap.c index b46521a..1a0e6bb 100644 --- a/dlls/gdi32/bitmap.c +++ b/dlls/gdi32/bitmap.c @@ -507,6 +507,15 @@ static HGDIOBJ BITMAP_SelectObject( HGDIOBJ handle, HDC hdc ) goto done; } + if (bitmap->dib.dsBm.bmBitsPixel != 1 && + bitmap->dib.dsBm.bmBitsPixel != GetDeviceCaps( hdc, BITSPIXEL )) + { + WARN( "Wrong format bitmap %u bpp\n", bitmap->dib.dsBm.bmBitsPixel ); + GDI_ReleaseObj( handle ); + ret = 0; + goto done; + } + if (dc->dibdrv) old_physdev = pop_dc_driver( dc, dc->dibdrv ); physdev = GET_DC_PHYSDEV( dc, pSelectBitmap );
1
0
0
0
Alexandre Julliard : gdi32: Remove the CopyBitmap driver entry point.
by Alexandre Julliard
25 May '12
25 May '12
Module: wine Branch: master Commit: fdc4682e31d4ad2c54b8cc99a2f69d912a9480d8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fdc4682e31d4ad2c54b8cc99a…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed May 23 21:30:22 2012 +0200 gdi32: Remove the CopyBitmap driver entry point. --- dlls/gdi32/bitmap.c | 21 --------------------- dlls/gdi32/brush.c | 1 - dlls/gdi32/dibdrv/dc.c | 9 --------- dlls/gdi32/driver.c | 1 - dlls/gdi32/enhmfdrv/init.c | 1 - dlls/gdi32/freetype.c | 1 - dlls/gdi32/gdi_private.h | 1 - dlls/gdi32/mfdrv/init.c | 1 - dlls/gdi32/path.c | 1 - dlls/wineps.drv/init.c | 1 - dlls/winex11.drv/bitmap.c | 37 ------------------------------------- dlls/winex11.drv/init.c | 1 - dlls/winex11.drv/opengl.c | 1 - dlls/winex11.drv/x11drv.h | 1 - dlls/winex11.drv/xrender.c | 9 --------- include/wine/gdi_driver.h | 4 +--- 16 files changed, 1 insertions(+), 90 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=fdc4682e31d4ad2c54b8c…
1
0
0
0
Vincent Povirk : propsys: Implement IPropertyStoreCache::SetValueAndState.
by Alexandre Julliard
24 May '12
24 May '12
Module: wine Branch: master Commit: 91e95e125e457a9977e845279edb54e16cd81091 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=91e95e125e457a9977e845279…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Tue May 22 15:46:23 2012 -0500 propsys: Implement IPropertyStoreCache::SetValueAndState. --- dlls/propsys/propstore.c | 21 +++++++++++++++++++-- dlls/propsys/tests/propstore.c | 16 ++++++++-------- 2 files changed, 27 insertions(+), 10 deletions(-) diff --git a/dlls/propsys/propstore.c b/dlls/propsys/propstore.c index c9df65e..e438ce3 100644 --- a/dlls/propsys/propstore.c +++ b/dlls/propsys/propstore.c @@ -402,8 +402,25 @@ static HRESULT WINAPI PropertyStore_SetState(IPropertyStoreCache *iface, static HRESULT WINAPI PropertyStore_SetValueAndState(IPropertyStoreCache *iface, REFPROPERTYKEY key, const PROPVARIANT *ppropvar, PSC_STATE state) { - FIXME("%p,%p,%p,%d: stub\n", iface, key, ppropvar, state); - return E_NOTIMPL; + PropertyStore *This = impl_from_IPropertyStoreCache(iface); + propstore_value *value; + HRESULT hr; + + TRACE("%p,%p,%p,%d\n", iface, key, ppropvar, state); + + EnterCriticalSection(&This->lock); + + hr = PropertyStore_LookupValue(This, key, 1, &value); + + if (SUCCEEDED(hr)) + hr = PropVariantCopy(&value->propvar, ppropvar); + + if (SUCCEEDED(hr)) + value->state = state; + + LeaveCriticalSection(&This->lock); + + return hr; } static const IPropertyStoreCacheVtbl PropertyStore_Vtbl = { diff --git a/dlls/propsys/tests/propstore.c b/dlls/propsys/tests/propstore.c index b6c1e5a..5c1b021 100644 --- a/dlls/propsys/tests/propstore.c +++ b/dlls/propsys/tests/propstore.c @@ -166,15 +166,15 @@ static void test_inmemorystore(void) propvar.vt = VT_I4; propvar.u.lVal = 12346; hr = IPropertyStoreCache_SetValueAndState(propcache, &pkey, &propvar, 5); - todo_wine ok(hr == S_OK, "SetValueAndState failed, hr=%x\n", hr); + ok(hr == S_OK, "SetValueAndState failed, hr=%x\n", hr); memset(&propvar, 0, sizeof(propvar)); state = 0xdeadbeef; hr = IPropertyStoreCache_GetValueAndState(propcache, &pkey, &propvar, &state); ok(hr == S_OK, "GetValueAndState failed, hr=%x\n", hr); ok(propvar.vt == VT_I4, "expected VT_I4, got %d\n", propvar.vt); - todo_wine ok(propvar.u.lVal == 12346, "expected 12346, got %d\n", propvar.vt); - todo_wine ok(state == 5, "expected 5, got %d\n", state); + ok(propvar.u.lVal == 12346, "expected 12346, got %d\n", propvar.vt); + ok(state == 5, "expected 5, got %d\n", state); /* Set new field with state */ pkey.fmtid = PKEY_WineTest; @@ -183,15 +183,15 @@ static void test_inmemorystore(void) propvar.vt = VT_I4; propvar.u.lVal = 12347; hr = IPropertyStoreCache_SetValueAndState(propcache, &pkey, &propvar, PSC_DIRTY); - todo_wine ok(hr == S_OK, "SetValueAndState failed, hr=%x\n", hr); + ok(hr == S_OK, "SetValueAndState failed, hr=%x\n", hr); memset(&propvar, 0, sizeof(propvar)); state = 0xdeadbeef; hr = IPropertyStoreCache_GetValueAndState(propcache, &pkey, &propvar, &state); - todo_wine ok(hr == S_OK, "GetValueAndState failed, hr=%x\n", hr); - todo_wine ok(propvar.vt == VT_I4, "expected VT_I4, got %d\n", propvar.vt); - todo_wine ok(propvar.u.lVal == 12347, "expected 12347, got %d\n", propvar.vt); - todo_wine ok(state == PSC_DIRTY, "expected PSC_DIRTY, got %d\n", state); + ok(hr == S_OK, "GetValueAndState failed, hr=%x\n", hr); + ok(propvar.vt == VT_I4, "expected VT_I4, got %d\n", propvar.vt); + ok(propvar.u.lVal == 12347, "expected 12347, got %d\n", propvar.vt); + ok(state == PSC_DIRTY, "expected PSC_DIRTY, got %d\n", state); IPropertyStoreCache_Release(propcache); }
1
0
0
0
Vincent Povirk : propsys: Implement IPropertyStoreCache::SetState.
by Alexandre Julliard
24 May '12
24 May '12
Module: wine Branch: master Commit: f833061e50dc44edbf8a892c1aab226e2bbb9c40 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f833061e50dc44edbf8a892c1…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Tue May 22 15:43:01 2012 -0500 propsys: Implement IPropertyStoreCache::SetState. --- dlls/propsys/propstore.c | 18 ++++++++++++++++-- dlls/propsys/tests/propstore.c | 6 +++--- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/dlls/propsys/propstore.c b/dlls/propsys/propstore.c index 7c28131..c9df65e 100644 --- a/dlls/propsys/propstore.c +++ b/dlls/propsys/propstore.c @@ -381,8 +381,22 @@ static HRESULT WINAPI PropertyStore_GetValueAndState(IPropertyStoreCache *iface, static HRESULT WINAPI PropertyStore_SetState(IPropertyStoreCache *iface, REFPROPERTYKEY key, PSC_STATE pstate) { - FIXME("%p,%p,%d: stub\n", iface, key, pstate); - return E_NOTIMPL; + PropertyStore *This = impl_from_IPropertyStoreCache(iface); + propstore_value *value; + HRESULT hr; + + TRACE("%p,%p,%d\n", iface, key, pstate); + + EnterCriticalSection(&This->lock); + + hr = PropertyStore_LookupValue(This, key, 0, &value); + + if (SUCCEEDED(hr)) + value->state = pstate; + + LeaveCriticalSection(&This->lock); + + return hr; } static HRESULT WINAPI PropertyStore_SetValueAndState(IPropertyStoreCache *iface, diff --git a/dlls/propsys/tests/propstore.c b/dlls/propsys/tests/propstore.c index ad06ea0..b6c1e5a 100644 --- a/dlls/propsys/tests/propstore.c +++ b/dlls/propsys/tests/propstore.c @@ -144,7 +144,7 @@ static void test_inmemorystore(void) /* Set state on an unset field */ hr = IPropertyStoreCache_SetState(propcache, &pkey, PSC_NORMAL); - todo_wine ok(hr == TYPE_E_ELEMENTNOTFOUND, "SetState failed, hr=%x\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "SetState failed, hr=%x\n", hr); /* Manipulate state on already set field */ pkey.fmtid = PKEY_WineTest; @@ -156,12 +156,12 @@ static void test_inmemorystore(void) ok(state == PSC_NORMAL, "expected PSC_NORMAL, got %d\n", state); hr = IPropertyStoreCache_SetState(propcache, &pkey, 10); - todo_wine ok(hr == S_OK, "SetState failed, hr=%x\n", hr); + ok(hr == S_OK, "SetState failed, hr=%x\n", hr); state = 0xdeadbeef; hr = IPropertyStoreCache_GetState(propcache, &pkey, &state); ok(hr == S_OK, "GetState failed, hr=%x\n", hr); - todo_wine ok(state == 10, "expected 10, got %d\n", state); + ok(state == 10, "expected 10, got %d\n", state); propvar.vt = VT_I4; propvar.u.lVal = 12346;
1
0
0
0
Vincent Povirk : propsys: Implement IPropertyStoreCache::GetValueAndState.
by Alexandre Julliard
24 May '12
24 May '12
Module: wine Branch: master Commit: c3748c7daaeb2b0ca961787c7866434842b680d5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c3748c7daaeb2b0ca961787c7…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Tue May 22 15:40:45 2012 -0500 propsys: Implement IPropertyStoreCache::GetValueAndState. --- dlls/propsys/propstore.c | 27 +++++++++++++++++++++++++-- dlls/propsys/tests/propstore.c | 10 +++++----- 2 files changed, 30 insertions(+), 7 deletions(-) diff --git a/dlls/propsys/propstore.c b/dlls/propsys/propstore.c index 00ff701..7c28131 100644 --- a/dlls/propsys/propstore.c +++ b/dlls/propsys/propstore.c @@ -351,8 +351,31 @@ static HRESULT WINAPI PropertyStore_GetState(IPropertyStoreCache *iface, static HRESULT WINAPI PropertyStore_GetValueAndState(IPropertyStoreCache *iface, REFPROPERTYKEY key, PROPVARIANT *ppropvar, PSC_STATE *pstate) { - FIXME("%p,%p,%p,%p: stub\n", iface, key, ppropvar, pstate); - return E_NOTIMPL; + PropertyStore *This = impl_from_IPropertyStoreCache(iface); + propstore_value *value; + HRESULT hr; + + TRACE("%p,%p,%p,%p\n", iface, key, ppropvar, pstate); + + EnterCriticalSection(&This->lock); + + hr = PropertyStore_LookupValue(This, key, 0, &value); + + if (SUCCEEDED(hr)) + hr = PropVariantCopy(ppropvar, &value->propvar); + + if (SUCCEEDED(hr)) + *pstate = value->state; + + LeaveCriticalSection(&This->lock); + + if (FAILED(hr)) + { + PropVariantInit(ppropvar); + *pstate = PSC_NORMAL; + } + + return hr; } static HRESULT WINAPI PropertyStore_SetState(IPropertyStoreCache *iface, diff --git a/dlls/propsys/tests/propstore.c b/dlls/propsys/tests/propstore.c index 17cf7f3..ad06ea0 100644 --- a/dlls/propsys/tests/propstore.c +++ b/dlls/propsys/tests/propstore.c @@ -138,9 +138,9 @@ static void test_inmemorystore(void) propvar.vt = VT_I2; state = 0xdeadbeef; hr = IPropertyStoreCache_GetValueAndState(propcache, &pkey, &propvar, &state); - todo_wine ok(hr == TYPE_E_ELEMENTNOTFOUND, "GetValueAndState failed, hr=%x\n", hr); - todo_wine ok(propvar.vt == VT_EMPTY, "expected VT_EMPTY, got %d\n", propvar.vt); - todo_wine ok(state == PSC_NORMAL, "expected PSC_NORMAL, got %d\n", state); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "GetValueAndState failed, hr=%x\n", hr); + ok(propvar.vt == VT_EMPTY, "expected VT_EMPTY, got %d\n", propvar.vt); + ok(state == PSC_NORMAL, "expected PSC_NORMAL, got %d\n", state); /* Set state on an unset field */ hr = IPropertyStoreCache_SetState(propcache, &pkey, PSC_NORMAL); @@ -171,8 +171,8 @@ static void test_inmemorystore(void) memset(&propvar, 0, sizeof(propvar)); state = 0xdeadbeef; hr = IPropertyStoreCache_GetValueAndState(propcache, &pkey, &propvar, &state); - todo_wine ok(hr == S_OK, "GetValueAndState failed, hr=%x\n", hr); - todo_wine ok(propvar.vt == VT_I4, "expected VT_I4, got %d\n", propvar.vt); + ok(hr == S_OK, "GetValueAndState failed, hr=%x\n", hr); + ok(propvar.vt == VT_I4, "expected VT_I4, got %d\n", propvar.vt); todo_wine ok(propvar.u.lVal == 12346, "expected 12346, got %d\n", propvar.vt); todo_wine ok(state == 5, "expected 5, got %d\n", state);
1
0
0
0
Vincent Povirk : propsys: Implement IPropertyStoreCache::GetState.
by Alexandre Julliard
24 May '12
24 May '12
Module: wine Branch: master Commit: a28183f390cc3975800ca2693a2a8ffec376e148 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a28183f390cc3975800ca2693…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Tue May 22 15:38:22 2012 -0500 propsys: Implement IPropertyStoreCache::GetState. --- dlls/propsys/propstore.c | 21 +++++++++++++++++++-- dlls/propsys/tests/propstore.c | 10 +++++----- 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/dlls/propsys/propstore.c b/dlls/propsys/propstore.c index a57bb2e..00ff701 100644 --- a/dlls/propsys/propstore.c +++ b/dlls/propsys/propstore.c @@ -327,8 +327,25 @@ static HRESULT WINAPI PropertyStore_Commit(IPropertyStoreCache *iface) static HRESULT WINAPI PropertyStore_GetState(IPropertyStoreCache *iface, REFPROPERTYKEY key, PSC_STATE *pstate) { - FIXME("%p,%p,%p: stub\n", iface, key, pstate); - return E_NOTIMPL; + PropertyStore *This = impl_from_IPropertyStoreCache(iface); + propstore_value *value; + HRESULT hr; + + TRACE("%p,%p,%p\n", iface, key, pstate); + + EnterCriticalSection(&This->lock); + + hr = PropertyStore_LookupValue(This, key, 0, &value); + + if (SUCCEEDED(hr)) + *pstate = value->state; + + LeaveCriticalSection(&This->lock); + + if (FAILED(hr)) + *pstate = PSC_NORMAL; + + return hr; } static HRESULT WINAPI PropertyStore_GetValueAndState(IPropertyStoreCache *iface, diff --git a/dlls/propsys/tests/propstore.c b/dlls/propsys/tests/propstore.c index 7915b96..17cf7f3 100644 --- a/dlls/propsys/tests/propstore.c +++ b/dlls/propsys/tests/propstore.c @@ -132,8 +132,8 @@ static void test_inmemorystore(void) state = 0xdeadbeef; hr = IPropertyStoreCache_GetState(propcache, &pkey, &state); - todo_wine ok(hr == TYPE_E_ELEMENTNOTFOUND, "GetState failed, hr=%x\n", hr); - todo_wine ok(state == PSC_NORMAL, "expected PSC_NORMAL, got %d\n", state); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "GetState failed, hr=%x\n", hr); + ok(state == PSC_NORMAL, "expected PSC_NORMAL, got %d\n", state); propvar.vt = VT_I2; state = 0xdeadbeef; @@ -152,15 +152,15 @@ static void test_inmemorystore(void) state = 0xdeadbeef; hr = IPropertyStoreCache_GetState(propcache, &pkey, &state); - todo_wine ok(hr == S_OK, "GetState failed, hr=%x\n", hr); - todo_wine ok(state == PSC_NORMAL, "expected PSC_NORMAL, got %d\n", state); + ok(hr == S_OK, "GetState failed, hr=%x\n", hr); + ok(state == PSC_NORMAL, "expected PSC_NORMAL, got %d\n", state); hr = IPropertyStoreCache_SetState(propcache, &pkey, 10); todo_wine ok(hr == S_OK, "SetState failed, hr=%x\n", hr); state = 0xdeadbeef; hr = IPropertyStoreCache_GetState(propcache, &pkey, &state); - todo_wine ok(hr == S_OK, "GetState failed, hr=%x\n", hr); + ok(hr == S_OK, "GetState failed, hr=%x\n", hr); todo_wine ok(state == 10, "expected 10, got %d\n", state); propvar.vt = VT_I4;
1
0
0
0
← Newer
1
...
12
13
14
15
16
17
18
...
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