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
February 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
459 discussions
Start a n
N
ew thread
Ken Thomases : winemac: Use system cursors when possible.
by Alexandre Julliard
25 Feb '13
25 Feb '13
Module: wine Branch: master Commit: b79d955342754df7aee8143e530d2054c092bece URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b79d955342754df7aee8143e5…
Author: Ken Thomases <ken(a)codeweavers.com> Date: Sun Feb 24 22:53:25 2013 -0600 winemac: Use system cursors when possible. --- dlls/winemac.drv/mouse.c | 215 ++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 196 insertions(+), 19 deletions(-) diff --git a/dlls/winemac.drv/mouse.c b/dlls/winemac.drv/mouse.c index 4d87324..8e16388 100644 --- a/dlls/winemac.drv/mouse.c +++ b/dlls/winemac.drv/mouse.c @@ -44,6 +44,90 @@ static CRITICAL_SECTION cursor_cache_section = { &critsect_debug, -1, 0, 0, 0, 0 static CFMutableDictionaryRef cursor_cache; +struct system_cursors +{ + WORD id; + CFStringRef name; +}; + +static const struct system_cursors user32_cursors[] = +{ + { OCR_NORMAL, CFSTR("arrowCursor") }, + { OCR_IBEAM, CFSTR("IBeamCursor") }, + { OCR_CROSS, CFSTR("crosshairCursor") }, + { OCR_SIZEWE, CFSTR("resizeLeftRightCursor") }, + { OCR_SIZENS, CFSTR("resizeUpDownCursor") }, + { OCR_NO, CFSTR("operationNotAllowedCursor") }, + { OCR_HAND, CFSTR("pointingHandCursor") }, + { 0 } +}; + +static const struct system_cursors comctl32_cursors[] = +{ + { 102, CFSTR("closedHandCursor") }, + { 104, CFSTR("dragCopyCursor") }, + { 105, CFSTR("arrowCursor") }, + { 106, CFSTR("resizeLeftRightCursor") }, + { 107, CFSTR("resizeLeftRightCursor") }, + { 108, CFSTR("pointingHandCursor") }, + { 135, CFSTR("resizeUpDownCursor") }, + { 0 } +}; + +static const struct system_cursors ole32_cursors[] = +{ + { 1, CFSTR("operationNotAllowedCursor") }, + { 2, CFSTR("closedHandCursor") }, + { 3, CFSTR("dragCopyCursor") }, + { 4, CFSTR("dragLinkCursor") }, + { 0 } +}; + +static const struct system_cursors riched20_cursors[] = +{ + { 105, CFSTR("pointingHandCursor") }, + { 109, CFSTR("dragCopyCursor") }, + { 110, CFSTR("closedHandCursor") }, + { 111, CFSTR("operationNotAllowedCursor") }, + { 0 } +}; + +static const struct +{ + const struct system_cursors *cursors; + WCHAR name[16]; +} module_cursors[] = +{ + { user32_cursors, {'u','s','e','r','3','2','.','d','l','l',0} }, + { comctl32_cursors, {'c','o','m','c','t','l','3','2','.','d','l','l',0} }, + { ole32_cursors, {'o','l','e','3','2','.','d','l','l',0} }, + { riched20_cursors, {'r','i','c','h','e','d','2','0','.','d','l','l',0} } +}; + +/* The names of NSCursor class methods which return cursor objects. */ +static const CFStringRef cocoa_cursor_names[] = +{ + CFSTR("arrowCursor"), + CFSTR("closedHandCursor"), + CFSTR("contextualMenuCursor"), + CFSTR("crosshairCursor"), + CFSTR("disappearingItemCursor"), + CFSTR("dragCopyCursor"), + CFSTR("dragLinkCursor"), + CFSTR("IBeamCursor"), + CFSTR("IBeamCursorForVerticalLayout"), + CFSTR("openHandCursor"), + CFSTR("operationNotAllowedCursor"), + CFSTR("pointingHandCursor"), + CFSTR("resizeDownCursor"), + CFSTR("resizeLeftCursor"), + CFSTR("resizeLeftRightCursor"), + CFSTR("resizeRightCursor"), + CFSTR("resizeUpCursor"), + CFSTR("resizeUpDownCursor"), +}; + + /*********************************************************************** * send_mouse_input * @@ -90,6 +174,90 @@ static void send_mouse_input(HWND hwnd, UINT flags, int x, int y, /*********************************************************************** + * copy_system_cursor_name + */ +CFStringRef copy_system_cursor_name(ICONINFOEXW *info) +{ + static const WCHAR idW[] = {'%','h','u',0}; + const struct system_cursors *cursors; + unsigned int i; + CFStringRef cursor_name = NULL; + HMODULE module; + HKEY key; + WCHAR *p, name[MAX_PATH * 2]; + + TRACE("info->szModName %s info->szResName %s info->wResID %hu\n", debugstr_w(info->szModName), + debugstr_w(info->szResName), info->wResID); + + if (!info->szModName[0]) return NULL; + + p = strrchrW(info->szModName, '\\'); + strcpyW(name, p ? p + 1 : info->szModName); + p = name + strlenW(name); + *p++ = ','; + if (info->szResName[0]) strcpyW(p, info->szResName); + else sprintfW(p, idW, info->wResID); + + /* @@ Wine registry key: HKCU\Software\Wine\Mac Driver\Cursors */ + if (!RegOpenKeyA(HKEY_CURRENT_USER, "Software\\Wine\\Mac Driver\\Cursors", &key)) + { + WCHAR value[64]; + DWORD size, ret; + + value[0] = 0; + size = sizeof(value) / sizeof(WCHAR); + ret = RegQueryValueExW(key, name, NULL, NULL, (BYTE *)value, &size); + RegCloseKey(key); + if (!ret) + { + if (!value[0]) + { + TRACE("registry forces standard cursor for %s\n", debugstr_w(name)); + return NULL; /* force standard cursor */ + } + + cursor_name = CFStringCreateWithCharacters(NULL, value, strlenW(value)); + if (!cursor_name) + { + WARN("CFStringCreateWithCharacters failed for %s\n", debugstr_w(value)); + return NULL; + } + + /* Make sure it's one of the appropriate NSCursor class methods. */ + for (i = 0; i < sizeof(cocoa_cursor_names) / sizeof(cocoa_cursor_names[0]); i++) + if (CFEqual(cursor_name, cocoa_cursor_names[i])) + goto done; + + WARN("%s mapped to invalid Cocoa cursor name %s\n", debugstr_w(name), debugstr_w(value)); + CFRelease(cursor_name); + return NULL; + } + } + + if (info->szResName[0]) goto done; /* only integer resources are supported here */ + if (!(module = GetModuleHandleW(info->szModName))) goto done; + + for (i = 0; i < sizeof(module_cursors)/sizeof(module_cursors[0]); i++) + if (GetModuleHandleW(module_cursors[i].name) == module) break; + if (i == sizeof(module_cursors)/sizeof(module_cursors[0])) goto done; + + cursors = module_cursors[i].cursors; + for (i = 0; cursors[i].id; i++) + if (cursors[i].id == info->wResID) + { + cursor_name = CFRetain(cursors[i].name); + break; + } + +done: + if (cursor_name) + TRACE("%s -> %s\n", debugstr_w(name), debugstr_cf(cursor_name)); + else + WARN("no system cursor found for %s\n", debugstr_w(name)); + return cursor_name; +} + +/*********************************************************************** * release_provider_cfdata * * Helper for create_monochrome_cursor. A CFData is used by two @@ -580,8 +748,6 @@ void CDECL macdrv_SetCursor(HCURSOR cursor) if (cursor) { ICONINFOEXW info; - BITMAP bm; - HDC hdc; EnterCriticalSection(&cursor_cache_section); if (cursor_cache) @@ -606,28 +772,39 @@ void CDECL macdrv_SetCursor(HCURSOR cursor) return; } - GetObjectW(info.hbmMask, sizeof(bm), &bm); - if (!info.hbmColor) bm.bmHeight = max(1, bm.bmHeight / 2); - - /* make sure hotspot is valid */ - if (info.xHotspot >= bm.bmWidth || info.yHotspot >= bm.bmHeight) + if ((cursor_name = copy_system_cursor_name(&info))) { - info.xHotspot = bm.bmWidth / 2; - info.yHotspot = bm.bmHeight / 2; - } - - hdc = CreateCompatibleDC(0); - - if (info.hbmColor) - { - cursor_frames = create_color_cursor(hdc, &info, cursor, bm.bmWidth, bm.bmHeight); DeleteObject(info.hbmColor); + DeleteObject(info.hbmMask); } else - cursor_frames = create_monochrome_cursor(hdc, &info, bm.bmWidth, bm.bmHeight); + { + BITMAP bm; + HDC hdc; + + GetObjectW(info.hbmMask, sizeof(bm), &bm); + if (!info.hbmColor) bm.bmHeight = max(1, bm.bmHeight / 2); - DeleteObject(info.hbmMask); - DeleteDC(hdc); + /* make sure hotspot is valid */ + if (info.xHotspot >= bm.bmWidth || info.yHotspot >= bm.bmHeight) + { + info.xHotspot = bm.bmWidth / 2; + info.yHotspot = bm.bmHeight / 2; + } + + hdc = CreateCompatibleDC(0); + + if (info.hbmColor) + { + cursor_frames = create_color_cursor(hdc, &info, cursor, bm.bmWidth, bm.bmHeight); + DeleteObject(info.hbmColor); + } + else + cursor_frames = create_monochrome_cursor(hdc, &info, bm.bmWidth, bm.bmHeight); + + DeleteObject(info.hbmMask); + DeleteDC(hdc); + } if (cursor_name || cursor_frames) {
1
0
0
0
Ken Thomases : winemac: Implement SetCursor() and DestroyCursorIcon().
by Alexandre Julliard
25 Feb '13
25 Feb '13
Module: wine Branch: master Commit: a49df4b3172dda83262fdea9125dabf3a2bb3445 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a49df4b3172dda83262fdea91…
Author: Ken Thomases <ken(a)codeweavers.com> Date: Sun Feb 24 22:53:21 2013 -0600 winemac: Implement SetCursor() and DestroyCursorIcon(). --- dlls/winemac.drv/cocoa_app.h | 5 + dlls/winemac.drv/cocoa_app.m | 142 +++++++++ dlls/winemac.drv/macdrv.h | 2 + dlls/winemac.drv/macdrv_cocoa.h | 4 + dlls/winemac.drv/macdrv_main.c | 34 +++ dlls/winemac.drv/mouse.c | 577 +++++++++++++++++++++++++++++++++++++ dlls/winemac.drv/winemac.drv.spec | 2 + 7 files changed, 766 insertions(+), 0 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=a49df4b3172dda83262fd…
1
0
0
0
Dmitry Timoshkov : gdiplus: If a device doesn't support AlphaBlend don' t convert image to PARGB.
by Alexandre Julliard
25 Feb '13
25 Feb '13
Module: wine Branch: master Commit: 1896e5575ef63919fefbe3bfc587f41be086b211 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1896e5575ef63919fefbe3bfc…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Mon Feb 25 13:31:12 2013 +0800 gdiplus: If a device doesn't support AlphaBlend don't convert image to PARGB. --- dlls/gdiplus/graphics.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index 01e127c..853027c 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -398,8 +398,11 @@ static GpStatus alpha_blend_hdc_pixels(GpGraphics *graphics, INT dst_x, INT dst_ hbitmap = CreateDIBSection(hdc, (BITMAPINFO*)&bih, DIB_RGB_COLORS, (void**)&temp_bits, NULL, 0); - convert_32bppARGB_to_32bppPARGB(src_width, src_height, temp_bits, - 4 * src_width, src, src_stride); + if (GetDeviceCaps(graphics->hdc, SHADEBLENDCAPS) == SB_NONE) + memcpy(temp_bits, src, src_width * src_height * 4); + else + convert_32bppARGB_to_32bppPARGB(src_width, src_height, temp_bits, + 4 * src_width, src, src_stride); SelectObject(hdc, hbitmap); gdi_alpha_blend(graphics, dst_x, dst_y, src_width, src_height,
1
0
0
0
Dmitry Timoshkov : gdiplus: Round up when converting from 32-bit ARGB to PARGB.
by Alexandre Julliard
25 Feb '13
25 Feb '13
Module: wine Branch: master Commit: d23bfd8dfc74a1955a0270feaf07ccd7a23a723a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d23bfd8dfc74a1955a0270fea…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Mon Feb 25 13:30:32 2013 +0800 gdiplus: Round up when converting from 32-bit ARGB to PARGB. --- dlls/gdiplus/gdiplus.c | 6 +++--- dlls/gdiplus/tests/image.c | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/dlls/gdiplus/gdiplus.c b/dlls/gdiplus/gdiplus.c index 1c016be..f199055 100644 --- a/dlls/gdiplus/gdiplus.c +++ b/dlls/gdiplus/gdiplus.c @@ -442,9 +442,9 @@ void convert_32bppARGB_to_32bppPARGB(UINT width, UINT height, for (x=0; x<width; x++) { BYTE alpha=src[3]; - *dst++ = *src++ * alpha / 255; - *dst++ = *src++ * alpha / 255; - *dst++ = *src++ * alpha / 255; + *dst++ = (*src++ * alpha + 127) / 255; + *dst++ = (*src++ * alpha + 127) / 255; + *dst++ = (*src++ * alpha + 127) / 255; *dst++ = *src++; } } diff --git a/dlls/gdiplus/tests/image.c b/dlls/gdiplus/tests/image.c index a075b42..feab70b 100644 --- a/dlls/gdiplus/tests/image.c +++ b/dlls/gdiplus/tests/image.c @@ -4129,7 +4129,6 @@ static void test_ARGB_conversion(void) ok(data.Stride == 8, "expected 8, got %d\n", data.Stride); ok(data.PixelFormat == PixelFormat32bppPARGB, "expected PixelFormat32bppPARGB, got %d\n", data.PixelFormat); match = !memcmp(data.Scan0, pargb, sizeof(pargb)); -todo_wine ok(match, "bits don't match\n"); if (!match) {
1
0
0
0
Dmitry Timoshkov : gdiplus: Add some tests for ARGB conversions.
by Alexandre Julliard
25 Feb '13
25 Feb '13
Module: wine Branch: master Commit: ada3aea73645c9c48995b366b0920826027e9769 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ada3aea73645c9c48995b366b…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Mon Feb 25 13:29:44 2013 +0800 gdiplus: Add some tests for ARGB conversions. --- dlls/gdiplus/tests/image.c | 72 ++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 72 insertions(+), 0 deletions(-) diff --git a/dlls/gdiplus/tests/image.c b/dlls/gdiplus/tests/image.c index 46e250d..a075b42 100644 --- a/dlls/gdiplus/tests/image.c +++ b/dlls/gdiplus/tests/image.c @@ -4107,6 +4107,77 @@ static void test_gif_properties(void) GdipDisposeImage(image); } +static void test_ARGB_conversion(void) +{ + BYTE argb[8] = { 0x11,0x22,0x33,0x80, 0xff,0xff,0xff,0 }; + BYTE pargb[8] = { 0x09,0x11,0x1a,0x80, 0,0,0,0 }; + BYTE rgb32_xp[8] = { 0x11,0x22,0x33,0xff, 0xff,0xff,0xff,0xff }; + BYTE rgb24[6] = { 0x11,0x22,0x33, 0xff,0xff,0xff }; + BYTE *bits; + GpBitmap *bitmap; + BitmapData data; + GpStatus status; + int match; + + status = GdipCreateBitmapFromScan0(2, 1, 8, PixelFormat32bppARGB, argb, &bitmap); + expect(Ok, status); + + status = GdipBitmapLockBits(bitmap, NULL, ImageLockModeRead, PixelFormat32bppPARGB, &data); + expect(Ok, status); + ok(data.Width == 2, "expected 2, got %d\n", data.Width); + ok(data.Height == 1, "expected 1, got %d\n", data.Height); + ok(data.Stride == 8, "expected 8, got %d\n", data.Stride); + ok(data.PixelFormat == PixelFormat32bppPARGB, "expected PixelFormat32bppPARGB, got %d\n", data.PixelFormat); + match = !memcmp(data.Scan0, pargb, sizeof(pargb)); +todo_wine + ok(match, "bits don't match\n"); + if (!match) + { + bits = data.Scan0; + trace("format %#x, bits %02x,%02x,%02x,%02x %02x,%02x,%02x,%02x\n", PixelFormat32bppPARGB, + bits[0], bits[1], bits[2], bits[3], bits[4], bits[5], bits[6], bits[7]); + } + status = GdipBitmapUnlockBits(bitmap, &data); + expect(Ok, status); + + status = GdipBitmapLockBits(bitmap, NULL, ImageLockModeRead, PixelFormat32bppRGB, &data); + expect(Ok, status); + ok(data.Width == 2, "expected 2, got %d\n", data.Width); + ok(data.Height == 1, "expected 1, got %d\n", data.Height); + ok(data.Stride == 8, "expected 8, got %d\n", data.Stride); + ok(data.PixelFormat == PixelFormat32bppRGB, "expected PixelFormat32bppRGB, got %d\n", data.PixelFormat); + match = !memcmp(data.Scan0, argb, sizeof(argb)) || + !memcmp(data.Scan0, rgb32_xp, sizeof(rgb32_xp)); + ok(match, "bits don't match\n"); + if (!match) + { + bits = data.Scan0; + trace("format %#x, bits %02x,%02x,%02x,%02x %02x,%02x,%02x,%02x\n", PixelFormat32bppRGB, + bits[0], bits[1], bits[2], bits[3], bits[4], bits[5], bits[6], bits[7]); + } + status = GdipBitmapUnlockBits(bitmap, &data); + expect(Ok, status); + + status = GdipBitmapLockBits(bitmap, NULL, ImageLockModeRead, PixelFormat24bppRGB, &data); + expect(Ok, status); + ok(data.Width == 2, "expected 2, got %d\n", data.Width); + ok(data.Height == 1, "expected 1, got %d\n", data.Height); + ok(data.Stride == 8, "expected 8, got %d\n", data.Stride); + ok(data.PixelFormat == PixelFormat24bppRGB, "expected PixelFormat24bppRGB, got %d\n", data.PixelFormat); + match = !memcmp(data.Scan0, rgb24, sizeof(rgb24)); + ok(match, "bits don't match\n"); + if (!match) + { + bits = data.Scan0; + trace("format %#x, bits %02x,%02x,%02x,%02x %02x,%02x,%02x,%02x\n", PixelFormat24bppRGB, + bits[0], bits[1], bits[2], bits[3], bits[4], bits[5], bits[6], bits[7]); + } + status = GdipBitmapUnlockBits(bitmap, &data); + expect(Ok, status); + + GdipDisposeImage((GpImage *)bitmap); +} + START_TEST(image) { struct GdiplusStartupInput gdiplusStartupInput; @@ -4119,6 +4190,7 @@ START_TEST(image) GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL); + test_ARGB_conversion(); test_DrawImage_scale(); test_image_format(); test_DrawImage();
1
0
0
0
Nikolay Sivov : msvcrt: Move demangler flags to a header and use them.
by Alexandre Julliard
25 Feb '13
25 Feb '13
Module: wine Branch: master Commit: eab914b968e2558fc9dc61e002b124d8c614b6fe URL:
http://source.winehq.org/git/wine.git/?a=commit;h=eab914b968e2558fc9dc61e00…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sun Feb 24 15:23:29 2013 +0400 msvcrt: Move demangler flags to a header and use them. --- dlls/msvcrt/cpp.c | 2 +- dlls/msvcrt/msvcrt.h | 25 ++++++++++++++++++++++--- dlls/msvcrt/undname.c | 19 ------------------- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/dlls/msvcrt/cpp.c b/dlls/msvcrt/cpp.c index ec0fa7df..0fbdf5f 100644 --- a/dlls/msvcrt/cpp.c +++ b/dlls/msvcrt/cpp.c @@ -592,7 +592,7 @@ const char * __thiscall MSVCRT_type_info_name(type_info * _this) * Is this '.' really part of the mangled name, or has it some other meaning ? */ char* name = __unDName(0, _this->mangled + 1, 0, - MSVCRT_malloc, MSVCRT_free, 0x2800); + MSVCRT_malloc, MSVCRT_free, UNDNAME_NO_ARGUMENTS | UNDNAME_32_BIT_DECODE); if (name) { unsigned int len = strlen(name); diff --git a/dlls/msvcrt/msvcrt.h b/dlls/msvcrt/msvcrt.h index ba67b65..bd69224 100644 --- a/dlls/msvcrt/msvcrt.h +++ b/dlls/msvcrt/msvcrt.h @@ -251,9 +251,6 @@ void __cdecl MSVCRT_operator_delete(void*); typedef void* (__cdecl *malloc_func_t)(MSVCRT_size_t); typedef void (__cdecl *free_func_t)(void*); -extern char* __cdecl __unDName(char *,const char*,int,malloc_func_t,free_func_t,unsigned short int); -extern char* __cdecl __unDNameEx(char *,const char*,int,malloc_func_t,free_func_t,void *,unsigned short int); - /* Setup and teardown multi threaded locks */ extern void msvcrt_init_mt_locks(void) DECLSPEC_HIDDEN; extern void msvcrt_free_mt_locks(void) DECLSPEC_HIDDEN; @@ -1012,4 +1009,26 @@ typedef struct double x; } MSVCRT__CRT_DOUBLE; +extern char* __cdecl __unDName(char *,const char*,int,malloc_func_t,free_func_t,unsigned short int); + +/* __unDName/__unDNameEx flags */ +#define UNDNAME_COMPLETE (0x0000) +#define UNDNAME_NO_LEADING_UNDERSCORES (0x0001) /* Don't show __ in calling convention */ +#define UNDNAME_NO_MS_KEYWORDS (0x0002) /* Don't show calling convention at all */ +#define UNDNAME_NO_FUNCTION_RETURNS (0x0004) /* Don't show function/method return value */ +#define UNDNAME_NO_ALLOCATION_MODEL (0x0008) +#define UNDNAME_NO_ALLOCATION_LANGUAGE (0x0010) +#define UNDNAME_NO_MS_THISTYPE (0x0020) +#define UNDNAME_NO_CV_THISTYPE (0x0040) +#define UNDNAME_NO_THISTYPE (0x0060) +#define UNDNAME_NO_ACCESS_SPECIFIERS (0x0080) /* Don't show access specifier (public/protected/private) */ +#define UNDNAME_NO_THROW_SIGNATURES (0x0100) +#define UNDNAME_NO_MEMBER_TYPE (0x0200) /* Don't show static/virtual specifier */ +#define UNDNAME_NO_RETURN_UDT_MODEL (0x0400) +#define UNDNAME_32_BIT_DECODE (0x0800) +#define UNDNAME_NAME_ONLY (0x1000) /* Only report the variable/method name */ +#define UNDNAME_NO_ARGUMENTS (0x2000) /* Don't show method arguments */ +#define UNDNAME_NO_SPECIAL_SYMS (0x4000) +#define UNDNAME_NO_COMPLEX_TYPE (0x8000) + #endif /* __WINE_MSVCRT_H */ diff --git a/dlls/msvcrt/undname.c b/dlls/msvcrt/undname.c index 4fe5c2c..a997351 100644 --- a/dlls/msvcrt/undname.c +++ b/dlls/msvcrt/undname.c @@ -36,25 +36,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(msvcrt); * - back-port this new code into tools/winedump/msmangle.c */ -#define UNDNAME_COMPLETE (0x0000) -#define UNDNAME_NO_LEADING_UNDERSCORES (0x0001) /* Don't show __ in calling convention */ -#define UNDNAME_NO_MS_KEYWORDS (0x0002) /* Don't show calling convention at all */ -#define UNDNAME_NO_FUNCTION_RETURNS (0x0004) /* Don't show function/method return value */ -#define UNDNAME_NO_ALLOCATION_MODEL (0x0008) -#define UNDNAME_NO_ALLOCATION_LANGUAGE (0x0010) -#define UNDNAME_NO_MS_THISTYPE (0x0020) -#define UNDNAME_NO_CV_THISTYPE (0x0040) -#define UNDNAME_NO_THISTYPE (0x0060) -#define UNDNAME_NO_ACCESS_SPECIFIERS (0x0080) /* Don't show access specifier (public/protected/private) */ -#define UNDNAME_NO_THROW_SIGNATURES (0x0100) -#define UNDNAME_NO_MEMBER_TYPE (0x0200) /* Don't show static/virtual specifier */ -#define UNDNAME_NO_RETURN_UDT_MODEL (0x0400) -#define UNDNAME_32_BIT_DECODE (0x0800) -#define UNDNAME_NAME_ONLY (0x1000) /* Only report the variable/method name */ -#define UNDNAME_NO_ARGUMENTS (0x2000) /* Don't show method arguments */ -#define UNDNAME_NO_SPECIAL_SYMS (0x4000) -#define UNDNAME_NO_COMPLEX_TYPE (0x8000) - /* How data types modifiers are stored: * M (in the following definitions) is defined for * 'A', 'B', 'C' and 'D' as follows
1
0
0
0
Daniel Jelinski : comctl32/imagelist: Allow only one drag cursor.
by Alexandre Julliard
25 Feb '13
25 Feb '13
Module: wine Branch: master Commit: 30d667bd25701076400481204658fb772edc2b2c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=30d667bd25701076400481204…
Author: Daniel Jelinski <djelinski1(a)gmail.com> Date: Sun Feb 24 00:33:58 2013 +0100 comctl32/imagelist: Allow only one drag cursor. --- dlls/comctl32/imagelist.c | 14 +++++++++----- 1 files changed, 9 insertions(+), 5 deletions(-) diff --git a/dlls/comctl32/imagelist.c b/dlls/comctl32/imagelist.c index 3eb7724..54d864e 100644 --- a/dlls/comctl32/imagelist.c +++ b/dlls/comctl32/imagelist.c @@ -114,6 +114,7 @@ typedef struct { HWND hwnd; HIMAGELIST himl; + HIMAGELIST himlNoCursor; /* position of the drag image relative to the window */ INT x; INT y; @@ -126,7 +127,7 @@ typedef struct HBITMAP hbmBg; } INTERNALDRAG; -static INTERNALDRAG InternalDrag = { 0, 0, 0, 0, 0, 0, FALSE, 0 }; +static INTERNALDRAG InternalDrag = { 0, 0, 0, 0, 0, 0, 0, FALSE, 0 }; static HBITMAP ImageList_CreateImage(HDC hdc, HIMAGELIST himl, UINT count); static HRESULT ImageListImpl_CreateInstance(const IUnknown *pUnkOuter, REFIID iid, void** ppv); @@ -607,7 +608,7 @@ ImageList_BeginDrag (HIMAGELIST himlTrack, INT iTrack, cx = himlTrack->cx; cy = himlTrack->cy; - InternalDrag.himl = ImageList_Create (cx, cy, himlTrack->flags, 1, 1); + InternalDrag.himlNoCursor = InternalDrag.himl = ImageList_Create (cx, cy, himlTrack->flags, 1, 1); if (InternalDrag.himl == NULL) { WARN("Error creating drag image list!\n"); return FALSE; @@ -1635,8 +1636,10 @@ ImageList_EndDrag (void) { /* cleanup the InternalDrag struct */ InternalDrag.hwnd = 0; + if (InternalDrag.himl != InternalDrag.himlNoCursor) + ImageList_Destroy (InternalDrag.himlNoCursor); ImageList_Destroy (InternalDrag.himl); - InternalDrag.himl = 0; + InternalDrag.himlNoCursor = InternalDrag.himl = 0; InternalDrag.x= 0; InternalDrag.y= 0; InternalDrag.dxHotspot = 0; @@ -2699,7 +2702,7 @@ ImageList_SetDragCursorImage (HIMAGELIST himlDrag, INT iDrag, visible = InternalDrag.bShow; - himlTemp = ImageList_Merge (InternalDrag.himl, 0, himlDrag, iDrag, + himlTemp = ImageList_Merge (InternalDrag.himlNoCursor, 0, himlDrag, iDrag, dxHotspot, dyHotspot); if (visible) { @@ -2713,7 +2716,8 @@ ImageList_SetDragCursorImage (HIMAGELIST himlDrag, INT iDrag, InternalDrag.hbmBg = 0; } - ImageList_Destroy (InternalDrag.himl); + if (InternalDrag.himl != InternalDrag.himlNoCursor) + ImageList_Destroy (InternalDrag.himl); InternalDrag.himl = himlTemp; if (visible) {
1
0
0
0
Andrew Talbot : oledb32: Avoid signed-unsigned integer comparisons.
by Alexandre Julliard
25 Feb '13
25 Feb '13
Module: wine Branch: master Commit: 79bda3d44d5b5a5e01f4bf5b5a6b78b92a49a30c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=79bda3d44d5b5a5e01f4bf5b5…
Author: Andrew Talbot <andrew.talbot(a)talbotville.com> Date: Sat Feb 23 22:48:47 2013 +0000 oledb32: Avoid signed-unsigned integer comparisons. --- dlls/oledb32/datainit.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/oledb32/datainit.c b/dlls/oledb32/datainit.c index d979846..62e2e50 100644 --- a/dlls/oledb32/datainit.c +++ b/dlls/oledb32/datainit.c @@ -275,11 +275,11 @@ static ULONG WINAPI datainit_Release(IDataInitialize *iface) static void free_dbpropset(ULONG count, DBPROPSET *propset) { - int i; + ULONG i; for (i = 0; i < count; i++) { - int p; + ULONG p; for (p = 0; p < propset[i].cProperties; p++) VariantClear(&propset[i].rgProperties[p].vValue); @@ -566,7 +566,7 @@ static void write_propvalue_str(WCHAR *str, DBPROP *prop) static WCHAR *get_propinfo_descr(DBPROP *prop, DBPROPINFOSET *propinfoset) { - int i; + ULONG i; for (i = 0; i < propinfoset->cPropertyInfos; i++) if (propinfoset->rgPropertyInfos[i].dwPropertyID == prop->dwPropertyID) @@ -577,11 +577,11 @@ static WCHAR *get_propinfo_descr(DBPROP *prop, DBPROPINFOSET *propinfoset) static void free_dbpropinfoset(ULONG count, DBPROPINFOSET *propinfoset) { - int i; + ULONG i; for (i = 0; i < count; i++) { - int p; + ULONG p; for (p = 0; p < propinfoset[i].cPropertyInfos; p++) VariantClear(&propinfoset[i].rgPropertyInfos[p].vValues); @@ -606,7 +606,7 @@ static HRESULT WINAPI datainit_GetInitializationString(IDataInitialize *iface, I IPersist *persist; HRESULT hr; CLSID clsid; - int i, len; + ULONG i, len; TRACE("(%p)->(%p %d %p)\n", This, datasource, include_pass, init_string);
1
0
0
0
Andrew Talbot : oledlg: Avoid signed-unsigned integer comparisons.
by Alexandre Julliard
25 Feb '13
25 Feb '13
Module: wine Branch: master Commit: 10e9e1531a3e62c4b6c7574643eb1cbd009ae451 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=10e9e1531a3e62c4b6c757464…
Author: Andrew Talbot <andrew.talbot(a)talbotville.com> Date: Sat Feb 23 22:49:07 2013 +0000 oledlg: Avoid signed-unsigned integer comparisons. --- dlls/oledlg/pastespl.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/dlls/oledlg/pastespl.c b/dlls/oledlg/pastespl.c index 1dba9583..f136438 100644 --- a/dlls/oledlg/pastespl.c +++ b/dlls/oledlg/pastespl.c @@ -85,7 +85,9 @@ static void dump_ps_flags(DWORD flags) static void dump_pastespecial(const OLEUIPASTESPECIALW *ps) { - UINT i; + INT i; + UINT j; + dump_ps_flags(ps->dwFlags); TRACE("hwnd %p caption %s hook %p custdata %lx\n", ps->hWndOwner, debugstr_w(ps->lpszCaption), ps->lpfnHook, ps->lCustData); @@ -110,8 +112,8 @@ static void dump_pastespecial(const OLEUIPASTESPECIALW *ps) } for(i = 0; i < ps->cLinkTypes; i++) TRACE("arrLinkTypes[%d] %08x\n", i, ps->arrLinkTypes[i]); - for(i = 0; i < ps->cClsidExclude; i++) - TRACE("lpClsidExclude[%d] %s\n", i, debugstr_guid(&ps->lpClsidExclude[i])); + for(j = 0; j < ps->cClsidExclude; j++) + TRACE("lpClsidExclude[%u] %s\n", j, debugstr_guid(&ps->lpClsidExclude[j])); }
1
0
0
0
Andrew Talbot : quartz: Avoid signed-unsigned integer comparisons.
by Alexandre Julliard
25 Feb '13
25 Feb '13
Module: wine Branch: master Commit: d50189c162dc1ae6c03a1e158c12ec4ab2a8730f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d50189c162dc1ae6c03a1e158…
Author: Andrew Talbot <andrew.talbot(a)talbotville.com> Date: Sat Feb 23 22:49:16 2013 +0000 quartz: Avoid signed-unsigned integer comparisons. --- dlls/quartz/vmr9.c | 12 ++++-------- 1 files changed, 4 insertions(+), 8 deletions(-) diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c index 847b460..5a837dd 100644 --- a/dlls/quartz/vmr9.c +++ b/dlls/quartz/vmr9.c @@ -1495,7 +1495,7 @@ static HRESULT WINAPI VMR9SurfaceAllocatorNotify_ChangeD3DDevice(IVMRSurfaceAllo static HRESULT WINAPI VMR9SurfaceAllocatorNotify_AllocateSurfaceHelper(IVMRSurfaceAllocatorNotify9 *iface, VMR9AllocationInfo *allocinfo, DWORD *numbuffers, IDirect3DSurface9 **surface) { VMR9Impl *This = impl_from_IVMRSurfaceAllocatorNotify9(iface); - INT i; + DWORD i; HRESULT hr = S_OK; FIXME("(%p/%p)->(%p, %p => %u, %p) semi-stub\n", iface, This, allocinfo, numbuffers, (numbuffers ? *numbuffers : 0), surface); @@ -1554,11 +1554,7 @@ static HRESULT WINAPI VMR9SurfaceAllocatorNotify_AllocateSurfaceHelper(IVMRSurfa } else { - ERR("Allocation failed\n"); - for (--i; i >= 0; --i) - { - IDirect3DSurface9_Release(surface[i]); - } + for ( ; i > 0; --i) IDirect3DSurface9_Release(surface[i - 1]); *numbuffers = 0; } return hr; @@ -1691,7 +1687,7 @@ static ULONG WINAPI VMR9_ImagePresenter_Release(IVMRImagePresenter9 *iface) if (!refCount) { - int i; + DWORD i; TRACE("Destroying\n"); CloseHandle(This->ack); IDirect3D9_Release(This->d3d9_ptr); @@ -2091,7 +2087,7 @@ static HRESULT VMR9_SurfaceAllocator_UpdateDeviceReset(VMR9DefaultAllocatorPrese { struct VERTEX t_vert[4]; UINT width, height; - INT i; + unsigned int i; void *bits = NULL; D3DPRESENT_PARAMETERS d3dpp; HRESULT hr;
1
0
0
0
← Newer
1
...
6
7
8
9
10
11
12
...
46
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
Results per page:
10
25
50
100
200