class Unibilium::Extensions

Defined in:

extensions.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(term : LibUnibilium::Terminfo) #

[View source]

Instance Method Detail

def [](arg) #

[View source]
def []?(arg) #

[View source]
def add(name, value : ValidType) #

Adds the capability extension named name, and set it to value. The type of the capability is given by the type of value (either Bool, Int32 or String)


[View source]
def count_bool #

[View source]
def count_num #

[View source]
def count_str #

[View source]
def delete(name) #

Deletes the capability name.


[View source]
def destroy #

[View source]
def get?(name) #

Gets the value of extension name, dispatched on its declared type, or nil if the extension does not exist (or is a string with no value).


[View source]
def get_bool(name) #

[View source]
def get_bool?(name) #

[View source]
def get_bool_name(i) #

unibi_get_ext_bool_name returns NULL when i is out of range (>= #count_bool). This returns a non-nil String (used as a capability-index key), so raise instead of dereferencing NULL.


[View source]
def get_num(name) #

[View source]
def get_num?(name) #

[View source]
def get_num_name(i) #

unibi_get_ext_num_name returns NULL when i is out of range (>= #count_num). This returns a non-nil String (used as a capability-index key), so raise instead of dereferencing NULL.


[View source]
def get_str(name) #

[View source]
def get_str?(name) #

[View source]
def get_str_name(i) #

unibi_get_ext_str_name returns NULL when i is out of range (>= #count_str). This returns a non-nil String (used as a capability-index key), so raise instead of dereferencing NULL.


[View source]
def has?(name) #

Returns true if the extension named name exists.


[View source]
def rename(old old_name, new new_name) #

Gives a new name to the capability old_name.


[View source]
def saved_cap_extensions : UniqueHash #

The capability-extension index, built lazily on first access.

Building it scans every extended capability and allocates a String per name, so it's deferred until an extension is actually used.


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

Sets the value of capability name to value, adding it first if it doesn't exist.


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

[View source]