// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

#include "IInheritable.idl.h"

import "ColorScheme.idl";
import "ActionMap.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 WindowingMode
    {
        UseNew,
        UseAnyExisting,
        UseExisting,
    };

    [default_interface] runtimeclass GlobalAppSettings {
        Guid DefaultProfile;
        INHERITABLE_SETTING(String, UnparsedDefaultProfile);

        INHERITABLE_SETTING(Int32, InitialRows);
        INHERITABLE_SETTING(Int32, InitialCols);
        INHERITABLE_SETTING(Boolean, AlwaysShowTabs);
        INHERITABLE_SETTING(Boolean, ShowTitleInTitlebar);
        INHERITABLE_SETTING(Boolean, ConfirmCloseAllTabs);
        INHERITABLE_SETTING(Windows.UI.Xaml.ElementTheme, Theme);
        INHERITABLE_SETTING(Microsoft.UI.Xaml.Controls.TabViewWidthMode, TabWidthMode);
        INHERITABLE_SETTING(Boolean, ShowTabsInTitlebar);
        INHERITABLE_SETTING(String, WordDelimiters);
        INHERITABLE_SETTING(Boolean, CopyOnSelect);
        INHERITABLE_SETTING(Boolean, InputServiceWarning);
        INHERITABLE_SETTING(Microsoft.Terminal.Control.CopyFormat, CopyFormatting);
        INHERITABLE_SETTING(Boolean, WarnAboutLargePaste);
        INHERITABLE_SETTING(Boolean, WarnAboutMultiLinePaste);
        INHERITABLE_SETTING(LaunchPosition, InitialPosition);
        INHERITABLE_SETTING(Boolean, CenterOnLaunch);
        INHERITABLE_SETTING(LaunchMode, LaunchMode);
        INHERITABLE_SETTING(Boolean, SnapToGridOnResize);
        INHERITABLE_SETTING(Boolean, ForceFullRepaintRendering);
        INHERITABLE_SETTING(Boolean, SoftwareRendering);
        INHERITABLE_SETTING(Boolean, ForceVTInput);
        INHERITABLE_SETTING(Boolean, DebugFeaturesEnabled);
        INHERITABLE_SETTING(Boolean, StartOnUserLogin);
        INHERITABLE_SETTING(Boolean, AlwaysOnTop);
        INHERITABLE_SETTING(TabSwitcherMode, TabSwitcherMode);
        INHERITABLE_SETTING(Boolean, DisableAnimations);
        INHERITABLE_SETTING(String, StartupActions);
        INHERITABLE_SETTING(Boolean, FocusFollowMouse);
        INHERITABLE_SETTING(WindowingMode, WindowingBehavior);
        INHERITABLE_SETTING(Boolean, TrimBlockSelection);
        INHERITABLE_SETTING(Boolean, DetectURLs);

        Windows.Foundation.Collections.IMapView<String, ColorScheme> ColorSchemes();
        void AddColorScheme(ColorScheme scheme);
        void RemoveColorScheme(String schemeName);

        ActionMap ActionMap { get; };
    }
}
