This pull request adds an appearance configuration object to our settings model and app lib, allowing the control to be rendered differently depending on its state, and then uses it to add support for an "unfocused" appearance that the terminal will use when it's not in focus. To accomplish this, we isolated the appearance-related settings from Profile (into AppearanceConfig) and TerminalSettings (into the IControlAppearance and ICoreAppearance interfaces). A bunch of work was done to make inheritance work. The unfocused appearance inherits from the focused one _for that profile_. This is important: If you define a defaults.unfocusedAppearance, it will apply all of defaults' settings to any leaf profile when a terminal in that profile is out of focus. Specified in #8345 Closes #3062 Closes #2316
82 lines
3.6 KiB
Plaintext
82 lines
3.6 KiB
Plaintext
// Copyright (c) Microsoft Corporation.
|
|
// Licensed under the MIT license.
|
|
|
|
import "IMouseWheelListener.idl";
|
|
import "IControlSettings.idl";
|
|
import "IDirectKeyListener.idl";
|
|
import "EventArgs.idl";
|
|
|
|
namespace Microsoft.Terminal.Control
|
|
{
|
|
|
|
[default_interface] runtimeclass TermControl : Windows.UI.Xaml.Controls.UserControl, IDirectKeyListener, IMouseWheelListener
|
|
{
|
|
TermControl(Microsoft.Terminal.Control.IControlSettings settings, Microsoft.Terminal.TerminalConnection.ITerminalConnection connection);
|
|
|
|
static Windows.Foundation.Size GetProposedDimensions(Microsoft.Terminal.Control.IControlSettings settings, UInt32 dpi);
|
|
|
|
void UpdateSettings();
|
|
|
|
Microsoft.Terminal.Control.IControlSettings Settings { get; };
|
|
Microsoft.Terminal.Control.IControlAppearance UnfocusedAppearance;
|
|
|
|
event Windows.Foundation.TypedEventHandler<Object, TitleChangedEventArgs> TitleChanged;
|
|
event FontSizeChangedEventArgs FontSizeChanged;
|
|
event Windows.Foundation.TypedEventHandler<Object, CopyToClipboardEventArgs> CopyToClipboard;
|
|
event Windows.Foundation.TypedEventHandler<Object, PasteFromClipboardEventArgs> PasteFromClipboard;
|
|
event Windows.Foundation.TypedEventHandler<Object, OpenHyperlinkEventArgs> OpenHyperlink;
|
|
event Windows.Foundation.TypedEventHandler<Object, Object> SetTaskbarProgress;
|
|
event Windows.Foundation.TypedEventHandler<Object, NoticeEventArgs> RaiseNotice;
|
|
event Windows.Foundation.TypedEventHandler<Object, Object> WarningBell;
|
|
event Windows.Foundation.TypedEventHandler<Object, Object> HidePointerCursor;
|
|
event Windows.Foundation.TypedEventHandler<Object, Object> RestorePointerCursor;
|
|
|
|
event ScrollPositionChangedEventArgs ScrollPositionChanged;
|
|
event Windows.Foundation.TypedEventHandler<Object, Object> TabColorChanged;
|
|
event Windows.Foundation.TypedEventHandler<Object, Object> ReadOnlyChanged;
|
|
event Windows.Foundation.TypedEventHandler<Object, Object> FocusFollowMouseRequested;
|
|
|
|
event Windows.Foundation.TypedEventHandler<TermControl, Windows.UI.Xaml.RoutedEventArgs> Initialized;
|
|
// This is an event handler forwarder for the underlying connection.
|
|
// We expose this and ConnectionState here so that it might eventually be data bound.
|
|
event Windows.Foundation.TypedEventHandler<Object, IInspectable> ConnectionStateChanged;
|
|
|
|
Microsoft.Terminal.TerminalConnection.ConnectionState ConnectionState { get; };
|
|
|
|
String Title { get; };
|
|
|
|
Boolean BracketedPasteEnabled { get; };
|
|
Boolean CopySelectionToClipboard(Boolean singleLine, Windows.Foundation.IReference<CopyFormat> formats);
|
|
void PasteTextFromClipboard();
|
|
void Close();
|
|
Windows.Foundation.Size CharacterDimensions { get; };
|
|
Windows.Foundation.Size MinimumSize { get; };
|
|
Single SnapDimensionToGrid(Boolean widthOrHeight, Single dimension);
|
|
|
|
void ScrollViewport(Int32 viewTop);
|
|
Int32 GetScrollOffset();
|
|
Int32 GetViewHeight();
|
|
|
|
void CreateSearchBoxControl();
|
|
|
|
void SearchMatch(Boolean goForward);
|
|
|
|
void AdjustFontSize(Int32 fontSizeDelta);
|
|
void ResetFontSize();
|
|
|
|
void ToggleShaderEffects();
|
|
void SendInput(String input);
|
|
|
|
void TaskbarProgressChanged();
|
|
UInt64 TaskbarState { get; };
|
|
UInt64 TaskbarProgress { get; };
|
|
|
|
String WorkingDirectory { get; };
|
|
|
|
Windows.Foundation.IReference<Windows.UI.Color> TabColor { get; };
|
|
|
|
Boolean ReadOnly { get; };
|
|
void ToggleReadOnly();
|
|
}
|
|
}
|