Scroll to navigation

TICKIT_TERM_SETCTL_INT(3) Library Functions Manual TICKIT_TERM_SETCTL_INT(3)

NAME

tickit_term_setctl_int, tickit_term_setctl_str - set an integer or string terminal control

SYNOPSIS

#include <tickit.h>

bool tickit_term_getctl_int(TickitTerm *tt, TickitTermCtl ctl, int *value);
bool tickit_term_setctl_int(TickitTerm *tt, TickitTermCtl ctl, int value);
bool tickit_term_setctl_str(TickitTerm *tt, TickitTermCtl ctl, const char *value);

Link with -ltickit.

DESCRIPTION

tickit_term_setctl_int() performs a terminal control operation, setting the value of a numeric terminal control option. tickit_term_setctl_str() sets the value of a string terminal control option. tickit_term_getctl_int() obtains the value of a terminal control setting.

The options are given in an enumeration called TickitTermCtl. The following control values are recognised:

TICKIT_TERMCTL_ALTSCREEN (int)
The value is a boolean indicating whether the terminal alternate buffer mode should be enabled. When enabled, a temporary buffer is used for drawing, preserving the original contents of the screen. This mode is usually used by full-screen applications to preserve the shell's scrollback state.
TICKIT_TERMCTL_CURSORVIS (int)
The value is a boolean indicating whether the terminal text cursor should be visible. When disabled the cursor position is not visible. Typically applications will hide the cursor while performing redrawing operations so as not to show a flickering effect as the cursor moves, and show it again when drawing is complete.
TICKIT_TERMCTL_CURSORBLINK (int)
The value is a boolean indicating whether the terminal text cursor should blink. When disabled, the cursor will appear in a steady state, if visible. When enabled, the cursor will appear blinking, if visible. If the cursor is invisible, this should not have any effect.
TICKIT_TERMCTL_CURSORSHAPE (int)
The value is an integer from the TickitCursorShape enumeration indicating what shape the terminal's text cursor should be. Values are TICKIT_CURSORSHAPE_BLOCK for a solid block filling the entire cell, TICKIT_CURSORSHAPE_UNDER for an underline below the character, or TICKIT_CURSORSHAPE_LEFT_BAR for a vertical bar to the left of the character. Note that not all terminals support setting it, nor to all of the possible values.
TICKIT_TERMCTL_ICON_TEXT (str)
The value is a string for the terminal to use as its minimised icon text.
TICKIT_TERMCTL_ICONTITLE_TEXT (str)
The value is a string for the terminal to use as its minimised icon text and main window title.
TICKIT_TERMCTL_KEYPAD_APP (int)
The value is a boolean controlling the terminal's keypad mode. When enabled, the terminal is in keypad application mode; in this mode the numerical keypad will send different sequences that can be detected as distinct from regular ASCII text. When disabled, the keypad will send normal text.
TICKIT_TERMCTL_MOUSE (int)
The value is an integer from the TickitTermMouseMode enumeration indicating what mouse events should be sent. Values are TICKIT_TERM_MOUSEMODE_CLICK to report button press and release events, TICKIT_TERM_MOUSEMODE_DRAG to additionally report movement while a button is held, TICKIT_TERM_MOUSEMODE_MOVE to additionally report all movement even with no buttons held, or TICKIT_TERM_MOUSEMODE_OFF to disable it.
TICKIT_TERMCTL_TITLE_TEXT (str)
The value is a string for the terminal to use as its main window title.
TICKIT_TERMCTL_COLORS (int, read-only)
The value indicates how many colors are available. This value is read-only; it can be requested but not set.

RETURN VALUE

tickit_term_getctl_int() returns a true value if it recognised the requested control and managed to return the current value of it; false if not. tickit_term_setctl_int() and tickit_term_setctl_str() return a true value if it recognised the requested control and managed to request the terminal to change it; false if not.

SEE ALSO

tickit_term_new(3), tickit_term(7), tickit(7)