EXPORTS
Nothing per default, but can export the following per request:
:all
:const
coord_invalid
attr_invalid
event_not_extracted
event_extracted
esc_wait
:func
write_cursor
write_sgr_fg
write_sgr_bg
write_sgr
escapeRGB
get_term_size
send_attr
send_char
flush
send_clear
update_size_maybe
tcsetattr
tcgetattr
parse_mouse_event
parse_escape_sequence
extract_raw_event
extract_event
enable_wait_for_escape_sequence
:types
input_event
winsize
syscall_Termios
:vars
$keys
$funcs
$orig_tios
$termw
$termh
$outfd
$lastfg
$lastbg
$lastx
$lasty
$inbuf
$outbuf
$sigwinch
$sigio
$quit
$grayscale
NAME
Termbox::Go::Terminal::Backend - Terminal Backend implementation for Termbox
DESCRIPTION
This module contains some private API functions for the implementation of Termbox for Terminal.
COPYRIGHT AND LICENCE
This file is part of the port of Termbox.
Copyright (C) 2012 by termbox-go authors
This library content was taken from the termbox-go implementation of Termbox
which is licensed under MIT licence.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
AUTHORS
2024,2025 by J. Schneider https://github.com/brickpool/
DISCLAIMER OF WARRANTIES
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
REQUIRES
SEE ALSO
SUBROUTINES
enable_wait_for_escape_sequence
my $scalar = enable_wait_for_escape_sequence();
On macOS, enable behavior which will wait before deciding that the escape key was pressed, to account for partially send escape sequences, especially with regard to lengthy mouse sequences. See https://github.com/nsf/termbox-go/issues/132
escapeRGB
my $string = escapeRGB($fg, $r, $g, $b);
extract_event
my $extract_event_res = extract_event(\$inbuf, \%event, $allow_esc_wait);
extract_raw_event
my $succeded = extract_raw_event(\$data, \%event);
flush
my $succeded = flush();
get_term_size
my ($cols, $rows) = get_term_size($fd);
input_event
my \%hashref | undef = input_event( | @array | \%hashref);
Usage: my \%hashref = input_event(); my \%hashref = input_event($bytes, $err) // die; my \%hashref = input_event({ data => $bytes, err => $errno, }) // die;
parse_escape_sequence
my ($count, $succeded) = parse_escape_sequence(\%event, \$buf);
parse_mouse_event
my ($count, $succeded) = parse_mouse_event(\%event, $buf);
send_attr
send_attr($fg, $bg);
send_char
send_char($x, $y, $ch);
send_clear
my $succeded = send_clear();
syscall_Termios
my \%hashref | undef = syscall_Termios( | @array | \%hashref);
Usage: my \%hashref = syscall_Termios(); my \%hashref = syscall_Termios( $c_iflag, $c_oflag, $c_cflag, $c_lflag, \@c_cc, $ispeed, $ospeed, ) // die; my \%hashref = syscall_Termios({ Iflag => $c_iflag, Oflag => $c_oflag, Cflag => $c_cflag, Lflag => $c_lflag, Cc => \@c_cc, Ispeed => $ispeed, Ospeed => $ospeed, }) // die;
tcgetattr
my $succeded = tcgetattr($fd, \%termios);
tcsetattr
my $succeded = tcsetattr($fd, \%termios);
update_size_maybe
my $succeded = update_size_maybe();
winsize
my \%hashref | undef = winsize( | @array | \%hashref);
Usage: my \%hashref = winsize(); my \%hashref = winsize($rows, $cols, $xpixels, $ypixels) // die; my \%hashref = winsize({ rows => $rows, cols => $cols, xpixels => $xpixels, ypixels => $ypixels, }) // die;
write_cursor
write_cursor($x, $y);
write_sgr
write_sgr($fg, $bg);
write_sgr_bg
write_sgr_bg($a);
write_sgr_fg
write_sgr_fg($a);