2019-11-07 22:10:58 +01:00
|
|
|
// Copyright (c) Microsoft Corporation.
|
|
|
|
// Licensed under the MIT license.
|
|
|
|
|
|
|
|
import "../TerminalPage.idl";
|
2020-01-27 16:34:12 +01:00
|
|
|
import "../ShortcutActionDispatch.idl";
|
2020-06-12 00:41:16 +02:00
|
|
|
import "../IDirectKeyListener.idl";
|
2019-11-07 22:10:58 +01:00
|
|
|
|
|
|
|
namespace TerminalApp
|
|
|
|
{
|
|
|
|
enum LaunchMode
|
|
|
|
{
|
|
|
|
DefaultMode,
|
|
|
|
MaximizedMode,
|
2020-05-28 18:53:01 +02:00
|
|
|
FullscreenMode,
|
2019-11-07 22:10:58 +01:00
|
|
|
};
|
|
|
|
|
2020-07-01 21:43:28 +02:00
|
|
|
[default_interface] runtimeclass AppLogic : IDirectKeyListener, IDialogPresenter
|
2020-05-04 22:56:15 +02:00
|
|
|
{
|
2019-11-07 22:10:58 +01:00
|
|
|
AppLogic();
|
|
|
|
|
|
|
|
// For your own sanity, it's better to do setup outside the ctor.
|
|
|
|
// If you do any setup in the ctor that ends up throwing an exception,
|
|
|
|
// then it might look like TermApp just failed to activate, which will
|
|
|
|
// cause you to chase down the rabbit hole of "why is TermApp not
|
|
|
|
// registered?" when it definitely is.
|
|
|
|
void Create();
|
2019-11-26 01:30:45 +01:00
|
|
|
|
2019-12-09 20:07:08 +01:00
|
|
|
Boolean IsUwp();
|
2019-11-26 01:30:45 +01:00
|
|
|
void RunAsUwp();
|
2020-03-11 16:52:09 +01:00
|
|
|
Boolean IsElevated();
|
2019-11-07 22:10:58 +01:00
|
|
|
|
2020-01-27 16:34:12 +01:00
|
|
|
Int32 SetStartupCommandline(String[] commands);
|
2020-05-04 22:56:15 +02:00
|
|
|
String ParseCommandlineMessage { get; };
|
|
|
|
Boolean ShouldExitEarly { get; };
|
2020-01-27 16:34:12 +01:00
|
|
|
|
2019-11-07 22:10:58 +01:00
|
|
|
void LoadSettings();
|
|
|
|
Windows.UI.Xaml.UIElement GetRoot();
|
|
|
|
|
|
|
|
String Title { get; };
|
|
|
|
|
2020-04-07 20:35:05 +02:00
|
|
|
String ApplicationDisplayName { get; };
|
|
|
|
String ApplicationVersion { get; };
|
|
|
|
|
2019-11-07 22:10:58 +01:00
|
|
|
Windows.Foundation.Point GetLaunchDimensions(UInt32 dpi);
|
|
|
|
Windows.Foundation.Point GetLaunchInitialPositions(Int32 defaultInitialX, Int32 defaultInitialY);
|
|
|
|
Windows.UI.Xaml.ElementTheme GetRequestedTheme();
|
|
|
|
LaunchMode GetLaunchMode();
|
|
|
|
Boolean GetShowTabsInTitlebar();
|
2020-01-08 22:19:23 +01:00
|
|
|
Single CalcSnappedDimension(Boolean widthOrHeight, Single dimension);
|
2019-11-07 22:10:58 +01:00
|
|
|
void TitlebarClicked();
|
|
|
|
void WindowCloseButtonClicked();
|
|
|
|
|
2020-07-01 21:43:28 +02:00
|
|
|
// See IDialogPresenter and TerminalPage's DialogPresenter for more
|
|
|
|
// information.
|
|
|
|
Windows.Foundation.IAsyncOperation<Windows.UI.Xaml.Controls.ContentDialogResult> ShowDialog(Windows.UI.Xaml.Controls.ContentDialog dialog);
|
|
|
|
|
2019-11-07 22:10:58 +01:00
|
|
|
event Windows.Foundation.TypedEventHandler<Object, Windows.UI.Xaml.UIElement> SetTitleBarContent;
|
|
|
|
event Windows.Foundation.TypedEventHandler<Object, String> TitleChanged;
|
|
|
|
event Windows.Foundation.TypedEventHandler<Object, LastTabClosedEventArgs> LastTabClosed;
|
|
|
|
event Windows.Foundation.TypedEventHandler<Object, Windows.UI.Xaml.ElementTheme> RequestedThemeChanged;
|
|
|
|
event Windows.Foundation.TypedEventHandler<Object, ToggleFullscreenEventArgs> ToggleFullscreen;
|
2020-07-13 19:40:20 +02:00
|
|
|
event Windows.Foundation.TypedEventHandler<Object, ToggleFocusModeEventArgs> ToggleFocusMode;
|
2019-11-07 22:10:58 +01:00
|
|
|
}
|
|
|
|
}
|