Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Match types of FOREGROUND_BLUE etc. with SetConsoleTextAttributes #967

Closed
sunfishcode opened this issue Jun 17, 2022 · 2 comments
Assignees
Labels
enhancement New feature or request usability Touch-up to improve the user experience for a language projection

Comments

@sunfishcode
Copy link

sunfishcode commented Jun 17, 2022

Motivation

SetConsoleTextAttribute' wattributes argument is declared with type u16.

The character attributes that one passes to it, such as FOREGROUND_BLUE, are declared with type u32.

It would be convenient if these constants were declared with type u32 to obviate the need for casting.

Drawbacks

No response

Rationale and alternatives

No response

Additional context

In the winapi crate, FOREGROUND_BLUE is declared with type WORD aka u16.

@sunfishcode sunfishcode added the enhancement New feature or request label Jun 17, 2022
@kennykerr
Copy link
Contributor

I think you meant SetConsoleTextAttribute. Transferring to the metadata repo for resolution.

@kennykerr kennykerr transferred this issue from microsoft/windows-rs Jun 17, 2022
@mikebattista mikebattista self-assigned this Aug 1, 2022
@mikebattista mikebattista added the usability Touch-up to improve the user experience for a language projection label Aug 1, 2022
@mikebattista
Copy link
Contributor

Windows.Win32.System.Console.CONSOLE_SCREEN_BUFFER_INFO.wAttributes...System.UInt16 => Windows.Win32.System.Console.CONSOLE_CHARACTER_ATTRIBUTES
Windows.Win32.System.Console.CONSOLE_SCREEN_BUFFER_INFOEX.wAttributes...System.UInt16 => Windows.Win32.System.Console.CONSOLE_CHARACTER_ATTRIBUTES
Windows.Win32.System.Console.CONSOLE_CHARACTER_ATTRIBUTES not found in 1st winmd
Windows.Win32.System.Console.Apis.FOREGROUND_BLUE not found in 2nd winmd
Windows.Win32.System.Console.Apis.FOREGROUND_GREEN not found in 2nd winmd
Windows.Win32.System.Console.Apis.FOREGROUND_RED not found in 2nd winmd
Windows.Win32.System.Console.Apis.FOREGROUND_INTENSITY not found in 2nd winmd
Windows.Win32.System.Console.Apis.BACKGROUND_BLUE not found in 2nd winmd
Windows.Win32.System.Console.Apis.BACKGROUND_GREEN not found in 2nd winmd
Windows.Win32.System.Console.Apis.BACKGROUND_RED not found in 2nd winmd
Windows.Win32.System.Console.Apis.BACKGROUND_INTENSITY not found in 2nd winmd
Windows.Win32.System.Console.Apis.COMMON_LVB_LEADING_BYTE not found in 2nd winmd
Windows.Win32.System.Console.Apis.COMMON_LVB_TRAILING_BYTE not found in 2nd winmd
Windows.Win32.System.Console.Apis.COMMON_LVB_GRID_HORIZONTAL not found in 2nd winmd
Windows.Win32.System.Console.Apis.COMMON_LVB_GRID_LVERTICAL not found in 2nd winmd
Windows.Win32.System.Console.Apis.COMMON_LVB_GRID_RVERTICAL not found in 2nd winmd
Windows.Win32.System.Console.Apis.COMMON_LVB_REVERSE_VIDEO not found in 2nd winmd
Windows.Win32.System.Console.Apis.COMMON_LVB_UNDERSCORE not found in 2nd winmd
Windows.Win32.System.Console.Apis.COMMON_LVB_SBCSDBCS not found in 2nd winmd
Windows.Win32.System.Console.Apis.SetConsoleTextAttribute : wAttributes...UInt16 => CONSOLE_CHARACTER_ATTRIBUTES

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request usability Touch-up to improve the user experience for a language projection
Projects
None yet
Development

No branches or pull requests

3 participants