-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add alternate system color experimental feature (#105525)
Allows overriding KnownColor system values with an alternate set, which in the initial iteration is "dark mode" colors. Enables "dark mode" features in Windows Forms. This is from the approved part of dotnet/winforms#7641 with further naming iteration done offline with API review.
- Loading branch information
1 parent
4c58b5a
commit 63cb7ec
Showing
10 changed files
with
230 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
src/libraries/Common/src/Interop/Windows/User32/Interop.HIGHCONTRASTW.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
using System; | ||
using System.Runtime.InteropServices; | ||
|
||
internal static partial class Interop | ||
{ | ||
internal static partial class User32 | ||
{ | ||
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] | ||
public unsafe partial struct HIGHCONTRASTW | ||
{ | ||
internal uint cbSize; | ||
internal HIGHCONTRASTW_FLAGS dwFlags; | ||
internal void* lpszDefaultScheme; | ||
} | ||
|
||
[Flags] | ||
public enum HIGHCONTRASTW_FLAGS : uint | ||
{ | ||
HCF_HIGHCONTRASTON = 0x00000001, | ||
HCF_AVAILABLE = 0x00000002, | ||
HCF_HOTKEYACTIVE = 0x00000004, | ||
HCF_CONFIRMHOTKEY = 0x00000008, | ||
HCF_HOTKEYSOUND = 0x00000010, | ||
HCF_INDICATOR = 0x00000020, | ||
HCF_HOTKEYAVAILABLE = 0x00000040, | ||
HCF_OPTION_NOTHEMECHANGE = 0x00001000 | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.