Skip to content

Changes R2_MODE and TEXT_ALIGN_OPTIONS - #1047

Merged
Steve Otteson (sotteson1) merged 2 commits into
microsoft:mainfrom
elachlan:r2_mode_textalign_changes
Aug 20, 2022
Merged

Steve Otteson (sotteson1) merged 2 commits into
microsoft:mainfrom
elachlan:r2_mode_textalign_changes

Conversation

@elachlan

@elachlan Lachlan Ennis (elachlan) commented Aug 15, 2022 •

Copy link
Copy Markdown
Contributor

Fixes:

Windows.Win32.Graphics.Gdi.TEXT_ALIGN_OPTIONS :  => [Flags]
Windows.Win32.Graphics.Gdi.Apis.GetROP2 : return...Int32 => R2_MODE
Windows.Win32.Graphics.Gdi.Apis.GetTextAlign : return...UInt32 => TEXT_ALIGN_OPTIONS

@elachlan

Copy link
Copy Markdown
Contributor Author

CC: Loni Tra (@lonitra)

Comment thread generation/WinSDK/enums.json Resolved
@elachlan

Copy link
Copy Markdown
Contributor Author

Cc: Andrew Arnott (@AArnott)

@sotteson1

Copy link
Copy Markdown
Contributor

The new system gets rid of the baseline .winmd, and instead updates a text file that will include the diff of your changes. (The output of the build is meant to help you automate your additions to this file.) Sorry to randomize your PR but I think this system will be a lot nicer for merges in the future.

@sotteson1 Steve Otteson (sotteson1) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for all the contributions you've been giving us!

@@ -14715,8 +14720,16 @@
},
{
"addUsesTo": "R2_MODE",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like we already have defined this in: generation\WinSDK\manual\Gdi.cs

It's possible this was done before we had the auto-populate working. You can change this to an auto-populate if you do the following:
Remove the definition of R2_MODE in generation\WinSDK\manual\Gdi.cs
Instead of "addUsesTo", use "name" to show we're defining a new type and not just adding uses to it.

@sotteson1
Steve Otteson (sotteson1) merged commit 0ed77cb into microsoft:main Aug 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consider Adding Enum Type for GetROP2/SetROP2 Consider Adding Enum Type for GetTextAlign/SetTextAlign

3 participants