Namespace

Gnt – 3.0

GLib Ncurses Toolkit

Version3.0.0-devel
AuthorsLibGnt Developers
LicenseLGPL-2.1-or-later
Websitehttps://keep.imfreedom.org/libgnt/libgnt/
Sourcehttps://keep.imfreedom.org/libgnt/libgnt/

Build

C headersgnt.h
pkg-config filesgnt3

Dependencies

GLib—2.0 General-purpose, portable utility library.
Browse documentation
GObject—2.0 The base type system library
Browse documentation

Structs

Node

A node in the window management tree.

TreeRow

Enumerations

Alignment

Alignment of contents of GntBox widgets.

ColorType

Different classes of colors.

MenuType

A toplevel-menu is displayed at the top of the screen, and it spans across the entire width of the screen. A popup-menu could be displayed, for example, as a context menu for widgets.

MouseEvent

The type of a mouse event, used in gnt_widget_clicked() and the GntWidget::clicked signal.

ProgressBarOrientation

The orientation of a GntProgressBar.

Style

The type of style that a user might set. For boolean options, use gnt_style_get_bool(). For string options, use gnt_style_get().

Bitfields

EntryFlag

Flags that control the behaviour of a GntEntry.

TextFormatFlags

Flags that determine the display style of portions of text in a GntTextView.

TextViewFlag

Flags that determine the behaviour of a GntTextView.

WindowFlags

Flags indicating the maximization state of a GntWindow.

Callbacks

BindableActionCallback

A callback for an action registered by gnt_bindable_class_register_action().

BindableActionCallbackNoParam

A callback for an action with no parameters.

DuplicateFunc

A function used to duplicate some data in a hash table. See gnt_hash_table_duplicate().

MenuItemCallback

A callback for when a menu item is activated.

TreeSearchFunc

A custom tree search function.

Functions

ascii_only

Check whether the terminal is capable of UTF8 display.

color_add_pair

Adds a color definition.

color_pair

Return the appropriate character attribute for a specified color. If the terminal doesn’t have color support, this returns A_STANDOUT when deemed appropriate.

color_pairs_parse

Parse color-pair information from a file.

colors_get_color

Parse a string color.

colors_parse

Parse color information from a file.

get_clipboard

Get the global clipboard.

get_clipboard_string

Get the string in the clipboard.

giveup_console

Spawn a different application that will consume the console.

hash_table_duplicate

Duplicate the contents of a hastable.

init

Initialize GNT.

init_colors

Initialize the colors.

init_keys

Initialize the keys.

init_styles

Initialize style settings.

is_refugee

Check whether a child process is in control of the current terminal.

key_lookup

Translate a machine-readable representation of an input to a user-readable representation.

key_translate

Translate a user-readable representation of an input to a machine-readable representation.

keys_add_combination

Add a key combination to the internal key-tree.

keys_del_combination

Remove a key combination from the internal key-tree.

keys_find_combination

Find a combination from the given string.

keys_refine

Refine input text. This usually looks at what the terminal claims it is, and tries to change the text to work around some oft-broken terminfo entries.

main

Start running the mainloop for gnt.

quit

Terminate the mainloop of gnt.

register_action

Register a global action.

screen_menu_show

Show a menu.

screen_move_widget

Move a widget.

screen_rename_widget

Rename a widget.

screen_resize_widget

Resize a widget.

set_clipboard_string

Set the contents of the global clipboard.

set_config_dir

Change directory to store gnt configuration files (default is ~).

style_get

Get the user-setting for a style.

style_get_bool

Get the boolean value for a user-setting.

style_get_color

Get the value of a color pair in ~/.gntrc.

style_get_from_name

Get the value of a preference in ~/.gntrc.

style_get_string_list

Get the value of a preference in ~/.gntrc.

style_parse_bool

Parse a boolean preference. For example, if ‘value’ is “false” (ignoring case) or “0”, the return value will be FALSE, otherwise TRUE.

style_read_actions

Read user-defined actions defined for type and register bindings on the klass.

style_read_configure_file

Read configuration from a file.

style_read_menu_accels

Read menu-accels from ~/.gntrc.

uninit_colors

Uninitialize the colors.

uninit_styles

Uninitialize style settings.

util_get_text_bound

Compute the width and height required to view the text on the screen.

util_onscreen_fit_string

Inserts newlines in ‘string’ where necessary so that its onscreen width is no more than ‘maxw’.

util_onscreen_width

Get the onscreen width of a string, or a substring.

util_onscreen_width_to_pointer

Computes and returns the string after a specific number of onscreen characters.

util_parse_widgets

Parse widgets from an XML description. For example,

util_parse_xhtml_to_textview

Parse an XHTML string and add it in a GntTextView with appropriate text flags.

util_set_trigger_widget

Make some keypress activate a button when some key is pressed with ‘wid’ in focus.

Function Macros

hbox_new

Create a new horizontal box.

hslider_new

Create a new horizontal slider.

hwindow_new

Create a new window with widgets stacked horizontally.

KEY_CONSTCH

This is needed so that g-ir-scanner does not take GNT_KEY_CTRL_* as constants — because if it does, the .gir contains the following invalid XML characters, and parsing explodes.

KEY_SAFE

If x is printable this evaluates to x, otherwise “”.

vbox_new

Create a new vertical box.

vslider_new

Create a new vertical slider.

vwindow_new

Create a new window with widgets stacked vertically.

Constants

ENTRY_CHAR

The character to use to fill in the blank places.

ENTRY_FLAG_ALL

Allow all characters in a GntEntry.