NAME
TUI::Drivers::HardwareInfo::Termbox - Termbox hardware backend for THardwareInfo
DESCRIPTION
TUI::Drivers::HardwareInfo::Termbox provides the Termbox-based implementation of the THardwareInfo hardware interface used by the Turbo Vision driver layer.
The module maps keyboard, mouse, screen, caret, timer, and terminal services to the facilities provided by Termbox.
Depending on availability, either the native Termbox FFI implementation or the pure Perl fallback implementation is used transparently.
This module is not instantiated. All interaction is performed through class-level method calls.
Terminal resources are initialized automatically when the module is loaded and released automatically when the program terminates.
VARIABLES
The following variables are internal to the Termbox backend implementation and are not part of the portable THardwareInfo interface.
$insertState
Tracks the current insert mode state (Bool).
$platform
Contains the platform classification string (Str) determined at module initialization.
$pendingEvent
Indicates whether a Termbox input event has been buffered(PositiveOrZeroInt).
$lastButtons
Stores the most recently observed mouse button state (PositiveOrZeroInt).
$downButtons
Stores the mouse button state recorded when the current button press began (PositiveOrZeroInt).
$lastDouble
Indicates whether the previous mouse event was recognized as a double-click (Bool).
@lastWhere
Contains the screen coordinates associated with the most recent completed mouse action.
@downWhere
Contains the screen coordinates where the current mouse button press began.
$downTicks
Stores the Turbo Vision clock tick value at which the current mouse button press began (PositiveOrZeroInt).
$doubleDelay
Maximum interval, in Turbo Vision clock ticks, used for mouse double-click detection (PositiveInt).
IMPLEMENTATION
This module contains the Termbox-specific implementation behind THardwareInfo. Public API semantics and usage are documented in THardwareInfo.
In this backend, those methods are mapped to Termbox facilities for terminal input handling, screen output, cursor management, timing, and mouse support.
The implementation provides translation between Turbo Vision key codes, character codes, mouse events, and the corresponding Termbox event model.
When the pure Perl Termbox::PP backend is used, additional compatibility handling is available for standalone Esc key detection and WinVT-specific input processing. These facilities are currently not available when using the native FFI-based Termbox implementation.
The exact implementation details here are backend-specific and may differ from other platform implementations.
SEE ALSO
THardwareInfo, TScreen, THWMouse, TSystemError, Termbox::PP, Termbox
AUTHORS
Borland International (original Turbo Vision design)
J. Schneider <brickpool@cpan.org>
COPYRIGHT AND LICENSE
Copyright (c) 1990-1994, 1997 by Borland International
Copyright (c) 2019-2026 the "AUTHORS" as listed above.
This software is licensed under the MIT license (see the LICENSE file, which is part of the distribution).