e557a867ee
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request This PR implement the OSC 9;9 |Sequence|Descriptoin| | :------------- | :----------: | |ESC ] 9 ; 9 ; “cwd” ST | Inform ConEmu about shell current working directory.| <!-- Other than the issue solved, is this relevant to any other issues/existing PRs? --> ## References #8214 <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [X] Closes #8166 * [X] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [ ] Tests added/passed * [ ] Documentation updated. If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx * [ ] Schema updated. * [ ] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx <!-- Provide a more detailed description of the PR, other things fixed or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed
75 lines
3.6 KiB
C++
75 lines
3.6 KiB
C++
// Copyright (c) Microsoft Corporation.
|
|
// Licensed under the MIT license.
|
|
#pragma once
|
|
|
|
#include "../../terminal/adapter/DispatchTypes.hpp"
|
|
#include "../../buffer/out/TextAttribute.hpp"
|
|
|
|
namespace Microsoft::Terminal::Core
|
|
{
|
|
class ITerminalApi
|
|
{
|
|
public:
|
|
virtual ~ITerminalApi() {}
|
|
ITerminalApi(const ITerminalApi&) = default;
|
|
ITerminalApi(ITerminalApi&&) = default;
|
|
ITerminalApi& operator=(const ITerminalApi&) = default;
|
|
ITerminalApi& operator=(ITerminalApi&&) = default;
|
|
|
|
virtual bool PrintString(std::wstring_view string) noexcept = 0;
|
|
virtual bool ExecuteChar(wchar_t wch) noexcept = 0;
|
|
|
|
virtual TextAttribute GetTextAttributes() const noexcept = 0;
|
|
virtual void SetTextAttributes(const TextAttribute& attrs) noexcept = 0;
|
|
|
|
virtual bool SetCursorPosition(short x, short y) noexcept = 0;
|
|
virtual COORD GetCursorPosition() noexcept = 0;
|
|
virtual bool SetCursorVisibility(const bool visible) noexcept = 0;
|
|
virtual bool CursorLineFeed(const bool withReturn) noexcept = 0;
|
|
virtual bool EnableCursorBlinking(const bool enable) noexcept = 0;
|
|
|
|
virtual bool DeleteCharacter(const size_t count) noexcept = 0;
|
|
virtual bool InsertCharacter(const size_t count) noexcept = 0;
|
|
virtual bool EraseCharacters(const size_t numChars) noexcept = 0;
|
|
virtual bool EraseInLine(const ::Microsoft::Console::VirtualTerminal::DispatchTypes::EraseType eraseType) noexcept = 0;
|
|
virtual bool EraseInDisplay(const ::Microsoft::Console::VirtualTerminal::DispatchTypes::EraseType eraseType) noexcept = 0;
|
|
|
|
virtual bool WarningBell() noexcept = 0;
|
|
virtual bool SetWindowTitle(std::wstring_view title) noexcept = 0;
|
|
|
|
virtual bool SetColorTableEntry(const size_t tableIndex, const DWORD color) noexcept = 0;
|
|
|
|
virtual bool SetCursorStyle(const ::Microsoft::Console::VirtualTerminal::DispatchTypes::CursorStyle cursorStyle) noexcept = 0;
|
|
virtual bool SetCursorColor(const DWORD color) noexcept = 0;
|
|
|
|
virtual bool SetDefaultForeground(const DWORD color) noexcept = 0;
|
|
virtual bool SetDefaultBackground(const DWORD color) noexcept = 0;
|
|
|
|
virtual bool EnableWin32InputMode(const bool win32InputMode) noexcept = 0;
|
|
virtual bool SetCursorKeysMode(const bool applicationMode) noexcept = 0;
|
|
virtual bool SetKeypadMode(const bool applicationMode) noexcept = 0;
|
|
virtual bool SetScreenMode(const bool reverseMode) noexcept = 0;
|
|
virtual bool EnableVT200MouseMode(const bool enabled) noexcept = 0;
|
|
virtual bool EnableUTF8ExtendedMouseMode(const bool enabled) noexcept = 0;
|
|
virtual bool EnableSGRExtendedMouseMode(const bool enabled) noexcept = 0;
|
|
virtual bool EnableButtonEventMouseMode(const bool enabled) noexcept = 0;
|
|
virtual bool EnableAnyEventMouseMode(const bool enabled) noexcept = 0;
|
|
virtual bool EnableAlternateScrollMode(const bool enabled) noexcept = 0;
|
|
|
|
virtual bool IsVtInputEnabled() const = 0;
|
|
|
|
virtual bool CopyToClipboard(std::wstring_view content) noexcept = 0;
|
|
|
|
virtual bool AddHyperlink(std::wstring_view uri, std::wstring_view params) noexcept = 0;
|
|
virtual bool EndHyperlink() noexcept = 0;
|
|
|
|
virtual bool SetTaskbarProgress(const size_t state, const size_t progress) noexcept = 0;
|
|
|
|
virtual bool SetWorkingDirectory(std::wstring_view uri) noexcept = 0;
|
|
virtual std::wstring_view GetWorkingDirectory() noexcept = 0;
|
|
|
|
protected:
|
|
ITerminalApi() = default;
|
|
};
|
|
}
|