terminal/src/cascadia/TerminalSettingsModel/GlobalAppSettings.idl
Mike Griese 9dc38ad0f5
Add an animation to pane entrance/exit (#7364)
Adds an entrance animation when panes are created. This animation can be
disabled with the `disableAnimations` global setting. 

Although the XAML animation documentation was pretty heavy on the _do it
in XAML_ route, our panes are created pretty much entirely in code, so
we've got to create the animations in code as well. 

200ms as the duration of the animation was picked _super_ arbitrarily.
300ms felt too long, and 166ms felt like it was only visible for a
single frame. 

see also:
* [Motion in practice](https://docs.microsoft.com/en-us/windows/uwp/design/motion/motion-in-practice)
* [This example](https://docs.microsoft.com/en-us/uwp/api/Windows.UI.Xaml.Media.Animation.Storyboard?view=winrt-19041#examples) what what I ended up using, albeit ported to cppwinrt.
* [`Timeline.AllowDependentAnimations`](https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.media.animation.timeline.allowdependentanimations?view=winrt-19041#Windows_UI_Xaml_Media_Animation_Timeline_AllowDependentAnimations)
* [easing functions](https://docs.microsoft.com/en-us/windows/uwp/design/motion/key-frame-and-easing-function-animations#easing-functions)

## Validation Steps Performed
Man have I been opening panes

Closes #1001
Closes #7366
2020-10-09 23:06:40 +00:00

64 lines
2 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,
};
[default_interface] runtimeclass GlobalAppSettings {
Guid DefaultProfile;
String UnparsedDefaultProfile();
Int32 InitialRows;
Int32 InitialCols;
Boolean AlwaysShowTabs;
Boolean ShowTitleInTitlebar;
Boolean ConfirmCloseAllTabs;
Windows.UI.Xaml.ElementTheme Theme;
Microsoft.UI.Xaml.Controls.TabViewWidthMode TabWidthMode;
Boolean ShowTabsInTitlebar;
String WordDelimiters;
Boolean CopyOnSelect;
Microsoft.Terminal.TerminalControl.CopyFormat CopyFormatting;
Boolean WarnAboutLargePaste;
Boolean WarnAboutMultiLinePaste;
LaunchPosition InitialPosition;
LaunchMode LaunchMode;
Boolean SnapToGridOnResize;
Boolean ForceFullRepaintRendering;
Boolean SoftwareRendering;
Boolean ForceVTInput;
Boolean DebugFeaturesEnabled;
Boolean StartOnUserLogin;
Boolean AlwaysOnTop;
Boolean UseTabSwitcher;
Boolean DisableAnimations;
Windows.Foundation.Collections.IMapView<String, ColorScheme> ColorSchemes();
void AddColorScheme(ColorScheme scheme);
KeyMapping KeyMap();
Windows.Foundation.Collections.IMapView<String, Command> Commands();
}
}