ReactOS.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
2024
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
List overview
Download
Ros-diffs
January 2011
----- 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
ros-diffs@reactos.org
20 participants
336 discussions
Start a n
N
ew thread
[spetreolle] 50414: [TEST] Disable DroidSansFallback.ttf.
by spetreolle@svn.reactos.org
Author: spetreolle Date: Mon Jan 17 22:58:29 2011 New Revision: 50414 URL:
http://svn.reactos.org/svn/reactos?rev=50414&view=rev
Log: [TEST] Disable DroidSansFallback.ttf. Modified: trunk/reactos/boot/bootdata/packages/reactos.dff Modified: trunk/reactos/boot/bootdata/packages/reactos.dff URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/packages/rea…
============================================================================== --- trunk/reactos/boot/bootdata/packages/reactos.dff [iso-8859-1] (original) +++ trunk/reactos/boot/bootdata/packages/reactos.dff [iso-8859-1] Mon Jan 17 22:58:29 2011 @@ -695,7 +695,7 @@ subsystems\win32\win32k\win32k.sys 1 ; Optional/proprietary files -modules\optional\DroidSansFallback.ttf 3 optional +;modules\optional\DroidSansFallback.ttf 3 optional modules\optional\NOTICE_for_Droid_Font.txt 4 optional modules\optional\netkvm2k.inf 6 optional modules\optional\netkvm2k.cat 6 optional
13 years, 8 months
1
0
0
0
[spetreolle] 50413: [TEST] Enable DroidSansFallback.ttf.
by spetreolle@svn.reactos.org
Author: spetreolle Date: Mon Jan 17 22:53:11 2011 New Revision: 50413 URL:
http://svn.reactos.org/svn/reactos?rev=50413&view=rev
Log: [TEST] Enable DroidSansFallback.ttf. Modified: trunk/reactos/boot/bootdata/packages/reactos.dff Modified: trunk/reactos/boot/bootdata/packages/reactos.dff URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/packages/rea…
============================================================================== --- trunk/reactos/boot/bootdata/packages/reactos.dff [iso-8859-1] (original) +++ trunk/reactos/boot/bootdata/packages/reactos.dff [iso-8859-1] Mon Jan 17 22:53:11 2011 @@ -695,7 +695,7 @@ subsystems\win32\win32k\win32k.sys 1 ; Optional/proprietary files -;modules\optional\DroidSansFallback.ttf 3 optional +modules\optional\DroidSansFallback.ttf 3 optional modules\optional\NOTICE_for_Droid_Font.txt 4 optional modules\optional\netkvm2k.inf 6 optional modules\optional\netkvm2k.cat 6 optional
13 years, 8 months
1
0
0
0
[spetreolle] 50412: [TEST] Disable DroidSansFallback.ttf.
by spetreolle@svn.reactos.org
Author: spetreolle Date: Mon Jan 17 22:46:46 2011 New Revision: 50412 URL:
http://svn.reactos.org/svn/reactos?rev=50412&view=rev
Log: [TEST] Disable DroidSansFallback.ttf. Modified: trunk/reactos/boot/bootdata/packages/reactos.dff Modified: trunk/reactos/boot/bootdata/packages/reactos.dff URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/packages/rea…
============================================================================== --- trunk/reactos/boot/bootdata/packages/reactos.dff [iso-8859-1] (original) +++ trunk/reactos/boot/bootdata/packages/reactos.dff [iso-8859-1] Mon Jan 17 22:46:46 2011 @@ -695,7 +695,7 @@ subsystems\win32\win32k\win32k.sys 1 ; Optional/proprietary files -modules\optional\DroidSansFallback.ttf 3 optional +;modules\optional\DroidSansFallback.ttf 3 optional modules\optional\NOTICE_for_Droid_Font.txt 4 optional modules\optional\netkvm2k.inf 6 optional modules\optional\netkvm2k.cat 6 optional
13 years, 8 months
1
0
0
0
[spetreolle] 50411: [MSVCRT] No reason for wcsxfrm to be a stub when code is here.
by spetreolle@svn.reactos.org
Author: spetreolle Date: Mon Jan 17 21:51:30 2011 New Revision: 50411 URL:
http://svn.reactos.org/svn/reactos?rev=50411&view=rev
Log: [MSVCRT] No reason for wcsxfrm to be a stub when code is here. Modified: trunk/reactos/dll/win32/msvcrt/msvcrt.spec Modified: trunk/reactos/dll/win32/msvcrt/msvcrt.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msvcrt/msvcrt.sp…
============================================================================== --- trunk/reactos/dll/win32/msvcrt/msvcrt.spec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msvcrt/msvcrt.spec [iso-8859-1] Mon Jan 17 21:51:30 2011 @@ -1398,7 +1398,7 @@ @ cdecl wcstombs(ptr ptr long) # @ cdecl wcstombs_s(ptr ptr long wstr long) @ cdecl wcstoul(wstr ptr long) -@ stub wcsxfrm #(ptr wstr long) +@ cdecl wcsxfrm(ptr wstr long) # stub wctob @ cdecl wctomb(ptr long) # stub wctomb_s
13 years, 8 months
1
0
0
0
[spetreolle] 50410: TRANSLATION: fix typo in shutdown.
by spetreolle@svn.reactos.org
Author: spetreolle Date: Mon Jan 17 21:37:59 2011 New Revision: 50410 URL:
http://svn.reactos.org/svn/reactos?rev=50410&view=rev
Log: TRANSLATION: fix typo in shutdown. Modified: trunk/reactos/base/applications/shutdown/lang/fr-FR.rc Modified: trunk/reactos/base/applications/shutdown/lang/fr-FR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/shutdown…
============================================================================== --- trunk/reactos/base/applications/shutdown/lang/fr-FR.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/shutdown/lang/fr-FR.rc [iso-8859-1] Mon Jan 17 21:37:59 2011 @@ -4,7 +4,7 @@ BEGIN IDS_USAGE, "Utilisation: shutdown [-?] [-l | -s | -r] [-f]\n\n\ - Aucun argument ou -?\tAffichent ce message\n\ + Aucun argument ou -?\tAffiche ce message\n\ -l\t\t\tSe déconnecter\n\ -s\t\t\tÉteindre l'ordinateur\n\ -r\t\t\tÉteindre et redémarrer l'ordinateur\n\
13 years, 8 months
1
0
0
0
[fireball] 50409: [WINENT.DRV] - Fix a number of small mistakes in the new usermode handle mapping code (performing dirty read, masking out hUser function parameter by a local variable and thus som...
by fireball@svn.reactos.org
Author: fireball Date: Mon Jan 17 14:28:38 2011 New Revision: 50409 URL:
http://svn.reactos.org/svn/reactos?rev=50409&view=rev
Log: [WINENT.DRV] - Fix a number of small mistakes in the new usermode handle mapping code (performing dirty read, masking out hUser function parameter by a local variable and thus sometimes adding an incorrect mapping, mapping NULL handles, etc). - Thanks to Wine's usage of DllMain and our dll loader, wine*.drv still gets called even after DLL_PROCESS_DETACH. To partially fix the issue, store stock objects mapping in a static global array. Fixes "SURFACE_ShareLock failed" issues. Modified: branches/arwinss/reactos/dll/win32/winent.drv/gdiobj.c Modified: branches/arwinss/reactos/dll/win32/winent.drv/gdiobj.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winen…
============================================================================== --- branches/arwinss/reactos/dll/win32/winent.drv/gdiobj.c [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/winent.drv/gdiobj.c [iso-8859-1] Mon Jan 17 14:28:38 2011 @@ -28,12 +28,31 @@ PGDI_TABLE_ENTRY GdiHandleTable = NULL; PGDI_SHARED_HANDLE_TABLE GdiSharedHandleTable = NULL; HANDLE CurrentProcessId = NULL; +HMAPPING GdiStockMapping[STOCK_LAST + 2]; /* FUNCTIONS **************************************************************/ VOID InitHandleMapping() { InitializeCriticalSection(&handle_mapping_cs); +} + +VOID InitStockObjectsMapping() +{ + HGDIOBJ hKernel, hStockUser; + + hKernel = NtGdiGetStockObject(DEFAULT_BITMAP); + hStockUser = GetStockObject( STOCK_LAST+1 ); + + TRACE("Adding hUser %x hKernel %x\n", hStockUser, hKernel); + + /* Make sure that both kernel mode and user mode objects are initialized */ + if(hKernel && hStockUser) + { + GdiStockMapping[STOCK_LAST+1].hKernel = hKernel; + GdiStockMapping[STOCK_LAST+1].hUser = hStockUser; + StockObjectsInitialized = TRUE; + } } VOID AddHandleMapping(HGDIOBJ hKernel, HGDIOBJ hUser) @@ -53,6 +72,11 @@ static PHMAPPING FindHandleMapping(HGDIOBJ hUser) { PHMAPPING item; + DWORD i; + + /* Check the static stock objects mapping first */ + for (i=0; i<sizeof(GdiStockMapping)/sizeof(HMAPPING); i++) + if (GdiStockMapping[i].hUser == hUser) return &GdiStockMapping[i]; LIST_FOR_EACH_ENTRY( item, &handle_mapping_list, HMAPPING, entry ) { @@ -69,36 +93,41 @@ { PHMAPPING mapping; + if (!hUser) return NULL; + /* Map stock objects if not mapped yet */ if(!StockObjectsInitialized) - { - HGDIOBJ hKernel, hUser; - - hKernel = NtGdiGetStockObject(DEFAULT_BITMAP); - hUser = GetStockObject( STOCK_LAST+1 ); - - /* Make sure that both kernel mode and user mode objects are initialized */ - if(hKernel && hUser) - { - AddHandleMapping(NtGdiGetStockObject(DEFAULT_BITMAP), GetStockObject( STOCK_LAST+1 )); - StockObjectsInitialized = TRUE; - } - } + InitStockObjectsMapping(); + + EnterCriticalSection(&handle_mapping_cs); mapping = FindHandleMapping(hUser); + if (!mapping) + ERR("Couldn't find a mapping for handle %x\n", hUser); + + LeaveCriticalSection(&handle_mapping_cs); + return mapping ? mapping->hKernel : NULL; } VOID RemoveHandleMapping(HGDIOBJ hUser) { PHMAPPING mapping; + + if (!hUser) return; + + TRACE("Remove handle mapping %x\n", hUser); + + EnterCriticalSection(&handle_mapping_cs); mapping = FindHandleMapping(hUser); if(mapping == NULL) + { + LeaveCriticalSection(&handle_mapping_cs); return; - - EnterCriticalSection(&handle_mapping_cs); + } + list_remove(&mapping->entry); LeaveCriticalSection(&handle_mapping_cs); } @@ -168,7 +197,7 @@ else { Result = FALSE; // Can not be zero. - ERR("Objct doesn't have user data handle 0x%x!\n", hGdiObj); + ERR("Object doesn't have user data handle 0x%x!\n", hGdiObj); } if (Result) *UserData = Entry->UserData; return Result;
13 years, 8 months
1
0
0
0
[tkreuzer] 50408: [USER32] Fix CreateIcon and CreateIconIndirect. Fixes user32_winetest:cursoricon. (Yes we execute less tests, but that is correct! wine probably only passes these tests by chance)
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Mon Jan 17 01:22:16 2011 New Revision: 50408 URL:
http://svn.reactos.org/svn/reactos?rev=50408&view=rev
Log: [USER32] Fix CreateIcon and CreateIconIndirect. Fixes user32_winetest:cursoricon. (Yes we execute less tests, but that is correct! wine probably only passes these tests by chance) Modified: trunk/reactos/dll/win32/user32/windows/cursoricon.c Modified: trunk/reactos/dll/win32/user32/windows/cursoricon.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/c…
============================================================================== --- trunk/reactos/dll/win32/user32/windows/cursoricon.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/user32/windows/cursoricon.c [iso-8859-1] Mon Jan 17 01:22:16 2011 @@ -1173,13 +1173,21 @@ iinfo.fIcon = TRUE; iinfo.xHotspot = nWidth / 2; iinfo.yHotspot = nHeight / 2; - iinfo.hbmMask = CreateBitmap( nWidth, nHeight, 1, 1, lpANDbits ); - iinfo.hbmColor = CreateBitmap( nWidth, nHeight, bPlanes, bBitsPixel, lpXORbits ); + if (bPlanes * bBitsPixel > 1) + { + iinfo.hbmColor = CreateBitmap( nWidth, nHeight, bPlanes, bBitsPixel, lpXORbits ); + iinfo.hbmMask = CreateBitmap( nWidth, nHeight, 1, 1, lpANDbits ); + } + else + { + iinfo.hbmMask = CreateBitmap( nWidth, nHeight * 2, 1, 1, lpANDbits ); + iinfo.hbmColor = NULL; + } hIcon = CreateIconIndirect( &iinfo ); DeleteObject( iinfo.hbmMask ); - DeleteObject( iinfo.hbmColor ); + if (iinfo.hbmColor) DeleteObject( iinfo.hbmColor ); return hIcon; } @@ -1498,7 +1506,7 @@ } else { - mask = CreateBitmap( width, height, 1, 1, NULL ); + mask = CreateBitmap( width, height * 2, 1, 1, NULL ); if(!mask) { ERR("Unable to create mask bitmap!\n");
13 years, 8 months
1
0
0
0
[akhaldi] 50407: [CMAKE] - Adapt gdi32 apitest cmake build to the recent changes.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sun Jan 16 22:11:35 2011 New Revision: 50407 URL:
http://svn.reactos.org/svn/reactos?rev=50407&view=rev
Log: [CMAKE] - Adapt gdi32 apitest cmake build to the recent changes. Modified: trunk/rostests/apitests/gdi32/CMakeLists.txt Modified: trunk/rostests/apitests/gdi32/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/gdi32/CMakeLists…
============================================================================== --- trunk/rostests/apitests/gdi32/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rostests/apitests/gdi32/CMakeLists.txt [iso-8859-1] Sun Jan 16 22:11:35 2011 @@ -12,6 +12,7 @@ CreateFontIndirect.c CreatePen.c CreateRectRgn.c + DPtoLP.c EngAcquireSemaphore.c EngCreateSemaphore.c EngDeleteSemaphore.c
13 years, 8 months
1
0
0
0
[tkreuzer] 50406: [USER32] - Fix bug in CreateIconIndirect - implement get_icon_size - use unmodified wine code for STATIC_PaintIconfn
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sun Jan 16 21:41:47 2011 New Revision: 50406 URL:
http://svn.reactos.org/svn/reactos?rev=50406&view=rev
Log: [USER32] - Fix bug in CreateIconIndirect - implement get_icon_size - use unmodified wine code for STATIC_PaintIconfn Modified: trunk/reactos/dll/win32/user32/controls/static.c trunk/reactos/dll/win32/user32/include/cursor.h trunk/reactos/dll/win32/user32/windows/cursoricon.c Modified: trunk/reactos/dll/win32/user32/controls/static.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/controls/…
============================================================================== --- trunk/reactos/dll/win32/user32/controls/static.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/user32/controls/static.c [iso-8859-1] Sun Jan 16 21:41:47 2011 @@ -845,35 +845,28 @@ DeleteObject( hBrush ); } -/* Modified for ReactOS */ static void STATIC_PaintIconfn( HWND hwnd, HDC hdc, DWORD style ) { RECT rc, iconRect; HBRUSH hbrush; HICON hIcon; - ICONINFO info; + SIZE size; GetClientRect( hwnd, &rc ); hbrush = STATIC_SendWmCtlColorStatic(hwnd, hdc); hIcon = (HICON)GetWindowLongPtrW( hwnd, HICON_GWL_OFFSET ); - if (!hIcon || (!GetIconInfo(hIcon, &info))) + if (!hIcon || !get_icon_size( hIcon, &size )) { FillRect(hdc, &rc, hbrush); } else { - BITMAP bm; - GetObjectW(info.hbmMask, sizeof(BITMAP), &bm); - if (!info.fIcon) - { - bm.bmHeight /= 2; - } if (style & SS_CENTERIMAGE) { - iconRect.left = (rc.right - rc.left) / 2 - bm.bmWidth / 2; - iconRect.top = (rc.bottom - rc.top) / 2 - bm.bmHeight / 2; - iconRect.right = iconRect.left + bm.bmWidth; - iconRect.bottom = iconRect.top + bm.bmHeight; + iconRect.left = (rc.right - rc.left) / 2 - size.cx / 2; + iconRect.top = (rc.bottom - rc.top) / 2 - size.cy / 2; + iconRect.right = iconRect.left + size.cx; + iconRect.bottom = iconRect.top + size.cy; } else iconRect = rc; @@ -970,3 +963,4 @@ break; } } + Modified: trunk/reactos/dll/win32/user32/include/cursor.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/include/c…
============================================================================== --- trunk/reactos/dll/win32/user32/include/cursor.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/user32/include/cursor.h [iso-8859-1] Sun Jan 16 21:41:47 2011 @@ -10,3 +10,6 @@ int yHotspot, BOOL fIcon); + +BOOL get_icon_size(HICON hIcon, SIZE *size); + Modified: trunk/reactos/dll/win32/user32/windows/cursoricon.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/c…
============================================================================== --- trunk/reactos/dll/win32/user32/windows/cursoricon.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/user32/windows/cursoricon.c [iso-8859-1] Sun Jan 16 21:41:47 2011 @@ -1477,8 +1477,9 @@ bmpXor.bmWidth, bmpXor.bmHeight, bmpXor.bmWidthBytes, bmpXor.bmPlanes, bmpXor.bmBitsPixel); - width = bmpXor.bmWidth; - height = bmpXor.bmHeight; + // the size of the mask bitmap always determines the icon size! + width = bmpAnd.bmWidth; + height = bmpAnd.bmHeight; if (bmpXor.bmPlanes * bmpXor.bmBitsPixel != 1) { color = CreateBitmap( width, height, bmpXor.bmPlanes, bmpXor.bmBitsPixel, NULL ); @@ -1497,7 +1498,7 @@ } else { - mask = CreateBitmap( width, height * 2, 1, 1, NULL ); + mask = CreateBitmap( width, height, 1, 1, NULL ); if(!mask) { ERR("Unable to create mask bitmap!\n"); @@ -2181,3 +2182,23 @@ return(ZwCallbackReturn(&Result, sizeof(LRESULT), STATUS_SUCCESS)); } + +BOOL get_icon_size(HICON hIcon, SIZE *size) +{ + ICONINFO info; + BITMAP bitmap; + + if (!GetIconInfo(hIcon, &info)) return FALSE; + if (!GetObject(info.hbmMask, sizeof(bitmap), &bitmap)) return FALSE; + + size->cx = bitmap.bmWidth; + size->cy = bitmap.bmHeight; + + /* Black and white icons store both the XOR and AND bitmap in hbmMask */ + if (!info.hbmColor) + { + size->cy /= 2; + } + + return TRUE; +}
13 years, 8 months
1
0
0
0
[tkreuzer] 50405: [USER32_APITEST] Add tests for GetIconInfo.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sun Jan 16 21:03:20 2011 New Revision: 50405 URL:
http://svn.reactos.org/svn/reactos?rev=50405&view=rev
Log: [USER32_APITEST] Add tests for GetIconInfo. Added: trunk/rostests/apitests/user32/GetIconInfo.c (with props) Modified: trunk/rostests/apitests/user32/CMakeLists.txt trunk/rostests/apitests/user32/testlist.c trunk/rostests/apitests/user32/user32_apitest.rbuild Modified: trunk/rostests/apitests/user32/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/user32/CMakeList…
============================================================================== --- trunk/rostests/apitests/user32/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rostests/apitests/user32/CMakeLists.txt [iso-8859-1] Sun Jan 16 21:03:20 2011 @@ -7,6 +7,7 @@ ScrollDC.c ScrollWindowEx.c GetSystemMetrics.c + GetIconInfo.c testlist.c) add_executable(user32_apitest ${SOURCE}) Added: trunk/rostests/apitests/user32/GetIconInfo.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/user32/GetIconIn…
============================================================================== --- trunk/rostests/apitests/user32/GetIconInfo.c (added) +++ trunk/rostests/apitests/user32/GetIconInfo.c [iso-8859-1] Sun Jan 16 21:03:20 2011 @@ -1,0 +1,194 @@ + +#include <stdio.h> +#include <wine/test.h> +#include <windows.h> + + +// FIXME user32 + +void +Test_GetIconInfo(BOOL fIcon) +{ + HICON hicon; + ICONINFO iconinfo, iconinfo2; + BITMAP bitmap; + + iconinfo.fIcon = fIcon; + iconinfo.xHotspot = 0; + iconinfo.yHotspot = 0; + iconinfo.hbmMask = NULL; + iconinfo.hbmColor = NULL; + + hicon = CreateIconIndirect(&iconinfo); + ok(hicon == 0, "should fail\n"); + + iconinfo.hbmMask = CreateBitmap(8, 16, 1, 1, NULL); + hicon = CreateIconIndirect(&iconinfo); + ok(hicon != 0, "should not fail\n"); + + ok(GetIconInfo(hicon, &iconinfo2), "\n"); + ok(iconinfo2.fIcon == iconinfo.fIcon, "\n"); + if (fIcon) + { + ok(iconinfo2.xHotspot == 4, "%ld\n", iconinfo2.xHotspot); + ok(iconinfo2.yHotspot == 4, "%ld\n", iconinfo2.yHotspot); + } + else + { + ok(iconinfo2.xHotspot == 0, "%ld\n", iconinfo2.xHotspot); + ok(iconinfo2.yHotspot == 0, "%ld\n", iconinfo2.yHotspot); + } + ok(iconinfo2.hbmMask != NULL, "\n"); + ok(iconinfo2.hbmMask != iconinfo.hbmMask, "\n"); + ok(iconinfo2.hbmColor == NULL, "\n"); + + ok(GetIconInfo(hicon, &iconinfo2), "\n"); + ok(iconinfo2.fIcon == iconinfo.fIcon, "\n"); + if (fIcon) + { + ok(iconinfo2.xHotspot == 4, "%ld\n", iconinfo2.xHotspot); + ok(iconinfo2.yHotspot == 4, "%ld\n", iconinfo2.yHotspot); + } + else + { + ok(iconinfo2.xHotspot == 0, "%ld\n", iconinfo2.xHotspot); + ok(iconinfo2.yHotspot == 0, "%ld\n", iconinfo2.yHotspot); + } + ok(iconinfo2.hbmMask != NULL, "\n"); + ok(iconinfo2.hbmMask != iconinfo.hbmMask, "\n"); + ok(iconinfo2.hbmColor == NULL, "\n"); + + iconinfo.hbmColor = CreateBitmap(2, 2, 1, 1, NULL); + hicon = CreateIconIndirect(&iconinfo); + ok(hicon != 0, "should not fail\n"); + + ok(GetIconInfo(hicon, &iconinfo2), "\n"); + ok(iconinfo2.fIcon == iconinfo.fIcon, "\n"); + if (fIcon) + { + ok(iconinfo2.xHotspot == 4, "%ld\n", iconinfo2.xHotspot); + ok(iconinfo2.yHotspot == 8, "%ld\n", iconinfo2.yHotspot); + } + else + { + ok(iconinfo2.xHotspot == 0, "%ld\n", iconinfo2.xHotspot); + ok(iconinfo2.yHotspot == 0, "%ld\n", iconinfo2.yHotspot); + } + ok(iconinfo2.hbmMask != NULL, "\n"); + ok(iconinfo2.hbmMask != iconinfo.hbmMask, "\n"); + ok(iconinfo2.hbmColor != NULL, "\n"); + ok(iconinfo2.hbmMask != iconinfo.hbmColor, "\n"); + + ok(GetObject(iconinfo2.hbmMask, sizeof(bitmap), &bitmap), "GetObject failed\n"); + ok(bitmap.bmType == 0, "\n"); + ok(bitmap.bmWidth == 8, "\n"); + ok(bitmap.bmHeight == 16, "\n"); + ok(bitmap.bmWidthBytes == 2, "\n"); + ok(bitmap.bmPlanes == 1, "\n"); + ok(bitmap.bmBitsPixel == 1, "\n"); + ok(bitmap.bmBits == NULL, "\n"); + + ok(GetObject(iconinfo2.hbmColor, sizeof(bitmap), &bitmap), "GetObject failed\n"); + ok(bitmap.bmType == 0, "\n"); + ok(bitmap.bmWidth == 8, "\n"); + ok(bitmap.bmHeight == 16, "\n"); + ok(bitmap.bmWidthBytes == 8 * bitmap.bmBitsPixel / 8, "\n"); + ok(bitmap.bmPlanes == 1, "\n"); + ok(bitmap.bmBitsPixel == 32, "\n"); + ok(bitmap.bmBits == NULL, "\n"); + + DeleteObject(iconinfo.hbmMask); + iconinfo.hbmMask = NULL; + hicon = CreateIconIndirect(&iconinfo); + ok(hicon == 0, "should fail\n"); + + DeleteObject(iconinfo.hbmColor); + iconinfo.hbmColor = CreateCompatibleBitmap(GetDC(0), 16, 16); + hicon = CreateIconIndirect(&iconinfo); + ok(hicon == 0, "should fail\n"); + + iconinfo.hbmMask = CreateCompatibleBitmap(GetDC(0), 8, 16); + hicon = CreateIconIndirect(&iconinfo); + ok(hicon != 0, "should not fail\n"); + + ok(GetIconInfo(hicon, &iconinfo2), "\n"); + + ok(GetObject(iconinfo2.hbmMask, sizeof(bitmap), &bitmap), "GetObject failed\n"); + ok(bitmap.bmType == 0, "\n"); + ok(bitmap.bmWidth == 8, "%ld\n", bitmap.bmWidth); + ok(bitmap.bmHeight == 16, "%ld\n", bitmap.bmHeight); + ok(bitmap.bmWidthBytes == 2, "%ld\n", bitmap.bmWidthBytes); + ok(bitmap.bmPlanes == 1, "%d\n", bitmap.bmPlanes); + ok(bitmap.bmBitsPixel == 1, "%d\n", bitmap.bmBitsPixel); + ok(bitmap.bmBits == NULL, "\n"); + + ok(GetObject(iconinfo2.hbmColor, sizeof(bitmap), &bitmap), "GetObject failed\n"); + ok(bitmap.bmType == 0, "\n"); + ok(bitmap.bmWidth == 8, "%ld\n", bitmap.bmWidth); + ok(bitmap.bmHeight == 16, "%ld\n", bitmap.bmHeight); + ok(bitmap.bmWidthBytes == 32, "%ld\n", bitmap.bmWidthBytes); + ok(bitmap.bmPlanes == 1, "%d\n", bitmap.bmPlanes); + ok(bitmap.bmBitsPixel == 32, "%d\n", bitmap.bmBitsPixel); + ok(bitmap.bmBits == NULL, "\n"); + +} + + +START_TEST(GetIconInfo) +{ + HCURSOR hcursor; + ICONINFO iconinfo2; + BITMAP bitmap; + DWORD data[] = {0, 0, 0, 0, 0, 0}; + + Test_GetIconInfo(0); + Test_GetIconInfo(1); + + hcursor = LoadCursor(NULL, IDC_APPSTARTING); + ok(hcursor != 0, "should not fail\n"); + ok(GetIconInfo(hcursor, &iconinfo2), "\n"); + ok(iconinfo2.fIcon == 0, "\n"); + ok(iconinfo2.xHotspot == 0, "%ld\n", iconinfo2.xHotspot); + ok(iconinfo2.yHotspot == 8, "%ld\n", iconinfo2.yHotspot); + ok(iconinfo2.hbmMask != NULL, "\n"); + ok(iconinfo2.hbmColor != NULL, "\n"); + + ok(GetObject(iconinfo2.hbmMask, sizeof(bitmap), &bitmap), "GetObject failed\n"); + ok(bitmap.bmType == 0, "\n"); + ok(bitmap.bmWidth == 32, "%ld\n", bitmap.bmWidth); + ok(bitmap.bmHeight == 32, "\n"); + ok(bitmap.bmWidthBytes == 4, "\n"); + ok(bitmap.bmPlanes == 1, "\n"); + ok(bitmap.bmBitsPixel == 1, "\n"); + ok(bitmap.bmBits == NULL, "\n"); + + ok(GetObject(iconinfo2.hbmColor, sizeof(bitmap), &bitmap), "GetObject failed\n"); + ok(bitmap.bmType == 0, "\n"); + ok(bitmap.bmWidth == 32, "\n"); + ok(bitmap.bmHeight == 32, "\n"); + ok(bitmap.bmWidthBytes == 32 * bitmap.bmBitsPixel / 8, "\n"); + ok(bitmap.bmPlanes == 1, "\n"); + ok(bitmap.bmBitsPixel == 32, "\n"); + ok(bitmap.bmBits == NULL, "\n"); + + hcursor = CreateCursor(NULL, 1, 2, 4, 4, data, data); + ok(hcursor != 0, "should not fail\n"); + ok(GetIconInfo(hcursor, &iconinfo2), "\n"); + ok(iconinfo2.fIcon == 0, "\n"); + ok(iconinfo2.xHotspot == 1, "%ld\n", iconinfo2.xHotspot); + ok(iconinfo2.yHotspot == 2, "%ld\n", iconinfo2.yHotspot); + ok(iconinfo2.hbmMask != NULL, "\n"); + ok(iconinfo2.hbmColor == NULL, "\n"); + + ok(GetObject(iconinfo2.hbmMask, sizeof(bitmap), &bitmap), "GetObject failed\n"); + ok(bitmap.bmType == 0, "\n"); + ok(bitmap.bmWidth == 4, "%ld\n", bitmap.bmWidth); + ok(bitmap.bmHeight == 8, "%ld\n", bitmap.bmHeight); + ok(bitmap.bmWidthBytes == 2, "%ld\n", bitmap.bmWidthBytes); + ok(bitmap.bmPlanes == 1, "\n"); + ok(bitmap.bmBitsPixel == 1, "\n"); + ok(bitmap.bmBits == NULL, "\n"); + +} + + Propchange: trunk/rostests/apitests/user32/GetIconInfo.c ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/rostests/apitests/user32/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/user32/testlist.…
============================================================================== --- trunk/rostests/apitests/user32/testlist.c [iso-8859-1] (original) +++ trunk/rostests/apitests/user32/testlist.c [iso-8859-1] Sun Jan 16 21:03:20 2011 @@ -10,6 +10,7 @@ extern void func_ScrollDC(void); extern void func_ScrollWindowEx(void); extern void func_GetSystemMetrics(void); +extern void func_GetIconInfo(void); const struct test winetest_testlist[] = { @@ -18,6 +19,7 @@ { "ScrollDC", func_ScrollDC }, { "ScrollWindowEx", func_ScrollWindowEx }, { "GetSystemMetrics", func_GetSystemMetrics }, + { "GetIconInfo", func_GetIconInfo }, { 0, 0 } }; Modified: trunk/rostests/apitests/user32/user32_apitest.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/user32/user32_ap…
============================================================================== --- trunk/rostests/apitests/user32/user32_apitest.rbuild [iso-8859-1] (original) +++ trunk/rostests/apitests/user32/user32_apitest.rbuild [iso-8859-1] Sun Jan 16 21:03:20 2011 @@ -14,6 +14,7 @@ <file>ScrollDC.c</file> <file>ScrollWindowEx.c</file> <file>GetSystemMetrics.c</file> + <file>GetIconInfo.c</file> </module> </group>
13 years, 8 months
1
0
0
0
← Newer
1
...
15
16
17
18
19
20
21
...
34
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
Results per page:
10
25
50
100
200