Move TerminalSettings object from TerminalSettings project (Microsoft.Terminal.Settings) to TerminalApp project. `TerminalSettings` specifically operates as a bridge that exposes any necessary information to a TerminalControl. Closes #7139 Related Epic: #885 Related Spec: #6904 ## PR Checklist * [X] Closes #7139 * [X] CLA signed * [X] Tests ~added~/passed (no additional tests necessary) * [X] ~Documentation updated~ * [X] ~Schema updated~ ## Validation Steps Performed Deployed Windows Terminal and opened a few new tabs.
74 lines
3.2 KiB
Plaintext
74 lines
3.2 KiB
Plaintext
// Copyright (c) Microsoft Corporation.
|
|
// Licensed under the MIT license.
|
|
|
|
import "IMouseWheelListener.idl";
|
|
|
|
namespace Microsoft.Terminal.TerminalControl
|
|
{
|
|
delegate void TitleChangedEventArgs(String newTitle);
|
|
delegate void FontSizeChangedEventArgs(Int32 width, Int32 height, Boolean isInitialChange);
|
|
delegate void ScrollPositionChangedEventArgs(Int32 viewTop, Int32 viewHeight, Int32 bufferLength);
|
|
|
|
// C++/winrt makes it difficult to share this idl between two projects,
|
|
// Instead, we just pin the uuid and include it in both TermControl and App
|
|
// If you update this one, please update TerminalApp\IDirectKeyListener.idl.
|
|
// If you change this interface, please update the guid.
|
|
// If you press F7 or Alt and get a runtime error, go make sure both copies are the same.
|
|
[uuid("339e1a87-5315-4da6-96f0-565549b6472b")] interface IDirectKeyListener {
|
|
Boolean OnDirectKeyEvent(UInt32 vkey, Boolean down);
|
|
}
|
|
|
|
runtimeclass CopyToClipboardEventArgs
|
|
{
|
|
String Text { get; };
|
|
String Html { get; };
|
|
String Rtf { get; };
|
|
}
|
|
|
|
runtimeclass PasteFromClipboardEventArgs
|
|
{
|
|
void HandleClipboardData(String data);
|
|
}
|
|
|
|
[default_interface] runtimeclass TermControl : Windows.UI.Xaml.Controls.UserControl, IDirectKeyListener, IMouseWheelListener
|
|
{
|
|
TermControl(Microsoft.Terminal.Settings.IControlSettings settings, Microsoft.Terminal.TerminalConnection.ITerminalConnection connection);
|
|
|
|
static Windows.Foundation.Size GetProposedDimensions(Microsoft.Terminal.Settings.IControlSettings settings, UInt32 dpi);
|
|
|
|
void UpdateSettings(Microsoft.Terminal.Settings.IControlSettings newSettings);
|
|
|
|
event TitleChangedEventArgs TitleChanged;
|
|
event FontSizeChangedEventArgs FontSizeChanged;
|
|
event Windows.Foundation.TypedEventHandler<TermControl, CopyToClipboardEventArgs> CopyToClipboard;
|
|
event Windows.Foundation.TypedEventHandler<TermControl, PasteFromClipboardEventArgs> PasteFromClipboard;
|
|
|
|
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<TermControl, IInspectable> ConnectionStateChanged;
|
|
Microsoft.Terminal.TerminalConnection.ConnectionState ConnectionState { get; };
|
|
|
|
String Title { get; };
|
|
|
|
Boolean CopySelectionToClipboard(Boolean collapseText);
|
|
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();
|
|
event ScrollPositionChangedEventArgs ScrollPositionChanged;
|
|
|
|
void CreateSearchBoxControl();
|
|
|
|
void AdjustFontSize(Int32 fontSizeDelta);
|
|
void ResetFontSize();
|
|
|
|
void ToggleRetroEffect();
|
|
}
|
|
}
|