.. index:: pair: class; EE::Window::TerminalRuntime .. _doxid-class_e_e_1_1_window_1_1_terminal_runtime: class EE::Window::TerminalRuntime ================================= .. toctree:: :hidden: Overview ~~~~~~~~ Process-level terminal transport and input runtime. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include class TerminalRuntime { public: // construction :target:`~TerminalRuntime`(); // methods static TerminalRuntime& :ref:`instance`(); bool :ref:`initialize`(); void :ref:`shutdown`(); bool :ref:`write`(const char* data, size_t size); :ref:`Math::Sizei` :ref:`pixelSize`() const; void :ref:`attach`(:ref:`Window`& window); void :ref:`detach`(); bool :ref:`isFocused`() const; }; .. _details-class_e_e_1_1_window_1_1_terminal_runtime: 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 :ref:`Window ` currently supported by terminal mode. Methods ------- .. index:: pair: function; instance .. _doxid-class_e_e_1_1_window_1_1_terminal_runtime_1a271ad5a96485855fae12cb60537d1a70: .. ref-code-block:: cpp :class: doxyrest-title-code-block static TerminalRuntime& instance() .. rubric:: Returns: The process terminal runtime instance. .. index:: pair: function; initialize .. _doxid-class_e_e_1_1_window_1_1_terminal_runtime_1a54d1e9f49d83b37dde3895ca42d77e0e: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool initialize() Opens the controlling terminal, enables terminal protocols, and starts input processing. .. rubric:: Returns: True if the terminal transport was initialized or was already initialized. .. index:: pair: function; shutdown .. _doxid-class_e_e_1_1_window_1_1_terminal_runtime_1a3dbc98258ff0bb879488f13a062f4659: .. ref-code-block:: cpp :class: doxyrest-title-code-block void shutdown() Stops input processing and restores the terminal state. .. index:: pair: function; write .. _doxid-class_e_e_1_1_window_1_1_terminal_runtime_1a15207c5dc8f4f4726c6eaa7aa36c9171: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool write(const char* data, size_t size) Writes a complete protocol fragment to the terminal without interleaving other writers. .. rubric:: Returns: True if all bytes were written. .. index:: pair: function; pixelSize .. _doxid-class_e_e_1_1_window_1_1_terminal_runtime_1aa6f130352623ab8d5331433227b7f1d2: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`Math::Sizei` pixelSize() const .. rubric:: Returns: The terminal viewport size in pixels, or an empty size when unavailable. .. index:: pair: function; attach .. _doxid-class_e_e_1_1_window_1_1_terminal_runtime_1a2008b2f1ce293c4db2e86de95bc78852: .. ref-code-block:: cpp :class: doxyrest-title-code-block void attach(:ref:`Window`& window) Attaches the top-level window that receives decoded terminal input and resize events. .. index:: pair: function; detach .. _doxid-class_e_e_1_1_window_1_1_terminal_runtime_1aa3d08ee443fddcae4051996bf2128d3d: .. ref-code-block:: cpp :class: doxyrest-title-code-block void detach() Detaches the currently attached window. .. index:: pair: function; isFocused .. _doxid-class_e_e_1_1_window_1_1_terminal_runtime_1a5dfa24ac319cb1fc0266f46401ade8c5: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool isFocused() const .. rubric:: Returns: Whether the host terminal currently reports input focus.