terminal/src/cascadia/TerminalCore/ICoreAppearance.idl
2021-09-10 02:20:56 +02:00

72 lines
2.1 KiB
Plaintext

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
namespace Microsoft.Terminal.Core
{
enum CursorStyle
{
Vintage,
Bar,
Underscore,
DoubleUnderscore,
FilledBox,
EmptyBox
};
// TerminalCore declares its own Color struct to avoid depending
// on Windows.UI.Color and to avoid passing around unclothed uint32s.
// It is supported by til::color for conversions in and out of WinRT land.
struct Color
{
UInt8 R;
UInt8 G;
UInt8 B;
UInt8 A;
};
// TerminalCore declares its own Color struct to avoid depending on
// Windows.UI. Windows.Foundation.Point also exists, but it's composed of
// floating-point coordinates, when we almost always need integer coordinates.
// It is supported by til::point for conversions in and out of WinRT land.
struct Point
{
Int32 X;
Int32 Y;
};
// Same thing here, but with padding. Can't use Windows.UI.Thickness, so
// we'll declare our own.
struct Padding {
Double Left;
Double Top;
Double Right;
Double Bottom;
};
// This is a projection of Microsoft::Terminal::Core::ControlKeyStates,
// for conversions in and out of WinRT land.
struct ControlKeyStates
{
UInt32 Value;
};
declare
{
// Forward declare this parameterized specialization so that it lives
// in TerminalCore instead of being flung to the winds of all IDL dependents.
interface Windows.Foundation.IReference<Microsoft.Terminal.Core.Color>;
interface Windows.Foundation.IReference<Microsoft.Terminal.Core.Point>;
}
interface ICoreAppearance
{
Microsoft.Terminal.Core.Color DefaultForeground;
Microsoft.Terminal.Core.Color DefaultBackground;
Microsoft.Terminal.Core.Color[] ColorTable();
Microsoft.Terminal.Core.Color CursorColor;
CursorStyle CursorShape;
UInt32 CursorHeight;
Boolean IntenseIsBright;
};
}