2019-05-03 00:29:04 +02:00
|
|
|
// Copyright (c) Microsoft Corporation.
|
|
|
|
// Licensed under the MIT license.
|
|
|
|
|
|
|
|
/*
|
|
|
|
Module Name:
|
|
|
|
- ITerminalOutputConnection.hpp
|
|
|
|
|
|
|
|
Abstract:
|
|
|
|
- Provides an abstraction for writing to the output pipe connected to the TTY.
|
|
|
|
In conpty mode, this is implemented by the VtRenderer, such that other
|
|
|
|
parts of the codebase (the state machine) can write VT sequences directly
|
|
|
|
to the terminal controlling us.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
namespace Microsoft::Console
|
|
|
|
{
|
|
|
|
class ITerminalOutputConnection
|
|
|
|
{
|
|
|
|
public:
|
2020-01-03 15:25:21 +01:00
|
|
|
#pragma warning(push)
|
|
|
|
#pragma warning(disable : 26432) // suppress rule of 5 violation on interface because tampering with this is fraught with peril
|
2019-05-03 00:29:04 +02:00
|
|
|
virtual ~ITerminalOutputConnection() = 0;
|
|
|
|
|
2019-12-19 23:12:53 +01:00
|
|
|
[[nodiscard]] virtual HRESULT WriteTerminalUtf8(const std::string_view str) = 0;
|
|
|
|
[[nodiscard]] virtual HRESULT WriteTerminalW(const std::wstring_view wstr) = 0;
|
2019-05-03 00:29:04 +02:00
|
|
|
};
|
|
|
|
|
2019-06-11 22:27:09 +02:00
|
|
|
inline Microsoft::Console::ITerminalOutputConnection::~ITerminalOutputConnection() {}
|
2020-01-03 15:25:21 +01:00
|
|
|
#pragma warning(pop)
|
2019-05-03 00:29:04 +02:00
|
|
|
}
|