mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-04 10:22:55 +00:00
Core - Add CompositionUnderline.Style (IME)
https://source.chromium.org/chromium/chromium/src/+/master:ui/base/ime/win/imm32_manager.cc;l=82;drc=c70af83bc44f6829277cdc3621e7015d6e0d7530;bpv=1;bpt=1?q=GCS_COMPCLAUSE&ss=chromium%2Fchromium%2Fsrc Resolves #3107
This commit is contained in:
@@ -499,6 +499,7 @@ void CefBrowserHostWrapper::ImeSetComposition(String^ text, cli::array<Compositi
|
||||
c.color = underline.Color;
|
||||
c.background_color = underline.BackgroundColor;
|
||||
c.thick = (int)underline.Thick;
|
||||
c.style = (cef_composition_underline_style_t)underline.Style;
|
||||
underlinesVector.push_back(c);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,6 +104,7 @@
|
||||
<Compile Include="CdmRegistration.cs" />
|
||||
<Compile Include="DefaultApp.cs" />
|
||||
<Compile Include="DevToolsExtensions.cs" />
|
||||
<Compile Include="Enums\CompositionUnderlineStyle.cs" />
|
||||
<Compile Include="Enums\SchemeOptions.cs" />
|
||||
<Compile Include="Internals\CefThread.cs" />
|
||||
<Compile Include="Internals\FreezableBase.cs" />
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
// Copyright © 2020 The CefSharp Authors. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
namespace CefSharp.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// Composition underline style.
|
||||
/// </summary>
|
||||
public enum CompositionUnderlineStyle
|
||||
{
|
||||
/// <summary>
|
||||
/// Solid
|
||||
/// </summary>
|
||||
Solid,
|
||||
/// <summary>
|
||||
/// Dot
|
||||
/// </summary>
|
||||
Dot,
|
||||
/// <summary>
|
||||
/// Dash
|
||||
/// </summary>
|
||||
Dash,
|
||||
/// <summary>
|
||||
/// None
|
||||
/// </summary>
|
||||
None
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,8 @@
|
||||
//
|
||||
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
using CefSharp.Enums;
|
||||
|
||||
namespace CefSharp.Structs
|
||||
{
|
||||
/// <summary>
|
||||
@@ -30,6 +32,11 @@ namespace CefSharp.Structs
|
||||
/// </summary>
|
||||
public bool Thick { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Style
|
||||
/// </summary>
|
||||
public CompositionUnderlineStyle Style { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Constructor.
|
||||
/// </summary>
|
||||
@@ -47,6 +54,26 @@ namespace CefSharp.Structs
|
||||
BackgroundColor = backGroundColor;
|
||||
Thick = thick;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor.
|
||||
/// </summary>
|
||||
/// <param name="range">Underline character range.</param>
|
||||
/// <param name="color">Text color. 32-bit ARGB color value, not premultiplied. The color components are always in a known order.
|
||||
/// Equivalent to the SkColor type.</param>
|
||||
/// <param name="backGroundColor">Background color. 32-bit ARGB color value, not premultiplied. The color components are always in
|
||||
/// a known order. Equivalent to the SkColor type.</param>
|
||||
/// <param name="thick">True for thickunderline.</param>
|
||||
/// <param name="style">Style</param>
|
||||
public CompositionUnderline(Range range, uint color, uint backGroundColor, bool thick, CompositionUnderlineStyle style)
|
||||
: this()
|
||||
{
|
||||
Range = range;
|
||||
Color = color;
|
||||
BackgroundColor = backGroundColor;
|
||||
Thick = thick;
|
||||
Style = style;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user