Skip to content

Commit 1568f90

Browse files
renamed System to Auto, removed link from docstring, removed Kind from enum
1 parent 9df5bb9 commit 1568f90

1 file changed

Lines changed: 18 additions & 18 deletions

File tree

specs/PreferredColorScheme.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ to any WebView2's which are associated with this profile.
2020
```cpp
2121
wil::com_ptr<ICoreWebView2> m_webView;
2222

23-
void ViewComponent::SetPreferredColorScheme(COREWEBVIEW2_PREFERRED_COLOR_SCHEME_KIND value)
23+
void ViewComponent::SetPreferredColorScheme(COREWEBVIEW2_PREFERRED_COLOR_SCHEME value)
2424
{
2525
wil::com_ptr<ICoreWebView2_7> webView7;
2626
webView7 = m_webView.try_query<ICoreWebView2_7>();
@@ -45,7 +45,7 @@ void ViewComponent::SetPreferredColorScheme(COREWEBVIEW2_PREFERRED_COLOR_SCHEME_
4545
4646
private CoreWebView2 m_webView;
4747
48-
void SetPreferredColorScheme(CoreWebView2PreferredColorSchemeKind value)
48+
void SetPreferredColorScheme(CoreWebView2PreferredColorScheme value)
4949
{
5050
m_webView.Profile.PreferredColorScheme = value;
5151
}
@@ -63,42 +63,42 @@ interface ICoreWebView2Profile3 : ICoreWebView2Profile2 {
6363
/// ['prefers-color-scheme'](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme)
6464
/// CSS media feature for websites to respond to.
6565
///
66-
/// The default value for this is COREWEBVIEW2_PREFERRED_COLOR_SCHEME_KIND_SYSTEM, which will
66+
/// The default value for this is COREWEBVIEW2_PREFERRED_COLOR_SCHEME_AUTO, which will
6767
/// follow whatever color scheme the OS is currently set to.
6868
///
6969
/// \snippet ViewComponent.cpp SetPreferredColorScheme
7070
/// Returns the value of the `PreferredColorScheme` property.
7171
[propget] HRESULT PreferredColorScheme(
72-
[out, retval] COREWEBVIEW2_PREFERRED_COLOR_SCHEME_KIND* value);
72+
[out, retval] COREWEBVIEW2_PREFERRED_COLOR_SCHEME* value);
7373

7474
/// Sets the `PreferredColorScheme` property.
7575
[propput] HRESULT PreferredColorScheme(
76-
[in] COREWEBVIEW2_PREFERRED_COLOR_SCHEME_KIND value);
76+
[in] COREWEBVIEW2_PREFERRED_COLOR_SCHEME value);
7777
}
7878

79-
/// An enum to represent the options for WebView2 Color Scheme: system, light, or dark.
79+
/// An enum to represent the options for WebView2 Color Scheme: auto, light, or dark.
8080
[v1_enum]
81-
typedef enum COREWEBVIEW2_PREFERRED_COLOR_SCHEME_KIND {
82-
/// System color scheme
83-
COREWEBVIEW2_PREFERRED_COLOR_SCHEME_KIND_SYSTEM,
81+
typedef enum COREWEBVIEW2_PREFERRED_COLOR_SCHEME {
82+
/// Auto color scheme
83+
COREWEBVIEW2_PREFERRED_COLOR_SCHEME_AUTO,
8484

8585
/// Light color scheme
86-
COREWEBVIEW2_PREFERRED_COLOR_SCHEME_KIND_LIGHT,
86+
COREWEBVIEW2_PREFERRED_COLOR_SCHEME_LIGHT,
8787

8888
/// Dark color scheme
89-
COREWEBVIEW2_PREFERRED_COLOR_SCHEME_KIND_DARK
90-
} COREWEBVIEW2_PREFERRED_COLOR_SCHEME_KIND;
89+
COREWEBVIEW2_PREFERRED_COLOR_SCHEME_DARK
90+
} COREWEBVIEW2_PREFERRED_COLOR_SCHEME;
9191
```
9292

9393
### C#
9494
```c#
9595
namespace Microsoft.Web.WebView2.Core
9696
{
97-
[doc_string("An enum to represent the options for WebView2 Preferred Color Scheme: system, light, or dark.")]
98-
enum CoreWebView2PreferredColorSchemeKind
97+
[doc_string("An enum to represent the options for WebView2 Preferred Color Scheme: auto, light, or dark.")]
98+
enum CoreWebView2PreferredColorScheme
9999
{
100-
[doc_string("System color scheme.")]
101-
System = 0,
100+
[doc_string("Auto color scheme.")]
101+
Auto = 0,
102102
[doc_string("Light color scheme.")]
103103
Light = 1,
104104
[doc_string("Dark color scheme.")]
@@ -112,8 +112,8 @@ namespace Microsoft.Web.WebView2.Core
112112
113113
[interface_name("Microsoft.Web.WebView2.Core.ICoreWebView2Profile3")]
114114
{
115-
[doc_string("The PreferredColorScheme property sets the overall color scheme of the WebView2's associated with this profile. This sets the color scheme for WebView2 UI like dialogs, prompts, and context menus by setting the ['prefers-color-scheme'](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme) CSS media feature for websites to respond to. The default value for this is CoreWebView2PreferredColorSchemeKind.System, which will follow whatever color scheme the OS is currently set to.")]
116-
CoreWebView2PreferredColorSchemeKind PreferredColorScheme { get; set };
115+
[doc_string("The PreferredColorScheme property sets the overall color scheme of the WebView2's associated with this profile. This sets the color scheme for WebView2 UI like dialogs, prompts, and context menus by setting the prefers-color-scheme CSS media feature for websites to respond to. The default value for this is CoreWebView2PreferredColorScheme.Auto, which will follow whatever color scheme the OS is currently set to.")]
116+
CoreWebView2PreferredColorScheme PreferredColorScheme { get; set };
117117
}
118118
}
119119
}

0 commit comments

Comments
 (0)