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

namespace Microsoft.Terminal.Control
{
    [flags]
    enum CopyFormat
    {
        None = 0x0,
        HTML = 0x1,
        RTF = 0x2,
        All = 0xffffffff
    };

    enum GraphicsAPI
    {
        Automatic,
        Direct2D,
        Direct3D11,
    };

    enum TextMeasurement
    {
        Graphemes,
        Wcswidth,
        Console,
    };

    enum AmbiguousWidth
    {
        Narrow,
        Wide,
    };

    enum DefaultInputScope
    {
        Default,
        AlphanumericHalfWidth,
    };

    enum WarnAboutMultiLinePaste
    {
        Automatic,
        Always,
        Never,
    };

    runtimeclass FontSizeChangedArgs
    {
        Int32 Width { get; };
        Int32 Height { get; };
    }

    runtimeclass ContextMenuRequestedEventArgs
    {
        Windows.Foundation.Point Position { get; };
    }

    runtimeclass TitleChangedEventArgs
    {
        String Title;
    }

    runtimeclass WriteToClipboardEventArgs
    {
        String Plain { get; }; // UTF-16, as required by CF_UNICODETEXT
        byte[] Html { get; }; // UTF-8, as required by "HTML Format"
        byte[] Rtf { get; }; // UTF-8, as required by "Rich Text Format"
    }

    runtimeclass PasteFromClipboardEventArgs
    {
        void HandleClipboardData(String data);
        Boolean BracketedPasteEnabled { get; };
    }

    runtimeclass OpenHyperlinkEventArgs
    {
        OpenHyperlinkEventArgs(String uri);
        String Uri { get; };
    }

    enum NoticeLevel
    {
        Debug = 10,
        Info = 20,
        Warning = 30,
        Error = 40,
    };

    runtimeclass NoticeEventArgs
    {
        NoticeLevel Level { get; };
        String Message { get; };
    }

    runtimeclass ScrollPositionChangedArgs
    {
        Int32 ViewTop { get; };
        Int32 ViewHeight { get; };
        Int32 BufferSize { get; };
    }

    runtimeclass RendererWarningArgs
    {
        HRESULT Result { get; };
        String Parameter { get; };
    }

    runtimeclass TransparencyChangedEventArgs
    {
        Single Opacity { get; };
    }

    enum SearchState
    {
        Inactive = 0,
        Active = 1,
    };

    runtimeclass ShowWindowArgs
    {
        Boolean ShowOrHide { get; };
    }

    runtimeclass UpdateSelectionMarkersEventArgs
    {
        Boolean ClearMarkers { get; };
    }

    runtimeclass CompletionsChangedEventArgs
    {
        String MenuJson { get; };
        UInt32 ReplacementLength { get; };
    }

    runtimeclass KeySentEventArgs
    {
        UInt16 VKey { get; };
        UInt16 ScanCode { get; };
        Microsoft.Terminal.Core.ControlKeyStates Modifiers { get; };
        Boolean KeyDown { get; };
    }

    runtimeclass CharSentEventArgs
    {
        Char Character { get; };
        UInt16 ScanCode { get; };
        Microsoft.Terminal.Core.ControlKeyStates Modifiers { get; };
    }

    runtimeclass StringSentEventArgs
    {
        String Text { get; };
    }

    runtimeclass SearchMissingCommandEventArgs
    {
        String MissingCommand { get; };
        Int32 BufferRow { get; };
    }

    runtimeclass WindowSizeChangedEventArgs
    {
        Int32 Width;
        Int32 Height;
    }
}
