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
May 2011
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
26 participants
511 discussions
Start a n
N
ew thread
[janderwald] 51851: [USBOHCI] - Start of OHCI support - Based on new usbehci driver and Haiku USB Stack - Driver initializes the controller and retrieve number of ports
by janderwald@svn.reactos.org
Author: janderwald Date: Sun May 22 19:36:13 2011 New Revision: 51851 URL:
http://svn.reactos.org/svn/reactos?rev=51851&view=rev
Log: [USBOHCI] - Start of OHCI support - Based on new usbehci driver and Haiku USB Stack - Driver initializes the controller and retrieve number of ports Added: branches/usb-bringup/drivers/usb/usbohci/ (props changed) - copied from r51850, branches/usb-bringup/drivers/usb/usbehci_new/ branches/usb-bringup/drivers/usb/usbohci/usbohci.cpp - copied, changed from r51850, branches/usb-bringup/drivers/usb/usbehci_new/usbehci.cpp branches/usb-bringup/drivers/usb/usbohci/usbohci.h - copied, changed from r51850, branches/usb-bringup/drivers/usb/usbehci_new/usbehci.h branches/usb-bringup/drivers/usb/usbohci/usbohci.rc - copied, changed from r51850, branches/usb-bringup/drivers/usb/usbehci_new/usbehci.rc Removed: branches/usb-bringup/drivers/usb/usbohci/usbehci.cpp branches/usb-bringup/drivers/usb/usbohci/usbehci.h branches/usb-bringup/drivers/usb/usbohci/usbehci.rc Modified: branches/usb-bringup/drivers/usb/usbohci/CMakeLists.txt branches/usb-bringup/drivers/usb/usbohci/hardware.cpp branches/usb-bringup/drivers/usb/usbohci/hardware.h branches/usb-bringup/drivers/usb/usbohci/hcd_controller.cpp branches/usb-bringup/drivers/usb/usbohci/hub_controller.cpp branches/usb-bringup/drivers/usb/usbohci/interfaces.h branches/usb-bringup/drivers/usb/usbohci/memory_manager.cpp branches/usb-bringup/drivers/usb/usbohci/misc.cpp branches/usb-bringup/drivers/usb/usbohci/purecall.cpp branches/usb-bringup/drivers/usb/usbohci/usb_device.cpp branches/usb-bringup/drivers/usb/usbohci/usb_queue.cpp branches/usb-bringup/drivers/usb/usbohci/usb_request.cpp [This mail would be too long, it was shortened to contain the URLs only.] Modified: branches/usb-bringup/drivers/usb/usbohci/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbohci…
Modified: branches/usb-bringup/drivers/usb/usbohci/hardware.cpp URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbohci…
Modified: branches/usb-bringup/drivers/usb/usbohci/hardware.h URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbohci…
Modified: branches/usb-bringup/drivers/usb/usbohci/hcd_controller.cpp URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbohci…
Modified: branches/usb-bringup/drivers/usb/usbohci/hub_controller.cpp URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbohci…
Modified: branches/usb-bringup/drivers/usb/usbohci/interfaces.h URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbohci…
Modified: branches/usb-bringup/drivers/usb/usbohci/memory_manager.cpp URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbohci…
Modified: branches/usb-bringup/drivers/usb/usbohci/misc.cpp URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbohci…
Modified: branches/usb-bringup/drivers/usb/usbohci/purecall.cpp URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbohci…
Modified: branches/usb-bringup/drivers/usb/usbohci/usb_device.cpp URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbohci…
Modified: branches/usb-bringup/drivers/usb/usbohci/usb_queue.cpp URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbohci…
Modified: branches/usb-bringup/drivers/usb/usbohci/usb_request.cpp URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbohci…
Removed: branches/usb-bringup/drivers/usb/usbohci/usbehci.cpp URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbehci…
Removed: branches/usb-bringup/drivers/usb/usbohci/usbehci.h URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbehci…
Removed: branches/usb-bringup/drivers/usb/usbohci/usbehci.rc URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbehci…
Copied: branches/usb-bringup/drivers/usb/usbohci/usbohci.cpp (from r51850, branches/usb-bringup/drivers/usb/usbehci_new/usbehci.cpp) URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbohci…
Copied: branches/usb-bringup/drivers/usb/usbohci/usbohci.h (from r51850, branches/usb-bringup/drivers/usb/usbehci_new/usbehci.h) URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbohci…
Copied: branches/usb-bringup/drivers/usb/usbohci/usbohci.rc (from r51850, branches/usb-bringup/drivers/usb/usbehci_new/usbehci.rc) URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbohci…
13 years, 7 months
1
0
0
0
[tkreuzer] 51850: [GDI FONT DRIVER] - Calculate fxMaxAscender and fxMaxDescender for the FD_DEVICEMETRICS differenly
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sun May 22 17:36:34 2011 New Revision: 51850 URL:
http://svn.reactos.org/svn/reactos?rev=51850&view=rev
Log: [GDI FONT DRIVER] - Calculate fxMaxAscender and fxMaxDescender for the FD_DEVICEMETRICS differenly Modified: branches/GSoC_2011/GdiFontDriver/drivers/video/font/ftfd/ftfd.h branches/GSoC_2011/GdiFontDriver/drivers/video/font/ftfd/glyph.c Modified: branches/GSoC_2011/GdiFontDriver/drivers/video/font/ftfd/ftfd.h URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/GdiFontDriver/drivers…
============================================================================== --- branches/GSoC_2011/GdiFontDriver/drivers/video/font/ftfd/ftfd.h [iso-8859-1] (original) +++ branches/GSoC_2011/GdiFontDriver/drivers/video/font/ftfd/ftfd.h [iso-8859-1] Sun May 22 17:36:34 2011 @@ -114,19 +114,22 @@ PFTFD_FACE apface[1]; } FTFD_FILE, *PFTFD_FILE; -typedef union _FTFD_DEVICEMETRICS -{ - POINTL aptl[10]; - struct +typedef struct _FTFD_DEVICEMETRICS +{ + union { - POINTFIX ptfxMaxAscender; - POINTFIX ptfxMaxDescender; - POINTL ptlUnderline1; - POINTL ptlStrikeout; - POINTL ptlULThickness; - POINTL ptlSOThickness; - POINTL aptlBBox[4]; + POINTL aptl[8]; + struct + { + POINTL ptlUnderline1; + POINTL ptlStrikeout; + POINTL ptlULThickness; + POINTL ptlSOThickness; + POINTL aptlBBox[4]; + }; }; + FIX fxMaxAscender; + FIX fxMaxDescender; } FTFD_DEVICEMETRICS; typedef struct _POINTEF Modified: branches/GSoC_2011/GdiFontDriver/drivers/video/font/ftfd/glyph.c URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/GdiFontDriver/drivers…
============================================================================== --- branches/GSoC_2011/GdiFontDriver/drivers/video/font/ftfd/glyph.c [iso-8859-1] (original) +++ branches/GSoC_2011/GdiFontDriver/drivers/video/font/ftfd/glyph.c [iso-8859-1] Sun May 22 17:36:34 2011 @@ -146,6 +146,14 @@ /* Normalize the base vectors and get their length */ efScaleX = FtfdNormalizeBaseVector(&pfont->ptefBase); efScaleY = FtfdNormalizeBaseVector(&pfont->ptefSide); + + /* Calculate maximum ascender and descender */ + efTemp = efScaleY; + FLOATOBJ_MulLong(&efTemp, pface->ifiex.ifi.fwdWinAscender << 4); + pfont->metrics.fxMaxAscender = FLOATOBJ_GetLong(&efTemp); + efTemp = efScaleY; + FLOATOBJ_MulLong(&efTemp, pface->ifiex.ifi.fwdWinDescender << 4); + pfont->metrics.fxMaxDescender = FLOATOBJ_GetLong(&efTemp); /* The coordinate transformation given by Windows transforms from font * space to device space. Since we use FT_Set_Char_Size, which allows @@ -221,10 +229,6 @@ /* Prepare required coordinates in font space */ pmetrics = &pfont->metrics; - pmetrics->ptfxMaxAscender.x = 0; - pmetrics->ptfxMaxAscender.y = pface->ifiex.ifi.fwdWinAscender << 4; - pmetrics->ptfxMaxDescender.x = 0; - pmetrics->ptfxMaxDescender.y = pface->ifiex.ifi.fwdWinDescender << 4; pmetrics->ptlUnderline1.x = 0; pmetrics->ptlUnderline1.y = -pface->ifiex.ifi.fwdUnderscorePosition; pmetrics->ptlStrikeout.x = 0; @@ -243,7 +247,7 @@ pmetrics->aptlBBox[3].y = ftface->bbox.yMax; /* Transform all coordinates into device space */ - if (!XFORMOBJ_bApplyXform(pxo, XF_LTOL, 10, pmetrics->aptl, pmetrics->aptl)) + if (!XFORMOBJ_bApplyXform(pxo, XF_LTOL, 8, pmetrics->aptl, pmetrics->aptl)) { WARN("Failed apply coordinate transformation.\n"); EngFreeMem(pfont); @@ -332,8 +336,8 @@ pfddm->lD = 0; /* Copy some values from the font structure */ - pfddm->fxMaxAscender = pfont->metrics.ptfxMaxAscender.y; - pfddm->fxMaxDescender = pfont->metrics.ptfxMaxDescender.y; + pfddm->fxMaxAscender = pfont->metrics.fxMaxAscender; + pfddm->fxMaxDescender = pfont->metrics.fxMaxDescender; pfddm->ptlUnderline1 = pfont->metrics.ptlUnderline1; pfddm->ptlStrikeout = pfont->metrics.ptlStrikeout; pfddm->ptlULThickness = pfont->metrics.ptlULThickness;
13 years, 7 months
1
0
0
0
[tkreuzer] 51849: [GDI FONT DRIVER] - Improve BITMAP_SIZE macro - Make the bitmaps always at least 1x1 pixel in size (fixes a crash, when opening desktop context menu) - Calculate maximum extents b...
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sun May 22 16:07:23 2011 New Revision: 51849 URL:
http://svn.reactos.org/svn/reactos?rev=51849&view=rev
Log: [GDI FONT DRIVER] - Improve BITMAP_SIZE macro - Make the bitmaps always at least 1x1 pixel in size (fixes a crash, when opening desktop context menu) - Calculate maximum extents by transforming all 4 coordinates of the bounding box. Fixes broken sizes being calculated when the glyph is rotated. Modified: branches/GSoC_2011/GdiFontDriver/drivers/video/font/ftfd/ftfd.h branches/GSoC_2011/GdiFontDriver/drivers/video/font/ftfd/glyph.c Modified: branches/GSoC_2011/GdiFontDriver/drivers/video/font/ftfd/ftfd.h URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/GdiFontDriver/drivers…
============================================================================== --- branches/GSoC_2011/GdiFontDriver/drivers/video/font/ftfd/ftfd.h [iso-8859-1] (original) +++ branches/GSoC_2011/GdiFontDriver/drivers/video/font/ftfd/ftfd.h [iso-8859-1] Sun May 22 16:07:23 2011 @@ -116,7 +116,7 @@ typedef union _FTFD_DEVICEMETRICS { - POINTL aptl[7]; + POINTL aptl[10]; struct { POINTFIX ptfxMaxAscender; @@ -125,7 +125,7 @@ POINTL ptlStrikeout; POINTL ptlULThickness; POINTL ptlSOThickness; - SIZEL sizlMax; + POINTL aptlBBox[4]; }; } FTFD_DEVICEMETRICS; @@ -144,6 +144,8 @@ FT_Face ftface; FD_XFORM fdxQuantized; FTFD_DEVICEMETRICS metrics; + RECTL rclBBox; + SIZEL sizlMax; POINTEF ptefBase; POINTEF ptefSide; SIZEL sizlScale; Modified: branches/GSoC_2011/GdiFontDriver/drivers/video/font/ftfd/glyph.c URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/GdiFontDriver/drivers…
============================================================================== --- branches/GSoC_2011/GdiFontDriver/drivers/video/font/ftfd/glyph.c [iso-8859-1] (original) +++ branches/GSoC_2011/GdiFontDriver/drivers/video/font/ftfd/glyph.c [iso-8859-1] Sun May 22 16:07:23 2011 @@ -12,7 +12,7 @@ #define FLOATL_1 0x3f800000 #define BITMAP_SIZE(cx, cy, bpp) \ - ((((((cx * bpp) + 7) >> 3) * cy) + 3) & ~3) + (((((((cx) * (bpp)) + 7) >> 3) * (cy)) + 3) & ~3) #define GLYPHBITS_SIZE(cx, cy, bpp) \ (FIELD_OFFSET(GLYPHBITS, aj) + BITMAP_SIZE(cx, cy, bpp)) @@ -233,16 +233,40 @@ pmetrics->ptlULThickness.y = pface->ifiex.ifi.fwdUnderscoreSize; pmetrics->ptlSOThickness.x = 0; pmetrics->ptlSOThickness.y = pface->ifiex.ifi.fwdStrikeoutSize; - pmetrics->sizlMax.cx = ftface->bbox.xMax - ftface->bbox.xMin; - pmetrics->sizlMax.cy = ftface->bbox.yMax - ftface->bbox.yMin; + pmetrics->aptlBBox[0].x = ftface->bbox.xMin; + pmetrics->aptlBBox[0].y = ftface->bbox.yMin; + pmetrics->aptlBBox[1].x = ftface->bbox.xMax; + pmetrics->aptlBBox[1].y = ftface->bbox.yMin; + pmetrics->aptlBBox[2].x = ftface->bbox.xMax; + pmetrics->aptlBBox[2].y = ftface->bbox.yMax; + pmetrics->aptlBBox[3].x = ftface->bbox.xMin; + pmetrics->aptlBBox[3].y = ftface->bbox.yMax; /* Transform all coordinates into device space */ - if (!XFORMOBJ_bApplyXform(pxo, XF_LTOL, 7, pmetrics->aptl, pmetrics->aptl)) + if (!XFORMOBJ_bApplyXform(pxo, XF_LTOL, 10, pmetrics->aptl, pmetrics->aptl)) { WARN("Failed apply coordinate transformation.\n"); EngFreeMem(pfont); return NULL; } + + /* Extract the bounding box in device coordinates */ + pfont->rclBBox.left = min(pmetrics->aptlBBox[0].x, pmetrics->aptlBBox[1].x); + pfont->rclBBox.left = min(pfont->rclBBox.left, pmetrics->aptlBBox[2].x); + pfont->rclBBox.left = min(pfont->rclBBox.left, pmetrics->aptlBBox[3].x); + pfont->rclBBox.right = max(pmetrics->aptlBBox[0].x, pmetrics->aptlBBox[1].x); + pfont->rclBBox.right = max(pfont->rclBBox.right, pmetrics->aptlBBox[2].x); + pfont->rclBBox.right = max(pfont->rclBBox.right, pmetrics->aptlBBox[3].x); + pfont->rclBBox.top = min(pmetrics->aptlBBox[0].y, pmetrics->aptlBBox[1].y); + pfont->rclBBox.top = min(pfont->rclBBox.top, pmetrics->aptlBBox[2].y); + pfont->rclBBox.top = min(pfont->rclBBox.top, pmetrics->aptlBBox[3].y); + pfont->rclBBox.bottom = max(pmetrics->aptlBBox[0].y, pmetrics->aptlBBox[1].y); + pfont->rclBBox.bottom = max(pfont->rclBBox.bottom, pmetrics->aptlBBox[2].y); + pfont->rclBBox.bottom = max(pfont->rclBBox.bottom, pmetrics->aptlBBox[3].y); + + /* Calculate maximum extents */ + pfont->sizlMax.cx = pfont->rclBBox.right - pfont->rclBBox.left; + pfont->sizlMax.cy = pfont->rclBBox.bottom - pfont->rclBBox.top; /* Fixup some minimum values */ if (pmetrics->ptlULThickness.y <= 0) pmetrics->ptlULThickness.y = 1; @@ -314,8 +338,8 @@ pfddm->ptlStrikeout = pfont->metrics.ptlStrikeout; pfddm->ptlULThickness = pfont->metrics.ptlULThickness; pfddm->ptlSOThickness = pfont->metrics.ptlSOThickness; - pfddm->cxMax = pfont->metrics.sizlMax.cx; - pfddm->cyMax = pfont->metrics.sizlMax.cy; + pfddm->cxMax = pfont->sizlMax.cx; + pfddm->cyMax = pfont->sizlMax.cy; /* Convert the base vectors from FLOATOBJ to FLOATL */ pfddm->pteBase.x = FLOATOBJ_GetFloat(&pfont->ptefBase.x); @@ -414,19 +438,26 @@ pgd->rclInk.right = pgd->rclInk.left + ftglyph->bitmap.width; pgd->rclInk.bottom = pgd->rclInk.top + ftglyph->bitmap.rows; + /* Make the bitmap at least 1x1 pixel large */ + if (ftglyph->bitmap.width == 0) pgd->rclInk.right++; + if (ftglyph->bitmap.rows == 0) pgd->rclInk.bottom++; + /* FIX representation of bitmap top and bottom */ pgd->fxInkBottom = (-pgd->rclInk.bottom) << 4; pgd->fxInkTop = pgd->rclInk.top << 4; - - /* Make the bitmap at least 1x1 pixel large */ - if (ftglyph->bitmap.width == 0) pgd->rclInk.right++; - if (ftglyph->bitmap.rows == 0) pgd->rclInk.bottom++; // FIXME: pgd->ptqD.x.LowPart = pgd->fxD; pgd->ptqD.x.HighPart = 0; pgd->ptqD.y.LowPart = 0; pgd->ptqD.y.HighPart = 0; + + if (ftglyph->bitmap.width > pfont->sizlMax.cx || + ftglyph->bitmap.rows > pfont->sizlMax.cy) + { + __debugbreak(); + } + //__debugbreak(); } @@ -446,6 +477,18 @@ pgb->sizlBitmap.cx = ftglyph->bitmap.width; pgb->sizlBitmap.cy = ftglyph->bitmap.rows; + /* Make the bitmap at least 1x1 pixel large */ + if (pgb->sizlBitmap.cx == 0) pgb->sizlBitmap.cx++; + if (pgb->sizlBitmap.cy == 0) pgb->sizlBitmap.cy++; + + if (pgb->sizlBitmap.cx > pfont->sizlMax.cx || + pgb->sizlBitmap.cy > pfont->sizlMax.cy) + { + WARN("The size of the bitmap exceeds the maximum size\n"); + __debugbreak(); + return; + } + cjBitmapSize = BITMAP_SIZE(pgb->sizlBitmap.cx, pgb->sizlBitmap.cy, pfont->jBpp); @@ -472,7 +515,8 @@ PATHOBJ *ppo, ULONG cjSize) { - + WARN("FtfdQueryGlyphOutline is unimplemented\n"); + __debugbreak(); } BOOL @@ -507,6 +551,7 @@ ULONG cjSize) { PFTFD_FONT pfont = FtfdGetFontInstance(pfo); + ULONG cx, cy; //TRACE("FtfdQueryFontData, iMode=%ld, hg=%lx, pgd=%p, pv=%p, cjSize=%ld\n", // iMode, hg, pgd, pv, cjSize); @@ -528,9 +573,11 @@ FtfdQueryGlyphBits(pfo, hg, pv, cjSize); } - /* Return the size for a 1bpp bitmap */ - return GLYPHBITS_SIZE(pfont->ftface->glyph->bitmap.width, - pfont->ftface->glyph->bitmap.rows, + /* Return the size for a bitmap at least 1x1 pixels */ + cx = pfont->ftface->glyph->bitmap.width; + cy = pfont->ftface->glyph->bitmap.rows; + return GLYPHBITS_SIZE(cx > 0 ? cx : 1, + cy > 0 ? cy : 1, pfont->jBpp); case QFD_GLYPHANDOUTLINE:
13 years, 7 months
1
0
0
0
[gadamopoulos] 51848: [uxtheme] - Implement handling WM_NCHITTEST
by gadamopoulos@svn.reactos.org
Author: gadamopoulos Date: Sun May 22 15:47:47 2011 New Revision: 51848 URL:
http://svn.reactos.org/svn/reactos?rev=51848&view=rev
Log: [uxtheme] - Implement handling WM_NCHITTEST Modified: branches/GSoC_2011/ThemesSupport/dll/win32/uxtheme/nonclient.c Modified: branches/GSoC_2011/ThemesSupport/dll/win32/uxtheme/nonclient.c URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/ThemesSupport/dll/win…
============================================================================== --- branches/GSoC_2011/ThemesSupport/dll/win32/uxtheme/nonclient.c [iso-8859-1] (original) +++ branches/GSoC_2011/ThemesSupport/dll/win32/uxtheme/nonclient.c [iso-8859-1] Sun May 22 15:47:47 2011 @@ -7,6 +7,7 @@ */ #include <windows.h> +#include <windowsx.h> #include "undocuser.h" #include "vfwmsgs.h" #include "uxtheme.h" @@ -47,6 +48,12 @@ BUTTON_DISABLED , BUTTON_INACTIVE } THEME_BUTTON_STATES; + +#define HASSIZEGRIP(Style, ExStyle, ParentStyle, WindowRect, ParentClientRect) \ + ((!(Style & WS_CHILD) && (Style & WS_THICKFRAME) && !(Style & WS_MAXIMIZE)) || \ + ((Style & WS_CHILD) && (ParentStyle & WS_THICKFRAME) && !(ParentStyle & WS_MAXIMIZE) && \ + (WindowRect.right - WindowRect.left == ParentClientRect.right) && \ + (WindowRect.bottom - WindowRect.top == ParentClientRect.bottom))) #define HAS_MENU(hwnd,style) ((((style) & (WS_CHILD | WS_POPUP)) != WS_CHILD) && GetMenu(hwnd)) @@ -640,6 +647,228 @@ if (Pressed) SendMessageW(hWnd, WM_SYSCOMMAND, SCMsg, 0); +} + + +static LRESULT +DefWndNCHitTest(HWND hWnd, POINT Point) +{ + RECT WindowRect; + POINT ClientPoint; + WINDOWINFO wi; + + GetWindowInfo(hWnd, &wi); + + if (!PtInRect(&wi.rcWindow, Point)) + { + return HTNOWHERE; + } + WindowRect = wi.rcWindow; + + if (UserHasWindowEdge(wi.dwStyle, wi.dwExStyle)) + { + LONG XSize, YSize; + + InflateRect(&WindowRect, -(int)wi.cxWindowBorders, -(int)wi.cyWindowBorders); + XSize = GetSystemMetrics(SM_CXSIZE) * GetSystemMetrics(SM_CXBORDER); + YSize = GetSystemMetrics(SM_CYSIZE) * GetSystemMetrics(SM_CYBORDER); + if (!PtInRect(&WindowRect, Point)) + { + BOOL ThickFrame; + + ThickFrame = (wi.dwStyle & WS_THICKFRAME); + if (Point.y < WindowRect.top) + { + if(wi.dwStyle & WS_MINIMIZE) + return HTCAPTION; + if(!ThickFrame) + return HTBORDER; + if (Point.x < (WindowRect.left + XSize)) + return HTTOPLEFT; + if (Point.x >= (WindowRect.right - XSize)) + return HTTOPRIGHT; + return HTTOP; + } + if (Point.y >= WindowRect.bottom) + { + if(wi.dwStyle & WS_MINIMIZE) + return HTCAPTION; + if(!ThickFrame) + return HTBORDER; + if (Point.x < (WindowRect.left + XSize)) + return HTBOTTOMLEFT; + if (Point.x >= (WindowRect.right - XSize)) + return HTBOTTOMRIGHT; + return HTBOTTOM; + } + if (Point.x < WindowRect.left) + { + if(wi.dwStyle & WS_MINIMIZE) + return HTCAPTION; + if(!ThickFrame) + return HTBORDER; + if (Point.y < (WindowRect.top + YSize)) + return HTTOPLEFT; + if (Point.y >= (WindowRect.bottom - YSize)) + return HTBOTTOMLEFT; + return HTLEFT; + } + if (Point.x >= WindowRect.right) + { + if(wi.dwStyle & WS_MINIMIZE) + return HTCAPTION; + if(!ThickFrame) + return HTBORDER; + if (Point.y < (WindowRect.top + YSize)) + return HTTOPRIGHT; + if (Point.y >= (WindowRect.bottom - YSize)) + return HTBOTTOMRIGHT; + return HTRIGHT; + } + } + } + else + { + if (wi.dwExStyle & WS_EX_STATICEDGE) + InflateRect(&WindowRect, -GetSystemMetrics(SM_CXBORDER), + -GetSystemMetrics(SM_CYBORDER)); + if (!PtInRect(&WindowRect, Point)) + return HTBORDER; + } + + if ((wi.dwStyle & WS_CAPTION) == WS_CAPTION) + { + if (wi.dwExStyle & WS_EX_TOOLWINDOW) + WindowRect.top += GetSystemMetrics(SM_CYSMCAPTION); + else + WindowRect.top += GetSystemMetrics(SM_CYCAPTION); + + if (!PtInRect(&WindowRect, Point)) + { + + INT ButtonWidth; + + if (wi.dwExStyle & WS_EX_TOOLWINDOW) + ButtonWidth = GetSystemMetrics(SM_CXSMSIZE); + else + ButtonWidth = GetSystemMetrics(SM_CXSIZE); + + ButtonWidth -= 4; + ButtonWidth+= BUTTON_GAP_SIZE; + + if (wi.dwStyle & WS_SYSMENU) + { + if (wi.dwExStyle & WS_EX_TOOLWINDOW) + { + WindowRect.right -= ButtonWidth; + } + else + { + if(!(wi.dwExStyle & WS_EX_DLGMODALFRAME)) + WindowRect.left += ButtonWidth; + WindowRect.right -= ButtonWidth; + } + } + if (Point.x < WindowRect.left) + return HTSYSMENU; + if (WindowRect.right <= Point.x) + return HTCLOSE; + if (wi.dwStyle & WS_MAXIMIZEBOX || wi.dwStyle & WS_MINIMIZEBOX) + WindowRect.right -= ButtonWidth; + if (Point.x >= WindowRect.right) + return HTMAXBUTTON; + if (wi.dwStyle & WS_MINIMIZEBOX) + WindowRect.right -= ButtonWidth; + if (Point.x >= WindowRect.right) + return HTMINBUTTON; + return HTCAPTION; + } + } + + if(!(wi.dwStyle & WS_MINIMIZE)) + { + HMENU menu; + + ClientPoint = Point; + ScreenToClient(hWnd, &ClientPoint); + GetClientRect(hWnd, &wi.rcClient); + + if (PtInRect(&wi.rcClient, ClientPoint)) + { + return HTCLIENT; + } + + if ((menu = GetMenu(hWnd)) && !(wi.dwStyle & WS_CHILD)) + { + if (Point.x > 0 && Point.x < WindowRect.right && ClientPoint.y < 0) + return HTMENU; + } + + if (wi.dwExStyle & WS_EX_CLIENTEDGE) + { + InflateRect(&WindowRect, -2 * GetSystemMetrics(SM_CXBORDER), + -2 * GetSystemMetrics(SM_CYBORDER)); + } + + if ((wi.dwStyle & WS_VSCROLL) && (wi.dwStyle & WS_HSCROLL) && + (WindowRect.bottom - WindowRect.top) > GetSystemMetrics(SM_CYHSCROLL)) + { + RECT ParentRect, TempRect = WindowRect, TempRect2 = WindowRect; + HWND Parent = GetParent(hWnd); + + TempRect.bottom -= GetSystemMetrics(SM_CYHSCROLL); + if ((wi.dwExStyle & WS_EX_LEFTSCROLLBAR) != 0) + TempRect.right = TempRect.left + GetSystemMetrics(SM_CXVSCROLL); + else + TempRect.left = TempRect.right - GetSystemMetrics(SM_CXVSCROLL); + if (PtInRect(&TempRect, Point)) + return HTVSCROLL; + + TempRect2.top = TempRect2.bottom - GetSystemMetrics(SM_CYHSCROLL); + if ((wi.dwExStyle & WS_EX_LEFTSCROLLBAR) != 0) + TempRect2.left += GetSystemMetrics(SM_CXVSCROLL); + else + TempRect2.right -= GetSystemMetrics(SM_CXVSCROLL); + if (PtInRect(&TempRect2, Point)) + return HTHSCROLL; + + TempRect.top = TempRect2.top; + TempRect.bottom = TempRect2.bottom; + if(Parent) + GetClientRect(Parent, &ParentRect); + if (PtInRect(&TempRect, Point) && HASSIZEGRIP(wi.dwStyle, wi.dwExStyle, + GetWindowLongW(Parent, GWL_STYLE), wi.rcWindow, ParentRect)) + { + if ((wi.dwExStyle & WS_EX_LEFTSCROLLBAR) != 0) + return HTBOTTOMLEFT; + else + return HTBOTTOMRIGHT; + } + } + else + { + if (wi.dwStyle & WS_VSCROLL) + { + RECT TempRect = WindowRect; + + if ((wi.dwExStyle & WS_EX_LEFTSCROLLBAR) != 0) + TempRect.right = TempRect.left + GetSystemMetrics(SM_CXVSCROLL); + else + TempRect.left = TempRect.right - GetSystemMetrics(SM_CXVSCROLL); + if (PtInRect(&TempRect, Point)) + return HTVSCROLL; + } + else if (wi.dwStyle & WS_HSCROLL) + { + RECT TempRect = WindowRect; + TempRect.top = TempRect.bottom - GetSystemMetrics(SM_CYHSCROLL); + if (PtInRect(&TempRect, Point)) + return HTHSCROLL; + } + } + } + + return HTNOWHERE; } LRESULT CALLBACK @@ -669,6 +898,13 @@ default: return DefWndProc(hWnd, Msg, wParam, lParam); } + case WM_NCHITTEST: + { + POINT Point; + Point.x = GET_X_LPARAM(lParam); + Point.y = GET_Y_LPARAM(lParam); + return DefWndNCHitTest(hWnd, Point); + } default: return DefWndProc(hWnd, Msg, wParam, lParam); }
13 years, 7 months
1
0
0
0
[gadamopoulos] 51847: [uxtheme] - Implement DrawClassicFrame, heavily based on user32
by gadamopoulos@svn.reactos.org
Author: gadamopoulos Date: Sun May 22 15:37:32 2011 New Revision: 51847 URL:
http://svn.reactos.org/svn/reactos?rev=51847&view=rev
Log: [uxtheme] - Implement DrawClassicFrame, heavily based on user32 Modified: branches/GSoC_2011/ThemesSupport/dll/win32/uxtheme/nonclient.c Modified: branches/GSoC_2011/ThemesSupport/dll/win32/uxtheme/nonclient.c URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/ThemesSupport/dll/win…
============================================================================== --- branches/GSoC_2011/ThemesSupport/dll/win32/uxtheme/nonclient.c [iso-8859-1] (original) +++ branches/GSoC_2011/ThemesSupport/dll/win32/uxtheme/nonclient.c [iso-8859-1] Sun May 22 15:37:32 2011 @@ -69,6 +69,22 @@ } return ret; +} + +static BOOL +UserHasWindowEdge(DWORD Style, DWORD ExStyle) +{ + if (Style & WS_MINIMIZE) + return TRUE; + if (ExStyle & WS_EX_DLGMODALFRAME) + return TRUE; + if (ExStyle & WS_EX_STATICEDGE) + return FALSE; + if (Style & WS_THICKFRAME) + return TRUE; + if (Style == WS_DLGFRAME || Style == WS_CAPTION) + return TRUE; + return FALSE; } HICON @@ -395,7 +411,71 @@ static void DrawClassicFrame(PDRAW_CONTEXT context, RECT* prcCurrent) { - + /* Draw outer edge */ + if (UserHasWindowEdge(context->wi.dwStyle, context->wi.dwExStyle)) + { + DrawEdge(context->hDC, prcCurrent, EDGE_RAISED, BF_RECT | BF_ADJUST); + } + else if (context->wi.dwExStyle & WS_EX_STATICEDGE) + { + DrawEdge(context->hDC, prcCurrent, BDR_SUNKENINNER, BF_RECT | BF_ADJUST | BF_FLAT); + } + + /* Firstly the "thick" frame */ + if ((context->wi.dwStyle & WS_THICKFRAME) && !(context->wi.dwStyle & WS_MINIMIZE)) + { + INT Width = + (GetSystemMetrics(SM_CXFRAME) - GetSystemMetrics(SM_CXDLGFRAME)) * + GetSystemMetrics(SM_CXBORDER); + INT Height = + (GetSystemMetrics(SM_CYFRAME) - GetSystemMetrics(SM_CYDLGFRAME)) * + GetSystemMetrics(SM_CYBORDER); + + SelectObject(context->hDC, GetSysColorBrush( + context->Active ? COLOR_ACTIVEBORDER : COLOR_INACTIVEBORDER)); + + /* Draw frame */ + PatBlt(context->hDC, prcCurrent->left, prcCurrent->top, + prcCurrent->right - prcCurrent->left, Height, PATCOPY); + PatBlt(context->hDC, prcCurrent->left, prcCurrent->top, + Width, prcCurrent->bottom - prcCurrent->top, PATCOPY); + PatBlt(context->hDC, prcCurrent->left, prcCurrent->bottom, + prcCurrent->right - prcCurrent->left, -Height, PATCOPY); + PatBlt(context->hDC, prcCurrent->right, prcCurrent->top, + -Width, prcCurrent->bottom - prcCurrent->top, PATCOPY); + + InflateRect(prcCurrent, -Width, -Height); + } + + /* Now the other bit of the frame */ + if (context->wi.dwStyle & (WS_DLGFRAME | WS_BORDER) || context->wi.dwExStyle & WS_EX_DLGMODALFRAME) + { + INT Width = GetSystemMetrics(SM_CXBORDER); + INT Height = GetSystemMetrics(SM_CYBORDER); + + SelectObject(context->hDC, GetSysColorBrush( + (context->wi.dwExStyle & (WS_EX_DLGMODALFRAME | WS_EX_CLIENTEDGE)) ? COLOR_3DFACE : + (context->wi.dwExStyle & WS_EX_STATICEDGE) ? COLOR_WINDOWFRAME : + (context->wi.dwStyle & (WS_DLGFRAME | WS_THICKFRAME)) ? COLOR_3DFACE : + COLOR_WINDOWFRAME)); + + /* Draw frame */ + PatBlt(context->hDC, prcCurrent->left, prcCurrent->top, + prcCurrent->right - prcCurrent->left, Height, PATCOPY); + PatBlt(context->hDC, prcCurrent->left, prcCurrent->top, + Width, prcCurrent->bottom - prcCurrent->top, PATCOPY); + PatBlt(context->hDC, prcCurrent->left, prcCurrent->bottom, + prcCurrent->right - prcCurrent->left, -Height, PATCOPY); + PatBlt(context->hDC, prcCurrent->right, prcCurrent->top, + -Width, prcCurrent->bottom - prcCurrent->top, PATCOPY); + + InflateRect(prcCurrent, -Width, -Height); + } + + if (context->wi.dwExStyle & WS_EX_CLIENTEDGE) + { + DrawEdge(context->hDC, prcCurrent, EDGE_SUNKEN, BF_RECT | BF_ADJUST); + } } static void
13 years, 7 months
1
0
0
0
[gadamopoulos] 51846: [uxtheme] - Implement handling WM_NCMOUSEMOVE, WM_NCMOUSELEAVE and WM_NCLBUTTONDOWN, needed for painting the caption buttons when the user hovers or clicks them
by gadamopoulos@svn.reactos.org
Author: gadamopoulos Date: Sun May 22 15:31:18 2011 New Revision: 51846 URL:
http://svn.reactos.org/svn/reactos?rev=51846&view=rev
Log: [uxtheme] - Implement handling WM_NCMOUSEMOVE, WM_NCMOUSELEAVE and WM_NCLBUTTONDOWN, needed for painting the caption buttons when the user hovers or clicks them Modified: branches/GSoC_2011/ThemesSupport/dll/win32/uxtheme/nonclient.c Modified: branches/GSoC_2011/ThemesSupport/dll/win32/uxtheme/nonclient.c URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/ThemesSupport/dll/win…
============================================================================== --- branches/GSoC_2011/ThemesSupport/dll/win32/uxtheme/nonclient.c [iso-8859-1] (original) +++ branches/GSoC_2011/ThemesSupport/dll/win32/uxtheme/nonclient.c [iso-8859-1] Sun May 22 15:31:18 2011 @@ -252,6 +252,48 @@ DrawThemeBackground(pcontext->theme, pcontext->hDC, iPartId, iStateId, &rcPart, NULL); } +static DWORD +ThemeGetButtonState(DWORD htCurrect, DWORD htHot, DWORD htDown, BOOL Active) +{ + if (htHot == htCurrect) + return BUTTON_HOT; + if (!Active) + return BUTTON_INACTIVE; + if (htDown == htCurrect) + return BUTTON_PRESSED; + + return BUTTON_NORMAL; +} + +/* Used only from mouse event handlers */ +static void +ThemeDrawCaptionButtons(PDRAW_CONTEXT pcontext, DWORD htHot, DWORD htDown) +{ + RECT rcCurrent; + + /* Check if the window has caption buttons */ + if (!((pcontext->wi.dwStyle & WS_CAPTION) && (pcontext->wi.dwStyle & WS_SYSMENU))) + return ; + + rcCurrent.top = rcCurrent.left = 0; + rcCurrent.right = pcontext->wi.rcWindow.right - pcontext->wi.rcWindow.left; + rcCurrent.bottom = pcontext->CaptionHeight; + + /* Add a padding around the objects of the caption */ + InflateRect(&rcCurrent, -(int)pcontext->wi.cyWindowBorders-BUTTON_GAP_SIZE, + -(int)pcontext->wi.cyWindowBorders-BUTTON_GAP_SIZE); + + /* Draw the buttons */ + ThemeDrawCaptionButton(pcontext, &rcCurrent, CLOSEBUTTON, + ThemeGetButtonState(HTCLOSE, htHot, htDown, pcontext->Active)); + ThemeDrawCaptionButton(pcontext, &rcCurrent, MAXBUTTON, + ThemeGetButtonState(HTMAXBUTTON, htHot, htDown, pcontext->Active)); + ThemeDrawCaptionButton(pcontext, &rcCurrent, MINBUTTON, + ThemeGetButtonState(HTMINBUTTON, htHot, htDown, pcontext->Active)); + ThemeDrawCaptionButton(pcontext, &rcCurrent, HELPBUTTON, + ThemeGetButtonState(HTHELP, htHot, htDown, pcontext->Active)); +} + static void ThemeDrawCaption(PDRAW_CONTEXT pcontext, RECT* prcCurrent) { @@ -421,6 +463,105 @@ return 0; } +static LRESULT +ThemeHandleNcMouseMove(HWND hWnd, DWORD ht) +{ + DRAW_CONTEXT context; + TRACKMOUSEEVENT tme; + + tme.cbSize = sizeof(TRACKMOUSEEVENT); + tme.dwFlags = TME_QUERY; + tme.hwndTrack = hWnd; + TrackMouseEvent(&tme); + if (tme.dwFlags != (TME_LEAVE | TME_NONCLIENT)) + { + tme.hwndTrack = hWnd; + tme.dwFlags = TME_LEAVE | TME_NONCLIENT; + TrackMouseEvent(&tme); + } + + ThemeInitDrawContext(&context, hWnd, 0); + ThemeDrawCaptionButtons(&context, ht, 0); + ThemeCleanupDrawContext(&context); + + return 0; +} + +static LRESULT +ThemeHandleNcMouseLeave(HWND hWnd) +{ + DRAW_CONTEXT context; + + ThemeInitDrawContext(&context, hWnd, 0); + ThemeDrawCaptionButtons(&context, 0, 0); + ThemeCleanupDrawContext(&context); + + return 0; +} + +static VOID +ThemeHandleButton(HWND hWnd, WPARAM wParam) +{ + MSG Msg; + BOOL Pressed = TRUE, OldState; + WPARAM SCMsg, ht; + ULONG Style; + DRAW_CONTEXT context; + + Style = GetWindowLongW(hWnd, GWL_STYLE); + switch (wParam) + { + case HTCLOSE: + if (!(Style & WS_SYSMENU)) + return; + SCMsg = SC_CLOSE; + break; + case HTMINBUTTON: + if (!(Style & WS_MINIMIZEBOX)) + return; + SCMsg = ((Style & WS_MINIMIZE) ? SC_RESTORE : SC_MINIMIZE); + break; + case HTMAXBUTTON: + if (!(Style & WS_MAXIMIZEBOX)) + return; + SCMsg = ((Style & WS_MAXIMIZE) ? SC_RESTORE : SC_MAXIMIZE); + break; + default : + return; + } + + ThemeInitDrawContext(&context, hWnd, 0); + ThemeDrawCaptionButtons(&context, 0, wParam); + + SetCapture(hWnd); + + for (;;) + { + if (GetMessageW(&Msg, 0, WM_MOUSEFIRST, WM_MOUSELAST) <= 0) + break; + + if (Msg.message == WM_LBUTTONUP) + break; + + if (Msg.message != WM_MOUSEMOVE) + continue; + + OldState = Pressed; + ht = SendMessage(hWnd, WM_NCHITTEST, 0, MAKELPARAM(Msg.pt.x, Msg.pt.y)); + Pressed = (ht == wParam); + + ThemeDrawCaptionButtons(&context, 0, Pressed ? wParam: 0); + } + + ThemeDrawCaptionButtons(&context, 0, 0); + ThemeCleanupDrawContext(&context); + + ReleaseCapture(); + + if (Pressed) + SendMessageW(hWnd, WM_SYSCOMMAND, SCMsg, 0); +} + LRESULT CALLBACK ThemeWndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam, WNDPROC DefWndProc) { @@ -431,6 +572,23 @@ case WM_NCACTIVATE: ThemeHandleNCPaint(hWnd, (HRGN)1); return TRUE; + case WM_NCMOUSEMOVE: + return ThemeHandleNcMouseMove(hWnd, wParam); + case WM_NCMOUSELEAVE: + return ThemeHandleNcMouseLeave(hWnd); + case WM_NCLBUTTONDOWN: + switch (wParam) + { + case HTMINBUTTON: + case HTMAXBUTTON: + case HTCLOSE: + { + ThemeHandleButton(hWnd, wParam); + return 0; + } + default: + return DefWndProc(hWnd, Msg, wParam, lParam); + } default: return DefWndProc(hWnd, Msg, wParam, lParam); }
13 years, 7 months
1
0
0
0
[osiejka] 51845: [MSVC] Final fix for MSVC build of base\application resources
by osiejka@svn.reactos.org
Author: osiejka Date: Sun May 22 13:56:46 2011 New Revision: 51845 URL:
http://svn.reactos.org/svn/reactos?rev=51845&view=rev
Log: [MSVC] Final fix for MSVC build of base\application resources Modified: trunk/reactos/base/applications/cacls/rsrc.rc trunk/reactos/base/applications/rapps/rsrc.rc trunk/reactos/base/applications/taskmgr/lang/pl-PL.rc Modified: trunk/reactos/base/applications/cacls/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cacls/rs…
============================================================================== --- trunk/reactos/base/applications/cacls/rsrc.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/cacls/rsrc.rc [iso-8859-1] Sun May 22 13:56:46 2011 @@ -23,4 +23,4 @@ // UTF-8 #pragma code_page(65001) -#include "lang/pl-PL.rc +#include "lang/pl-PL.rc" Modified: trunk/reactos/base/applications/rapps/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/rs…
============================================================================== --- trunk/reactos/base/applications/rapps/rsrc.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/rapps/rsrc.rc [iso-8859-1] Sun May 22 13:56:46 2011 @@ -12,4 +12,4 @@ #include "lang/ru-RU.rc" #include "lang/sk-SK.rc" #include "lang/sv-SE.rc" -#include "lang/uk-UA.rc +#include "lang/uk-UA.rc" Modified: trunk/reactos/base/applications/taskmgr/lang/pl-PL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/taskmgr/…
============================================================================== --- trunk/reactos/base/applications/taskmgr/lang/pl-PL.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/taskmgr/lang/pl-PL.rc [iso-8859-1] Sun May 22 13:56:46 2011 @@ -647,4 +647,4 @@ IDS_STATUS_PROCESSES "Procesy: %d" IDS_Not_Responding "Nie odpowiada" IDS_Running "Uruchomiony" -END +END
13 years, 7 months
1
0
0
0
[osiejka] 51844: [MSVC] Arch Blackmann should know not to remove empty lines at the end of resource/rsrc files in base\applications. Should fix MS Linker fatal error RC1004 for modules affected.
by osiejka@svn.reactos.org
Author: osiejka Date: Sun May 22 11:57:27 2011 New Revision: 51844 URL:
http://svn.reactos.org/svn/reactos?rev=51844&view=rev
Log: [MSVC] Arch Blackmann should know not to remove empty lines at the end of resource/rsrc files in base\applications. Should fix MS Linker fatal error RC1004 for modules affected. Modified: trunk/reactos/base/applications/cacls/rsrc.rc trunk/reactos/base/applications/calc/resource.rc trunk/reactos/base/applications/charmap/rsrc.rc trunk/reactos/base/applications/cmdutils/find/rsrc.rc trunk/reactos/base/applications/cmdutils/more/rsrc.rc trunk/reactos/base/applications/dxdiag/rsrc.rc trunk/reactos/base/applications/findstr/rsrc.rc trunk/reactos/base/applications/games/solitaire/rsrc.rc trunk/reactos/base/applications/games/spider/rsrc.rc trunk/reactos/base/applications/games/winmine/rsrc.rc trunk/reactos/base/applications/kbswitch/rsrc.rc trunk/reactos/base/applications/logoff/rsrc.rc trunk/reactos/base/applications/magnify/rsrc.rc trunk/reactos/base/applications/mmc/rsrc.rc trunk/reactos/base/applications/mplay32/rsrc.rc trunk/reactos/base/applications/msconfig/rsrc.rc trunk/reactos/base/applications/mscutils/devmgmt/rsrc.rc trunk/reactos/base/applications/mscutils/eventvwr/rsrc.rc trunk/reactos/base/applications/mscutils/servman/rsrc.rc trunk/reactos/base/applications/mspaint/rsrc.rc trunk/reactos/base/applications/mstsc/rsrc.rc trunk/reactos/base/applications/network/ipconfig/ipconfig.rc trunk/reactos/base/applications/notepad/rsrc.rc trunk/reactos/base/applications/rapps/rsrc.rc trunk/reactos/base/applications/regedit/rsrc.rc trunk/reactos/base/applications/screensavers/3dtext/rsrc.rc trunk/reactos/base/applications/screensavers/logon/logon.rc trunk/reactos/base/applications/shutdown/rsrc.rc trunk/reactos/base/applications/sndrec32/rsrc.rc trunk/reactos/base/applications/sndvol32/rsrc.rc trunk/reactos/base/applications/taskmgr/rsrc.rc Modified: trunk/reactos/base/applications/cacls/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cacls/rs…
============================================================================== --- trunk/reactos/base/applications/cacls/rsrc.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/cacls/rsrc.rc [iso-8859-1] Sun May 22 11:57:27 2011 @@ -23,4 +23,4 @@ // UTF-8 #pragma code_page(65001) -#include "lang/pl-PL.rc" +#include "lang/pl-PL.rc Modified: trunk/reactos/base/applications/calc/resource.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/res…
============================================================================== --- trunk/reactos/base/applications/calc/resource.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/calc/resource.rc [iso-8859-1] Sun May 22 11:57:27 2011 @@ -66,4 +66,4 @@ // UTF-8 #pragma code_page(65001) #include "lang/pl-PL.rc" -#include "lang/ro-RO.rc" +#include "lang/ro-RO.rc" Modified: trunk/reactos/base/applications/charmap/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/charmap/…
============================================================================== --- trunk/reactos/base/applications/charmap/rsrc.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/charmap/rsrc.rc [iso-8859-1] Sun May 22 11:57:27 2011 @@ -23,4 +23,4 @@ // UTF-8 #pragma code_page(65001) -#include "lang/pl-PL.rc" +#include "lang/pl-PL.rc" Modified: trunk/reactos/base/applications/cmdutils/find/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
============================================================================== --- trunk/reactos/base/applications/cmdutils/find/rsrc.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/cmdutils/find/rsrc.rc [iso-8859-1] Sun May 22 11:57:27 2011 @@ -20,4 +20,4 @@ // UTF-8 #pragma code_page(65001) -#include "lang/pl-PL.rc" +#include "lang/pl-PL.rc" Modified: trunk/reactos/base/applications/cmdutils/more/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
============================================================================== --- trunk/reactos/base/applications/cmdutils/more/rsrc.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/cmdutils/more/rsrc.rc [iso-8859-1] Sun May 22 11:57:27 2011 @@ -16,4 +16,4 @@ // UTF-8 #pragma code_page(65001) -#include "lang/pl-PL.rc" +#include "lang/pl-PL.rc" Modified: trunk/reactos/base/applications/dxdiag/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/dxdiag/r…
============================================================================== --- trunk/reactos/base/applications/dxdiag/rsrc.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/dxdiag/rsrc.rc [iso-8859-1] Sun May 22 11:57:27 2011 @@ -17,4 +17,4 @@ // UTF-8 #pragma code_page(65001) -#include "lang/pl-PL.rc" +#include "lang/pl-PL.rc" Modified: trunk/reactos/base/applications/findstr/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/findstr/…
============================================================================== --- trunk/reactos/base/applications/findstr/rsrc.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/findstr/rsrc.rc [iso-8859-1] Sun May 22 11:57:27 2011 @@ -21,4 +21,4 @@ // UTF-8 #pragma code_page(65001) -#include "lang/pl-PL.rc" +#include "lang/pl-PL.rc" Modified: trunk/reactos/base/applications/games/solitaire/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/so…
============================================================================== --- trunk/reactos/base/applications/games/solitaire/rsrc.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/games/solitaire/rsrc.rc [iso-8859-1] Sun May 22 11:57:27 2011 @@ -31,4 +31,4 @@ // UTF-8 #pragma code_page(65001) #include "lang/pl-PL.rc" -#include "lang/ro-RO.rc" +#include "lang/ro-RO.rc" Modified: trunk/reactos/base/applications/games/spider/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/sp…
============================================================================== --- trunk/reactos/base/applications/games/spider/rsrc.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/games/spider/rsrc.rc [iso-8859-1] Sun May 22 11:57:27 2011 @@ -20,4 +20,4 @@ // UTF-8 #pragma code_page(65001) -#include "lang/pl-PL.rc" +#include "lang/pl-PL.rc" Modified: trunk/reactos/base/applications/games/winmine/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/wi…
============================================================================== --- trunk/reactos/base/applications/games/winmine/rsrc.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/games/winmine/rsrc.rc [iso-8859-1] Sun May 22 11:57:27 2011 @@ -67,4 +67,4 @@ #include "lang/sl-SI.rc" #include "lang/sv-SE.rc" #include "lang/uk-UA.rc" -#include "lang/zh-CN.rc" +#include "lang/zh-CN.rc" Modified: trunk/reactos/base/applications/kbswitch/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/kbswitch…
============================================================================== --- trunk/reactos/base/applications/kbswitch/rsrc.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/kbswitch/rsrc.rc [iso-8859-1] Sun May 22 11:57:27 2011 @@ -17,4 +17,4 @@ // UTF-8 #pragma code_page(65001) -#include "lang/pl-PL.rc" +#include "lang/pl-PL.rc" Modified: trunk/reactos/base/applications/logoff/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/logoff/r…
============================================================================== --- trunk/reactos/base/applications/logoff/rsrc.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/logoff/rsrc.rc [iso-8859-1] Sun May 22 11:57:27 2011 @@ -20,4 +20,4 @@ // UTF-8 #pragma code_page(65001) -#include "lang/pl-PL.rc" +#include "lang/pl-PL.rc" Modified: trunk/reactos/base/applications/magnify/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/magnify/…
============================================================================== --- trunk/reactos/base/applications/magnify/rsrc.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/magnify/rsrc.rc [iso-8859-1] Sun May 22 11:57:27 2011 @@ -19,4 +19,4 @@ // UTF-8 #pragma code_page(65001) #include "lang/pl-PL.rc" -#include "lang/ro-RO.rc" +#include "lang/ro-RO.rc" Modified: trunk/reactos/base/applications/mmc/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mmc/rsrc…
============================================================================== --- trunk/reactos/base/applications/mmc/rsrc.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/mmc/rsrc.rc [iso-8859-1] Sun May 22 11:57:27 2011 @@ -23,4 +23,4 @@ // UTF-8 #pragma code_page(65001) -#include "lang/pl-PL.rc" +#include "lang/pl-PL.rc" Modified: trunk/reactos/base/applications/mplay32/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mplay32/…
============================================================================== --- trunk/reactos/base/applications/mplay32/rsrc.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/mplay32/rsrc.rc [iso-8859-1] Sun May 22 11:57:27 2011 @@ -18,4 +18,4 @@ // UTF-8 #pragma code_page(65001) -#include "lang/pl-PL.rc" +#include "lang/pl-PL.rc" Modified: trunk/reactos/base/applications/msconfig/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/msconfig…
============================================================================== --- trunk/reactos/base/applications/msconfig/rsrc.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/msconfig/rsrc.rc [iso-8859-1] Sun May 22 11:57:27 2011 @@ -32,4 +32,4 @@ // UTF-8 #pragma code_page(65001) -#include "lang/pl-PL.rc" +#include "lang/pl-PL.rc" Modified: trunk/reactos/base/applications/mscutils/devmgmt/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
============================================================================== --- trunk/reactos/base/applications/mscutils/devmgmt/rsrc.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/mscutils/devmgmt/rsrc.rc [iso-8859-1] Sun May 22 11:57:27 2011 @@ -32,4 +32,4 @@ // UTF-8 #pragma code_page(65001) -#include "lang/pl-PL.rc" +#include "lang/pl-PL.rc" Modified: trunk/reactos/base/applications/mscutils/eventvwr/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
============================================================================== --- trunk/reactos/base/applications/mscutils/eventvwr/rsrc.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/mscutils/eventvwr/rsrc.rc [iso-8859-1] Sun May 22 11:57:27 2011 @@ -27,4 +27,4 @@ // UTF-8 #pragma code_page(65001) -#include "lang/pl-PL.rc" +#include "lang/pl-PL.rc" Modified: trunk/reactos/base/applications/mscutils/servman/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
============================================================================== --- trunk/reactos/base/applications/mscutils/servman/rsrc.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/mscutils/servman/rsrc.rc [iso-8859-1] Sun May 22 11:57:27 2011 @@ -40,4 +40,4 @@ // UTF-8 #pragma code_page(65001) #include "lang/pl-PL.rc" -#include "lang/ro-RO.rc" +#include "lang/ro-RO.rc" Modified: trunk/reactos/base/applications/mspaint/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint/…
============================================================================== --- trunk/reactos/base/applications/mspaint/rsrc.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/mspaint/rsrc.rc [iso-8859-1] Sun May 22 11:57:27 2011 @@ -38,4 +38,4 @@ // UTF-8 #pragma code_page(65001) #include "lang/pl-PL.rc" -#include "lang/ro-RO.rc" +#include "lang/ro-RO.rc" Modified: trunk/reactos/base/applications/mstsc/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mstsc/rs…
============================================================================== --- trunk/reactos/base/applications/mstsc/rsrc.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/mstsc/rsrc.rc [iso-8859-1] Sun May 22 11:57:27 2011 @@ -31,4 +31,4 @@ // UTF-8 #pragma code_page(65001) -#include "lang/pl-PL.rc" +#include "lang/pl-PL.rc" Modified: trunk/reactos/base/applications/network/ipconfig/ipconfig.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/network/…
============================================================================== --- trunk/reactos/base/applications/network/ipconfig/ipconfig.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/network/ipconfig/ipconfig.rc [iso-8859-1] Sun May 22 11:57:27 2011 @@ -23,4 +23,4 @@ // UTF-8 #pragma code_page(65001) -#include "lang/pl-PL.rc" +#include "lang/pl-PL.rc" Modified: trunk/reactos/base/applications/notepad/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
============================================================================== --- trunk/reactos/base/applications/notepad/rsrc.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/notepad/rsrc.rc [iso-8859-1] Sun May 22 11:57:27 2011 @@ -65,4 +65,4 @@ #pragma code_page(65001) #include "lang/hy-AM.rc" #include "lang/pl-PL.rc" -#include "lang/ro-RO.rc" +#include "lang/ro-RO.rc" Modified: trunk/reactos/base/applications/rapps/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/rs…
============================================================================== --- trunk/reactos/base/applications/rapps/rsrc.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/rapps/rsrc.rc [iso-8859-1] Sun May 22 11:57:27 2011 @@ -12,4 +12,4 @@ #include "lang/ru-RU.rc" #include "lang/sk-SK.rc" #include "lang/sv-SE.rc" -#include "lang/uk-UA.rc" +#include "lang/uk-UA.rc Modified: trunk/reactos/base/applications/regedit/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/…
============================================================================== --- trunk/reactos/base/applications/regedit/rsrc.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/regedit/rsrc.rc [iso-8859-1] Sun May 22 11:57:27 2011 @@ -54,4 +54,4 @@ // UTF-8 #pragma code_page(65001) -#include "lang/pl-PL.rc" +#include "lang/pl-PL.rc" Modified: trunk/reactos/base/applications/screensavers/3dtext/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/screensa…
============================================================================== --- trunk/reactos/base/applications/screensavers/3dtext/rsrc.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/screensavers/3dtext/rsrc.rc [iso-8859-1] Sun May 22 11:57:27 2011 @@ -29,4 +29,4 @@ // UTF-8 #pragma code_page(65001) -#include "lang/pl-PL.rc" +#include "lang/pl-PL.rc" Modified: trunk/reactos/base/applications/screensavers/logon/logon.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/screensa…
============================================================================== --- trunk/reactos/base/applications/screensavers/logon/logon.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/screensavers/logon/logon.rc [iso-8859-1] Sun May 22 11:57:27 2011 @@ -33,4 +33,4 @@ // UTF-8 #pragma code_page(65001) #include "lang/pl-PL.rc" -#include "lang/ro-RO.rc" +#include "lang/ro-RO.rc" Modified: trunk/reactos/base/applications/shutdown/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/shutdown…
============================================================================== --- trunk/reactos/base/applications/shutdown/rsrc.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/shutdown/rsrc.rc [iso-8859-1] Sun May 22 11:57:27 2011 @@ -20,4 +20,4 @@ // UTF-8 #pragma code_page(65001) -#include "lang/pl-PL.rc" +#include "lang/pl-PL.rc" Modified: trunk/reactos/base/applications/sndrec32/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/sndrec32…
============================================================================== --- trunk/reactos/base/applications/sndrec32/rsrc.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/sndrec32/rsrc.rc [iso-8859-1] Sun May 22 11:57:27 2011 @@ -29,4 +29,4 @@ // UTF-8 #pragma code_page(65001) -#include "lang/pl-PL.rc" +#include "lang/pl-PL.rc" Modified: trunk/reactos/base/applications/sndvol32/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/sndvol32…
============================================================================== --- trunk/reactos/base/applications/sndvol32/rsrc.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/sndvol32/rsrc.rc [iso-8859-1] Sun May 22 11:57:27 2011 @@ -29,4 +29,4 @@ // UTF-8 #pragma code_page(65001) -#include "lang/pl-PL.rc" +#include "lang/pl-PL.rc" Modified: trunk/reactos/base/applications/taskmgr/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/taskmgr/…
============================================================================== --- trunk/reactos/base/applications/taskmgr/rsrc.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/taskmgr/rsrc.rc [iso-8859-1] Sun May 22 11:57:27 2011 @@ -24,4 +24,4 @@ // UTF-8 #pragma code_page(65001) #include "lang/pl-PL.rc" -#include "lang/ro-RO.rc" +#include "lang/ro-RO.rc"
13 years, 7 months
1
0
0
0
[ekohl] 51843: [MSPORTS] Determine serial port names COM1-4 and parallel port names LPT1-2 from their resources. Other serial and parallel are still named COMx and LPTx.
by ekohl@svn.reactos.org
Author: ekohl Date: Sun May 22 08:57:33 2011 New Revision: 51843 URL:
http://svn.reactos.org/svn/reactos?rev=51843&view=rev
Log: [MSPORTS] Determine serial port names COM1-4 and parallel port names LPT1-2 from their resources. Other serial and parallel are still named COMx and LPTx. Modified: trunk/reactos/dll/win32/msports/classinst.c Modified: trunk/reactos/dll/win32/msports/classinst.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msports/classins…
============================================================================== --- trunk/reactos/dll/win32/msports/classinst.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msports/classinst.c [iso-8859-1] Sun May 22 08:57:33 2011 @@ -6,7 +6,10 @@ * PROGRAMMERS: Copyright 2011 Eric Kohl */ +#define WIN32_NO_STATUS #include <windows.h> +#include <cmtypes.h> +#include <stdio.h> #include <setupapi.h> #include <wine/debug.h> @@ -21,28 +24,275 @@ } PORT_TYPE; +BOOL +GetBootResourceList(HDEVINFO DeviceInfoSet, + PSP_DEVINFO_DATA DeviceInfoData, + PCM_RESOURCE_LIST *ppResourceList) +{ + HKEY hDeviceKey = NULL; + HKEY hConfigKey = NULL; + LPBYTE lpBuffer = NULL; + DWORD dwDataSize; + LONG lError; + BOOL ret = FALSE; + + *ppResourceList = NULL; + + hDeviceKey = SetupDiCreateDevRegKeyW(DeviceInfoSet, + DeviceInfoData, + DICS_FLAG_GLOBAL, + 0, + DIREG_DEV, + NULL, + NULL); + if (!hDeviceKey) + return FALSE; + + lError = RegOpenKeyExW(hDeviceKey, + L"LogConf", + 0, + KEY_QUERY_VALUE, + &hConfigKey); + if (lError != ERROR_SUCCESS) + goto done; + + /* Get the configuration data size */ + lError = RegQueryValueExW(hConfigKey, + L"BootConfig", + NULL, + NULL, + NULL, + &dwDataSize); + if (lError != ERROR_SUCCESS) + goto done; + + /* Allocate the buffer */ + lpBuffer = HeapAlloc(GetProcessHeap(), 0, dwDataSize); + if (lpBuffer == NULL) + goto done; + + /* Retrieve the configuration data */ + lError = RegQueryValueExW(hConfigKey, + L"BootConfig", + NULL, + NULL, + (LPBYTE)lpBuffer, + &dwDataSize); + if (lError == ERROR_SUCCESS) + ret = TRUE; + +done: + if (ret == FALSE && lpBuffer != NULL) + HeapFree(GetProcessHeap(), 0, lpBuffer); + + if (hConfigKey) + RegCloseKey(hConfigKey); + + if (hDeviceKey) + RegCloseKey(hDeviceKey); + + if (ret == TRUE) + *ppResourceList = (PCM_RESOURCE_LIST)lpBuffer; + + return ret; +} + + +DWORD +GetSerialPortNumber(IN HDEVINFO DeviceInfoSet, + IN PSP_DEVINFO_DATA DeviceInfoData) +{ + PCM_RESOURCE_LIST lpResourceList = NULL; + PCM_PARTIAL_RESOURCE_DESCRIPTOR lpResDes; + ULONG i; + DWORD dwBaseAddress = 0; + DWORD dwPortNumber = 0; + + TRACE("GetSerialPortNumber(%p, %p)\n", + DeviceInfoSet, DeviceInfoData); + + if (GetBootResourceList(DeviceInfoSet, + DeviceInfoData, + &lpResourceList)) + { + TRACE("Full resource descriptors: %ul\n", lpResourceList->Count); + if (lpResourceList->Count > 0) + { + TRACE("Partial resource descriptors: %ul\n", lpResourceList->List[0].PartialResourceList.Count); + + for (i = 0; i < lpResourceList->List[0].PartialResourceList.Count; i++) + { + lpResDes = &lpResourceList->List[0].PartialResourceList.PartialDescriptors[i]; + TRACE("Type: %u\n", lpResDes->Type); + + switch (lpResDes->Type) + { + case CmResourceTypePort: + TRACE("Port: Start: %I64x Length: %lu\n", + lpResDes->u.Port.Start.QuadPart, + lpResDes->u.Port.Length); + if (lpResDes->u.Port.Start.HighPart == 0) + dwBaseAddress = (DWORD)lpResDes->u.Port.Start.LowPart; + break; + + case CmResourceTypeInterrupt: + TRACE("Interrupt: Level: %lu Vector: %lu\n", + lpResDes->u.Interrupt.Level, + lpResDes->u.Interrupt.Vector); + break; + } + } + } + + HeapFree(GetProcessHeap(), 0, lpResourceList); + } + + switch (dwBaseAddress) + { + case 0x3f8: + dwPortNumber = 1; + break; + + case 0x2f8: + dwPortNumber = 2; + break; + + case 0x3e8: + dwPortNumber = 3; + break; + + case 0x2e8: + dwPortNumber = 4; + break; + } + + return dwPortNumber; +} + + +DWORD +GetParallelPortNumber(IN HDEVINFO DeviceInfoSet, + IN PSP_DEVINFO_DATA DeviceInfoData) +{ + PCM_RESOURCE_LIST lpResourceList = NULL; + PCM_PARTIAL_RESOURCE_DESCRIPTOR lpResDes; + ULONG i; + DWORD dwBaseAddress = 0; + DWORD dwPortNumber = 0; + + TRACE("GetParallelPortNumber(%p, %p)\n", + DeviceInfoSet, DeviceInfoData); + + if (GetBootResourceList(DeviceInfoSet, + DeviceInfoData, + &lpResourceList)) + { + TRACE("Full resource descriptors: %ul\n", lpResourceList->Count); + if (lpResourceList->Count > 0) + { + TRACE("Partial resource descriptors: %ul\n", lpResourceList->List[0].PartialResourceList.Count); + + for (i = 0; i < lpResourceList->List[0].PartialResourceList.Count; i++) + { + lpResDes = &lpResourceList->List[0].PartialResourceList.PartialDescriptors[i]; + TRACE("Type: %u\n", lpResDes->Type); + + switch (lpResDes->Type) + { + case CmResourceTypePort: + TRACE("Port: Start: %I64x Length: %lu\n", + lpResDes->u.Port.Start.QuadPart, + lpResDes->u.Port.Length); + if (lpResDes->u.Port.Start.HighPart == 0) + dwBaseAddress = (DWORD)lpResDes->u.Port.Start.LowPart; + break; + + case CmResourceTypeInterrupt: + TRACE("Interrupt: Level: %lu Vector: %lu\n", + lpResDes->u.Interrupt.Level, + lpResDes->u.Interrupt.Vector); + break; + } + + } + + } + + HeapFree(GetProcessHeap(), 0, lpResourceList); + } + + switch (dwBaseAddress) + { + case 0x378: + dwPortNumber = 1; + break; + + case 0x278: + dwPortNumber = 2; + break; + } + + return dwPortNumber; +} + + static DWORD InstallSerialPort(IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData) { - LPWSTR pszFriendlyName = L"Serial Port (COMx)"; + WCHAR szDeviceDescription[256]; + WCHAR szFriendlyName[256]; + WCHAR szPortName[5]; + DWORD dwPortNumber; TRACE("InstallSerialPort(%p, %p)\n", DeviceInfoSet, DeviceInfoData); + + dwPortNumber = GetSerialPortNumber(DeviceInfoSet, + DeviceInfoData); + if (dwPortNumber != 0) + { + swprintf(szPortName, L"COM%u", dwPortNumber); + } + else + { + wcscpy(szPortName, L"COMx"); + } + /* Install the device */ if (!SetupDiInstallDevice(DeviceInfoSet, DeviceInfoData)) { return GetLastError(); + } + + if (SetupDiGetDeviceRegistryPropertyW(DeviceInfoSet, + DeviceInfoData, + SPDRP_DEVICEDESC, + NULL, + (LPBYTE)szDeviceDescription, + 256 * sizeof(WCHAR), + NULL)) + { + swprintf(szFriendlyName, + L"%s (%s)", + szDeviceDescription, + szPortName); + } + else + { + swprintf(szFriendlyName, + L"Serial Port (%s)", + szPortName); } /* Set the friendly name for the device */ SetupDiSetDeviceRegistryPropertyW(DeviceInfoSet, DeviceInfoData, SPDRP_FRIENDLYNAME, - (LPBYTE)pszFriendlyName, - (wcslen(pszFriendlyName) + 1) * sizeof(WCHAR)); + (LPBYTE)szFriendlyName, + (wcslen(szFriendlyName) + 1) * sizeof(WCHAR)); return ERROR_SUCCESS; } @@ -52,9 +302,61 @@ InstallParallelPort(IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData) { - FIXME("InstallParallelPort(%p, %p)\n", - DeviceInfoSet, DeviceInfoData); - return ERROR_DI_DO_DEFAULT; + WCHAR szDeviceDescription[256]; + WCHAR szFriendlyName[256]; + WCHAR szPortName[5]; + DWORD dwPortNumber; + + TRACE("InstallParallelPort(%p, %p)\n", + DeviceInfoSet, DeviceInfoData); + + dwPortNumber = GetParallelPortNumber(DeviceInfoSet, + DeviceInfoData); + if (dwPortNumber != 0) + { + swprintf(szPortName, L"LPT%u", dwPortNumber); + } + else + { + wcscpy(szPortName, L"LPTx"); + } + + + /* Install the device */ + if (!SetupDiInstallDevice(DeviceInfoSet, + DeviceInfoData)) + { + return GetLastError(); + } + + if (SetupDiGetDeviceRegistryPropertyW(DeviceInfoSet, + DeviceInfoData, + SPDRP_DEVICEDESC, + NULL, + (LPBYTE)szDeviceDescription, + 256 * sizeof(WCHAR), + NULL)) + { + swprintf(szFriendlyName, + L"%s (%s)", + szDeviceDescription, + szPortName); + } + else + { + swprintf(szFriendlyName, + L"Serial Port (%s)", + szPortName); + } + + /* Set the friendly name for the device */ + SetupDiSetDeviceRegistryPropertyW(DeviceInfoSet, + DeviceInfoData, + SPDRP_FRIENDLYNAME, + (LPBYTE)szFriendlyName, + (wcslen(szFriendlyName) + 1) * sizeof(WCHAR)); + + return ERROR_SUCCESS; }
13 years, 7 months
1
0
0
0
[akhaldi] 51842: [CMAKE/IDL] * Make sure to declare all the output files, so that the cleanup step could take care of them.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat May 21 17:44:39 2011 New Revision: 51842 URL:
http://svn.reactos.org/svn/reactos?rev=51842&view=rev
Log: [CMAKE/IDL] * Make sure to declare all the output files, so that the cleanup step could take care of them. Modified: trunk/reactos/cmake/idl-support.cmake Modified: trunk/reactos/cmake/idl-support.cmake URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/idl-support.cmake?re…
============================================================================== --- trunk/reactos/cmake/idl-support.cmake [iso-8859-1] (original) +++ trunk/reactos/cmake/idl-support.cmake [iso-8859-1] Sat May 21 17:44:39 2011 @@ -93,7 +93,7 @@ list(APPEND IDLS ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}) endif() add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_p.c + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_p.c ${NAME}_p.h COMMAND ${IDL_COMPILER} ${INCLUDES} ${DEFINES} ${IDL_FLAGS} ${IDL_PROXY_ARG} ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_p.c ${IDL_HEADER_ARG2} ${NAME}_p.h ${CMAKE_CURRENT_SOURCE_DIR}/${FILE} ${DLLDATA_ARG} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}) endforeach() @@ -116,18 +116,18 @@ foreach(FILE ${ARGN}) get_filename_component(NAME ${FILE} NAME_WE) add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_s.c + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_s.c ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_s.h COMMAND ${IDL_COMPILER} ${INCLUDES} ${DEFINES} ${IDL_FLAGS} ${IDL_HEADER_ARG2} ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_s.h ${IDL_SERVER_ARG} ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_s.c ${CMAKE_CURRENT_SOURCE_DIR}/${FILE} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}) list(APPEND server_SOURCES ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_s.c) add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_c.c + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_c.c ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_c.h COMMAND ${IDL_COMPILER} ${INCLUDES} ${DEFINES} ${IDL_FLAGS} ${IDL_HEADER_ARG2} ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_c.h ${IDL_CLIENT_ARG} ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_c.c ${CMAKE_CURRENT_SOURCE_DIR}/${FILE} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}) list(APPEND client_SOURCES ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_c.c) endforeach() - add_library(${TARGET} ${server_SOURCES} ${client_SOURCES}) + add_library(${TARGET} ${client_SOURCES} ${server_SOURCES}) add_dependencies(${TARGET} psdk) endmacro()
13 years, 7 months
1
0
0
0
← Newer
1
...
16
17
18
19
20
21
22
...
52
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
Results per page:
10
25
50
100
200