terminal/src/cascadia/TerminalSettingsModel/GlobalAppSettings.idl
Mike Griese 69318d3ba1
Add support for the windowingBehavior setting (#9118)
Adds support for the `windowingBehavior` global setting. This setting
controls how mutiple instances of `wt` behave in the absence of the `-w`
parameter. This setting has three values:
* `"useNew"`: (default) Multiple `wt` invocations (without the `-w`
  param) always create new windows. 
* `"useAnyExisting"`: When starting a new `wt`, we'll instead default to
  any existing windows. `wt -w -1` will still create new windows. 
* `"useExisting"`: Similar to `useAnyExisting`, but limits to
  windows on the current desktop. 

The IVirtualDesktopManager interface is _very_ limited. Hence why we
have to track the HWNDs manually, and ask if they're on the current
desktop. 

## Validation Steps Performed
I've been playing with it for a week now. 

References #5000
References projects/5
References #8898
Spec'd in #8135
Closes #2227
Closes https://github.com/microsoft/terminal/projects/5#card-51431448
Closes https://github.com/microsoft/terminal/projects/5#card-51431433
2021-02-19 21:09:17 +00:00

166 lines
4.6 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,
};
enum TabSwitcherMode
{
MostRecentlyUsed,
InOrder,
Disabled,
};
enum WindowingMode
{
UseNew,
UseAnyExisting,
UseExisting,
};
[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 HasTabSwitcherMode();
void ClearTabSwitcherMode();
TabSwitcherMode TabSwitcherMode;
Boolean HasDisableAnimations();
void ClearDisableAnimations();
Boolean DisableAnimations;
Windows.Foundation.Collections.IMapView<String, ColorScheme> ColorSchemes();
void AddColorScheme(ColorScheme scheme);
void RemoveColorScheme(String schemeName);
KeyMapping KeyMap();
Windows.Foundation.Collections.IMapView<String, Command> Commands();
Boolean HasStartupActions();
void ClearStartupActions();
String StartupActions();
Boolean HasFocusFollowMouse();
void ClearFocusFollowMouse();
Boolean FocusFollowMouse;
Boolean HasWindowingBehavior();
void ClearWindowingBehavior();
WindowingMode WindowingBehavior;
}
}