Navigation
API > API/Plugins > API/Plugins/Terminal
Abstract interface for a terminal PTY session.
Platform-specific backends (FConPTYSession on Windows, FPosixPTYSession on Linux/macOS) implement this interface so that the terminal widget can drive any backend without platform conditionals in its core logic.
| Name | ITerminalSession |
| Type | class |
| Header File | /Engine/Plugins/Experimental/Terminal/Source/Terminal/Public/ITerminalSession.h |
| Include Path | #include "ITerminalSession.h" |
Syntax
class ITerminalSession
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~ITerminalSession() |
ITerminalSession.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| OnProcessExited | FOnTerminalProcessExited | Delegate fired when the shell process exits. | ITerminalSession.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TArray< uint8 > ConsumeOutput() |
Swap the output staging buffer and return the accumulated bytes for parsing on the game thread. | ITerminalSession.h | |
bool Create
(
const FString& ShellPath, |
Create a new session. | ITerminalSession.h | |
bool IsRunning() |
Check if the shell process is still running. | ITerminalSession.h | |
void Resize
(
int32 Columns, |
Resize the PTY. | ITerminalSession.h | |
void Shutdown() |
Shut down the session, closing the PTY and terminating the shell process. | ITerminalSession.h | |
void WriteInput
(
TArrayView< const uint8 > Data |
Write input bytes to the PTY input pipe. | ITerminalSession.h |
Public Virtual
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static TSharedPtr< ITerminalSession > CreateForCurrentPlatform
(
FString& OutError |
Create a platform-appropriate session backend. | ITerminalSession.h |