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
2025
April
March
February
January
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
----- 2025 -----
April 2025
March 2025
February 2025
January 2025
----- 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] Implement Gdiplus::ImageAttributes (#2202)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=094960e38676ef82c8e7e…
commit 094960e38676ef82c8e7e69e2b4be16dac2d5aa3 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Tue Dec 31 11:34:28 2019 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Tue Dec 31 11:34:28 2019 +0900 [SDK][INCLUDE] Implement Gdiplus::ImageAttributes (#2202) CORE-16585 --- sdk/include/psdk/gdiplusimageattributes.h | 165 ++++++++++++++++++++---------- 1 file changed, 112 insertions(+), 53 deletions(-) diff --git a/sdk/include/psdk/gdiplusimageattributes.h b/sdk/include/psdk/gdiplusimageattributes.h index 61e07d4b3d1..e68e1908558 100644 --- a/sdk/include/psdk/gdiplusimageattributes.h +++ b/sdk/include/psdk/gdiplusimageattributes.h @@ -22,166 +22,225 @@ class ImageAttributes : public GdiplusBase { public: - ImageAttributes(VOID) + ImageAttributes() : nativeImageAttr(NULL) { + lastStatus = DllExports::GdipCreateImageAttributes(&nativeImageAttr); } - Status ClearBrushRemapTable(VOID) + ~ImageAttributes() { - return NotImplemented; + DllExports::GdipDisposeImageAttributes(nativeImageAttr); } Status - ClearColorKey(ColorAdjustType type) + ClearBrushRemapTable() { - return NotImplemented; + return ClearRemapTable(ColorAdjustTypeBrush); } Status - ClearColorMatrices(ColorAdjustType type) + ClearColorKey(ColorAdjustType type = ColorAdjustTypeDefault) { - return NotImplemented; + return SetStatus(DllExports::GdipSetImageAttributesColorKeys(nativeImageAttr, type, FALSE, NULL, NULL)); } Status - ClearColorMatrix(ColorAdjustType type) + ClearColorMatrices(ColorAdjustType type = ColorAdjustTypeDefault) { - return NotImplemented; + return SetStatus(DllExports::GdipSetImageAttributesColorMatrix( + nativeImageAttr, type, FALSE, NULL, NULL, ColorMatrixFlagsDefault)); } Status - ClearGamma(ColorAdjustType type) + ClearColorMatrix(ColorAdjustType type = ColorAdjustTypeDefault) { - return NotImplemented; + return SetStatus(DllExports::GdipSetImageAttributesColorMatrix( + nativeImageAttr, type, FALSE, NULL, NULL, ColorMatrixFlagsDefault)); } Status - ClearNoOp(ColorAdjustType type) + ClearGamma(ColorAdjustType type = ColorAdjustTypeDefault) { - return NotImplemented; + return SetStatus(DllExports::GdipSetImageAttributesGamma(nativeImageAttr, type, FALSE, 0.0)); } Status - ClearOutputChannel(ColorAdjustType type) + ClearNoOp(ColorAdjustType type = ColorAdjustTypeDefault) { - return NotImplemented; + return SetStatus(DllExports::GdipSetImageAttributesNoOp(nativeImageAttr, type, FALSE)); } Status - ClearOutputChannelColorProfile(ColorAdjustType type) + ClearOutputChannel(ColorAdjustType type = ColorAdjustTypeDefault) { - return NotImplemented; + return SetStatus( + DllExports::GdipSetImageAttributesOutputChannel(nativeImageAttr, type, FALSE, ColorChannelFlagsLast)); } Status - ClearRemapTable(ColorAdjustType type) + ClearOutputChannelColorProfile(ColorAdjustType type = ColorAdjustTypeDefault) { - return NotImplemented; + return SetStatus( + DllExports::GdipSetImageAttributesOutputChannelColorProfile(nativeImageAttr, type, FALSE, NULL)); } Status - ClearThreshold(ColorAdjustType type) + ClearRemapTable(ColorAdjustType type = ColorAdjustTypeDefault) { - return NotImplemented; + return SetStatus(DllExports::GdipSetImageAttributesRemapTable(nativeImageAttr, type, FALSE, 0, NULL)); } - ImageAttributes *Clone(VOID) + Status + ClearThreshold(ColorAdjustType type = ColorAdjustTypeDefault) { - return NULL; + return SetStatus(DllExports::GdipSetImageAttributesThreshold(nativeImageAttr, type, FALSE, 0.0)); + } + + ImageAttributes * + Clone() + { + GpImageAttributes *clone = NULL; + SetStatus(DllExports::GdipCloneImageAttributes(nativeImageAttr, &clone)); + if (lastStatus != Ok) + return NULL; + + ImageAttributes *newImageAttr = new ImageAttributes(clone, lastStatus); + if (newImageAttr == NULL) + SetStatus(DllExports::GdipDisposeImageAttributes(clone)); + + return newImageAttr; } Status - GetAdjustedPalette(ColorPalette *colorPalette, ColorPalette colorAdjustType) + GetAdjustedPalette(ColorPalette *colorPalette, ColorAdjustType colorAdjustType) { - return NotImplemented; + return SetStatus( + DllExports::GdipGetImageAttributesAdjustedPalette(nativeImageAttr, colorPalette, colorAdjustType)); } - Status GetLastStatus(VOID) + Status + GetLastStatus() { - return NotImplemented; + return lastStatus; } Status - Reset(ColorAdjustType type) + Reset(ColorAdjustType type = ColorAdjustTypeDefault) { - return NotImplemented; + return SetStatus(DllExports::GdipResetImageAttributes(nativeImageAttr, type)); } Status SetBrushRemapTable(UINT mapSize, ColorMap *map) { - return NotImplemented; + return SetRemapTable(mapSize, map, ColorAdjustTypeBrush); } Status - SetColorKey(const Color &colorLow, const Color &colorHigh, ColorAdjustType type) + SetColorKey(const Color &colorLow, const Color &colorHigh, ColorAdjustType type = ColorAdjustTypeDefault) { - return NotImplemented; + return SetStatus(DllExports::GdipSetImageAttributesColorKeys( + nativeImageAttr, type, TRUE, colorLow.GetValue(), colorHigh.GetValue())); } Status SetColorMatrices( const ColorMatrix *colorMatrix, const ColorMatrix *grayMatrix, - ColorMatrixFlags mode, - ColorAdjustType type) + ColorMatrixFlags mode = ColorMatrixFlagsDefault, + ColorAdjustType type = ColorAdjustTypeDefault) + { + return SetStatus( + DllExports::GdipSetImageAttributesColorMatrix(nativeImageAttr, type, TRUE, colorMatrix, grayMatrix, mode)); + } + + Status + SetColorMatrix( + const ColorMatrix *colorMatrix, + ColorMatrixFlags mode = ColorMatrixFlagsDefault, + ColorAdjustType type = ColorAdjustTypeDefault) { - return NotImplemented; + return SetStatus( + DllExports::GdipSetImageAttributesColorMatrix(nativeImageAttr, type, TRUE, colorMatrix, NULL, mode)); } Status - SetColorMatrix(const ColorMatrix *colorMatrix, ColorMatrixFlags mode, ColorAdjustType type) + SetGamma(REAL gamma, ColorAdjustType type = ColorAdjustTypeDefault) { - return NotImplemented; + return SetStatus(DllExports::GdipSetImageAttributesGamma(nativeImageAttr, type, TRUE, gamma)); } Status - SetGamma(REAL gamma, ColorAdjustType type) + SetNoOp(ColorAdjustType type = ColorAdjustTypeDefault) { - return NotImplemented; + return SetStatus(DllExports::GdipSetImageAttributesNoOp(nativeImageAttr, type, TRUE)); } Status - SetNoOp(ColorAdjustType type) + SetOutputChannel(ColorChannelFlags channelFlags, ColorAdjustType type = ColorAdjustTypeDefault) { - return NotImplemented; + return SetStatus(DllExports::GdipSetImageAttributesOutputChannel(nativeImageAttr, type, TRUE, channelFlags)); } Status - SetOutputChannel(ColorChannelFlags channelFlags, ColorAdjustType type) + SetOutputChannelColorProfile(const WCHAR *colorProfileFilename, ColorAdjustType type = ColorAdjustTypeDefault) { - return NotImplemented; + return SetStatus(DllExports::GdipSetImageAttributesOutputChannelColorProfile( + nativeImageAttr, type, TRUE, colorProfileFilename)); } Status - SetOutputChannelColorProfile(const WCHAR *colorProfileFilename, ColorAdjustType type) + SetRemapTable(UINT mapSize, const ColorMap *map, ColorAdjustType type = ColorAdjustTypeDefault) { - return NotImplemented; + return SetStatus(DllExports::GdipSetImageAttributesRemapTable(nativeImageAttr, type, TRUE, mapSize, map)); } Status - SetRemapTable(UINT mapSize, const ColorMap *map, ColorAdjustType type) + SetThreshold(REAL threshold, ColorAdjustType type = ColorAdjustTypeDefault) { - return NotImplemented; + return SetStatus(DllExports::GdipSetImageAttributesThreshold(nativeImageAttr, type, TRUE, threshold)); } Status - SetThreshold(REAL threshold, ColorAdjustType type) + SetToIdentity(ColorAdjustType type = ColorAdjustTypeDefault) { - return NotImplemented; + return SetStatus(DllExports::GdipSetImageAttributesToIdentity(nativeImageAttr, type)); } Status - SetToIdentity(ColorAdjustType type) + SetWrapMode(WrapMode wrap, const Color &color = Color(), BOOL clamp = FALSE) + { + ARGB argb = color.GetValue(); + return SetStatus(DllExports::GdipSetImageAttributesWrapMode(nativeImageAttr, wrap, argb, clamp)); + } + + protected: + GpImageAttributes *nativeImageAttr; + mutable Status lastStatus; + + ImageAttributes(GpImageAttributes *imageAttr, Status status) : nativeImageAttr(imageAttr), lastStatus(status) { - return NotImplemented; + } + + VOID + SetNativeImageAttr(GpImageAttributes *imageAttr) + { + nativeImageAttr = imageAttr; } Status - SetWrapMode(WrapMode wrap, const Color &color, BOOL clamp) + SetStatus(Status status) const { - return NotImplemented; + if (status != Ok) + lastStatus = status; + return status; } + + private: + // ImageAttributes is not copyable + ImageAttributes(const ImageAttributes &); + ImageAttributes & + operator=(const ImageAttributes &); }; #endif /* _GDIPLUSIMAGEATTRIBUTES_H */
5 years, 3 months
1
0
0
0
[reactos] 01/01: [SDK][INCLUDE] Implement Gdiplus::CustomLineCap (#2201)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5cc4c9b24d38e5789632f…
commit 5cc4c9b24d38e5789632fe5ce5f50d7b2087625e Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Tue Dec 31 11:30:12 2019 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Tue Dec 31 11:30:12 2019 +0900 [SDK][INCLUDE] Implement Gdiplus::CustomLineCap (#2201) Implement Gdiplus::CustomLineCap and Gdiplus::AdjustableArrowCap. CORE-16585 --- sdk/include/psdk/gdiplusheaders.h | 42 +++++++++++- sdk/include/psdk/gdipluslinecaps.h | 137 ++++++++++++++++++++++++++++--------- sdk/include/psdk/gdipluspath.h | 1 + 3 files changed, 147 insertions(+), 33 deletions(-) diff --git a/sdk/include/psdk/gdiplusheaders.h b/sdk/include/psdk/gdiplusheaders.h index 8ee22310432..915c1cf8f50 100644 --- a/sdk/include/psdk/gdiplusheaders.h +++ b/sdk/include/psdk/gdiplusheaders.h @@ -1332,13 +1332,19 @@ class Region : public GdiplusBase class CustomLineCap : public GdiplusBase { public: - CustomLineCap(const GraphicsPath *fillPath, const GraphicsPath *strokePath, LineCap baseCap, REAL baseInset); + CustomLineCap(const GraphicsPath *fillPath, const GraphicsPath *strokePath, LineCap baseCap, REAL baseInset = 0); + + ~CustomLineCap(); + CustomLineCap * Clone(); + LineCap GetBaseCap(); + REAL GetBaseInset(); + Status GetLastStatus(); @@ -1347,6 +1353,7 @@ class CustomLineCap : public GdiplusBase LineJoin GetStrokeJoin(); + REAL GetWidthScale(); @@ -1369,7 +1376,38 @@ class CustomLineCap : public GdiplusBase SetWidthScale(IN REAL widthScale); protected: - CustomLineCap(); + GpCustomLineCap *nativeCap; + mutable Status lastStatus; + + CustomLineCap() : nativeCap(NULL), lastStatus(Ok) + { + } + + CustomLineCap(GpCustomLineCap *nativeCap, Status status) + { + lastStatus = status; + SetNativeCap(nativeCap); + } + + void + SetNativeCap(GpCustomLineCap *cap) + { + nativeCap = cap; + } + + Status + SetStatus(Status status) const + { + if (status == Ok) + lastStatus = status; + return status; + } + + private: + // CustomLineCap is not copyable + CustomLineCap(const CustomLineCap &); + CustomLineCap & + operator=(const CustomLineCap &); }; #endif /* _GDIPLUSHEADERS_H */ diff --git a/sdk/include/psdk/gdipluslinecaps.h b/sdk/include/psdk/gdipluslinecaps.h index e65bca009d4..0a0d26bada7 100644 --- a/sdk/include/psdk/gdipluslinecaps.h +++ b/sdk/include/psdk/gdipluslinecaps.h @@ -24,79 +24,118 @@ inline CustomLineCap::CustomLineCap( const GraphicsPath *strokePath, LineCap baseCap, REAL baseInset) + : nativeCap(NULL) { + nativeCap = NULL; + GpPath *nativeFillPath = fillPath ? fillPath->nativePath : NULL; + GpPath *nativeStrokePath = strokePath ? strokePath->nativePath : NULL; + lastStatus = DllExports::GdipCreateCustomLineCap(nativeFillPath, nativeStrokePath, baseCap, baseInset, &nativeCap); } -inline CustomLineCap *CustomLineCap::Clone(VOID) +inline CustomLineCap::~CustomLineCap() { - return NULL; + DllExports::GdipDeleteCustomLineCap(nativeCap); } -inline LineCap CustomLineCap::GetBaseCap(VOID) +inline CustomLineCap * +CustomLineCap::Clone() { - return LineCapFlat; + GpCustomLineCap *cap = NULL; + SetStatus(DllExports::GdipCloneCustomLineCap(nativeCap, &cap)); + if (lastStatus != Ok) + return NULL; + + CustomLineCap *newLineCap = new CustomLineCap(cap, lastStatus); + if (newLineCap == NULL) + { + SetStatus(DllExports::GdipDeleteCustomLineCap(cap)); + } + + return newLineCap; +} + +inline LineCap +CustomLineCap::GetBaseCap() +{ + LineCap baseCap; + SetStatus(DllExports::GdipGetCustomLineCapBaseCap(nativeCap, &baseCap)); + return baseCap; } -inline REAL CustomLineCap::GetBaseInset(VOID) +inline REAL +CustomLineCap::GetBaseInset() { - return 0; + REAL inset; + SetStatus(DllExports::GdipGetCustomLineCapBaseInset(nativeCap, &inset)); + return inset; } -inline Status CustomLineCap::GetLastStatus(VOID) +inline Status +CustomLineCap::GetLastStatus() { - return Ok; + return lastStatus; } inline Status CustomLineCap::GetStrokeCaps(LineCap *startCap, LineCap *endCap) { - return Ok; +#if 1 + return SetStatus(NotImplemented); +#else + return SetStatus(DllExports::GdipGetCustomLineCapStrokeCaps(nativeCap, startCap, endCap)); +#endif } -inline LineJoin CustomLineCap::GetStrokeJoin(VOID) +inline LineJoin +CustomLineCap::GetStrokeJoin() { - return LineJoinMiter; + LineJoin lineJoin; + SetStatus(DllExports::GdipGetCustomLineCapStrokeJoin(nativeCap, &lineJoin)); + return lineJoin; } -inline REAL CustomLineCap::GetWidthScale(VOID) +inline REAL +CustomLineCap::GetWidthScale() { - return 0; + REAL widthScale; + SetStatus(DllExports::GdipGetCustomLineCapWidthScale(nativeCap, &widthScale)); + return widthScale; } inline Status CustomLineCap::SetBaseCap(LineCap baseCap) { - return Ok; + return SetStatus(DllExports::GdipSetCustomLineCapBaseCap(nativeCap, baseCap)); } inline Status CustomLineCap::SetBaseInset(REAL inset) { - return Ok; + return SetStatus(DllExports::GdipSetCustomLineCapBaseInset(nativeCap, inset)); } inline Status CustomLineCap::SetStrokeCap(LineCap strokeCap) { - return Ok; + return SetStrokeCaps(strokeCap, strokeCap); } inline Status CustomLineCap::SetStrokeCaps(LineCap startCap, LineCap endCap) { - return Ok; + return SetStatus(DllExports::GdipSetCustomLineCapStrokeCaps(nativeCap, startCap, endCap)); } inline Status CustomLineCap::SetStrokeJoin(LineJoin lineJoin) { - return Ok; + return SetStatus(DllExports::GdipSetCustomLineCapStrokeJoin(nativeCap, lineJoin)); } inline Status CustomLineCap::SetWidthScale(IN REAL widthScale) { - return Ok; + return SetStatus(DllExports::GdipSetCustomLineCapWidthScale(nativeCap, widthScale)); } class AdjustableArrowCap : public CustomLineCap @@ -104,51 +143,87 @@ class AdjustableArrowCap : public CustomLineCap public: AdjustableArrowCap(REAL height, REAL width, BOOL isFilled) { + GpAdjustableArrowCap *cap = NULL; + lastStatus = DllExports::GdipCreateAdjustableArrowCap(height, width, isFilled, &cap); + SetNativeCap(cap); } - REAL GetHeight(VOID) + REAL + GetHeight() { - return 0; + REAL height; + GpAdjustableArrowCap *cap = GetNativeAdjustableArrowCap(); + SetStatus(DllExports::GdipGetAdjustableArrowCapHeight(cap, &height)); + return height; } - REAL GetMiddleInset(VOID) + REAL + GetMiddleInset() { - return 0; + GpAdjustableArrowCap *cap = GetNativeAdjustableArrowCap(); + REAL middleInset; + SetStatus(DllExports::GdipGetAdjustableArrowCapMiddleInset(cap, &middleInset)); + return middleInset; } - REAL GetWidth(VOID) + REAL + GetWidth() { - return 0; + GpAdjustableArrowCap *cap = GetNativeAdjustableArrowCap(); + REAL width; + SetStatus(DllExports::GdipGetAdjustableArrowCapWidth(cap, &width)); + return width; } - BOOL IsFilled(VOID) + BOOL + IsFilled() { - return FALSE; + GpAdjustableArrowCap *cap = GetNativeAdjustableArrowCap(); + BOOL isFilled; + SetStatus(DllExports::GdipGetAdjustableArrowCapFillState(cap, &isFilled)); + return isFilled; } Status SetFillState(BOOL isFilled) { - return Ok; + GpAdjustableArrowCap *cap = GetNativeAdjustableArrowCap(); + return SetStatus(DllExports::GdipSetAdjustableArrowCapFillState(cap, isFilled)); } Status SetHeight(REAL height) { - return Ok; + GpAdjustableArrowCap *cap = GetNativeAdjustableArrowCap(); + return SetStatus(DllExports::GdipSetAdjustableArrowCapHeight(cap, height)); } Status SetMiddleInset(REAL middleInset) { - return Ok; + GpAdjustableArrowCap *cap = GetNativeAdjustableArrowCap(); + return SetStatus(DllExports::GdipSetAdjustableArrowCapMiddleInset(cap, middleInset)); } Status SetWidth(REAL width) { - return Ok; + GpAdjustableArrowCap *cap = GetNativeAdjustableArrowCap(); + return SetStatus(DllExports::GdipSetAdjustableArrowCapWidth(cap, width)); + } + + protected: + GpAdjustableArrowCap * + GetNativeAdjustableArrowCap() const + { + return static_cast<GpAdjustableArrowCap *>(nativeCap); } + + private: + // AdjustableArrowCap is not copyable + AdjustableArrowCap(const AdjustableArrowCap &); + AdjustableArrowCap & + operator=(const AdjustableArrowCap &); }; #endif /* _GDIPLUSLINECAPS_H */ diff --git a/sdk/include/psdk/gdipluspath.h b/sdk/include/psdk/gdipluspath.h index 5d57df2bf1e..73774dfa01a 100644 --- a/sdk/include/psdk/gdipluspath.h +++ b/sdk/include/psdk/gdipluspath.h @@ -25,6 +25,7 @@ class Graphics; class GraphicsPath : public GdiplusBase { friend class Region; + friend class CustomLineCap; public: GraphicsPath(const Point *points, const BYTE *types, INT count, FillMode fillMode) : nativePath(NULL)
5 years, 3 months
1
0
0
0
[reactos] 01/01: [SDK][TOOLS] Add do_code_format.sh to sdk/tools (#2191)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f4f010ba50d70215ee3da…
commit f4f010ba50d70215ee3dab0337ddbb451197f4c3 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Tue Dec 31 11:28:56 2019 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Tue Dec 31 11:28:56 2019 +0900 [SDK][TOOLS] Add do_code_format.sh to sdk/tools (#2191) do_code_format.sh --- A command line tool using clang-format --- sdk/tools/do_code_format.sh | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/sdk/tools/do_code_format.sh b/sdk/tools/do_code_format.sh new file mode 100644 index 00000000000..d35f43c0a05 --- /dev/null +++ b/sdk/tools/do_code_format.sh @@ -0,0 +1,35 @@ +#!/bin/bash +# do_code_format.sh + +function version +{ + echo "$(basename ${0}) version 0.0.2" +} + +function usage +{ + cat <<EOF +$(basename ${0}) does code formatting. + +Usage: + $(basename ${0}) [<options>] <files> + +Options: + --help print this message + --version print $(basename ${0}) version +EOF +} + +case ${1} in + --help) + usage + exit 0 + ;; + + --version) + version + exit 0 + ;; +esac + +clang-format -style=file -i $@
5 years, 3 months
1
0
0
0
[reactos] 01/01: [SDK][INCLUDE] Implementing Gdiplus::GraphicsPath (#2200)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=bef5aef62b5f885874978…
commit bef5aef62b5f885874978a09b450ad31028edb9e Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Tue Dec 31 09:23:45 2019 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Tue Dec 31 09:23:45 2019 +0900 [SDK][INCLUDE] Implementing Gdiplus::GraphicsPath (#2200) Point, PointF, Size, SizeF, Rect and RectF are also implemented. CORE-16585 --- sdk/include/psdk/gdiplusheaders.h | 26 +-- sdk/include/psdk/gdiplusmatrix.h | 87 ++++---- sdk/include/psdk/gdipluspath.h | 269 +++++++++++++++--------- sdk/include/psdk/gdipluspen.h | 4 +- sdk/include/psdk/gdiplustypes.h | 415 ++++++++++++++++++++++++++++++++++++-- 5 files changed, 645 insertions(+), 156 deletions(-) diff --git a/sdk/include/psdk/gdiplusheaders.h b/sdk/include/psdk/gdiplusheaders.h index 3383018d7a6..8ee22310432 100644 --- a/sdk/include/psdk/gdiplusheaders.h +++ b/sdk/include/psdk/gdiplusheaders.h @@ -980,7 +980,7 @@ class Region : public GdiplusBase Region(const GraphicsPath *path) { - status = DllExports::GdipCreateRegionPath(path->path, ®ion); + status = DllExports::GdipCreateRegionPath(path->nativePath, ®ion); } Region(HRGN hRgn) @@ -1004,14 +1004,15 @@ class Region : public GdiplusBase Status Complement(const GraphicsPath *path) { - return SetStatus(DllExports::GdipCombineRegionPath(region, path ? path->path : NULL, CombineModeComplement)); + GpPath *thePath = path ? path->nativePath : NULL; + return SetStatus(DllExports::GdipCombineRegionPath(region, thePath, CombineModeComplement)); } Status Complement(const Region *region) { - return SetStatus( - DllExports::GdipCombineRegionRegion(this->region, region ? region->region : NULL, CombineModeComplement)); + GpRegion *theRegion = region ? region->region : NULL; + return SetStatus(DllExports::GdipCombineRegionRegion(this->region, theRegion, CombineModeComplement)); } Status @@ -1038,7 +1039,7 @@ class Region : public GdiplusBase Status Exclude(const GraphicsPath *path) { - return SetStatus(DllExports::GdipCombineRegionPath(region, path ? path->path : NULL, CombineModeExclude)); + return SetStatus(DllExports::GdipCombineRegionPath(region, path ? path->nativePath : NULL, CombineModeExclude)); } Status @@ -1109,20 +1110,20 @@ class Region : public GdiplusBase Status GetRegionScans(const Matrix *matrix, Rect *rects, INT *count) const { - return SetStatus(DllExports::GdipGetRegionScansI(region, rects, count, matrix ? matrix->matrix : NULL)); + return SetStatus(DllExports::GdipGetRegionScansI(region, rects, count, matrix ? matrix->nativeMatrix : NULL)); } Status GetRegionScans(const Matrix *matrix, RectF *rects, INT *count) const { - return SetStatus(DllExports::GdipGetRegionScans(region, rects, count, matrix ? matrix->matrix : NULL)); + return SetStatus(DllExports::GdipGetRegionScans(region, rects, count, matrix ? matrix->nativeMatrix : NULL)); } UINT GetRegionScansCount(const Matrix *matrix) const { UINT count; - SetStatus(DllExports::GdipGetRegionScansCount(region, &count, matrix ? matrix->matrix : NULL)); + SetStatus(DllExports::GdipGetRegionScansCount(region, &count, matrix ? matrix->nativeMatrix : NULL)); return count; } @@ -1135,7 +1136,8 @@ class Region : public GdiplusBase Status Intersect(const GraphicsPath *path) { - return SetStatus(DllExports::GdipCombineRegionPath(region, path ? path->path : NULL, CombineModeIntersect)); + GpPath *thePath = path ? path->nativePath : NULL; + return SetStatus(DllExports::GdipCombineRegionPath(region, thePath, CombineModeIntersect)); } Status @@ -1248,7 +1250,7 @@ class Region : public GdiplusBase Status Transform(const Matrix *matrix) { - return SetStatus(DllExports::GdipTransformRegion(region, matrix ? matrix->matrix : NULL)); + return SetStatus(DllExports::GdipTransformRegion(region, matrix ? matrix->nativeMatrix : NULL)); } Status @@ -1285,13 +1287,13 @@ class Region : public GdiplusBase Status Union(const GraphicsPath *path) { - return SetStatus(DllExports::GdipCombineRegionPath(region, path ? path->path : NULL, CombineModeUnion)); + return SetStatus(DllExports::GdipCombineRegionPath(region, path ? path->nativePath : NULL, CombineModeUnion)); } Status Xor(const GraphicsPath *path) { - return SetStatus(DllExports::GdipCombineRegionPath(region, path ? path->path : NULL, CombineModeXor)); + return SetStatus(DllExports::GdipCombineRegionPath(region, path ? path->nativePath : NULL, CombineModeXor)); } Status diff --git a/sdk/include/psdk/gdiplusmatrix.h b/sdk/include/psdk/gdiplusmatrix.h index 3208e1edcfd..c2425c3ff1c 100644 --- a/sdk/include/psdk/gdiplusmatrix.h +++ b/sdk/include/psdk/gdiplusmatrix.h @@ -23,82 +23,92 @@ class Matrix : public GdiplusBase { friend class Pen; friend class Region; + friend class GraphicsPath; public: Matrix(const RectF &rect, const PointF *dstplg) { - status = DllExports::GdipCreateMatrix3(&rect, dstplg, &matrix); + lastStatus = DllExports::GdipCreateMatrix3(&rect, dstplg, &nativeMatrix); } Matrix(const Rect &rect, const Point *dstplg) { - status = DllExports::GdipCreateMatrix3I(&rect, dstplg, &matrix); + lastStatus = DllExports::GdipCreateMatrix3I(&rect, dstplg, &nativeMatrix); } - Matrix(VOID) + Matrix() { - status = DllExports::GdipCreateMatrix(&matrix); + lastStatus = DllExports::GdipCreateMatrix(&nativeMatrix); } Matrix(REAL m11, REAL m12, REAL m21, REAL m22, REAL dx, REAL dy) { - status = DllExports::GdipCreateMatrix2(m11, m12, m21, m22, dx, dy, &matrix); + lastStatus = DllExports::GdipCreateMatrix2(m11, m12, m21, m22, dx, dy, &nativeMatrix); } - Matrix *Clone(VOID) + Matrix * + Clone() { - Matrix *cloneMatrix = new Matrix(); // FIXME: Matrix::matrix already initialized --> potential memory leak - cloneMatrix->status = DllExports::GdipCloneMatrix(matrix, cloneMatrix ? &cloneMatrix->matrix : NULL); - return cloneMatrix; + GpMatrix *cloneMatrix = NULL; + SetStatus(DllExports::GdipCloneMatrix(nativeMatrix, &cloneMatrix)); + + if (lastStatus != Ok) + return NULL; + + return new Matrix(cloneMatrix); } - ~Matrix(VOID) + ~Matrix() { - DllExports::GdipDeleteMatrix(matrix); + DllExports::GdipDeleteMatrix(nativeMatrix); } BOOL Equals(const Matrix *matrix) { BOOL result; - SetStatus(DllExports::GdipIsMatrixEqual(this->matrix, matrix ? matrix->matrix : NULL, &result)); + SetStatus(DllExports::GdipIsMatrixEqual(nativeMatrix, matrix ? matrix->nativeMatrix : NULL, &result)); return result; } Status GetElements(REAL *m) const { - return SetStatus(DllExports::GdipGetMatrixElements(matrix, m)); + return SetStatus(DllExports::GdipGetMatrixElements(nativeMatrix, m)); } - Status GetLastStatus(VOID) + Status + GetLastStatus() const { - return status; + return lastStatus; } - Status Invert(VOID) + Status + Invert() { - return SetStatus(DllExports::GdipInvertMatrix(matrix)); + return SetStatus(DllExports::GdipInvertMatrix(nativeMatrix)); } - BOOL IsIdentity(VOID) + BOOL + IsIdentity() { BOOL result; - SetStatus(DllExports::GdipIsMatrixIdentity(matrix, &result)); + SetStatus(DllExports::GdipIsMatrixIdentity(nativeMatrix, &result)); return result; } - BOOL IsInvertible(VOID) + BOOL + IsInvertible() { BOOL result; - SetStatus(DllExports::GdipIsMatrixInvertible(matrix, &result)); + SetStatus(DllExports::GdipIsMatrixInvertible(nativeMatrix, &result)); return result; } Status Multiply(const Matrix *matrix, MatrixOrder order) { - return SetStatus(DllExports::GdipMultiplyMatrix(this->matrix, matrix ? matrix->matrix : NULL, order)); + return SetStatus(DllExports::GdipMultiplyMatrix(nativeMatrix, matrix ? matrix->nativeMatrix : NULL, order)); } REAL OffsetX(VOID) @@ -119,7 +129,7 @@ class Matrix : public GdiplusBase Status Rotate(REAL angle, MatrixOrder order) { - return SetStatus(DllExports::GdipRotateMatrix(matrix, angle, order)); + return SetStatus(DllExports::GdipRotateMatrix(nativeMatrix, angle, order)); } Status @@ -131,61 +141,64 @@ class Matrix : public GdiplusBase Status Scale(REAL scaleX, REAL scaleY, MatrixOrder order) { - return SetStatus(DllExports::GdipScaleMatrix(matrix, scaleX, scaleY, order)); + return SetStatus(DllExports::GdipScaleMatrix(nativeMatrix, scaleX, scaleY, order)); } Status SetElements(REAL m11, REAL m12, REAL m21, REAL m22, REAL dx, REAL dy) { - return SetStatus(DllExports::GdipSetMatrixElements(matrix, m11, m12, m21, m22, dx, dy)); + return SetStatus(DllExports::GdipSetMatrixElements(nativeMatrix, m11, m12, m21, m22, dx, dy)); } Status Shear(REAL shearX, REAL shearY, MatrixOrder order) { - return SetStatus(DllExports::GdipShearMatrix(matrix, shearX, shearY, order)); + return SetStatus(DllExports::GdipShearMatrix(nativeMatrix, shearX, shearY, order)); } Status TransformPoints(Point *pts, INT count) { - return SetStatus(DllExports::GdipTransformMatrixPointsI(matrix, pts, count)); + return SetStatus(DllExports::GdipTransformMatrixPointsI(nativeMatrix, pts, count)); } Status TransformPoints(PointF *pts, INT count) { - return SetStatus(DllExports::GdipTransformMatrixPoints(matrix, pts, count)); + return SetStatus(DllExports::GdipTransformMatrixPoints(nativeMatrix, pts, count)); } Status TransformVectors(Point *pts, INT count) { - return SetStatus(DllExports::GdipVectorTransformMatrixPointsI(matrix, pts, count)); + return SetStatus(DllExports::GdipVectorTransformMatrixPointsI(nativeMatrix, pts, count)); } Status TransformVectors(PointF *pts, INT count) { - return SetStatus(DllExports::GdipVectorTransformMatrixPoints(matrix, pts, count)); + return SetStatus(DllExports::GdipVectorTransformMatrixPoints(nativeMatrix, pts, count)); } Status Translate(REAL offsetX, REAL offsetY, MatrixOrder order) { - return SetStatus(DllExports::GdipTranslateMatrix(matrix, offsetX, offsetY, order)); + return SetStatus(DllExports::GdipTranslateMatrix(nativeMatrix, offsetX, offsetY, order)); } - private: - mutable Status status; - GpMatrix *matrix; + protected: + GpMatrix *nativeMatrix; + mutable Status lastStatus; + + Matrix(GpMatrix *matrix) : nativeMatrix(matrix), lastStatus(Ok) + { + } Status SetStatus(Status status) const { - if (status == Ok) - return status; - this->status = status; + if (status != Ok) + lastStatus = status; return status; } }; diff --git a/sdk/include/psdk/gdipluspath.h b/sdk/include/psdk/gdipluspath.h index 8d9b58db422..5d57df2bf1e 100644 --- a/sdk/include/psdk/gdipluspath.h +++ b/sdk/include/psdk/gdipluspath.h @@ -27,262 +27,275 @@ class GraphicsPath : public GdiplusBase friend class Region; public: - GraphicsPath(const Point *points, const BYTE *types, INT count, FillMode fillMode) + GraphicsPath(const Point *points, const BYTE *types, INT count, FillMode fillMode) : nativePath(NULL) { + lastStatus = DllExports::GdipCreatePath2I(points, types, count, fillMode, &nativePath); } - GraphicsPath(FillMode fillMode) + GraphicsPath(FillMode fillMode = FillModeAlternate) : nativePath(NULL) { + lastStatus = DllExports::GdipCreatePath(fillMode, &nativePath); } - GraphicsPath(const PointF *points, const BYTE *types, INT count, FillMode fillMode) + GraphicsPath(const PointF *points, const BYTE *types, INT count, FillMode fillMode = FillModeAlternate) + : nativePath(NULL) { + lastStatus = DllExports::GdipCreatePath2(points, types, count, fillMode, &nativePath); + } + + ~GraphicsPath() + { + DllExports::GdipDeletePath(nativePath); } Status AddArc(const Rect &rect, REAL startAngle, REAL sweepAngle) { - return NotImplemented; + return AddArc(rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle); } Status AddArc(const RectF &rect, REAL startAngle, REAL sweepAngle) { - return NotImplemented; + return AddArc(rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle); } Status AddArc(INT x, INT y, INT width, INT height, REAL startAngle, REAL sweepAngle) { - return NotImplemented; + return SetStatus(DllExports::GdipAddPathArcI(nativePath, x, y, width, height, startAngle, sweepAngle)); } Status AddArc(REAL x, REAL y, REAL width, REAL height, REAL startAngle, REAL sweepAngle) { - return NotImplemented; + return SetStatus(DllExports::GdipAddPathArc(nativePath, x, y, width, height, startAngle, sweepAngle)); } Status AddBezier(const Point &pt1, const Point &pt2, const Point &pt3, const Point &pt4) { - return NotImplemented; + return AddBezier(pt1.X, pt1.Y, pt2.X, pt2.Y, pt3.X, pt3.Y, pt4.X, pt4.Y); } Status AddBezier(REAL x1, REAL y1, REAL x2, REAL y2, REAL x3, REAL y3, REAL x4, REAL y4) { - return NotImplemented; + return SetStatus(DllExports::GdipAddPathBezier(nativePath, x1, y1, x2, y2, x3, y3, x4, y4)); } Status AddBezier(const PointF &pt1, const PointF &pt2, const PointF &pt3, const PointF &pt4) { - return NotImplemented; + return AddBezier(pt1.X, pt1.Y, pt2.X, pt2.Y, pt3.X, pt3.Y, pt4.X, pt4.Y); } Status AddBezier(INT x1, INT y1, INT x2, INT y2, INT x3, INT y3, INT x4, INT y4) { - return NotImplemented; + return SetStatus(DllExports::GdipAddPathBezierI(nativePath, x1, y1, x2, y2, x3, y3, x4, y4)); } Status AddBeziers(const Point *points, INT count) { - return NotImplemented; + return SetStatus(DllExports::GdipAddPathBeziersI(nativePath, points, count)); } Status AddBeziers(const PointF *points, INT count) { - return NotImplemented; + return SetStatus(DllExports::GdipAddPathBeziers(nativePath, points, count)); } Status AddClosedCurve(const Point *points, INT count) { - return NotImplemented; + return SetStatus(DllExports::GdipAddPathClosedCurveI(nativePath, points, count)); } Status AddClosedCurve(const Point *points, INT count, REAL tension) { - return NotImplemented; + return SetStatus(DllExports::GdipAddPathClosedCurve2I(nativePath, points, count, tension)); } Status AddClosedCurve(const PointF *points, INT count, REAL tension) { - return NotImplemented; + return SetStatus(DllExports::GdipAddPathClosedCurve2(nativePath, points, count, tension)); } Status AddClosedCurve(const PointF *points, INT count) { - return NotImplemented; + return SetStatus(DllExports::GdipAddPathClosedCurve(nativePath, points, count)); } Status AddCurve(const Point *points, INT count) { - return NotImplemented; + return SetStatus(DllExports::GdipAddPathCurveI(nativePath, points, count)); } Status AddCurve(const PointF *points, INT count, REAL tension) { - return NotImplemented; + return SetStatus(DllExports::GdipAddPathCurve2(nativePath, points, count, tension)); } Status AddCurve(const PointF *points, INT count) { - return NotImplemented; + return SetStatus(DllExports::GdipAddPathCurve(nativePath, points, count)); } Status AddCurve(const Point *points, INT count, INT offset, INT numberOfSegments, REAL tension) { - return NotImplemented; + return SetStatus(DllExports::GdipAddPathCurve3I(nativePath, points, count, offset, numberOfSegments, tension)); } Status AddCurve(const Point *points, INT count, REAL tension) { - return NotImplemented; + return SetStatus(DllExports::GdipAddPathCurve2I(nativePath, points, count, tension)); } Status AddCurve(const PointF *points, INT count, INT offset, INT numberOfSegments, REAL tension) { - return NotImplemented; + return SetStatus(DllExports::GdipAddPathCurve3(nativePath, points, count, offset, numberOfSegments, tension)); } Status AddEllipse(const Rect &rect) { - return NotImplemented; + return AddEllipse(rect.X, rect.Y, rect.Width, rect.Height); } Status AddEllipse(const RectF &rect) { - return NotImplemented; + return AddEllipse(rect.X, rect.Y, rect.Width, rect.Height); } Status AddEllipse(INT x, INT y, INT width, INT height) { - return NotImplemented; + return SetStatus(DllExports::GdipAddPathEllipseI(nativePath, x, y, width, height)); } Status AddEllipse(REAL x, REAL y, REAL width, REAL height) { - return NotImplemented; + return SetStatus(DllExports::GdipAddPathEllipse(nativePath, x, y, width, height)); } Status AddLine(const Point &pt1, const Point &pt2) { - return NotImplemented; + return AddLine(pt1.X, pt1.Y, pt2.X, pt2.Y); } Status AddLine(const PointF &pt1, const PointF &pt2) { - return NotImplemented; + return AddLine(pt1.X, pt1.Y, pt2.X, pt2.Y); } Status AddLine(REAL x1, REAL y1, REAL x2, REAL y2) { - return NotImplemented; + return SetStatus(DllExports::GdipAddPathLine(nativePath, x1, y1, x2, y2)); } Status AddLine(INT x1, INT y1, INT x2, INT y2) { - return NotImplemented; + return SetStatus(DllExports::GdipAddPathLineI(nativePath, x1, y1, x2, y2)); } Status AddLines(const Point *points, INT count) { - return NotImplemented; + return SetStatus(DllExports::GdipAddPathLine2I(nativePath, points, count)); } Status AddLines(const PointF *points, INT count) { - return NotImplemented; + return SetStatus(DllExports::GdipAddPathLine2(nativePath, points, count)); } Status AddPath(const GraphicsPath *addingPath, BOOL connect) { - return NotImplemented; + GpPath *nativePath2 = NULL; + if (addingPath) + nativePath2 = addingPath->nativePath; + + return SetStatus(DllExports::GdipAddPathPath(nativePath, nativePath2, connect)); } Status AddPie(const Rect &rect, REAL startAngle, REAL sweepAngle) { - return NotImplemented; + return AddPie(rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle); } Status AddPie(INT x, INT y, INT width, INT height, REAL startAngle, REAL sweepAngle) { - return NotImplemented; + return SetStatus(DllExports::GdipAddPathPieI(nativePath, x, y, width, height, startAngle, sweepAngle)); } Status AddPie(REAL x, REAL y, REAL width, REAL height, REAL startAngle, REAL sweepAngle) { - return NotImplemented; + return SetStatus(DllExports::GdipAddPathPie(nativePath, x, y, width, height, startAngle, sweepAngle)); } Status AddPie(const RectF &rect, REAL startAngle, REAL sweepAngle) { - return NotImplemented; + return AddPie(rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle); } Status AddPolygon(const Point *points, INT count) { - return NotImplemented; + return SetStatus(DllExports::GdipAddPathPolygonI(nativePath, points, count)); } Status AddPolygon(const PointF *points, INT count) { - return NotImplemented; + return SetStatus(DllExports::GdipAddPathPolygon(nativePath, points, count)); } Status AddRectangle(const Rect &rect) { - return NotImplemented; + return SetStatus(DllExports::GdipAddPathRectangleI(nativePath, rect.X, rect.Y, rect.Width, rect.Height)); } Status AddRectangle(const RectF &rect) { - return NotImplemented; + return SetStatus(DllExports::GdipAddPathRectangle(nativePath, rect.X, rect.Y, rect.Width, rect.Height)); } Status AddRectangles(const Rect *rects, INT count) { - return NotImplemented; + return SetStatus(DllExports::GdipAddPathRectanglesI(nativePath, rects, count)); } Status AddRectangles(const RectF *rects, INT count) { - return NotImplemented; + return SetStatus(DllExports::GdipAddPathRectangles(nativePath, rects, count)); } Status @@ -295,7 +308,7 @@ class GraphicsPath : public GdiplusBase const Rect &layoutRect, const StringFormat *format) { - return NotImplemented; + return SetStatus(NotImplemented); } Status @@ -308,7 +321,7 @@ class GraphicsPath : public GdiplusBase const PointF &origin, const StringFormat *format) { - return NotImplemented; + return SetStatus(NotImplemented); } Status @@ -321,7 +334,7 @@ class GraphicsPath : public GdiplusBase const Point &origin, const StringFormat *format) { - return NotImplemented; + return SetStatus(NotImplemented); } Status @@ -334,61 +347,77 @@ class GraphicsPath : public GdiplusBase const RectF &layoutRect, const StringFormat *format) { - return NotImplemented; + return SetStatus(NotImplemented); } - Status ClearMarkers(VOID) + Status + ClearMarkers() { - return NotImplemented; + return SetStatus(DllExports::GdipClearPathMarkers(nativePath)); } - GraphicsPath *Clone(VOID) + GraphicsPath * + Clone() { - return NULL; + GpPath *clonepath = NULL; + SetStatus(DllExports::GdipClonePath(nativePath, &clonepath)); + if (lastStatus != Ok) + return NULL; + return new GraphicsPath(clonepath); } - Status CloseAllFigures(VOID) + Status + CloseAllFigures() { - return NotImplemented; + return SetStatus(DllExports::GdipClosePathFigures(nativePath)); } - Status CloseFigure(VOID) + Status + CloseFigure() { - return NotImplemented; + return SetStatus(DllExports::GdipClosePathFigure(nativePath)); } Status Flatten(const Matrix *matrix, REAL flatness) { - return NotImplemented; + GpMatrix *nativeMatrix = NULL; + if (matrix) + nativeMatrix = matrix->nativeMatrix; + + return SetStatus(DllExports::GdipFlattenPath(nativePath, nativeMatrix, flatness)); } Status GetBounds(Rect *bounds, const Matrix *matrix, const Pen *pen) { - return NotImplemented; + return SetStatus(NotImplemented); } Status GetBounds(RectF *bounds, const Matrix *matrix, const Pen *pen) { - return NotImplemented; + return SetStatus(NotImplemented); } - FillMode GetFillMode(VOID) + FillMode + GetFillMode() { - return FillModeAlternate; + FillMode fillmode = FillModeAlternate; + SetStatus(DllExports::GdipGetPathFillMode(nativePath, &fillmode)); + return fillmode; } Status - GetLastPoint(PointF *lastPoint) + GetLastPoint(PointF *lastPoint) const { - return NotImplemented; + return SetStatus(DllExports::GdipGetPathLastPoint(nativePath, lastPoint)); } - Status GetLastStatus(VOID) + Status + GetLastStatus() const { - return NotImplemented; + return lastStatus; } Status @@ -415,7 +444,8 @@ class GraphicsPath : public GdiplusBase return NotImplemented; } - INT GetPointCount(VOID) + INT + GetPointCount() { return 0; } @@ -453,7 +483,7 @@ class GraphicsPath : public GdiplusBase BOOL IsVisible(const PointF &point, const Graphics *g) { - return FALSE; + return IsVisible(point.X, point.Y, g); } BOOL @@ -465,7 +495,7 @@ class GraphicsPath : public GdiplusBase BOOL IsVisible(const Point &point, const Graphics *g) { - return NotImplemented; + return IsVisible(point.X, point.Y, g); } Status @@ -474,36 +504,42 @@ class GraphicsPath : public GdiplusBase return NotImplemented; } - Status Reset(VOID) + Status + Reset() { - return NotImplemented; + return SetStatus(DllExports::GdipResetPath(nativePath)); } - Status Reverse(VOID) + Status + Reverse() { - return NotImplemented; + return SetStatus(DllExports::GdipReversePath(nativePath)); } Status SetFillMode(FillMode fillmode) { - return NotImplemented; + return SetStatus(DllExports::GdipSetPathFillMode(nativePath, fillmode)); } - Status SetMarker(VOID) + Status + SetMarker() { - return NotImplemented; + return SetStatus(DllExports::GdipSetPathMarker(nativePath)); } - Status StartFigure(VOID) + Status + StartFigure() { - return NotImplemented; + return SetStatus(DllExports::GdipStartPathFigure(nativePath)); } Status Transform(const Matrix *matrix) { - return NotImplemented; + if (!matrix) + return Ok; + return SetStatus(DllExports::GdipTransformPath(nativePath, matrix->nativeMatrix)); } Status @@ -515,17 +551,52 @@ class GraphicsPath : public GdiplusBase WarpMode warpMode, REAL flatness) { - return NotImplemented; + GpMatrix *nativeMatrix = NULL; + if (matrix) + nativeMatrix = matrix->nativeMatrix; + + return SetStatus(DllExports::GdipWarpPath( + nativePath, nativeMatrix, destPoints, count, srcRect.X, srcRect.Y, srcRect.Width, srcRect.Height, warpMode, + flatness)); } Status Widen(const Pen *pen, const Matrix *matrix, REAL flatness) { - return NotImplemented; + return SetStatus(NotImplemented); + } + + protected: + GpPath *nativePath; + mutable Status lastStatus; + + GraphicsPath() + { + } + + GraphicsPath(GpPath *path) : nativePath(path), lastStatus(Ok) + { + } + + Status + SetStatus(Status status) const + { + if (status != Ok) + lastStatus = status; + return status; + } + + void + SetNativePath(GpPath *path) + { + nativePath = path; } private: - GpPath *path; + // GraphicsPath is not copyable + GraphicsPath(const GraphicsPath &); + GraphicsPath & + operator=(const GraphicsPath &); }; class GraphicsPathIterator : public GdiplusBase @@ -547,22 +618,26 @@ class GraphicsPathIterator : public GdiplusBase return 0; } - INT GetCount(VOID) + INT + GetCount() { return 0; } - Status GetLastStatus(VOID) + Status + GetLastStatus() const { return NotImplemented; } - INT GetSubpathCount(VOID) + INT + GetSubpathCount() const { return 0; } - BOOL HasCurve(VOID) + BOOL + HasCurve() const { return FALSE; } @@ -597,7 +672,8 @@ class GraphicsPathIterator : public GdiplusBase return 0; } - VOID Rewind(VOID) + VOID + Rewind() { } }; @@ -617,7 +693,8 @@ class PathGradientBrush : public Brush { } - INT GetBlendCount(VOID) + INT + GetBlendCount() { return 0; } @@ -652,7 +729,8 @@ class PathGradientBrush : public Brush return NotImplemented; } - BOOL GetGammaCorrection(VOID) + BOOL + GetGammaCorrection() { return FALSE; } @@ -663,7 +741,8 @@ class PathGradientBrush : public Brush return NotImplemented; } - INT GetInterpolationColorCount(VOID) + INT + GetInterpolationColorCount() { return 0; } @@ -674,7 +753,8 @@ class PathGradientBrush : public Brush return NotImplemented; } - INT GetPointCount(VOID) + INT + GetPointCount() { return 0; } @@ -691,7 +771,8 @@ class PathGradientBrush : public Brush return NotImplemented; } - INT GetSurroundColorCount(VOID) + INT + GetSurroundColorCount() { return 0; } @@ -708,7 +789,8 @@ class PathGradientBrush : public Brush return NotImplemented; } - WrapMode GetWrapMode(VOID) + WrapMode + GetWrapMode() { return WrapModeTile; } @@ -719,7 +801,8 @@ class PathGradientBrush : public Brush return NotImplemented; } - Status ResetTransform(VOID) + Status + ResetTransform() { return NotImplemented; } diff --git a/sdk/include/psdk/gdipluspen.h b/sdk/include/psdk/gdipluspen.h index 7b36f52cfdc..18f73636d88 100644 --- a/sdk/include/psdk/gdipluspen.h +++ b/sdk/include/psdk/gdipluspen.h @@ -180,7 +180,7 @@ class Pen : public GdiplusBase MultiplyTransform(Matrix *matrix, MatrixOrder order) { return NotImplemented; // FIXME: not available: SetStatus(DllExports::GdipMultiplyPenTransform(pen, matrix ? - // matrix->matrix : NULL, order)); + // matrix->nativeMatrix : NULL, order)); } Status ResetTransform(VOID) @@ -294,7 +294,7 @@ class Pen : public GdiplusBase Status SetTransform(const Matrix *matrix) { - return SetStatus(DllExports::GdipSetPenTransform(pen, matrix ? matrix->matrix : NULL)); + return SetStatus(DllExports::GdipSetPenTransform(pen, matrix ? matrix->nativeMatrix : NULL)); } Status diff --git a/sdk/include/psdk/gdiplustypes.h b/sdk/include/psdk/gdiplustypes.h index 8d39d004add..bb3d8535b12 100644 --- a/sdk/include/psdk/gdiplustypes.h +++ b/sdk/include/psdk/gdiplustypes.h @@ -65,6 +65,8 @@ extern "C" #ifdef __cplusplus +class Size; + class Point { public: @@ -79,7 +81,7 @@ class Point Y = pt.Y; } - /* FIXME: missing constructor that takes a Size */ + Point(const Size &size); Point(IN INT x, IN INT y) { @@ -100,7 +102,7 @@ class Point } BOOL - Equals(IN const Point &pt) + Equals(IN const Point &pt) const { return (X == pt.X) && (Y == pt.Y); } @@ -110,6 +112,8 @@ class Point INT Y; }; +class SizeF; + class PointF { public: @@ -124,7 +128,7 @@ class PointF Y = pt.Y; } - /* FIXME: missing constructor that takes a SizeF */ + PointF(const SizeF &size); PointF(IN REAL x, IN REAL y) { @@ -145,7 +149,7 @@ class PointF } BOOL - Equals(IN const PointF &pt) + Equals(IN const PointF &pt) const { return (X == pt.X) && (Y == pt.Y); } @@ -189,7 +193,51 @@ class PathData BYTE *Types; }; -/* FIXME: missing the methods. */ +class SizeF +{ + public: + REAL Width; + REAL Height; + + SizeF() : Width(0), Height(0) + { + } + + SizeF(const SizeF &size) : Width(size.Width), Height(size.Height) + { + } + + SizeF(REAL width, REAL height) : Width(width), Height(height) + { + } + + BOOL + Empty() const + { + return Width == 0 && Height == 0; + } + + BOOL + Equals(const SizeF &sz) const + { + return Width == sz.Width && Height == sz.Height; + } + + SizeF + operator+(const SizeF &sz) const + { + return SizeF(Width + sz.Width, Height + sz.Height); + } + + SizeF + operator-(const SizeF &sz) const + { + return SizeF(Width - sz.Width, Height - sz.Height); + } +}; + +#define REAL_EPSILON 1.192092896e-07F /* FLT_EPSILON */ + class RectF { public: @@ -197,9 +245,202 @@ class RectF REAL Y; REAL Width; REAL Height; + + RectF() : X(0), Y(0), Width(0), Height(0) + { + } + + RectF(const PointF &location, const SizeF &size) + : X(location.X), Y(location.Y), Width(size.Width), Height(size.Height) + { + } + + RectF(REAL x, REAL y, REAL width, REAL height) : X(x), Y(y), Width(width), Height(height) + { + } + + RectF * + Clone() const + { + return new RectF(X, Y, Width, Height); + } + + BOOL + Contains(const PointF &pt) const + { + return Contains(pt.X, pt.Y); + } + + BOOL + Contains(const RectF &rect) const + { + return X <= rect.X && rect.GetRight() <= GetRight() && Y <= rect.Y && rect.GetBottom() <= GetBottom(); + } + + BOOL + Contains(REAL x, REAL y) const + { + return X <= x && x < X + Width && Y <= y && y < Y + Height; + } + + BOOL + Equals(const RectF &rect) const + { + return X == rect.X && Y == rect.Y && Width == rect.Width && Height == rect.Height; + } + + REAL + GetBottom() const + { + return Y + Height; + } + + VOID + GetBounds(RectF *rect) const + { + rect->X = X; + rect->Y = Y; + rect->Width = Width; + rect->Height = Height; + } + + REAL + GetLeft() const + { + return X; + } + + VOID + GetLocation(PointF *point) const + { + point->X = X; + point->Y = Y; + } + + REAL + GetRight() const + { + return X + Width; + } + + VOID + GetSize(SizeF *size) const + { + size->Width = Width; + size->Height = Height; + } + + REAL + GetTop() const + { + return Y; + } + + VOID + Inflate(REAL dx, REAL dy) + { + X -= dx; + Y -= dy; + Width += 2 * dx; + Height += 2 * dy; + } + + VOID + Inflate(const PointF &point) + { + Inflate(point.X, point.Y); + } + + static BOOL + Intersect(RectF &c, const RectF &a, const RectF &b) + { + // FIXME + return FALSE; + } + + BOOL + Intersect(const RectF &rect) + { + return Intersect(*this, *this, rect); + } + + BOOL + IntersectsWith(const RectF &rect) const + { + return GetLeft() < rect.GetRight() && GetTop() < rect.GetTop() && GetRight() > rect.GetLeft() && + GetBottom() > rect.GetTop(); + } + + BOOL + IsEmptyArea() const + { + return (Width <= REAL_EPSILON) || (Height <= REAL_EPSILON); + } + + VOID + Offset(REAL dx, REAL dy) + { + X += dx; + Y += dy; + } + + VOID + Offset(const PointF &point) + { + Offset(point.X, point.Y); + } + + static BOOL + Union(RectF &c, const RectF &a, const RectF &b) + { + // FIXME + return FALSE; + } +}; + +class Size +{ + public: + INT Width; + INT Height; + + Size() : Width(0), Height(0) + { + } + + Size(const Size &size) : Width(size.Width), Height(size.Height) + { + } + + Size(INT width, INT height) : Width(width), Height(height) + { + } + + BOOL + Empty() const + { + return Width == 0 && Height == 0; + } + + BOOL + Equals(const Size &sz) const + { + return Width == sz.Width && Height == sz.Height; + } + + Size + operator+(const Size &sz) const + { + return Size(Width + sz.Width, Height + sz.Height); + } + + Size + operator-(const Size &sz) const + { + return Size(Width - sz.Width, Height - sz.Height); + } }; -/* FIXME: missing the methods. */ class Rect { public: @@ -207,6 +448,156 @@ class Rect INT Y; INT Width; INT Height; + + Rect() : X(0), Y(0), Width(0), Height(0) + { + } + + Rect(const Point &location, const Size &size) : X(location.X), Y(location.Y), Width(size.Width), Height(size.Height) + { + } + + Rect(INT x, INT y, INT width, INT height) : X(x), Y(y), Width(width), Height(height) + { + } + + Rect * + Clone() const + { + return new Rect(X, Y, Width, Height); + } + + BOOL + Contains(const Point &pt) const + { + return Contains(pt.X, pt.Y); + } + + BOOL + Contains(const Rect &rect) const + { + return X <= rect.X && rect.GetRight() <= GetRight() && Y <= rect.Y && rect.GetBottom() <= GetBottom(); + } + + BOOL + Contains(INT x, INT y) const + { + return X <= x && x < X + Width && Y <= y && y < Y + Height; + } + + BOOL + Equals(const Rect &rect) const + { + return X == rect.X && Y == rect.Y && Width == rect.Width && Height == rect.Height; + } + + INT + GetBottom() const + { + return Y + Height; + } + + VOID + GetBounds(Rect *rect) const + { + rect->X = X; + rect->Y = Y; + rect->Width = Width; + rect->Height = Height; + } + + INT + GetLeft() const + { + return X; + } + + VOID + GetLocation(Point *point) const + { + point->X = X; + point->Y = Y; + } + + INT + GetRight() const + { + return X + Width; + } + + VOID + GetSize(Size *size) const + { + size->Width = Width; + size->Height = Height; + } + + INT + GetTop() const + { + return Y; + } + + VOID + Inflate(INT dx, INT dy) + { + X -= dx; + Y -= dy; + Width += 2 * dx; + Height += 2 * dy; + } + + VOID + Inflate(const Point &point) + { + Inflate(point.X, point.Y); + } + + static BOOL + Intersect(Rect &c, const Rect &a, const Rect &b) + { + // FIXME + return FALSE; + } + + BOOL + Intersect(const Rect &rect) + { + return Intersect(*this, *this, rect); + } + + BOOL + IntersectsWith(const Rect &rect) const + { + return GetLeft() < rect.GetRight() && GetTop() < rect.GetTop() && GetRight() > rect.GetLeft() && + GetBottom() > rect.GetTop(); + } + + BOOL + IsEmptyArea() const + { + return Width <= 0 || Height <= 0; + } + + VOID + Offset(INT dx, INT dy) + { + X += dx; + Y += dy; + } + + VOID + Offset(const Point &point) + { + Offset(point.X, point.Y); + } + + static BOOL + Union(Rect &c, const Rect &a, const Rect &b) + { + // FIXME + return FALSE; + } }; class CharacterRange @@ -236,13 +627,13 @@ class CharacterRange INT Length; }; -/* FIXME: missing the methods. */ -class SizeF +inline Point::Point(const Size &size) : X(size.Width), Y(size.Height) { - public: - REAL Width; - REAL Height; -}; +} + +inline PointF::PointF(const SizeF &size) : X(size.Width), Y(size.Height) +{ +} #else /* end of c++ typedefs */
5 years, 3 months
1
0
0
0
[reactos] 01/01: [WIN32SS][WINSRV] Add CSR API_NUMBER info comments (#2192)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f84963b0d5668a2779b34…
commit f84963b0d5668a2779b34f49dee20ac88bf9d275 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Tue Dec 31 09:21:42 2019 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Tue Dec 31 09:21:42 2019 +0900 [WIN32SS][WINSRV] Add CSR API_NUMBER info comments (#2192) Add comments to improve human-readability and referencing of CSR API. CORE-12451 --- win32ss/user/winsrv/consrv/alias.c | 6 ++++++ win32ss/user/winsrv/consrv/coninput.c | 6 ++++++ win32ss/user/winsrv/consrv/conoutput.c | 18 ++++++++++++++++++ win32ss/user/winsrv/consrv/console.c | 24 ++++++++++++++++++++++-- win32ss/user/winsrv/consrv/frontendctl.c | 19 +++++++++++++++++-- win32ss/user/winsrv/consrv/handle.c | 5 +++++ win32ss/user/winsrv/consrv/history.c | 7 +++++++ win32ss/user/winsrv/consrv/subsysreg.c | 6 ++++++ win32ss/user/winsrv/consrv_new/alias.c | 6 ++++++ win32ss/user/winsrv/consrv_new/coninput.c | 3 +++ win32ss/user/winsrv/consrv_new/conoutput.c | 17 +++++++++++++++++ win32ss/user/winsrv/consrv_new/console.c | 11 +++++++++++ win32ss/user/winsrv/consrv_new/frontendctl.c | 12 ++++++++++++ win32ss/user/winsrv/consrv_new/handle.c | 4 ++++ win32ss/user/winsrv/consrv_new/lineinput.c | 6 ++++++ 15 files changed, 146 insertions(+), 4 deletions(-) diff --git a/win32ss/user/winsrv/consrv/alias.c b/win32ss/user/winsrv/consrv/alias.c index 9a0957ba3ac..cd2f7547086 100644 --- a/win32ss/user/winsrv/consrv/alias.c +++ b/win32ss/user/winsrv/consrv/alias.c @@ -445,6 +445,7 @@ IntDeleteAllAliases(PCONSRV_CONSOLE Console) /* PUBLIC SERVER APIS *********************************************************/ +/* API_NUMBER: ConsolepAddAlias */ CSR_API(SrvAddConsoleAlias) { NTSTATUS Status; @@ -535,6 +536,7 @@ Quit: return Status; } +/* API_NUMBER: ConsolepGetAlias */ CSR_API(SrvGetConsoleAlias) { NTSTATUS Status; @@ -627,6 +629,7 @@ Quit: return Status; } +/* API_NUMBER: ConsolepGetAliases */ CSR_API(SrvGetConsoleAliases) { NTSTATUS Status; @@ -733,6 +736,7 @@ Quit: return Status; } +/* API_NUMBER: ConsolepGetAliasesLength */ CSR_API(SrvGetConsoleAliasesLength) { NTSTATUS Status; @@ -774,6 +778,7 @@ CSR_API(SrvGetConsoleAliasesLength) return Status; } +/* API_NUMBER: ConsolepGetAliasExes */ CSR_API(SrvGetConsoleAliasExes) { NTSTATUS Status; @@ -861,6 +866,7 @@ Quit: return Status; } +/* API_NUMBER: ConsolepGetAliasExesLength */ CSR_API(SrvGetConsoleAliasExesLength) { NTSTATUS Status; diff --git a/win32ss/user/winsrv/consrv/coninput.c b/win32ss/user/winsrv/consrv/coninput.c index e7ee44d5ee2..9c441577a07 100644 --- a/win32ss/user/winsrv/consrv/coninput.c +++ b/win32ss/user/winsrv/consrv/coninput.c @@ -548,6 +548,7 @@ ReadInputBuffer(IN PGET_INPUT_INFO InputInfo, /* PUBLIC SERVER APIS *********************************************************/ +/* API_NUMBER: ConsolepReadConsole */ CSR_API(SrvReadConsole) { NTSTATUS Status; @@ -605,6 +606,7 @@ CSR_API(SrvReadConsole) return Status; } +/* API_NUMBER: ConsolepGetConsoleInput */ CSR_API(SrvGetConsoleInput) { NTSTATUS Status; @@ -669,6 +671,8 @@ ConDrvWriteConsoleInput(IN PCONSOLE Console, IN ULONG NumEventsToWrite, OUT PULONG NumEventsWritten OPTIONAL); #endif + +/* API_NUMBER: ConsolepWriteConsoleInput */ CSR_API(SrvWriteConsoleInput) { NTSTATUS Status; @@ -752,6 +756,7 @@ CSR_API(SrvWriteConsoleInput) NTSTATUS NTAPI ConDrvFlushConsoleInputBuffer(IN PCONSOLE Console, IN PCONSOLE_INPUT_BUFFER InputBuffer); +/* API_NUMBER: ConsolepFlushInputBuffer */ CSR_API(SrvFlushConsoleInputBuffer) { NTSTATUS Status; @@ -776,6 +781,7 @@ NTSTATUS NTAPI ConDrvGetConsoleNumberOfInputEvents(IN PCONSOLE Console, IN PCONSOLE_INPUT_BUFFER InputBuffer, OUT PULONG NumberOfEvents); +/* API_NUMBER: ConsolepGetNumberOfInputEvents */ CSR_API(SrvGetConsoleNumberOfInputEvents) { NTSTATUS Status; diff --git a/win32ss/user/winsrv/consrv/conoutput.c b/win32ss/user/winsrv/consrv/conoutput.c index 1a547696892..b09e7012bdc 100644 --- a/win32ss/user/winsrv/consrv/conoutput.c +++ b/win32ss/user/winsrv/consrv/conoutput.c @@ -30,6 +30,7 @@ NTSTATUS NTAPI ConDrvInvalidateBitMapRect(IN PCONSOLE Console, IN PCONSOLE_SCREEN_BUFFER Buffer, IN PSMALL_RECT Region); +/* API_NUMBER: ConsolepInvalidateBitMapRect */ CSR_API(SrvInvalidateBitMapRect) { NTSTATUS Status; @@ -69,6 +70,7 @@ ConDrvSetConsolePalette(IN PCONSOLE Console, IN PCONSOLE_SCREEN_BUFFER Buffer, IN HPALETTE PaletteHandle, IN UINT PaletteUsage); +/* API_NUMBER: ConsolepSetPalette */ CSR_API(SrvSetConsolePalette) { NTSTATUS Status; @@ -116,6 +118,7 @@ NTSTATUS NTAPI ConDrvGetConsoleCursorInfo(IN PCONSOLE Console, IN PTEXTMODE_SCREEN_BUFFER Buffer, OUT PCONSOLE_CURSOR_INFO CursorInfo); +/* API_NUMBER: ConsolepGetCursorInfo */ CSR_API(SrvGetConsoleCursorInfo) { NTSTATUS Status; @@ -141,6 +144,7 @@ NTSTATUS NTAPI ConDrvSetConsoleCursorInfo(IN PCONSOLE Console, IN PTEXTMODE_SCREEN_BUFFER Buffer, IN PCONSOLE_CURSOR_INFO CursorInfo); +/* API_NUMBER: ConsolepSetCursorInfo */ CSR_API(SrvSetConsoleCursorInfo) { NTSTATUS Status; @@ -166,6 +170,7 @@ NTSTATUS NTAPI ConDrvSetConsoleCursorPosition(IN PCONSOLE Console, IN PTEXTMODE_SCREEN_BUFFER Buffer, IN PCOORD Position); +/* API_NUMBER: ConsolepSetCursorPosition */ CSR_API(SrvSetConsoleCursorPosition) { NTSTATUS Status; @@ -187,6 +192,7 @@ CSR_API(SrvSetConsoleCursorPosition) return Status; } +/* API_NUMBER: ConsolepCreateScreenBuffer */ CSR_API(SrvCreateConsoleScreenBuffer) { NTSTATUS Status = STATUS_INVALID_PARAMETER; @@ -316,6 +322,7 @@ Quit: NTSTATUS NTAPI ConDrvSetConsoleActiveScreenBuffer(IN PCONSOLE Console, IN PCONSOLE_SCREEN_BUFFER Buffer); +/* API_NUMBER: ConsolepSetActiveScreenBuffer */ CSR_API(SrvSetConsoleActiveScreenBuffer) { NTSTATUS Status; @@ -478,6 +485,7 @@ ConDrvReadConsoleOutput(IN PCONSOLE Console, IN BOOLEAN Unicode, OUT PCHAR_INFO CharInfo/*Buffer*/, IN OUT PSMALL_RECT ReadRegion); +/* API_NUMBER: ConsolepReadConsoleOutput */ CSR_API(SrvReadConsoleOutput) { NTSTATUS Status; @@ -541,6 +549,7 @@ ConDrvWriteConsoleOutput(IN PCONSOLE Console, IN BOOLEAN Unicode, IN PCHAR_INFO CharInfo/*Buffer*/, IN OUT PSMALL_RECT WriteRegion); +/* API_NUMBER: ConsolepWriteConsoleOutput */ CSR_API(SrvWriteConsoleOutput) { NTSTATUS Status; @@ -639,6 +648,7 @@ Quit: return Status; } +/* API_NUMBER: ConsolepWriteConsole */ CSR_API(SrvWriteConsole) { NTSTATUS Status; @@ -688,6 +698,7 @@ ConDrvReadConsoleOutputString(IN PCONSOLE Console, IN PCOORD ReadCoord, // OUT PCOORD EndCoord, OUT PULONG NumCodesRead OPTIONAL); +/* API_NUMBER: ConsolepReadConsoleOutputString */ CSR_API(SrvReadConsoleOutputString) { NTSTATUS Status; @@ -776,6 +787,7 @@ ConDrvWriteConsoleOutputString(IN PCONSOLE Console, IN PCOORD WriteCoord, // OUT PCOORD EndCoord, OUT PULONG NumCodesWritten OPTIONAL); +/* API_NUMBER: ConsolepWriteConsoleOutputString */ CSR_API(SrvWriteConsoleOutputString) { NTSTATUS Status; @@ -863,6 +875,7 @@ ConDrvFillConsoleOutput(IN PCONSOLE Console, IN ULONG NumCodesToWrite, IN PCOORD WriteCoord, OUT PULONG NumCodesWritten OPTIONAL); +/* API_NUMBER: ConsolepFillConsoleOutput */ CSR_API(SrvFillConsoleOutput) { NTSTATUS Status; @@ -909,6 +922,7 @@ ConDrvGetConsoleScreenBufferInfo(IN PCONSOLE Console, OUT PCOORD ViewSize, OUT PCOORD MaximumViewSize, OUT PWORD Attributes); +/* API_NUMBER: ConsolepGetScreenBufferInfo */ CSR_API(SrvGetConsoleScreenBufferInfo) { NTSTATUS Status; @@ -939,6 +953,7 @@ NTSTATUS NTAPI ConDrvSetConsoleTextAttribute(IN PCONSOLE Console, IN PTEXTMODE_SCREEN_BUFFER Buffer, IN WORD Attributes); +/* API_NUMBER: ConsolepSetTextAttribute */ CSR_API(SrvSetConsoleTextAttribute) { NTSTATUS Status; @@ -964,6 +979,7 @@ NTSTATUS NTAPI ConDrvSetConsoleScreenBufferSize(IN PCONSOLE Console, IN PTEXTMODE_SCREEN_BUFFER Buffer, IN PCOORD Size); +/* API_NUMBER: ConsolepSetScreenBufferSize */ CSR_API(SrvSetConsoleScreenBufferSize) { NTSTATUS Status; @@ -994,6 +1010,7 @@ ConDrvScrollConsoleScreenBuffer(IN PCONSOLE Console, IN PSMALL_RECT ClipRectangle OPTIONAL, IN PCOORD DestinationOrigin, IN CHAR_INFO FillChar); +/* API_NUMBER: ConsolepScrollScreenBuffer */ CSR_API(SrvScrollConsoleScreenBuffer) { NTSTATUS Status; @@ -1025,6 +1042,7 @@ ConDrvSetConsoleWindowInfo(IN PCONSOLE Console, IN PTEXTMODE_SCREEN_BUFFER Buffer, IN BOOLEAN Absolute, IN PSMALL_RECT WindowRect); +/* API_NUMBER: ConsolepSetWindowInfo */ CSR_API(SrvSetConsoleWindowInfo) { NTSTATUS Status; diff --git a/win32ss/user/winsrv/consrv/console.c b/win32ss/user/winsrv/consrv/console.c index e28c8a2a52d..80a2f4c0f23 100644 --- a/win32ss/user/winsrv/consrv/console.c +++ b/win32ss/user/winsrv/consrv/console.c @@ -983,6 +983,7 @@ ConSrvSetConsoleProcessFocus(IN PCONSRV_CONSOLE Console, /* PUBLIC SERVER APIS *********************************************************/ +/* API_NUMBER: ConsolepAlloc */ CSR_API(SrvAllocConsole) { NTSTATUS Status = STATUS_SUCCESS; @@ -1052,6 +1053,7 @@ CSR_API(SrvAllocConsole) return STATUS_SUCCESS; } +/* API_NUMBER: ConsolepAttach */ CSR_API(SrvAttachConsole) { NTSTATUS Status = STATUS_SUCCESS; @@ -1139,6 +1141,7 @@ Quit: return Status; } +/* API_NUMBER: ConsolepFree */ CSR_API(SrvFreeConsole) { return ConSrvRemoveConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process)); @@ -1148,6 +1151,7 @@ NTSTATUS NTAPI ConDrvGetConsoleMode(IN PCONSOLE Console, IN PCONSOLE_IO_OBJECT Object, OUT PULONG ConsoleMode); +/* API_NUMBER: ConsolepGetMode */ CSR_API(SrvGetConsoleMode) { NTSTATUS Status; @@ -1191,6 +1195,7 @@ NTSTATUS NTAPI ConDrvSetConsoleMode(IN PCONSOLE Console, IN PCONSOLE_IO_OBJECT Object, IN ULONG ConsoleMode); +/* API_NUMBER: ConsolepSetMode */ CSR_API(SrvSetConsoleMode) { #define CONSOLE_VALID_CONTROL_MODES ( ENABLE_EXTENDED_FLAGS | \ @@ -1244,6 +1249,7 @@ CSR_API(SrvSetConsoleMode) return Status; } +/* API_NUMBER: ConsolepGetTitle */ CSR_API(SrvGetConsoleTitle) { NTSTATUS Status; @@ -1303,6 +1309,7 @@ CSR_API(SrvGetConsoleTitle) return Status; } +/* API_NUMBER: ConsolepSetTitle */ CSR_API(SrvSetConsoleTitle) { NTSTATUS Status; @@ -1385,6 +1392,7 @@ NTSTATUS NTAPI ConDrvGetConsoleCP(IN PCONSOLE Console, OUT PUINT CodePage, IN BOOLEAN OutputCP); +/* API_NUMBER: ConsolepGetCP */ CSR_API(SrvGetConsoleCP) { NTSTATUS Status; @@ -1409,6 +1417,7 @@ NTSTATUS NTAPI ConDrvSetConsoleCP(IN PCONSOLE Console, IN UINT CodePage, IN BOOLEAN OutputCP); +/* API_NUMBER: ConsolepSetCP */ CSR_API(SrvSetConsoleCP) { NTSTATUS Status = STATUS_INVALID_PARAMETER; @@ -1429,6 +1438,7 @@ CSR_API(SrvSetConsoleCP) return Status; } +/* API_NUMBER: ConsolepGetProcessList */ CSR_API(SrvGetConsoleProcessList) { NTSTATUS Status; @@ -1455,6 +1465,7 @@ CSR_API(SrvGetConsoleProcessList) return Status; } +/* API_NUMBER: ConsolepGenerateCtrlEvent */ CSR_API(SrvGenerateConsoleCtrlEvent) { NTSTATUS Status; @@ -1472,6 +1483,7 @@ CSR_API(SrvGenerateConsoleCtrlEvent) return Status; } +/* API_NUMBER: ConsolepNotifyLastClose */ CSR_API(SrvConsoleNotifyLastClose) { NTSTATUS Status; @@ -1497,8 +1509,7 @@ CSR_API(SrvConsoleNotifyLastClose) return Status; } - - +/* API_NUMBER: ConsolepGetMouseInfo */ CSR_API(SrvGetConsoleMouseInfo) { NTSTATUS Status; @@ -1515,12 +1526,14 @@ CSR_API(SrvGetConsoleMouseInfo) return STATUS_SUCCESS; } +/* API_NUMBER: ConsolepSetKeyShortcuts */ CSR_API(SrvSetConsoleKeyShortcuts) { DPRINT1("%s not yet implemented\n", __FUNCTION__); return STATUS_NOT_IMPLEMENTED; } +/* API_NUMBER: ConsolepGetKeyboardLayoutName */ CSR_API(SrvGetConsoleKeyboardLayoutName) { NTSTATUS Status; @@ -1540,42 +1553,49 @@ CSR_API(SrvGetConsoleKeyboardLayoutName) return STATUS_SUCCESS; } +/* API_NUMBER: ConsolepCharType */ CSR_API(SrvGetConsoleCharType) { DPRINT1("%s not yet implemented\n", __FUNCTION__); return STATUS_NOT_IMPLEMENTED; } +/* API_NUMBER: ConsolepSetLocalEUDC */ CSR_API(SrvSetConsoleLocalEUDC) { DPRINT1("%s not yet implemented\n", __FUNCTION__); return STATUS_NOT_IMPLEMENTED; } +/* API_NUMBER: ConsolepSetCursorMode */ CSR_API(SrvSetConsoleCursorMode) { DPRINT1("%s not yet implemented\n", __FUNCTION__); return STATUS_NOT_IMPLEMENTED; } +/* API_NUMBER: ConsolepGetCursorMode */ CSR_API(SrvGetConsoleCursorMode) { DPRINT1("%s not yet implemented\n", __FUNCTION__); return STATUS_NOT_IMPLEMENTED; } +/* API_NUMBER: ConsolepGetNlsMode */ CSR_API(SrvGetConsoleNlsMode) { DPRINT1("%s not yet implemented\n", __FUNCTION__); return STATUS_NOT_IMPLEMENTED; } +/* API_NUMBER: ConsolepSetNlsMode */ CSR_API(SrvSetConsoleNlsMode) { DPRINT1("%s not yet implemented\n", __FUNCTION__); return STATUS_NOT_IMPLEMENTED; } +/* API_NUMBER: ConsolepGetLangId */ CSR_API(SrvGetConsoleLangId) { DPRINT1("%s not yet implemented\n", __FUNCTION__); diff --git a/win32ss/user/winsrv/consrv/frontendctl.c b/win32ss/user/winsrv/consrv/frontendctl.c index 18ef2edd518..b0a47961857 100644 --- a/win32ss/user/winsrv/consrv/frontendctl.c +++ b/win32ss/user/winsrv/consrv/frontendctl.c @@ -52,6 +52,7 @@ SetConsoleHardwareState(PCONSRV_CONSOLE Console, ULONG ConsoleHwState) } #endif +/* API_NUMBER: ConsolepGetHardwareState */ CSR_API(SrvGetConsoleHardwareState) { #if 0 @@ -82,6 +83,7 @@ CSR_API(SrvGetConsoleHardwareState) #endif } +/* API_NUMBER: ConsolepSetHardwareState */ CSR_API(SrvSetConsoleHardwareState) { #if 0 @@ -113,6 +115,7 @@ CSR_API(SrvSetConsoleHardwareState) #endif } +/* API_NUMBER: ConsolepGetDisplayMode */ CSR_API(SrvGetConsoleDisplayMode) { NTSTATUS Status; @@ -129,6 +132,7 @@ CSR_API(SrvGetConsoleDisplayMode) return STATUS_SUCCESS; } +/* API_NUMBER: ConsolepSetDisplayMode */ CSR_API(SrvSetConsoleDisplayMode) { NTSTATUS Status; @@ -159,6 +163,7 @@ CSR_API(SrvSetConsoleDisplayMode) return Status; } +/* API_NUMBER: ConsolepGetLargestWindowSize */ CSR_API(SrvGetLargestConsoleWindowSize) { NTSTATUS Status; @@ -186,6 +191,7 @@ CSR_API(SrvGetLargestConsoleWindowSize) return STATUS_SUCCESS; } +/* API_NUMBER: ConsolepShowCursor */ CSR_API(SrvShowConsoleCursor) { NTSTATUS Status; @@ -208,6 +214,7 @@ CSR_API(SrvShowConsoleCursor) return STATUS_SUCCESS; } +/* API_NUMBER: ConsolepSetCursor */ CSR_API(SrvSetConsoleCursor) { NTSTATUS Status; @@ -234,6 +241,7 @@ CSR_API(SrvSetConsoleCursor) return (Success ? STATUS_SUCCESS : STATUS_UNSUCCESSFUL); } +/* API_NUMBER: ConsolepMenuControl */ CSR_API(SrvConsoleMenuControl) { NTSTATUS Status; @@ -258,6 +266,7 @@ CSR_API(SrvConsoleMenuControl) return STATUS_SUCCESS; } +/* API_NUMBER: ConsolepSetMenuClose */ CSR_API(SrvSetConsoleMenuClose) { NTSTATUS Status; @@ -311,6 +320,7 @@ GetThreadConsoleDesktop( return STATUS_SUCCESS; } +/* API_NUMBER: ConsolepGetConsoleWindow */ CSR_API(SrvGetConsoleWindow) { NTSTATUS Status; @@ -327,6 +337,7 @@ CSR_API(SrvGetConsoleWindow) return STATUS_SUCCESS; } +/* API_NUMBER: ConsolepSetIcon */ CSR_API(SrvSetConsoleIcon) { NTSTATUS Status; @@ -345,6 +356,7 @@ CSR_API(SrvSetConsoleIcon) return Status; } +/* API_NUMBER: ConsolepGetSelectionInfo */ CSR_API(SrvGetConsoleSelectionInfo) { NTSTATUS Status; @@ -363,8 +375,7 @@ CSR_API(SrvGetConsoleSelectionInfo) return Status; } - - +/* API_NUMBER: ConsolepGetNumberOfFonts */ CSR_API(SrvGetConsoleNumberOfFonts) { NTSTATUS Status; @@ -384,6 +395,7 @@ CSR_API(SrvGetConsoleNumberOfFonts) return STATUS_SUCCESS; } +/* API_NUMBER: ConsolepGetFontInfo */ CSR_API(SrvGetConsoleFontInfo) { NTSTATUS Status; @@ -408,6 +420,7 @@ CSR_API(SrvGetConsoleFontInfo) return STATUS_SUCCESS; } +/* API_NUMBER: ConsolepGetFontSize */ CSR_API(SrvGetConsoleFontSize) { NTSTATUS Status; @@ -431,6 +444,7 @@ CSR_API(SrvGetConsoleFontSize) return STATUS_SUCCESS; } +/* API_NUMBER: ConsolepGetCurrentFont */ CSR_API(SrvGetConsoleCurrentFont) { NTSTATUS Status; @@ -455,6 +469,7 @@ CSR_API(SrvGetConsoleCurrentFont) return STATUS_SUCCESS; } +/* API_NUMBER: ConsolepSetFont */ CSR_API(SrvSetConsoleFont) { NTSTATUS Status; diff --git a/win32ss/user/winsrv/consrv/handle.c b/win32ss/user/winsrv/consrv/handle.c index 125dfab6753..a9552af7f13 100644 --- a/win32ss/user/winsrv/consrv/handle.c +++ b/win32ss/user/winsrv/consrv/handle.c @@ -871,6 +871,7 @@ CSR_API(SrvOpenConsole) return Status; } +/* API_NUMBER: ConsolepDuplicateHandle */ CSR_API(SrvDuplicateHandle) { NTSTATUS Status; @@ -944,6 +945,7 @@ Quit: return Status; } +/* API_NUMBER: ConsolepGetHandleInformation */ CSR_API(SrvGetHandleInformation) { NTSTATUS Status; @@ -992,6 +994,7 @@ Quit: return Status; } +/* API_NUMBER: ConsolepSetHandleInformation */ CSR_API(SrvSetHandleInformation) { NTSTATUS Status; @@ -1042,6 +1045,7 @@ Quit: return Status; } +/* API_NUMBER: ConsolepCloseHandle */ CSR_API(SrvCloseHandle) { NTSTATUS Status; @@ -1062,6 +1066,7 @@ CSR_API(SrvCloseHandle) return Status; } +/* API_NUMBER: ConsolepVerifyIoHandle */ CSR_API(SrvVerifyConsoleIoHandle) { NTSTATUS Status; diff --git a/win32ss/user/winsrv/consrv/history.c b/win32ss/user/winsrv/consrv/history.c index 6d2049f08ba..7e28aa83247 100644 --- a/win32ss/user/winsrv/consrv/history.c +++ b/win32ss/user/winsrv/consrv/history.c @@ -326,6 +326,7 @@ HistoryDeleteBuffers(PCONSRV_CONSOLE Console) /* PUBLIC SERVER APIS *********************************************************/ +/* API_NUMBER: ConsolepGetCommandHistory */ CSR_API(SrvGetConsoleCommandHistory) { NTSTATUS Status; @@ -415,6 +416,7 @@ CSR_API(SrvGetConsoleCommandHistory) return Status; } +/* API_NUMBER: ConsolepGetCommandHistoryLength */ CSR_API(SrvGetConsoleCommandHistoryLength) { NTSTATUS Status; @@ -458,6 +460,7 @@ CSR_API(SrvGetConsoleCommandHistoryLength) return Status; } +/* API_NUMBER: ConsolepExpungeCommandHistory */ CSR_API(SrvExpungeConsoleCommandHistory) { NTSTATUS Status; @@ -487,6 +490,7 @@ CSR_API(SrvExpungeConsoleCommandHistory) return Status; } +/* API_NUMBER: ConsolepSetNumberOfCommands */ CSR_API(SrvSetConsoleNumberOfCommands) { NTSTATUS Status; @@ -539,6 +543,7 @@ CSR_API(SrvSetConsoleNumberOfCommands) return Status; } +/* API_NUMBER: ConsolepGetHistory */ CSR_API(SrvGetConsoleHistory) { #if 0 // Vista+ @@ -560,6 +565,7 @@ CSR_API(SrvGetConsoleHistory) #endif } +/* API_NUMBER: ConsolepSetHistory */ CSR_API(SrvSetConsoleHistory) { #if 0 // Vista+ @@ -581,6 +587,7 @@ CSR_API(SrvSetConsoleHistory) #endif } +/* API_NUMBER: ConsolepSetCommandHistoryMode */ CSR_API(SrvSetConsoleCommandHistoryMode) { NTSTATUS Status; diff --git a/win32ss/user/winsrv/consrv/subsysreg.c b/win32ss/user/winsrv/consrv/subsysreg.c index 9dd14a25ddc..18e54ef19a5 100644 --- a/win32ss/user/winsrv/consrv/subsysreg.c +++ b/win32ss/user/winsrv/consrv/subsysreg.c @@ -19,6 +19,7 @@ * VDM Subsystem */ +/* API_NUMBER: ConsolepRegisterVDM */ CSR_API(SrvRegisterConsoleVDM) { NTSTATUS Status; @@ -149,6 +150,7 @@ Quit: return Status; } +/* API_NUMBER: ConsolepVDMOperation */ CSR_API(SrvVDMConsoleOperation) { DPRINT1("%s not yet implemented\n", __FUNCTION__); @@ -160,12 +162,14 @@ CSR_API(SrvVDMConsoleOperation) * OS/2 Subsystem */ +/* API_NUMBER: ConsolepRegisterOS2 */ CSR_API(SrvRegisterConsoleOS2) { DPRINT1("%s not yet implemented\n", __FUNCTION__); return STATUS_NOT_IMPLEMENTED; } +/* API_NUMBER: ConsolepSetOS2OemFormat */ CSR_API(SrvSetConsoleOS2OemFormat) { DPRINT1("%s not yet implemented\n", __FUNCTION__); @@ -177,12 +181,14 @@ CSR_API(SrvSetConsoleOS2OemFormat) * IME Subsystem */ +/* API_NUMBER: ConsolepRegisterConsoleIME */ CSR_API(SrvRegisterConsoleIME) { DPRINT1("%s not yet implemented\n", __FUNCTION__); return STATUS_NOT_IMPLEMENTED; } +/* API_NUMBER: ConsolepUnregisterConsoleIME */ CSR_API(SrvUnregisterConsoleIME) { DPRINT1("%s not yet implemented\n", __FUNCTION__); diff --git a/win32ss/user/winsrv/consrv_new/alias.c b/win32ss/user/winsrv/consrv_new/alias.c index c705b67b382..d435bcce50f 100644 --- a/win32ss/user/winsrv/consrv_new/alias.c +++ b/win32ss/user/winsrv/consrv_new/alias.c @@ -275,6 +275,7 @@ IntDeleteAllAliases(PCONSOLE Console) /* PUBLIC SERVER APIS *********************************************************/ +/* API_NUMBER: ConsolepAddAlias */ CSR_API(SrvAddConsoleAlias) { PCONSOLE_ADDGETALIAS ConsoleAliasRequest = &((PCONSOLE_API_MESSAGE)ApiMessage)->Data.ConsoleAliasRequest; @@ -359,6 +360,7 @@ CSR_API(SrvAddConsoleAlias) return STATUS_SUCCESS; } +/* API_NUMBER: ConsolepGetAlias */ CSR_API(SrvGetConsoleAlias) { PCONSOLE_ADDGETALIAS ConsoleAliasRequest = &((PCONSOLE_API_MESSAGE)ApiMessage)->Data.ConsoleAliasRequest; @@ -432,6 +434,7 @@ CSR_API(SrvGetConsoleAlias) return STATUS_SUCCESS; } +/* API_NUMBER: ConsolepGetAliases */ CSR_API(SrvGetConsoleAliases) { PCONSOLE_GETALLALIASES GetAllAliasesRequest = &((PCONSOLE_API_MESSAGE)ApiMessage)->Data.GetAllAliasesRequest; @@ -484,6 +487,7 @@ CSR_API(SrvGetConsoleAliases) return STATUS_SUCCESS; } +/* API_NUMBER: ConsolepGetAliasesLength */ CSR_API(SrvGetConsoleAliasesLength) { PCONSOLE_GETALLALIASESLENGTH GetAllAliasesLengthRequest = &((PCONSOLE_API_MESSAGE)ApiMessage)->Data.GetAllAliasesLengthRequest; @@ -523,6 +527,7 @@ CSR_API(SrvGetConsoleAliasesLength) return STATUS_SUCCESS; } +/* API_NUMBER: ConsolepGetAliasExes */ CSR_API(SrvGetConsoleAliasExes) { PCONSOLE_GETALIASESEXES GetAliasesExesRequest = &((PCONSOLE_API_MESSAGE)ApiMessage)->Data.GetAliasesExesRequest; @@ -569,6 +574,7 @@ CSR_API(SrvGetConsoleAliasExes) return STATUS_SUCCESS; } +/* API_NUMBER: ConsolepGetAliasExesLength */ CSR_API(SrvGetConsoleAliasExesLength) { PCONSOLE_GETALIASESEXESLENGTH GetAliasesExesLengthRequest = &((PCONSOLE_API_MESSAGE)ApiMessage)->Data.GetAliasesExesLengthRequest; diff --git a/win32ss/user/winsrv/consrv_new/coninput.c b/win32ss/user/winsrv/consrv_new/coninput.c index 1208ef58149..2516df2e047 100644 --- a/win32ss/user/winsrv/consrv_new/coninput.c +++ b/win32ss/user/winsrv/consrv_new/coninput.c @@ -301,6 +301,7 @@ ReadInputBuffer(IN PGET_INPUT_INFO InputInfo, /* PUBLIC SERVER APIS *********************************************************/ +/* API_NUMBER: ConsolepReadConsole */ CSR_API(SrvReadConsole) { NTSTATUS Status; @@ -431,6 +432,7 @@ CSR_API(SrvWriteConsoleInput) NTSTATUS NTAPI ConDrvFlushConsoleInputBuffer(IN PCONSOLE Console, IN PCONSOLE_INPUT_BUFFER InputBuffer); +/* API_NUMBER: ConsolepFlushInputBuffer */ CSR_API(SrvFlushConsoleInputBuffer) { NTSTATUS Status; @@ -455,6 +457,7 @@ NTSTATUS NTAPI ConDrvGetConsoleNumberOfInputEvents(IN PCONSOLE Console, IN PCONSOLE_INPUT_BUFFER InputBuffer, OUT PULONG NumEvents); +/* API_NUMBER: ConsolepGetNumberOfInputEvents */ CSR_API(SrvGetConsoleNumberOfInputEvents) { NTSTATUS Status; diff --git a/win32ss/user/winsrv/consrv_new/conoutput.c b/win32ss/user/winsrv/consrv_new/conoutput.c index e12f3828e91..c79dc682005 100644 --- a/win32ss/user/winsrv/consrv_new/conoutput.c +++ b/win32ss/user/winsrv/consrv_new/conoutput.c @@ -29,6 +29,7 @@ NTSTATUS NTAPI ConDrvInvalidateBitMapRect(IN PCONSOLE Console, IN PCONSOLE_SCREEN_BUFFER Buffer, IN PSMALL_RECT Region); +/* API_NUMBER: ConsolepInvalidateBitMapRect */ CSR_API(SrvInvalidateBitMapRect) { NTSTATUS Status; @@ -54,6 +55,7 @@ NTSTATUS NTAPI ConDrvGetConsoleCursorInfo(IN PCONSOLE Console, IN PTEXTMODE_SCREEN_BUFFER Buffer, OUT PCONSOLE_CURSOR_INFO CursorInfo); +/* API_NUMBER: ConsolepGetCursorInfo */ CSR_API(SrvGetConsoleCursorInfo) { NTSTATUS Status; @@ -79,6 +81,7 @@ NTSTATUS NTAPI ConDrvSetConsoleCursorInfo(IN PCONSOLE Console, IN PTEXTMODE_SCREEN_BUFFER Buffer, IN PCONSOLE_CURSOR_INFO CursorInfo); +/* API_NUMBER: ConsolepSetCursorInfo */ CSR_API(SrvSetConsoleCursorInfo) { NTSTATUS Status; @@ -104,6 +107,7 @@ NTSTATUS NTAPI ConDrvSetConsoleCursorPosition(IN PCONSOLE Console, IN PTEXTMODE_SCREEN_BUFFER Buffer, IN PCOORD Position); +/* API_NUMBER: ConsolepSetCursorPosition */ CSR_API(SrvSetConsoleCursorPosition) { NTSTATUS Status; @@ -125,6 +129,7 @@ CSR_API(SrvSetConsoleCursorPosition) return Status; } +/* API_NUMBER: ConsolepCreateScreenBuffer */ CSR_API(SrvCreateConsoleScreenBuffer) { NTSTATUS Status = STATUS_INVALID_PARAMETER; @@ -248,6 +253,7 @@ Quit: NTSTATUS NTAPI ConDrvSetConsoleActiveScreenBuffer(IN PCONSOLE Console, IN PCONSOLE_SCREEN_BUFFER Buffer); +/* API_NUMBER: ConsolepSetActiveScreenBuffer */ CSR_API(SrvSetConsoleActiveScreenBuffer) { NTSTATUS Status; @@ -379,6 +385,7 @@ ConDrvReadConsoleOutput(IN PCONSOLE Console, IN PCOORD BufferSize, IN PCOORD BufferCoord, IN OUT PSMALL_RECT ReadRegion); +/* API_NUMBER: ConsolepReadConsoleOutput */ CSR_API(SrvReadConsoleOutput) { NTSTATUS Status; @@ -420,6 +427,7 @@ ConDrvWriteConsoleOutput(IN PCONSOLE Console, IN PCOORD BufferSize, IN PCOORD BufferCoord, IN OUT PSMALL_RECT WriteRegion); +/* API_NUMBER: ConsolepWriteConsoleOutput */ CSR_API(SrvWriteConsoleOutput) { NTSTATUS Status; @@ -453,6 +461,7 @@ CSR_API(SrvWriteConsoleOutput) return Status; } +/* API_NUMBER: ConsolepWriteConsole */ CSR_API(SrvWriteConsole) { NTSTATUS Status; @@ -486,6 +495,7 @@ ConDrvReadConsoleOutputString(IN PCONSOLE Console, IN PCOORD ReadCoord, OUT PCOORD EndCoord, OUT PULONG CodesRead); +/* API_NUMBER: ConsolepReadConsoleOutputString */ CSR_API(SrvReadConsoleOutputString) { NTSTATUS Status; @@ -548,6 +558,7 @@ ConDrvWriteConsoleOutputString(IN PCONSOLE Console, IN PCOORD WriteCoord /*, OUT PCOORD EndCoord, OUT PULONG CodesWritten */); +/* API_NUMBER: ConsolepWriteConsoleOutputString */ CSR_API(SrvWriteConsoleOutputString) { NTSTATUS Status; @@ -611,6 +622,7 @@ ConDrvFillConsoleOutput(IN PCONSOLE Console, IN ULONG NumCodesToWrite, IN PCOORD WriteCoord /*, OUT PULONG CodesWritten */); +/* API_NUMBER: ConsolepFillConsoleOutput */ CSR_API(SrvFillConsoleOutput) { NTSTATUS Status; @@ -650,6 +662,7 @@ NTSTATUS NTAPI ConDrvGetConsoleScreenBufferInfo(IN PCONSOLE Console, IN PTEXTMODE_SCREEN_BUFFER Buffer, OUT PCONSOLE_SCREEN_BUFFER_INFO ScreenBufferInfo); +/* API_NUMBER: ConsolepGetScreenBufferInfo */ CSR_API(SrvGetConsoleScreenBufferInfo) { NTSTATUS Status; @@ -675,6 +688,7 @@ NTSTATUS NTAPI ConDrvSetConsoleTextAttribute(IN PCONSOLE Console, IN PTEXTMODE_SCREEN_BUFFER Buffer, IN WORD Attribute); +/* API_NUMBER: ConsolepSetTextAttribute */ CSR_API(SrvSetConsoleTextAttribute) { NTSTATUS Status; @@ -700,6 +714,7 @@ NTSTATUS NTAPI ConDrvSetConsoleScreenBufferSize(IN PCONSOLE Console, IN PTEXTMODE_SCREEN_BUFFER Buffer, IN PCOORD Size); +/* API_NUMBER: ConsolepSetScreenBufferSize */ CSR_API(SrvSetConsoleScreenBufferSize) { NTSTATUS Status; @@ -730,6 +745,7 @@ ConDrvScrollConsoleScreenBuffer(IN PCONSOLE Console, IN PSMALL_RECT ClipRectangle OPTIONAL, IN PCOORD DestinationOrigin, IN CHAR_INFO FillChar); +/* API_NUMBER: ConsolepScrollScreenBuffer */ CSR_API(SrvScrollConsoleScreenBuffer) { NTSTATUS Status; @@ -761,6 +777,7 @@ ConDrvSetConsoleWindowInfo(IN PCONSOLE Console, IN PTEXTMODE_SCREEN_BUFFER Buffer, IN BOOLEAN Absolute, IN PSMALL_RECT WindowRect); +/* API_NUMBER: ConsolepSetWindowInfo */ CSR_API(SrvSetConsoleWindowInfo) { NTSTATUS Status; diff --git a/win32ss/user/winsrv/consrv_new/console.c b/win32ss/user/winsrv/consrv_new/console.c index da1cc4a5e96..55177b55d8e 100644 --- a/win32ss/user/winsrv/consrv_new/console.c +++ b/win32ss/user/winsrv/consrv_new/console.c @@ -309,6 +309,7 @@ ConSrvDeleteConsole(PCONSOLE Console) /* PUBLIC SERVER APIS *********************************************************/ +/* API_NUMBER: ConsolepAlloc */ CSR_API(SrvAllocConsole) { NTSTATUS Status = STATUS_SUCCESS; @@ -353,6 +354,7 @@ CSR_API(SrvAllocConsole) return STATUS_SUCCESS; } +/* API_NUMBER: ConsolepAttach */ CSR_API(SrvAttachConsole) { NTSTATUS Status = STATUS_SUCCESS; @@ -435,6 +437,7 @@ Quit: return Status; } +/* API_NUMBER: ConsolepFree */ CSR_API(SrvFreeConsole) { ConSrvRemoveConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process)); @@ -445,6 +448,7 @@ NTSTATUS NTAPI ConDrvGetConsoleMode(IN PCONSOLE Console, IN PCONSOLE_IO_OBJECT Object, OUT PULONG ConsoleMode); +/* API_NUMBER: ConsolepGetMode */ CSR_API(SrvGetConsoleMode) { NTSTATUS Status; @@ -467,6 +471,7 @@ NTSTATUS NTAPI ConDrvSetConsoleMode(IN PCONSOLE Console, IN PCONSOLE_IO_OBJECT Object, IN ULONG ConsoleMode); +/* API_NUMBER: ConsolepSetMode */ CSR_API(SrvSetConsoleMode) { NTSTATUS Status; @@ -489,6 +494,7 @@ NTSTATUS NTAPI ConDrvGetConsoleTitle(IN PCONSOLE Console, IN OUT PWCHAR Title, IN OUT PULONG BufLength); +/* API_NUMBER: ConsolepGetTitle */ CSR_API(SrvGetConsoleTitle) { NTSTATUS Status; @@ -522,6 +528,7 @@ NTSTATUS NTAPI ConDrvSetConsoleTitle(IN PCONSOLE Console, IN PWCHAR Title, IN ULONG BufLength); +/* API_NUMBER: ConsolepSetTitle */ CSR_API(SrvSetConsoleTitle) { NTSTATUS Status; @@ -557,6 +564,7 @@ NTSTATUS NTAPI ConDrvGetConsoleCP(IN PCONSOLE Console, OUT PUINT CodePage, IN BOOLEAN InputCP); +/* API_NUMBER: ConsolepGetCP */ CSR_API(SrvGetConsoleCP) { NTSTATUS Status; @@ -581,6 +589,7 @@ NTSTATUS NTAPI ConDrvSetConsoleCP(IN PCONSOLE Console, IN UINT CodePage, IN BOOLEAN InputCP); +/* API_NUMBER: ConsolepSetCP */ CSR_API(SrvSetConsoleCP) { NTSTATUS Status = STATUS_INVALID_PARAMETER; @@ -606,6 +615,7 @@ ConDrvGetConsoleProcessList(IN PCONSOLE Console, IN OUT PULONG ProcessIdsList, IN ULONG MaxIdListItems, OUT PULONG ProcessIdsTotal); +/* API_NUMBER: ConsolepGetProcessList */ CSR_API(SrvGetConsoleProcessList) { NTSTATUS Status; @@ -632,6 +642,7 @@ CSR_API(SrvGetConsoleProcessList) return Status; } +/* API_NUMBER: ConsolepGenerateCtrlEvent */ CSR_API(SrvGenerateConsoleCtrlEvent) { NTSTATUS Status; diff --git a/win32ss/user/winsrv/consrv_new/frontendctl.c b/win32ss/user/winsrv/consrv_new/frontendctl.c index dbab7c37012..dfc9b159036 100644 --- a/win32ss/user/winsrv/consrv_new/frontendctl.c +++ b/win32ss/user/winsrv/consrv_new/frontendctl.c @@ -61,6 +61,7 @@ SetConsoleHardwareState(PCONSOLE Console, ULONG ConsoleHwState) } #endif +/* API_NUMBER: ConsolepGetHardwareState */ CSR_API(SrvGetConsoleHardwareState) { #if 0 @@ -91,6 +92,7 @@ CSR_API(SrvGetConsoleHardwareState) #endif } +/* API_NUMBER: ConsolepSetHardwareState */ CSR_API(SrvSetConsoleHardwareState) { #if 0 @@ -122,6 +124,7 @@ CSR_API(SrvSetConsoleHardwareState) #endif } +/* API_NUMBER: ConsolepGetDisplayMode */ CSR_API(SrvGetConsoleDisplayMode) { NTSTATUS Status; @@ -138,6 +141,7 @@ CSR_API(SrvGetConsoleDisplayMode) return STATUS_SUCCESS; } +/* API_NUMBER: ConsolepSetDisplayMode */ CSR_API(SrvSetConsoleDisplayMode) { NTSTATUS Status; @@ -168,6 +172,7 @@ CSR_API(SrvSetConsoleDisplayMode) return Status; } +/* API_NUMBER: ConsolepGetLargestWindowSize */ CSR_API(SrvGetLargestConsoleWindowSize) { NTSTATUS Status; @@ -189,6 +194,7 @@ CSR_API(SrvGetLargestConsoleWindowSize) return STATUS_SUCCESS; } +/* API_NUMBER: ConsolepShowCursor */ CSR_API(SrvShowConsoleCursor) { NTSTATUS Status; @@ -211,6 +217,7 @@ CSR_API(SrvShowConsoleCursor) return STATUS_SUCCESS; } +/* API_NUMBER: ConsolepSetCursor */ CSR_API(SrvSetConsoleCursor) { NTSTATUS Status; @@ -237,6 +244,7 @@ CSR_API(SrvSetConsoleCursor) return (Success ? STATUS_SUCCESS : STATUS_UNSUCCESSFUL); } +/* API_NUMBER: ConsolepMenuControl */ CSR_API(SrvConsoleMenuControl) { NTSTATUS Status; @@ -261,6 +269,7 @@ CSR_API(SrvConsoleMenuControl) return STATUS_SUCCESS; } +/* API_NUMBER: ConsolepSetMenuClose */ CSR_API(SrvSetConsoleMenuClose) { NTSTATUS Status; @@ -278,6 +287,7 @@ CSR_API(SrvSetConsoleMenuClose) return (Success ? STATUS_SUCCESS : STATUS_UNSUCCESSFUL); } +/* API_NUMBER: ConsolepGetConsoleWindow */ CSR_API(SrvGetConsoleWindow) { NTSTATUS Status; @@ -293,6 +303,7 @@ CSR_API(SrvGetConsoleWindow) return STATUS_SUCCESS; } +/* API_NUMBER: ConsolepSetIcon */ CSR_API(SrvSetConsoleIcon) { NTSTATUS Status; @@ -310,6 +321,7 @@ CSR_API(SrvSetConsoleIcon) return Status; } +/* API_NUMBER: ConsolepGetSelectionInfo */ CSR_API(SrvGetConsoleSelectionInfo) { NTSTATUS Status; diff --git a/win32ss/user/winsrv/consrv_new/handle.c b/win32ss/user/winsrv/consrv_new/handle.c index 8599f8f4c3e..ef627708c0f 100644 --- a/win32ss/user/winsrv/consrv_new/handle.c +++ b/win32ss/user/winsrv/consrv_new/handle.c @@ -679,6 +679,7 @@ ConSrvRemoveConsole(PCONSOLE_PROCESS_DATA ProcessData) /* PUBLIC SERVER APIS *********************************************************/ +/* API_NUMBER: ConsolepOpenConsole */ CSR_API(SrvOpenConsole) { /* @@ -742,6 +743,7 @@ CSR_API(SrvOpenConsole) return Status; } +/* API_NUMBER: ConsolepCloseHandle */ CSR_API(SrvCloseHandle) { NTSTATUS Status; @@ -762,6 +764,7 @@ CSR_API(SrvCloseHandle) return Status; } +/* API_NUMBER: ConsolepVerifyIoHandle */ CSR_API(SrvVerifyConsoleIoHandle) { NTSTATUS Status; @@ -795,6 +798,7 @@ CSR_API(SrvVerifyConsoleIoHandle) return Status; } +/* API_NUMBER: ConsolepDuplicateHandle */ CSR_API(SrvDuplicateHandle) { NTSTATUS Status; diff --git a/win32ss/user/winsrv/consrv_new/lineinput.c b/win32ss/user/winsrv/consrv_new/lineinput.c index 652d4e87908..d809f957616 100644 --- a/win32ss/user/winsrv/consrv_new/lineinput.c +++ b/win32ss/user/winsrv/consrv_new/lineinput.c @@ -454,6 +454,7 @@ LineInputKeyDown(PCONSOLE Console, KEY_EVENT_RECORD *KeyEvent) /* PUBLIC SERVER APIS *********************************************************/ +/* API_NUMBER: ConsolepGetCommandHistory */ CSR_API(SrvGetConsoleCommandHistory) { PCONSOLE_GETCOMMANDHISTORY GetCommandHistoryRequest = &((PCONSOLE_API_MESSAGE)ApiMessage)->Data.GetCommandHistoryRequest; @@ -502,6 +503,7 @@ CSR_API(SrvGetConsoleCommandHistory) return Status; } +/* API_NUMBER: ConsolepGetCommandHistoryLength */ CSR_API(SrvGetConsoleCommandHistoryLength) { PCONSOLE_GETCOMMANDHISTORYLENGTH GetCommandHistoryLengthRequest = &((PCONSOLE_API_MESSAGE)ApiMessage)->Data.GetCommandHistoryLengthRequest; @@ -535,6 +537,7 @@ CSR_API(SrvGetConsoleCommandHistoryLength) return Status; } +/* API_NUMBER: ConsolepExpungeCommandHistory */ CSR_API(SrvExpungeConsoleCommandHistory) { PCONSOLE_EXPUNGECOMMANDHISTORY ExpungeCommandHistoryRequest = &((PCONSOLE_API_MESSAGE)ApiMessage)->Data.ExpungeCommandHistoryRequest; @@ -561,6 +564,7 @@ CSR_API(SrvExpungeConsoleCommandHistory) return Status; } +/* API_NUMBER: ConsolepSetNumberOfCommands */ CSR_API(SrvSetConsoleNumberOfCommands) { PCONSOLE_SETHISTORYNUMBERCOMMANDS SetHistoryNumberCommandsRequest = &((PCONSOLE_API_MESSAGE)ApiMessage)->Data.SetHistoryNumberCommandsRequest; @@ -611,6 +615,7 @@ CSR_API(SrvSetConsoleNumberOfCommands) return Status; } +/* API_NUMBER: ConsolepGetHistory */ CSR_API(SrvGetConsoleHistory) { PCONSOLE_GETSETHISTORYINFO HistoryInfoRequest = &((PCONSOLE_API_MESSAGE)ApiMessage)->Data.HistoryInfoRequest; @@ -626,6 +631,7 @@ CSR_API(SrvGetConsoleHistory) return Status; } +/* API_NUMBER: ConsolepSetHistory */ CSR_API(SrvSetConsoleHistory) { PCONSOLE_GETSETHISTORYINFO HistoryInfoRequest = &((PCONSOLE_API_MESSAGE)ApiMessage)->Data.HistoryInfoRequest;
5 years, 3 months
1
0
0
0
[reactos] 01/01: [NTOS:IO] Fix list enumeration in IopShutdownBaseFileSystems
by Timo Kreuzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=53f8cbad9799d56ec55df…
commit 53f8cbad9799d56ec55df90eb73321ebfd022fee Author: Timo Kreuzer <timo.kreuzer(a)reactos.org> AuthorDate: Tue Dec 24 18:31:59 2019 +0100 Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org> CommitDate: Mon Dec 30 15:48:38 2019 +0100 [NTOS:IO] Fix list enumeration in IopShutdownBaseFileSystems --- ntoskrnl/io/iomgr/volume.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ntoskrnl/io/iomgr/volume.c b/ntoskrnl/io/iomgr/volume.c index 1d1e31e5c0d..878c0426dbd 100644 --- a/ntoskrnl/io/iomgr/volume.c +++ b/ntoskrnl/io/iomgr/volume.c @@ -371,6 +371,9 @@ IopShutdownBaseFileSystems(IN PLIST_ENTRY ListHead) DEVICE_OBJECT, Queue.ListEntry); + /* Go to the next entry */ + ListEntry = ListEntry->Flink; + /* Get the attached device */ DeviceObject = IoGetAttachedDevice(DeviceObject); @@ -400,9 +403,6 @@ IopShutdownBaseFileSystems(IN PLIST_ENTRY ListHead) IopDecrementDeviceObjectRef(DeviceObject, FALSE); ObDereferenceObject(DeviceObject); - - /* Go to the next entry */ - ListEntry = ListEntry->Flink; } }
5 years, 3 months
1
0
0
0
[reactos] 02/02: [WINHTTP_WINETEST] Restore test_persistent_connection execution This reverts commit a22031d ROSTESTS-295
by Victor Perevertkin
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=68490c16133faded90c9b…
commit 68490c16133faded90c9bcbe064c2a0e2e72bad1 Author: Victor Perevertkin <victor.perevertkin(a)reactos.org> AuthorDate: Fri Dec 20 02:52:30 2019 +0300 Commit: Victor Perevertkin <victor(a)perevertkin.ru> CommitDate: Mon Dec 30 14:57:58 2019 +0200 [WINHTTP_WINETEST] Restore test_persistent_connection execution This reverts commit a22031d ROSTESTS-295 --- modules/rostests/winetests/winhttp/notification.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/modules/rostests/winetests/winhttp/notification.c b/modules/rostests/winetests/winhttp/notification.c index 75bfc648808..e2bbb714fe9 100644 --- a/modules/rostests/winetests/winhttp/notification.c +++ b/modules/rostests/winetests/winhttp/notification.c @@ -1037,18 +1037,7 @@ START_TEST (notification) return; } -#ifdef __REACTOS__ -if (!winetest_interactive) -{ - skip("Skipping test_persistent_connection due to hang. See ROSTESTS-295.\n"); -} -else -{ - test_persistent_connection( si.port ); -} -#else test_persistent_connection( si.port ); -#endif /* send the basic request again to shutdown the server thread */ test_basic_request( si.port, NULL, quitW );
5 years, 3 months
1
0
0
0
[reactos] 01/02: [WINHTTP] Initialize winsock upon WinHttpOpen As it was done before syncing with wine-staging 4.18 (5bd6580) ROSTESTS-348
by Victor Perevertkin
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4bf76a659eed706164ef6…
commit 4bf76a659eed706164ef62e77d680c806e92e814 Author: Victor Perevertkin <victor.perevertkin(a)reactos.org> AuthorDate: Fri Dec 20 01:43:07 2019 +0300 Commit: Victor Perevertkin <victor(a)perevertkin.ru> CommitDate: Mon Dec 30 14:57:58 2019 +0200 [WINHTTP] Initialize winsock upon WinHttpOpen As it was done before syncing with wine-staging 4.18 (5bd6580) ROSTESTS-348 --- dll/win32/winhttp/net.c | 6 ++++++ dll/win32/winhttp/session.c | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/dll/win32/winhttp/net.c b/dll/win32/winhttp/net.c index 277a22eacb0..fcec7adde92 100644 --- a/dll/win32/winhttp/net.c +++ b/dll/win32/winhttp/net.c @@ -167,7 +167,11 @@ static BOOL WINAPI winsock_startup( INIT_ONCE *once, void *param, void **ctx ) return TRUE; } +#ifdef __REACTOS__ +void winsock_init(void) +#else static void winsock_init(void) +#endif { static INIT_ONCE once = INIT_ONCE_STATIC_INIT; InitOnceExecuteOnce( &once, winsock_startup, NULL, NULL ); @@ -185,7 +189,9 @@ struct netconn *netconn_create( struct hostdata *host, const struct sockaddr_sto unsigned int addr_len; BOOL ret = FALSE; +#ifndef __REACTOS__ winsock_init(); +#endif conn = heap_alloc_zero(sizeof(*conn)); if (!conn) return NULL; diff --git a/dll/win32/winhttp/session.c b/dll/win32/winhttp/session.c index 8e24de736dd..4392f022c63 100644 --- a/dll/win32/winhttp/session.c +++ b/dll/win32/winhttp/session.c @@ -240,6 +240,10 @@ static const struct object_vtbl session_vtbl = session_set_option }; +#ifdef __REACTOS__ +void winsock_init(void); +#endif + /*********************************************************************** * WinHttpOpen (winhttp.@) */ @@ -297,6 +301,10 @@ HINTERNET WINAPI WinHttpOpen( LPCWSTR agent, DWORD access, LPCWSTR proxy, LPCWST if (!(handle = alloc_handle( &session->hdr ))) goto end; session->hdr.handle = handle; +#ifdef __REACTOS__ + winsock_init(); +#endif + end: release_object( &session->hdr ); TRACE("returning %p\n", handle);
5 years, 3 months
1
0
0
0
[reactos] 01/01: [SDK][INCLUDE] Improve gdiplusheader.h (#2197)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8b5dc3bf5fd8202e8ebfb…
commit 8b5dc3bf5fd8202e8ebfbd8517b968c12f4fa45b Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Mon Dec 30 19:59:09 2019 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Mon Dec 30 19:59:09 2019 +0900 [SDK][INCLUDE] Improve gdiplusheader.h (#2197) CORE-16585 --- sdk/include/psdk/gdiplusheaders.h | 421 +++++++++++++++++++++++++------------- 1 file changed, 279 insertions(+), 142 deletions(-) diff --git a/sdk/include/psdk/gdiplusheaders.h b/sdk/include/psdk/gdiplusheaders.h index 1497c55e6c6..3383018d7a6 100644 --- a/sdk/include/psdk/gdiplusheaders.h +++ b/sdk/include/psdk/gdiplusheaders.h @@ -24,27 +24,28 @@ class Image : public GdiplusBase public: friend class Graphics; - Image(IStream *stream, BOOL useEmbeddedColorManagement = FALSE) + Image(IStream *stream, BOOL useEmbeddedColorManagement = FALSE) : nativeImage(NULL) { if (useEmbeddedColorManagement) - status = DllExports::GdipLoadImageFromStreamICM(stream, &nativeImage); + lastStatus = DllExports::GdipLoadImageFromStreamICM(stream, &nativeImage); else - status = DllExports::GdipLoadImageFromStream(stream, &nativeImage); + lastStatus = DllExports::GdipLoadImageFromStream(stream, &nativeImage); } - Image(const WCHAR *filename, BOOL useEmbeddedColorManagement = FALSE) + Image(const WCHAR *filename, BOOL useEmbeddedColorManagement = FALSE) : nativeImage(NULL) { if (useEmbeddedColorManagement) - status = DllExports::GdipLoadImageFromFileICM(filename, &nativeImage); + lastStatus = DllExports::GdipLoadImageFromFileICM(filename, &nativeImage); else - status = DllExports::GdipLoadImageFromFile(filename, &nativeImage); + lastStatus = DllExports::GdipLoadImageFromFile(filename, &nativeImage); } - Image *Clone(VOID) + Image * + Clone() { - Image *newImage = new Image(); - SetStatus(DllExports::GdipCloneImage(nativeImage, newImage ? &newImage->nativeImage : NULL)); - return newImage; + GpImage *cloneimage = NULL; + SetStatus(DllExports::GdipCloneImage(nativeImage, &cloneimage)); + return new Image(cloneimage, lastStatus); } virtual ~Image() @@ -67,6 +68,8 @@ class Image : public GdiplusBase Status GetAllPropertyItems(UINT totalBufferSize, UINT numProperties, PropertyItem *allItems) { + if (allItems == NULL) + return SetStatus(InvalidParameter); return SetStatus(DllExports::GdipGetAllPropertyItems(nativeImage, totalBufferSize, numProperties, allItems)); } @@ -79,22 +82,31 @@ class Image : public GdiplusBase Status GetEncoderParameterList(const CLSID *clsidEncoder, UINT size, EncoderParameters *buffer) { - return NotImplemented; // FIXME: not available: SetStatus(DllExports::GdipGetEncoderParameterList(nativeImage, - // clsidEncoder, size, buffer)); +#if 1 + // FIXME: Not available yet + return SetStatus(NotImplemented); +#else + return SetStatus(DllExports::GdipGetEncoderParameterList(nativeImage, clsidEncoder, size, buffer)); +#endif } UINT GetEncoderParameterListSize(const CLSID *clsidEncoder) { - return 0; // FIXME: not available: - // UINT size; - // SetStatus(DllExports::GdipGetEncoderParameterListSize(nativeImage, clsidEncoder, &size)); - // return size; +#if 1 + // FIXME: Not available yet + return SetStatus(NotImplemented); +#else + UINT size = 0; + SetStatus(DllExports::GdipGetEncoderParameterListSize(nativeImage, clsidEncoder, &size)); + return size; +#endif } - UINT GetFlags(VOID) + UINT + GetFlags() { - UINT flags; + UINT flags = 0; SetStatus(DllExports::GdipGetImageFlags(nativeImage, &flags)); return flags; } @@ -102,14 +114,15 @@ class Image : public GdiplusBase UINT GetFrameCount(const GUID *dimensionID) { - UINT count; + UINT count = 0; SetStatus(DllExports::GdipImageGetFrameCount(nativeImage, dimensionID, &count)); return count; } - UINT GetFrameDimensionsCount(VOID) + UINT + GetFrameDimensionsCount() { - UINT count; + UINT count = 0; SetStatus(DllExports::GdipImageGetFrameDimensionsCount(nativeImage, &count)); return count; } @@ -120,23 +133,26 @@ class Image : public GdiplusBase return SetStatus(DllExports::GdipImageGetFrameDimensionsList(nativeImage, dimensionIDs, count)); } - UINT GetHeight(VOID) + UINT + GetHeight() { - UINT height; + UINT height = 0; SetStatus(DllExports::GdipGetImageHeight(nativeImage, &height)); return height; } - REAL GetHorizontalResolution(VOID) + REAL + GetHorizontalResolution() { - REAL resolution; + REAL resolution = 0.0f; SetStatus(DllExports::GdipGetImageHorizontalResolution(nativeImage, &resolution)); return resolution; } - Status GetLastStatus(VOID) + Status + GetLastStatus() { - return status; + return lastStatus; } Status @@ -145,9 +161,10 @@ class Image : public GdiplusBase return SetStatus(DllExports::GdipGetImagePalette(nativeImage, palette, size)); } - INT GetPaletteSize(VOID) + INT + GetPaletteSize() { - INT size; + INT size = 0; SetStatus(DllExports::GdipGetImagePaletteSize(nativeImage, &size)); return size; } @@ -155,22 +172,24 @@ class Image : public GdiplusBase Status GetPhysicalDimension(SizeF *size) { - if (size) - return SetStatus(DllExports::GdipGetImageDimension(nativeImage, &size->Width, &size->Height)); - else - return SetStatus(DllExports::GdipGetImageDimension(nativeImage, NULL, NULL)); + if (size == NULL) + return SetStatus(InvalidParameter); + + return SetStatus(DllExports::GdipGetImageDimension(nativeImage, &size->Width, &size->Height)); } - PixelFormat GetPixelFormat(VOID) + PixelFormat + GetPixelFormat() { PixelFormat format; SetStatus(DllExports::GdipGetImagePixelFormat(nativeImage, &format)); return format; } - UINT GetPropertyCount(VOID) + UINT + GetPropertyCount() { - UINT numOfProperty; + UINT numOfProperty = 0; SetStatus(DllExports::GdipGetPropertyCount(nativeImage, &numOfProperty)); return numOfProperty; } @@ -190,7 +209,7 @@ class Image : public GdiplusBase UINT GetPropertyItemSize(PROPID propId) { - UINT size; + UINT size = 0; SetStatus(DllExports::GdipGetPropertyItemSize(nativeImage, propId, &size)); return size; } @@ -210,30 +229,37 @@ class Image : public GdiplusBase Image * GetThumbnailImage(UINT thumbWidth, UINT thumbHeight, GetThumbnailImageAbort callback, VOID *callbackData) { - Image *thumbImage = new Image(); + GpImage *thumbImage = NULL; SetStatus(DllExports::GdipGetImageThumbnail( - nativeImage, thumbWidth, thumbHeight, thumbImage ? &thumbImage->nativeImage : NULL, callback, - callbackData)); - return thumbImage; + nativeImage, thumbWidth, thumbHeight, &thumbImage, callback, callbackData)); + Image *newImage = new Image(thumbImage, lastStatus); + if (newImage == NULL) + { + DllExports::GdipDisposeImage(thumbImage); + } + return newImage; } - ImageType GetType(VOID) + ImageType + GetType() { ImageType type; SetStatus(DllExports::GdipGetImageType(nativeImage, &type)); return type; } - REAL GetVerticalResolution(VOID) + REAL + GetVerticalResolution() { - REAL resolution; + REAL resolution = 0.0f; SetStatus(DllExports::GdipGetImageVerticalResolution(nativeImage, &resolution)); return resolution; } - UINT GetWidth(VOID) + UINT + GetWidth() { - UINT width; + UINT width = 0; SetStatus(DllExports::GdipGetImageWidth(nativeImage, &width)); return width; } @@ -265,14 +291,26 @@ class Image : public GdiplusBase Status SaveAdd(const EncoderParameters *encoderParams) { - return NotImplemented; // FIXME: not available: SetStatus(DllExports::GdipSaveAdd(nativeImage, encoderParams)); +#if 1 + // FIXME: Not available yet + return SetStatus(NotImplemented); +#else + return SetStatus(DllExports::GdipSaveAdd(nativeImage, encoderParams)); +#endif } Status SaveAdd(Image *newImage, const EncoderParameters *encoderParams) { - return NotImplemented; // FIXME: not available: SetStatus(DllExports::GdipSaveAddImage(nativeImage, newImage ? - // newImage->nativeImage : NULL, encoderParams)); +#if 1 + // FIXME: Not available yet + return SetStatus(NotImplemented); +#else + if (!newImage) + return SetStatus(InvalidParameter); + + return SetStatus(DllExports::GdipSaveAddImage(nativeImage, newImage->nativeImage, encoderParams)); +#endif } Status @@ -293,23 +331,51 @@ class Image : public GdiplusBase return SetStatus(DllExports::GdipSetPropertyItem(nativeImage, item)); } +#if 0 + ImageLayout + GetLayout() const + { + return SetStatus(NotImplemented); + } + + Status + SetLayout(const ImageLayout layout) + { + return SetStatus(NotImplemented); + } +#endif + protected: + GpImage *nativeImage; + mutable Status lastStatus; + Image() { } - private: - mutable Status status; - GpImage *nativeImage; + Image(GpImage *image, Status status) : nativeImage(image), lastStatus(status) + { + } Status SetStatus(Status status) const { - if (status == Ok) - return status; - this->status = status; + if (status != Ok) + lastStatus = status; return status; } + + void + SetNativeImage(GpImage *image) + { + nativeImage = image; + } + + private: + // Image is not copyable + Image(const Image &); + Image & + operator=(const Image &); }; class Bitmap : public Image @@ -317,95 +383,128 @@ class Bitmap : public Image friend class CachedBitmap; public: - // Bitmap(IDirectDrawSurface7 *surface) // <-- FIXME: compiler does not like this - // { - // status = DllExports::GdipCreateBitmapFromDirectDrawSurface(surface, &bitmap); - // } + // Bitmap(IDirectDrawSurface7 *surface) // <-- FIXME: compiler does not like this + // { + // lastStatus = DllExports::GdipCreateBitmapFromDirectDrawSurface(surface, &bitmap); + // } Bitmap(INT width, INT height, Graphics *target) { - status = DllExports::GdipCreateBitmapFromGraphics(width, height, target ? target->graphics : NULL, &bitmap); + GpBitmap *bitmap = NULL; + lastStatus = DllExports::GdipCreateBitmapFromGraphics(width, height, target ? target->graphics : NULL, &bitmap); + SetNativeImage(bitmap); } Bitmap(const BITMAPINFO *gdiBitmapInfo, VOID *gdiBitmapData) { - status = DllExports::GdipCreateBitmapFromGdiDib(gdiBitmapInfo, gdiBitmapData, &bitmap); + GpBitmap *bitmap = NULL; + lastStatus = DllExports::GdipCreateBitmapFromGdiDib(gdiBitmapInfo, gdiBitmapData, &bitmap); + SetNativeImage(bitmap); } Bitmap(INT width, INT height, PixelFormat format) { + GpBitmap *bitmap = NULL; + lastStatus = DllExports::GdipCreateBitmapFromScan0(width, height, 0, format, NULL, &bitmap); + SetNativeImage(bitmap); } Bitmap(HBITMAP hbm, HPALETTE hpal) { - status = DllExports::GdipCreateBitmapFromHBITMAP(hbm, hpal, &bitmap); + GpBitmap *bitmap = NULL; + lastStatus = DllExports::GdipCreateBitmapFromHBITMAP(hbm, hpal, &bitmap); + SetNativeImage(bitmap); } Bitmap(INT width, INT height, INT stride, PixelFormat format, BYTE *scan0) { - status = DllExports::GdipCreateBitmapFromScan0(width, height, stride, format, scan0, &bitmap); + GpBitmap *bitmap = NULL; + lastStatus = DllExports::GdipCreateBitmapFromScan0(width, height, stride, format, scan0, &bitmap); + SetNativeImage(bitmap); } Bitmap(const WCHAR *filename, BOOL useIcm) { + GpBitmap *bitmap = NULL; + if (useIcm) - status = DllExports::GdipCreateBitmapFromFileICM(filename, &bitmap); + lastStatus = DllExports::GdipCreateBitmapFromFileICM(filename, &bitmap); else - status = DllExports::GdipCreateBitmapFromFile(filename, &bitmap); + lastStatus = DllExports::GdipCreateBitmapFromFile(filename, &bitmap); + + SetNativeImage(bitmap); } Bitmap(HINSTANCE hInstance, const WCHAR *bitmapName) { - status = DllExports::GdipCreateBitmapFromResource(hInstance, bitmapName, &bitmap); + GpBitmap *bitmap = NULL; + lastStatus = DllExports::GdipCreateBitmapFromResource(hInstance, bitmapName, &bitmap); + SetNativeImage(bitmap); } Bitmap(HICON hicon) { - status = DllExports::GdipCreateBitmapFromHICON(hicon, &bitmap); + GpBitmap *bitmap = NULL; + lastStatus = DllExports::GdipCreateBitmapFromHICON(hicon, &bitmap); + SetNativeImage(bitmap); } Bitmap(IStream *stream, BOOL useIcm) { + GpBitmap *bitmap = NULL; if (useIcm) - status = DllExports::GdipCreateBitmapFromStreamICM(stream, &bitmap); + lastStatus = DllExports::GdipCreateBitmapFromStreamICM(stream, &bitmap); else - status = DllExports::GdipCreateBitmapFromStream(stream, &bitmap); + lastStatus = DllExports::GdipCreateBitmapFromStream(stream, &bitmap); + SetNativeImage(bitmap); } Bitmap * Clone(const Rect &rect, PixelFormat format) { - Bitmap *dstBitmap = new Bitmap(); - SetStatus(DllExports::GdipCloneBitmapAreaI( - rect.X, rect.Y, rect.Width, rect.Height, format, bitmap, dstBitmap ? &dstBitmap->bitmap : NULL)); - return dstBitmap; + return Clone(rect.X, rect.Y, rect.Width, rect.Height, format); } Bitmap * Clone(const RectF &rect, PixelFormat format) { - Bitmap *dstBitmap = new Bitmap(); - SetStatus(DllExports::GdipCloneBitmapArea( - rect.X, rect.Y, rect.Width, rect.Height, format, bitmap, dstBitmap ? &dstBitmap->bitmap : NULL)); - return dstBitmap; + return Clone(rect.X, rect.Y, rect.Width, rect.Height, format); } Bitmap * Clone(REAL x, REAL y, REAL width, REAL height, PixelFormat format) { - Bitmap *dstBitmap = new Bitmap(); - SetStatus(DllExports::GdipCloneBitmapArea( - x, y, width, height, format, bitmap, dstBitmap ? &dstBitmap->bitmap : NULL)); - return dstBitmap; + GpBitmap *bitmap = NULL; + lastStatus = DllExports::GdipCloneBitmapArea(x, y, width, height, format, GetNativeBitmap(), &bitmap); + + if (lastStatus != Ok) + return NULL; + + Bitmap *newBitmap = new Bitmap(bitmap); + if (newBitmap == NULL) + { + DllExports::GdipDisposeImage(bitmap); + } + + return newBitmap; } Bitmap * Clone(INT x, INT y, INT width, INT height, PixelFormat format) { - Bitmap *dstBitmap = new Bitmap(); - SetStatus(DllExports::GdipCloneBitmapAreaI( - x, y, width, height, format, bitmap, dstBitmap ? &dstBitmap->bitmap : NULL)); - return dstBitmap; + GpBitmap *bitmap = NULL; + lastStatus = DllExports::GdipCloneBitmapAreaI(x, y, width, height, format, GetNativeBitmap(), &bitmap); + + if (lastStatus != Ok) + return NULL; + + Bitmap *newBitmap = new Bitmap(bitmap); + if (newBitmap == NULL) + { + DllExports::GdipDisposeImage(bitmap); + } + + return newBitmap; } static Bitmap * @@ -414,10 +513,10 @@ class Bitmap : public Image return new Bitmap(gdiBitmapInfo, gdiBitmapData); } - // static Bitmap *FromDirectDrawSurface7(IDirectDrawSurface7 *surface) // <-- FIXME: compiler does not like this - // { - // return new Bitmap(surface); - // } + // static Bitmap *FromDirectDrawSurface7(IDirectDrawSurface7 *surface) // <-- FIXME: compiler does not like this + // { + // return new Bitmap(surface); + // } static Bitmap * FromFile(const WCHAR *filename, BOOL useEmbeddedColorManagement) @@ -452,21 +551,22 @@ class Bitmap : public Image Status GetHBITMAP(const Color &colorBackground, HBITMAP *hbmReturn) { - return SetStatus(DllExports::GdipCreateHBITMAPFromBitmap(bitmap, hbmReturn, colorBackground.GetValue())); + return SetStatus( + DllExports::GdipCreateHBITMAPFromBitmap(GetNativeBitmap(), hbmReturn, colorBackground.GetValue())); } Status GetHICON(HICON *hicon) { - return SetStatus(DllExports::GdipCreateHICONFromBitmap(bitmap, hicon)); + return SetStatus(DllExports::GdipCreateHICONFromBitmap(GetNativeBitmap(), hicon)); } Status GetPixel(INT x, INT y, Color *color) { ARGB argb; - Status s = SetStatus(DllExports::GdipBitmapGetPixel(bitmap, x, y, &argb)); - if (color != NULL) + Status s = SetStatus(DllExports::GdipBitmapGetPixel(GetNativeBitmap(), x, y, &argb)); + if (color) color->SetValue(argb); return s; } @@ -474,25 +574,25 @@ class Bitmap : public Image Status LockBits(const Rect *rect, UINT flags, PixelFormat format, BitmapData *lockedBitmapData) { - return SetStatus(DllExports::GdipBitmapLockBits(bitmap, rect, flags, format, lockedBitmapData)); + return SetStatus(DllExports::GdipBitmapLockBits(GetNativeBitmap(), rect, flags, format, lockedBitmapData)); } Status SetPixel(INT x, INT y, const Color &color) { - return SetStatus(DllExports::GdipBitmapSetPixel(bitmap, x, y, color.GetValue())); + return SetStatus(DllExports::GdipBitmapSetPixel(GetNativeBitmap(), x, y, color.GetValue())); } Status SetResolution(REAL xdpi, REAL ydpi) { - return SetStatus(DllExports::GdipBitmapSetResolution(bitmap, xdpi, ydpi)); + return SetStatus(DllExports::GdipBitmapSetResolution(GetNativeBitmap(), xdpi, ydpi)); } Status UnlockBits(BitmapData *lockedBitmapData) { - return SetStatus(DllExports::GdipBitmapUnlockBits(bitmap, lockedBitmapData)); + return SetStatus(DllExports::GdipBitmapUnlockBits(GetNativeBitmap(), lockedBitmapData)); } protected: @@ -500,17 +600,16 @@ class Bitmap : public Image { } - private: - mutable Status status; - GpBitmap *bitmap; + Bitmap(GpBitmap *nativeBitmap) + { + lastStatus = Ok; + SetNativeImage(nativeBitmap); + } - Status - SetStatus(Status status) const + GpBitmap * + GetNativeBitmap() const { - if (status == Ok) - return status; - this->status = status; - return status; + return static_cast<GpBitmap *>(nativeImage); } }; @@ -519,18 +618,31 @@ class CachedBitmap : public GdiplusBase public: CachedBitmap(Bitmap *bitmap, Graphics *graphics) { - status = - DllExports::GdipCreateCachedBitmap(bitmap->bitmap, graphics ? graphics->graphics : NULL, &cachedBitmap); + nativeCachedBitmap = NULL; + lastStatus = DllExports::GdipCreateCachedBitmap( + bitmap->GetNativeBitmap(), graphics ? graphics->graphics : NULL, &nativeCachedBitmap); } - Status GetLastStatus(VOID) + ~CachedBitmap() { - return status; + DllExports::GdipDeleteCachedBitmap(nativeCachedBitmap); } + Status + GetLastStatus() + { + return lastStatus; + } + + protected: + mutable Status lastStatus; + GpCachedBitmap *nativeCachedBitmap; + private: - mutable Status status; - GpCachedBitmap *cachedBitmap; + // CachedBitmap is not copyable + CachedBitmap(const CachedBitmap &); + CachedBitmap & + operator=(const CachedBitmap &); }; class FontCollection : public GdiplusBase @@ -538,7 +650,7 @@ class FontCollection : public GdiplusBase friend class FontFamily; public: - FontCollection(VOID) + FontCollection() { } @@ -548,12 +660,14 @@ class FontCollection : public GdiplusBase return NotImplemented; } - INT GetFamilyCount(VOID) const + INT + GetFamilyCount() const { return 0; } - Status GetLastStatus(VOID) + Status + GetLastStatus() { return NotImplemented; } @@ -567,7 +681,7 @@ class FontFamily : public GdiplusBase friend class Font; public: - FontFamily(VOID) + FontFamily() { } @@ -577,12 +691,14 @@ class FontFamily : public GdiplusBase name, fontCollection ? fontCollection->fontCollection : NULL, &fontFamily); } - FontFamily *Clone(VOID) + FontFamily * + Clone() { return NULL; } - static const FontFamily *GenericMonospace(VOID) + static const FontFamily * + GenericMonospace() { FontFamily *genericMonospace = new FontFamily(); genericMonospace->status = @@ -590,7 +706,8 @@ class FontFamily : public GdiplusBase return genericMonospace; } - static const FontFamily *GenericSansSerif(VOID) + static const FontFamily * + GenericSansSerif() { FontFamily *genericSansSerif = new FontFamily(); genericSansSerif->status = @@ -598,7 +715,8 @@ class FontFamily : public GdiplusBase return genericSansSerif; } - static const FontFamily *GenericSerif(VOID) + static const FontFamily * + GenericSerif() { FontFamily *genericSerif = new FontFamily(); genericSerif->status = @@ -636,7 +754,8 @@ class FontFamily : public GdiplusBase return SetStatus(DllExports::GdipGetFamilyName(fontFamily, name, language)); } - Status GetLastStatus(VOID) const + Status + GetLastStatus() const { return status; } @@ -649,7 +768,8 @@ class FontFamily : public GdiplusBase return LineSpacing; } - BOOL IsAvailable(VOID) const + BOOL + IsAvailable() const { return FALSE; } @@ -679,7 +799,7 @@ class FontFamily : public GdiplusBase class InstalledFontFamily : public FontFamily { public: - InstalledFontFamily(VOID) + InstalledFontFamily() { } }; @@ -687,7 +807,7 @@ class InstalledFontFamily : public FontFamily class PrivateFontCollection : public FontCollection { public: - PrivateFontCollection(VOID) + PrivateFontCollection() { } @@ -739,7 +859,8 @@ class Font : public GdiplusBase status = DllExports::GdipCreateFontFromDC(hdc, &font); } - Font *Clone(VOID) const + Font * + Clone() const { Font *cloneFont = new Font(); cloneFont->status = DllExports::GdipCloneFont(font, cloneFont ? &cloneFont->font : NULL); @@ -768,7 +889,8 @@ class Font : public GdiplusBase return height; } - Status GetLastStatus(VOID) const + Status + GetLastStatus() const { return status; } @@ -785,28 +907,32 @@ class Font : public GdiplusBase return SetStatus(DllExports::GdipGetLogFontW(font, g ? g->graphics : NULL, logfontW)); } - REAL GetSize(VOID) const + REAL + GetSize() const { REAL size; SetStatus(DllExports::GdipGetFontSize(font, &size)); return size; } - INT GetStyle(VOID) const + INT + GetStyle() const { INT style; SetStatus(DllExports::GdipGetFontStyle(font, &style)); return style; } - Unit GetUnit(VOID) const + Unit + GetUnit() const { Unit unit; SetStatus(DllExports::GdipGetFontUnit(font, &unit)); return unit; } - BOOL IsAvailable(VOID) const + BOOL + IsAvailable() const { return FALSE; } @@ -842,7 +968,7 @@ class Region : public GdiplusBase status = DllExports::GdipCreateRegionRectI(&rect, ®ion); } - Region(VOID) + Region() { status = DllExports::GdipCreateRegion(®ion); } @@ -867,7 +993,8 @@ class Region : public GdiplusBase status = DllExports::GdipCreateRegionRect(&rect, ®ion); } - Region *Clone(VOID) + Region * + Clone() { Region *cloneRegion = new Region(); cloneRegion->status = DllExports::GdipCloneRegion(region, cloneRegion ? &cloneRegion->region : NULL); @@ -957,7 +1084,8 @@ class Region : public GdiplusBase return SetStatus(DllExports::GdipGetRegionData(region, buffer, bufferSize, sizeFilled)); } - UINT GetDataSize(VOID) const + UINT + GetDataSize() const { UINT bufferSize; SetStatus(DllExports::GdipGetRegionDataSize(region, &bufferSize)); @@ -972,7 +1100,8 @@ class Region : public GdiplusBase return hRgn; } - Status GetLastStatus(VOID) + Status + GetLastStatus() { return status; } @@ -1104,12 +1233,14 @@ class Region : public GdiplusBase return result; } - Status MakeEmpty(VOID) + Status + MakeEmpty() { return SetStatus(DllExports::GdipSetEmpty(region)); } - Status MakeInfinite(VOID) + Status + MakeInfinite() { return SetStatus(DllExports::GdipSetInfinite(region)); } @@ -1200,16 +1331,22 @@ class CustomLineCap : public GdiplusBase { public: CustomLineCap(const GraphicsPath *fillPath, const GraphicsPath *strokePath, LineCap baseCap, REAL baseInset); - CustomLineCap *Clone(VOID); - LineCap GetBaseCap(VOID); - REAL GetBaseInset(VOID); - Status GetLastStatus(VOID); + CustomLineCap * + Clone(); + LineCap + GetBaseCap(); + REAL + GetBaseInset(); + Status + GetLastStatus(); Status GetStrokeCaps(LineCap *startCap, LineCap *endCap); - LineJoin GetStrokeJoin(VOID); - REAL GetWidthScale(VOID); + LineJoin + GetStrokeJoin(); + REAL + GetWidthScale(); Status SetBaseCap(LineCap baseCap);
5 years, 3 months
1
0
0
0
[reactos] 01/01: [SDK][INCLUDE] Improve gdipluseffects.h (#2196)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5eaea74d46e086d967bca…
commit 5eaea74d46e086d967bca8cc76628a6f2242818e Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Mon Dec 30 19:57:55 2019 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Mon Dec 30 19:57:55 2019 +0900 [SDK][INCLUDE] Improve gdipluseffects.h (#2196) CORE-16585 --- sdk/include/psdk/gdipluseffects.h | 76 +++++++++++++++++++++++++++------------ 1 file changed, 53 insertions(+), 23 deletions(-) diff --git a/sdk/include/psdk/gdipluseffects.h b/sdk/include/psdk/gdipluseffects.h index ee6085d7c0d..1b5354605d0 100644 --- a/sdk/include/psdk/gdipluseffects.h +++ b/sdk/include/psdk/gdipluseffects.h @@ -19,59 +19,87 @@ #ifndef _GDIPLUSEFFECTS_H #define _GDIPLUSEFFECTS_H -typedef struct +typedef enum CurveAdjustments { - float radius; + AdjustExposure = 0, + AdjustDensity = 1, + AdjustContrast = 2, + AdjustHighlight = 3, + AdjustShadow = 4, + AdjustMidtone = 5, + AdjustWhiteSaturation = 6, + AdjustBlackSaturation = 7 +} CurveAdjustments; + +typedef enum CurveChannel +{ + CurveChannelAll = 0, + CurveChannelRed = 1, + CurveChannelGreen = 2, + CurveChannelBlue = 3 +} CurveChannel; + +typedef struct BlurParams +{ + REAL radius; BOOL expandEdge; } BlurParams; -typedef struct +typedef struct BrightnessContrastParams { INT brightnessLevel; INT contrastLevel; } BrightnessContrastParams; -typedef struct +typedef struct ColorBalanceParams { INT cyanRed; INT magentaGreen; INT yellowBlue; } ColorBalanceParams; -typedef struct +typedef struct ColorCurveParams { CurveAdjustments adjustment; CurveChannel channel; INT adjustValue; } ColorCurveParams; -typedef struct +typedef struct ColorLUTParams +{ + ColorChannelLUT lutB; + ColorChannelLUT lutG; + ColorChannelLUT lutR; + ColorChannelLUT lutA; +} ColorLUTParams; + +typedef struct HueSaturationLightnessParams { INT hueLevel; INT saturationLevel; INT lightnessLevel; } HueSaturationLightnessParams; -typedef struct +typedef struct LevelsParams { INT highlight; INT midtone; INT shadow; } LevelsParams; -typedef struct +typedef struct RedEyeCorrectionParams { UINT numberOfAreas; RECT *areas; } RedEyeCorrectionParams; -typedef struct +typedef struct SharpenParams { REAL radius; REAL amount; } SharpenParams; -typedef struct +typedef struct TintParams { INT hue; INT amount; @@ -80,16 +108,18 @@ typedef struct class Effect { public: - Effect(VOID) + Effect() { } - VOID *GetAuxData(VOID) const + VOID * + GetAuxData() const { return NULL; } - INT GetAuxDataSize(VOID) + INT + GetAuxDataSize() { return 0; } @@ -109,7 +139,7 @@ class Effect class Blur : public Effect { public: - Blur(VOID) + Blur() { } @@ -129,7 +159,7 @@ class Blur : public Effect class BrightnessContrast : public Effect { public: - BrightnessContrast(VOID) + BrightnessContrast() { } @@ -149,7 +179,7 @@ class BrightnessContrast : public Effect class ColorBalance : public Effect { public: - ColorBalance(VOID) + ColorBalance() { } @@ -169,7 +199,7 @@ class ColorBalance : public Effect class ColorCurve : public Effect { public: - ColorCurve(VOID) + ColorCurve() { } @@ -189,7 +219,7 @@ class ColorCurve : public Effect class ColorMatrixEffect : public Effect { public: - ColorMatrixEffect(VOID) + ColorMatrixEffect() { } @@ -209,7 +239,7 @@ class ColorMatrixEffect : public Effect class HueSaturationLightness : public Effect { public: - HueSaturationLightness(VOID) + HueSaturationLightness() { } @@ -229,7 +259,7 @@ class HueSaturationLightness : public Effect class Levels : public Effect { public: - Levels(VOID) + Levels() { } @@ -249,7 +279,7 @@ class Levels : public Effect class RedEyeCorrection : public Effect { public: - RedEyeCorrection(VOID) + RedEyeCorrection() { } @@ -269,7 +299,7 @@ class RedEyeCorrection : public Effect class Sharpen { public: - Sharpen(VOID) + Sharpen() { } @@ -289,7 +319,7 @@ class Sharpen class Tint : Effect { public: - Tint(VOID) + Tint() { }
5 years, 3 months
1
0
0
0
← Newer
1
2
3
4
5
6
...
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