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

LCS_WINDOWS_COLOR_SPACE and LCS_sRGB are missing for LcsCsType enum constants #1740

Closed
rhysd opened this issue Nov 21, 2023 · 6 comments
Closed
Assignees
Labels
enhancement New feature or request

Comments

@rhysd
Copy link

rhysd commented Nov 21, 2023

Suggestion

LOGCOLORSPACEA struct has lcsCSType field. The field expects LCS_CALIBRATED_RGB or LCS_sRGB or LCS_WINDOWS_COLOR_SPACE enum constants.

https://learn.microsoft.com/en-us/windows/win32/api/wingdi/ns-wingdi-logcolorspacea

windows-rs only defines LCS_CALIBRATED_RGB. Can we add LCS_sRGB and LCS_WINDOWS_COLOR_SPACE constants?

winapi crate defines these constants:

@rhysd rhysd added the enhancement New feature or request label Nov 21, 2023
@kennykerr
Copy link
Contributor

Looks like we're missing these from the Win32 metadata. Will transfer this issue for their consideration.

@kennykerr kennykerr transferred this issue from microsoft/windows-rs Nov 21, 2023
@rhysd
Copy link
Author

rhysd commented Nov 21, 2023

Thank you for handling this issue. I got it.

@mikebattista mikebattista self-assigned this Nov 30, 2023
@mikebattista
Copy link
Contributor

#define LCS_sRGB 'sRGB'
#define LCS_WINDOWS_COLOR_SPACE 'Win ' // Windows default color space
#pragma region Application Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
typedef LONG LCSCSTYPE;

Are these strings treated as ints? If so, what's their value?

@rhysd
Copy link
Author

rhysd commented Nov 30, 2023

@rhysd
Copy link
Author

rhysd commented Dec 1, 2023

what's their value?

According to winapi crate,

pub const LCS_sRGB: LCSCSTYPE = 0x7352_4742;
pub const LCS_WINDOWS_COLOR_SPACE: LCSCSTYPE = 0x5769_6E20;

@mikebattista
Copy link
Contributor

Thanks. I will group these all into an LCSCSTYPE enum.

mikebattista added a commit that referenced this issue Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants