// 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();
        String Commandline { get; };
        String StartingTitle { get; };
        UInt16 ShowWindow { get; };

        void ResetSize();
        void ClearBuffer(Boolean keepCursorRow);

        void ShowHide(Boolean show);

        void ReparentWindow(UInt64 newParent);

        UInt64 RootProcessHandle();

        static event NewConnectionHandler NewConnection;
        static void StartInboundListener();

        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);
    };
}
