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
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
List overview
Download
Ros-diffs
January 2011
----- 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
ros-diffs@reactos.org
20 participants
336 discussions
Start a n
N
ew thread
[akhaldi] 50334: [CMAKE] - Improve message headers handling.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Jan 8 20:44:41 2011 New Revision: 50334 URL:
http://svn.reactos.org/svn/reactos?rev=50334&view=rev
Log: [CMAKE] - Improve message headers handling. Modified: branches/cmake-bringup/CMakeMacros.cmake branches/cmake-bringup/base/applications/rapps/CMakeLists.txt branches/cmake-bringup/gcc.cmake branches/cmake-bringup/include/reactos/mc/CMakeLists.txt branches/cmake-bringup/msc.cmake Modified: branches/cmake-bringup/CMakeMacros.cmake URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/CMakeMacros.cmake…
============================================================================== --- branches/cmake-bringup/CMakeMacros.cmake [iso-8859-1] (original) +++ branches/cmake-bringup/CMakeMacros.cmake [iso-8859-1] Sat Jan 8 20:44:41 2011 @@ -268,3 +268,19 @@ macro(add_dependency_footer) file(APPEND ${REACTOS_BINARY_DIR}/dependencies.graphml " </graph>\n</graphml>\n") endmacro() + +macro(add_message_headers) + foreach(_in_FILE ${ARGN}) + get_filename_component(FILE ${_in_FILE} NAME_WE) + macro_mc(${FILE}) + add_custom_command( + OUTPUT ${REACTOS_BINARY_DIR}/include/reactos/${FILE}.rc ${REACTOS_BINARY_DIR}/include/reactos/${FILE}.h + COMMAND ${COMMAND_MC} + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}.mc) + set_source_files_properties( + ${REACTOS_BINARY_DIR}/include/reactos/${FILE}.h ${REACTOS_BINARY_DIR}/include/reactos/${FILE}.rc + PROPERTIES GENERATED TRUE) + add_custom_target(${FILE} ALL DEPENDS ${REACTOS_BINARY_DIR}/include/reactos/${FILE}.h ${REACTOS_BINARY_DIR}/include/reactos/${FILE}.rc) + endforeach() +endmacro() + Modified: branches/cmake-bringup/base/applications/rapps/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/base/applications…
============================================================================== --- branches/cmake-bringup/base/applications/rapps/CMakeLists.txt [iso-8859-1] (original) +++ branches/cmake-bringup/base/applications/rapps/CMakeLists.txt [iso-8859-1] Sat Jan 8 20:44:41 2011 @@ -19,8 +19,10 @@ winmain.c rapps.rc) -include_directories(${CMAKE_CURRENT_BINARY_DIR}) -include_directories(${REACTOS_BINARY_DIR}/include/reactos) +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${REACTOS_BINARY_DIR}/include/reactos) + set_rc_compiler() add_executable(rapps ${SOURCE}) @@ -29,40 +31,5 @@ add_importlibs(rapps advapi32 comctl32 gdi32 urlmon user32 shell32 shlwapi kernel32 msvcrt ntdll) add_dependencies(rapps rappsmsg) - -#FIXME : move this to cmakemacros + gcc/msvc.cmake - -if(MSVC) -MACRO(MACRO_MC FILE) - set (COMMAND_MC mc -r ${REACTOS_BINARY_DIR}/include/reactos -h ${REACTOS_BINARY_DIR}/include/reactos ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}.mc) -ENDMACRO() -else() -MACRO(MACRO_MC FILE) - set(COMMAND_MC ${MINGW_PREFIX}windmc -A -b ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}.mc -r ${REACTOS_BINARY_DIR}/include/reactos -h ${REACTOS_BINARY_DIR}/include/reactos) -ENDMACRO() -endif() - -MACRO (MACRO_ADD_MESSAGE_HEADERS) - - FOREACH(_in_FILE ${ARGN}) - - get_filename_component(FILE ${_in_FILE} NAME_WE) - MACRO_MC(${FILE}) - add_custom_command( - OUTPUT ${REACTOS_BINARY_DIR}/include/reactos/${FILE}.rc ${REACTOS_BINARY_DIR}/include/reactos/${FILE}.h - COMMAND ${COMMAND_MC} - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}.mc - ) - set_source_files_properties( - ${REACTOS_BINARY_DIR}/include/reactos/${FILE}.h ${REACTOS_BINARY_DIR}/include/reactos/${FILE}.rc - PROPERTIES GENERATED TRUE - ) - add_custom_target(${FILE} ALL DEPENDS ${REACTOS_BINARY_DIR}/include/reactos/${FILE}.h ${REACTOS_BINARY_DIR}/include/reactos/${FILE}.rc) - - ENDFOREACH(_in_FILE ${ARGN}) - -ENDMACRO (MACRO_ADD_MESSAGE_HEADERS) - -MACRO_ADD_MESSAGE_HEADERS(rappsmsg.mc) - +add_message_headers(rappsmsg.mc) add_cab_target(rapps 1) Modified: branches/cmake-bringup/gcc.cmake URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/gcc.cmake?rev=503…
============================================================================== --- branches/cmake-bringup/gcc.cmake [iso-8859-1] (original) +++ branches/cmake-bringup/gcc.cmake [iso-8859-1] Sat Jan 8 20:44:41 2011 @@ -273,6 +273,10 @@ list(APPEND SOURCE ${CMAKE_CURRENT_BINARY_DIR}/${_file}_stubs.c) endmacro() +macro(macro_mc FILE) + set(COMMAND_MC ${MINGW_PREFIX}windmc -A -b ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}.mc -r ${REACTOS_BINARY_DIR}/include/reactos -h ${REACTOS_BINARY_DIR}/include/reactos) +endmacro() + #pseh lib, needed with mingw set(PSEH_LIB "pseh") Modified: branches/cmake-bringup/include/reactos/mc/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/include/reactos/m…
============================================================================== --- branches/cmake-bringup/include/reactos/mc/CMakeLists.txt [iso-8859-1] (original) +++ branches/cmake-bringup/include/reactos/mc/CMakeLists.txt [iso-8859-1] Sat Jan 8 20:44:41 2011 @@ -1,34 +1,3 @@ - -if(MSVC) -macro(MACRO_MC FILE) - set (COMMAND_MC mc -r ${REACTOS_BINARY_DIR}/include/reactos -h ${REACTOS_BINARY_DIR}/include/reactos ${REACTOS_SOURCE_DIR}/include/reactos/mc/${FILE}.mc) -endmacro() -else() -macro(MACRO_MC FILE) - set(COMMAND_MC ${MINGW_PREFIX}windmc -A -b ${REACTOS_SOURCE_DIR}/include/reactos/mc/${FILE}.mc -r ${REACTOS_BINARY_DIR}/include/reactos -h ${REACTOS_BINARY_DIR}/include/reactos) -endmacro() -endif() - -macro (MACRO_ADD_MESSAGE_HEADERS) - - foreach(_in_FILE ${ARGN}) - - get_filename_component(FILE ${_in_FILE} NAME_WE) - MACRO_MC(${FILE}) - add_custom_command( - OUTPUT ${REACTOS_BINARY_DIR}/include/reactos/${FILE}.rc ${REACTOS_BINARY_DIR}/include/reactos/${FILE}.h - COMMAND ${COMMAND_MC} - DEPENDS ${REACTOS_SOURCE_DIR}/include/reactos/mc/${FILE}.mc - ) - set_source_files_properties( - ${REACTOS_BINARY_DIR}/include/reactos/${FILE}.h ${REACTOS_BINARY_DIR}/include/reactos/${FILE}.rc - PROPERTIES GENERATED TRUE - ) - add_custom_target(${FILE} ALL DEPENDS ${REACTOS_BINARY_DIR}/include/reactos/${FILE}.h ${REACTOS_BINARY_DIR}/include/reactos/${FILE}.rc) - - endforeach(_in_FILE ${ARGN}) - -endmacro (MACRO_ADD_MESSAGE_HEADERS) list(APPEND SOURCE bugcodes.mc @@ -36,4 +5,5 @@ neteventmsg.mc ntstatus.mc pciclass.mc) -MACRO_ADD_MESSAGE_HEADERS(${SOURCE}) + +add_message_headers(${SOURCE}) Modified: branches/cmake-bringup/msc.cmake URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/msc.cmake?rev=503…
============================================================================== --- branches/cmake-bringup/msc.cmake [iso-8859-1] (original) +++ branches/cmake-bringup/msc.cmake [iso-8859-1] Sat Jan 8 20:44:41 2011 @@ -204,6 +204,10 @@ spec2def(${_dllname} ${_spec_file}) endmacro() +macro(macro_mc FILE) + set(COMMAND_MC mc -r ${REACTOS_BINARY_DIR}/include/reactos -h ${REACTOS_BINARY_DIR}/include/reactos ${REACTOS_SOURCE_DIR}/include/reactos/mc/${FILE}.mc) +endmacro() + file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/importlibs) #pseh workaround
13 years, 11 months
1
0
0
0
[akhaldi] 50333: [CMAKE] - Prevent cmake from escaping preprocessor definition values added via add_definitions. - Fix a FIXME in oleaut32 and urlmon builds.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Jan 8 20:01:33 2011 New Revision: 50333 URL:
http://svn.reactos.org/svn/reactos?rev=50333&view=rev
Log: [CMAKE] - Prevent cmake from escaping preprocessor definition values added via add_definitions. - Fix a FIXME in oleaut32 and urlmon builds. Modified: branches/cmake-bringup/CMakeLists.txt branches/cmake-bringup/dll/win32/oleaut32/CMakeLists.txt branches/cmake-bringup/dll/win32/urlmon/CMakeLists.txt Modified: branches/cmake-bringup/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/CMakeLists.txt?re…
============================================================================== --- branches/cmake-bringup/CMakeLists.txt [iso-8859-1] (original) +++ branches/cmake-bringup/CMakeLists.txt [iso-8859-1] Sat Jan 8 20:01:33 2011 @@ -1,6 +1,9 @@ cmake_minimum_required(VERSION 2.6) project(REACTOS) + +# Don't escape preprocessor definition values added via add_definitions +cmake_policy(SET CMP0005 OLD) if(NOT ARCH) set(ARCH i386) Modified: branches/cmake-bringup/dll/win32/oleaut32/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/oleaut3…
============================================================================== --- branches/cmake-bringup/dll/win32/oleaut32/CMakeLists.txt [iso-8859-1] (original) +++ branches/cmake-bringup/dll/win32/oleaut32/CMakeLists.txt [iso-8859-1] Sat Jan 8 20:01:33 2011 @@ -24,9 +24,7 @@ remove_definitions(-D_WIN32_WINNT=0x502) add_definitions(-D_WIN32_WINNT=0x600) -#FIXME: this should be quotes enclosed -add_definitions(-DPROXY_CLSID_IS={0xb196b286,0xbab4,0x101a,{0xb6,0x9c,0x00,0xaa,0x00,0x34,0x1d,0x07}}) -#add_definitions(-DPROXY_CLSID_IS="{0xb196b286,0xbab4,0x101a,{0xb6,0x9c,0x00,0xaa,0x00,0x34,0x1d,0x07}}") +add_definitions(-DPROXY_CLSID_IS="{0xb196b286,0xbab4,0x101a,{0xb6,0x9c,0x00,0xaa,0x00,0x34,0x1d,0x07}}") add_definitions( -D__WINESRC__ Modified: branches/cmake-bringup/dll/win32/urlmon/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/urlmon/…
============================================================================== --- branches/cmake-bringup/dll/win32/urlmon/CMakeLists.txt [iso-8859-1] (original) +++ branches/cmake-bringup/dll/win32/urlmon/CMakeLists.txt [iso-8859-1] Sat Jan 8 20:01:33 2011 @@ -66,9 +66,7 @@ -DREGISTER_PROXY_DLL -D_URLMON_) -# FIXME : this should be quotes enclosed -add_definitions(-DPROXY_CLSID_IS={0x79EAC9F1,0xBAF9,0x11CE,{0x8C,0x82,0x00,0xAA,0x00,0x4B,0xA9,0x0B}}) -#add_definitions(-DPROXY_CLSID_IS="{0x79EAC9F1,0xBAF9,0x11CE,{0x8C,0x82,0x00,0xAA,0x00,0x4B,0xA9,0x0B}}") +add_definitions(-DPROXY_CLSID_IS="{0x79EAC9F1,0xBAF9,0x11CE,{0x8C,0x82,0x00,0xAA,0x00,0x4B,0xA9,0x0B}}") add_cab_target(urlmon 1) add_importlib_target(urlmon.spec)
13 years, 11 months
1
0
0
0
[tkreuzer] 50332: {GDI32] Check paramters in CombineTransform
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sat Jan 8 19:24:29 2011 New Revision: 50332 URL:
http://svn.reactos.org/svn/reactos?rev=50332&view=rev
Log: {GDI32] Check paramters in CombineTransform Modified: trunk/reactos/dll/win32/gdi32/objects/coord.c Modified: trunk/reactos/dll/win32/gdi32/objects/coord.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/co…
============================================================================== --- trunk/reactos/dll/win32/gdi32/objects/coord.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/gdi32/objects/coord.c [iso-8859-1] Sat Jan 8 19:24:29 2011 @@ -66,6 +66,9 @@ const XFORM *pxf2) { XFORM xformTmp; + + /* Check paramters */ + if (!pxfResult || !pxf1 || !pxf2) return FALSE; /* Do matrix multiplication */ xformTmp.eM11 = pxf1->eM11 * pxf2->eM11 + pxf1->eM12 * pxf2->eM21;
13 years, 11 months
1
0
0
0
[tkreuzer] 50331: [GDI32_APITEST] Remove the stuff that shouldn't have been comitted.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sat Jan 8 19:20:20 2011 New Revision: 50331 URL:
http://svn.reactos.org/svn/reactos?rev=50331&view=rev
Log: [GDI32_APITEST] Remove the stuff that shouldn't have been comitted. Modified: trunk/rostests/apitests/gdi32/CombineTransform.c Modified: trunk/rostests/apitests/gdi32/CombineTransform.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/gdi32/CombineTra…
============================================================================== --- trunk/rostests/apitests/gdi32/CombineTransform.c [iso-8859-1] (original) +++ trunk/rostests/apitests/gdi32/CombineTransform.c [iso-8859-1] Sat Jan 8 19:20:20 2011 @@ -12,76 +12,6 @@ #include <reactos/win32k/ntgdityp.h> #include <reactos/win32k/ntgdihdl.h> -#define MAX_OFFSET 4294967040.0 - -BOOL -WINAPI -CombineTransform( - LPXFORM pxfResult, - const XFORM *pxf1, - const XFORM *pxf2) -{ - XFORM xformTmp; - - /* Do matrix multiplication */ - xformTmp.eM11 = pxf1->eM11 * pxf2->eM11 + pxf1->eM12 * pxf2->eM21; - xformTmp.eM12 = pxf1->eM11 * pxf2->eM12 + pxf1->eM12 * pxf2->eM22; - xformTmp.eM21 = pxf1->eM21 * pxf2->eM11 + pxf1->eM22 * pxf2->eM21; - xformTmp.eM22 = pxf1->eM21 * pxf2->eM12 + pxf1->eM22 * pxf2->eM22; - xformTmp.eDx = pxf1->eDx * pxf2->eM11 + pxf1->eDy * pxf2->eM21 + pxf2->eDx; - xformTmp.eDy = pxf1->eDx * pxf2->eM12 + pxf1->eDy * pxf2->eM22 + pxf2->eDy; - -#if 0 - ok(pxf1->eM11 * pxf2->eM11 == pxf2->eM11 * pxf1->eM11, "1: %f, %f -> %f, %f\n", - pxf1->eM11, pxf2->eM11, pxf1->eM11 * pxf2->eM11, pxf2->eM11 * pxf1->eM11); - ok(pxf1->eM11 * pxf2->eM12 == pxf2->eM12 * pxf1->eM11, "2: %f, %f -> %f, %f\n", - pxf1->eM11, pxf2->eM12, pxf1->eM11 * pxf2->eM12, pxf2->eM12 * pxf1->eM11); - ok(pxf1->eM21 * pxf2->eM11 == pxf2->eM11 * pxf1->eM21, "3\n"); - ok(pxf1->eM21 * pxf2->eM12 == pxf2->eM12 * pxf1->eM21, "4\n"); - - ok(pxf1->eM12 * pxf2->eM21 == pxf2->eM21 * pxf1->eM12, "5\n"); - ok(pxf1->eM12 * pxf2->eM22 == pxf2->eM22 * pxf1->eM12, "6\n"); - ok(pxf1->eM22 * pxf2->eM21 == pxf2->eM21 * pxf1->eM22, "7\n"); - ok(pxf1->eM22 * pxf2->eM22 == pxf2->eM22 * pxf1->eM22, "8\n"); -#endif - - *pxfResult = xformTmp; - - /* windows compatibility fixups */ - if (_isnan(xformTmp.eM12)) - { - if (pxf1->eM11 == 0 || pxf2->eM12 == 0) pxfResult->eM12 = 0.; - } - - if (_isnan(xformTmp.eM21)) pxfResult->eM21 = 0.; - if (_isnan(xformTmp.eDx)) pxfResult->eDx = 0.; - if (_isnan(xformTmp.eDy)) pxfResult->eDy = 0.; - - /* Check for invalid offset range */ - if (xformTmp.eDx > MAX_OFFSET || xformTmp.eDx < -MAX_OFFSET || - xformTmp.eDy > MAX_OFFSET || xformTmp.eDy < -MAX_OFFSET) - { - return FALSE; - } - - return TRUE; -} - -void -RandXform(XFORM *pxform) -{ - XFORML *pxforml = (XFORML*)pxform; - - pxforml->eM11 ^= (rand() << 16) ^ (rand() << (rand() % 16)) ^ rand(); - pxforml->eM12 ^= (rand() << 16) ^ (rand() << (rand() % 16)) ^ rand(); - pxforml->eM21 ^= (rand() << 16) ^ (rand() << (rand() % 16)) ^ rand(); - pxforml->eM22 ^= (rand() << 16) ^ (rand() << (rand() % 16)) ^ rand(); - pxforml->eDx ^= (rand() << 16) ^ (rand() << (rand() % 16)) ^ rand(); - pxforml->eDy ^= (rand() << 16) ^ (rand() << (rand() % 16)) ^ rand(); - - -} - void Test_CombineTransform() { XFORM xform1, xform2, xform3;
13 years, 11 months
1
0
0
0
[tkreuzer] 50330: [GDI32] - Move EFLOAT handling in seperate file, its x86 specific - Implement CombineTransform fully in usermode instead of forwarding to NtGdiCombineTransform - Implement MatrixT...
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sat Jan 8 19:06:38 2011 New Revision: 50330 URL:
http://svn.reactos.org/svn/reactos?rev=50330&view=rev
Log: [GDI32] - Move EFLOAT handling in seperate file, its x86 specific - Implement CombineTransform fully in usermode instead of forwarding to NtGdiCombineTransform - Implement MatrixToXForm - Implement GdiTransformPoints Added: trunk/reactos/dll/win32/gdi32/objects/efloat.c (with props) Modified: trunk/reactos/dll/win32/gdi32/gdi32.rbuild trunk/reactos/dll/win32/gdi32/gdi32.spec trunk/reactos/dll/win32/gdi32/include/gdi32p.h trunk/reactos/dll/win32/gdi32/objects/coord.c Modified: trunk/reactos/dll/win32/gdi32/gdi32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/gdi32.rbui…
============================================================================== --- trunk/reactos/dll/win32/gdi32/gdi32.rbuild [iso-8859-1] (original) +++ trunk/reactos/dll/win32/gdi32/gdi32.rbuild [iso-8859-1] Sat Jan 8 19:06:38 2011 @@ -31,6 +31,9 @@ <file>brush.c</file> <file>coord.c</file> <file>dc.c</file> + <if property="ARCH" value="i386"> + <file>efloat.c</file> + </if> <file>eng.c</file> <file>enhmfile.c</file> <file>font.c</file> Modified: trunk/reactos/dll/win32/gdi32/gdi32.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/gdi32.spec…
============================================================================== --- trunk/reactos/dll/win32/gdi32/gdi32.spec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/gdi32/gdi32.spec [iso-8859-1] Sat Jan 8 19:06:38 2011 @@ -32,7 +32,7 @@ @ stdcall ColorCorrectPalette(ptr ptr long long) @ stdcall ColorMatchToTarget(ptr ptr long) @ stdcall CombineRgn(long long long long) -@ stdcall CombineTransform(ptr ptr ptr) NtGdiCombineTransform +@ stdcall CombineTransform(ptr ptr ptr) @ stdcall CopyEnhMetaFileA(long str) @ stdcall CopyEnhMetaFileW(long wstr) @ stdcall CopyMetaFileA(long str) @@ -285,7 +285,7 @@ @ stdcall GdiEntry9(ptr ptr ptr ptr ptr ptr) @ stdcall GdiFixUpHandle(ptr) @ stdcall GdiFlush() -@ stdcall GdiFullscreenControl(ptr ptr long ptr ptr) NtGdiFullscreenControl +@ stdcall GdiFullscreenControl(ptr ptr long ptr ptr) NtGdiFullscreenControl @ stdcall GdiGetBatchLimit() @ stdcall GdiGetBitmapBitsSize(ptr) @ stdcall GdiGetCharDimensions(long ptr ptr) @@ -299,7 +299,7 @@ @ stdcall GdiGetPageHandle(ptr long ptr) @ stdcall GdiGetSpoolFileHandle(wstr ptr wstr) @ stdcall GdiGetSpoolMessage(ptr long ptr long) NtGdiGetSpoolMessage -@ stdcall GdiGradientFill(long ptr long ptr long long) +@ stdcall GdiGradientFill(long ptr long ptr long long) @ stdcall GdiInitSpool() NtGdiInitSpool @ stdcall GdiInitializeLanguagePack(long) @ stdcall GdiIsMetaFileDC(long) Modified: trunk/reactos/dll/win32/gdi32/include/gdi32p.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/include/gd…
============================================================================== --- trunk/reactos/dll/win32/gdi32/include/gdi32p.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/gdi32/include/gdi32p.h [iso-8859-1] Sat Jan 8 19:06:38 2011 @@ -292,7 +292,6 @@ BOOL FASTCALL EndPagePrinterEx(PVOID,HANDLE); BOOL FASTCALL LoadTheSpoolerDrv(VOID); - FORCEINLINE PVOID GdiAllocBatchCommand( @@ -389,4 +388,33 @@ return pdcattr; } +#ifdef _M_IX86 +FLOATL FASTCALL EFtoF(EFLOAT_S * efp); +#define FOtoF(pfo) EFtoF((EFLOAT_S*)pfo) +#else +#define FOtoF(pfo) (*(pfo)) +#endif + +/* This is an inlined version of lrintf. */ +FORCEINLINE +int +_lrintf(float f) +{ +#if defined(_M_IX86) && defined(__GNUC__) + int ret; + __asm__ __volatile__ ("fistpl %0" : "=m" (ret) : "t" (f) : "st"); + return ret; +#elif defined(_M_IX86) && defined(_MSC_VER) + int ret; + __asm + { + fld f; + fistp ret; + } +#else + /* slow, but portable */ + return (int)floor(x >= 0 ? x+0.5 : x-0.5); +#endif +} + /* EOF */ Modified: trunk/reactos/dll/win32/gdi32/objects/coord.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/co…
============================================================================== --- trunk/reactos/dll/win32/gdi32/objects/coord.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/gdi32/objects/coord.c [iso-8859-1] Sat Jan 8 19:06:38 2011 @@ -1,145 +1,152 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS System Libraries + * FILE: dll/gdi32/objects/coord.c + * PURPOSE: Functions for coordinate transformation + * PROGRAMMER: + */ #include "precomp.h" -/* the following deal with IEEE single-precision numbers */ -#define EXCESS 126L -#define SIGNBIT 0x80000000L -#define SIGN(fp) ((fp) & SIGNBIT) -#define EXP(fp) (((fp) >> 23L) & 0xFF) -#define MANT(fp) ((fp) & 0x7FFFFFL) -#define PACK(s,e,m) ((s) | ((e) << 23L) | (m)) - -// Sames as lrintf. -#ifdef __GNUC__ -#define FLOAT_TO_INT(in,out) \ - __asm__ __volatile__ ("fistpl %0" : "=m" (out) : "t" (in) : "st"); -#else -#define FLOAT_TO_INT(in,out) \ - __asm fld in; \ - __asm fistp out; -#endif - -LONG -FASTCALL -EFtoF( EFLOAT_S * efp) -{ - long Mant, Exp, Sign = 0; - - if (!efp->lMant) return 0; - - Mant = efp->lMant; - Exp = efp->lExp; - Sign = SIGN(Mant); - -//// M$ storage emulation - if( Sign ) Mant = -Mant; - Mant = ((Mant & 0x3fffffff) >> 7); - Exp += (EXCESS-1); -//// - Mant = MANT(Mant); - return PACK(Sign, Exp, Mant); -} - -VOID -FASTCALL -FtoEF( EFLOAT_S * efp, FLOATL f) -{ - long Mant, Exp, Sign = 0; - gxf_long worker; - -#ifdef _X86_ - worker.l = f; // It's a float stored in a long. -#else - worker.f = f; -#endif - - Exp = EXP(worker.l); - Mant = MANT(worker.l); - if (SIGN(worker.l)) Sign = -1; -//// M$ storage emulation - Mant = ((Mant << 7) | 0x40000000); - Mant ^= Sign; - Mant -= Sign; - Exp -= (EXCESS-1); -//// - efp->lMant = Mant; - efp->lExp = Exp; -} - - -VOID FASTCALL -CoordCnvP(MATRIX_S * mx, LPPOINT Point) -{ +/* Currently we use a MATRIX inside the DC_ATTR containing the + coordinate transformations, while we deal with XFORM structures + internally. If we move all coordinate transformation to gdi32, + we might as well have an XFORM structure in the DC_ATTR. */ +void +MatrixToXForm(XFORM *pxform, const MATRIX *pmx) +{ + XFORML *pxforml = (XFORML*)pxform; + pxforml->eM11 = FOtoF(&pmx->efM11); + pxforml->eM12 = FOtoF(&pmx->efM12); + pxforml->eM21 = FOtoF(&pmx->efM21); + pxforml->eM22 = FOtoF(&pmx->efM22); + pxforml->eDx = FOtoF(&pmx->efDx); + pxforml->eDy = FOtoF(&pmx->efDy); +} + +void +GdiTransformPoints2( + XFORM *pxform, + PPOINT pptOut, + PPOINT pptIn, + ULONG nCount) +{ + ULONG i; FLOAT x, y; - gxf_long a, b, c; - - x = (FLOAT)Point->x; - y = (FLOAT)Point->y; - - a.l = EFtoF( &mx->efM11 ); - b.l = EFtoF( &mx->efM21 ); - c.l = EFtoF( &mx->efDx ); - x = x * a.f + y * b.f + c.f; - - a.l = EFtoF( &mx->efM12 ); - b.l = EFtoF( &mx->efM22 ); - c.l = EFtoF( &mx->efDy ); - y = x * a.f + y * b.f + c.f; - - FLOAT_TO_INT(x, Point->x ); - FLOAT_TO_INT(y, Point->y ); -} - - -BOOL -WINAPI -DPtoLP ( HDC hDC, LPPOINT Points, INT Count ) + + for (i = 0; i < nCount; i++) + { + x = pptIn[i].x * pxform->eM11 + pptIn[i].y * pxform->eM12 + pxform->eDx; + pptOut[i].x = _lrintf(x); + y = pptIn[i].x * pxform->eM21 + pptIn[i].y * pxform->eM22 + pxform->eDy; + pptOut[i].y = _lrintf(y); + } +} + +FORCEINLINE +void +GdiTransformPoints( + MATRIX *pmx, + PPOINT pptOut, + PPOINT pptIn, + ULONG nCount) +{ + XFORM xform; + + MatrixToXForm(&xform, pmx); + GdiTransformPoints2(&xform, pptOut, pptIn, nCount); +} + +#define MAX_OFFSET 4294967040.0 + +BOOL +WINAPI +CombineTransform( + LPXFORM pxfResult, + const XFORM *pxf1, + const XFORM *pxf2) +{ + XFORM xformTmp; + + /* Do matrix multiplication */ + xformTmp.eM11 = pxf1->eM11 * pxf2->eM11 + pxf1->eM12 * pxf2->eM21; + xformTmp.eM12 = pxf1->eM11 * pxf2->eM12 + pxf1->eM12 * pxf2->eM22; + xformTmp.eM21 = pxf1->eM21 * pxf2->eM11 + pxf1->eM22 * pxf2->eM21; + xformTmp.eM22 = pxf1->eM21 * pxf2->eM12 + pxf1->eM22 * pxf2->eM22; + xformTmp.eDx = pxf1->eDx * pxf2->eM11 + pxf1->eDy * pxf2->eM21 + pxf2->eDx; + xformTmp.eDy = pxf1->eDx * pxf2->eM12 + pxf1->eDy * pxf2->eM22 + pxf2->eDy; + + *pxfResult = xformTmp; +#if 0 + /* windows compatibility fixups (needs more work) */ + if (_isnan(xformTmp.eM12)) + { + if (pxf1->eM11 == 0 || pxf2->eM12 == 0) pxfResult->eM12 = 0.; + } +#endif + /* Check for invalid offset ranges */ + if (xformTmp.eDx > MAX_OFFSET || xformTmp.eDx < -MAX_OFFSET || + xformTmp.eDy > MAX_OFFSET || xformTmp.eDy < -MAX_OFFSET) + { + return FALSE; + } + + return TRUE; +} + +BOOL +WINAPI +DPtoLP(HDC hdc, LPPOINT lpPoints, INT nCount) { #if 0 INT i; - PDC_ATTR Dc_Attr; - - if (!GdiGetHandleUserData((HGDIOBJ) hDC, GDI_OBJECT_TYPE_DC, (PVOID) &Dc_Attr)) return FALSE; - - if (Dc_Attr->flXform & ( DEVICE_TO_WORLD_INVALID | // Force a full recalibration! - PAGE_XLATE_CHANGED | // Changes or Updates have been made, - PAGE_EXTENTS_CHANGED | // do processing in kernel space. - WORLD_XFORM_CHANGED )) -#endif - return NtGdiTransformPoints( hDC, Points, Points, Count, GdiDpToLp); // DPtoLP mode. -#if 0 - else - { - for ( i = 0; i < Count; i++ ) - CoordCnvP ( &Dc_Attr->mxDeviceToWorld, &Points[i] ); - } - return TRUE; -#endif -} - - -BOOL -WINAPI -LPtoDP ( HDC hDC, LPPOINT Points, INT Count ) + PDC_ATTR pdcattr; + + pdcattr = GdiGetDcAttr(hdc); + if (!pdcattr) + { + SetLastError(ERROR_INVALID_HANDLE); + return FALSE; + } + + if (pdcattr->flXform & ANY_XFORM_CHANGES) + { + GdiFixupTransforms(pdcattr); + } + + // FIXME: can this fail on Windows? + GdiTransformPoints(&pdcattr->mxDeviceToWorld, lpPoints, lpPoints, nCount); + + return TRUE; +#endif + return NtGdiTransformPoints(hdc, lpPoints, lpPoints, nCount, GdiDpToLp); +} + +BOOL +WINAPI +LPtoDP(HDC hdc, LPPOINT lpPoints, INT nCount) { #if 0 INT i; - PDC_ATTR Dc_Attr; - - if (!GdiGetHandleUserData((HGDIOBJ) hDC, GDI_OBJECT_TYPE_DC, (PVOID) &Dc_Attr)) return FALSE; - - if (Dc_Attr->flXform & ( PAGE_XLATE_CHANGED | // Check for Changes and Updates - PAGE_EXTENTS_CHANGED | - WORLD_XFORM_CHANGED )) -#endif - return NtGdiTransformPoints( hDC, Points, Points, Count, GdiLpToDp); // LPtoDP mode -#if 0 - else - { - for ( i = 0; i < Count; i++ ) - CoordCnvP ( &Dc_Attr->mxWorldToDevice, &Points[i] ); - } - return TRUE; -#endif + PDC_ATTR pdcattr; + + pdcattr = GdiGetDcAttr(hdc); + if (!pdcattr) + { + SetLastError(ERROR_INVALID_HANDLE); + return FALSE; + } + + if (pdcattr->flXform & ANY_XFORM_CHANGES) + { + GdiFixupTransforms(pdcattr); + } + + // FIXME: can this fail on Windows? + GdiTransformPoints(&pdcattr->mxWorldToDevice, lpPoints, lpPoints, nCount); + + return TRUE; +#endif + return NtGdiTransformPoints(hdc, lpPoints, lpPoints, nCount, GdiLpToDp); } /* @@ -185,9 +192,26 @@ */ BOOL WINAPI -GetWorldTransform( HDC hDC, LPXFORM lpXform ) -{ - return NtGdiGetTransform( hDC, GdiWorldSpaceToPageSpace, lpXform); +GetWorldTransform(HDC hDC, LPXFORM lpXform) +{ +#if 0 + PDC_ATTR pdcattr; + + pdcattr = GdiGetDcAttr(hdc); + if (!pdcattr) + { + SetLastError(ERROR_INVALID_HANDLE); + return FALSE; + } + + if (pdcattr->flXform & ANY_XFORM_INVALID) + { + GdiFixupTransforms(pdcattr); + } + + MatrixToXForm(lpXform, &pdcattr->mxWorldToDevice); +#endif + return NtGdiGetTransform(hDC, GdiWorldSpaceToPageSpace, lpXform); } Added: trunk/reactos/dll/win32/gdi32/objects/efloat.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/ef…
============================================================================== --- trunk/reactos/dll/win32/gdi32/objects/efloat.c (added) +++ trunk/reactos/dll/win32/gdi32/objects/efloat.c [iso-8859-1] Sat Jan 8 19:06:38 2011 @@ -1,0 +1,62 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS System Libraries + * FILE: dll/gdi32/objects/coord.c + * PURPOSE: Functions to convert between FLOAT and EFLOAT + * PROGRAMMER: James Tabor + */ +#include "precomp.h" + +/* the following deal with IEEE single-precision numbers */ +#define EXCESS 126L +#define SIGNBIT 0x80000000L +#define SIGN(fp) ((fp) & SIGNBIT) +#define EXP(fp) (((fp) >> 23L) & 0xFF) +#define MANT(fp) ((fp) & 0x7FFFFFL) +#define PACK(s,e,m) ((s) | ((e) << 23L) | (m)) + +FLOATL +FASTCALL +EFtoF(EFLOAT_S * efp) +{ + ULONG Mant, Exp, Sign; + + if (!efp->lMant) return 0; + + Mant = efp->lMant; + Exp = efp->lExp; + Sign = SIGN(Mant); + + if (Sign) Mant = -Mant; + Mant >>= 7; + Exp += (EXCESS-1); + + Mant = MANT(Mant); + return PACK(Sign, Exp, Mant); +} + +VOID +FASTCALL +FtoEF( EFLOAT_S * efp, FLOATL f) +{ + ULONG Mant, Exp, Sign = 0; + gxf_long worker; + +#ifdef _X86_ + worker.l = f; // It's a float stored in a long. +#else + worker.f = f; +#endif + + Exp = EXP(worker.l); + Mant = MANT(worker.l); + if (SIGN(worker.l)) Sign = -1; + + Mant = ((Mant << 7) | 0x40000000); + Mant ^= Sign; + Mant -= Sign; + Exp -= (EXCESS-1); + + efp->lMant = Mant; + efp->lExp = Exp; +} Propchange: trunk/reactos/dll/win32/gdi32/objects/efloat.c ------------------------------------------------------------------------------ svn:eol-style = native
13 years, 11 months
1
0
0
0
[tkreuzer] 50329: [GDI32_APITEST] Add tests for CombineTransform and MaskBlt
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sat Jan 8 18:56:38 2011 New Revision: 50329 URL:
http://svn.reactos.org/svn/reactos?rev=50329&view=rev
Log: [GDI32_APITEST] Add tests for CombineTransform and MaskBlt Added: trunk/rostests/apitests/gdi32/CombineTransform.c (with props) trunk/rostests/apitests/gdi32/MaskBlt.c (with props) Modified: trunk/rostests/apitests/gdi32/gdi32_apitest.rbuild trunk/rostests/apitests/gdi32/testlist.c Added: trunk/rostests/apitests/gdi32/CombineTransform.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/gdi32/CombineTra…
============================================================================== --- trunk/rostests/apitests/gdi32/CombineTransform.c (added) +++ trunk/rostests/apitests/gdi32/CombineTransform.c [iso-8859-1] Sat Jan 8 18:56:38 2011 @@ -1,0 +1,274 @@ +/* + * PROJECT: ReactOS api tests + * LICENSE: GPL - See COPYING in the top level directory + * PURPOSE: Test for CreatePen + * PROGRAMMERS: Timo Kreuzer + */ + +#include <stdio.h> +#include <wine/test.h> +#include <windows.h> +#include <winddi.h> +#include <reactos/win32k/ntgdityp.h> +#include <reactos/win32k/ntgdihdl.h> + +#define MAX_OFFSET 4294967040.0 + +BOOL +WINAPI +CombineTransform( + LPXFORM pxfResult, + const XFORM *pxf1, + const XFORM *pxf2) +{ + XFORM xformTmp; + + /* Do matrix multiplication */ + xformTmp.eM11 = pxf1->eM11 * pxf2->eM11 + pxf1->eM12 * pxf2->eM21; + xformTmp.eM12 = pxf1->eM11 * pxf2->eM12 + pxf1->eM12 * pxf2->eM22; + xformTmp.eM21 = pxf1->eM21 * pxf2->eM11 + pxf1->eM22 * pxf2->eM21; + xformTmp.eM22 = pxf1->eM21 * pxf2->eM12 + pxf1->eM22 * pxf2->eM22; + xformTmp.eDx = pxf1->eDx * pxf2->eM11 + pxf1->eDy * pxf2->eM21 + pxf2->eDx; + xformTmp.eDy = pxf1->eDx * pxf2->eM12 + pxf1->eDy * pxf2->eM22 + pxf2->eDy; + +#if 0 + ok(pxf1->eM11 * pxf2->eM11 == pxf2->eM11 * pxf1->eM11, "1: %f, %f -> %f, %f\n", + pxf1->eM11, pxf2->eM11, pxf1->eM11 * pxf2->eM11, pxf2->eM11 * pxf1->eM11); + ok(pxf1->eM11 * pxf2->eM12 == pxf2->eM12 * pxf1->eM11, "2: %f, %f -> %f, %f\n", + pxf1->eM11, pxf2->eM12, pxf1->eM11 * pxf2->eM12, pxf2->eM12 * pxf1->eM11); + ok(pxf1->eM21 * pxf2->eM11 == pxf2->eM11 * pxf1->eM21, "3\n"); + ok(pxf1->eM21 * pxf2->eM12 == pxf2->eM12 * pxf1->eM21, "4\n"); + + ok(pxf1->eM12 * pxf2->eM21 == pxf2->eM21 * pxf1->eM12, "5\n"); + ok(pxf1->eM12 * pxf2->eM22 == pxf2->eM22 * pxf1->eM12, "6\n"); + ok(pxf1->eM22 * pxf2->eM21 == pxf2->eM21 * pxf1->eM22, "7\n"); + ok(pxf1->eM22 * pxf2->eM22 == pxf2->eM22 * pxf1->eM22, "8\n"); +#endif + + *pxfResult = xformTmp; + + /* windows compatibility fixups */ + if (_isnan(xformTmp.eM12)) + { + if (pxf1->eM11 == 0 || pxf2->eM12 == 0) pxfResult->eM12 = 0.; + } + + if (_isnan(xformTmp.eM21)) pxfResult->eM21 = 0.; + if (_isnan(xformTmp.eDx)) pxfResult->eDx = 0.; + if (_isnan(xformTmp.eDy)) pxfResult->eDy = 0.; + + /* Check for invalid offset range */ + if (xformTmp.eDx > MAX_OFFSET || xformTmp.eDx < -MAX_OFFSET || + xformTmp.eDy > MAX_OFFSET || xformTmp.eDy < -MAX_OFFSET) + { + return FALSE; + } + + return TRUE; +} + +void +RandXform(XFORM *pxform) +{ + XFORML *pxforml = (XFORML*)pxform; + + pxforml->eM11 ^= (rand() << 16) ^ (rand() << (rand() % 16)) ^ rand(); + pxforml->eM12 ^= (rand() << 16) ^ (rand() << (rand() % 16)) ^ rand(); + pxforml->eM21 ^= (rand() << 16) ^ (rand() << (rand() % 16)) ^ rand(); + pxforml->eM22 ^= (rand() << 16) ^ (rand() << (rand() % 16)) ^ rand(); + pxforml->eDx ^= (rand() << 16) ^ (rand() << (rand() % 16)) ^ rand(); + pxforml->eDy ^= (rand() << 16) ^ (rand() << (rand() % 16)) ^ rand(); + + +} + +void Test_CombineTransform() +{ + XFORM xform1, xform2, xform3; + BOOL ret; + + /* 2 Identity matrices */ + xform1.eM11 = 1.0; + xform1.eM12 = 0; + xform1.eM21 = 0; + xform1.eM22 = 1.0; + xform1.eDx = 0; + xform1.eDy = 0; + xform2 = xform1; + SetLastError(ERROR_SUCCESS); + ret = CombineTransform(&xform3, &xform1, &xform2); + ok(ret == 1, "expected ret = 1, got %d\n", ret); + ok(xform3.eM11 == 1.0, "eM11: Expected 1.0, got %f\n", xform3.eM11); + ok(xform3.eM12 == 0, "eM11: Expected 0, got %f\n", xform3.eM12); + ok(xform3.eM21 == 0, "eM11: Expected 0, got %f\n", xform3.eM21); + ok(xform3.eM22 == 1.0, "eM11: Expected 1.0, got %f\n", xform3.eM22); + ok(xform3.eDx == 0, "eM11: Expected 0, got %f\n", xform3.eDx); + ok(xform3.eDy == 0, "eM11: Expected 0, got %f\n", xform3.eDy); + ok(GetLastError() == ERROR_SUCCESS, "Exected ERROR_SUCCESS, got %ld\n", GetLastError()); + + /* 2 Identity matrices with offsets */ + xform1.eDx = 20.0; + xform1.eDy = -100; + ret = CombineTransform(&xform3, &xform1, &xform2); + ok(ret == 1, "expected ret = 1, got %d\n", ret); + ok(xform3.eM11 == 1.0, "eM11: Expected 1.0, got %f\n", xform3.eM11); + ok(xform3.eM12 == 0, "eM11: Expected 0, got %f\n", xform3.eM12); + ok(xform3.eM21 == 0, "eM11: Expected 0, got %f\n", xform3.eM21); + ok(xform3.eM22 == 1.0, "eM11: Expected 1.0, got %f\n", xform3.eM22); + ok(xform3.eDx == 20.0, "eM11: Expected 20.0, got %f\n", xform3.eDx); + ok(xform3.eDy == -100, "eM11: Expected -100, got %f\n", xform3.eDy); + xform2.eDx = -60.0; + xform2.eDy = -20; + ret = CombineTransform(&xform3, &xform1, &xform2); + ok(ret == 1, "expected ret = 1, got %d\n", ret); + ok(xform3.eDx == -40.0, "eM11: Expected 40.0, got %f\n", xform3.eDx); + ok(xform3.eDy == -120.0, "eM11: Expected -120.0, got %f\n", xform3.eDy); + + /* add some stretching */ + xform2.eM11 = 2; + xform2.eM22 = 4; + ret = CombineTransform(&xform3, &xform1, &xform2); + ok(ret == 1, "expected ret = 1, got %d\n", ret); + ok(xform3.eM11 == 2.0, "eM11: Expected 2.0, got %f\n", xform3.eM11); + ok(xform3.eM12 == 0, "eM11: Expected 0, got %f\n", xform3.eM12); + ok(xform3.eM21 == 0, "eM11: Expected 0, got %f\n", xform3.eM21); + ok(xform3.eM22 == 4.0, "eM11: Expected 4.0, got %f\n", xform3.eM22); + ok(xform3.eDx == -20.0, "eM11: Expected 20.0, got %f\n", xform3.eDx); + ok(xform3.eDy == -420.0, "eM11: Expected 420.0, got %f\n", xform3.eDy); + + /* add some more stretching */ + xform1.eM11 = -2.5; + xform1.eM22 = 0.5; + ret = CombineTransform(&xform3, &xform1, &xform2); + ok(ret == 1, "expected ret = 1, got %d\n", ret); + ok(xform3.eM11 == -5.0, "eM11: Expected -5.0, got %f\n", xform3.eM11); + ok(xform3.eM12 == 0, "eM11: Expected 0, got %f\n", xform3.eM12); + ok(xform3.eM21 == 0, "eM11: Expected 0, got %f\n", xform3.eM21); + ok(xform3.eM22 == 2.0, "eM11: Expected 2.0, got %f\n", xform3.eM22); + ok(xform3.eDx == -20.0, "eM11: Expected 20.0, got %f\n", xform3.eDx); + ok(xform3.eDy == -420.0, "eM11: Expected 420.0, got %f\n", xform3.eDy); + + xform1.eM12 = 2.0; + xform1.eM21 = -0.5; + ret = CombineTransform(&xform3, &xform1, &xform2); + ok(ret == 1, "expected ret = 1, got %d\n", ret); + ok(xform3.eM11 == -5.0, "eM11: Expected -5.0, got %f\n", xform3.eM11); + ok(xform3.eM12 == 8.0, "eM11: Expected 8.0, got %f\n", xform3.eM12); + ok(xform3.eM21 == -1.0, "eM11: Expected -1.0, got %f\n", xform3.eM21); + ok(xform3.eM22 == 2.0, "eM11: Expected 2.0, got %f\n", xform3.eM22); + ok(xform3.eDx == -20.0, "eM11: Expected 20.0, got %f\n", xform3.eDx); + ok(xform3.eDy == -420.0, "eM11: Expected 420.0, got %f\n", xform3.eDy); + + xform2.eM12 = 4.0; + xform2.eM21 = 6.5; + ret = CombineTransform(&xform3, &xform1, &xform2); + ok(ret == 1, "expected ret = 1, got %d\n", ret); + ok(xform3.eM11 == 8.0, "eM11: Expected 8.0, got %f\n", xform3.eM11); + ok(xform3.eM12 == -2.0, "eM11: Expected -2.0, got %f\n", xform3.eM12); + ok(xform3.eM21 == 2.25, "eM11: Expected 2.25, got %f\n", xform3.eM21); + ok(xform3.eM22 == 0.00, "eM11: Expected 0.00, got %f\n", xform3.eM22); + ok(xform3.eDx == -670.0, "eM11: Expected -670.0, got %f\n", xform3.eDx); + ok(xform3.eDy == -340.0, "eM11: Expected -340.0, got %f\n", xform3.eDy); + ret = CombineTransform(&xform3, &xform1, &xform2); + ok(ret == 1, "expected ret = 1, got %d\n", ret); + + xform1.eM11 = 1.; + xform1.eM12 = 0; + xform1.eM21 = 0; + xform1.eM22 = 1.; + xform1.eDx = 0; + xform1.eDy = 0; + xform2 = xform1; + + xform1.eDx = 4294967167.999999761; + ok(xform1.eDx == 4294967040.0, "float rounding error.\n"); + ret = CombineTransform(&xform3, &xform1, &xform2); + ok(ret == 1, "expected ret = 1, got %d\n", ret); + + xform1.eDx = 4294967167.999999762; + ok(xform1.eDx == 4294967296.0, "float rounding error.\n"); + ret = CombineTransform(&xform3, &xform1, &xform2); + ok(ret == 0, "expected ret = 0, got %d\n", ret); + ok(GetLastError() == ERROR_SUCCESS, "Exected ERROR_SUCCESS, got %ld\n", GetLastError()); + + xform1.eDx = -4294967167.999999761; + ok(xform1.eDx == -4294967040.0, "float rounding error.\n"); + ret = CombineTransform(&xform3, &xform1, &xform2); + ok(ret == 1, "expected ret = 1, got %d\n", ret); + + xform1.eDx = -4294967167.999999762; + ok(xform1.eDx == -4294967296.0, "float rounding error.\n"); + ret = CombineTransform(&xform3, &xform1, &xform2); + ok(ret == 0, "expected ret = 0, got %d\n", ret); + ok(GetLastError() == ERROR_SUCCESS, "Exected ERROR_SUCCESS, got %ld\n", GetLastError()); + + xform1.eDx = 0; + xform1.eDy = 4294967167.999999761; + ok(xform1.eDy == 4294967040.0, "float rounding error.\n"); + ret = CombineTransform(&xform3, &xform1, &xform2); + ok(ret == 1, "expected ret = 1, got %d\n", ret); + + xform1.eDy = 4294967167.999999762; + ok(xform1.eDy == 4294967296.0, "float rounding error.\n"); + ret = CombineTransform(&xform3, &xform1, &xform2); + ok(ret == 0, "expected ret = 0, got %d\n", ret); + ok(GetLastError() == ERROR_SUCCESS, "Exected ERROR_SUCCESS, got %ld\n", GetLastError()); + + xform1.eDy = -4294967167.999999761; + ok(xform1.eDy == -4294967040.0, "float rounding error.\n"); + ret = CombineTransform(&xform3, &xform1, &xform2); + ok(ret == 1, "expected ret = 1, got %d\n", ret); + + xform1.eDy = -4294967167.999999762; + ok(xform1.eDy == -4294967296.0, "float rounding error.\n"); + ret = CombineTransform(&xform3, &xform1, &xform2); + ok(ret == 0, "expected ret = 0, got %d\n", ret); + ok(GetLastError() == ERROR_SUCCESS, "Exected ERROR_SUCCESS, got %ld\n", GetLastError()); + + xform1.eDx = 100000.0; + xform2.eM11 = 100000.0; + ret = CombineTransform(&xform3, &xform1, &xform2); + ok(ret == 0, "expected ret = 0, got %d\n", ret); + ok(GetLastError() == ERROR_SUCCESS, "Exected ERROR_SUCCESS, got %ld\n", GetLastError()); + + /* Some undefined values */ + *(DWORD*)&xform1.eM11 = 0xffc00000; // (0.0F/0.0F) + xform1.eM12 = 0; + xform1.eM21 = 0; + *(DWORD*)&xform1.eM22 = 0x7f800000; // (1.0F/0.0F) + xform1.eDx = 0; + xform1.eDy = 0; + xform2 = xform1; + SetLastError(ERROR_SUCCESS); + ret = CombineTransform(&xform3, &xform1, &xform2); + ok(ret == 1, "expected ret = 1, got %d\n", ret); + ok(*(DWORD*)&xform3.eM11 == 0xffc00000, "eM11: Expected 0xffc00000, got 0x%lx\n", *(DWORD*)&xform3.eM11); + ok(xform3.eM12 == 0, "eM12: Expected 0, got %f\n", xform3.eM12); + ok(xform3.eM21 == 0, "eM21: Expected 0, got %f\n", xform3.eM21); + ok(*(DWORD*)&xform3.eM22 == 0x7f800000, "eM22: Expected 0x7f800000, got 0x%lx\n", *(DWORD*)&xform3.eM22); + ok(xform3.eDx == 0, "eDx: Expected 0, got %f\n", xform3.eDx); + ok(xform3.eDy == 0, "eDy: Expected 0, got %f\n", xform3.eDy); + ok(GetLastError() == ERROR_SUCCESS, "Exected ERROR_SUCCESS, got %ld\n", GetLastError()); + + /* Some undefined values */ + xform2.eM11 = 1.; + xform2.eM22 = 1.; + xform2.eM12 = 1.; + xform2.eM21 = 1.; + ret = CombineTransform(&xform3, &xform1, &xform2); + ok(ret == 1, "expected ret = 1, got %d\n", ret); + ok(*(DWORD*)&xform3.eM11 == 0xffc00000, "eM11: Expected 0xffc00000, got 0x%lx\n", *(DWORD*)&xform3.eM11); + ok(*(DWORD*)&xform3.eM12 == 0xffc00000, "eM12: Expected 0xffc00000, got 0x%lx\n", *(DWORD*)&xform3.eM12); + ok(*(DWORD*)&xform3.eM21 == 0x7f800000, "eM21: Expected 0x7f800000, got 0x%lx\n", *(DWORD*)&xform3.eM21); + ok(*(DWORD*)&xform3.eM22 == 0x7f800000, "eM22: Expected 0x7f800000, got 0x%lx\n", *(DWORD*)&xform3.eM22); + ok(xform3.eDx == 0, "eDx: Expected 0, got %f\n", xform3.eDx); + ok(xform3.eDy == 0, "eDy: Expected 0, got %f\n", xform3.eDy); + ok(GetLastError() == ERROR_SUCCESS, "Exected ERROR_SUCCESS, got %ld\n", GetLastError()); + +} + +START_TEST(CombineTransform) +{ + Test_CombineTransform(); +} + Propchange: trunk/rostests/apitests/gdi32/CombineTransform.c ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/rostests/apitests/gdi32/MaskBlt.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/gdi32/MaskBlt.c?…
============================================================================== --- trunk/rostests/apitests/gdi32/MaskBlt.c (added) +++ trunk/rostests/apitests/gdi32/MaskBlt.c [iso-8859-1] Sat Jan 8 18:56:38 2011 @@ -1,0 +1,95 @@ +/* + * PROJECT: ReactOS api tests + * LICENSE: GPL - See COPYING in the top level directory + * PURPOSE: Test for GdiReleaseLocalDC + * PROGRAMMERS: Timo Kreuzer + */ + +#include <stdio.h> +#include <wine/test.h> +#include <windows.h> + +void Test_MaskBlt_1bpp() +{ + HDC hdcDst, hdcSrc; + BITMAPINFO bmi = {{sizeof(BITMAPINFOHEADER), 8, 1, 1, 1, BI_RGB, 0, 10, 10, 0,0}}; + HBITMAP hbmDst, hbmSrc, hbmMsk; + PUCHAR pjBitsDst, pjBitsSrc, pjBitsMsk; + BOOL ret; + + /* Create a dest dc and bitmap */ + hdcDst = CreateCompatibleDC(NULL); + hbmDst = CreateDIBSection(hdcDst, &bmi, DIB_RGB_COLORS, (PVOID*)&pjBitsDst, NULL, 0); + SelectObject(hdcDst, hbmDst); + + /* Create a source dc and bitmap */ + hdcSrc = CreateCompatibleDC(NULL); + hbmSrc = CreateDIBSection(hdcSrc, &bmi, DIB_RGB_COLORS, (PVOID*)&pjBitsSrc, NULL, 0); + SelectObject(hdcSrc, hbmSrc); + + /* Create a 1 bpp mask bitmap */ + hbmMsk = CreateDIBSection(hdcDst, &bmi, DIB_RGB_COLORS, (PVOID*)&pjBitsMsk, NULL, 0); + + /* Do the masking */ + pjBitsDst[0] = 0xAA; + pjBitsSrc[0] = 0xCC; + pjBitsMsk[0] = 0xF0; + ret = MaskBlt(hdcDst, 0, 0, 8, 1, hdcSrc, 0, 0, hbmMsk, 0, 0, MAKEROP4(SRCCOPY, 0xAA0000)); + ok(ret == 1, "MaskBlt failed (%d)\n", ret); + ok (pjBitsDst[0] == 0xCA, "pjBitsDst[0] == 0x%x\n", pjBitsDst[0]); + + pjBitsDst[0] = 0x00; + pjBitsSrc[0] = 0xFF; + pjBitsMsk[0] = 0xF0; + ret = MaskBlt(hdcDst, 0, 0, 8, 1, hdcSrc, 0, 0, hbmMsk, 0, 0, MAKEROP4(SRCCOPY, 0xAA0000)); + ok(ret == 1, "MaskBlt failed (%d)\n", ret); + ok (pjBitsDst[0] == 0xF0, "pjBitsDst[0] == 0x%x\n", pjBitsDst[0]); + + + +} + +void Test_MaskBlt_RGBA() +{ + HDC hdcDst, hdcSrc; + BITMAPINFO bmi1 = {{sizeof(BITMAPINFOHEADER), 8, 1, 1, 1, BI_RGB, 0, 10, 10, 0,0}}; + BITMAPINFO bmi32 = {{sizeof(BITMAPINFOHEADER), 8, 1, 1, 32, BI_RGB, 0, 10, 10, 0,0}}; + HBITMAP hbmDst, hbmSrc, hbmMsk; + PUCHAR pjBitsDst, pjBitsSrc, pjBitsMsk; + BOOL ret; + + /* Create a dest dc and bitmap */ + hdcDst = CreateCompatibleDC(NULL); + hbmDst = CreateDIBSection(hdcDst, &bmi32, DIB_RGB_COLORS, (PVOID*)&pjBitsDst, NULL, 0); + SelectObject(hdcDst, hbmDst); + + /* Create a source dc and bitmap */ + hdcSrc = CreateCompatibleDC(NULL); + hbmSrc = CreateDIBSection(hdcSrc, &bmi32, DIB_RGB_COLORS, (PVOID*)&pjBitsSrc, NULL, 0); + SelectObject(hdcSrc, hbmSrc); + + /* Create a 1 bpp mask bitmap */ + hbmMsk = CreateDIBSection(hdcDst, &bmi1, DIB_RGB_COLORS, (PVOID*)&pjBitsMsk, NULL, 0); + + /* Do the masking */ + pjBitsDst[0] = 0xAA; + pjBitsSrc[0] = 0xCC; + pjBitsMsk[0] = 0xF0; + ret = MaskBlt(hdcDst, 0, 0, 8, 1, hdcSrc, 0, 0, hbmMsk, 0, 0, MAKEROP4(SRCCOPY, 0xAA0000)); + ok(ret == 1, "MaskBlt failed (%d)\n", ret); + ok (pjBitsDst[0] == 0xCA, "pjBitsDst[0] == 0x%x\n", pjBitsDst[0]); + + pjBitsDst[0] = 0x00; + pjBitsSrc[0] = 0xFF; + pjBitsMsk[0] = 0xF0; + ret = MaskBlt(hdcDst, 0, 0, 8, 1, hdcSrc, 0, 0, hbmMsk, 0, 0, MAKEROP4(SRCCOPY, 0xAA0000)); + ok(ret == 1, "MaskBlt failed (%d)\n", ret); + ok (pjBitsDst[0] == 0xF0, "pjBitsDst[0] == 0x%x\n", pjBitsDst[0]); + +} + +START_TEST(MaskBlt) +{ + Test_MaskBlt_1bpp(); +} + Propchange: trunk/rostests/apitests/gdi32/MaskBlt.c ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/rostests/apitests/gdi32/gdi32_apitest.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/gdi32/gdi32_apit…
============================================================================== --- trunk/rostests/apitests/gdi32/gdi32_apitest.rbuild [iso-8859-1] (original) +++ trunk/rostests/apitests/gdi32/gdi32_apitest.rbuild [iso-8859-1] Sat Jan 8 18:56:38 2011 @@ -12,7 +12,7 @@ <file>AddFontResource.c</file> <file>AddFontResourceEx.c</file> <file>BeginPath.c</file> - + <file>CombineTransform.c</file> <file>CreateBitmapIndirect.c</file> <file>CreateCompatibleDC.c</file> <file>CreateFont.c</file> @@ -43,6 +43,7 @@ <file>GetStockObject.c</file> <file>GetTextExtentExPoint.c</file> <file>GetTextFace.c</file> + <file>MaskBlt.c</file> <file>SelectObject.c</file> <file>SetDCPenColor.c</file> <file>SetMapMode.c</file> Modified: trunk/rostests/apitests/gdi32/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/gdi32/testlist.c…
============================================================================== --- trunk/rostests/apitests/gdi32/testlist.c [iso-8859-1] (original) +++ trunk/rostests/apitests/gdi32/testlist.c [iso-8859-1] Sat Jan 8 18:56:38 2011 @@ -8,6 +8,7 @@ extern void func_AddFontResource(void); extern void func_AddFontResourceEx(void); extern void func_BeginPath(void); +extern void func_CombineTransform(void); extern void func_CreateBitmapIndirect(void); extern void func_CreateCompatibleDC(void); extern void func_CreateFont(void); @@ -38,6 +39,7 @@ extern void func_GetStockObject(void); extern void func_GetTextExtentExPoint(void); extern void func_GetTextFace(void); +extern void func_MaskBlt(void); extern void func_SelectObject(void); extern void func_SetDCPenColor(void); extern void func_SetMapMode(void); @@ -50,6 +52,7 @@ { "AddFontResource", func_AddFontResource }, { "AddFontResourceEx", func_AddFontResourceEx }, { "BeginPath", func_BeginPath }, + { "CombineTransform", func_CombineTransform }, { "CreateBitmapIndirect", func_CreateBitmapIndirect }, { "CreateCompatibleDC", func_CreateCompatibleDC }, { "CreateFont", func_CreateFont }, @@ -80,6 +83,7 @@ { "GetStockObject", func_GetStockObject }, { "GetTextExtentExPoint", func_GetTextExtentExPoint }, { "GetTextFace", func_GetTextFace }, + { "MaskBlt", func_MaskBlt }, { "SelectObject", func_SelectObject }, { "SetDCPenColor", func_SetDCPenColor }, { "SetMapMode", func_SetMapMode },
13 years, 11 months
1
0
0
0
[akhaldi] 50328: [CMAKE] - Fix the browseui bulgarian translation file name.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Jan 8 14:11:37 2011 New Revision: 50328 URL:
http://svn.reactos.org/svn/reactos?rev=50328&view=rev
Log: [CMAKE] - Fix the browseui bulgarian translation file name. Added: branches/cmake-bringup/dll/win32/browseui/lang/bg-BG.rc - copied unchanged from r50325, branches/cmake-bringup/dll/win32/browseui/lang/Bg-bg.rc Removed: branches/cmake-bringup/dll/win32/browseui/lang/Bg-bg.rc Removed: branches/cmake-bringup/dll/win32/browseui/lang/Bg-bg.rc URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/browseu…
============================================================================== --- branches/cmake-bringup/dll/win32/browseui/lang/Bg-bg.rc [iso-8859-1] (original) +++ branches/cmake-bringup/dll/win32/browseui/lang/Bg-bg.rc (removed) @@ -1,276 +1,0 @@ -/* - * Copyright 2009 Andrew Hill - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -/* UTF-8 */ -#pragma code_page(65001) - -LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT - -///////////////////////////////////////////////////////////////////////////// -// -// Menus -// - -IDM_CABINET_CONTEXTMENU MENUEX -BEGIN - POPUP "", 264,MFT_STRING,MFS_ENABLED - BEGIN - MENUITEM "&ÐбиÑайни бÑÑони", IDM_TOOLBARS_STANDARDBUTTONS,MFT_STRING,MFS_ENABLED - MENUITEM "&ÐдÑеÑна ленÑа", IDM_TOOLBARS_ADDRESSBAR,MFT_STRING,MFS_ENABLED - MENUITEM "&ÐÑÑзки", IDM_TOOLBARS_LINKSBAR,MFT_STRING,MFS_ENABLED - MENUITEM SEPARATOR - MENUITEM "ÐаклÑÑване на ленÑиÑе Ñ &поÑобиÑ", IDM_TOOLBARS_LOCKTOOLBARS,MFT_STRING,MFS_ENABLED - MENUITEM "&ÐаглаÑÑване...", IDM_TOOLBARS_CUSTOMIZE,MFT_STRING,MFS_ENABLED - MENUITEM "&ТекÑÑови еÑикеÑи", IDM_TOOLBARS_TEXTLABELS,MFT_STRING,MFS_ENABLED - MENUITEM "ÐÑÑон â&ÐÑиванеâ", IDM_TOOLBARS_GOBUTTON,MFT_STRING,MFS_ENABLED - END -END - -IDM_CABINET_MAINMENU MENUEX -BEGIN - POPUP "&Файл", FCIDM_MENU_FILE - BEGIN - MENUITEM "", -1, MFT_SEPARATOR - MENUITEM "&ÐаÑваÑÑне", IDM_FILE_CLOSE - END - POPUP "&ÐбÑабоÑка", FCIDM_MENU_EDIT - BEGIN - MENUITEM "", -1, MFT_SEPARATOR - END - POPUP "Ðз&глед", FCIDM_MENU_VIEW - BEGIN - POPUP "ÐенÑи Ñ &поÑобиÑ", IDM_VIEW_TOOLBARS - BEGIN - MENUITEM "", -1, MFT_SEPARATOR - END - MENUITEM "ÐенÑа на &ÑÑÑÑоÑниеÑо", IDM_VIEW_STATUSBAR - POPUP "ÐенÑа на &изÑледоваÑелÑ", IDM_VIEW_EXPLORERBAR - BEGIN - MENUITEM "&ТÑÑÑене\tCtrl+E", IDM_EXPLORERBAR_SEARCH - MENUITEM "&ÐÑбимки\tCtrl+I", IDM_EXPLORERBAR_FAVORITES - MENUITEM "&ÐоÑиÑели" /* неÑÑно */, IDM_EXPLORERBAR_MEDIA - MENUITEM "&Ðневник\tCtrl+H", IDM_EXPLORERBAR_HISTORY - MENUITEM "&Ðапки", IDM_EXPLORERBAR_FOLDERS - MENUITEM "", IDM_EXPLORERBAR_SEPARATOR - END - MENUITEM "", FCIDM_MENU_VIEW_SEP_OPTIONS, MFT_SEPARATOR - POPUP "&ÐÑиване в", FCIDM_MENU_EXPLORE - BEGIN - MENUITEM "Ðа&зад\tAlt+Left Arrow", IDM_GOTO_BACK - MENUITEM "Ðа&пÑед\tAlt+Right Arrow", IDM_GOTO_FORWARD - MENUITEM "РавниÑе нагоÑе", IDM_GOTO_UPONELEVEL - MENUITEM "", -1, MFT_SEPARATOR - MENUITEM "&ÐаÑална ÑÑÑаниÑа\tAlt+Home", IDM_GOTO_HOMEPAGE - END - MENUITEM "Ð&пÑеÑнÑване", IDM_VIEW_REFRESH - END - POPUP "&ÐÑбимки", FCIDM_MENU_FAVORITES - BEGIN - MENUITEM "ÐобавÑне кÑм &лÑбимкиÑе...", IDM_FAVORITES_ADDTOFAVORITES - MENUITEM "&ÐодÑеждане на лÑбимкиÑе", IDM_FAVORITES_ORGANIZEFAVORITES - MENUITEM "", -1, MFT_SEPARATOR - MENUITEM "(ÐÑазно)", IDM_FAVORITES_EMPTY - END - POPUP "&ÐоÑобиÑ", FCIDM_MENU_TOOLS - BEGIN - MENUITEM "ÐазнаÑаване на &мÑежово ÑÑÑÑойÑÑво", IDM_TOOLS_MAPNETWORKDRIVE - MENUITEM "&РазкаÑане на мÑежово ÑÑÑÑойÑÑво", IDM_TOOLS_DISCONNECTNETWORKDRIVE - MENUITEM "&СÑглаÑÑване", IDM_TOOLS_SYNCHRONIZE - MENUITEM "", -1, MFT_SEPARATOR - MENUITEM "&ÐаÑÑÑойки на папкиÑе", IDM_TOOLS_FOLDEROPTIONS - END - POPUP "Ðомо&Ñ", FCIDM_MENU_HELP - BEGIN - MENUITEM "Ðаконен ли е Ñози бÑой на РеакÑÐС?", IDM_HELP_ISTHISCOPYLEGAL - MENUITEM "&Ðа РеакÑÐС", IDM_HELP_ABOUT - END -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Dialogs -// - -IDD_CUSTOMIZETOOLBAREX DIALOGEX 0, 0, 357, 36 -STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | DS_CONTROL | WS_CHILD | WS_VISIBLE | WS_CAPTION -FONT 8, "MS Shell Dlg", 0, 0, 0x1 -BEGIN - LTEXT "ÐаÑÑÑойки на &ÑекÑÑа:",-1,4,2,48,15 - COMBOBOX IDC_TEXTOPTIONS,52,0,123,57,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "ÐаÑÑÑойки на &знаÑеÑаÑа:",-1,4,20,48,15 - COMBOBOX IDC_ICONOPTIONS,52,18,123,57,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Accelerator -// - -IDR_ACCELERATORS ACCELERATORS -BEGIN - VK_F5, IDM_VIEW_REFRESH, VIRTKEY, NOINVERT - VK_F5, IDM_VIEW_REFRESH, VIRTKEY, CONTROL, NOINVERT - "R", IDM_VIEW_REFRESH, VIRTKEY, CONTROL, NOINVERT - VK_HOME, IDM_GOTO_HOMEPAGE, VIRTKEY, ALT, NOINVERT - "D", IDM_FAVORITES_ADDTOFAVORITES, VIRTKEY, CONTROL, NOINVERT - "B", IDM_FAVORITES_ORGANIZEFAVORITES, VIRTKEY, CONTROL, NOINVERT - VK_LEFT, IDM_GOTO_BACK, VIRTKEY, ALT - VK_RIGHT, IDM_GOTO_FORWARD, VIRTKEY, ALT - "W", IDM_FILE_CLOSE, VIRTKEY, CONTROL, NOINVERT - "E", IDM_EXPLORERBAR_SEARCH, VIRTKEY, CONTROL, NOINVERT - "I", IDM_EXPLORERBAR_FAVORITES, VIRTKEY, CONTROL, NOINVERT - "H", IDM_EXPLORERBAR_HISTORY, VIRTKEY, CONTROL, NOINVERT -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Strings -// - -STRINGTABLE -BEGIN - 800 "СÑдÑÑжа заповеди за обÑабоÑка на избÑаниÑе пÑедмеÑи." -END - -STRINGTABLE -BEGIN - 864 "СÑдÑÑжа заповеди за обÑабоÑка." -END - -STRINGTABLE -BEGIN - 928 "СÑдÑÑжа заповеди за обÑабоÑка на изгледа." -END - -STRINGTABLE -BEGIN - 992 "СÑдÑÑжа заповеди за поÑобиÑÑа." -END - -STRINGTABLE -BEGIN - 1056 "СÑÑÑÑжа заповеди за показване на помоÑ." -END - -STRINGTABLE -BEGIN - 9025 "ÐаÑваÑÑ Ð¿ÑозоÑеÑа." - 9026 "ÐÑива ÑавниÑе нагоÑе." -END - -STRINGTABLE -BEGIN - 9121 "СвÑÑване кÑм мÑежово ÑÑÑÑойÑÑво." - 9122 "РазкаÑане Ð¾Ñ Ð¼Ñежово ÑÑÑÑойÑÑво." -END - -STRINGTABLE -BEGIN - 9250 "Ðоказва ÑÐ²ÐµÐ´ÐµÐ½Ð¸Ñ Ð·Ð° пÑогÑамаÑа, веÑÑÐ¸Ñ Ð¸ вÑзпÑоизводÑÑвени пÑава." - 9252 "Ðоказва ÑÐ²ÐµÐ´ÐµÐ½Ð¸Ñ Ð·Ð° пÑоÑледÑване на недÑзи." -END - -STRINGTABLE -BEGIN - 9281 "ÐÑива на пÑÐµÐ´Ñ Ð¾Ð´Ð½Ð°Ñа ÑÑÑаниÑа." - 9282 "ÐÑива на ÑледваÑаÑа ÑÑÑаниÑа." - 9283 "ÐÐ¾Ð·Ð²Ð¾Ð»Ñ Ð²Ð¸ да пÑомениÑе наÑÑÑойкиÑе." - 9285 "ÐÑива в наÑалнаÑа ви ÑÑÑаниÑа." -END - -STRINGTABLE -BEGIN - 9362 "ÐÑваÑÑ Ð¿Ð°Ð¿ÐºÐ°Ñа Ñ Ð»ÑбимкиÑе." - 9363 "ÐÐ¾Ð±Ð°Ð²Ñ ÑекÑÑаÑа ÑÑÑаниÑа кÑм ÑпиÑÑка Ñ Ð»ÑбимкиÑе." -END - -STRINGTABLE -BEGIN - 9505 "СкÑива или показва ленÑиÑе Ñ Ð¿Ð¾ÑобиÑ." - 9506 "СкÑива или показва ленÑаÑа на ÑÑÑÑоÑниеÑо." - 9508 "Ðоказва ленÑаÑа Ñ Ð¾Ð±Ð¸ÑайниÑе бÑÑони." /* неÑÑно */ - 9509 "Ðоказва адÑеÑнаÑа ленÑа." - 9510 "Ðоказва ленаÑа Ñ Ð±ÑÑзиÑе вÑÑзки." - 9516 "ÐаклÑÑване на ÑазмеÑиÑе и ÑазположениеÑо на ленÑиÑе Ñ Ð¿Ð¾ÑобиÑ." -END - -STRINGTABLE -BEGIN - 9533 "ÐаглаÑÑване на ленÑаÑа Ñ Ð¿Ð¾ÑобиÑ." -END - -STRINGTABLE -BEGIN - 9552 "Ðоказване или ÑкÑиване на ленÑаÑа на изÑледоваÑелÑ." - 9553 "Ðоказване на ленÑаÑа за ÑÑÑÑене." - 9554 "Ðоказване на ленÑаÑа Ñ Ð»ÑбимкиÑе." - 9555 "Ðоказване на ленÑаÑа на дневника." - 9557 "Ðоказване на ленÑаÑа Ñ Ð¿Ð°Ð¿ÐºÐ¸Ñе." - 9559 "Ðоказване на медийнаÑа ленÑа." -END - -STRINGTABLE -BEGIN - IDS_SMALLICONS "Ðалки знаÑеÑа" - IDS_LARGEICONS "Ðолеми знаÑеÑа" - IDS_SHOWTEXTLABELS "Ðоказване на ÑекÑÑови еÑикеÑи" -END - -STRINGTABLE -BEGIN - IDS_NOTEXTLABELS "ÐипÑÐ²Ð°Ñ ÑекÑÑови еÑикеÑи" - IDS_SELECTIVETEXTONRIGHT "Selective text on right" -END - -STRINGTABLE -BEGIN - IDS_GOBUTTONLABEL "|ÐÑиване||" - IDS_GOBUTTONTIPTEMPLATE "ÐÑиване в""%s""" -END - -STRINGTABLE -BEGIN - IDS_SEARCHLABEL "ТÑÑÑене" - IDS_ADDRESSBANDLABEL "&ÐдÑеÑ" -END - -STRINGTABLE -BEGIN - IDS_FOLDERSLABEL "Ðапки" -END - -STRINGTABLE -BEGIN - IDS_HISTORYTEXT "&Ðневник\tCtrl+H" -END - -STRINGTABLE -BEGIN - IDS_UP "ÐагоÑе" -END - -STRINGTABLE -BEGIN - IDS_BACK "Ðазад" - IDS_FORWARD "ÐапÑед" -END - -
13 years, 11 months
1
0
0
0
[akhaldi] 50327: [CMAKE] - Fix rossym dependencies.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Jan 8 13:55:06 2011 New Revision: 50327 URL:
http://svn.reactos.org/svn/reactos?rev=50327&view=rev
Log: [CMAKE] - Fix rossym dependencies. Modified: branches/cmake-bringup/lib/rossym/CMakeLists.txt Modified: branches/cmake-bringup/lib/rossym/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/rossym/CMakeL…
============================================================================== --- branches/cmake-bringup/lib/rossym/CMakeLists.txt [iso-8859-1] (original) +++ branches/cmake-bringup/lib/rossym/CMakeLists.txt [iso-8859-1] Sat Jan 8 13:55:06 2011 @@ -19,4 +19,4 @@ pe.c zwfile.c) add_library(rossym ${SOURCE}) -add_dependencies(rossym psdk) +add_dependencies(rossym psdk bugcodes)
13 years, 11 months
1
0
0
0
[akhaldi] 50326: [CMAKE] - Fix more dependencies.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Jan 8 13:30:27 2011 New Revision: 50326 URL:
http://svn.reactos.org/svn/reactos?rev=50326&view=rev
Log: [CMAKE] - Fix more dependencies. Modified: branches/cmake-bringup/lib/atl/CMakeLists.txt branches/cmake-bringup/lib/epsapi/CMakeLists.txt branches/cmake-bringup/lib/fslib/ntfslib/CMakeLists.txt branches/cmake-bringup/lib/fslib/vfatxlib/CMakeLists.txt branches/cmake-bringup/lib/recyclebin/CMakeLists.txt Modified: branches/cmake-bringup/lib/atl/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/atl/CMakeList…
============================================================================== --- branches/cmake-bringup/lib/atl/CMakeLists.txt [iso-8859-1] (original) +++ branches/cmake-bringup/lib/atl/CMakeLists.txt [iso-8859-1] Sat Jan 8 13:30:27 2011 @@ -4,3 +4,5 @@ -DROS_Headers) add_library(atlnew atlbase.cpp atlcore.cpp) +add_dependencies(atlnew psdk) + Modified: branches/cmake-bringup/lib/epsapi/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/epsapi/CMakeL…
============================================================================== --- branches/cmake-bringup/lib/epsapi/CMakeLists.txt [iso-8859-1] (original) +++ branches/cmake-bringup/lib/epsapi/CMakeLists.txt [iso-8859-1] Sat Jan 8 13:30:27 2011 @@ -3,3 +3,6 @@ enum/drivers.c enum/modules.c enum/processes.c) + +add_dependencies(epsapi psdk) + Modified: branches/cmake-bringup/lib/fslib/ntfslib/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/fslib/ntfslib…
============================================================================== --- branches/cmake-bringup/lib/fslib/ntfslib/CMakeLists.txt [iso-8859-1] (original) +++ branches/cmake-bringup/lib/fslib/ntfslib/CMakeLists.txt [iso-8859-1] Sat Jan 8 13:30:27 2011 @@ -1,2 +1,4 @@ add_library(ntfslib ntfslib.c) +add_dependencies(ntfslib psdk) + Modified: branches/cmake-bringup/lib/fslib/vfatxlib/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/fslib/vfatxli…
============================================================================== --- branches/cmake-bringup/lib/fslib/vfatxlib/CMakeLists.txt [iso-8859-1] (original) +++ branches/cmake-bringup/lib/fslib/vfatxlib/CMakeLists.txt [iso-8859-1] Sat Jan 8 13:30:27 2011 @@ -1,2 +1,4 @@ add_library(vfatxlib fatx.c vfatxlib.c) +add_dependencies(vfatxlib psdk) + Modified: branches/cmake-bringup/lib/recyclebin/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/recyclebin/CM…
============================================================================== --- branches/cmake-bringup/lib/recyclebin/CMakeLists.txt [iso-8859-1] (original) +++ branches/cmake-bringup/lib/recyclebin/CMakeLists.txt [iso-8859-1] Sat Jan 8 13:30:27 2011 @@ -8,3 +8,5 @@ recyclebin_v5_enumerator.c) add_library(recyclebin ${SOURCE}) +add_dependencies(recyclebin psdk) +
13 years, 11 months
1
0
0
0
[gadamopoulos] 50325: [winent] - Remove a hack for stock objects from RosGdiSelectBitmap. To handle stock objects properly, map their handles instead [win32k] - Add NtGdiGetStockObject and remove s...
by gadamopoulos@svn.reactos.org
Author: gadamopoulos Date: Sat Jan 8 13:26:33 2011 New Revision: 50325 URL:
http://svn.reactos.org/svn/reactos?rev=50325&view=rev
Log: [winent] - Remove a hack for stock objects from RosGdiSelectBitmap. To handle stock objects properly, map their handles instead [win32k] - Add NtGdiGetStockObject and remove some difference to trunk. >From now on if a function is the same with trunk it will use the NtGdi prefix Modified: branches/arwinss/reactos/base/system/winlogon/winlogon.c branches/arwinss/reactos/dll/win32/winent.drv/gdidrv.c branches/arwinss/reactos/include/reactos/wine/ntrosgdi.h branches/arwinss/reactos/subsystems/win32/win32k/eng/engpal.c branches/arwinss/reactos/subsystems/win32/win32k/gdi/dc.c branches/arwinss/reactos/subsystems/win32/win32k/gre/pen.c branches/arwinss/reactos/subsystems/win32/win32k/include/gre.h branches/arwinss/reactos/subsystems/win32/win32k/include/win32kp.h branches/arwinss/reactos/subsystems/win32/win32k/w32ksvc.db Modified: branches/arwinss/reactos/base/system/winlogon/winlogon.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/base/system/win…
============================================================================== --- branches/arwinss/reactos/base/system/winlogon/winlogon.c [iso-8859-1] (original) +++ branches/arwinss/reactos/base/system/winlogon/winlogon.c [iso-8859-1] Sat Jan 8 13:26:33 2011 @@ -197,6 +197,41 @@ CloseHandle(ProcessInformation.hProcess); return res; +} + +static VOID +WaitForLsass(VOID) +{ + HANDLE hEvent; + DWORD dwError; + + hEvent = CreateEventW(NULL, + TRUE, + FALSE, + L"LSA_RPC_SERVER_ACTIVE"); + if (hEvent == NULL) + { + dwError = GetLastError(); + TRACE("WL: Failed to create the notication event (Error %lu)\n", dwError); + + if (dwError == ERROR_ALREADY_EXISTS) + { + hEvent = OpenEventW(SYNCHRONIZE, + FALSE, + L"LSA_RPC_SERVER_ACTIVE"); + if (hEvent == NULL) + { + ERR("WL: Could not open the notification event (Error %lu)\n", GetLastError()); + return; + } + } + } + + TRACE("WL: Wait for the LSA server!\n"); + WaitForSingleObject(hEvent, INFINITE); + TRACE("WL: LSA server running!\n"); + + CloseHandle(hEvent); } BOOL @@ -348,6 +383,9 @@ DisplayStatusMessage(WLSession, WLSession->WinlogonDesktop, IDS_REACTOSISSTARTINGUP); + /* Wait for the LSA server */ + WaitForLsass(); + #if 0 /* Connect to NetLogon service (lsass.exe) */ /* Real winlogon uses "Winlogon" */ Modified: branches/arwinss/reactos/dll/win32/winent.drv/gdidrv.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winen…
============================================================================== --- branches/arwinss/reactos/dll/win32/winent.drv/gdidrv.c [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/winent.drv/gdidrv.c [iso-8859-1] Sat Jan 8 13:26:33 2011 @@ -14,9 +14,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(rosgdidrv); /* GLOBALS ****************************************************************/ -HANDLE hStockBitmap; static struct list handle_mapping_list = LIST_INIT( handle_mapping_list ); static CRITICAL_SECTION handle_mapping_cs; +static BOOL StockObjectsInitialized = FALSE; typedef struct _HMAPPING { @@ -65,6 +65,22 @@ { PHMAPPING mapping; + /* 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; + } + } + mapping = FindHandleMapping(hUser); return mapping ? mapping->hKernel : NULL; @@ -129,11 +145,7 @@ /* Get DC type */ dcType = GetObjectType(hdc); - - /* Save stock bitmap's handle */ - if (dcType == OBJ_MEMDC && !hStockBitmap) - hStockBitmap = GetCurrentObject( hdc, OBJ_BITMAP ); - + /* Call the win32 kernel */ bRet = RosGdiCreateDC(&hKernelDC, driver, device, output, initData, dcType); @@ -273,16 +285,13 @@ HBITMAP CDECL RosDrv_SelectBitmap( NTDRV_PDEVICE *physDev, HBITMAP hbitmap ) { - BOOL bRes, bStock = FALSE; + BOOL bRes; /* Check if it's a stock bitmap */ - if (hbitmap == hStockBitmap) - bStock = TRUE; - else - hbitmap = (HBITMAP)MapUserHandle(hbitmap); + hbitmap = (HBITMAP)MapUserHandle(hbitmap); /* Select the bitmap into the DC */ - bRes = RosGdiSelectBitmap(physDev->hKernelDC, hbitmap, bStock); + bRes = RosGdiSelectBitmap(physDev->hKernelDC, hbitmap); /* If there was an error, return 0 */ if (!bRes) return 0; Modified: branches/arwinss/reactos/include/reactos/wine/ntrosgdi.h URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/include/reactos…
============================================================================== --- branches/arwinss/reactos/include/reactos/wine/ntrosgdi.h [iso-8859-1] (original) +++ branches/arwinss/reactos/include/reactos/wine/ntrosgdi.h [iso-8859-1] Sat Jan 8 13:26:33 2011 @@ -87,12 +87,13 @@ INT widthSrc, INT heightSrc, DWORD rop ); /* dc.c */ +HGDIOBJ APIENTRY NtGdiGetStockObject(INT Object); BOOL APIENTRY RosGdiCreateDC( HDC *pdev, LPCWSTR driver, LPCWSTR device, LPCWSTR output, const DEVMODEW* initData, ULONG dcType ); BOOL APIENTRY RosGdiDeleteDC( HDC physDev ); BOOL APIENTRY RosGdiGetDCOrgEx( HDC physDev, LPPOINT lpp ); BOOL APIENTRY RosGdiPaintRgn( HDC physDev, HRGN hrgn ); -BOOL APIENTRY RosGdiSelectBitmap( HDC physDev, HBITMAP hbitmap, BOOL stock ); +BOOL APIENTRY RosGdiSelectBitmap( HDC physDev, HBITMAP hbitmap ); VOID APIENTRY RosGdiSelectBrush( HDC physDev, LOGBRUSH *pLogBrush ); HFONT APIENTRY RosGdiSelectFont( HDC physDev, HFONT hfont, HANDLE gdiFont ); VOID APIENTRY RosGdiSelectPen( HDC physDev, LOGPEN *pLogPen, EXTLOGPEN *pExtLogPen ); Modified: branches/arwinss/reactos/subsystems/win32/win32k/eng/engpal.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
============================================================================== --- branches/arwinss/reactos/subsystems/win32/win32k/eng/engpal.c [iso-8859-1] (original) +++ branches/arwinss/reactos/subsystems/win32/win32k/eng/engpal.c [iso-8859-1] Sat Jan 8 13:26:33 2011 @@ -465,11 +465,7 @@ dc = DC_LockDc(hDC); if (!dc) return 0; -#if 0 systemPalette = NtGdiGetStockObject(DEFAULT_PALETTE); -#else - systemPalette = hStockPalette; -#endif palGDI = PALETTE_LockPalette(dc->dclevel.hpal); if (palGDI == NULL) Modified: branches/arwinss/reactos/subsystems/win32/win32k/gdi/dc.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
============================================================================== --- branches/arwinss/reactos/subsystems/win32/win32k/gdi/dc.c [iso-8859-1] (original) +++ branches/arwinss/reactos/subsystems/win32/win32k/gdi/dc.c [iso-8859-1] Sat Jan 8 13:26:33 2011 @@ -21,9 +21,16 @@ BOOL FASTCALL IntCreatePrimarySurface(); /* GLOBALS *******************************************************************/ -HGDIOBJ hStockBmp; -HGDIOBJ hStockPalette; -HGDIOBJ hNullPen; +HGDIOBJ StockObjects[NB_STOCK_OBJECTS]; + +static LOGPEN WhitePen = + { PS_SOLID, { 0, 0 }, RGB(255,255,255) }; + +static LOGPEN BlackPen = + { PS_SOLID, { 0, 0 }, RGB(0,0,0) }; + +static LOGPEN NullPen = + { PS_NULL, { 0, 0 }, 0 }; /* PUBLIC FUNCTIONS **********************************************************/ @@ -87,13 +94,13 @@ EBRUSHOBJ_vInit(&pNewDC->eboFill, pNewDC->dclevel.pbrFill, pNewDC); /* Set the default palette */ - pNewDC->dclevel.hpal = hStockPalette; + pNewDC->dclevel.hpal = StockObjects[DEFAULT_PALETTE]; pNewDC->dclevel.ppal = PALETTE_ShareLockPalette(pNewDC->dclevel.hpal); if (dcType == OBJ_MEMDC) { DPRINT("Creating a memory DC %x\n", hNewDC); - pNewDC->dclevel.pSurface = SURFACE_ShareLockSurface(hStockBmp); + pNewDC->dclevel.pSurface = SURFACE_ShareLockSurface(StockObjects[DEFAULT_BITMAP]); /* Set DC rectangles */ pNewDC->rcVport.left = 0; pNewDC->rcVport.top = 0; @@ -117,7 +124,7 @@ pNewDC->pWindow = NULL; /* Set default palette */ - pNewDC->dclevel.hpal = hStockPalette; + pNewDC->dclevel.hpal = StockObjects[DEFAULT_PALETTE]; /* Give handle to the caller */ *pdev = hNewDC; @@ -152,19 +159,13 @@ return FALSE; } -BOOL APIENTRY RosGdiSelectBitmap( HDC physDev, HBITMAP hbitmap, BOOL bStock ) +BOOL APIENTRY RosGdiSelectBitmap( HDC physDev, HBITMAP hbitmap ) { PDC pDC; PSURFACE pSurface; DPRINT("Selecting %x bitmap to hdc %x\n", hbitmap, physDev); - - if (bStock) - { - /* Selecting stock bitmap */ - hbitmap = hStockBmp; - } - + pSurface = SURFACE_ShareLockSurface(hbitmap); if(pSurface== NULL) { @@ -684,12 +685,39 @@ VOID CreateStockObjects() { - hStockBmp = IntGdiCreateBitmap(1, 1, 1, 1, NULL); - hStockPalette = (HGDIOBJ)PALETTE_Init(); - hNullPen = IntCreateStockPen(PS_NULL, 0, BS_SOLID, 0); - - GDIOBJ_ConvertToStockObj(&hStockBmp); - GDIOBJ_ConvertToStockObj(&hStockPalette); - GDIOBJ_ConvertToStockObj(&hNullPen); -} + UINT Object; + + memset(StockObjects, 0, sizeof(StockObjects)); + + /* Create GDI Stock Objects from the logical structures we've defined */ + + StockObjects[DEFAULT_BITMAP] = IntGdiCreateBitmap(1, 1, 1, 1, NULL); + StockObjects[DEFAULT_PALETTE] = (HGDIOBJ)PALETTE_Init(); + StockObjects[WHITE_PEN] = IntCreateStockPen(WhitePen.lopnStyle, WhitePen.lopnWidth.x, BS_SOLID, WhitePen.lopnColor); + StockObjects[BLACK_PEN] = IntCreateStockPen(BlackPen.lopnStyle, BlackPen.lopnWidth.x, BS_SOLID, BlackPen.lopnColor); + StockObjects[DC_PEN] = IntCreateStockPen(BlackPen.lopnStyle, BlackPen.lopnWidth.x, BS_SOLID, BlackPen.lopnColor); + StockObjects[NULL_PEN] = IntCreateStockPen(NullPen.lopnStyle, NullPen.lopnWidth.x, BS_SOLID, NullPen.lopnColor); + + for (Object = 0; Object < NB_STOCK_OBJECTS; Object++) + { + if (NULL != StockObjects[Object]) + { + GDIOBJ_ConvertToStockObj(&StockObjects[Object]); + } + } +} + +/*! + * Return stock object. + * \param Object - stock object id. + * \return Handle to the object. +*/ +HGDIOBJ APIENTRY +NtGdiGetStockObject(INT Object) +{ + DPRINT("NtGdiGetStockObject index %d\n", Object); + + return ((Object < 0) || (NB_STOCK_OBJECTS <= Object)) ? NULL : StockObjects[Object]; +} + /* EOF */ Modified: branches/arwinss/reactos/subsystems/win32/win32k/gre/pen.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
============================================================================== --- branches/arwinss/reactos/subsystems/win32/win32k/gre/pen.c [iso-8859-1] (original) +++ branches/arwinss/reactos/subsystems/win32/win32k/gre/pen.c [iso-8859-1] Sat Jan 8 13:26:33 2011 @@ -73,11 +73,7 @@ if ( (dwPenStyle & PS_STYLE_MASK) == PS_NULL) { -#if 0 return StockObjects[NULL_PEN]; -#else - return hNullPen; -#endif } if (bOldStylePen) Modified: branches/arwinss/reactos/subsystems/win32/win32k/include/gre.h URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
============================================================================== --- branches/arwinss/reactos/subsystems/win32/win32k/include/gre.h [iso-8859-1] (original) +++ branches/arwinss/reactos/subsystems/win32/win32k/include/gre.h [iso-8859-1] Sat Jan 8 13:26:33 2011 @@ -120,12 +120,6 @@ INT FASTCALL BitsPerFormat(ULONG Format); -/* bitmap.c */ -extern HGDIOBJ hStockBmp; -extern HGDIOBJ hStockPalette; -extern HGDIOBJ hNullPen; -VOID CreateStockObjects(); - /* device.c */ LONG FASTCALL GreChangeDisplaySettings(PUNICODE_STRING pDeviceName, LPDEVMODEW DevMode, DWORD dwflags, Modified: branches/arwinss/reactos/subsystems/win32/win32k/include/win32kp.h URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
============================================================================== --- branches/arwinss/reactos/subsystems/win32/win32k/include/win32kp.h [iso-8859-1] (original) +++ branches/arwinss/reactos/subsystems/win32/win32k/include/win32kp.h [iso-8859-1] Sat Jan 8 13:26:33 2011 @@ -91,3 +91,5 @@ VOID UserCleanup(VOID); VOID UserInitialize(VOID); +extern HGDIOBJ StockObjects[]; +VOID CreateStockObjects(); Modified: branches/arwinss/reactos/subsystems/win32/win32k/w32ksvc.db URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
============================================================================== --- branches/arwinss/reactos/subsystems/win32/win32k/w32ksvc.db [iso-8859-1] (original) +++ branches/arwinss/reactos/subsystems/win32/win32k/w32ksvc.db [iso-8859-1] Sat Jan 8 13:26:33 2011 @@ -1,4 +1,5 @@ wine_server_call 1 +NtGdiGetStockObject 1 RosGdiAlphaBlend 11 RosGdiBitBlt 9 RosGdiCreateBitmap 3 @@ -17,7 +18,7 @@ RosGdiDeleteDC 1 RosGdiGetDCOrgEx 2 RosGdiPaintRgn 2 -RosGdiSelectBitmap 3 +RosGdiSelectBitmap 2 RosGdiSelectBrush 2 RosGdiSelectFont 3 RosGdiSelectPen 3
13 years, 11 months
1
0
0
0
← Newer
1
...
23
24
25
26
27
28
29
...
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