class EE::Window::TerminalRuntime

Overview

Process-level terminal transport and input runtime. More…

#include <terminalruntime.hpp>

class TerminalRuntime {
public:
    // construction

    ~TerminalRuntime();

    // methods

    static TerminalRuntime& instance();
    bool initialize();
    void shutdown();
    bool write(const char* data, size_t size);
    Math::Sizei pixelSize() const;
    void attach(Window& window);
    void detach();
    bool isFocused() const;
};

Detailed Documentation

Process-level terminal transport and input runtime.

Owns terminal mode negotiation, input parsing, synchronized protocol output, and attachment to the single top-level Window currently supported by terminal mode.

Methods

static TerminalRuntime& instance()

Returns:

The process terminal runtime instance.

bool initialize()

Opens the controlling terminal, enables terminal protocols, and starts input processing.

Returns:

True if the terminal transport was initialized or was already initialized.

void shutdown()

Stops input processing and restores the terminal state.

bool write(const char* data, size_t size)

Writes a complete protocol fragment to the terminal without interleaving other writers.

Returns:

True if all bytes were written.

Math::Sizei pixelSize() const

Returns:

The terminal viewport size in pixels, or an empty size when unavailable.

void attach(Window& window)

Attaches the top-level window that receives decoded terminal input and resize events.

void detach()

Detaches the currently attached window.

bool isFocused() const

Returns:

Whether the host terminal currently reports input focus.