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
October 2010
----- 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
435 discussions
Start a n
N
ew thread
[spetreolle] 49315: [WLANSVC] Fix MIDL_user_allocate prototype. Dedicated to zefklop.
by spetreolle@svn.reactos.org
Author: spetreolle Date: Wed Oct 27 20:50:14 2010 New Revision: 49315 URL:
http://svn.reactos.org/svn/reactos?rev=49315&view=rev
Log: [WLANSVC] Fix MIDL_user_allocate prototype. Dedicated to zefklop. Modified: branches/cmake-bringup/base/services/wlansvc/rpcserver.c Modified: branches/cmake-bringup/base/services/wlansvc/rpcserver.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/base/services/wla…
============================================================================== --- branches/cmake-bringup/base/services/wlansvc/rpcserver.c [iso-8859-1] (original) +++ branches/cmake-bringup/base/services/wlansvc/rpcserver.c [iso-8859-1] Wed Oct 27 20:50:14 2010 @@ -525,7 +525,7 @@ return ERROR_CALL_NOT_IMPLEMENTED; } -void __RPC_FAR * __RPC_USER midl_user_allocate(SIZE_T len) +void __RPC_FAR * __RPC_USER midl_user_allocate(size_t len) { return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len); }
14 years, 1 month
1
0
0
0
[tkreuzer] 49314: [CLASSPNP] Fix a typo in the spec file
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Wed Oct 27 20:40:59 2010 New Revision: 49314 URL:
http://svn.reactos.org/svn/reactos?rev=49314&view=rev
Log: [CLASSPNP] Fix a typo in the spec file Modified: trunk/reactos/drivers/storage/classpnp/class.spec Modified: trunk/reactos/drivers/storage/classpnp/class.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/classpnp/c…
============================================================================== --- trunk/reactos/drivers/storage/classpnp/class.spec [iso-8859-1] (original) +++ trunk/reactos/drivers/storage/classpnp/class.spec [iso-8859-1] Wed Oct 27 20:40:59 2010 @@ -9,7 +9,7 @@ @ stdcall ClassDeviceControl(ptr ptr) @ stdcall ClassIoComplete(ptr ptr ptr) @ stdcall ClassIoCompleteAssociated(ptr ptr ptr) - @ stdcall ClassInterpretSenseInfo(ptr ptr long long long ptr) + @ stdcall ClassInterpretSenseInfo(ptr ptr long long long ptr ptr) @ stdcall ClassSendDeviceIoControlSynchronous(long ptr ptr long long long ptr) @ stdcall ClassSendIrpSynchronous(ptr ptr) @ stdcall ClassForwardIrpSynchronous(ptr ptr)
14 years, 1 month
1
0
0
0
[gadamopoulos] 49313: [FORMATTING] - Fix formatting in message.c
by gadamopoulos@svn.reactos.org
Author: gadamopoulos Date: Wed Oct 27 20:31:17 2010 New Revision: 49313 URL:
http://svn.reactos.org/svn/reactos?rev=49313&view=rev
Log: [FORMATTING] - Fix formatting in message.c Modified: trunk/reactos/subsystems/win32/win32k/ntuser/message.c [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/reactos/subsystems/win32/win32k/ntuser/message.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
14 years, 1 month
1
0
0
0
[tkreuzer] 49312: [basetsd.h] add POINTER_SIGNED, POINTER_UNSIGNED, SPOINTER_32, UPOINTER_32
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Wed Oct 27 20:14:15 2010 New Revision: 49312 URL:
http://svn.reactos.org/svn/reactos?rev=49312&view=rev
Log: [basetsd.h] add POINTER_SIGNED, POINTER_UNSIGNED, SPOINTER_32, UPOINTER_32 Modified: trunk/reactos/include/psdk/basetsd.h Modified: trunk/reactos/include/psdk/basetsd.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/basetsd.h?rev…
============================================================================== --- trunk/reactos/include/psdk/basetsd.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/basetsd.h [iso-8859-1] Wed Oct 27 20:14:15 2010 @@ -63,6 +63,17 @@ #else typedef unsigned long POINTER_64_INT; #endif + +#if 0 /* Not supported yet */ +#define POINTER_SIGNED __sptr +#define POINTER_UNSIGNED __uptr +#else +#define POINTER_SIGNED +#define POINTER_UNSIGNED +#endif + +#define SPOINTER_32 POINTER_SIGNED POINTER_32 +#define UPOINTER_32 POINTER_UNSIGNED POINTER_32 #if defined(_WIN64) #define __int3264 __int64
14 years, 1 month
1
0
0
0
[tkreuzer] 49311: [CLASSPNP] Convert to spec
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Wed Oct 27 20:13:06 2010 New Revision: 49311 URL:
http://svn.reactos.org/svn/reactos?rev=49311&view=rev
Log: [CLASSPNP] Convert to spec Added: trunk/reactos/drivers/storage/classpnp/class.spec (with props) Removed: trunk/reactos/drivers/storage/classpnp/class.def Modified: trunk/reactos/drivers/storage/classpnp/classpnp.rbuild Removed: trunk/reactos/drivers/storage/classpnp/class.def URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/classpnp/c…
============================================================================== --- trunk/reactos/drivers/storage/classpnp/class.def [iso-8859-1] (original) +++ trunk/reactos/drivers/storage/classpnp/class.def (removed) @@ -1,61 +1,0 @@ -NAME CLASSPNP.SYS - -EXPORTS - ClassInitialize@12 - ClassInitializeEx@12 - ClassGetDescriptor@12 - ClassReadDriveCapacity@4 - ClassReleaseQueue@4 - ClassAsynchronousCompletion@12 - ClassSplitRequest@12 - ClassDeviceControl@8 - ClassIoComplete@12 - ClassIoCompleteAssociated@12 - ClassInterpretSenseInfo@28 - ClassSendDeviceIoControlSynchronous@28 - ClassSendIrpSynchronous@8 - ClassForwardIrpSynchronous@8 - ClassSendSrbSynchronous@20 - ClassSendSrbAsynchronous@24 - ClassBuildRequest@8 - ClassModeSense@16 - ClassFindModePage@16 - ClassClaimDevice@8 - ClassInternalIoControl@8 - ClassCreateDeviceObject@20 - ClassRemoveDevice@8 - ClassInitializeSrbLookasideList@8 - ClassDeleteSrbLookasideList@4 - ClassQueryTimeOutRegistryValue@4 - ClassInvalidateBusRelations@4 - ClassMarkChildrenMissing@4 - ClassMarkChildMissing@8 - ClassDebugPrint - ClassGetDriverExtension@4 - ClassCompleteRequest@12 - ClassReleaseRemoveLock@8 - ClassAcquireRemoveLockEx@16 - ClassUpdateInformationInRegistry@20 - ClassWmiCompleteRequest@20 - ClassWmiFireEvent@20 - ClassGetVpb@4 - ClassSetFailurePredictionPoll@12 - ClassNotifyFailurePredicted@32 - ClassInitializeTestUnitPolling@8 - ClassSignalCompletion@12 - ClassSendStartUnit@4 - ClassSetMediaChangeState@12 - ClassResetMediaChangeTimer@4 - ClassCheckMediaState@4 - ClassInitializeMediaChangeDetection@8 - ClassCleanupMediaChangeDetection@4 - ClassEnableMediaChangeDetection@4 - ClassDisableMediaChangeDetection@4 - ClassSpinDownPowerHandler@8 - ClassStopUnitPowerHandler@8 - ClassAcquireChildLock@4 - ClassReleaseChildLock@4 - ClassScanForSpecial@12 - ClassSetDeviceParameter@16 - ClassGetDeviceParameter@16 - Added: trunk/reactos/drivers/storage/classpnp/class.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/classpnp/c…
============================================================================== --- trunk/reactos/drivers/storage/classpnp/class.spec (added) +++ trunk/reactos/drivers/storage/classpnp/class.spec [iso-8859-1] Wed Oct 27 20:13:06 2010 @@ -1,0 +1,59 @@ + + @ stdcall ClassInitialize(ptr ptr ptr) + @ stdcall ClassInitializeEx(ptr ptr ptr) + @ stdcall ClassGetDescriptor(ptr ptr ptr) + @ stdcall ClassReadDriveCapacity(ptr) + @ stdcall ClassReleaseQueue(ptr) + @ stdcall ClassAsynchronousCompletion(ptr ptr ptr) + @ stdcall ClassSplitRequest(ptr ptr long) + @ stdcall ClassDeviceControl(ptr ptr) + @ stdcall ClassIoComplete(ptr ptr ptr) + @ stdcall ClassIoCompleteAssociated(ptr ptr ptr) + @ stdcall ClassInterpretSenseInfo(ptr ptr long long long ptr) + @ stdcall ClassSendDeviceIoControlSynchronous(long ptr ptr long long long ptr) + @ stdcall ClassSendIrpSynchronous(ptr ptr) + @ stdcall ClassForwardIrpSynchronous(ptr ptr) + @ stdcall ClassSendSrbSynchronous(ptr ptr ptr long long) + @ stdcall ClassSendSrbAsynchronous(ptr ptr ptr ptr long long) + @ stdcall ClassBuildRequest(ptr ptr) + @ stdcall ClassModeSense(ptr ptr long long) + @ stdcall ClassFindModePage(ptr long long long) + @ stdcall ClassClaimDevice(ptr long) + @ stdcall ClassInternalIoControl(ptr ptr) + @ stdcall ClassCreateDeviceObject(ptr ptr ptr long ptr) + @ stdcall ClassRemoveDevice(ptr long) + @ stdcall ClassInitializeSrbLookasideList(ptr long) + @ stdcall ClassDeleteSrbLookasideList(ptr) + @ stdcall ClassQueryTimeOutRegistryValue(ptr) + @ stdcall ClassInvalidateBusRelations(ptr) + @ stdcall ClassMarkChildrenMissing(ptr) + @ stdcall ClassMarkChildMissing(ptr long) + @ varargs ClassDebugPrint(long long) + @ stdcall ClassGetDriverExtension(ptr) + @ stdcall ClassCompleteRequest(ptr ptr long) + @ stdcall ClassReleaseRemoveLock(ptr ptr) + @ stdcall ClassAcquireRemoveLockEx(ptr ptr ptr long) + @ stdcall ClassUpdateInformationInRegistry(ptr ptr long ptr long) + @ stdcall ClassWmiCompleteRequest(ptr ptr long long long) + @ stdcall ClassWmiFireEvent(ptr ptr long long ptr) + @ stdcall ClassGetVpb(ptr) + @ stdcall ClassSetFailurePredictionPoll(ptr long long) + @ stdcall ClassNotifyFailurePredicted(ptr ptr long long long long long long) + @ stdcall ClassInitializeTestUnitPolling(ptr long) + @ stdcall ClassSignalCompletion(ptr ptr ptr) + @ stdcall ClassSendStartUnit(ptr) + @ stdcall ClassSetMediaChangeState(ptr long long) + @ stdcall ClassResetMediaChangeTimer(ptr) + @ stdcall ClassCheckMediaState(ptr) + @ stdcall ClassInitializeMediaChangeDetection(ptr ptr) + @ stdcall ClassCleanupMediaChangeDetection(ptr) + @ stdcall ClassEnableMediaChangeDetection(ptr) + @ stdcall ClassDisableMediaChangeDetection(ptr) + @ stdcall ClassSpinDownPowerHandler(ptr ptr) + @ stdcall ClassStopUnitPowerHandler(ptr ptr) + @ stdcall ClassAcquireChildLock(ptr) + @ stdcall ClassReleaseChildLock(ptr) + @ stdcall ClassScanForSpecial(ptr ptr ptr) + @ stdcall ClassSetDeviceParameter(ptr ptr ptr long) + @ stdcall ClassGetDeviceParameter(ptr ptr ptr ptr) + Propchange: trunk/reactos/drivers/storage/classpnp/class.spec ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/drivers/storage/classpnp/classpnp.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/classpnp/c…
============================================================================== --- trunk/reactos/drivers/storage/classpnp/classpnp.rbuild [iso-8859-1] (original) +++ trunk/reactos/drivers/storage/classpnp/classpnp.rbuild [iso-8859-1] Wed Oct 27 20:13:06 2010 @@ -2,7 +2,7 @@ <!DOCTYPE module SYSTEM "../../../../tools/rbuild/project.dtd"> <module name="classpnp" type="kernelmodedriver" installbase="system32/drivers" installname="classpnp.sys"> <bootstrap installbase="$(CDOUTPUT)" /> - <importlibrary definition="class.def" /> + <importlibrary definition="class.spec" /> <library>ntoskrnl</library> <library>hal</library> <library>pseh</library>
14 years, 1 month
1
0
0
0
[tkreuzer] 49310: [WIN32K] Improve the code to enumerate monitors. - Don't use custom MIN / MAX / ABS macros - Calculate distance by r^2 = x^2 + y^2 - Use RECTL_bIntersectRect instead of code dupli...
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Wed Oct 27 17:16:11 2010 New Revision: 49310 URL:
http://svn.reactos.org/svn/reactos?rev=49310&view=rev
Log: [WIN32K] Improve the code to enumerate monitors. - Don't use custom MIN / MAX / ABS macros - Calculate distance by r^2 = x^2 + y^2 - Use RECTL_bIntersectRect instead of code duplication - Fix possible NULL pointer dereference - pass bottom-right exclusive rect to IntGetMonitorsFromRect from NtUserMonitorFromPoint - Don't handle MONITOR_DEFAULTTOPRIMARY and MONITOR_DEFAULTTONEAREST twice - Use unsigned variables for unsigned values - Don't check the result of a UINT returning function for < 0 - Improve readability Modified: trunk/reactos/subsystems/win32/win32k/ntuser/monitor.c Modified: trunk/reactos/subsystems/win32/win32k/ntuser/monitor.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/monitor.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/monitor.c [iso-8859-1] Wed Oct 27 17:16:11 2010 @@ -47,16 +47,6 @@ /* PRIVATE FUNCTIONS **********************************************************/ -#ifndef MIN -# define MIN(a, b) ((a) < (b) ? (a) : (b)) -#endif -#ifndef MAX -# define MAX(a, b) ((a) > (b) ? (a) : (b)) -#endif -#ifndef ABS -# define ABS(a) ((a) < (0) ? (-(a)) : (a)) -#endif - /* IntCreateMonitorObject * * Creates a MONITOR @@ -318,9 +308,9 @@ { PMONITOR Monitor, NearestMonitor = NULL, PrimaryMonitor = NULL; UINT iCount = 0; - LONG iNearestDistanceX = 0x7fffffff, iNearestDistanceY = 0x7fffffff; - - /* find monitors which intersect the rectangle */ + ULONG iNearestDistance = 0xffffffff; + + /* Find monitors which intersect the rectangle */ for (Monitor = gMonitorList; Monitor != NULL; Monitor = Monitor->Next) { RECTL MonitorRect, IntersectionRect; @@ -337,49 +327,42 @@ PrimaryMonitor = Monitor; } - if (pRect != NULL) - { - BOOL intersects = TRUE; - - /* check if the rect intersects the monitor */ - if ((pRect->right < MonitorRect.left) || (pRect->left > MonitorRect.right) || - (pRect->bottom < MonitorRect.top) || (pRect->top > MonitorRect.bottom)) + /* Check if a rect is given */ + if (pRect == NULL) + { + /* No rect given, so use the full monitor rect */ + IntersectionRect = MonitorRect; + } + + /* We have a rect, calculate intersection */ + else if (!RECTL_bIntersectRect(&IntersectionRect, &MonitorRect, pRect)) + { + /* Rects did not intersect */ + if (flags == MONITOR_DEFAULTTONEAREST) { - intersects = FALSE; - } - - if (flags == MONITOR_DEFAULTTONEAREST && !intersects) - { - INT distanceX, distanceY; - - distanceX = MIN(ABS(MonitorRect.left - pRect->right), - ABS(pRect->left - MonitorRect.right)); - distanceY = MIN(ABS(MonitorRect.top - pRect->bottom), - ABS(pRect->top - MonitorRect.bottom)); - - if (((distanceX < iNearestDistanceX) && (distanceY <= iNearestDistanceY)) || - ((distanceX <= iNearestDistanceX) && (distanceY < iNearestDistanceY))) + ULONG cx, cy, iDistance; + + /* Get x and y distance */ + cx = min(abs(MonitorRect.left - pRect->right), + abs(pRect->left - MonitorRect.right)); + cy = min(abs(MonitorRect.top - pRect->bottom), + abs(pRect->top - MonitorRect.bottom)); + + /* Calculate distance square */ + iDistance = cx * cx + cy * cy; + + /* Check if this is the new nearest monitor */ + if (iDistance < iNearestDistance) { - iNearestDistanceX = distanceX; - iNearestDistanceY = distanceY; + iNearestDistance = iDistance; NearestMonitor = Monitor; } } - if (!intersects) - continue; - - /* calculate intersection */ - IntersectionRect.left = MAX(MonitorRect.left, pRect->left); - IntersectionRect.top = MAX(MonitorRect.top, pRect->top); - IntersectionRect.right = MIN(MonitorRect.right, pRect->right); - IntersectionRect.bottom = MIN(MonitorRect.bottom, pRect->bottom); - } - else - { - IntersectionRect = MonitorRect; - } - + continue; + } + + /* Check if there's space in the buffer */ if (iCount < listSize) { if (hMonitorList != NULL) @@ -387,27 +370,30 @@ if (monitorRectList != NULL) monitorRectList[iCount] = IntersectionRect; } + + /* Increase count of found monitors */ iCount++; } - if (iCount == 0 && flags == MONITOR_DEFAULTTONEAREST) - { - if (iCount < listSize) - { - if (hMonitorList != NULL) + /* Found nothing intersecting? */ + if (iCount == 0) + { + /* Check if we shall default to the nearest monitor */ + if (flags == MONITOR_DEFAULTTONEAREST && NearestMonitor) + { + if (hMonitorList && listSize > 0) hMonitorList[iCount] = UserHMGetHandle(NearestMonitor); - } - iCount++; - } - else if (iCount == 0 && flags == MONITOR_DEFAULTTOPRIMARY) - { - if (iCount < listSize) - { - if (hMonitorList != NULL) + iCount++; + } + /* Check if we shall default to the primary monitor */ + else if (flags == MONITOR_DEFAULTTOPRIMARY && PrimaryMonitor) + { + if (hMonitorList != NULL && listSize > 0) hMonitorList[iCount] = UserHMGetHandle(PrimaryMonitor); - } - iCount++; - } + iCount++; + } + } + return iCount; } @@ -719,32 +705,17 @@ RECTL InRect; HMONITOR hMonitor = NULL; - /* fill inRect */ - InRect.left = InRect.right = point.x; - InRect.top = InRect.bottom = point.y; + /* fill inRect (bottom-right exclusive) */ + InRect.left = point.x; + InRect.right = point.x + 1; + InRect.top = point.y; + InRect.bottom = point.y + 1; /* find intersecting monitor */ - NumMonitors = IntGetMonitorsFromRect(&InRect, &hMonitor, NULL, 1, 0); + NumMonitors = IntGetMonitorsFromRect(&InRect, &hMonitor, NULL, 1, dwFlags); if (NumMonitors < 0) { return (HMONITOR)NULL; - } - - if (hMonitor == NULL) - { - if (dwFlags == MONITOR_DEFAULTTOPRIMARY) - { - PMONITOR MonitorObj = IntGetPrimaryMonitor(); - if (MonitorObj) - hMonitor = UserHMGetHandle(MonitorObj); - } - else if (dwFlags == MONITOR_DEFAULTTONEAREST) - { - NumMonitors = IntGetMonitorsFromRect(&InRect, &hMonitor, NULL, - 1, MONITOR_DEFAULTTONEAREST); - /*ASSERT( (numMonitors > 0) && (hMonitor != NULL) );*/ - } - /* else flag is DEFAULTTONULL */ } return hMonitor; @@ -773,7 +744,7 @@ IN LPCRECTL pRect, IN DWORD dwFlags) { - INT numMonitors, iLargestArea = -1, i; + ULONG numMonitors, iLargestArea = 0, i; PRECTL rectList; HMONITOR *hMonitorList; HMONITOR hMonitor = NULL; @@ -789,44 +760,24 @@ } /* find intersecting monitors */ - numMonitors = IntGetMonitorsFromRect(&rect, NULL, NULL, 0, 0); - if (numMonitors < 0) - { - return (HMONITOR)NULL; - } - - if (numMonitors == 0) - { - if (dwFlags == MONITOR_DEFAULTTOPRIMARY) - { - PMONITOR monitorObj = IntGetPrimaryMonitor(); - if (monitorObj) - return UserHMGetHandle(monitorObj); - } - else if (dwFlags == MONITOR_DEFAULTTONEAREST) - { - numMonitors = IntGetMonitorsFromRect(&rect, &hMonitor, NULL, - 1, MONITOR_DEFAULTTONEAREST); - if (numMonitors <= 0) - { - /* error? */ - return (HMONITOR)NULL; - } - - if (numMonitors > 0) - return hMonitor; - } - /* else flag is DEFAULTTONULL */ - return (HMONITOR)NULL; - } - - hMonitorList = ExAllocatePoolWithTag(PagedPool, sizeof (HMONITOR) * numMonitors, USERTAG_MONITORRECTS); + numMonitors = IntGetMonitorsFromRect(&rect, &hMonitor, NULL, 1, dwFlags); + if (numMonitors <= 1) + { + return hMonitor; + } + + hMonitorList = ExAllocatePoolWithTag(PagedPool, + sizeof(HMONITOR) * numMonitors, + USERTAG_MONITORRECTS); if (hMonitorList == NULL) { /* FIXME: SetLastWin32Error? */ return (HMONITOR)NULL; } - rectList = ExAllocatePoolWithTag(PagedPool, sizeof (RECT) * numMonitors, USERTAG_MONITORRECTS); + + rectList = ExAllocatePoolWithTag(PagedPool, + sizeof(RECT) * numMonitors, + USERTAG_MONITORRECTS); if (rectList == NULL) { ExFreePoolWithTag(hMonitorList, USERTAG_MONITORRECTS); @@ -837,7 +788,7 @@ /* get intersecting monitors */ numMonitors = IntGetMonitorsFromRect(&rect, hMonitorList, rectList, numMonitors, 0); - if (numMonitors <= 0) + if (numMonitors == 0) { ExFreePoolWithTag(hMonitorList, USERTAG_MONITORRECTS); ExFreePoolWithTag(rectList, USERTAG_MONITORRECTS); @@ -847,9 +798,9 @@ /* find largest intersection */ for (i = 0; i < numMonitors; i++) { - INT area = (rectList[i].right - rectList[i].left) * - (rectList[i].bottom - rectList[i].top); - if (area > iLargestArea) + ULONG area = (rectList[i].right - rectList[i].left) * + (rectList[i].bottom - rectList[i].top); + if (area >= iLargestArea) { hMonitor = hMonitorList[i]; }
14 years, 1 month
1
0
0
0
[tkreuzer] 49309: [WIN32K] Fix possible NULL pointer dereferences. Spotted by Amine Khaldi.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Wed Oct 27 17:08:40 2010 New Revision: 49309 URL:
http://svn.reactos.org/svn/reactos?rev=49309&view=rev
Log: [WIN32K] Fix possible NULL pointer dereferences. Spotted by Amine Khaldi. Modified: trunk/reactos/subsystems/win32/win32k/ntuser/keyboard.c trunk/reactos/subsystems/win32/win32k/ntuser/message.c Modified: trunk/reactos/subsystems/win32/win32k/ntuser/keyboard.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/keyboard.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/keyboard.c [iso-8859-1] Wed Oct 27 17:08:40 2010 @@ -941,6 +941,12 @@ VscVkTable = KeyboardLayout->pVSCtoVK_E1; } + if (!VscVkTable) + { + DPRINT1("somethings wrong, Prefix=0x%x", Prefix); + return; + } + RawVk = 0xff; while (VscVkTable->Vsc) { Modified: trunk/reactos/subsystems/win32/win32k/ntuser/message.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/message.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/message.c [iso-8859-1] Wed Oct 27 17:08:40 2010 @@ -2492,18 +2492,23 @@ UserEnterExclusive(); /* Validate input */ - if (hWnd && (hWnd != INVALID_HANDLE_VALUE) && !(Window = UserGetWindowObject(hWnd))) - { - UserLeave(); - return FALSE; - } + if (hWnd && (hWnd != INVALID_HANDLE_VALUE)) + { + Window = UserGetWindowObject(hWnd); + if (!Window) + { + UserLeave(); + return FALSE; + } + } + switch(dwType) { case FNID_DEFWINDOWPROC: - UserRefObjectCo(Window, &Ref); + if (Window) UserRefObjectCo(Window, &Ref); lResult = IntDefWindowProc(Window, Msg, wParam, lParam, Ansi); Ret = TRUE; - UserDerefObjectCo(Window); + if (Window) UserDerefObjectCo(Window); break; case FNID_SENDNOTIFYMESSAGE: Ret = UserSendNotifyMessage(hWnd, Msg, wParam, lParam);
14 years, 1 month
1
0
0
0
[tkreuzer] 49308: [FORMATTING] - Apply consistent indentation of 4 spaces and ansi style formatting. - Remove the long GPL header
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Wed Oct 27 15:59:48 2010 New Revision: 49308 URL:
http://svn.reactos.org/svn/reactos?rev=49308&view=rev
Log: [FORMATTING] - Apply consistent indentation of 4 spaces and ansi style formatting. - Remove the long GPL header Modified: trunk/reactos/subsystems/win32/win32k/ntuser/monitor.c Modified: trunk/reactos/subsystems/win32/win32k/ntuser/monitor.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/monitor.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/monitor.c [iso-8859-1] Wed Oct 27 15:59:48 2010 @@ -1,21 +1,4 @@ /* - * ReactOS W32 Subsystem - * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * PURPOSE: Monitor support @@ -48,18 +31,18 @@ NTSTATUS InitMonitorImpl() { - DPRINT("Initializing monitor implementation...\n"); - - return STATUS_SUCCESS; + DPRINT("Initializing monitor implementation...\n"); + + return STATUS_SUCCESS; } NTSTATUS CleanupMonitorImpl() { - DPRINT("Cleaning up monitor implementation...\n"); - /* FIXME: Destroy monitor objects? */ - - return STATUS_SUCCESS; + DPRINT("Cleaning up monitor implementation...\n"); + /* FIXME: Destroy monitor objects? */ + + return STATUS_SUCCESS; } /* PRIVATE FUNCTIONS **********************************************************/ @@ -86,18 +69,18 @@ PMONITOR IntCreateMonitorObject() { - HANDLE Handle; - PMONITOR Monitor; - - Monitor = UserCreateObject(gHandleTable, NULL, &Handle, otMonitor, sizeof (MONITOR)); - if (Monitor == NULL) - { - return NULL; - } - - ExInitializeFastMutex(&Monitor->Lock); - - return Monitor; + HANDLE Handle; + PMONITOR Monitor; + + Monitor = UserCreateObject(gHandleTable, NULL, &Handle, otMonitor, sizeof (MONITOR)); + if (Monitor == NULL) + { + return NULL; + } + + ExInitializeFastMutex(&Monitor->Lock); + + return Monitor; } /* IntDestroyMonitorObject @@ -114,33 +97,32 @@ void IntDestroyMonitorObject(IN PMONITOR pMonitor) { - RtlFreeUnicodeString(&pMonitor->DeviceName); - UserDereferenceObject(pMonitor); + RtlFreeUnicodeString(&pMonitor->DeviceName); + UserDereferenceObject(pMonitor); } PMONITOR FASTCALL UserGetMonitorObject(IN HMONITOR hMonitor) { - PMONITOR Monitor; - - if (!hMonitor) - { - SetLastWin32Error(ERROR_INVALID_MONITOR_HANDLE); - return NULL; - } - - - Monitor = (PMONITOR)UserGetObject(gHandleTable, hMonitor, otMonitor); - if (!Monitor) - { - SetLastWin32Error(ERROR_INVALID_MONITOR_HANDLE); - return NULL; - } - - ASSERT(Monitor->head.cLockObj >= 0); - - return Monitor; + PMONITOR Monitor; + + if (!hMonitor) + { + SetLastWin32Error(ERROR_INVALID_MONITOR_HANDLE); + return NULL; + } + + Monitor = (PMONITOR)UserGetObject(gHandleTable, hMonitor, otMonitor); + if (!Monitor) + { + SetLastWin32Error(ERROR_INVALID_MONITOR_HANDLE); + return NULL; + } + + ASSERT(Monitor->head.cLockObj >= 0); + + return Monitor; } @@ -160,58 +142,58 @@ IntAttachMonitor(IN PDEVOBJ *pGdiDevice, IN ULONG DisplayNumber) { - PMONITOR Monitor; - WCHAR Buffer[CCHDEVICENAME]; - - DPRINT("Attaching monitor...\n"); - - /* create new monitor object */ - Monitor = IntCreateMonitorObject(); - if (Monitor == NULL) - { - DPRINT("Couldnt create monitor object\n"); - return STATUS_INSUFFICIENT_RESOURCES; - } - - _snwprintf(Buffer, CCHDEVICENAME, L"\\\\.\\DISPLAY%d", DisplayNumber + 1); - if (!RtlCreateUnicodeString(&Monitor->DeviceName, Buffer)) - { - DPRINT("Couldn't duplicate monitor name!\n"); - UserDereferenceObject(Monitor); - UserDeleteObject(UserHMGetHandle(Monitor), otMonitor); - return STATUS_INSUFFICIENT_RESOURCES; - } - - Monitor->GdiDevice = pGdiDevice; - Monitor->rcMonitor.left = 0; - Monitor->rcMonitor.top = 0; - Monitor->rcMonitor.right = Monitor->rcMonitor.left + pGdiDevice->gdiinfo.ulHorzRes; - Monitor->rcMonitor.bottom = Monitor->rcMonitor.top + pGdiDevice->gdiinfo.ulVertRes; - Monitor->rcWork = Monitor->rcMonitor; - Monitor->cWndStack = 0; - - Monitor->hrgnMonitor = IntSysCreateRectRgnIndirect( &Monitor->rcMonitor ); - - IntGdiSetRegionOwner(Monitor->hrgnMonitor, GDI_OBJ_HMGR_PUBLIC); - - if (gMonitorList == NULL) - { - DPRINT("Primary monitor is beeing attached\n"); - Monitor->IsPrimary = TRUE; - gMonitorList = Monitor; - } - else - { - PMONITOR p; - DPRINT("Additional monitor is beeing attached\n"); - for (p = gMonitorList; p->Next != NULL; p = p->Next) - { - p->Next = Monitor; - } - Monitor->Prev = p; - } - - return STATUS_SUCCESS; + PMONITOR Monitor; + WCHAR Buffer[CCHDEVICENAME]; + + DPRINT("Attaching monitor...\n"); + + /* create new monitor object */ + Monitor = IntCreateMonitorObject(); + if (Monitor == NULL) + { + DPRINT("Couldnt create monitor object\n"); + return STATUS_INSUFFICIENT_RESOURCES; + } + + _snwprintf(Buffer, CCHDEVICENAME, L"\\\\.\\DISPLAY%d", DisplayNumber + 1); + if (!RtlCreateUnicodeString(&Monitor->DeviceName, Buffer)) + { + DPRINT("Couldn't duplicate monitor name!\n"); + UserDereferenceObject(Monitor); + UserDeleteObject(UserHMGetHandle(Monitor), otMonitor); + return STATUS_INSUFFICIENT_RESOURCES; + } + + Monitor->GdiDevice = pGdiDevice; + Monitor->rcMonitor.left = 0; + Monitor->rcMonitor.top = 0; + Monitor->rcMonitor.right = Monitor->rcMonitor.left + pGdiDevice->gdiinfo.ulHorzRes; + Monitor->rcMonitor.bottom = Monitor->rcMonitor.top + pGdiDevice->gdiinfo.ulVertRes; + Monitor->rcWork = Monitor->rcMonitor; + Monitor->cWndStack = 0; + + Monitor->hrgnMonitor = IntSysCreateRectRgnIndirect( &Monitor->rcMonitor ); + + IntGdiSetRegionOwner(Monitor->hrgnMonitor, GDI_OBJ_HMGR_PUBLIC); + + if (gMonitorList == NULL) + { + DPRINT("Primary monitor is beeing attached\n"); + Monitor->IsPrimary = TRUE; + gMonitorList = Monitor; + } + else + { + PMONITOR p; + DPRINT("Additional monitor is beeing attached\n"); + for (p = gMonitorList; p->Next != NULL; p = p->Next) + { + p->Next = Monitor; + } + Monitor->Prev = p; + } + + return STATUS_SUCCESS; } /* IntDetachMonitor @@ -228,48 +210,48 @@ NTSTATUS IntDetachMonitor(IN PDEVOBJ *pGdiDevice) { - PMONITOR Monitor; - - for (Monitor = gMonitorList; Monitor != NULL; Monitor = Monitor->Next) - { - if (Monitor->GdiDevice == pGdiDevice) - break; - } - - if (Monitor == NULL) - { - /* no monitor for given device found */ - return STATUS_INVALID_PARAMETER; - } - - if (Monitor->IsPrimary && (Monitor->Next != NULL || Monitor->Prev != NULL)) - { - PMONITOR NewPrimaryMonitor = (Monitor->Prev != NULL) ? (Monitor->Prev) : (Monitor->Next); - - ExEnterCriticalRegionAndAcquireFastMutexUnsafe(&NewPrimaryMonitor->Lock); - NewPrimaryMonitor->IsPrimary = TRUE; - ExReleaseFastMutexUnsafeAndLeaveCriticalRegion(&NewPrimaryMonitor->Lock); - } - - if (gMonitorList == Monitor) - { - gMonitorList = Monitor->Next; - if (Monitor->Next != NULL) - Monitor->Next->Prev = NULL; - } - else - { - Monitor->Prev->Next = Monitor->Next; - if (Monitor->Next != NULL) - Monitor->Next->Prev = Monitor->Prev; - } - - if (Monitor->hrgnMonitor) - REGION_FreeRgnByHandle(Monitor->hrgnMonitor); - - IntDestroyMonitorObject(Monitor); - - return STATUS_SUCCESS; + PMONITOR Monitor; + + for (Monitor = gMonitorList; Monitor != NULL; Monitor = Monitor->Next) + { + if (Monitor->GdiDevice == pGdiDevice) + break; + } + + if (Monitor == NULL) + { + /* no monitor for given device found */ + return STATUS_INVALID_PARAMETER; + } + + if (Monitor->IsPrimary && (Monitor->Next != NULL || Monitor->Prev != NULL)) + { + PMONITOR NewPrimaryMonitor = (Monitor->Prev != NULL) ? (Monitor->Prev) : (Monitor->Next); + + ExEnterCriticalRegionAndAcquireFastMutexUnsafe(&NewPrimaryMonitor->Lock); + NewPrimaryMonitor->IsPrimary = TRUE; + ExReleaseFastMutexUnsafeAndLeaveCriticalRegion(&NewPrimaryMonitor->Lock); + } + + if (gMonitorList == Monitor) + { + gMonitorList = Monitor->Next; + if (Monitor->Next != NULL) + Monitor->Next->Prev = NULL; + } + else + { + Monitor->Prev->Next = Monitor->Next; + if (Monitor->Next != NULL) + Monitor->Next->Prev = Monitor->Prev; + } + + if (Monitor->hrgnMonitor) + REGION_FreeRgnByHandle(Monitor->hrgnMonitor); + + IntDestroyMonitorObject(Monitor); + + return STATUS_SUCCESS; } /* IntGetPrimaryMonitor @@ -283,16 +265,16 @@ FASTCALL IntGetPrimaryMonitor() { - PMONITOR Monitor; - - for (Monitor = gMonitorList; Monitor != NULL; Monitor = Monitor->Next) - { - /* FIXME: I guess locking the monitor is not neccessary to read 1 int */ - if (Monitor->IsPrimary) - break; - } - - return Monitor; + PMONITOR Monitor; + + for (Monitor = gMonitorList; Monitor != NULL; Monitor = Monitor->Next) + { + /* FIXME: I guess locking the monitor is not neccessary to read 1 int */ + if (Monitor->IsPrimary) + break; + } + + return Monitor; } /* IntGetMonitorsFromRect @@ -334,99 +316,99 @@ OPTIONAL IN DWORD listSize, OPTIONAL IN DWORD flags) { - PMONITOR Monitor, NearestMonitor = NULL, PrimaryMonitor = NULL; - UINT iCount = 0; - LONG iNearestDistanceX = 0x7fffffff, iNearestDistanceY = 0x7fffffff; - - /* find monitors which intersect the rectangle */ - for (Monitor = gMonitorList; Monitor != NULL; Monitor = Monitor->Next) - { - RECTL MonitorRect, IntersectionRect; - - ExEnterCriticalRegionAndAcquireFastMutexUnsafe(&Monitor->Lock); - MonitorRect = Monitor->rcMonitor; - ExReleaseFastMutexUnsafeAndLeaveCriticalRegion(&Monitor->Lock); - - DPRINT("MonitorRect: left = %d, top = %d, right = %d, bottom = %d\n", - MonitorRect.left, MonitorRect.top, MonitorRect.right, MonitorRect.bottom); - - if (flags == MONITOR_DEFAULTTOPRIMARY && Monitor->IsPrimary) - { - PrimaryMonitor = Monitor; - } - - if (pRect != NULL) - { - BOOL intersects = TRUE; - - /* check if the rect intersects the monitor */ - if ((pRect->right < MonitorRect.left) || (pRect->left > MonitorRect.right) || - (pRect->bottom < MonitorRect.top) || (pRect->top > MonitorRect.bottom)) - { - intersects = FALSE; - } - - if (flags == MONITOR_DEFAULTTONEAREST && !intersects) - { - INT distanceX, distanceY; - - distanceX = MIN(ABS(MonitorRect.left - pRect->right), - ABS(pRect->left - MonitorRect.right)); - distanceY = MIN(ABS(MonitorRect.top - pRect->bottom), - ABS(pRect->top - MonitorRect.bottom)); - - if (((distanceX < iNearestDistanceX) && (distanceY <= iNearestDistanceY)) || - ((distanceX <= iNearestDistanceX) && (distanceY < iNearestDistanceY))) + PMONITOR Monitor, NearestMonitor = NULL, PrimaryMonitor = NULL; + UINT iCount = 0; + LONG iNearestDistanceX = 0x7fffffff, iNearestDistanceY = 0x7fffffff; + + /* find monitors which intersect the rectangle */ + for (Monitor = gMonitorList; Monitor != NULL; Monitor = Monitor->Next) + { + RECTL MonitorRect, IntersectionRect; + + ExEnterCriticalRegionAndAcquireFastMutexUnsafe(&Monitor->Lock); + MonitorRect = Monitor->rcMonitor; + ExReleaseFastMutexUnsafeAndLeaveCriticalRegion(&Monitor->Lock); + + DPRINT("MonitorRect: left = %d, top = %d, right = %d, bottom = %d\n", + MonitorRect.left, MonitorRect.top, MonitorRect.right, MonitorRect.bottom); + + if (flags == MONITOR_DEFAULTTOPRIMARY && Monitor->IsPrimary) + { + PrimaryMonitor = Monitor; + } + + if (pRect != NULL) + { + BOOL intersects = TRUE; + + /* check if the rect intersects the monitor */ + if ((pRect->right < MonitorRect.left) || (pRect->left > MonitorRect.right) || + (pRect->bottom < MonitorRect.top) || (pRect->top > MonitorRect.bottom)) { - iNearestDistanceX = distanceX; - iNearestDistanceY = distanceY; - NearestMonitor = Monitor; + intersects = FALSE; } - } - - if (!intersects) - continue; - - /* calculate intersection */ - IntersectionRect.left = MAX(MonitorRect.left, pRect->left); - IntersectionRect.top = MAX(MonitorRect.top, pRect->top); - IntersectionRect.right = MIN(MonitorRect.right, pRect->right); - IntersectionRect.bottom = MIN(MonitorRect.bottom, pRect->bottom); - } - else - { - IntersectionRect = MonitorRect; - } - - if (iCount < listSize) - { - if (hMonitorList != NULL) - hMonitorList[iCount] = UserHMGetHandle(Monitor); - if (monitorRectList != NULL) - monitorRectList[iCount] = IntersectionRect; - } - iCount++; - } - - if (iCount == 0 && flags == MONITOR_DEFAULTTONEAREST) - { - if (iCount < listSize) - { - if (hMonitorList != NULL) - hMonitorList[iCount] = UserHMGetHandle(NearestMonitor); - } - iCount++; - } - else if (iCount == 0 && flags == MONITOR_DEFAULTTOPRIMARY) - { - if (iCount < listSize) - { - if (hMonitorList != NULL) - hMonitorList[iCount] = UserHMGetHandle(PrimaryMonitor); - } - iCount++; - } - return iCount; + + if (flags == MONITOR_DEFAULTTONEAREST && !intersects) + { + INT distanceX, distanceY; + + distanceX = MIN(ABS(MonitorRect.left - pRect->right), + ABS(pRect->left - MonitorRect.right)); + distanceY = MIN(ABS(MonitorRect.top - pRect->bottom), + ABS(pRect->top - MonitorRect.bottom)); + + if (((distanceX < iNearestDistanceX) && (distanceY <= iNearestDistanceY)) || + ((distanceX <= iNearestDistanceX) && (distanceY < iNearestDistanceY))) + { + iNearestDistanceX = distanceX; + iNearestDistanceY = distanceY; + NearestMonitor = Monitor; + } + } + + if (!intersects) + continue; + + /* calculate intersection */ + IntersectionRect.left = MAX(MonitorRect.left, pRect->left); + IntersectionRect.top = MAX(MonitorRect.top, pRect->top); + IntersectionRect.right = MIN(MonitorRect.right, pRect->right); + IntersectionRect.bottom = MIN(MonitorRect.bottom, pRect->bottom); + } + else + { + IntersectionRect = MonitorRect; + } + + if (iCount < listSize) + { + if (hMonitorList != NULL) + hMonitorList[iCount] = UserHMGetHandle(Monitor); + if (monitorRectList != NULL) + monitorRectList[iCount] = IntersectionRect; + } + iCount++; + } + + if (iCount == 0 && flags == MONITOR_DEFAULTTONEAREST) + { + if (iCount < listSize) + { + if (hMonitorList != NULL) + hMonitorList[iCount] = UserHMGetHandle(NearestMonitor); + } + iCount++; + } + else if (iCount == 0 && flags == MONITOR_DEFAULTTOPRIMARY) + { + if (iCount < listSize) + { + if (hMonitorList != NULL) + hMonitorList[iCount] = UserHMGetHandle(PrimaryMonitor); + } + iCount++; + } + return iCount; } /* PUBLIC FUNCTIONS ***********************************************************/ @@ -464,146 +446,147 @@ INT APIENTRY NtUserEnumDisplayMonitors( - OPTIONAL IN HDC hDC, - OPTIONAL IN LPCRECTL pRect, - OPTIONAL OUT HMONITOR *hMonitorList, - OPTIONAL OUT PRECTL monitorRectList, - OPTIONAL IN DWORD listSize) -{ - INT numMonitors, i; - HMONITOR *safeHMonitorList = NULL; - PRECTL safeRectList = NULL; - RECTL rect, *myRect; - RECTL dcRect; - NTSTATUS status; - - /* get rect */ - if (pRect != NULL) - { - status = MmCopyFromCaller(&rect, pRect, sizeof (RECT)); - if (!NT_SUCCESS(status)) - { - DPRINT("MmCopyFromCaller() failed!\n"); - SetLastNtError(status); - return -1; - } - } - - if (hDC != NULL) - { - PDC dc; - INT regionType; - - /* get visible region bounding rect */ - dc = DC_LockDc(hDC); - if (dc == NULL) - { - DPRINT("DC_LockDc() failed!\n"); - /* FIXME: setlasterror? */ - return -1; - } - regionType = REGION_GetRgnBox(dc->prgnVis, &dcRect); - DC_UnlockDc(dc); - - if (regionType == 0) - { - DPRINT("NtGdiGetRgnBox() failed!\n"); - return -1; - } - if (regionType == NULLREGION) - return 0; - if (regionType == COMPLEXREGION) - { /* TODO: warning */ - } - - /* if hDC and pRect are given the area of interest is pRect with - coordinate origin at the DC position */ - if (pRect != NULL) - { - rect.left += dcRect.left; - rect.right += dcRect.left; - rect.top += dcRect.top; - rect.bottom += dcRect.top; - } - /* if hDC is given and pRect is not the area of interest is the - bounding rect of hDC */ - else - { - rect = dcRect; - } - } - - if (hDC == NULL && pRect == NULL) - myRect = NULL; - else - myRect = ▭ - - /* find intersecting monitors */ - numMonitors = IntGetMonitorsFromRect(myRect, NULL, NULL, 0, 0); - if (numMonitors == 0 || listSize == 0 || - (hMonitorList == NULL && monitorRectList == NULL)) - { - DPRINT("numMonitors = %d\n", numMonitors); - return numMonitors; - } - - if (hMonitorList != NULL && listSize != 0) - { - safeHMonitorList = ExAllocatePoolWithTag(PagedPool, sizeof (HMONITOR) * listSize, USERTAG_MONITORRECTS); - if (safeHMonitorList == NULL) - { - /* FIXME: SetLastWin32Error? */ - return -1; - } - } - if (monitorRectList != NULL && listSize != 0) - { - safeRectList = ExAllocatePoolWithTag(PagedPool, sizeof (RECT) * listSize, USERTAG_MONITORRECTS); - if (safeRectList == NULL) - { - ExFreePoolWithTag(safeHMonitorList, USERTAG_MONITORRECTS); - /* FIXME: SetLastWin32Error? */ - return -1; - } - } - - /* get intersecting monitors */ - numMonitors = IntGetMonitorsFromRect(myRect, safeHMonitorList, safeRectList, - listSize, 0 ); - - if (hDC != NULL && pRect != NULL && safeRectList != NULL) - for (i = 0; i < numMonitors; i++) - { - safeRectList[i].left -= dcRect.left; - safeRectList[i].right -= dcRect.left; - safeRectList[i].top -= dcRect.top; - safeRectList[i].bottom -= dcRect.top; - } - - /* output result */ - if (hMonitorList != NULL && listSize != 0) - { - status = MmCopyToCaller(hMonitorList, safeHMonitorList, sizeof (HMONITOR) * listSize); - ExFreePool(safeHMonitorList); - if (!NT_SUCCESS(status)) - { - ExFreePoolWithTag(safeRectList, USERTAG_MONITORRECTS); - SetLastNtError(status); - return -1; - } - } - if (monitorRectList != NULL && listSize != 0) - { - status = MmCopyToCaller(monitorRectList, safeRectList, sizeof (RECT) * listSize); - ExFreePoolWithTag(safeRectList, USERTAG_MONITORRECTS); - if (!NT_SUCCESS(status)) - { - SetLastNtError(status); - return -1; - } - } - - return numMonitors; + OPTIONAL IN HDC hDC, + OPTIONAL IN LPCRECTL pRect, + OPTIONAL OUT HMONITOR *hMonitorList, + OPTIONAL OUT PRECTL monitorRectList, + OPTIONAL IN DWORD listSize) +{ + INT numMonitors, i; + HMONITOR *safeHMonitorList = NULL; + PRECTL safeRectList = NULL; + RECTL rect, *myRect; + RECTL dcRect; + NTSTATUS status; + + /* get rect */ + if (pRect != NULL) + { + status = MmCopyFromCaller(&rect, pRect, sizeof (RECT)); + if (!NT_SUCCESS(status)) + { + DPRINT("MmCopyFromCaller() failed!\n"); + SetLastNtError(status); + return -1; + } + } + + if (hDC != NULL) + { + PDC dc; + INT regionType; + + /* get visible region bounding rect */ + dc = DC_LockDc(hDC); + if (dc == NULL) + { + DPRINT("DC_LockDc() failed!\n"); + /* FIXME: setlasterror? */ + return -1; + } + regionType = REGION_GetRgnBox(dc->prgnVis, &dcRect); + DC_UnlockDc(dc); + + if (regionType == 0) + { + DPRINT("NtGdiGetRgnBox() failed!\n"); + return -1; + } + if (regionType == NULLREGION) + return 0; + if (regionType == COMPLEXREGION) + { + /* TODO: warning */ + } + + /* if hDC and pRect are given the area of interest is pRect with + coordinate origin at the DC position */ + if (pRect != NULL) + { + rect.left += dcRect.left; + rect.right += dcRect.left; + rect.top += dcRect.top; + rect.bottom += dcRect.top; + } + /* if hDC is given and pRect is not the area of interest is the + bounding rect of hDC */ + else + { + rect = dcRect; + } + } + + if (hDC == NULL && pRect == NULL) + myRect = NULL; + else + myRect = ▭ + + /* find intersecting monitors */ + numMonitors = IntGetMonitorsFromRect(myRect, NULL, NULL, 0, 0); + if (numMonitors == 0 || listSize == 0 || + (hMonitorList == NULL && monitorRectList == NULL)) + { + DPRINT("numMonitors = %d\n", numMonitors); + return numMonitors; + } + + if (hMonitorList != NULL && listSize != 0) + { + safeHMonitorList = ExAllocatePoolWithTag(PagedPool, sizeof (HMONITOR) * listSize, USERTAG_MONITORRECTS); + if (safeHMonitorList == NULL) + { + /* FIXME: SetLastWin32Error? */ + return -1; + } + } + if (monitorRectList != NULL && listSize != 0) + { + safeRectList = ExAllocatePoolWithTag(PagedPool, sizeof (RECT) * listSize, USERTAG_MONITORRECTS); + if (safeRectList == NULL) + { + ExFreePoolWithTag(safeHMonitorList, USERTAG_MONITORRECTS); + /* FIXME: SetLastWin32Error? */ + return -1; + } + } + + /* get intersecting monitors */ + numMonitors = IntGetMonitorsFromRect(myRect, safeHMonitorList, safeRectList, + listSize, 0 ); + + if (hDC != NULL && pRect != NULL && safeRectList != NULL) + for (i = 0; i < numMonitors; i++) + { + safeRectList[i].left -= dcRect.left; + safeRectList[i].right -= dcRect.left; + safeRectList[i].top -= dcRect.top; + safeRectList[i].bottom -= dcRect.top; + } + + /* output result */ + if (hMonitorList != NULL && listSize != 0) + { + status = MmCopyToCaller(hMonitorList, safeHMonitorList, sizeof (HMONITOR) * listSize); + ExFreePool(safeHMonitorList); + if (!NT_SUCCESS(status)) + { + ExFreePoolWithTag(safeRectList, USERTAG_MONITORRECTS); + SetLastNtError(status); + return -1; + } + } + if (monitorRectList != NULL && listSize != 0) + { + status = MmCopyToCaller(monitorRectList, safeRectList, sizeof (RECT) * listSize); + ExFreePoolWithTag(safeRectList, USERTAG_MONITORRECTS); + if (!NT_SUCCESS(status)) + { + SetLastNtError(status); + return -1; + } + } + + return numMonitors; } /* NtUserGetMonitorInfo @@ -633,81 +616,81 @@ BOOL APIENTRY NtUserGetMonitorInfo( - IN HMONITOR hMonitor, - OUT LPMONITORINFO pMonitorInfo) -{ - PMONITOR Monitor; - MONITORINFOEXW MonitorInfo; - NTSTATUS Status; - DECLARE_RETURN(BOOL); - - DPRINT("Enter NtUserGetMonitorInfo\n"); - UserEnterShared(); - - /* get monitor object */ - if (!(Monitor = UserGetMonitorObject(hMonitor))) - { - DPRINT("Couldnt find monitor 0x%lx\n", hMonitor); - RETURN(FALSE); - } - - if(pMonitorInfo == NULL) - { - SetLastNtError(STATUS_INVALID_PARAMETER); - RETURN(FALSE); - } - - /* get size of pMonitorInfo */ - Status = MmCopyFromCaller(&MonitorInfo.cbSize, &pMonitorInfo->cbSize, sizeof (MonitorInfo.cbSize)); - if (!NT_SUCCESS(Status)) - { - SetLastNtError(Status); - RETURN(FALSE); - } - if ((MonitorInfo.cbSize != sizeof (MONITORINFO)) && - (MonitorInfo.cbSize != sizeof (MONITORINFOEXW))) - { - SetLastNtError(STATUS_INVALID_PARAMETER); - RETURN(FALSE); - } - - /* fill monitor info */ - MonitorInfo.rcMonitor = Monitor->rcMonitor; - MonitorInfo.rcWork = Monitor->rcWork; - MonitorInfo.dwFlags = 0; - - if (Monitor->IsPrimary) - MonitorInfo.dwFlags |= MONITORINFOF_PRIMARY; - - /* fill device name */ - if (MonitorInfo.cbSize == sizeof (MONITORINFOEXW)) - { - WCHAR nul = L'\0'; - INT len = Monitor->DeviceName.Length; - if (len >= CCHDEVICENAME * sizeof (WCHAR)) - len = (CCHDEVICENAME - 1) * sizeof (WCHAR); - - memcpy(MonitorInfo.szDevice, Monitor->DeviceName.Buffer, len); - memcpy(MonitorInfo.szDevice + (len / sizeof (WCHAR)), &nul, sizeof (WCHAR)); - } - - /* output data */ - Status = MmCopyToCaller(pMonitorInfo, &MonitorInfo, MonitorInfo.cbSize); - if (!NT_SUCCESS(Status)) - { - DPRINT("GetMonitorInfo: MmCopyToCaller failed\n"); - SetLastNtError(Status); - RETURN(FALSE); - } - - DPRINT("GetMonitorInfo: success\n"); - - RETURN(TRUE); + IN HMONITOR hMonitor, + OUT LPMONITORINFO pMonitorInfo) +{ + PMONITOR Monitor; + MONITORINFOEXW MonitorInfo; + NTSTATUS Status; + DECLARE_RETURN(BOOL); + + DPRINT("Enter NtUserGetMonitorInfo\n"); + UserEnterShared(); + + /* get monitor object */ + if (!(Monitor = UserGetMonitorObject(hMonitor))) + { + DPRINT("Couldnt find monitor 0x%lx\n", hMonitor); + RETURN(FALSE); + } + + if(pMonitorInfo == NULL) + { + SetLastNtError(STATUS_INVALID_PARAMETER); + RETURN(FALSE); + } + + /* get size of pMonitorInfo */ + Status = MmCopyFromCaller(&MonitorInfo.cbSize, &pMonitorInfo->cbSize, sizeof (MonitorInfo.cbSize)); + if (!NT_SUCCESS(Status)) + { + SetLastNtError(Status); + RETURN(FALSE); + } + if ((MonitorInfo.cbSize != sizeof (MONITORINFO)) && + (MonitorInfo.cbSize != sizeof (MONITORINFOEXW))) + { + SetLastNtError(STATUS_INVALID_PARAMETER); + RETURN(FALSE); + } + + /* fill monitor info */ + MonitorInfo.rcMonitor = Monitor->rcMonitor; + MonitorInfo.rcWork = Monitor->rcWork; + MonitorInfo.dwFlags = 0; + + if (Monitor->IsPrimary) + MonitorInfo.dwFlags |= MONITORINFOF_PRIMARY; + + /* fill device name */ + if (MonitorInfo.cbSize == sizeof (MONITORINFOEXW)) + { + WCHAR nul = L'\0'; + INT len = Monitor->DeviceName.Length; + if (len >= CCHDEVICENAME * sizeof (WCHAR)) + len = (CCHDEVICENAME - 1) * sizeof (WCHAR); + + memcpy(MonitorInfo.szDevice, Monitor->DeviceName.Buffer, len); + memcpy(MonitorInfo.szDevice + (len / sizeof (WCHAR)), &nul, sizeof (WCHAR)); + } + + /* output data */ + Status = MmCopyToCaller(pMonitorInfo, &MonitorInfo, MonitorInfo.cbSize); + if (!NT_SUCCESS(Status)) + { + DPRINT("GetMonitorInfo: MmCopyToCaller failed\n"); + SetLastNtError(Status); + RETURN(FALSE); + } + + DPRINT("GetMonitorInfo: success\n"); + + RETURN(TRUE); CLEANUP: - DPRINT("Leave NtUserGetMonitorInfo, ret=%i\n",_ret_); - UserLeave(); - END_CLEANUP; + DPRINT("Leave NtUserGetMonitorInfo, ret=%i\n",_ret_); + UserLeave(); + END_CLEANUP; } /* NtUserMonitorFromPoint @@ -729,42 +712,42 @@ HMONITOR APIENTRY NtUserMonitorFromPoint( - IN POINT point, - IN DWORD dwFlags) -{ - INT NumMonitors; - RECTL InRect; - HMONITOR hMonitor = NULL; - - /* fill inRect */ - InRect.left = InRect.right = point.x; - InRect.top = InRect.bottom = point.y; - - /* find intersecting monitor */ - NumMonitors = IntGetMonitorsFromRect(&InRect, &hMonitor, NULL, 1, 0); - if (NumMonitors < 0) - { - return (HMONITOR)NULL; - } - - if (hMonitor == NULL) - { - if (dwFlags == MONITOR_DEFAULTTOPRIMARY) - { - PMONITOR MonitorObj = IntGetPrimaryMonitor(); - if (MonitorObj) - hMonitor = UserHMGetHandle(MonitorObj); - } - else if (dwFlags == MONITOR_DEFAULTTONEAREST) - { - NumMonitors = IntGetMonitorsFromRect(&InRect, &hMonitor, NULL, - 1, MONITOR_DEFAULTTONEAREST); - /*ASSERT( (numMonitors > 0) && (hMonitor != NULL) );*/ - } - /* else flag is DEFAULTTONULL */ - } - - return hMonitor; + IN POINT point, + IN DWORD dwFlags) +{ + INT NumMonitors; + RECTL InRect; + HMONITOR hMonitor = NULL; + + /* fill inRect */ + InRect.left = InRect.right = point.x; + InRect.top = InRect.bottom = point.y; + + /* find intersecting monitor */ + NumMonitors = IntGetMonitorsFromRect(&InRect, &hMonitor, NULL, 1, 0); + if (NumMonitors < 0) + { + return (HMONITOR)NULL; + } + + if (hMonitor == NULL) + { + if (dwFlags == MONITOR_DEFAULTTOPRIMARY) + { + PMONITOR MonitorObj = IntGetPrimaryMonitor(); + if (MonitorObj) + hMonitor = UserHMGetHandle(MonitorObj); + } + else if (dwFlags == MONITOR_DEFAULTTONEAREST) + { + NumMonitors = IntGetMonitorsFromRect(&InRect, &hMonitor, NULL, + 1, MONITOR_DEFAULTTONEAREST); + /*ASSERT( (numMonitors > 0) && (hMonitor != NULL) );*/ + } + /* else flag is DEFAULTTONULL */ + } + + return hMonitor; } /* NtUserMonitorFromRect @@ -787,131 +770,131 @@ HMONITOR APIENTRY NtUserMonitorFromRect( - IN LPCRECTL pRect, - IN DWORD dwFlags) -{ - INT numMonitors, iLargestArea = -1, i; - PRECTL rectList; - HMONITOR *hMonitorList; - HMONITOR hMonitor = NULL; - RECTL rect; - NTSTATUS status; - - /* get rect */ - status = MmCopyFromCaller(&rect, pRect, sizeof (RECT)); - if (!NT_SUCCESS(status)) - { - SetLastNtError(status); - return (HMONITOR)NULL; - } - - /* find intersecting monitors */ - numMonitors = IntGetMonitorsFromRect(&rect, NULL, NULL, 0, 0); - if (numMonitors < 0) - { - return (HMONITOR)NULL; - } - - if (numMonitors == 0) - { - if (dwFlags == MONITOR_DEFAULTTOPRIMARY) - { - PMONITOR monitorObj = IntGetPrimaryMonitor(); - if (monitorObj) - return UserHMGetHandle(monitorObj); - } - else if (dwFlags == MONITOR_DEFAULTTONEAREST) - { - numMonitors = IntGetMonitorsFromRect(&rect, &hMonitor, NULL, - 1, MONITOR_DEFAULTTONEAREST); - if (numMonitors <= 0) - { - /* error? */ - return (HMONITOR)NULL; - } - - if (numMonitors > 0) - return hMonitor; - } - /* else flag is DEFAULTTONULL */ - return (HMONITOR)NULL; - } - - hMonitorList = ExAllocatePoolWithTag(PagedPool, sizeof (HMONITOR) * numMonitors, USERTAG_MONITORRECTS); - if (hMonitorList == NULL) - { - /* FIXME: SetLastWin32Error? */ - return (HMONITOR)NULL; - } - rectList = ExAllocatePoolWithTag(PagedPool, sizeof (RECT) * numMonitors, USERTAG_MONITORRECTS); - if (rectList == NULL) - { - ExFreePoolWithTag(hMonitorList, USERTAG_MONITORRECTS); - /* FIXME: SetLastWin32Error? */ - return (HMONITOR)NULL; - } - - /* get intersecting monitors */ - numMonitors = IntGetMonitorsFromRect(&rect, hMonitorList, rectList, - numMonitors, 0); - if (numMonitors <= 0) - { - ExFreePoolWithTag(hMonitorList, USERTAG_MONITORRECTS); - ExFreePoolWithTag(rectList, USERTAG_MONITORRECTS); - return (HMONITOR)NULL; - } - - /* find largest intersection */ - for (i = 0; i < numMonitors; i++) - { - INT area = (rectList[i].right - rectList[i].left) * - (rectList[i].bottom - rectList[i].top); - if (area > iLargestArea) - { - hMonitor = hMonitorList[i]; - } - } - - ExFreePoolWithTag(hMonitorList, USERTAG_MONITORRECTS); - ExFreePoolWithTag(rectList, USERTAG_MONITORRECTS); - - return hMonitor; + IN LPCRECTL pRect, + IN DWORD dwFlags) +{ + INT numMonitors, iLargestArea = -1, i; + PRECTL rectList; + HMONITOR *hMonitorList; + HMONITOR hMonitor = NULL; + RECTL rect; + NTSTATUS status; + + /* get rect */ + status = MmCopyFromCaller(&rect, pRect, sizeof (RECT)); + if (!NT_SUCCESS(status)) + { + SetLastNtError(status); + return (HMONITOR)NULL; + } + + /* find intersecting monitors */ + numMonitors = IntGetMonitorsFromRect(&rect, NULL, NULL, 0, 0); + if (numMonitors < 0) + { + return (HMONITOR)NULL; + } + + if (numMonitors == 0) + { + if (dwFlags == MONITOR_DEFAULTTOPRIMARY) + { + PMONITOR monitorObj = IntGetPrimaryMonitor(); + if (monitorObj) + return UserHMGetHandle(monitorObj); + } + else if (dwFlags == MONITOR_DEFAULTTONEAREST) + { + numMonitors = IntGetMonitorsFromRect(&rect, &hMonitor, NULL, + 1, MONITOR_DEFAULTTONEAREST); + if (numMonitors <= 0) + { + /* error? */ + return (HMONITOR)NULL; + } + + if (numMonitors > 0) + return hMonitor; + } + /* else flag is DEFAULTTONULL */ + return (HMONITOR)NULL; + } + + hMonitorList = ExAllocatePoolWithTag(PagedPool, sizeof (HMONITOR) * numMonitors, USERTAG_MONITORRECTS); + if (hMonitorList == NULL) + { + /* FIXME: SetLastWin32Error? */ + return (HMONITOR)NULL; + } + rectList = ExAllocatePoolWithTag(PagedPool, sizeof (RECT) * numMonitors, USERTAG_MONITORRECTS); + if (rectList == NULL) + { + ExFreePoolWithTag(hMonitorList, USERTAG_MONITORRECTS); + /* FIXME: SetLastWin32Error? */ + return (HMONITOR)NULL; + } + + /* get intersecting monitors */ + numMonitors = IntGetMonitorsFromRect(&rect, hMonitorList, rectList, + numMonitors, 0); + if (numMonitors <= 0) + { + ExFreePoolWithTag(hMonitorList, USERTAG_MONITORRECTS); + ExFreePoolWithTag(rectList, USERTAG_MONITORRECTS); + return (HMONITOR)NULL; + } + + /* find largest intersection */ + for (i = 0; i < numMonitors; i++) + { + INT area = (rectList[i].right - rectList[i].left) * + (rectList[i].bottom - rectList[i].top); + if (area > iLargestArea) + { + hMonitor = hMonitorList[i]; + } + } + + ExFreePoolWithTag(hMonitorList, USERTAG_MONITORRECTS); + ExFreePoolWithTag(rectList, USERTAG_MONITORRECTS); + + return hMonitor; } HMONITOR APIENTRY NtUserMonitorFromWindow( - IN HWND hWnd, - IN DWORD dwFlags) -{ - PWND Window; - HMONITOR hMonitor = NULL; - RECTL Rect; - DECLARE_RETURN(HMONITOR); - - DPRINT("Enter NtUserMonitorFromWindow\n"); - UserEnterShared(); - - if (!(Window = UserGetWindowObject(hWnd))) - { - if (dwFlags == MONITOR_DEFAULTTONULL) - { - RETURN(hMonitor); - } - IntGetMonitorsFromRect(NULL, &hMonitor, NULL, 1, dwFlags); - RETURN(hMonitor); - } - - Rect.left = Rect.right = Window->rcWindow.left; - Rect.top = Rect.bottom = Window->rcWindow.bottom; - - IntGetMonitorsFromRect(&Rect, &hMonitor, NULL, 1, dwFlags); - - RETURN(hMonitor); + IN HWND hWnd, + IN DWORD dwFlags) +{ + PWND Window; + HMONITOR hMonitor = NULL; + RECTL Rect; + DECLARE_RETURN(HMONITOR); + + DPRINT("Enter NtUserMonitorFromWindow\n"); + UserEnterShared(); + + if (!(Window = UserGetWindowObject(hWnd))) + { + if (dwFlags == MONITOR_DEFAULTTONULL) + { + RETURN(hMonitor); + } + IntGetMonitorsFromRect(NULL, &hMonitor, NULL, 1, dwFlags); + RETURN(hMonitor); + } + + Rect.left = Rect.right = Window->rcWindow.left; + Rect.top = Rect.bottom = Window->rcWindow.bottom; + + IntGetMonitorsFromRect(&Rect, &hMonitor, NULL, 1, dwFlags); + + RETURN(hMonitor); CLEANUP: - DPRINT("Leave NtUserMonitorFromWindow, ret=%i\n",_ret_); - UserLeave(); - END_CLEANUP; -} + DPRINT("Leave NtUserMonitorFromWindow, ret=%i\n",_ret_); + UserLeave(); + END_CLEANUP; +}
14 years, 1 month
1
0
0
0
[jgardou] 49307: Sync with trunk (r49303)
by jgardou@svn.reactos.org
Author: jgardou Date: Wed Oct 27 15:52:24 2010 New Revision: 49307 URL:
http://svn.reactos.org/svn/reactos?rev=49307&view=rev
Log: Sync with trunk (r49303) Added: branches/cmake-bringup/subsystems/win32/win32k/dib/alphablend.c - copied unchanged from r49306, trunk/reactos/subsystems/win32/win32k/dib/alphablend.c branches/cmake-bringup/subsystems/win32/win32k/eng/ldevobj.c - copied unchanged from r49306, trunk/reactos/subsystems/win32/win32k/eng/ldevobj.c branches/cmake-bringup/subsystems/win32/win32k/eng/pdevobj.c - copied unchanged from r49306, trunk/reactos/subsystems/win32/win32k/eng/pdevobj.c branches/cmake-bringup/subsystems/win32/win32k/eng/rlecomp.c - copied unchanged from r49306, trunk/reactos/subsystems/win32/win32k/eng/rlecomp.c branches/cmake-bringup/subsystems/win32/win32k/include/device.h - copied unchanged from r49306, trunk/reactos/subsystems/win32/win32k/include/device.h branches/cmake-bringup/subsystems/win32/win32k/include/ldevobj.h - copied unchanged from r49306, trunk/reactos/subsystems/win32/win32k/include/ldevobj.h Removed: branches/cmake-bringup/subsystems/win32/win32k/ldr/ Modified: branches/cmake-bringup/ (props changed) branches/cmake-bringup/base/applications/rapps/rapps/firefox36.txt branches/cmake-bringup/base/applications/rapps/rapps/libreoffice.txt branches/cmake-bringup/base/applications/rapps/rapps/mirandaim.txt branches/cmake-bringup/base/applications/rapps/rapps/mirc.txt branches/cmake-bringup/base/applications/rapps/rapps/opera.txt branches/cmake-bringup/base/applications/rapps/rapps/scummvm.txt branches/cmake-bringup/base/applications/rapps/rapps/seamonkey.txt branches/cmake-bringup/base/applications/rapps/rapps/thunderbird.txt branches/cmake-bringup/base/shell/explorer/desktop/desktop.cpp branches/cmake-bringup/base/system/services/rpcserver.c branches/cmake-bringup/boot/bootdata/hivesys_i386.inf branches/cmake-bringup/boot/bootdata/packages/reactos.dff branches/cmake-bringup/dll/win32/gdi32/include/gdi32p.h branches/cmake-bringup/dll/win32/gdi32/misc/wingl.c branches/cmake-bringup/dll/win32/gdi32/objects/bitmap.c branches/cmake-bringup/dll/win32/gdi32/objects/dc.c branches/cmake-bringup/dll/win32/user32/include/cursor.h branches/cmake-bringup/dll/win32/user32/include/user32.h branches/cmake-bringup/dll/win32/user32/include/user32p.h branches/cmake-bringup/dll/win32/user32/misc/display.c branches/cmake-bringup/dll/win32/user32/misc/misc.c branches/cmake-bringup/dll/win32/user32/windows/class.c branches/cmake-bringup/dll/win32/user32/windows/cursoricon.c branches/cmake-bringup/dll/win32/user32/windows/defwnd.c branches/cmake-bringup/dll/win32/user32/windows/draw.c branches/cmake-bringup/dll/win32/user32/windows/hook.c branches/cmake-bringup/dll/win32/user32/windows/input.c branches/cmake-bringup/dll/win32/user32/windows/menu.c branches/cmake-bringup/dll/win32/user32/windows/message.c branches/cmake-bringup/dll/win32/user32/windows/window.c branches/cmake-bringup/drivers/ksfilter/ks/property.c branches/cmake-bringup/drivers/wdm/audio/backpln/portcls/filter_wavecyclic.cpp branches/cmake-bringup/drivers/wdm/audio/backpln/portcls/filter_wavepci.cpp branches/cmake-bringup/drivers/wdm/audio/backpln/portcls/guids.cpp branches/cmake-bringup/drivers/wdm/audio/backpln/portcls/interfaces.hpp branches/cmake-bringup/drivers/wdm/audio/backpln/portcls/irpstream.cpp branches/cmake-bringup/drivers/wdm/audio/backpln/portcls/pin_dmus.cpp branches/cmake-bringup/drivers/wdm/audio/backpln/portcls/pin_wavecyclic.cpp branches/cmake-bringup/drivers/wdm/audio/backpln/portcls/pin_wavepci.cpp branches/cmake-bringup/drivers/wdm/audio/backpln/portcls/pin_wavert.cpp branches/cmake-bringup/drivers/wdm/audio/backpln/portcls/port_wavecyclic.cpp branches/cmake-bringup/drivers/wdm/audio/backpln/portcls/private.hpp branches/cmake-bringup/drivers/wdm/audio/backpln/portcls/undoc.cpp branches/cmake-bringup/hal/halx86/generic/usage.c branches/cmake-bringup/include/psdk/ks.h branches/cmake-bringup/include/psdk/ksmedia.h branches/cmake-bringup/include/reactos/win32k/ntuser.h branches/cmake-bringup/ntoskrnl/include/internal/io.h branches/cmake-bringup/ntoskrnl/io/iomgr/iorsrce.c branches/cmake-bringup/ntoskrnl/io/pnpmgr/pnpreport.c branches/cmake-bringup/ntoskrnl/io/pnpmgr/pnpres.c branches/cmake-bringup/ntoskrnl/mm/ARM3/virtual.c branches/cmake-bringup/subsystems/win32/csrss/win32csr/desktopbg.c branches/cmake-bringup/subsystems/win32/win32k/CMakeLists.txt branches/cmake-bringup/subsystems/win32/win32k/dib/dib.c branches/cmake-bringup/subsystems/win32/win32k/dib/dib.h branches/cmake-bringup/subsystems/win32/win32k/dib/dib16bpp.c branches/cmake-bringup/subsystems/win32/win32k/dib/dib1bpp.c branches/cmake-bringup/subsystems/win32/win32k/dib/dib24bpp.c branches/cmake-bringup/subsystems/win32/win32k/dib/dib32bpp.c branches/cmake-bringup/subsystems/win32/win32k/dib/dib4bpp.c branches/cmake-bringup/subsystems/win32/win32k/dib/dib8bpp.c branches/cmake-bringup/subsystems/win32/win32k/eng/alphablend.c branches/cmake-bringup/subsystems/win32/win32k/eng/bitblt.c branches/cmake-bringup/subsystems/win32/win32k/eng/copybits.c branches/cmake-bringup/subsystems/win32/win32k/eng/device.c branches/cmake-bringup/subsystems/win32/win32k/eng/engbrush.c branches/cmake-bringup/subsystems/win32/win32k/eng/engmisc.c branches/cmake-bringup/subsystems/win32/win32k/eng/gradient.c branches/cmake-bringup/subsystems/win32/win32k/eng/lineto.c branches/cmake-bringup/subsystems/win32/win32k/eng/mapping.c branches/cmake-bringup/subsystems/win32/win32k/eng/mem.c branches/cmake-bringup/subsystems/win32/win32k/eng/mouse.c branches/cmake-bringup/subsystems/win32/win32k/eng/paint.c branches/cmake-bringup/subsystems/win32/win32k/eng/semaphor.c branches/cmake-bringup/subsystems/win32/win32k/eng/stretchblt.c branches/cmake-bringup/subsystems/win32/win32k/eng/surface.c branches/cmake-bringup/subsystems/win32/win32k/eng/transblt.c branches/cmake-bringup/subsystems/win32/win32k/eng/xlate.c branches/cmake-bringup/subsystems/win32/win32k/include/bitmaps.h branches/cmake-bringup/subsystems/win32/win32k/include/dc.h branches/cmake-bringup/subsystems/win32/win32k/include/dib.h branches/cmake-bringup/subsystems/win32/win32k/include/eng.h branches/cmake-bringup/subsystems/win32/win32k/include/gdiobj.h branches/cmake-bringup/subsystems/win32/win32k/include/hook.h branches/cmake-bringup/subsystems/win32/win32k/include/inteng.h branches/cmake-bringup/subsystems/win32/win32k/include/intgdi.h branches/cmake-bringup/subsystems/win32/win32k/include/misc.h branches/cmake-bringup/subsystems/win32/win32k/include/mouse.h branches/cmake-bringup/subsystems/win32/win32k/include/msgqueue.h branches/cmake-bringup/subsystems/win32/win32k/include/palette.h branches/cmake-bringup/subsystems/win32/win32k/include/pdevobj.h branches/cmake-bringup/subsystems/win32/win32k/include/region.h branches/cmake-bringup/subsystems/win32/win32k/include/surface.h branches/cmake-bringup/subsystems/win32/win32k/include/win32.h branches/cmake-bringup/subsystems/win32/win32k/include/win32kp.h branches/cmake-bringup/subsystems/win32/win32k/include/window.h branches/cmake-bringup/subsystems/win32/win32k/include/xlateobj.h branches/cmake-bringup/subsystems/win32/win32k/main/dllmain.c branches/cmake-bringup/subsystems/win32/win32k/misc/copy.c branches/cmake-bringup/subsystems/win32/win32k/misc/driver.c branches/cmake-bringup/subsystems/win32/win32k/misc/file.c branches/cmake-bringup/subsystems/win32/win32k/misc/registry.c branches/cmake-bringup/subsystems/win32/win32k/ntddraw/dxeng.c branches/cmake-bringup/subsystems/win32/win32k/ntuser/callback.c branches/cmake-bringup/subsystems/win32/win32k/ntuser/caret.c branches/cmake-bringup/subsystems/win32/win32k/ntuser/clipboard.c branches/cmake-bringup/subsystems/win32/win32k/ntuser/cursoricon.c branches/cmake-bringup/subsystems/win32/win32k/ntuser/desktop.c branches/cmake-bringup/subsystems/win32/win32k/ntuser/display.c branches/cmake-bringup/subsystems/win32/win32k/ntuser/event.c branches/cmake-bringup/subsystems/win32/win32k/ntuser/focus.c branches/cmake-bringup/subsystems/win32/win32k/ntuser/hook.c branches/cmake-bringup/subsystems/win32/win32k/ntuser/input.c branches/cmake-bringup/subsystems/win32/win32k/ntuser/kbdlayout.c branches/cmake-bringup/subsystems/win32/win32k/ntuser/message.c branches/cmake-bringup/subsystems/win32/win32k/ntuser/metric.c branches/cmake-bringup/subsystems/win32/win32k/ntuser/msgqueue.c branches/cmake-bringup/subsystems/win32/win32k/ntuser/ntstubs.c branches/cmake-bringup/subsystems/win32/win32k/ntuser/ntuser.c branches/cmake-bringup/subsystems/win32/win32k/ntuser/object.c branches/cmake-bringup/subsystems/win32/win32k/ntuser/simplecall.c branches/cmake-bringup/subsystems/win32/win32k/ntuser/windc.c branches/cmake-bringup/subsystems/win32/win32k/ntuser/window.c branches/cmake-bringup/subsystems/win32/win32k/ntuser/winpos.c branches/cmake-bringup/subsystems/win32/win32k/objects/arc.c branches/cmake-bringup/subsystems/win32/win32k/objects/bitblt.c branches/cmake-bringup/subsystems/win32/win32k/objects/bitmaps.c branches/cmake-bringup/subsystems/win32/win32k/objects/brush.c branches/cmake-bringup/subsystems/win32/win32k/objects/cliprgn.c branches/cmake-bringup/subsystems/win32/win32k/objects/dcattr.c branches/cmake-bringup/subsystems/win32/win32k/objects/dclife.c branches/cmake-bringup/subsystems/win32/win32k/objects/dcobjs.c branches/cmake-bringup/subsystems/win32/win32k/objects/dcstate.c branches/cmake-bringup/subsystems/win32/win32k/objects/dcutil.c branches/cmake-bringup/subsystems/win32/win32k/objects/device.c branches/cmake-bringup/subsystems/win32/win32k/objects/dibobj.c branches/cmake-bringup/subsystems/win32/win32k/objects/drawing.c branches/cmake-bringup/subsystems/win32/win32k/objects/fillshap.c branches/cmake-bringup/subsystems/win32/win32k/objects/freetype.c branches/cmake-bringup/subsystems/win32/win32k/objects/gdibatch.c branches/cmake-bringup/subsystems/win32/win32k/objects/gdiobj.c branches/cmake-bringup/subsystems/win32/win32k/objects/icm.c branches/cmake-bringup/subsystems/win32/win32k/objects/line.c branches/cmake-bringup/subsystems/win32/win32k/objects/palette.c branches/cmake-bringup/subsystems/win32/win32k/objects/path.c branches/cmake-bringup/subsystems/win32/win32k/objects/pen.c branches/cmake-bringup/subsystems/win32/win32k/objects/region.c branches/cmake-bringup/subsystems/win32/win32k/objects/stockobj.c branches/cmake-bringup/subsystems/win32/win32k/stubs/stubs.c [This mail would be too long, it was shortened to contain the URLs only.] Modified: branches/cmake-bringup/base/applications/rapps/rapps/firefox36.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/base/applications…
Modified: branches/cmake-bringup/base/applications/rapps/rapps/libreoffice.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/base/applications…
Modified: branches/cmake-bringup/base/applications/rapps/rapps/mirandaim.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/base/applications…
Modified: branches/cmake-bringup/base/applications/rapps/rapps/mirc.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/base/applications…
Modified: branches/cmake-bringup/base/applications/rapps/rapps/opera.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/base/applications…
Modified: branches/cmake-bringup/base/applications/rapps/rapps/scummvm.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/base/applications…
Modified: branches/cmake-bringup/base/applications/rapps/rapps/seamonkey.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/base/applications…
Modified: branches/cmake-bringup/base/applications/rapps/rapps/thunderbird.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/base/applications…
Modified: branches/cmake-bringup/base/shell/explorer/desktop/desktop.cpp URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/base/shell/explor…
Modified: branches/cmake-bringup/base/system/services/rpcserver.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/base/system/servi…
Modified: branches/cmake-bringup/boot/bootdata/hivesys_i386.inf URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/boot/bootdata/hiv…
Modified: branches/cmake-bringup/boot/bootdata/packages/reactos.dff URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/boot/bootdata/pac…
Modified: branches/cmake-bringup/dll/win32/gdi32/include/gdi32p.h URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/gdi32/i…
Modified: branches/cmake-bringup/dll/win32/gdi32/misc/wingl.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/gdi32/m…
Modified: branches/cmake-bringup/dll/win32/gdi32/objects/bitmap.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/gdi32/o…
Modified: branches/cmake-bringup/dll/win32/gdi32/objects/dc.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/gdi32/o…
Modified: branches/cmake-bringup/dll/win32/user32/include/cursor.h URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/user32/…
Modified: branches/cmake-bringup/dll/win32/user32/include/user32.h URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/user32/…
Modified: branches/cmake-bringup/dll/win32/user32/include/user32p.h URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/user32/…
Modified: branches/cmake-bringup/dll/win32/user32/misc/display.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/user32/…
Modified: branches/cmake-bringup/dll/win32/user32/misc/misc.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/user32/…
Modified: branches/cmake-bringup/dll/win32/user32/windows/class.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/user32/…
Modified: branches/cmake-bringup/dll/win32/user32/windows/cursoricon.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/user32/…
Modified: branches/cmake-bringup/dll/win32/user32/windows/defwnd.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/user32/…
Modified: branches/cmake-bringup/dll/win32/user32/windows/draw.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/user32/…
Modified: branches/cmake-bringup/dll/win32/user32/windows/hook.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/user32/…
Modified: branches/cmake-bringup/dll/win32/user32/windows/input.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/user32/…
Modified: branches/cmake-bringup/dll/win32/user32/windows/menu.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/user32/…
Modified: branches/cmake-bringup/dll/win32/user32/windows/message.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/user32/…
Modified: branches/cmake-bringup/dll/win32/user32/windows/window.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/user32/…
Modified: branches/cmake-bringup/drivers/ksfilter/ks/property.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/drivers/ksfilter/…
Modified: branches/cmake-bringup/drivers/wdm/audio/backpln/portcls/filter_wavecyclic.cpp URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/drivers/wdm/audio…
Modified: branches/cmake-bringup/drivers/wdm/audio/backpln/portcls/filter_wavepci.cpp URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/drivers/wdm/audio…
Modified: branches/cmake-bringup/drivers/wdm/audio/backpln/portcls/guids.cpp URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/drivers/wdm/audio…
Modified: branches/cmake-bringup/drivers/wdm/audio/backpln/portcls/interfaces.hpp URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/drivers/wdm/audio…
Modified: branches/cmake-bringup/drivers/wdm/audio/backpln/portcls/irpstream.cpp URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/drivers/wdm/audio…
Modified: branches/cmake-bringup/drivers/wdm/audio/backpln/portcls/pin_dmus.cpp URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/drivers/wdm/audio…
Modified: branches/cmake-bringup/drivers/wdm/audio/backpln/portcls/pin_wavecyclic.cpp URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/drivers/wdm/audio…
Modified: branches/cmake-bringup/drivers/wdm/audio/backpln/portcls/pin_wavepci.cpp URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/drivers/wdm/audio…
Modified: branches/cmake-bringup/drivers/wdm/audio/backpln/portcls/pin_wavert.cpp URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/drivers/wdm/audio…
Modified: branches/cmake-bringup/drivers/wdm/audio/backpln/portcls/port_wavecyclic.cpp URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/drivers/wdm/audio…
Modified: branches/cmake-bringup/drivers/wdm/audio/backpln/portcls/private.hpp URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/drivers/wdm/audio…
Modified: branches/cmake-bringup/drivers/wdm/audio/backpln/portcls/undoc.cpp URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/drivers/wdm/audio…
Modified: branches/cmake-bringup/hal/halx86/generic/usage.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/hal/halx86/generi…
Modified: branches/cmake-bringup/include/psdk/ks.h URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/include/psdk/ks.h…
Modified: branches/cmake-bringup/include/psdk/ksmedia.h URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/include/psdk/ksme…
Modified: branches/cmake-bringup/include/reactos/win32k/ntuser.h URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/include/reactos/w…
Modified: branches/cmake-bringup/ntoskrnl/include/internal/io.h URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/ntoskrnl/include/…
Modified: branches/cmake-bringup/ntoskrnl/io/iomgr/iorsrce.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/ntoskrnl/io/iomgr…
Modified: branches/cmake-bringup/ntoskrnl/io/pnpmgr/pnpreport.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/ntoskrnl/io/pnpmg…
Modified: branches/cmake-bringup/ntoskrnl/io/pnpmgr/pnpres.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/ntoskrnl/io/pnpmg…
Modified: branches/cmake-bringup/ntoskrnl/mm/ARM3/virtual.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/ntoskrnl/mm/ARM3/…
Modified: branches/cmake-bringup/subsystems/win32/csrss/win32csr/desktopbg.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/dib/dib.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/dib/dib.h URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/dib/dib16bpp.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/dib/dib1bpp.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/dib/dib24bpp.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/dib/dib32bpp.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/dib/dib4bpp.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/dib/dib8bpp.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/eng/alphablend.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/eng/bitblt.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/eng/copybits.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/eng/device.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/eng/engbrush.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/eng/engmisc.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/eng/gradient.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/eng/lineto.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/eng/mapping.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/eng/mem.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/eng/mouse.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/eng/paint.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/eng/semaphor.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/eng/stretchblt.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/eng/surface.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/eng/transblt.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/eng/xlate.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/include/bitmaps.h URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/include/dc.h URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/include/dib.h URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/include/eng.h URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/include/gdiobj.h URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/include/hook.h URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/include/inteng.h URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/include/intgdi.h URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/include/misc.h URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/include/mouse.h URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/include/msgqueue.h URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/include/palette.h URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/include/pdevobj.h URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/include/region.h URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/include/surface.h URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/include/win32.h URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/include/win32kp.h URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/include/window.h URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/include/xlateobj.h URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/main/dllmain.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/misc/copy.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/misc/driver.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/misc/file.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/misc/registry.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/ntddraw/dxeng.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/ntuser/callback.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/ntuser/caret.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/ntuser/clipboard.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/ntuser/cursoricon.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/ntuser/desktop.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/ntuser/display.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/ntuser/event.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/ntuser/focus.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/ntuser/hook.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/ntuser/input.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/ntuser/kbdlayout.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/ntuser/message.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/ntuser/metric.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/ntuser/msgqueue.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/ntuser/ntstubs.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/ntuser/ntuser.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/ntuser/object.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/ntuser/simplecall.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/ntuser/windc.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/ntuser/window.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/ntuser/winpos.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/objects/arc.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/objects/bitblt.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/objects/bitmaps.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/objects/brush.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/objects/cliprgn.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/objects/dcattr.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/objects/dclife.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/objects/dcobjs.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/objects/dcstate.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/objects/dcutil.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/objects/device.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/objects/dibobj.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/objects/drawing.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/objects/fillshap.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/objects/freetype.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/objects/gdibatch.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/objects/gdiobj.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/objects/icm.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/objects/line.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/objects/palette.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/objects/path.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/objects/pen.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/objects/region.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/objects/stockobj.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
Modified: branches/cmake-bringup/subsystems/win32/win32k/stubs/stubs.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
14 years, 1 month
1
0
0
0
[spetreolle] 49306: [CMAKE] Improve minicd and livecd macros. Files and iso images are updated/cleaned without any manual steps.
by spetreolle@svn.reactos.org
Author: spetreolle Date: Wed Oct 27 14:06:40 2010 New Revision: 49306 URL:
http://svn.reactos.org/svn/reactos?rev=49306&view=rev
Log: [CMAKE] Improve minicd and livecd macros. Files and iso images are updated/cleaned without any manual steps. Modified: branches/cmake-bringup/CMakeLists.txt branches/cmake-bringup/CMakeMacros.cmake 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] Wed Oct 27 14:06:40 2010 @@ -108,12 +108,12 @@ file(MAKE_DIRECTORY "${BOOTCD_DIR}/reactos") file(MAKE_DIRECTORY "${BOOTCD_DIR}/reactos/system32") -add_custom_command( - OUTPUT ${REACTOS_BINARY_DIR}/minicd.iso +add_custom_target(minicd COMMAND native-cdmake -v -j -m -b ${CMAKE_CURRENT_BINARY_DIR}/boot/freeldr/bootsect/isoboot.bin ${BOOTCD_DIR} REACTOS ${REACTOS_BINARY_DIR}/minicd.iso DEPENDS native-cdmake) -add_custom_target(minicd DEPENDS ${REACTOS_BINARY_DIR}/minicd.iso) + add_minicd(${REACTOS_SOURCE_DIR}/boot/bootdata/bootcd.ini "" freeldr.ini) +set_directory_properties(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${REACTOS_BINARY_DIR}/minicd.iso) #livecd target set(LIVECD_DIR "${REACTOS_BINARY_DIR}/boot/livecd") @@ -132,12 +132,11 @@ file(MAKE_DIRECTORY "${LIVECD_DIR}/reactos/system32") file(MAKE_DIRECTORY "${LIVECD_DIR}/reactos/system32/config") -add_custom_command( - OUTPUT ${REACTOS_BINARY_DIR}/livecd.iso +add_custom_target(livecd COMMAND native-cdmake -v -j -m -b ${CMAKE_CURRENT_BINARY_DIR}/boot/freeldr/bootsect/isoboot.bin ${LIVECD_DIR} REACTOS ${REACTOS_BINARY_DIR}/livecd.iso DEPENDS native-cdmake) -add_custom_target(livecd DEPENDS ${REACTOS_BINARY_DIR}/livecd.iso) add_livecd(${REACTOS_SOURCE_DIR}/boot/bootdata/livecd.ini "" freeldr.ini) +set_directory_properties(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${REACTOS_BINARY_DIR}/livecd.iso) include(baseaddress.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] Wed Oct 27 14:06:40 2010 @@ -125,23 +125,19 @@ set(_nameoncd ${ARGN}) endif() - add_custom_command( - OUTPUT ${BOOTCD_DIR}/${_dir}/${_nameoncd} - COMMAND ${CMAKE_COMMAND} -E copy ${FILENAME} ${BOOTCD_DIR}/${_dir}/${_nameoncd}) - - add_custom_target(${_targetname}_minicd DEPENDS ${BOOTCD_DIR}/${_dir}/${_nameoncd}) - - add_dependencies(${_targetname}_minicd ${_targetname}) + add_custom_target(${_targetname}_minicd + COMMAND ${CMAKE_COMMAND} -E copy ${FILENAME} ${BOOTCD_DIR}/${_dir}/${_nameoncd} + DEPENDS ${_targetname}) + set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${BOOTCD_DIR}/${_dir}/${_nameoncd}) + add_dependencies(minicd ${_targetname}_minicd) -ENDMACRO(add_minicd_target _targetname _dir _nameoncd) +ENDMACRO(add_minicd_target) MACRO(add_minicd FILENAME _dir _nameoncd) - add_custom_command( - OUTPUT ${BOOTCD_DIR}/${_dir}/${_nameoncd} - DEPENDS ${FILENAME} - COMMAND ${CMAKE_COMMAND} -E copy ${FILENAME} ${BOOTCD_DIR}/${_dir}/${_nameoncd}) - - add_custom_target(${_nameoncd}_minicd DEPENDS ${BOOTCD_DIR}/${_dir}/${_nameoncd}) + add_custom_target(${_nameoncd}_minicd + COMMAND ${CMAKE_COMMAND} -E copy ${FILENAME} ${BOOTCD_DIR}/${_dir}/${_nameoncd} + DEPENDS ${FILENAME}) + set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${BOOTCD_DIR}/${_dir}/${_nameoncd}) add_dependencies(minicd ${_nameoncd}_minicd) ENDMACRO(add_minicd) @@ -150,112 +146,108 @@ include_directories(BEFORE ${REACTOS_SOURCE_DIR}/lib/3rdparty/stlport/stlport) set(IS_CPP 1) endmacro() - -MACRO(add_livecd_target _targetname _dir )# optional parameter : _nameoncd - - get_target_property(FILENAME ${_targetname} LOCATION) - - if("${ARGN}" STREQUAL "") - get_filename_component(_nameoncd ${FILENAME} NAME) - else() - set(_nameoncd ${ARGN}) - endif() - - add_custom_command( - OUTPUT ${LIVECD_DIR}/${_dir}/${_nameoncd} - COMMAND ${CMAKE_COMMAND} -E copy ${FILENAME} ${LIVECD_DIR}/${_dir}/${_nameoncd}) - - add_custom_target(${_targetname}_livecd DEPENDS ${LIVECD_DIR}/${_dir}/${_nameoncd}) - - add_dependencies(${_targetname}_livecd ${_targetname}) - add_dependencies(livecd ${_targetname}_livecd) -ENDMACRO(add_livecd_target _targetname _dir _nameoncd) - -MACRO(add_livecd FILENAME _dir _nameoncd) - add_custom_command( - OUTPUT ${LIVECD_DIR}/${_dir}/${_nameoncd} - DEPENDS ${FILENAME} - COMMAND ${CMAKE_COMMAND} -E copy ${FILENAME} ${LIVECD_DIR}/${_dir}/${_nameoncd}) - - add_custom_target(${_nameoncd}_livecd DEPENDS ${LIVECD_DIR}/${_dir}/${_nameoncd}) - - add_dependencies(livecd ${_nameoncd}_livecd) -ENDMACRO(add_livecd) - -macro(custom_incdefs) - if(NOT DEFINED result_incs) #rpc_defines - get_directory_property(rpc_defines COMPILE_DEFINITIONS) - get_directory_property(rpc_includes INCLUDE_DIRECTORIES) - - foreach(arg ${rpc_defines}) - set(result_defs ${result_defs} -D${arg}) - endforeach(arg ${defines}) - - foreach(arg ${rpc_includes}) - set(result_incs -I${arg} ${result_incs}) - endforeach(arg ${includes}) - endif() -endmacro(custom_incdefs) - -macro(rpcproxy TARGET) - custom_incdefs() - list(APPEND SOURCE ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_proxy.dlldata.c) - - foreach(_in_FILE ${ARGN}) - get_filename_component(FILE ${_in_FILE} NAME_WE) - add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_p.h ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_p.c - COMMAND native-widl ${result_incs} ${result_defs} -m32 --win32 -h -H ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_p.h -p -P ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_p.c ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}.idl - DEPENDS native-widl) - set_source_files_properties( - ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.h ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_p.c - PROPERTIES GENERATED TRUE) - list(APPEND SOURCE ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_p.c) - list(APPEND IDLS ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}.idl) - list(APPEND PROXY_DEPENDS ${TARGET}_${FILE}_p) - add_custom_target(${TARGET}_${FILE}_p - DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_p.c) - #add_dependencies(${TARGET}_proxy ${TARGET}_${FILE}_p) - endforeach(_in_FILE ${ARGN}) - - add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_proxy.dlldata.c - COMMAND native-widl ${result_incs} ${result_defs} -m32 --win32 --dlldata-only --dlldata=${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_proxy.dlldata.c ${IDLS} - DEPENDS native-widl) - set_source_files_properties( - ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_proxy.dlldata.c - PROPERTIES GENERATED TRUE) - - add_library(${TARGET}_proxy ${SOURCE}) - add_dependencies(${TARGET}_proxy psdk ${PROXY_DEPENDS}) -endmacro(rpcproxy) - -macro (MACRO_IDL_FILES) - custom_incdefs() - foreach(_in_FILE ${ARGN}) - get_filename_component(FILE ${_in_FILE} NAME_WE) - add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.h ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.c + +MACRO(add_livecd_target _targetname _dir )# optional parameter : _nameoncd + + get_target_property(FILENAME ${_targetname} LOCATION) + + if("${ARGN}" STREQUAL "") + get_filename_component(_nameoncd ${FILENAME} NAME) + else() + set(_nameoncd ${ARGN}) + endif() + + add_custom_target(${_targetname}_livecd + COMMAND ${CMAKE_COMMAND} -E copy ${FILENAME} ${LIVECD_DIR}/${_dir}/${_nameoncd} + DEPENDS ${_targetname}) + set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${LIVECD_DIR}/${_dir}/${_nameoncd}) + + add_dependencies(livecd ${_targetname}_livecd) +ENDMACRO(add_livecd_target) + +MACRO(add_livecd FILENAME _dir _nameoncd) + add_custom_target(${_nameoncd}_livecd + COMMAND ${CMAKE_COMMAND} -E copy ${FILENAME} ${LIVECD_DIR}/${_dir}/${_nameoncd} + DEPENDS ${FILENAME}) + set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${LIVECD_DIR}/${_dir}/${_nameoncd}) + + add_dependencies(livecd ${_nameoncd}_livecd) +ENDMACRO(add_livecd) + +macro(custom_incdefs) + if(NOT DEFINED result_incs) #rpc_defines + get_directory_property(rpc_defines COMPILE_DEFINITIONS) + get_directory_property(rpc_includes INCLUDE_DIRECTORIES) + + foreach(arg ${rpc_defines}) + set(result_defs ${result_defs} -D${arg}) + endforeach(arg ${defines}) + + foreach(arg ${rpc_includes}) + set(result_incs -I${arg} ${result_incs}) + endforeach(arg ${includes}) + endif() +endmacro(custom_incdefs) + +macro(rpcproxy TARGET) + custom_incdefs() + list(APPEND SOURCE ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_proxy.dlldata.c) + + foreach(_in_FILE ${ARGN}) + get_filename_component(FILE ${_in_FILE} NAME_WE) + add_custom_command( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_p.h ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_p.c + COMMAND native-widl ${result_incs} ${result_defs} -m32 --win32 -h -H ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_p.h -p -P ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_p.c ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}.idl + DEPENDS native-widl) + set_source_files_properties( + ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.h ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_p.c + PROPERTIES GENERATED TRUE) + list(APPEND SOURCE ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_p.c) + list(APPEND IDLS ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}.idl) + list(APPEND PROXY_DEPENDS ${TARGET}_${FILE}_p) + add_custom_target(${TARGET}_${FILE}_p + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_p.c) + #add_dependencies(${TARGET}_proxy ${TARGET}_${FILE}_p) + endforeach(_in_FILE ${ARGN}) + + add_custom_command( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_proxy.dlldata.c + COMMAND native-widl ${result_incs} ${result_defs} -m32 --win32 --dlldata-only --dlldata=${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_proxy.dlldata.c ${IDLS} + DEPENDS native-widl) + set_source_files_properties( + ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_proxy.dlldata.c + PROPERTIES GENERATED TRUE) + + add_library(${TARGET}_proxy ${SOURCE}) + add_dependencies(${TARGET}_proxy psdk ${PROXY_DEPENDS}) +endmacro(rpcproxy) + +macro (MACRO_IDL_FILES) + custom_incdefs() + foreach(_in_FILE ${ARGN}) + get_filename_component(FILE ${_in_FILE} NAME_WE) + add_custom_command( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.h ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.c COMMAND ${IDL_COMPILER} ${result_incs} ${result_defs} ${IDL_FLAGS} ${IDL_HEADER_ARG} ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.h ${IDL_SERVER_ARG} ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.c ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}.idl DEPENDS ${_in_file}) - set_source_files_properties( - ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.h ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.c - PROPERTIES GENERATED TRUE) - add_library(${FILE}_server ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.c) - add_dependencies(${FILE}_server psdk) - - add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.h ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.c + set_source_files_properties( + ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.h ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.c + PROPERTIES GENERATED TRUE) + add_library(${FILE}_server ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.c) + add_dependencies(${FILE}_server psdk) + + add_custom_command( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.h ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.c COMMAND ${IDL_COMPILER} ${result_incs} ${result_defs} ${IDL_FLAGS} ${IDL_HEADER_ARG} ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.h ${IDL_CLIENT_ARG} ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.c ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}.idl DEPENDS ${_in_file}) - set_source_files_properties( - ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.h ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.c - PROPERTIES GENERATED TRUE) - add_library(${FILE}_client ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.c) - add_dependencies(${FILE}_client psdk) - endforeach(_in_FILE ${ARGN}) - -endmacro (MACRO_IDL_FILES) + set_source_files_properties( + ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.h ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.c + PROPERTIES GENERATED TRUE) + add_library(${FILE}_client ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.c) + add_dependencies(${FILE}_client psdk) + endforeach(_in_FILE ${ARGN}) + +endmacro (MACRO_IDL_FILES) macro(ADD_TYPELIB TARGET) custom_incdefs()
14 years, 1 month
1
0
0
0
← Newer
1
...
5
6
7
8
9
10
11
...
44
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
Results per page:
10
25
50
100
200