// Copyright (c) Microsoft Corporation. // Licensed under the MIT license. import "TerminalPage.idl"; import "ShortcutActionDispatch.idl"; import "IDirectKeyListener.idl"; namespace TerminalApp { struct InitialPosition { Int64 X; Int64 Y; }; [default_interface] runtimeclass FindTargetWindowResult { Int32 WindowId { get; }; String WindowName { get; }; }; delegate void SystemMenuItemHandler(); enum SystemMenuChangeAction { Add = 0, Remove = 1 }; [default_interface] runtimeclass SystemMenuChangeArgs { String Name { get; }; SystemMenuChangeAction Action { get; }; SystemMenuItemHandler Handler { get; }; }; [default_interface] runtimeclass AppLogic : IDirectKeyListener, IDialogPresenter { 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(); Boolean IsUwp(); void RunAsUwp(); Boolean IsElevated(); Boolean HasCommandlineArguments(); Boolean HasSettingsStartupActions(); Int32 SetStartupCommandline(String[] commands); Int32 ExecuteCommandline(String[] commands, String cwd); String ParseCommandlineMessage { get; }; Boolean ShouldExitEarly { get; }; void Quit(); void LoadSettings(); Windows.UI.Xaml.UIElement GetRoot(); void SetInboundListener(); String Title { get; }; Boolean FocusMode { get; }; Boolean Fullscreen { get; }; Boolean AlwaysOnTop { get; }; void IdentifyWindow(); String WindowName; UInt64 WindowId; void SetPersistedLayoutIdx(UInt32 idx); void SetNumberOfOpenWindows(UInt64 num); void RenameFailed(); void RequestExitFullscreen(); Boolean IsQuakeWindow(); Windows.Foundation.Size GetLaunchDimensions(UInt32 dpi); Boolean CenterOnLaunch { get; }; InitialPosition GetInitialPosition(Int64 defaultInitialX, Int64 defaultInitialY); Windows.UI.Xaml.ElementTheme GetRequestedTheme(); Microsoft.Terminal.Settings.Model.LaunchMode GetLaunchMode(); Boolean GetShowTabsInTitlebar(); Boolean GetInitialAlwaysOnTop(); Single CalcSnappedDimension(Boolean widthOrHeight, Single dimension); void TitlebarClicked(); void CloseWindow(Microsoft.Terminal.Settings.Model.LaunchPosition position); TaskbarState TaskbarState{ get; }; Boolean ShouldUsePersistedLayout(); String GetWindowLayoutJson(Microsoft.Terminal.Settings.Model.LaunchPosition position); void SaveWindowLayoutJsons(Windows.Foundation.Collections.IVector layouts); Boolean GetMinimizeToNotificationArea(); Boolean GetAlwaysShowNotificationIcon(); Boolean GetShowTitleInTitlebar(); FindTargetWindowResult FindTargetWindow(String[] args); Windows.Foundation.Collections.IMapView GlobalHotkeys(); // See IDialogPresenter and TerminalPage's DialogPresenter for more // information. Windows.Foundation.IAsyncOperation ShowDialog(Windows.UI.Xaml.Controls.ContentDialog dialog); void DismissDialog(); event Windows.Foundation.TypedEventHandler SetTitleBarContent; event Windows.Foundation.TypedEventHandler TitleChanged; event Windows.Foundation.TypedEventHandler LastTabClosed; event Windows.Foundation.TypedEventHandler RequestedThemeChanged; event Windows.Foundation.TypedEventHandler FocusModeChanged; event Windows.Foundation.TypedEventHandler FullscreenChanged; event Windows.Foundation.TypedEventHandler AlwaysOnTopChanged; event Windows.Foundation.TypedEventHandler RaiseVisualBell; event Windows.Foundation.TypedEventHandler SetTaskbarProgress; event Windows.Foundation.TypedEventHandler IdentifyWindowsRequested; event Windows.Foundation.TypedEventHandler RenameWindowRequested; event Windows.Foundation.TypedEventHandler SettingsChanged; event Windows.Foundation.TypedEventHandler IsQuakeWindowChanged; event Windows.Foundation.TypedEventHandler SummonWindowRequested; event Windows.Foundation.TypedEventHandler CloseRequested; event Windows.Foundation.TypedEventHandler OpenSystemMenu; event Windows.Foundation.TypedEventHandler QuitRequested; event Windows.Foundation.TypedEventHandler SystemMenuChangeRequested; } }