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
December 2011
----- 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
810 discussions
Start a n
N
ew thread
Henri Verbeet : ddraw: DDSCL_CREATEDEVICEWINDOW requires DDSCL_EXCLUSIVE.
by Alexandre Julliard
23 Dec '11
23 Dec '11
Module: wine Branch: master Commit: 2ec0c7bfdcbdee39e43073e38ab2e2263b5f6e41 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2ec0c7bfdcbdee39e43073e38…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Thu Dec 22 21:51:18 2011 +0100 ddraw: DDSCL_CREATEDEVICEWINDOW requires DDSCL_EXCLUSIVE. --- dlls/ddraw/ddraw.c | 7 +++++++ dlls/ddraw/tests/ddraw1.c | 4 ++-- dlls/ddraw/tests/ddraw2.c | 4 ++-- dlls/ddraw/tests/ddraw4.c | 4 ++-- dlls/ddraw/tests/ddraw7.c | 4 ++-- 5 files changed, 15 insertions(+), 8 deletions(-) diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c index 86df701..52015c1 100644 --- a/dlls/ddraw/ddraw.c +++ b/dlls/ddraw/ddraw.c @@ -787,6 +787,13 @@ static HRESULT WINAPI ddraw7_SetCooperativeLevel(IDirectDraw7 *iface, HWND hwnd, return DDERR_INVALIDPARAMS; } + if ((cooplevel & DDSCL_CREATEDEVICEWINDOW) && !(cooplevel & DDSCL_EXCLUSIVE)) + { + WARN("DDSCL_CREATEDEVICEWINDOW requires DDSCL_EXCLUSIVE.\n"); + wined3d_mutex_unlock(); + return DDERR_INVALIDPARAMS; + } + /* Handle those levels first which set various hwnds */ if(cooplevel & DDSCL_SETFOCUSWINDOW) { diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c index f7e4abf..9a8d7c9 100644 --- a/dlls/ddraw/tests/ddraw1.c +++ b/dlls/ddraw/tests/ddraw1.c @@ -53,11 +53,11 @@ static void test_coop_level_create_device_window(void) device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n"); hr = IDirectDraw_SetCooperativeLevel(ddraw, NULL, DDSCL_CREATEDEVICEWINDOW | DDSCL_NORMAL); - todo_wine ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n"); hr = IDirectDraw_SetCooperativeLevel(ddraw, NULL, DDSCL_CREATEDEVICEWINDOW | DDSCL_NORMAL | DDSCL_FULLSCREEN); - todo_wine ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n"); hr = IDirectDraw_SetCooperativeLevel(ddraw, NULL, DDSCL_CREATEDEVICEWINDOW | DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c index 8bbdd4d..261dfbe 100644 --- a/dlls/ddraw/tests/ddraw2.c +++ b/dlls/ddraw/tests/ddraw2.c @@ -60,11 +60,11 @@ static void test_coop_level_create_device_window(void) device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n"); hr = IDirectDraw2_SetCooperativeLevel(ddraw, NULL, DDSCL_CREATEDEVICEWINDOW | DDSCL_NORMAL); - todo_wine ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n"); hr = IDirectDraw2_SetCooperativeLevel(ddraw, NULL, DDSCL_CREATEDEVICEWINDOW | DDSCL_NORMAL | DDSCL_FULLSCREEN); - todo_wine ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n"); hr = IDirectDraw2_SetCooperativeLevel(ddraw, NULL, DDSCL_CREATEDEVICEWINDOW | DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c index 6b764cc..ee75e19 100644 --- a/dlls/ddraw/tests/ddraw4.c +++ b/dlls/ddraw/tests/ddraw4.c @@ -356,11 +356,11 @@ static void test_coop_level_create_device_window(void) device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n"); hr = IDirectDraw4_SetCooperativeLevel(ddraw, NULL, DDSCL_CREATEDEVICEWINDOW | DDSCL_NORMAL); - todo_wine ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n"); hr = IDirectDraw4_SetCooperativeLevel(ddraw, NULL, DDSCL_CREATEDEVICEWINDOW | DDSCL_NORMAL | DDSCL_FULLSCREEN); - todo_wine ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n"); hr = IDirectDraw4_SetCooperativeLevel(ddraw, NULL, DDSCL_CREATEDEVICEWINDOW | DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c index b559351..78a4e95 100644 --- a/dlls/ddraw/tests/ddraw7.c +++ b/dlls/ddraw/tests/ddraw7.c @@ -349,11 +349,11 @@ static void test_coop_level_create_device_window(void) device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n"); hr = IDirectDraw7_SetCooperativeLevel(ddraw, NULL, DDSCL_CREATEDEVICEWINDOW | DDSCL_NORMAL); - todo_wine ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n"); hr = IDirectDraw7_SetCooperativeLevel(ddraw, NULL, DDSCL_CREATEDEVICEWINDOW | DDSCL_NORMAL | DDSCL_FULLSCREEN); - todo_wine ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n"); hr = IDirectDraw7_SetCooperativeLevel(ddraw, NULL, DDSCL_CREATEDEVICEWINDOW | DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN);
1
0
0
0
Alexandre Julliard : gdi32/tests: Add tests for PALETTEINDEX colors.
by Alexandre Julliard
23 Dec '11
23 Dec '11
Module: wine Branch: master Commit: 4333b7d370142b46d7264c2760d100e0a1c14612 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4333b7d370142b46d7264c276…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Dec 22 14:08:43 2011 +0100 gdi32/tests: Add tests for PALETTEINDEX colors. --- dlls/gdi32/tests/dib.c | 86 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 86 insertions(+), 0 deletions(-) diff --git a/dlls/gdi32/tests/dib.c b/dlls/gdi32/tests/dib.c index 5fd3f99..28ba0fc 100644 --- a/dlls/gdi32/tests/dib.c +++ b/dlls/gdi32/tests/dib.c @@ -139,6 +139,8 @@ static const char *sha1_graphics_a8r8g8b8[] = "657514a4ca1f2b6ca7a125ad58dfed82099a37d1", "5e0549fdcf0fc7c50054dccc51d37fc734ab8134", "eca1998a4d79fb81b2a4103f79e3b846a864eaaf", + "5dca709c60e0cd50fa85274a2836aec9eb6168e3", + "dccaef62738ff90da4554a85d8cb846d6436799e", NULL }; @@ -204,6 +206,8 @@ static const char *sha1_graphics_a8r8g8b8_bitfields[] = "657514a4ca1f2b6ca7a125ad58dfed82099a37d1", "5e0549fdcf0fc7c50054dccc51d37fc734ab8134", "eca1998a4d79fb81b2a4103f79e3b846a864eaaf", + "5dca709c60e0cd50fa85274a2836aec9eb6168e3", + "dccaef62738ff90da4554a85d8cb846d6436799e", NULL }; @@ -269,6 +273,8 @@ static const char *sha1_graphics_a8b8g8r8[] = "9988ceca44dafbee247aece1f027c06c27c01652", "d80d45a97bc877b50ba2c3f720d5197f2f1c5fc5", "b76e0724496e471b01ef8b34f8beba69f5bde261", + "f19f5d8e2c96328f06f3985d02ff474fa37b1ea8", + "175a7bcb73c74eceecc000657a0100bccf158ff4", NULL }; @@ -334,6 +340,8 @@ static const char *sha1_graphics_r10g10b10[] = "ce0fc29bb0281d6c955d64e239254ef9e6dbc06d", "5ab49e7b61eddd3bab4182f362a38e1ab6a5a3b7", "555b6f04ba8dec9e2a60693dcaac594227052727", + "64cf929548bc5324fb14b053077bf5bc4be3e15c", + "ad91dde8566dceaadc3523cdc8149cd7415a1b70", NULL }; @@ -399,6 +407,8 @@ static const char *sha1_graphics_r6g6b6[] = "d67b897cad72d31e75359094007b1346fd8806ea", "442bcf4d94a649c9406c3b0bf2f00cb7c6a4d1d4", "3d0853f4f7580d7cd5148c21c34d878ecf39a5f3", + "5da35bad12e3e9b26a0444d30820099481281e45", + "94f004e98ae8035af948611770a4a2dd6643f510", NULL }; @@ -464,6 +474,8 @@ static const char *sha1_graphics_24[] = "cf311a96d41bd98fdbdfb5dfaac4ba1ba9b7d6da", "bf5ec23456efe00e1e0931c17de9040ab2092858", "0bbdf0a0489428f96e3c1d3e5305f9a893820852", + "cc5ed4c9e925f0a457a7437fbb8054528cdd9469", + "c95afd0a020e68a76982fe8663b5d64113987233", NULL }; @@ -533,6 +545,8 @@ static const char *sha1_graphics_r5g5b5[] = "1c1499051860b7caa25173b328ca9c862f01dd1a", "a655512753bc90e6d4eb3848f69e96db1ad348e5", "2230f36f12d4becb242e2962fa1b3694db2496ca", + "a848b1b0293b05b3f9358a3ffcb21a2e5fdecf05", + "1a0fd0df17fa4c455a4a91cad30b5242f77fd233", NULL }; @@ -597,6 +611,8 @@ static const char *sha1_graphics_r4g4b4[] = "5505d2ed20dc61ffe48832ecf5329162a5ceb734", "9f72be4467219a345b1164205d1fbfda2d64271e", "13d1634e03bc49cfe14a32278d9b1f5ddbb9be10", + "91d50b5a604d6c38aa0d08b9af995490f8ec246b", + "8585783d0373e9696b508776b6e6b18a80b09888", NULL }; @@ -667,6 +683,8 @@ static const char *sha1_graphics_8_color[] = "2c07272462c68cf5944b03e2aa049475b99143c5", "07ca369fb875d37b9cf855045f528af1827edec4", "5e9e3e71b06c5efe20f93b3838e745b40b878471", + "26bc25a011e2b60961ee9d6c6141d928ae24389b", + "8771d5ff7b93b9dd9d077e672b342235dfb28472", NULL }; @@ -742,6 +760,8 @@ static const char *sha1_graphics_8_grayscale[] = "1918a33f59d3500204ffc573318a39e9ff754221", "5449d1aef0d2d6af9ac3fd7adb32c23ddc9be1e2", "55d302ece31a9b7fc4be4a07a53767ba210273e7", + "a3eac75d30f681b3898ee469d368960529634d7d", + "cd5caeabdb71241766d24f038cfc5f1e91e11256", NULL }; @@ -810,6 +830,8 @@ static const char *sha1_graphics_8[] = "f81c70b6ee2d4690f9f7c797c66582b176f8dcef", "d3f359cac7318ce09e0531d51c8c2b316cf3a23b", "293c41a7ed923a4617560481ae8815cebf83701a", + "fbaa8848a1d3896469c37fd43ab44233f5b875a3", + "0000000000000000000000000000000000000000", NULL }; @@ -874,6 +896,8 @@ static const char *sha1_graphics_4[] = "297f6ad15200bffbf15198324ee8f27a61a6f2d4", "70cfa427a1a0d6f2232b1fd544905d48af69cb98", "287ea7db721e641439888cb9f4bac3a5f16124eb", + "7ae780dcc7cf04dda50648bfc07cc6a7a2f2189e", + "0000000000000000000000000000000000000000", NULL }; @@ -938,6 +962,8 @@ static const char *sha1_graphics_4_grayscale[] = "58f400c9bb78e49a879276fb049edfc9c981740a", "cb3794f676d6e9502f27172ac7d79a12ca2ba32c", "aa89612798fbc4e11a73b6233c0ac4832e6af2f9", + "2d5123e757cf00e423a89160d7dc4997c3688829", + "0000000000000000000000000000000000000000", NULL }; @@ -1020,6 +1046,9 @@ static const char *sha1_graphics_1[] = "55c26d22f11d80b73383fa57d0fac552d705b092", "14443b33a9879bf829ed3b06e1aef0d7dcf662cc", "53ab1fcccd09fa5cbff77497f36a70a3b3cb8b81", + "8d34215487088b5d4ef63062270ce25c2862643d", + "3dc3075b0c87fdcaabbbae8928303fb2358c15c2", + "bbae6f0659e095a42b420082079663f937065813", NULL }; @@ -1259,6 +1288,9 @@ static inline void solid_patblt( HDC hdc, int x, int y, int width, int height, C static void draw_graphics(HDC hdc, BITMAPINFO *bmi, BYTE *bits, const char ***sha1) { + char pal_buffer[sizeof(LOGPALETTE) + 255 * sizeof(PALETTEENTRY)]; + LOGPALETTE *pal = (LOGPALETTE *)pal_buffer; + PALETTEENTRY *entries = pal->palPalEntry; DWORD dib_size = get_dib_size(bmi); HPEN solid_pen, dashed_pen, wide_pen, orig_pen; LOGBRUSH log_brush; @@ -1277,6 +1309,7 @@ static void draw_graphics(HDC hdc, BITMAPINFO *bmi, BYTE *bits, const char ***sh BOOL dib_is_8bpp_gray = (bmi->bmiHeader.biBitCount == 8 && bmi->bmiColors[1].rgbRed == 1); BLENDFUNCTION blend; COLORREF old_text, old_bkgnd; + HPALETTE hpal; blend.BlendOp = AC_SRC_OVER; blend.BlendFlags = 0; @@ -2335,6 +2368,59 @@ static void draw_graphics(HDC hdc, BITMAPINFO *bmi, BYTE *bits, const char ***sh compare_hash(bmi, bits, sha1, "wide pen - square caps, bevelled" ); memset(bits, 0xcc, dib_size); + /* PALETTEINDEX */ + + solid_brush = CreateSolidBrush( PALETTEINDEX(3) ); + solid_pen = CreatePen( PS_DASH, 1, PALETTEINDEX(5) ); + SetTextColor( hdc, PALETTEINDEX(38) ); + SetBkColor( hdc, PALETTEINDEX(9) ); + SelectObject( hdc, solid_brush ); + SelectObject( hdc, solid_pen ); + + pal->palVersion = 0x300; + pal->palNumEntries = 40; + for (i = 0; i < 80; i++) + { + entries[i].peRed = i * 3; + entries[i].peGreen = i * 7; + entries[i].peBlue = 128 - i; + entries[i].peFlags = 0; + } + hpal = CreatePalette( pal ); + SelectPalette( hdc, hpal, FALSE ); + + solid_patblt( hdc, 20, 10, 10, 10, PALETTEINDEX(15) ); + Rectangle( hdc, 0, 0, 10, 10 ); + SetPaletteEntries( hpal, 0, 40, entries + 40 ); + Rectangle( hdc, 10, 0, 10, 10 ); + SelectObject( hdc, orig_brush ); + DeleteObject( solid_brush ); + + solid_brush = CreateHatchBrush( HS_CROSS, PALETTEINDEX(7) ); + DeleteObject( SelectObject( hdc, solid_brush )); + PatBlt( hdc, 20, 0, 10, 10, PATCOPY ); + SetPaletteEntries( hpal, 0, 40, entries ); + PatBlt( hdc, 30, 0, 10, 10, PATCOPY ); + SelectObject( hdc, orig_brush ); + DeleteObject( solid_brush ); + + bmp = CreateBitmap( 16, 16, 1, 1, ddb_brush_bits ); + dib_brush = CreatePatternBrush( bmp ); + SelectObject( hdc, dib_brush ); + PatBlt( hdc, 40, 0, 10, 10, PATCOPY ); + SetPaletteEntries( hpal, 0, 40, entries + 40 ); + PatBlt( hdc, 50, 0, 10, 10, PATCOPY ); + DeleteObject( bmp ); + SelectObject( hdc, orig_brush ); + DeleteObject( dib_brush ); + + SelectPalette( hdc, GetStockObject(DEFAULT_PALETTE), FALSE ); + DeleteObject( hpal ); + + /* NT4 broken for all cases, W2K for 1 bpp only */ + compare_hash_broken_todo(bmi, bits, sha1, "PALETTEINDEX", 1 + dib_is_1bpp, dib_is_1bpp ); + memset(bits, 0xcc, dib_size); + SelectObject(hdc, orig_brush); SelectObject(hdc, orig_pen); DeleteObject(hrgn);
1
0
0
0
Alexandre Julliard : gdi32: Always use proper RGB colors for monochrome DDB pattern brushes.
by Alexandre Julliard
23 Dec '11
23 Dec '11
Module: wine Branch: master Commit: 73b9c8638486428de685a75fcd495748e4f88603 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=73b9c8638486428de685a75fc…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Dec 22 21:18:30 2011 +0100 gdi32: Always use proper RGB colors for monochrome DDB pattern brushes. --- dlls/gdi32/dibdrv/objects.c | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/dlls/gdi32/dibdrv/objects.c b/dlls/gdi32/dibdrv/objects.c index 85fbbbc..96596df 100644 --- a/dlls/gdi32/dibdrv/objects.c +++ b/dlls/gdi32/dibdrv/objects.c @@ -1589,16 +1589,24 @@ static BOOL select_pattern_brush( dibdrv_physdev *pdev, BOOL *needs_reselect ) if (pattern.bit_count == 1 && !pattern.color_table) { /* monochrome DDB pattern uses DC colors */ - COLORREF color = GetTextColor( pdev->dev.hdc ); + DWORD pixel; + BOOL got_pixel; + COLORREF color; + + color = make_rgb_colorref( pdev->dev.hdc, &pdev->dib, GetTextColor( pdev->dev.hdc ), + &got_pixel, &pixel ); color_table[0].rgbRed = GetRValue( color ); color_table[0].rgbGreen = GetGValue( color ); color_table[0].rgbBlue = GetBValue( color ); color_table[0].rgbReserved = 0; - color = GetBkColor( pdev->dev.hdc ); + + color = make_rgb_colorref( pdev->dev.hdc, &pdev->dib, GetBkColor( pdev->dev.hdc ), + &got_pixel, &pixel ); color_table[1].rgbRed = GetRValue( color ); color_table[1].rgbGreen = GetGValue( color ); color_table[1].rgbBlue = GetBValue( color ); color_table[1].rgbReserved = 0; + pattern.color_table = color_table; pattern.color_table_size = 2; *needs_reselect = TRUE;
1
0
0
0
Alexandre Julliard : gdi32: Add a common helper for computing pen and brush masks.
by Alexandre Julliard
23 Dec '11
23 Dec '11
Module: wine Branch: master Commit: 8f929ae04db6ad8546a0b31fc1e700d29eb1d2ce URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8f929ae04db6ad8546a0b31fc…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Dec 22 20:09:23 2011 +0100 gdi32: Add a common helper for computing pen and brush masks. --- dlls/gdi32/dibdrv/dibdrv.h | 1 - dlls/gdi32/dibdrv/objects.c | 79 +++++++++++++----------------------------- 2 files changed, 25 insertions(+), 55 deletions(-) diff --git a/dlls/gdi32/dibdrv/dibdrv.h b/dlls/gdi32/dibdrv/dibdrv.h index bbb90f4..e8acfa0 100644 --- a/dlls/gdi32/dibdrv/dibdrv.h +++ b/dlls/gdi32/dibdrv/dibdrv.h @@ -213,7 +213,6 @@ typedef struct } bres_params; extern void get_rop_codes(INT rop, struct rop_codes *codes) DECLSPEC_HIDDEN; -extern void calc_and_xor_masks(INT rop, DWORD color, DWORD *and, DWORD *xor) DECLSPEC_HIDDEN; extern void update_brush_rop( dibdrv_physdev *pdev, INT rop ) DECLSPEC_HIDDEN; extern void reset_dash_origin(dibdrv_physdev *pdev) DECLSPEC_HIDDEN; extern void init_dib_info_from_bitmapinfo(dib_info *dib, const BITMAPINFO *info, void *bits, enum dib_info_flags flags) DECLSPEC_HIDDEN; diff --git a/dlls/gdi32/dibdrv/objects.c b/dlls/gdi32/dibdrv/objects.c index 6d74b75..85fbbbc 100644 --- a/dlls/gdi32/dibdrv/objects.c +++ b/dlls/gdi32/dibdrv/objects.c @@ -94,7 +94,7 @@ void get_rop_codes(INT rop, struct rop_codes *codes) codes->x2 = rop2_xor_array[rop-1][1]; } -void calc_and_xor_masks(INT rop, DWORD color, DWORD *and, DWORD *xor) +static inline void calc_and_xor_masks(INT rop, DWORD color, DWORD *and, DWORD *xor) { struct rop_codes codes; get_rop_codes( rop, &codes ); @@ -103,6 +103,11 @@ void calc_and_xor_masks(INT rop, DWORD color, DWORD *and, DWORD *xor) *xor = (color & codes.x1) ^ codes.x2; } +static inline void calc_rop_masks(INT rop, DWORD color, rop_mask *masks) +{ + calc_and_xor_masks( rop, color, &masks->and, &masks->xor ); +} + static inline RGBQUAD rgbquad_from_colorref(COLORREF c) { RGBQUAD ret; @@ -186,58 +191,30 @@ DWORD get_pixel_color( dibdrv_physdev *pdev, COLORREF color, BOOL mono_fixup ) } /*************************************************************************** - * get_pen_bkgnd_masks + * get_color_masks * - * Returns the pre-calculated bkgnd color masks unless the dib is 1 bpp. - * In this case since there are several fg sources (pen, brush, text) - * this makes pdev->bkgnd_color unusable. So here we take the inverse + * Returns the color masks unless the dib is 1 bpp. In this case since + * there are several fg sources (pen, brush, text) we take as bg the inverse * of the relevant fg color (which is always set up correctly). */ -static inline void get_pen_bkgnd_masks(dibdrv_physdev *pdev, DWORD *and, DWORD *xor) +static inline void get_color_masks( dibdrv_physdev *pdev, UINT rop, COLORREF colorref, + rop_mask *fg_mask, rop_mask *bg_mask ) { - DWORD color; + DWORD color = get_pixel_color( pdev, colorref, TRUE ); + + calc_rop_masks( rop, color, fg_mask ); if (GetBkMode(pdev->dev.hdc) == TRANSPARENT) { - *and = ~0u; - *xor = 0; + bg_mask->and = ~0u; + bg_mask->xor = 0; return; } - if (pdev->dib.bit_count != 1) - { - color = get_pixel_color( pdev, GetBkColor(pdev->dev.hdc), FALSE ); - } - else - { - color = get_pixel_color( pdev, pdev->pen_colorref, TRUE ); - if(pdev->pen_colorref != GetBkColor(pdev->dev.hdc)) color = !color; - } - calc_and_xor_masks( GetROP2(pdev->dev.hdc), color, and, xor ); -} - -static inline void get_brush_bkgnd_masks(dibdrv_physdev *pdev, DWORD *and, DWORD *xor) -{ - DWORD color; + if (pdev->dib.bit_count != 1) color = get_pixel_color( pdev, GetBkColor(pdev->dev.hdc), FALSE ); + else if (colorref != GetBkColor(pdev->dev.hdc)) color = !color; - if(GetBkMode(pdev->dev.hdc) == TRANSPARENT) - { - *and = ~0u; - *xor = 0; - } - else - { - if(pdev->dib.bit_count == 1) - { - if(pdev->brush_colorref == GetBkColor(pdev->dev.hdc)) - color = get_pixel_color( pdev, pdev->brush_colorref, TRUE ); - else - color = ~get_pixel_color( pdev, pdev->brush_colorref, TRUE ); - } - else color = get_pixel_color( pdev, GetBkColor( pdev->dev.hdc ), FALSE ); - - calc_and_xor_masks( pdev->brush_rop, color, and, xor ); - } + calc_rop_masks( rop, color, bg_mask ); } static inline void order_end_points(int *s, int *e) @@ -982,12 +959,9 @@ static BOOL dashed_pen_line(dibdrv_physdev *pdev, POINT *start, POINT *end) static BOOL dashed_pen_lines(dibdrv_physdev *pdev, int num, POINT *pts, BOOL close) { int i; - DWORD color; - color = get_pixel_color( pdev, pdev->pen_colorref, TRUE ); - get_pen_bkgnd_masks( pdev, &pdev->dash_masks[0].and, &pdev->dash_masks[0].xor ); - calc_and_xor_masks( GetROP2(pdev->dev.hdc), color, - &pdev->dash_masks[1].and, &pdev->dash_masks[1].xor ); + get_color_masks( pdev, GetROP2(pdev->dev.hdc), pdev->pen_colorref, + &pdev->dash_masks[1], &pdev->dash_masks[0] ); assert( num >= 2 ); for (i = 0; i < num - 1; i++) @@ -1287,7 +1261,7 @@ static BOOL wide_pen_lines(dibdrv_physdev *pdev, int num, POINT *pts, BOOL close HRGN region; DWORD pen_color = get_pixel_color( pdev, pdev->pen_colorref, TRUE ); - calc_and_xor_masks( GetROP2(pdev->dev.hdc), pen_color, &color.and, &color.xor ); + calc_rop_masks( GetROP2(pdev->dev.hdc), pen_color, &color ); region = get_wide_lines_region( pdev, num, pts, close ); @@ -1455,7 +1429,7 @@ static BOOL solid_brush(dibdrv_physdev *pdev, dib_info *dib, int num, const RECT rop_mask brush_color; DWORD color = get_pixel_color( pdev, pdev->brush_colorref, TRUE ); - calc_and_xor_masks( pdev->brush_rop, color, &brush_color.and, &brush_color.xor ); + calc_rop_masks( pdev->brush_rop, color, &brush_color ); solid_rects( dib, num, rects, &brush_color, region ); return TRUE; } @@ -1519,7 +1493,7 @@ static BOOL create_hatch_brush_bits(dibdrv_physdev *pdev) dib_info hatch; rop_mask fg_mask, bg_mask; rop_mask_bits mask_bits; - DWORD size, color; + DWORD size; BOOL ret; assert(pdev->brush_and_bits == NULL); @@ -1553,10 +1527,7 @@ static BOOL create_hatch_brush_bits(dibdrv_physdev *pdev) hatch.bits.free = hatch.bits.param = NULL; hatch.bits.is_copy = FALSE; - color = get_pixel_color( pdev, pdev->brush_colorref, TRUE ); - calc_and_xor_masks( pdev->brush_rop, color, &fg_mask.and, &fg_mask.xor ); - - get_brush_bkgnd_masks( pdev, &bg_mask.and, &bg_mask.xor ); + get_color_masks( pdev, pdev->brush_rop, pdev->brush_colorref, &fg_mask, &bg_mask ); ret = pdev->brush_dib.funcs->create_rop_masks( &pdev->brush_dib, &hatch, &fg_mask, &bg_mask, &mask_bits ); if(!ret) free_pattern_brush_bits( pdev );
1
0
0
0
Alexandre Julliard : gdi32: Recompute the foreground masks on every use to support PALETTEINDEX colors .
by Alexandre Julliard
23 Dec '11
23 Dec '11
Module: wine Branch: master Commit: 56532d0cf7108333ceff227d6d8acabc9891e8fe URL:
http://source.winehq.org/git/wine.git/?a=commit;h=56532d0cf7108333ceff227d6…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Dec 22 16:32:37 2011 +0100 gdi32: Recompute the foreground masks on every use to support PALETTEINDEX colors. --- dlls/gdi32/dibdrv/dc.c | 42 ++++-------------------------------------- dlls/gdi32/dibdrv/dibdrv.h | 5 ----- dlls/gdi32/dibdrv/graphics.c | 25 ++++++++++++------------- 3 files changed, 16 insertions(+), 56 deletions(-) diff --git a/dlls/gdi32/dibdrv/dc.c b/dlls/gdi32/dibdrv/dc.c index f3cf1d5..cdcbd19 100644 --- a/dlls/gdi32/dibdrv/dc.c +++ b/dlls/gdi32/dibdrv/dc.c @@ -257,11 +257,6 @@ DWORD convert_bitmapinfo( const BITMAPINFO *src_info, void *src_bits, struct bit return ERROR_SUCCESS; } -static void update_fg_colors( dibdrv_physdev *pdev ) -{ - pdev->text_color = get_pixel_color( pdev, GetTextColor( pdev->dev.hdc ), TRUE ); -} - /*********************************************************************** * add_extra_clipping_region * @@ -365,19 +360,6 @@ static HBITMAP dibdrv_SelectBitmap( PHYSDEV dev, HBITMAP bitmap ) } /*********************************************************************** - * dibdrv_SetBkColor - */ -static COLORREF dibdrv_SetBkColor( PHYSDEV dev, COLORREF color ) -{ - PHYSDEV next = GET_NEXT_PHYSDEV( dev, pSetBkColor ); - dibdrv_physdev *pdev = get_dibdrv_pdev(dev); - - update_fg_colors( pdev ); /* Only needed in the 1 bpp case */ - - return next->funcs->pSetBkColor( next, color ); -} - -/*********************************************************************** * dibdrv_SetDeviceClipping */ static void dibdrv_SetDeviceClipping( PHYSDEV dev, HRGN rgn ) @@ -400,11 +382,8 @@ static UINT dibdrv_SetDIBColorTable( PHYSDEV dev, UINT pos, UINT count, const RG dibdrv_physdev *pdev = get_dibdrv_pdev(dev); TRACE("(%p, %d, %d, %p)\n", dev, pos, count, colors); - if (pdev->dib.color_table) - { - update_fg_colors( pdev ); - update_brush_rop( pdev, GetROP2( dev->hdc ) ); - } + if (pdev->dib.color_table) update_brush_rop( pdev, GetROP2( dev->hdc ) ); + return next->funcs->pSetDIBColorTable( next, pos, count, colors ); } @@ -421,19 +400,6 @@ static INT dibdrv_SetROP2( PHYSDEV dev, INT rop ) return next->funcs->pSetROP2( next, rop ); } -/*********************************************************************** - * dibdrv_SetTextColor - */ -static COLORREF dibdrv_SetTextColor( PHYSDEV dev, COLORREF color ) -{ - PHYSDEV next = GET_NEXT_PHYSDEV( dev, pSetTextColor ); - dibdrv_physdev *pdev = get_dibdrv_pdev(dev); - - pdev->text_color = get_pixel_color( pdev, color, TRUE ); - update_aa_ranges( pdev ); - - return next->funcs->pSetTextColor( next, color ); -} const struct gdi_dc_funcs dib_driver = { @@ -536,7 +502,7 @@ const struct gdi_dc_funcs dib_driver = NULL, /* pSelectPalette */ dibdrv_SelectPen, /* pSelectPen */ NULL, /* pSetArcDirection */ - dibdrv_SetBkColor, /* pSetBkColor */ + NULL, /* pSetBkColor */ NULL, /* pSetBkMode */ dibdrv_SetDCBrushColor, /* pSetDCBrushColor */ dibdrv_SetDCPenColor, /* pSetDCPenColor */ @@ -555,7 +521,7 @@ const struct gdi_dc_funcs dib_driver = NULL, /* pSetStretchBltMode */ NULL, /* pSetTextAlign */ NULL, /* pSetTextCharacterExtra */ - dibdrv_SetTextColor, /* pSetTextColor */ + NULL, /* pSetTextColor */ NULL, /* pSetTextJustification */ NULL, /* pSetViewportExt */ NULL, /* pSetViewportOrg */ diff --git a/dlls/gdi32/dibdrv/dibdrv.h b/dlls/gdi32/dibdrv/dibdrv.h index 5ff0889..bbb90f4 100644 --- a/dlls/gdi32/dibdrv/dibdrv.h +++ b/dlls/gdi32/dibdrv/dibdrv.h @@ -102,10 +102,6 @@ typedef struct dibdrv_physdev UINT brush_pattern_usage; HBITMAP brush_pattern_bitmap; BOOL (* brush_rects)(struct dibdrv_physdev *pdev, dib_info *dib, int num, const RECT *rects, HRGN clip); - - /* text */ - DWORD text_color; - struct intensity_range glyph_intensities[17]; } dibdrv_physdev; #define DEFER_PEN 2 @@ -234,7 +230,6 @@ extern HRGN add_extra_clipping_region( dibdrv_physdev *pdev, HRGN rgn ) DECLSPEC extern void restore_clipping_region( dibdrv_physdev *pdev, HRGN rgn ) DECLSPEC_HIDDEN; extern int clip_line(const POINT *start, const POINT *end, const RECT *clip, const bres_params *params, POINT *pt1, POINT *pt2) DECLSPEC_HIDDEN; -extern void update_aa_ranges( dibdrv_physdev *pdev ) DECLSPEC_HIDDEN; /* compute the x coordinate corresponding to y on the specified edge */ static inline int edge_coord( int y, int x1, int y1, int x2, int y2 ) diff --git a/dlls/gdi32/dibdrv/graphics.c b/dlls/gdi32/dibdrv/graphics.c index 33e7d6d..ad6c4ad 100644 --- a/dlls/gdi32/dibdrv/graphics.c +++ b/dlls/gdi32/dibdrv/graphics.c @@ -103,12 +103,6 @@ static inline void get_aa_ranges( COLORREF col, struct intensity_range intensiti } } -void update_aa_ranges( dibdrv_physdev *pdev ) -{ - COLORREF text = pdev->dib.funcs->pixel_to_colorref( &pdev->dib, pdev->text_color ); - get_aa_ranges( text, pdev->glyph_intensities ); -} - /********************************************************************** * get_text_bkgnd_masks * @@ -124,14 +118,15 @@ static inline void get_text_bkgnd_masks( dibdrv_physdev *pdev, rop_mask *mask ) mask->xor = get_pixel_color( pdev, bg, FALSE ); else { - mask->xor = ~pdev->text_color; - if (GetTextColor( pdev->dev.hdc ) == bg) - mask->xor = pdev->text_color; + COLORREF fg = GetTextColor( pdev->dev.hdc ); + mask->xor = get_pixel_color( pdev, fg, TRUE ); + if (fg != bg) mask->xor = ~mask->xor; } } static void draw_glyph( dibdrv_physdev *pdev, const POINT *origin, const GLYPHMETRICS *metrics, - const struct gdi_image_bits *image ) + const struct gdi_image_bits *image, DWORD text_color, + const struct intensity_range *ranges ) { const WINEREGION *clip = get_wine_region( pdev->clip ); int i; @@ -158,7 +153,7 @@ static void draw_glyph( dibdrv_physdev *pdev, const POINT *origin, const GLYPHME src_origin.y = clipped_rect.top - rect.top; pdev->dib.funcs->draw_glyph( &pdev->dib, &clipped_rect, &glyph_dib, &src_origin, - pdev->text_color, pdev->glyph_intensities ); + text_color, ranges ); } } @@ -339,8 +334,9 @@ BOOL dibdrv_ExtTextOut( PHYSDEV dev, INT x, INT y, UINT flags, dibdrv_physdev *pdev = get_dibdrv_pdev(dev); UINT aa_flags, i; POINT origin; - DWORD err; + DWORD text_color, err; HRGN saved_clip = NULL; + struct intensity_range ranges[17]; if (flags & ETO_OPAQUE) { @@ -358,6 +354,9 @@ BOOL dibdrv_ExtTextOut( PHYSDEV dev, INT x, INT y, UINT flags, DeleteObject( clip ); } + text_color = get_pixel_color( pdev, GetTextColor( pdev->dev.hdc ), TRUE ); + get_aa_ranges( pdev->dib.funcs->pixel_to_colorref( &pdev->dib, text_color ), ranges ); + aa_flags = get_font_aa_flags( dev->hdc ); origin.x = x; origin.y = y; @@ -369,7 +368,7 @@ BOOL dibdrv_ExtTextOut( PHYSDEV dev, INT x, INT y, UINT flags, err = get_glyph_bitmap( dev->hdc, (UINT)str[i], aa_flags, &metrics, &image ); if (err) continue; - if (image.ptr) draw_glyph( pdev, &origin, &metrics, &image ); + if (image.ptr) draw_glyph( pdev, &origin, &metrics, &image, text_color, ranges ); if (image.free) image.free( &image ); if (dx)
1
0
0
0
Alexandre Julliard : gdi32: Recompute the background masks on every use to support PALETTEINDEX colors .
by Alexandre Julliard
23 Dec '11
23 Dec '11
Module: wine Branch: master Commit: e166ec0bb0b40def2534f90751f7be8d437329b9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e166ec0bb0b40def2534f9075…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Dec 22 16:18:13 2011 +0100 gdi32: Recompute the background masks on every use to support PALETTEINDEX colors. --- dlls/gdi32/dibdrv/dc.c | 44 ++--------------------------------------- dlls/gdi32/dibdrv/dibdrv.h | 3 -- dlls/gdi32/dibdrv/graphics.c | 8 ++++-- dlls/gdi32/dibdrv/objects.c | 27 +++++++++++++++++-------- 4 files changed, 26 insertions(+), 56 deletions(-) diff --git a/dlls/gdi32/dibdrv/dc.c b/dlls/gdi32/dibdrv/dc.c index 24ec66a..f3cf1d5 100644 --- a/dlls/gdi32/dibdrv/dc.c +++ b/dlls/gdi32/dibdrv/dc.c @@ -262,13 +262,6 @@ static void update_fg_colors( dibdrv_physdev *pdev ) pdev->text_color = get_pixel_color( pdev, GetTextColor( pdev->dev.hdc ), TRUE ); } -static void update_masks( dibdrv_physdev *pdev, INT rop ) -{ - update_brush_rop( pdev, rop ); - if( GetBkMode( pdev->dev.hdc ) == OPAQUE ) - calc_and_xor_masks( rop, pdev->bkgnd_color, &pdev->bkgnd_and, &pdev->bkgnd_xor ); -} - /*********************************************************************** * add_extra_clipping_region * @@ -379,41 +372,12 @@ static COLORREF dibdrv_SetBkColor( PHYSDEV dev, COLORREF color ) PHYSDEV next = GET_NEXT_PHYSDEV( dev, pSetBkColor ); dibdrv_physdev *pdev = get_dibdrv_pdev(dev); - pdev->bkgnd_color = get_pixel_color( pdev, color, FALSE ); - - if( GetBkMode(dev->hdc) == OPAQUE ) - calc_and_xor_masks( GetROP2(dev->hdc), pdev->bkgnd_color, &pdev->bkgnd_and, &pdev->bkgnd_xor ); - else - { - pdev->bkgnd_and = ~0u; - pdev->bkgnd_xor = 0; - } - update_fg_colors( pdev ); /* Only needed in the 1 bpp case */ return next->funcs->pSetBkColor( next, color ); } /*********************************************************************** - * dibdrv_SetBkMode - */ -static INT dibdrv_SetBkMode( PHYSDEV dev, INT mode ) -{ - PHYSDEV next = GET_NEXT_PHYSDEV( dev, pSetBkMode ); - dibdrv_physdev *pdev = get_dibdrv_pdev(dev); - - if( mode == OPAQUE ) - calc_and_xor_masks( GetROP2(dev->hdc), pdev->bkgnd_color, &pdev->bkgnd_and, &pdev->bkgnd_xor ); - else - { - pdev->bkgnd_and = ~0u; - pdev->bkgnd_xor = 0; - } - - return next->funcs->pSetBkMode( next, mode ); -} - -/*********************************************************************** * dibdrv_SetDeviceClipping */ static void dibdrv_SetDeviceClipping( PHYSDEV dev, HRGN rgn ) @@ -438,10 +402,8 @@ static UINT dibdrv_SetDIBColorTable( PHYSDEV dev, UINT pos, UINT count, const RG if (pdev->dib.color_table) { - pdev->bkgnd_color = get_pixel_color( pdev, GetBkColor( dev->hdc ), FALSE ); update_fg_colors( pdev ); - - update_masks( pdev, GetROP2( dev->hdc ) ); + update_brush_rop( pdev, GetROP2( dev->hdc ) ); } return next->funcs->pSetDIBColorTable( next, pos, count, colors ); } @@ -454,7 +416,7 @@ static INT dibdrv_SetROP2( PHYSDEV dev, INT rop ) PHYSDEV next = GET_NEXT_PHYSDEV( dev, pSetROP2 ); dibdrv_physdev *pdev = get_dibdrv_pdev(dev); - update_masks( pdev, rop ); + update_brush_rop( pdev, rop ); return next->funcs->pSetROP2( next, rop ); } @@ -575,7 +537,7 @@ const struct gdi_dc_funcs dib_driver = dibdrv_SelectPen, /* pSelectPen */ NULL, /* pSetArcDirection */ dibdrv_SetBkColor, /* pSetBkColor */ - dibdrv_SetBkMode, /* pSetBkMode */ + NULL, /* pSetBkMode */ dibdrv_SetDCBrushColor, /* pSetDCBrushColor */ dibdrv_SetDCPenColor, /* pSetDCPenColor */ dibdrv_SetDIBColorTable, /* pSetDIBColorTable */ diff --git a/dlls/gdi32/dibdrv/dibdrv.h b/dlls/gdi32/dibdrv/dibdrv.h index 4b02d29..5ff0889 100644 --- a/dlls/gdi32/dibdrv/dibdrv.h +++ b/dlls/gdi32/dibdrv/dibdrv.h @@ -103,9 +103,6 @@ typedef struct dibdrv_physdev HBITMAP brush_pattern_bitmap; BOOL (* brush_rects)(struct dibdrv_physdev *pdev, dib_info *dib, int num, const RECT *rects, HRGN clip); - /* background */ - DWORD bkgnd_color, bkgnd_and, bkgnd_xor; - /* text */ DWORD text_color; struct intensity_range glyph_intensities[17]; diff --git a/dlls/gdi32/dibdrv/graphics.c b/dlls/gdi32/dibdrv/graphics.c index 69ce50b..33e7d6d 100644 --- a/dlls/gdi32/dibdrv/graphics.c +++ b/dlls/gdi32/dibdrv/graphics.c @@ -114,16 +114,18 @@ void update_aa_ranges( dibdrv_physdev *pdev ) * * See the comment above get_pen_bkgnd_masks */ -static inline void get_text_bkgnd_masks( const dibdrv_physdev *pdev, rop_mask *mask ) +static inline void get_text_bkgnd_masks( dibdrv_physdev *pdev, rop_mask *mask ) { + COLORREF bg = GetBkColor( pdev->dev.hdc ); + mask->and = 0; if (pdev->dib.bit_count != 1) - mask->xor = pdev->bkgnd_color; + mask->xor = get_pixel_color( pdev, bg, FALSE ); else { mask->xor = ~pdev->text_color; - if (GetTextColor( pdev->dev.hdc ) == GetBkColor( pdev->dev.hdc )) + if (GetTextColor( pdev->dev.hdc ) == bg) mask->xor = pdev->text_color; } } diff --git a/dlls/gdi32/dibdrv/objects.c b/dlls/gdi32/dibdrv/objects.c index 6e316694..6d74b75 100644 --- a/dlls/gdi32/dibdrv/objects.c +++ b/dlls/gdi32/dibdrv/objects.c @@ -180,8 +180,9 @@ DWORD get_pixel_color( dibdrv_physdev *pdev, COLORREF color, BOOL mono_fixup ) if(rgbquad_equal(&fg_quad, pdev->dib.color_table + 1)) return 1; - if(color == GetBkColor(pdev->dev.hdc)) return pdev->bkgnd_color; - else return pdev->bkgnd_color ? 0 : 1; + pixel = get_pixel_color( pdev, GetBkColor(pdev->dev.hdc), FALSE ); + if (color == GetBkColor(pdev->dev.hdc)) return pixel; + else return !pixel; } /*************************************************************************** @@ -194,17 +195,25 @@ DWORD get_pixel_color( dibdrv_physdev *pdev, COLORREF color, BOOL mono_fixup ) */ static inline void get_pen_bkgnd_masks(dibdrv_physdev *pdev, DWORD *and, DWORD *xor) { - if(pdev->dib.bit_count != 1 || GetBkMode(pdev->dev.hdc) == TRANSPARENT) + DWORD color; + + if (GetBkMode(pdev->dev.hdc) == TRANSPARENT) + { + *and = ~0u; + *xor = 0; + return; + } + + if (pdev->dib.bit_count != 1) { - *and = pdev->bkgnd_and; - *xor = pdev->bkgnd_xor; + color = get_pixel_color( pdev, GetBkColor(pdev->dev.hdc), FALSE ); } else { - DWORD color = get_pixel_color( pdev, pdev->pen_colorref, TRUE ); + color = get_pixel_color( pdev, pdev->pen_colorref, TRUE ); if(pdev->pen_colorref != GetBkColor(pdev->dev.hdc)) color = !color; - calc_and_xor_masks( GetROP2(pdev->dev.hdc), color, and, xor ); } + calc_and_xor_masks( GetROP2(pdev->dev.hdc), color, and, xor ); } static inline void get_brush_bkgnd_masks(dibdrv_physdev *pdev, DWORD *and, DWORD *xor) @@ -213,8 +222,8 @@ static inline void get_brush_bkgnd_masks(dibdrv_physdev *pdev, DWORD *and, DWORD if(GetBkMode(pdev->dev.hdc) == TRANSPARENT) { - *and = pdev->bkgnd_and; - *xor = pdev->bkgnd_xor; + *and = ~0u; + *xor = 0; } else {
1
0
0
0
Alexandre Julliard : gdi32: Recompute the pen masks on every use to support PALETTEINDEX colors.
by Alexandre Julliard
23 Dec '11
23 Dec '11
Module: wine Branch: master Commit: 9237638c0ef880f9257579ad2223c0fbdbaeed27 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9237638c0ef880f9257579ad2…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Dec 22 13:33:29 2011 +0100 gdi32: Recompute the pen masks on every use to support PALETTEINDEX colors. --- dlls/gdi32/dibdrv/dc.c | 2 - dlls/gdi32/dibdrv/dibdrv.h | 3 +- dlls/gdi32/dibdrv/objects.c | 79 ++++++++++++++++++------------------------- 3 files changed, 35 insertions(+), 49 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=9237638c0ef880f925757…
1
0
0
0
Alexandre Julliard : gdi32: Recompute the brush masks on every use to support PALETTEINDEX colors.
by Alexandre Julliard
23 Dec '11
23 Dec '11
Module: wine Branch: master Commit: 43373c29effd217f76b1da86063b4e665a41f749 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=43373c29effd217f76b1da860…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Dec 22 10:21:42 2011 +0100 gdi32: Recompute the brush masks on every use to support PALETTEINDEX colors. --- dlls/gdi32/dibdrv/dc.c | 1 - dlls/gdi32/dibdrv/dibdrv.h | 1 - dlls/gdi32/dibdrv/objects.c | 48 ++++++++++++++++++------------------------ 3 files changed, 21 insertions(+), 29 deletions(-) diff --git a/dlls/gdi32/dibdrv/dc.c b/dlls/gdi32/dibdrv/dc.c index 571a070..a33c488 100644 --- a/dlls/gdi32/dibdrv/dc.c +++ b/dlls/gdi32/dibdrv/dc.c @@ -260,7 +260,6 @@ DWORD convert_bitmapinfo( const BITMAPINFO *src_info, void *src_bits, struct bit static void update_fg_colors( dibdrv_physdev *pdev ) { pdev->pen_color = get_pixel_color( pdev, pdev->pen_colorref, TRUE ); - pdev->brush_color = get_pixel_color( pdev, pdev->brush_colorref, TRUE ); pdev->text_color = get_pixel_color( pdev, GetTextColor( pdev->dev.hdc ), TRUE ); } diff --git a/dlls/gdi32/dibdrv/dibdrv.h b/dlls/gdi32/dibdrv/dibdrv.h index 1bf9114..b0966af 100644 --- a/dlls/gdi32/dibdrv/dibdrv.h +++ b/dlls/gdi32/dibdrv/dibdrv.h @@ -94,7 +94,6 @@ typedef struct dibdrv_physdev UINT brush_hatch; INT brush_rop; /* PatBlt, for example, can override the DC's rop2 */ COLORREF brush_colorref; - DWORD brush_color, brush_and, brush_xor; dib_info brush_dib; void *brush_and_bits, *brush_xor_bits; const BITMAPINFO *brush_pattern_info; diff --git a/dlls/gdi32/dibdrv/objects.c b/dlls/gdi32/dibdrv/objects.c index 281642a..084d447 100644 --- a/dlls/gdi32/dibdrv/objects.c +++ b/dlls/gdi32/dibdrv/objects.c @@ -207,8 +207,10 @@ static inline void get_pen_bkgnd_masks(const dibdrv_physdev *pdev, DWORD *and, D } } -static inline void get_brush_bkgnd_masks(const dibdrv_physdev *pdev, DWORD *and, DWORD *xor) +static inline void get_brush_bkgnd_masks(dibdrv_physdev *pdev, DWORD *and, DWORD *xor) { + DWORD color; + if(GetBkMode(pdev->dev.hdc) == TRANSPARENT) { *and = pdev->bkgnd_and; @@ -216,15 +218,15 @@ static inline void get_brush_bkgnd_masks(const dibdrv_physdev *pdev, DWORD *and, } else { - DWORD color = pdev->bkgnd_color; - if(pdev->dib.bit_count == 1) { if(pdev->brush_colorref == GetBkColor(pdev->dev.hdc)) - color = pdev->brush_color; + color = get_pixel_color( pdev, pdev->brush_colorref, TRUE ); else - color = ~pdev->brush_color; + color = ~get_pixel_color( pdev, pdev->brush_colorref, TRUE ); } + else color = get_pixel_color( pdev, GetBkColor( pdev->dev.hdc ), FALSE ); + calc_and_xor_masks( pdev->brush_rop, color, and, xor ); } } @@ -1455,10 +1457,9 @@ void solid_rects( dib_info *dib, int num, const RECT *rects, const rop_mask *col static BOOL solid_brush(dibdrv_physdev *pdev, dib_info *dib, int num, const RECT *rects, HRGN region) { rop_mask brush_color; + DWORD color = get_pixel_color( pdev, pdev->brush_colorref, TRUE ); - brush_color.and = pdev->brush_and; - brush_color.xor = pdev->brush_xor; - + calc_and_xor_masks( pdev->brush_rop, color, &brush_color.and, &brush_color.xor ); solid_rects( dib, num, rects, &brush_color, region ); return TRUE; } @@ -1522,7 +1523,7 @@ static BOOL create_hatch_brush_bits(dibdrv_physdev *pdev) dib_info hatch; rop_mask fg_mask, bg_mask; rop_mask_bits mask_bits; - DWORD size; + DWORD size, color; BOOL ret; assert(pdev->brush_and_bits == NULL); @@ -1556,8 +1557,9 @@ static BOOL create_hatch_brush_bits(dibdrv_physdev *pdev) hatch.bits.free = hatch.bits.param = NULL; hatch.bits.is_copy = FALSE; - fg_mask.and = pdev->brush_and; - fg_mask.xor = pdev->brush_xor; + color = get_pixel_color( pdev, pdev->brush_colorref, TRUE ); + calc_and_xor_masks( pdev->brush_rop, color, &fg_mask.and, &fg_mask.xor ); + get_brush_bkgnd_masks( pdev, &bg_mask.and, &bg_mask.xor ); ret = pdev->brush_dib.funcs->create_rop_masks( &pdev->brush_dib, &hatch, &fg_mask, &bg_mask, &mask_bits ); @@ -1705,7 +1707,7 @@ static BOOL pattern_brush(dibdrv_physdev *pdev, dib_info *dib, int num, const RE if (!clip) { dib->funcs->pattern_rects( dib, num, rects, &origin, &pdev->brush_dib, pdev->brush_and_bits, pdev->brush_xor_bits ); - return TRUE; + goto done; } for(i = 0; i < num; i++) @@ -1738,8 +1740,8 @@ static BOOL pattern_brush(dibdrv_physdev *pdev, dib_info *dib, int num, const RE } release_wine_region( region ); +done: if (needs_reselect) free_pattern_brush( pdev ); - return TRUE; } @@ -1751,8 +1753,6 @@ static BOOL null_brush(dibdrv_physdev *pdev, dib_info *dib, int num, const RECT void update_brush_rop( dibdrv_physdev *pdev, INT rop ) { pdev->brush_rop = rop; - if(pdev->brush_style == BS_SOLID || pdev->brush_style == BS_HATCHED) - calc_and_xor_masks(rop, pdev->brush_color, &pdev->brush_and, &pdev->brush_xor); free_pattern_brush_bits( pdev ); } @@ -1768,6 +1768,8 @@ HBRUSH dibdrv_SelectBrush( PHYSDEV dev, HBRUSH hbrush, HBITMAP bitmap, TRACE("(%p, %p)\n", dev, hbrush); + free_pattern_brush( pdev ); + if (bitmap || info) /* pattern brush */ { pdev->brush_rects = pattern_brush; @@ -1776,26 +1778,23 @@ HBRUSH dibdrv_SelectBrush( PHYSDEV dev, HBRUSH hbrush, HBITMAP bitmap, pdev->brush_pattern_bits = bits; pdev->brush_pattern_usage = usage; pdev->brush_pattern_bitmap = bitmap; - free_pattern_brush( pdev ); /* brush is actually selected only when it's used */ + /* brush is actually selected only when it's used */ return next->funcs->pSelectBrush( next, hbrush, bitmap, info, bits, usage ); } - if (!GetObjectW( hbrush, sizeof(logbrush), &logbrush )) return 0; + GetObjectW( hbrush, sizeof(logbrush), &logbrush ); if (hbrush == GetStockObject( DC_BRUSH )) logbrush.lbColor = GetDCBrushColor( dev->hdc ); pdev->brush_style = logbrush.lbStyle; - free_pattern_brush( pdev ); - switch(logbrush.lbStyle) { case BS_SOLID: pdev->brush_colorref = logbrush.lbColor; - pdev->brush_color = get_pixel_color( pdev, pdev->brush_colorref, TRUE ); - calc_and_xor_masks(GetROP2(dev->hdc), pdev->brush_color, &pdev->brush_and, &pdev->brush_xor); + pdev->brush_rop = GetROP2( dev->hdc ); pdev->brush_rects = solid_brush; break; @@ -1807,8 +1806,7 @@ HBRUSH dibdrv_SelectBrush( PHYSDEV dev, HBRUSH hbrush, HBITMAP bitmap, if(logbrush.lbHatch > HS_DIAGCROSS) return 0; pdev->brush_hatch = logbrush.lbHatch; pdev->brush_colorref = logbrush.lbColor; - pdev->brush_color = get_pixel_color( pdev, pdev->brush_colorref, TRUE ); - calc_and_xor_masks(GetROP2(dev->hdc), pdev->brush_color, &pdev->brush_and, &pdev->brush_xor); + pdev->brush_rop = GetROP2( dev->hdc ); pdev->brush_rects = pattern_brush; break; @@ -1828,11 +1826,7 @@ COLORREF dibdrv_SetDCBrushColor( PHYSDEV dev, COLORREF color ) dibdrv_physdev *pdev = get_dibdrv_pdev(dev); if (GetCurrentObject(dev->hdc, OBJ_BRUSH) == GetStockObject( DC_BRUSH )) - { pdev->brush_colorref = color; - pdev->brush_color = get_pixel_color( pdev, pdev->brush_colorref, TRUE ); - calc_and_xor_masks(GetROP2(dev->hdc), pdev->brush_color, &pdev->brush_and, &pdev->brush_xor); - } return next->funcs->pSetDCBrushColor( next, color ); }
1
0
0
0
Piotr Caban : msvcp90: Added ctype<wchar_t>::scan functions implementation.
by Alexandre Julliard
22 Dec '11
22 Dec '11
Module: wine Branch: master Commit: b433f1cd04c8d4d6fa61413b71c535ffae82f7c0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b433f1cd04c8d4d6fa61413b7…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Dec 22 18:25:23 2011 +0100 msvcp90: Added ctype<wchar_t>::scan functions implementation. --- dlls/msvcp90/locale.c | 28 ++++++++++++++++++++-------- 1 files changed, 20 insertions(+), 8 deletions(-) diff --git a/dlls/msvcp90/locale.c b/dlls/msvcp90/locale.c index a8d04d4..a628e4d 100644 --- a/dlls/msvcp90/locale.c +++ b/dlls/msvcp90/locale.c @@ -2339,11 +2339,17 @@ const wchar_t* __thiscall ctype_wchar_is(const ctype_wchar *this, /* ?do_scan_is@?$ctype@G@std@@MBEPBGFPBG0@Z */ /* ?do_scan_is@?$ctype@G@std@@MEBAPEBGFPEBG0@Z */ DEFINE_THISCALL_WRAPPER(ctype_wchar_do_scan_is, 16) +#define call_ctype_wchar_do_scan_is(this, mask, first, last) CALL_VTBL_FUNC(this, 12, \ + const wchar_t*, (const ctype_wchar*, short, const wchar_t*, const wchar_t*), \ + (this, mask, first, last)) const wchar_t* __thiscall ctype_wchar_do_scan_is(const ctype_wchar *this, short mask, const wchar_t *first, const wchar_t *last) { - FIXME("(%p %d %p %p) stub\n", this, mask, first, last); - return NULL; + TRACE("(%p %d %p %p)\n", this, mask, first, last); + for(; first<last; first++) + if(!ctype_wchar_is_ch(this, mask, *first)) + break; + return first; } /* ?scan_is@?$ctype@_W@std@@QBEPB_WFPB_W0@Z */ @@ -2354,8 +2360,8 @@ DEFINE_THISCALL_WRAPPER(ctype_wchar_scan_is, 16) const wchar_t* __thiscall ctype_wchar_scan_is(const ctype_wchar *this, short mask, const wchar_t *first, const wchar_t *last) { - FIXME("(%p %x %p %p) stub\n", this, mask, first, last); - return NULL; + TRACE("(%p %x %p %p)\n", this, mask, first, last); + return call_ctype_wchar_do_scan_is(this, mask, first, last); } /* ?do_scan_not@?$ctype@_W@std@@MBEPB_WFPB_W0@Z */ @@ -2363,11 +2369,17 @@ const wchar_t* __thiscall ctype_wchar_scan_is(const ctype_wchar *this, /* ?do_scan_not@?$ctype@G@std@@MBEPBGFPBG0@Z */ /* ?do_scan_not@?$ctype@G@std@@MEBAPEBGFPEBG0@Z */ DEFINE_THISCALL_WRAPPER(ctype_wchar_do_scan_not, 16) +#define call_ctype_wchar_do_scan_not(this, mask, first, last) CALL_VTBL_FUNC(this, 16, \ + const wchar_t*, (const ctype_wchar*, short, const wchar_t*, const wchar_t*), \ + (this, mask, first, last)) const wchar_t* __thiscall ctype_wchar_do_scan_not(const ctype_wchar *this, short mask, const wchar_t *first, const wchar_t *last) { - FIXME("(%p %x %p %p) stub\n", this, mask, first, last); - return NULL; + TRACE("(%p %x %p %p)\n", this, mask, first, last); + for(; first<last; first++) + if(ctype_wchar_is_ch(this, mask, *first)) + break; + return first; } /* ?scan_not@?$ctype@_W@std@@QBEPB_WFPB_W0@Z */ @@ -2378,8 +2390,8 @@ DEFINE_THISCALL_WRAPPER(ctype_wchar_scan_not, 16) const wchar_t* __thiscall ctype_wchar_scan_not(const ctype_wchar *this, short mask, const wchar_t *first, const wchar_t *last) { - FIXME("(%p %x %p %p) stub\n", this, mask, first, last); - return NULL; + TRACE("(%p %x %p %p)\n", this, mask, first, last); + return call_ctype_wchar_do_scan_not(this, mask, first, last); } /* ??0_Locimp@locale@std@@AAE@_N@Z */
1
0
0
0
Piotr Caban : msvcp90: Added ctype<wchar_t>::is functions implementation.
by Alexandre Julliard
22 Dec '11
22 Dec '11
Module: wine Branch: master Commit: 1de0fe3a004b342086c58b8c3d92473280a2bc8d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1de0fe3a004b342086c58b8c3…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Dec 22 18:25:07 2011 +0100 msvcp90: Added ctype<wchar_t>::is functions implementation. --- dlls/msvcp90/locale.c | 38 ++++++++++++++++++++++++++++++-------- dlls/msvcp90/msvcp90.spec | 4 ++-- 2 files changed, 32 insertions(+), 10 deletions(-) diff --git a/dlls/msvcp90/locale.c b/dlls/msvcp90/locale.c index 0ffc25c..a8d04d4 100644 --- a/dlls/msvcp90/locale.c +++ b/dlls/msvcp90/locale.c @@ -2266,15 +2266,34 @@ const wchar_t* __thiscall ctype_wchar_toupper(const ctype_wchar *this, return call_ctype_wchar_do_toupper(this, first, last); } +/* _Getwctypes */ +const wchar_t* __cdecl _Getwctypes(const wchar_t *first, const wchar_t *last, + short *mask, const _Ctypevec *ctype) +{ + TRACE("(%p %p %p %p)\n", first, last, mask, ctype); + GetStringTypeW(CT_CTYPE1, first, last-first, (WORD*)mask); + return last; +} + +/* _Getwctype */ +short __cdecl _Getwctype(wchar_t ch, const _Ctypevec *ctype) +{ + short mask = 0; + _Getwctypes(&ch, &ch+1, &mask, ctype); + return mask; +} + /* ?do_is@?$ctype@_W@std@@MBE_NF_W@Z */ /* ?do_is@?$ctype@_W@std@@MEBA_NF_W@Z */ /* ?do_is@?$ctype@G@std@@MBE_NFG@Z */ /* ?do_is@?$ctype@G@std@@MEBA_NFG@Z */ DEFINE_THISCALL_WRAPPER(ctype_wchar_do_is_ch, 12) +#define call_ctype_wchar_do_is_ch(this, mask, ch) CALL_VTBL_FUNC(this, 8, \ + MSVCP_bool, (const ctype_wchar*, short, wchar_t), (this, mask, ch)) MSVCP_bool __thiscall ctype_wchar_do_is_ch(const ctype_wchar *this, short mask, wchar_t ch) { - FIXME("(%p %x %d) stub\n", this, mask, ch); - return 0; + TRACE("(%p %x %d)\n", this, mask, ch); + return !(_Getwctype(ch, &this->ctype) & mask); } /* ?do_is@?$ctype@_W@std@@MBEPB_WPB_W0PAF@Z */ @@ -2282,11 +2301,14 @@ MSVCP_bool __thiscall ctype_wchar_do_is_ch(const ctype_wchar *this, short mask, /* ?do_is@?$ctype@G@std@@MBEPBGPBG0PAF@Z */ /* ?do_is@?$ctype@G@std@@MEBAPEBGPEBG0PEAF@Z */ DEFINE_THISCALL_WRAPPER(ctype_wchar_do_is, 16) +#define call_ctype_wchar_do_is(this, first, last, dest) CALL_VTBL_FUNC(this, 4, \ + const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, short*), \ + (this, first, last, dest)) const wchar_t* __thiscall ctype_wchar_do_is(const ctype_wchar *this, const wchar_t *first, const wchar_t *last, short *dest) { - FIXME("(%p %p %p %p) stub\n", this, first, last, dest); - return NULL; + TRACE("(%p %p %p %p)\n", this, first, last, dest); + return _Getwctypes(first, last, dest, &this->ctype); } /* ?is@?$ctype@_W@std@@QBE_NF_W@Z */ @@ -2296,8 +2318,8 @@ const wchar_t* __thiscall ctype_wchar_do_is(const ctype_wchar *this, DEFINE_THISCALL_WRAPPER(ctype_wchar_is_ch, 12) MSVCP_bool __thiscall ctype_wchar_is_ch(const ctype_wchar *this, short mask, wchar_t ch) { - FIXME("(%p %x %d) stub\n", this, mask, ch); - return 0; + TRACE("(%p %x %d)\n", this, mask, ch); + return call_ctype_wchar_do_is_ch(this, mask, ch); } /* ?is@?$ctype@_W@std@@QBEPB_WPB_W0PAF@Z */ @@ -2308,8 +2330,8 @@ DEFINE_THISCALL_WRAPPER(ctype_wchar_is, 16) const wchar_t* __thiscall ctype_wchar_is(const ctype_wchar *this, const wchar_t *first, const wchar_t *last, short *dest) { - FIXME("(%p %p %p %p) stub\n", this, first, last, dest); - return NULL; + TRACE("(%p %p %p %p)\n", this, first, last, dest); + return call_ctype_wchar_do_is(this, first, last, dest); } /* ?do_scan_is@?$ctype@_W@std@@MBEPB_WFPB_W0@Z */ diff --git a/dlls/msvcp90/msvcp90.spec b/dlls/msvcp90/msvcp90.spec index 1555fac..fa7fef7 100644 --- a/dlls/msvcp90/msvcp90.spec +++ b/dlls/msvcp90/msvcp90.spec @@ -5754,8 +5754,8 @@ @ cdecl _Getctype() @ cdecl _Getcvt() @ stub _Getdateorder -@ stub _Getwctype -@ stub _Getwctypes +@ cdecl _Getwctype(long ptr) +@ cdecl _Getwctypes(ptr ptr ptr ptr) @ extern _Hugeval @ extern _Inf @ stub _LCosh
1
0
0
0
← Newer
1
...
15
16
17
18
19
20
21
...
81
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
Results per page:
10
25
50
100
200