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

import "ITerminalConnection.idl";

namespace Microsoft.Terminal.TerminalConnection
{
    delegate void NewConnectionHandler(ConptyConnection connection);

    [default_interface] runtimeclass ConptyConnection : ITerminalConnection
    {
        ConptyConnection();
        Guid Guid { get; };
        String Commandline { get; };
        String StartingTitle { get; };
        UInt16 ShowWindow { get; };

        void ClearBuffer();

        void ShowHide(Boolean show);

        void ReparentWindow(UInt64 newParent);

        static event NewConnectionHandler NewConnection;
        static void StartInboundListener();
        static void StopInboundListener();

        static Windows.Foundation.Collections.ValueSet CreateSettings(String cmdline,
                                                                      String startingDirectory,
                                                                      String startingTitle,
                                                                      Boolean reloadEnvironmentVariables,
                                                                      String initialEnvironment,
                                                                      IMapView<String, String> environmentOverrides,
                                                                      UInt32 rows,
                                                                      UInt32 columns,
                                                                      Guid guid,
                                                                      Guid profileGuid);
    };
}
