b603929214
## Summary of the Pull Request Introduces `IInheritable` as an interface that helps move cascading settings into the Terminal Settings Model. `GlobalAppSettings` and `Profile` both are now `IInheritable`. `CascadiaSettings` was updated to `CreateChild()` for globals and each profile when we are loading the JSON data. IInheritable does most of the heavy lifting. It introduces a two new macros and the interface. The macros help implement the fallback functionality for nullable and non-nullable settings. ## References #7876 - Spec Addendum #6904 - TSM Spec #1564 - Settings UI #7876 - `Copy()` needs to be updated to include _parent
139 lines
3.9 KiB
Plaintext
139 lines
3.9 KiB
Plaintext
// Copyright (c) Microsoft Corporation.
|
|
// Licensed under the MIT license.
|
|
|
|
import "ColorScheme.idl";
|
|
import "KeyMapping.idl";
|
|
import "Command.idl";
|
|
|
|
namespace Microsoft.Terminal.Settings.Model
|
|
{
|
|
// MIDL 3 allows for structs to hold nullable types
|
|
// Though IReference is a WinRT object, MIDL 3
|
|
// handles all of the ownership logic for us.
|
|
// Docs: https://docs.microsoft.com/en-us/uwp/midl-3/intro#types
|
|
struct LaunchPosition
|
|
{
|
|
Windows.Foundation.IReference<Int64> X;
|
|
Windows.Foundation.IReference<Int64> Y;
|
|
};
|
|
|
|
enum LaunchMode
|
|
{
|
|
DefaultMode,
|
|
MaximizedMode,
|
|
FullscreenMode,
|
|
FocusMode,
|
|
MaximizedFocusMode,
|
|
};
|
|
|
|
[default_interface] runtimeclass GlobalAppSettings {
|
|
Guid DefaultProfile;
|
|
Boolean HasUnparsedDefaultProfile();
|
|
void ClearUnparsedDefaultProfile();
|
|
String UnparsedDefaultProfile;
|
|
|
|
Boolean HasInitialRows();
|
|
void ClearInitialRows();
|
|
Int32 InitialRows;
|
|
|
|
Boolean HasInitialCols();
|
|
void ClearInitialCols();
|
|
Int32 InitialCols;
|
|
|
|
Boolean HasAlwaysShowTabs();
|
|
void ClearAlwaysShowTabs();
|
|
Boolean AlwaysShowTabs;
|
|
|
|
Boolean HasShowTitleInTitlebar();
|
|
void ClearShowTitleInTitlebar();
|
|
Boolean ShowTitleInTitlebar;
|
|
|
|
Boolean HasConfirmCloseAllTabs();
|
|
void ClearConfirmCloseAllTabs();
|
|
Boolean ConfirmCloseAllTabs;
|
|
|
|
Boolean HasTheme();
|
|
void ClearTheme();
|
|
Windows.UI.Xaml.ElementTheme Theme;
|
|
|
|
Boolean HasTabWidthMode();
|
|
void ClearTabWidthMode();
|
|
Microsoft.UI.Xaml.Controls.TabViewWidthMode TabWidthMode;
|
|
|
|
Boolean HasShowTabsInTitlebar();
|
|
void ClearShowTabsInTitlebar();
|
|
Boolean ShowTabsInTitlebar;
|
|
|
|
Boolean HasWordDelimiters();
|
|
void ClearWordDelimiters();
|
|
String WordDelimiters;
|
|
|
|
Boolean HasCopyOnSelect();
|
|
void ClearCopyOnSelect();
|
|
Boolean CopyOnSelect;
|
|
|
|
Boolean HasCopyFormatting();
|
|
void ClearCopyFormatting();
|
|
Microsoft.Terminal.TerminalControl.CopyFormat CopyFormatting;
|
|
|
|
Boolean HasWarnAboutLargePaste();
|
|
void ClearWarnAboutLargePaste();
|
|
Boolean WarnAboutLargePaste;
|
|
|
|
Boolean HasWarnAboutMultiLinePaste();
|
|
void ClearWarnAboutMultiLinePaste();
|
|
Boolean WarnAboutMultiLinePaste;
|
|
|
|
Boolean HasInitialPosition();
|
|
void ClearInitialPosition();
|
|
LaunchPosition InitialPosition;
|
|
|
|
Boolean HasLaunchMode();
|
|
void ClearLaunchMode();
|
|
LaunchMode LaunchMode;
|
|
|
|
Boolean HasSnapToGridOnResize();
|
|
void ClearSnapToGridOnResize();
|
|
Boolean SnapToGridOnResize;
|
|
|
|
Boolean HasForceFullRepaintRendering();
|
|
void ClearForceFullRepaintRendering();
|
|
Boolean ForceFullRepaintRendering;
|
|
|
|
Boolean HasSoftwareRendering();
|
|
void ClearSoftwareRendering();
|
|
Boolean SoftwareRendering;
|
|
|
|
Boolean HasForceVTInput();
|
|
void ClearForceVTInput();
|
|
Boolean ForceVTInput;
|
|
|
|
Boolean HasDebugFeaturesEnabled();
|
|
void ClearDebugFeaturesEnabled();
|
|
Boolean DebugFeaturesEnabled;
|
|
|
|
Boolean HasStartOnUserLogin();
|
|
void ClearStartOnUserLogin();
|
|
Boolean StartOnUserLogin;
|
|
|
|
Boolean HasAlwaysOnTop();
|
|
void ClearAlwaysOnTop();
|
|
Boolean AlwaysOnTop;
|
|
|
|
Boolean HasUseTabSwitcher();
|
|
void ClearUseTabSwitcher();
|
|
Boolean UseTabSwitcher;
|
|
|
|
Boolean HasDisableAnimations();
|
|
void ClearDisableAnimations();
|
|
Boolean DisableAnimations;
|
|
|
|
Windows.Foundation.Collections.IMapView<String, ColorScheme> ColorSchemes();
|
|
void AddColorScheme(ColorScheme scheme);
|
|
|
|
KeyMapping KeyMap();
|
|
|
|
Windows.Foundation.Collections.IMapView<String, Command> Commands();
|
|
}
|
|
}
|