class Unibilium::Terminfo

Overview

TODO doc

Defined in:

terminfo.cr

Class Method Summary

Instance Method Summary

Class Method Detail

def self.dummy #

Constructs a dummy terminfo database.


[View source]
def self.from_bytes(bytes : Bytes) #

Creates a terminfo database from the given bytes.


[View source]
def self.from_env #

Creates a terminfo database for the terminal name found in the environment.

Similar to Unibilium::Terminfo.from_terminal(ENV["TERM"]).


[View source]
def self.from_file(path) #

Creates a terminfo database from the given file path.


[View source]
def self.from_io(io) #

Creates a terminfo database from the given io.


[View source]
def self.from_terminal(name) #

Creates a terminfo database for the given terminal name.


[View source]
def self.with_dummy(&) #

Constructs a dummy terminfo database and yield it to the block. It ensures that the database is destroyed after the block.


[View source]

Instance Method Detail

def aliases #

Gets the aliases.


[View source]
def aliases=(aliases : Array(String)) #

Sets the aliases.

TODO example


[View source]
def destroy #

Destroys the terminfo database.

Subsequent calls to methods will segfault. You can check if it has been destroyed with #destroyed?.


[View source]
def destroyed? #

Returns true if the terminfo database has been destroyed.


[View source]
def dump #

Returns the database as a compiled terminfo entry.

It can be directly written to a file for later use.


[View source]
def extensions : Unibilium::Extensions #

[View source]
def get(id : Entry::Boolean) #

[View source]
def get(id : Entry::Numeric) #

[View source]
def get(id : Entry::String) #

[View source]
def get?(id : Entry::Boolean) #

Gets the value of Boolean option id.


[View source]
def get?(id : Entry::Numeric) #

Gets the value of Numeric option id.


[View source]
def get?(id : Entry::String) #

Gets the value of String option id.


[View source]
def get?(name : String) #

[View source]
def name #

Gets the terminal name.


[View source]
def name=(name) #

Sets the terminal name.


[View source]
def name_for(id : Entry::Boolean) #

Gets the full name for the Boolean option id.


[View source]
def name_for(id : Entry::Numeric) #

Gets the full name for the Numeric option id.


[View source]
def name_for(id : Entry::String) #

Gets the full name for the String option id.


[View source]
def run(format, *args) #

[View source]
def set(id, value) #

Sets an option (Boolean, Numeric or String) identified by id to value.


[View source]
def short_name_for(id : Entry::Boolean) #

Gets the short name for the Boolean option id.


[View source]
def short_name_for(id : Entry::Numeric) #

Gets the short name for the Numeric option id.


[View source]
def short_name_for(id : Entry::String) #

Gets the short name for the String option id.


[View source]
def to_unsafe : Pointer(Void) #

Returns the underlying Unibilium database pointer.


[View source]