microsoft / win32metadata

Tooling to generate metadata for Win32 APIs in the Windows SDK.
Other
1.32k stars 112 forks source link

RichEdit constants to enum #1708

Open elachlan opened 11 months ago

elachlan commented 11 months ago

There are several constants that would be nice to group to enums for ease of use/access.

Is the policy to leave constants alone for any values used for input/output to SendMessage?

These are a good example, where in winforms we limit private methods that call SendMessage with an enum.

Is this something win32metadata wants to do, or would you rather the constants?

Winforms Related: https://github.com/dotnet/winforms/issues/9823

mikebattista commented 11 months ago

Can you clarify what enums you want and where they would be applied or not?

elachlan commented 11 months ago

They are constants used in SendMessage, which means they wouldn't be applied to it. They would only be a grouping of constants.

Edit: I can do the PR for it, but just wanted to check whether or not its something the team want.

mikebattista commented 11 months ago

Thanks. Creating enums to group them seems ok assuming that doesn't introduce any usability problems and only improves usability.

elachlan commented 11 months ago

@riverar would this cause problems for the rust projections?

riverar commented 11 months ago

@elachlan No problems anticipated. The Rust projection unpacks fictitious enums and emits constants. The names just need to remain unique both inside and outside the enum.

mikebattista commented 10 months ago

@elachlan are you still planning to tackle this?

riverar commented 2 months ago

Following up, @elachlan, is this still something you want to tackle?

elachlan commented 2 months ago

Happy to have someone else do it.