17 Sep 2022 16:28:28 UTC
- Distribution: Term-VTerm
- Module version: 0.08
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (0)
- Testers (181 / 1 / 3)
- KwaliteeBus factor: 1
- % Coverage
- License: perl_5
- Perl: v5.14.0
- Activity24 month
- Download (26.21KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version
- CELL OBJECTS
- @chars = $cell->chars
- $str = $cell->str
- $width = $cell->width
- $bold = $cell->bold
- $underline = $cell->underline
- $italic = $cell->italic
- $blink = $cell->blink
- $reverse = $cell->reverse
- $strike = $cell->strike
- $small = $cell->small
- $font = $cell->font
- $base = $cell->baseline
- $fg = $cell->fg
- $bg = $cell->bg
Term::VTerm::Screen- provides access to the screen layer of libvterm
$screen->enable_altscreen( $enabled )
Controls whether the altscreen buffer is enabled. Doing so allows the DEC altscreen mode to switch between regular and alternate screen buffers, but consumes more memory.
$screen->enable_reflow( $enabled )
Controls whether buffer reflow on resize is enabled. This feature is currently experimental and may be less than stable in some situations.
Flushes all pending damage through the screen to the damage callback.
$screen->set_damage_merge( $size )
Sets the damage merge size, as one of the
$screen->reset( $hard )
Resets the terminal state; performing either a soft or hard reset depending on the (optional) boolean value given.
$cell = $screen->get_cell( $pos )
VTermScreenCellobject representing the current state of the cell at the given location. Note that this is an instantaneous snapshot - the returned object will not update to reflect later changes in the screen's state.
$str = $screen->get_text( $rect )
Returns a UTF-8 string containing the text in the screen buffer within the given Term::VTerm::Rect.
$screen->set_callbacks( %cbs )
Sets the screen-layer callbacks. Takes the following named arguments:
- on_damage => CODE
$on_damage->( $rect )
$rectis a Term::VTerm::Rect instance.
- on_moverect => CODE
$on_moverect->( $dest, $src )
$srcare Term::VTerm::Rect instances.
- on_movecursor => CODE
$on_movecursor->( $pos, $oldpos, $is_visible )
$oldposare a Term::VTerm::Pos.
$is_visibleis a boolean.
- on_settermprop => CODE
$on_settermprop->( $prop, $value )
$propis one of the
PROP_*constants. The type of
$valuedepends on the property type - see similar to
- on_bell => CODE
- on_resize => CODE
$on_resize->( $rows, $cols )
$col = $screen->convert_color_to_rgb( $col )
Converts a Term::VTerm::Color instance from indexed to RGB form.
VTermScreenCellinstance has the following field accessors:
A list of Unicode character numbers. This list does not include the terminating 0.
A UTF-8 string containing the characters (normally just one but it may be followed by zero-width combining marks).
The width of the cell in columns. Normally 1, but 2 for a Unicode double-width character, or the special value of -1 on the "second" cell of such a character.
Simple rendering attributes. All are boolean values, except
underlinewhich is an integer between 0 and 2 (to support double-underline).
Font selection; an integer between 0 and 10.
Baseline adjustment; zero or one of the
The foreground and background colours, as Term::VTerm::Color instances.
Paul Evans <firstname.lastname@example.org>