// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
import "TaskbarState.idl";

namespace TerminalApp
{
    delegate void LastTabClosedEventArgs();

    [default_interface] runtimeclass RenameWindowRequestedArgs
    {
        String ProposedName { get; };
    };

    interface IDialogPresenter
    {
        Windows.Foundation.IAsyncOperation<Windows.UI.Xaml.Controls.ContentDialogResult> ShowDialog(Windows.UI.Xaml.Controls.ContentDialog dialog);
    };

    [default_interface] runtimeclass TerminalPage : Windows.UI.Xaml.Controls.Page, Windows.UI.Xaml.Data.INotifyPropertyChanged
    {
        TerminalPage();

        // XAML bound properties
        String ApplicationDisplayName { get; };
        String ApplicationVersion { get; };

        Boolean FocusMode { get; };
        Boolean Fullscreen { get; };
        Boolean AlwaysOnTop { get; };

        void IdentifyWindow();
        String WindowName;
        UInt64 WindowId;
        String WindowNameForDisplay { get; };
        String WindowIdForDisplay { get; };
        void RenameFailed();
        Boolean IsQuakeWindow();

        // We cannot use the default XAML APIs because we want to make sure
        // that there's only one application-global dialog visible at a time,
        // and because of GH#5224.
        IDialogPresenter DialogPresenter;
        void ShowKeyboardServiceWarning();
        String KeyboardServiceDisabledText { get; };

        TaskbarState TaskbarState{ get; };

        event Windows.Foundation.TypedEventHandler<Object, String> TitleChanged;
        event Windows.Foundation.TypedEventHandler<Object, LastTabClosedEventArgs> LastTabClosed;
        event Windows.Foundation.TypedEventHandler<Object, Windows.UI.Xaml.UIElement> SetTitleBarContent;
        event Windows.Foundation.TypedEventHandler<Object, Object> FocusModeChanged;
        event Windows.Foundation.TypedEventHandler<Object, Object> FullscreenChanged;
        event Windows.Foundation.TypedEventHandler<Object, Object> AlwaysOnTopChanged;
        event Windows.Foundation.TypedEventHandler<Object, Windows.UI.Xaml.RoutedEventArgs> Initialized;
        event Windows.Foundation.TypedEventHandler<Object, Object> SetTaskbarProgress;
        event Windows.Foundation.TypedEventHandler<Object, Object> IdentifyWindowsRequested;
        event Windows.Foundation.TypedEventHandler<Object, RenameWindowRequestedArgs> RenameWindowRequested;
        event Windows.Foundation.TypedEventHandler<Object, Object> IsQuakeWindowChanged;
        event Windows.Foundation.TypedEventHandler<Object, Object> SummonWindowRequested;
        event Windows.Foundation.TypedEventHandler<Object, Object> CloseRequested;
        event Windows.Foundation.TypedEventHandler<Object, Object> OpenSystemMenu;
    }
}
