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
December 2019
----- 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
18 participants
225 discussions
Start a n
N
ew thread
[reactos] 01/01: [SDK][INCLUDE] Improve gdipluscolor.h (#2195)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1674307fd1e94b526f6fe…
commit 1674307fd1e94b526f6fe5b208099a08c6faed95 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Mon Dec 30 18:07:13 2019 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Mon Dec 30 18:07:13 2019 +0900 [SDK][INCLUDE] Improve gdipluscolor.h (#2195) CORE-16585 --- sdk/include/psdk/gdipluscolor.h | 233 ++++++++++++++++++++++++++++++++++------ 1 file changed, 200 insertions(+), 33 deletions(-) diff --git a/sdk/include/psdk/gdipluscolor.h b/sdk/include/psdk/gdipluscolor.h index 8d493272a53..e78b07bb027 100644 --- a/sdk/include/psdk/gdipluscolor.h +++ b/sdk/include/psdk/gdipluscolor.h @@ -1,6 +1,7 @@ /* * Copyright (C) 2008 Google (Lei Zhang) * 2015 Benedikt Freisen + * 2019 Katayama Hirofumi MZ * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,81 +21,86 @@ #ifndef _GDIPLUSCOLOR_H #define _GDIPLUSCOLOR_H -enum ColorChannelFlags +typedef enum ColorChannelFlags { ColorChannelFlagsC, ColorChannelFlagsM, ColorChannelFlagsY, ColorChannelFlagsK, ColorChannelFlagsLast -}; +} ColorChannelFlags; #ifdef __cplusplus class Color { public: - Color(VOID) + Color() : Argb(0xff000000) { - Argb = 0xff000000; } - Color(ARGB argb) + Color(ARGB argb) : Argb(argb) { - Argb = argb; } - Color(BYTE r, BYTE g, BYTE b) + Color(BYTE r, BYTE g, BYTE b) : Argb(MakeARGB(0xFF, r, g, b)) { - Argb = 0xff << 24 | r << 16 | g << 8 | b; } - Color(BYTE a, BYTE r, BYTE g, BYTE b) + Color(BYTE a, BYTE r, BYTE g, BYTE b) : Argb(MakeARGB(a, r, g, b)) { - Argb = a << 24 | r << 16 | g << 8 | b; } - BYTE GetA(VOID) const + BYTE + GetA() const { - return (Argb >> 24) & 0xff; + return (BYTE)(Argb >> 24); } - BYTE GetAlpha(VOID) const + BYTE + GetAlpha() const { - return (Argb >> 24) & 0xff; + return (BYTE)(Argb >> 24); } - BYTE GetB(VOID) const + BYTE + GetB() const { - return Argb & 0xff; + return (BYTE)Argb; } - BYTE GetBlue(VOID) const + BYTE + GetBlue() const { - return Argb & 0xff; + return (BYTE)Argb; } - BYTE GetG(VOID) const + BYTE + GetG() const { - return (Argb >> 8) & 0xff; + return (BYTE)(Argb >> 8); } - BYTE GetGreen(VOID) const + BYTE + GetGreen() const { - return (Argb >> 8) & 0xff; + return (BYTE)(Argb >> 8); } - BYTE GetR(VOID) const + BYTE + GetR() const { - return (Argb >> 16) & 0xff; + return (BYTE)(Argb >> 16); } - BYTE GetRed(VOID) const + BYTE + GetRed() const { - return (Argb >> 16) & 0xff; + return (BYTE)(Argb >> 16); } - ARGB GetValue(VOID) const + ARGB + GetValue() const { return Argb; } @@ -102,13 +108,14 @@ class Color static ARGB MakeARGB(BYTE a, BYTE r, BYTE g, BYTE b) { - return a << 24 | r << 16 | g << 8 | b; + ARGB a0 = a, r0 = r, g0 = g, b0 = b; + return (a0 << AlphaShift) | (r0 << RedShift) | (g0 << GreenShift) | (b0 << BlueShift); } VOID SetFromCOLORREF(COLORREF rgb) { - Argb = 0xff000000 | (rgb & 0x000000ff) << 16 | (rgb & 0x0000ff00) | (rgb & 0x00ff0000) >> 16; + Argb = MakeARGB(0xFF, GetRValue(rgb), GetGValue(rgb), GetBValue(rgb)); } VOID @@ -117,11 +124,173 @@ class Color Argb = argb; } - COLORREF ToCOLORREF(VOID) const + COLORREF + ToCOLORREF() const { - return (Argb & 0x000000ff) << 16 | (Argb & 0x0000ff00) | (Argb & 0x00ff0000) >> 16; + return RGB(GetRed(), GetGreen(), GetBlue()); } + enum + { + AlphaShift = 24, + RedShift = 16, + GreenShift = 8, + BlueShift = 0 + }; + + enum + { + AlphaMask = 0xFF000000, + RedMask = 0x00FF0000, + GreenMask = 0x0000FF00, + BlueMask = 0x000000FF + }; + + enum + { + AliceBlue = 0xFFF0F8FF, + AntiqueWhite = 0xFFFAEBD7, + Aqua = 0xFF00FFFF, + Aquamarine = 0xFF7FFFD4, + Azure = 0xFFF0FFFF, + Beige = 0xFFF5F5DC, + Bisque = 0xFFFFE4C4, + Black = 0xFF000000, + BlanchedAlmond = 0xFFFFEBCD, + Blue = 0xFF0000FF, + BlueViolet = 0xFF8A2BE2, + Brown = 0xFFA52A2A, + BurlyWood = 0xFFDEB887, + CadetBlue = 0xFF5F9EA0, + Chartreuse = 0xFF7FFF00, + Chocolate = 0xFFD2691E, + Coral = 0xFFFF7F50, + CornflowerBlue = 0xFF6495ED, + Cornsilk = 0xFFFFF8DC, + Crimson = 0xFFDC143C, + Cyan = 0xFF00FFFF, + DarkBlue = 0xFF00008B, + DarkCyan = 0xFF008B8B, + DarkGoldenrod = 0xFFB8860B, + DarkGray = 0xFFA9A9A9, + DarkGreen = 0xFF006400, + DarkKhaki = 0xFFBDB76B, + DarkMagenta = 0xFF8B008B, + DarkOliveGreen = 0xFF556B2F, + DarkOrange = 0xFFFF8C00, + DarkOrchid = 0xFF9932CC, + DarkRed = 0xFF8B0000, + DarkSalmon = 0xFFE9967A, + DarkSeaGreen = 0xFF8FBC8F, + DarkSlateBlue = 0xFF483D8B, + DarkSlateGray = 0xFF2F4F4F, + DarkTurquoise = 0xFF00CED1, + DarkViolet = 0xFF9400D3, + DeepPink = 0xFFFF1493, + DeepSkyBlue = 0xFF00BFFF, + DimGray = 0xFF696969, + DodgerBlue = 0xFF1E90FF, + Firebrick = 0xFFB22222, + FloralWhite = 0xFFFFFAF0, + ForestGreen = 0xFF228B22, + Fuchsia = 0xFFFF00FF, + Gainsboro = 0xFFDCDCDC, + GhostWhite = 0xFFF8F8FF, + Gold = 0xFFFFD700, + Goldenrod = 0xFFDAA520, + Gray = 0xFF808080, + Green = 0xFF008000, + GreenYellow = 0xFFADFF2F, + Honeydew = 0xFFF0FFF0, + HotPink = 0xFFFF69B4, + IndianRed = 0xFFCD5C5C, + Indigo = 0xFF4B0082, + Ivory = 0xFFFFFFF0, + Khaki = 0xFFF0E68C, + Lavender = 0xFFE6E6FA, + LavenderBlush = 0xFFFFF0F5, + LawnGreen = 0xFF7CFC00, + LemonChiffon = 0xFFFFFACD, + LightBlue = 0xFFADD8E6, + LightCoral = 0xFFF08080, + LightCyan = 0xFFE0FFFF, + LightGoldenrodYellow = 0xFFFAFAD2, + LightGray = 0xFFD3D3D3, + LightGreen = 0xFF90EE90, + LightPink = 0xFFFFB6C1, + LightSalmon = 0xFFFFA07A, + LightSeaGreen = 0xFF20B2AA, + LightSkyBlue = 0xFF87CEFA, + LightSlateGray = 0xFF778899, + LightSteelBlue = 0xFFB0C4DE, + LightYellow = 0xFFFFFFE0, + Lime = 0xFF00FF00, + LimeGreen = 0xFF32CD32, + Linen = 0xFFFAF0E6, + Magenta = 0xFFFF00FF, + Maroon = 0xFF800000, + MediumAquamarine = 0xFF66CDAA, + MediumBlue = 0xFF0000CD, + MediumOrchid = 0xFFBA55D3, + MediumPurple = 0xFF9370DB, + MediumSeaGreen = 0xFF3CB371, + MediumSlateBlue = 0xFF7B68EE, + MediumSpringGreen = 0xFF00FA9A, + MediumTurquoise = 0xFF48D1CC, + MediumVioletRed = 0xFFC71585, + MidnightBlue = 0xFF191970, + MintCream = 0xFFF5FFFA, + MistyRose = 0xFFFFE4E1, + Moccasin = 0xFFFFE4B5, + NavajoWhite = 0xFFFFDEAD, + Navy = 0xFF000080, + OldLace = 0xFFFDF5E6, + Olive = 0xFF808000, + OliveDrab = 0xFF6B8E23, + Orange = 0xFFFFA500, + OrangeRed = 0xFFFF4500, + Orchid = 0xFFDA70D6, + PaleGoldenrod = 0xFFEEE8AA, + PaleGreen = 0xFF98FB98, + PaleTurquoise = 0xFFAFEEEE, + PaleVioletRed = 0xFFDB7093, + PapayaWhip = 0xFFFFEFD5, + PeachPuff = 0xFFFFDAB9, + Peru = 0xFFCD853F, + Pink = 0xFFFFC0CB, + Plum = 0xFFDDA0DD, + PowderBlue = 0xFFB0E0E6, + Purple = 0xFF800080, + Red = 0xFFFF0000, + RosyBrown = 0xFFBC8F8F, + RoyalBlue = 0xFF4169E1, + SaddleBrown = 0xFF8B4513, + Salmon = 0xFFFA8072, + SandyBrown = 0xFFF4A460, + SeaGreen = 0xFF2E8B57, + SeaShell = 0xFFFFF5EE, + Sienna = 0xFFA0522D, + Silver = 0xFFC0C0C0, + SkyBlue = 0xFF87CEEB, + SlateBlue = 0xFF6A5ACD, + SlateGray = 0xFF708090, + Snow = 0xFFFFFAFA, + SpringGreen = 0xFF00FF7F, + SteelBlue = 0xFF4682B4, + Tan = 0xFFD2B48C, + Teal = 0xFF008080, + Thistle = 0xFFD8BFD8, + Tomato = 0xFFFF6347, + Transparent = 0x00FFFFFF, + Turquoise = 0xFF40E0D0, + Violet = 0xFFEE82EE, + Wheat = 0xFFF5DEB3, + White = 0xFFFFFFFF, + WhiteSmoke = 0xFFF5F5F5, + Yellow = 0xFFFFFF00, + YellowGreen = 0xFF9ACD32 + }; + protected: ARGB Argb; }; @@ -133,8 +302,6 @@ typedef struct Color ARGB Argb; } Color; -typedef enum ColorChannelFlags ColorChannelFlags; - #endif /* end of c typedefs */ #endif /* _GDIPLUSCOLOR_H */
4 years, 11 months
1
0
0
0
[reactos] 01/01: [SDK][INCLUDE] Rename Gdiplus::Image::image as nativeImage (Retry) (#2189)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d24acc97790467f9de5e4…
commit d24acc97790467f9de5e4139b055ff1ddefb8136 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Mon Dec 30 14:45:26 2019 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Mon Dec 30 14:45:26 2019 +0900 [SDK][INCLUDE] Rename Gdiplus::Image::image as nativeImage (Retry) (#2189) CORE-16585 --- sdk/include/psdk/gdiplusheaders.h | 95 ++++++++++++++++++++++----------------- 1 file changed, 53 insertions(+), 42 deletions(-) diff --git a/sdk/include/psdk/gdiplusheaders.h b/sdk/include/psdk/gdiplusheaders.h index b030b5c1d23..1497c55e6c6 100644 --- a/sdk/include/psdk/gdiplusheaders.h +++ b/sdk/include/psdk/gdiplusheaders.h @@ -27,29 +27,29 @@ class Image : public GdiplusBase Image(IStream *stream, BOOL useEmbeddedColorManagement = FALSE) { if (useEmbeddedColorManagement) - status = DllExports::GdipLoadImageFromStreamICM(stream, &image); + status = DllExports::GdipLoadImageFromStreamICM(stream, &nativeImage); else - status = DllExports::GdipLoadImageFromStream(stream, &image); + status = DllExports::GdipLoadImageFromStream(stream, &nativeImage); } Image(const WCHAR *filename, BOOL useEmbeddedColorManagement = FALSE) { if (useEmbeddedColorManagement) - status = DllExports::GdipLoadImageFromFileICM(filename, &image); + status = DllExports::GdipLoadImageFromFileICM(filename, &nativeImage); else - status = DllExports::GdipLoadImageFromFile(filename, &image); + status = DllExports::GdipLoadImageFromFile(filename, &nativeImage); } Image *Clone(VOID) { Image *newImage = new Image(); - SetStatus(DllExports::GdipCloneImage(image, newImage ? &newImage->image : NULL)); + SetStatus(DllExports::GdipCloneImage(nativeImage, newImage ? &newImage->nativeImage : NULL)); return newImage; } virtual ~Image() { - DllExports::GdipDisposeImage(image); + DllExports::GdipDisposeImage(nativeImage); } static Image * @@ -67,19 +67,19 @@ class Image : public GdiplusBase Status GetAllPropertyItems(UINT totalBufferSize, UINT numProperties, PropertyItem *allItems) { - return SetStatus(DllExports::GdipGetAllPropertyItems(image, totalBufferSize, numProperties, allItems)); + return SetStatus(DllExports::GdipGetAllPropertyItems(nativeImage, totalBufferSize, numProperties, allItems)); } Status GetBounds(RectF *srcRect, Unit *srcUnit) { - return SetStatus(DllExports::GdipGetImageBounds(image, srcRect, srcUnit)); + return SetStatus(DllExports::GdipGetImageBounds(nativeImage, srcRect, srcUnit)); } Status GetEncoderParameterList(const CLSID *clsidEncoder, UINT size, EncoderParameters *buffer) { - return NotImplemented; // FIXME: not available: SetStatus(DllExports::GdipGetEncoderParameterList(image, + return NotImplemented; // FIXME: not available: SetStatus(DllExports::GdipGetEncoderParameterList(nativeImage, // clsidEncoder, size, buffer)); } @@ -88,14 +88,14 @@ class Image : public GdiplusBase { return 0; // FIXME: not available: // UINT size; - // SetStatus(DllExports::GdipGetEncoderParameterListSize(image, clsidEncoder, &size)); + // SetStatus(DllExports::GdipGetEncoderParameterListSize(nativeImage, clsidEncoder, &size)); // return size; } UINT GetFlags(VOID) { UINT flags; - SetStatus(DllExports::GdipGetImageFlags(image, &flags)); + SetStatus(DllExports::GdipGetImageFlags(nativeImage, &flags)); return flags; } @@ -103,34 +103,34 @@ class Image : public GdiplusBase GetFrameCount(const GUID *dimensionID) { UINT count; - SetStatus(DllExports::GdipImageGetFrameCount(image, dimensionID, &count)); + SetStatus(DllExports::GdipImageGetFrameCount(nativeImage, dimensionID, &count)); return count; } UINT GetFrameDimensionsCount(VOID) { UINT count; - SetStatus(DllExports::GdipImageGetFrameDimensionsCount(image, &count)); + SetStatus(DllExports::GdipImageGetFrameDimensionsCount(nativeImage, &count)); return count; } Status GetFrameDimensionsList(GUID *dimensionIDs, UINT count) { - return SetStatus(DllExports::GdipImageGetFrameDimensionsList(image, dimensionIDs, count)); + return SetStatus(DllExports::GdipImageGetFrameDimensionsList(nativeImage, dimensionIDs, count)); } UINT GetHeight(VOID) { UINT height; - SetStatus(DllExports::GdipGetImageHeight(image, &height)); + SetStatus(DllExports::GdipGetImageHeight(nativeImage, &height)); return height; } REAL GetHorizontalResolution(VOID) { REAL resolution; - SetStatus(DllExports::GdipGetImageHorizontalResolution(image, &resolution)); + SetStatus(DllExports::GdipGetImageHorizontalResolution(nativeImage, &resolution)); return resolution; } @@ -142,67 +142,69 @@ class Image : public GdiplusBase Status GetPalette(ColorPalette *palette, INT size) { - return SetStatus(DllExports::GdipGetImagePalette(image, palette, size)); + return SetStatus(DllExports::GdipGetImagePalette(nativeImage, palette, size)); } INT GetPaletteSize(VOID) { INT size; - SetStatus(DllExports::GdipGetImagePaletteSize(image, &size)); + SetStatus(DllExports::GdipGetImagePaletteSize(nativeImage, &size)); return size; } Status GetPhysicalDimension(SizeF *size) { - return SetStatus( - DllExports::GdipGetImageDimension(image, size ? &size->Width : NULL, size ? &size->Height : NULL)); + if (size) + return SetStatus(DllExports::GdipGetImageDimension(nativeImage, &size->Width, &size->Height)); + else + return SetStatus(DllExports::GdipGetImageDimension(nativeImage, NULL, NULL)); } PixelFormat GetPixelFormat(VOID) { PixelFormat format; - SetStatus(DllExports::GdipGetImagePixelFormat(image, &format)); + SetStatus(DllExports::GdipGetImagePixelFormat(nativeImage, &format)); return format; } UINT GetPropertyCount(VOID) { UINT numOfProperty; - SetStatus(DllExports::GdipGetPropertyCount(image, &numOfProperty)); + SetStatus(DllExports::GdipGetPropertyCount(nativeImage, &numOfProperty)); return numOfProperty; } Status GetPropertyIdList(UINT numOfProperty, PROPID *list) { - return SetStatus(DllExports::GdipGetPropertyIdList(image, numOfProperty, list)); + return SetStatus(DllExports::GdipGetPropertyIdList(nativeImage, numOfProperty, list)); } Status GetPropertyItem(PROPID propId, UINT propSize, PropertyItem *buffer) { - return SetStatus(DllExports::GdipGetPropertyItem(image, propId, propSize, buffer)); + return SetStatus(DllExports::GdipGetPropertyItem(nativeImage, propId, propSize, buffer)); } UINT GetPropertyItemSize(PROPID propId) { UINT size; - SetStatus(DllExports::GdipGetPropertyItemSize(image, propId, &size)); + SetStatus(DllExports::GdipGetPropertyItemSize(nativeImage, propId, &size)); return size; } Status GetPropertySize(UINT *totalBufferSize, UINT *numProperties) { - return SetStatus(DllExports::GdipGetPropertySize(image, totalBufferSize, numProperties)); + return SetStatus(DllExports::GdipGetPropertySize(nativeImage, totalBufferSize, numProperties)); } Status GetRawFormat(GUID *format) { - return SetStatus(DllExports::GdipGetImageRawFormat(image, format)); + return SetStatus(DllExports::GdipGetImageRawFormat(nativeImage, format)); } Image * @@ -210,84 +212,85 @@ class Image : public GdiplusBase { Image *thumbImage = new Image(); SetStatus(DllExports::GdipGetImageThumbnail( - image, thumbWidth, thumbHeight, thumbImage ? &thumbImage->image : NULL, callback, callbackData)); + nativeImage, thumbWidth, thumbHeight, thumbImage ? &thumbImage->nativeImage : NULL, callback, + callbackData)); return thumbImage; } ImageType GetType(VOID) { ImageType type; - SetStatus(DllExports::GdipGetImageType(image, &type)); + SetStatus(DllExports::GdipGetImageType(nativeImage, &type)); return type; } REAL GetVerticalResolution(VOID) { REAL resolution; - SetStatus(DllExports::GdipGetImageVerticalResolution(image, &resolution)); + SetStatus(DllExports::GdipGetImageVerticalResolution(nativeImage, &resolution)); return resolution; } UINT GetWidth(VOID) { UINT width; - SetStatus(DllExports::GdipGetImageWidth(image, &width)); + SetStatus(DllExports::GdipGetImageWidth(nativeImage, &width)); return width; } Status RemovePropertyItem(PROPID propId) { - return SetStatus(DllExports::GdipRemovePropertyItem(image, propId)); + return SetStatus(DllExports::GdipRemovePropertyItem(nativeImage, propId)); } Status RotateFlip(RotateFlipType rotateFlipType) { - return SetStatus(DllExports::GdipImageRotateFlip(image, rotateFlipType)); + return SetStatus(DllExports::GdipImageRotateFlip(nativeImage, rotateFlipType)); } Status Save(IStream *stream, const CLSID *clsidEncoder, const EncoderParameters *encoderParams) { - return SetStatus(DllExports::GdipSaveImageToStream(image, stream, clsidEncoder, encoderParams)); + return SetStatus(DllExports::GdipSaveImageToStream(nativeImage, stream, clsidEncoder, encoderParams)); } Status Save(const WCHAR *filename, const CLSID *clsidEncoder, const EncoderParameters *encoderParams) { - return SetStatus(DllExports::GdipSaveImageToFile(image, filename, clsidEncoder, encoderParams)); + return SetStatus(DllExports::GdipSaveImageToFile(nativeImage, filename, clsidEncoder, encoderParams)); } Status SaveAdd(const EncoderParameters *encoderParams) { - return NotImplemented; // FIXME: not available: SetStatus(DllExports::GdipSaveAdd(image, encoderParams)); + return NotImplemented; // FIXME: not available: SetStatus(DllExports::GdipSaveAdd(nativeImage, encoderParams)); } Status SaveAdd(Image *newImage, const EncoderParameters *encoderParams) { - return NotImplemented; // FIXME: not available: SetStatus(DllExports::GdipSaveAddImage(image, newImage ? - // newImage->image : NULL, encoderParams)); + return NotImplemented; // FIXME: not available: SetStatus(DllExports::GdipSaveAddImage(nativeImage, newImage ? + // newImage->nativeImage : NULL, encoderParams)); } Status SelectActiveFrame(const GUID *dimensionID, UINT frameIndex) { - return SetStatus(DllExports::GdipImageSelectActiveFrame(image, dimensionID, frameIndex)); + return SetStatus(DllExports::GdipImageSelectActiveFrame(nativeImage, dimensionID, frameIndex)); } Status SetPalette(const ColorPalette *palette) { - return SetStatus(DllExports::GdipSetImagePalette(image, palette)); + return SetStatus(DllExports::GdipSetImagePalette(nativeImage, palette)); } Status SetPropertyItem(const PropertyItem *item) { - return SetStatus(DllExports::GdipSetPropertyItem(image, item)); + return SetStatus(DllExports::GdipSetPropertyItem(nativeImage, item)); } protected: @@ -297,7 +300,7 @@ class Image : public GdiplusBase private: mutable Status status; - GpImage *image; + GpImage *nativeImage; Status SetStatus(Status status) const @@ -1201,20 +1204,28 @@ class CustomLineCap : public GdiplusBase LineCap GetBaseCap(VOID); REAL GetBaseInset(VOID); Status GetLastStatus(VOID); + Status GetStrokeCaps(LineCap *startCap, LineCap *endCap); + LineJoin GetStrokeJoin(VOID); REAL GetWidthScale(VOID); + Status SetBaseCap(LineCap baseCap); + Status SetBaseInset(REAL inset); + Status SetStrokeCap(LineCap strokeCap); + Status SetStrokeCaps(LineCap startCap, LineCap endCap); + Status SetStrokeJoin(LineJoin lineJoin); + Status SetWidthScale(IN REAL widthScale);
4 years, 11 months
1
0
0
0
[reactos] 01/01: [NTOS:KD] Fix wrong debug level checking logic in KdpPrint. Use NtQueryDebugFilterState in that function for consistency. Thanks Hermès Bélusca-Maïto for help
by Victor Perevertkin
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b6e33426bf9e1a997f3b7…
commit b6e33426bf9e1a997f3b708d81d86efe96f507ea Author: Victor Perevertkin <victor.perevertkin(a)reactos.org> AuthorDate: Thu Dec 19 21:01:30 2019 +0300 Commit: Victor Perevertkin <victor(a)perevertkin.ru> CommitDate: Mon Dec 30 05:57:49 2019 +0200 [NTOS:KD] Fix wrong debug level checking logic in KdpPrint. Use NtQueryDebugFilterState in that function for consistency. Thanks Hermès Bélusca-Maïto for help --- ntoskrnl/kd64/kdprint.c | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/ntoskrnl/kd64/kdprint.c b/ntoskrnl/kd64/kdprint.c index 4d35bf6df76..81da68b7ec1 100644 --- a/ntoskrnl/kd64/kdprint.c +++ b/ntoskrnl/kd64/kdprint.c @@ -343,31 +343,16 @@ KdpPrint( STRING OutputString; CHAR CapturedString[512]; - /* Assume failure */ - *Handled = FALSE; - -#if (NTDDI_VERSION >= NTDDI_VISTA) - if ((ComponentId >= KdComponentTableSize) && (ComponentId < MAXULONG)) - { - /* Use the default component ID */ - Mask = &Kd_DEFAULT_Mask; - // Level = DPFLTR_INFO_LEVEL; // Override the Level. - } -#endif - /* Convert Level to bit field if required */ - if (Level < 32) Level = 1 << Level; - Level &= ~DPFLTR_MASK; - - /* Validate the mask */ - if (!(Kd_WIN2000_Mask & Level) || - ((ComponentId < KdComponentTableSize) && - !(*KdComponentTable[ComponentId] & Level))) + if (NtQueryDebugFilterState(ComponentId, Level) == (NTSTATUS)FALSE) { /* Mask validation failed */ *Handled = TRUE; return STATUS_SUCCESS; } + /* Assume failure */ + *Handled = FALSE; + /* Normalize the length */ Length = min(Length, sizeof(CapturedString));
4 years, 11 months
1
0
0
0
[reactos] 03/03: [WIN32K:NTUSER] Avoid user memory access outside of SEH in NtUserEnumDisplaySettings.
by Thomas Faber
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ef103d7d69f918f699a81…
commit ef103d7d69f918f699a81756bcae7d8f40ed93e9 Author: Thomas Faber <thomas.faber(a)reactos.org> AuthorDate: Sun Dec 29 18:51:05 2019 +0100 Commit: Thomas Faber <thomas.faber(a)reactos.org> CommitDate: Sun Dec 29 20:08:51 2019 +0100 [WIN32K:NTUSER] Avoid user memory access outside of SEH in NtUserEnumDisplaySettings. --- win32ss/user/ntuser/display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/win32ss/user/ntuser/display.c b/win32ss/user/ntuser/display.c index 5295573437e..3c39c05ec35 100644 --- a/win32ss/user/ntuser/display.c +++ b/win32ss/user/ntuser/display.c @@ -621,7 +621,7 @@ NtUserEnumDisplaySettings( } _SEH2_END; - if (lpDevMode->dmSize != sizeof(DEVMODEW)) + if (cbSize != sizeof(DEVMODEW)) { return STATUS_BUFFER_TOO_SMALL; }
4 years, 11 months
1
0
0
0
[reactos] 02/03: [WIN32K:NTUSER] Correctly capture UNICODE_STRING in NtUserEnumDisplaySettings.
by Thomas Faber
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=3d81dc48a7dbe99078d0c…
commit 3d81dc48a7dbe99078d0cbd0a0ca48dcb452fe7e Author: Thomas Faber <thomas.faber(a)reactos.org> AuthorDate: Sun Dec 29 16:14:58 2019 +0100 Commit: Thomas Faber <thomas.faber(a)reactos.org> CommitDate: Sun Dec 29 20:08:44 2019 +0100 [WIN32K:NTUSER] Correctly capture UNICODE_STRING in NtUserEnumDisplaySettings. --- win32ss/user/ntuser/display.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/win32ss/user/ntuser/display.c b/win32ss/user/ntuser/display.c index a23d19590d3..5295573437e 100644 --- a/win32ss/user/ntuser/display.c +++ b/win32ss/user/ntuser/display.c @@ -596,6 +596,7 @@ NtUserEnumDisplaySettings( OUT LPDEVMODEW lpDevMode, IN DWORD dwFlags) { + UNICODE_STRING ustrDeviceUser; UNICODE_STRING ustrDevice; WCHAR awcDevice[CCHDEVICENAME]; NTSTATUS Status; @@ -633,15 +634,17 @@ NtUserEnumDisplaySettings( _SEH2_TRY { /* Probe the UNICODE_STRING and the buffer */ - ProbeForReadUnicodeString(pustrDevice); + ustrDeviceUser = ProbeForReadUnicodeString(pustrDevice); - if (!pustrDevice->Length || !pustrDevice->Buffer) + if (!ustrDeviceUser.Length || !ustrDeviceUser.Buffer) ExRaiseStatus(STATUS_NO_MEMORY); - ProbeForRead(pustrDevice->Buffer, pustrDevice->Length, sizeof(UCHAR)); + ProbeForRead(ustrDeviceUser.Buffer, + ustrDeviceUser.Length, + sizeof(UCHAR)); /* Copy the string */ - RtlCopyUnicodeString(&ustrDevice, pustrDevice); + RtlCopyUnicodeString(&ustrDevice, &ustrDeviceUser); } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) {
4 years, 11 months
1
0
0
0
[reactos] 01/03: [WIN32K:NTUSER] Add missing probe in NtUserGetClassName.
by Thomas Faber
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=be92be2e37dba65306077…
commit be92be2e37dba65306077bee26fa7ef92edaa6b6 Author: Thomas Faber <thomas.faber(a)reactos.org> AuthorDate: Sun Dec 29 16:14:17 2019 +0100 Commit: Thomas Faber <thomas.faber(a)reactos.org> CommitDate: Sun Dec 29 20:08:30 2019 +0100 [WIN32K:NTUSER] Add missing probe in NtUserGetClassName. --- win32ss/user/ntuser/class.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/win32ss/user/ntuser/class.c b/win32ss/user/ntuser/class.c index 83fe9009b34..d669340baf7 100644 --- a/win32ss/user/ntuser/class.c +++ b/win32ss/user/ntuser/class.c @@ -2815,6 +2815,12 @@ NtUserGetClassName (IN HWND hWnd, { ProbeForWriteUnicodeString(ClassName); CapturedClassName = *ClassName; + if (CapturedClassName.Length != 0) + { + ProbeForRead(CapturedClassName.Buffer, + CapturedClassName.Length, + sizeof(WCHAR)); + } /* Get the class name */ Ret = UserGetClassName(Window->pcls,
4 years, 11 months
1
0
0
0
[reactos] 02/02: [CMD] If the prompt displays the information line on top of the screen, ensure that the prompt won't be hidden below it. CORE-16193
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=771b87dc8f4107de48715…
commit 771b87dc8f4107de48715c333e4da5113c4aef77 Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Sun Dec 29 19:08:47 2019 +0100 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Sun Dec 29 19:14:03 2019 +0100 [CMD] If the prompt displays the information line on top of the screen, ensure that the prompt won't be hidden below it. CORE-16193 --- base/shell/cmd/prompt.c | 38 ++++++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/base/shell/cmd/prompt.c b/base/shell/cmd/prompt.c index 9bf01e07e76..ce47cd70499 100644 --- a/base/shell/cmd/prompt.c +++ b/base/shell/cmd/prompt.c @@ -108,16 +108,33 @@ VOID PrintInfoLine(VOID) */ VOID PrintPrompt(VOID) { - LPTSTR pr; + LPTSTR pr, Prompt; TCHAR szPrompt[256]; TCHAR szPath[MAX_PATH]; if (GetEnvironmentVariable(_T("PROMPT"), szPrompt, _countof(szPrompt))) - pr = szPrompt; + Prompt = szPrompt; else - pr = DefaultPrompt; + Prompt = DefaultPrompt; - while (*pr) + /* + * Special pre-handling for $I: If the information line is displayed + * on top of the screen, ensure that the prompt won't be hidden below it. + */ + for (pr = Prompt; *pr;) + { + if (*pr++ != _T('$')) + continue; + if (!*pr || _totupper(*pr++) != _T('I')) + continue; + + if (GetCursorY() == 0) + ConOutChar(_T('\n')); + break; + } + + /* Parse the prompt string */ + for (pr = Prompt; *pr; ++pr) { if (*pr != _T('$')) { @@ -125,8 +142,8 @@ VOID PrintPrompt(VOID) } else { - pr++; - + ++pr; + if (!*pr) break; switch (_totupper(*pr)) { case _T('A'): @@ -158,9 +175,7 @@ VOID PrintPrompt(VOID) break; case _T('H'): - ConOutChar(_T('\x08')); - ConOutChar(_T(' ')); - ConOutChar(_T('\x08')); + ConOutPuts(_T("\x08 \x08")); break; case _T('I'): @@ -205,12 +220,12 @@ VOID PrintPrompt(VOID) ConOutChar(_T('\n')); break; - case '$': + case _T('$'): ConOutChar(_T('$')); break; #ifdef FEATURE_DIRECTORY_STACK - case '+': + case _T('+'): { INT i; for (i = 0; i < GetDirectoryStackDepth(); i++) @@ -220,7 +235,6 @@ VOID PrintPrompt(VOID) #endif } } - pr++; } }
4 years, 12 months
1
0
0
0
[reactos] 01/02: [CMD] Code formatting; don't hardcode the string buffer sizes in function calls.
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0bede0062aaeb495a30e1…
commit 0bede0062aaeb495a30e151677ae84b33a459d78 Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Sun Dec 29 16:53:36 2019 +0100 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Sun Dec 29 19:13:59 2019 +0100 [CMD] Code formatting; don't hardcode the string buffer sizes in function calls. --- base/shell/cmd/prompt.c | 41 ++++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/base/shell/cmd/prompt.c b/base/shell/cmd/prompt.c index f89817a2b2e..9bf01e07e76 100644 --- a/base/shell/cmd/prompt.c +++ b/base/shell/cmd/prompt.c @@ -52,7 +52,7 @@ static TCHAR DefaultPrompt[] = _T("$P$G"); /* - * Initialize prompt support + * Initialize prompt support. */ VOID InitPrompt(VOID) { @@ -62,12 +62,12 @@ VOID InitPrompt(VOID) * Set the PROMPT environment variable if it doesn't exist already. * You can change the PROMPT environment variable before cmd starts. */ - if (GetEnvironmentVariable(_T("PROMPT"), Buffer, ARRAYSIZE(Buffer)) == 0) + if (GetEnvironmentVariable(_T("PROMPT"), Buffer, _countof(Buffer)) == 0) SetEnvironmentVariable(_T("PROMPT"), DefaultPrompt); } /* - * Print an information line on top of the screen + * Print an information line on top of the screen. */ VOID PrintInfoLine(VOID) { @@ -104,14 +104,15 @@ VOID PrintInfoLine(VOID) } /* - * Print the command-line prompt + * Print the command-line prompt. */ VOID PrintPrompt(VOID) { - TCHAR szPrompt[256]; LPTSTR pr; + TCHAR szPrompt[256]; + TCHAR szPath[MAX_PATH]; - if (GetEnvironmentVariable(_T("PROMPT"), szPrompt, 256)) + if (GetEnvironmentVariable(_T("PROMPT"), szPrompt, _countof(szPrompt))) pr = szPrompt; else pr = DefaultPrompt; @@ -171,20 +172,18 @@ VOID PrintPrompt(VOID) break; case _T('N'): - { - TCHAR szPath[MAX_PATH]; - GetCurrentDirectory(MAX_PATH, szPath); - ConOutChar(szPath[0]); - } + { + GetCurrentDirectory(_countof(szPath), szPath); + ConOutChar(szPath[0]); break; + } case _T('P'): - { - TCHAR szPath[MAX_PATH]; - GetCurrentDirectory(MAX_PATH, szPath); - ConOutPrintf(_T("%s"), szPath); - } + { + GetCurrentDirectory(_countof(szPath), szPath); + ConOutPrintf(_T("%s"), szPath); break; + } case _T('Q'): ConOutChar(_T('=')); @@ -212,12 +211,12 @@ VOID PrintPrompt(VOID) #ifdef FEATURE_DIRECTORY_STACK case '+': - { - INT i; - for (i = 0; i < GetDirectoryStackDepth (); i++) - ConOutChar(_T('+')); - } + { + INT i; + for (i = 0; i < GetDirectoryStackDepth(); i++) + ConOutChar(_T('+')); break; + } #endif } }
4 years, 12 months
1
0
0
0
[reactos] 01/01: [SAMSRV] SamrEnumerate...: Return STATUS_NO_MORE_ENTRIES if there is nothing to enumerate.
by Eric Kohl
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4bc5d44f0602b2fa0b7c2…
commit 4bc5d44f0602b2fa0b7c2bc1dde198a50426cea3 Author: Eric Kohl <eric.kohl(a)reactos.org> AuthorDate: Sun Dec 29 17:28:55 2019 +0100 Commit: Eric Kohl <eric.kohl(a)reactos.org> CommitDate: Sun Dec 29 17:29:43 2019 +0100 [SAMSRV] SamrEnumerate...: Return STATUS_NO_MORE_ENTRIES if there is nothing to enumerate. --- dll/win32/samsrv/samrpc.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/dll/win32/samsrv/samrpc.c b/dll/win32/samsrv/samrpc.c index 0bea2e0d5f9..6b4aa622950 100644 --- a/dll/win32/samsrv/samrpc.c +++ b/dll/win32/samsrv/samrpc.c @@ -2290,7 +2290,10 @@ SamrEnumerateGroupsInDomain(IN SAMPR_HANDLE DomainHandle, EnumBuffer->EntriesRead = EnumCount; if (EnumCount == 0) + { + Status = STATUS_NO_MORE_ENTRIES; goto done; + } EnumBuffer->Buffer = midl_user_allocate(EnumCount * sizeof(SAMPR_RID_ENUMERATION)); if (EnumBuffer->Buffer == NULL) @@ -2900,7 +2903,10 @@ SamrEnumerateUsersInDomain(IN SAMPR_HANDLE DomainHandle, EnumBuffer->EntriesRead = EnumCount; if (EnumCount == 0) + { + Status = STATUS_NO_MORE_ENTRIES; goto done; + } EnumBuffer->Buffer = midl_user_allocate(EnumCount * sizeof(SAMPR_RID_ENUMERATION)); if (EnumBuffer->Buffer == NULL) @@ -3281,7 +3287,10 @@ SamrEnumerateAliasesInDomain(IN SAMPR_HANDLE DomainHandle, EnumBuffer->EntriesRead = EnumCount; if (EnumCount == 0) + { + Status = STATUS_NO_MORE_ENTRIES; goto done; + } EnumBuffer->Buffer = midl_user_allocate(EnumCount * sizeof(SAMPR_RID_ENUMERATION)); if (EnumBuffer->Buffer == NULL) @@ -6155,7 +6164,7 @@ SampQueryUserLogonHours(PSAM_DB_OBJECT UserObject, } Status = SampGetLogonHoursAttribute(UserObject, - &InfoBuffer->LogonHours.LogonHours); + &InfoBuffer->LogonHours.LogonHours); if (!NT_SUCCESS(Status)) { TRACE("SampGetLogonHoursAttribute failed (Status 0x%08lx)\n", Status); @@ -7057,7 +7066,7 @@ SampQueryUserAll(PSAM_DB_OBJECT UserObject, if (InfoBuffer->All.WhichFields & USER_ALL_LOGONHOURS) { Status = SampGetLogonHoursAttribute(UserObject, - &InfoBuffer->All.LogonHours); + &InfoBuffer->All.LogonHours); if (!NT_SUCCESS(Status)) { TRACE("Status 0x%08lx\n", Status);
4 years, 12 months
1
0
0
0
[reactos] 01/01: [BROWSEUI] Remove unneeded header, addendum to d967b5aa.
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a946146efc73f45b08958…
commit a946146efc73f45b08958b1904ac287e220798d0 Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Sun Dec 29 16:23:37 2019 +0100 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Sun Dec 29 16:23:37 2019 +0100 [BROWSEUI] Remove unneeded header, addendum to d967b5aa. --- dll/win32/browseui/shellbrowser.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/dll/win32/browseui/shellbrowser.cpp b/dll/win32/browseui/shellbrowser.cpp index f1e93e0f2ff..590aa1ad750 100644 --- a/dll/win32/browseui/shellbrowser.cpp +++ b/dll/win32/browseui/shellbrowser.cpp @@ -23,7 +23,6 @@ #include <shellapi.h> #include <htiframe.h> #include <strsafe.h> -#include <undocshell.h> extern HRESULT IUnknown_ShowDW(IUnknown * punk, BOOL fShow);
4 years, 12 months
1
0
0
0
← Newer
1
2
3
4
5
6
7
...
23
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
Results per page:
10
25
50
100
200