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

namespace Microsoft.Terminal.Control
{
    enum MarkCategory
    {
        Prompt = 0,
        Error = 1,
        Warning = 2,
        Info = 3
    };

    struct ScrollMark
    {
        // Additional members can be bubbled as necessary.
        Int32 Row;
        Microsoft.Terminal.Core.OptionalColor Color;
    };

    enum ScrollToMarkDirection
    {
        Previous,
        Next,
        First,
        Last
    };

    // These are properties of the TerminalCore that should be queryable by the
    // rest of the app.
    interface ICoreState
    {
        String Title { get; };
        UInt64 TaskbarState { get; };
        UInt64 TaskbarProgress { get; };

        String WorkingDirectory { get; };

        Windows.Foundation.IReference<Windows.UI.Color> TabColor { get; };

        Int32 ScrollOffset { get; };
        Int32 ViewHeight { get; };
        Int32 BufferHeight { get; };

        Boolean HasSelection { get; };
        Boolean HasMultiLineSelection { get; };
        String SelectedText(Boolean trimTrailingWhitespace);

        Boolean BracketedPasteEnabled { get; };

        Microsoft.Terminal.TerminalConnection.ConnectionState ConnectionState { get; };

        UInt64 OwningHwnd;

        void AddMark(ScrollMark mark);
        void ClearMark();
        void ClearAllMarks();
        void ScrollToMark(ScrollToMarkDirection direction);
        void SelectCommand(Boolean goUp);
        void SelectOutput(Boolean goUp);
        IVector<ScrollMark> ScrollMarks { get; };

    };
}
