Top |
#define | CHAFA_TERM_SEQ_LENGTH_MAX |
enum | ChafaTermSeq |
typedef | ChafaTermInfo |
#define | CHAFA_TERM_INFO_ERROR |
enum | ChafaTermInfoError |
A ChafaTermInfo describes the characteristics of one particular kind of display terminal. It stores control sequences that can be used to move the cursor, change text attributes, mark the beginning and end of sixel graphics data, etc.
ChafaTermInfo also implements an efficient low-level API for formatting these sequences with marshaled arguments so they can be sent to the terminal.
ChafaTermInfo *
chafa_term_info_new (void
);
Creates a new, blank ChafaTermInfo.
Since: 1.6
ChafaTermInfo *
chafa_term_info_copy (const ChafaTermInfo *term_info
);
Creates a new ChafaTermInfo that's a copy of term_info
.
Since: 1.6
void
chafa_term_info_ref (ChafaTermInfo *term_info
);
Adds a reference to term_info
.
Since: 1.6
void
chafa_term_info_unref (ChafaTermInfo *term_info
);
Removes a reference from term_info
.
Since: 1.6
const gchar * chafa_term_info_get_seq (ChafaTermInfo *term_info
,ChafaTermSeq seq
);
Gets the string equivalent of seq
stored in term_info
.
Since: 1.6
gint chafa_term_info_set_seq (ChafaTermInfo *term_info
,ChafaTermSeq seq
,const gchar *str
,GError **error
);
Sets the control sequence string equivalent of seq
stored in term_info
to str
.
The string may contain argument indexes to be substituted with integers on formatting. The indexes are preceded by a percentage character and start at 1, i.e. %1, %2, %3, etc.
The string's length after formatting must not exceed CHAFA_TERM_SEQ_LENGTH_MAX
bytes. Each argument can add up to four digits, or three for those specified as
8-bit integers. If the string could potentially exceed this length when
formatted, chafa_term_info_set_seq()
will return FALSE
.
If parsing fails or str
is too long, any previously existing sequence
will be left untouched.
Passing NULL
for str
clears the corresponding control sequence.
term_info |
||
seq |
A ChafaTermSeq to query for. |
|
str |
A control sequence string, or |
|
error |
A return location for error details, or |
Since: 1.6
gboolean chafa_term_info_have_seq (const ChafaTermInfo *term_info
,ChafaTermSeq seq
);
Checks if term_info
can emit seq
.
Since: 1.6
gchar * chafa_term_info_emit_seq (ChafaTermInfo *term_info
,ChafaTermSeq seq
,...
);
Formats the terminal sequence seq
, inserting positional arguments. The seq's
number of arguments must be supplied exactly.
The argument list must be terminated by -1, or undefined behavior will result.
If the wrong number of arguments is supplied, or an argument is out of range,
this function will return NULL
. Otherwise, it returns a zero-terminated string
that must be freed with g_free()
.
If you want compile-time validation of arguments, consider using one of the specific chafa_term_info_emit_*() functions. They are also faster, but require you to allocate at least CHAFA_TERM_SEQ_LENGTH_MAX bytes up front.
term_info |
||
seq |
A ChafaTermSeq to emit |
|
... |
A list of int arguments to insert in |
Since: 1.14
ChafaParseResult chafa_term_info_parse_seq (ChafaTermInfo *term_info
,ChafaTermSeq seq
,gchar **input
,gint *input_len
,guint *args_out
);
Attempts to parse a terminal sequence from an input data array. If successful,
CHAFA_PARSE_SUCCESS will be returned, the input
pointer will be advanced and
the parsed length will be subtracted from input_len
.
term_info |
||
seq |
A ChafaTermSeq to attempt to parse |
|
input |
Pointer to pointer to input data |
|
input_len |
Pointer to maximum input data length |
|
args_out |
Pointer to parsed argument values |
Since: 1.14
void chafa_term_info_supplement (ChafaTermInfo *term_info
,ChafaTermInfo *source
);
Supplements missing sequences in term_info
with ones copied
from source
.
Since: 1.6
gchar * chafa_term_info_emit_reset_terminal_soft (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_RESET_TERMINAL_SOFT.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.6
gchar * chafa_term_info_emit_reset_terminal_hard (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_RESET_TERMINAL_HARD.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.6
gchar * chafa_term_info_emit_reset_attributes (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_RESET_ATTRIBUTES.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.6
gchar * chafa_term_info_emit_clear (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_CLEAR.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.6
gchar * chafa_term_info_emit_cursor_to_pos (const ChafaTermInfo *term_info
,gchar *dest
,guint x
,guint y
);
Prints the control sequence for CHAFA_TERM_SEQ_CURSOR_TO_POS.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
term_info |
||
dest |
String destination |
|
x |
Offset from left edge of display, zero-indexed |
|
y |
Offset from top edge of display, zero-indexed |
Since: 1.6
gchar * chafa_term_info_emit_cursor_to_top_left (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_CURSOR_TO_TOP_LEFT.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.6
gchar * chafa_term_info_emit_cursor_to_bottom_left (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_CURSOR_TO_BOTTOM_LEFT.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.6
gchar * chafa_term_info_emit_cursor_up (const ChafaTermInfo *term_info
,gchar *dest
,guint n
);
Prints the control sequence for CHAFA_TERM_SEQ_CURSOR_UP.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.6
gchar * chafa_term_info_emit_cursor_down (const ChafaTermInfo *term_info
,gchar *dest
,guint n
);
Prints the control sequence for CHAFA_TERM_SEQ_CURSOR_DOWN.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.6
gchar * chafa_term_info_emit_cursor_left (const ChafaTermInfo *term_info
,gchar *dest
,guint n
);
Prints the control sequence for CHAFA_TERM_SEQ_CURSOR_LEFT.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.6
gchar * chafa_term_info_emit_cursor_right (const ChafaTermInfo *term_info
,gchar *dest
,guint n
);
Prints the control sequence for CHAFA_TERM_SEQ_CURSOR_RIGHT.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.6
gchar * chafa_term_info_emit_cursor_up_1 (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_CURSOR_UP_1.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.6
gchar * chafa_term_info_emit_cursor_down_1 (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_CURSOR_DOWN_1.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.6
gchar * chafa_term_info_emit_cursor_left_1 (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_CURSOR_LEFT_1.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.6
gchar * chafa_term_info_emit_cursor_right_1 (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_CURSOR_RIGHT_1.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.6
gchar * chafa_term_info_emit_cursor_up_scroll (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_CURSOR_UP_SCROLL.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.6
gchar * chafa_term_info_emit_cursor_down_scroll (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_CURSOR_DOWN_SCROLL.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.6
gchar * chafa_term_info_emit_insert_cells (const ChafaTermInfo *term_info
,gchar *dest
,guint n
);
Prints the control sequence for CHAFA_TERM_SEQ_INSERT_CELLS.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.6
gchar * chafa_term_info_emit_delete_cells (const ChafaTermInfo *term_info
,gchar *dest
,guint n
);
Prints the control sequence for CHAFA_TERM_SEQ_DELETE_CELLS.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.6
gchar * chafa_term_info_emit_insert_rows (const ChafaTermInfo *term_info
,gchar *dest
,guint n
);
Prints the control sequence for CHAFA_TERM_SEQ_INSERT_ROWS.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.6
gchar * chafa_term_info_emit_delete_rows (const ChafaTermInfo *term_info
,gchar *dest
,guint n
);
Prints the control sequence for CHAFA_TERM_SEQ_DELETE_ROWS.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.6
gchar * chafa_term_info_emit_enable_cursor (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_ENABLE_CURSOR.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.6
gchar * chafa_term_info_emit_disable_cursor (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_DISABLE_CURSOR.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.6
gchar * chafa_term_info_emit_enable_echo (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_ENABLE_ECHO.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.6
gchar * chafa_term_info_emit_disable_echo (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_DISABLE_ECHO.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.6
gchar * chafa_term_info_emit_enable_insert (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_ENABLE_INSERT.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.6
gchar * chafa_term_info_emit_disable_insert (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_DISABLE_INSERT.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.6
gchar * chafa_term_info_emit_enable_wrap (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_ENABLE_WRAP.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.6
gchar * chafa_term_info_emit_disable_wrap (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_DISABLE_WRAP.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.6
gchar * chafa_term_info_emit_enable_bold (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_ENABLE_BOLD.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.12
gchar * chafa_term_info_emit_invert_colors (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_INVERT_COLORS.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.6
gchar * chafa_term_info_emit_set_color_bg_8 (const ChafaTermInfo *term_info
,gchar *dest
,guint8 pen
);
Prints the control sequence for CHAFA_TERM_SEQ_SET_COLOR_BG_8.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.12
gchar * chafa_term_info_emit_set_color_fg_8 (const ChafaTermInfo *term_info
,gchar *dest
,guint8 pen
);
Prints the control sequence for CHAFA_TERM_SEQ_SET_COLOR_FG_8.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.12
gchar * chafa_term_info_emit_set_color_fgbg_8 (const ChafaTermInfo *term_info
,gchar *dest
,guint8 fg_pen
,guint8 bg_pen
);
Prints the control sequence for CHAFA_TERM_SEQ_SET_COLOR_FGBG_8.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
term_info |
||
dest |
String destination |
|
fg_pen |
Foreground pen number, 0-7 |
|
bg_pen |
Background pen number, 0-7 |
Since: 1.12
gchar * chafa_term_info_emit_set_color_fg_16 (const ChafaTermInfo *term_info
,gchar *dest
,guint8 pen
);
Prints the control sequence for CHAFA_TERM_SEQ_SET_COLOR_FG_16.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.6
gchar * chafa_term_info_emit_set_color_bg_16 (const ChafaTermInfo *term_info
,gchar *dest
,guint8 pen
);
Prints the control sequence for CHAFA_TERM_SEQ_SET_COLOR_BG_16.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.6
gchar * chafa_term_info_emit_set_color_fgbg_16 (const ChafaTermInfo *term_info
,gchar *dest
,guint8 fg_pen
,guint8 bg_pen
);
Prints the control sequence for CHAFA_TERM_SEQ_SET_COLOR_FGBG_16.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
term_info |
||
dest |
String destination |
|
fg_pen |
Foreground pen number, 0-15 |
|
bg_pen |
Background pen number, 0-15 |
Since: 1.6
gchar * chafa_term_info_emit_set_color_fg_256 (const ChafaTermInfo *term_info
,gchar *dest
,guint8 pen
);
Prints the control sequence for CHAFA_TERM_SEQ_SET_COLOR_FG_256.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.6
gchar * chafa_term_info_emit_set_color_bg_256 (const ChafaTermInfo *term_info
,gchar *dest
,guint8 pen
);
Prints the control sequence for CHAFA_TERM_SEQ_SET_COLOR_BG_256.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.6
gchar * chafa_term_info_emit_set_color_fgbg_256 (const ChafaTermInfo *term_info
,gchar *dest
,guint8 fg_pen
,guint8 bg_pen
);
Prints the control sequence for CHAFA_TERM_SEQ_SET_COLOR_FGBG_256.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
term_info |
||
dest |
String destination |
|
fg_pen |
Foreground pen number, 0-255 |
|
bg_pen |
Background pen number, 0-255 |
Since: 1.6
gchar * chafa_term_info_emit_set_color_fg_direct (const ChafaTermInfo *term_info
,gchar *dest
,guint8 r
,guint8 g
,guint8 b
);
Prints the control sequence for CHAFA_TERM_SEQ_SET_COLOR_FG_DIRECT.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
term_info |
||
dest |
String destination |
|
r |
Red component, 0-255 |
|
g |
Green component, 0-255 |
|
b |
Blue component, 0-255 |
Since: 1.6
gchar * chafa_term_info_emit_set_color_bg_direct (const ChafaTermInfo *term_info
,gchar *dest
,guint8 r
,guint8 g
,guint8 b
);
Prints the control sequence for CHAFA_TERM_SEQ_SET_COLOR_BG_DIRECT.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
term_info |
||
dest |
String destination |
|
r |
Red component, 0-255 |
|
g |
Green component, 0-255 |
|
b |
Blue component, 0-255 |
Since: 1.6
gchar * chafa_term_info_emit_set_color_fgbg_direct (const ChafaTermInfo *term_info
,gchar *dest
,guint8 fg_r
,guint8 fg_g
,guint8 fg_b
,guint8 bg_r
,guint8 bg_g
,guint8 bg_b
);
Prints the control sequence for CHAFA_TERM_SEQ_SET_COLOR_FGBG_DIRECT.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
term_info |
||
dest |
String destination |
|
fg_r |
Foreground red component, 0-255 |
|
fg_g |
Foreground green component, 0-255 |
|
fg_b |
Foreground blue component, 0-255 |
|
bg_r |
Background red component, 0-255 |
|
bg_g |
Background green component, 0-255 |
|
bg_b |
Background blue component, 0-255 |
Since: 1.6
gchar * chafa_term_info_emit_reset_color_fg (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_RESET_COLOR_FG.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_reset_color_bg (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_RESET_COLOR_BG.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_reset_color_fgbg (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_RESET_COLOR_FGBG.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_set_default_fg (const ChafaTermInfo *term_info
,gchar *dest
,guint16 r
,guint16 g
,guint16 b
);
Prints the control sequence for CHAFA_TERM_SEQ_SET_DEFAULT_FG.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
term_info |
||
dest |
String destination |
|
r |
Red component (0-65535) |
|
g |
Green component (0-65535) |
|
b |
Blue component (0-65535) |
Since: 1.14
gchar * chafa_term_info_emit_set_default_bg (const ChafaTermInfo *term_info
,gchar *dest
,guint16 r
,guint16 g
,guint16 b
);
Prints the control sequence for CHAFA_TERM_SEQ_SET_DEFAULT_BG.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
term_info |
||
dest |
String destination |
|
r |
Red component (0-65535) |
|
g |
Green component (0-65535) |
|
b |
Blue component (0-65535) |
Since: 1.14
gchar * chafa_term_info_emit_reset_default_fg (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_RESET_DEFAULT_FG.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_reset_default_bg (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_RESET_DEFAULT_BG.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_query_default_fg (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_QUERY_DEFAULT_FG.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_query_default_bg (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_QUERY_DEFAULT_BG.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_repeat_char (const ChafaTermInfo *term_info
,gchar *dest
,guint n
);
Prints the control sequence for CHAFA_TERM_SEQ_REPEAT_CHAR.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.6
gchar * chafa_term_info_emit_set_scrolling_rows (const ChafaTermInfo *term_info
,gchar *dest
,guint top
,guint bottom
);
Prints the control sequence for CHAFA_TERM_SEQ_SET_SCROLLING_ROWS.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
term_info |
||
dest |
String destination |
|
top |
First row in scrolling area, zero-indexed |
|
bottom |
Last row in scrolling area, zero-indexed |
Since: 1.6
gchar * chafa_term_info_emit_reset_scrolling_rows (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_RESET_SCROLLING_ROWS.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_save_cursor_pos (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_SAVE_CURSOR_POS.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_restore_cursor_pos (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_RESTORE_CURSOR_POS.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_begin_sixels (const ChafaTermInfo *term_info
,gchar *dest
,guint p1
,guint p2
,guint p3
);
Prints the control sequence for CHAFA_TERM_SEQ_BEGIN_SIXELS.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
All three parameters (p1
, p2
and p3
) can normally be set to 0.
term_info |
||
dest |
String destination |
|
p1 |
Pixel aspect selector |
|
p2 |
Background color selector |
|
p3 |
Horizontal grid selector |
Since: 1.6
gchar * chafa_term_info_emit_end_sixels (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_END_SIXELS.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.6
gchar * chafa_term_info_emit_enable_sixel_scrolling (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_ENABLE_SIXEL_SCROLLING.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.10
gchar * chafa_term_info_emit_disable_sixel_scrolling (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_DISABLE_SIXEL_SCROLLING.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.10
gchar * chafa_term_info_emit_set_sixel_advance_down (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_SET_SIXEL_ADVANCE_DOWN.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_set_sixel_advance_right (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_SET_SIXEL_ADVANCE_RIGHT.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_begin_kitty_immediate_image_v1 (const ChafaTermInfo *term_info
,gchar *dest
,guint bpp
,guint width_pixels
,guint height_pixels
,guint width_cells
,guint height_cells
);
Prints the control sequence for CHAFA_TERM_SEQ_BEGIN_KITTY_IMMEDIATE_IMAGE_V1.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
bpp
must be set to either 24 for RGB data, 32 for RGBA, or 100 to embed a
PNG file.
This sequence must be followed by zero or more paired sequences of type CHAFA_TERM_SEQ_BEGIN_KITTY_IMAGE_CHUNK and CHAFA_TERM_SEQ_END_KITTY_IMAGE_CHUNK with base-64 encoded image data between them.
When the image data has been transferred, CHAFA_TERM_SEQ_END_KITTY_IMAGE must be emitted.
term_info |
||
dest |
String destination |
|
bpp |
Bits per pixel |
|
width_pixels |
Image width in pixels |
|
height_pixels |
Image height in pixels |
|
width_cells |
Target width in cells |
|
height_cells |
Target height in cells |
Since: 1.8
gchar * chafa_term_info_emit_begin_kitty_immediate_virt_image_v1 (const ChafaTermInfo *term_info
,gchar *dest
,guint bpp
,guint width_pixels
,guint height_pixels
,guint width_cells
,guint height_cells
,guint id
);
Prints the control sequence for CHAFA_TERM_SEQ_BEGIN_KITTY_IMMEDIATE_IMAGE_V1.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
bpp
must be set to either 24 for RGB data, 32 for RGBA, or 100 to embed a
PNG file.
This sequence must be followed by zero or more paired sequences of type CHAFA_TERM_SEQ_BEGIN_KITTY_IMAGE_CHUNK and CHAFA_TERM_SEQ_END_KITTY_IMAGE_CHUNK with base-64 encoded image data between them.
When the image data has been transferred, CHAFA_TERM_SEQ_END_KITTY_IMAGE must be emitted.
term_info |
||
dest |
String destination |
|
bpp |
Bits per pixel |
|
width_pixels |
Image width in pixels |
|
height_pixels |
Image height in pixels |
|
width_cells |
Target width in cells |
|
height_cells |
Target height in cells |
|
id |
Image ID |
Since: 1.14
gchar * chafa_term_info_emit_end_kitty_image (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_END_KITTY_IMAGE.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.8
gchar * chafa_term_info_emit_begin_kitty_image_chunk (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_BEGIN_KITTY_IMAGE_CHUNK.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.8
gchar * chafa_term_info_emit_end_kitty_image_chunk (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_END_KITTY_IMAGE_CHUNK.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.8
gchar * chafa_term_info_emit_begin_iterm2_image (const ChafaTermInfo *term_info
,gchar *dest
,guint width
,guint height
);
Prints the control sequence for CHAFA_TERM_SEQ_BEGIN_ITERM2_IMAGE.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
This sequence must be followed by base64-encoded image file data. The image can be any format supported by MacOS, e.g. PNG, JPEG, TIFF, GIF. When the image data has been transferred, CHAFA_TERM_SEQ_END_ITERM2_IMAGE must be emitted.
term_info |
||
dest |
String destination |
|
width |
Image width in character cells |
|
height |
Image height in character cells |
Since: 1.8
gchar * chafa_term_info_emit_end_iterm2_image (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_END_ITERM2_IMAGE.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.8
gchar * chafa_term_info_emit_begin_screen_passthrough (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_BEGIN_SCREEN_PASSTHROUGH.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Any control sequences between the beginning and end passthrough seqs must be escaped by turning \033 into \033\033.
Since: 1.14
gchar * chafa_term_info_emit_end_screen_passthrough (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_END_SCREEN_PASSTHROUGH.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Any control sequences between the beginning and end passthrough seqs must be escaped by turning \033 into \033\033.
Since: 1.14
gchar * chafa_term_info_emit_enable_alt_screen (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_ENABLE_ALT_SCREEN.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_disable_alt_screen (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_DISABLE_ALT_SCREEN.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_begin_tmux_passthrough (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_BEGIN_TMUX_PASSTHROUGH.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Any control sequences between the beginning and end passthrough seqs must be escaped by turning \033 into \033\033.
Since: 1.14
gchar * chafa_term_info_emit_end_tmux_passthrough (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_END_TMUX_PASSTHROUGH.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Any control sequences between the beginning and end passthrough seqs must be escaped by turning \033 into \033\033.
Since: 1.14
gchar * chafa_term_info_emit_return_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_RETURN_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_backspace_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_BACKSPACE_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_delete_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_DELETE_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_delete_ctrl_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_DELETE_CTRL_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_delete_shift_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_DELETE_SHIFT_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_insert_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_INSERT_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_insert_ctrl_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_INSERT_CTRL_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_insert_shift_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_INSERT_SHIFT_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_home_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_HOME_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_home_ctrl_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_HOME_CTRL_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_home_shift_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_HOME_SHIFT_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_end_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_END_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_end_ctrl_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_END_CTRL_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_end_shift_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_END_SHIFT_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_up_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_UP_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_up_ctrl_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_UP_CTRL_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_up_shift_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_UP_SHIFT_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_down_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_DOWN_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_down_ctrl_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_DOWN_CTRL_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_down_shift_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_DOWN_SHIFT_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_left_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_LEFT_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_left_ctrl_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_LEFT_CTRL_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_left_shift_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_LEFT_SHIFT_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_right_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_RIGHT_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_right_ctrl_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_RIGHT_CTRL_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_right_shift_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_RIGHT_SHIFT_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_page_up_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_PAGE_UP_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_page_up_ctrl_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_PAGE_UP_CTRL_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_page_up_shift_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_PAGE_UP_SHIFT_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_page_down_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_PAGE_DOWN_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_page_down_ctrl_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_PAGE_DOWN_CTRL_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_page_down_shift_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_PAGE_DOWN_SHIFT_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_tab_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_TAB_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_tab_shift_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_TAB_SHIFT_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_f1_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_F1_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_f1_ctrl_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_F1_CTRL_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_f1_shift_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_F1_SHIFT_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_f2_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_F2_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_f2_ctrl_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_F2_CTRL_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_f2_shift_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_F2_SHIFT_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_f3_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_F3_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_f3_ctrl_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_F3_CTRL_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_f3_shift_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_F3_SHIFT_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_f4_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_F4_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_f4_ctrl_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_F4_CTRL_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_f4_shift_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_F4_SHIFT_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_f5_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_F5_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_f5_ctrl_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_F5_CTRL_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_f5_shift_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_F5_SHIFT_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_f6_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_F6_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_f6_ctrl_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_F6_CTRL_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_f6_shift_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_F6_SHIFT_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_f7_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_F7_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_f7_ctrl_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_F7_CTRL_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_f7_shift_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_F7_SHIFT_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_f8_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_F8_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_f8_ctrl_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_F8_CTRL_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_f8_shift_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_F8_SHIFT_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_f9_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_F9_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_f9_ctrl_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_F9_CTRL_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_f9_shift_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_F9_SHIFT_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_f10_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_F10_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_f10_ctrl_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_F10_CTRL_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_f10_shift_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_F10_SHIFT_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_f11_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_F11_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_f11_ctrl_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_F11_CTRL_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_f11_shift_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_F11_SHIFT_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_f12_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_F12_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_f12_ctrl_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_F12_CTRL_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
gchar * chafa_term_info_emit_f12_shift_key (const ChafaTermInfo *term_info
,gchar *dest
);
Prints the control sequence for CHAFA_TERM_SEQ_F12_SHIFT_KEY.
dest
must have enough space to hold
CHAFA_TERM_SEQ_LENGTH_MAX bytes, even if the emitted sequence is
shorter. The output will not be zero-terminated.
Since: 1.14
An enumeration of the control sequences supported by ChafaTermInfo.
Reset the terminal to configured defaults. |
||
Reset the terminal to factory defaults. |
||
Reset active graphics rendition (colors and other attributes) to terminal defaults. |
||
Clear the screen. |
||
Invert foreground and background colors (disable with RESET_ATTRIBUTES). |
||
Move cursor to top left of screen. |
||
Move cursor to bottom left of screen. |
||
Move cursor to specific position. |
||
Move cursor up one cell. |
||
Move cursor up N cells. |
||
Move cursor down one cell. |
||
Move cursor down N cells. |
||
Move cursor left one cell. |
||
Move cursor left N cells. |
||
Move cursor right one cell. |
||
Move cursor right N cells. |
||
Move cursor up one cell. Scroll area contents down when at the edge. |
||
Move cursor down one cell. Scroll area contents up when at the edge. |
||
Insert blank cells at cursor position. |
||
Delete cells at cursor position. |
||
Insert rows at cursor position. |
||
Delete rows at cursor position. |
||
Set scrolling area extents. |
||
Enable insert mode. |
||
Disable insert mode. |
||
Show the cursor. |
||
Hide the cursor. |
||
Make the terminal echo input locally. |
||
Don't echo input locally. |
||
Make cursor wrap around to the next row after output in the final column. |
||
Make cursor stay in place after output to the final column. |
||
Set foreground color (directcolor/truecolor). |
||
Set background color (directcolor/truecolor). |
||
Set foreground and background color (directcolor/truecolor). |
||
Set foreground color (256 colors). |
||
Set background color (256 colors). |
||
Set foreground and background colors (256 colors). |
||
Set foreground color (16 colors). |
||
Set background color (16 colors). |
||
Set foreground and background colors (16 colors). |
||
Begin sixel image data. |
||
End sixel image data. |
||
Repeat previous character N times. |
||
Begin upload of Kitty image for immediate display at cursor. |
||
End of Kitty image upload. |
||
Begin Kitty image data chunk. |
||
End Kitty image data chunk. |
||
Begin iTerm2 image data. |
||
End of iTerm2 image data. |
||
Enable sixel scrolling. |
||
Disable sixel scrolling. |
||
Enable boldface (disable with RESET_ATTRIBUTES). |
||
Set foreground color (8 colors). |
||
Set background color (8 colors). |
||
Set foreground and background colors (8 colors). |
||
Reset the default FG color to the terminal's default. |
||
Set the default FG to a specific RGB color. |
||
Query the default FG color. |
||
Reset the default BG color to the terminal's default. |
||
Set the default BG to a specific RGB color. |
||
Query the default BG color. |
||
Return key. |
||
Backspace key. |
||
Tab key. |
||
Shift + tab key. |
||
Up key. |
||
Ctrl + up key. |
||
Shift + up key. |
||
Down key. |
||
Ctrl + down key. |
||
Shift + down key. |
||
Left key. |
||
Ctrl + left key. |
||
Shift + left key. |
||
Right key. |
||
Ctrl + right key. |
||
Shift + right key. |
||
Page up key. |
||
Ctrl + page up key. |
||
Shift + page up key. |
||
Page down key. |
||
Ctrl + page down key. |
||
Shift + page down key. |
||
Home key. |
||
Ctrl + home key. |
||
Shift + home key. |
||
End key. |
||
Ctrl + end key. |
||
Shift + end key. |
||
Insert key. |
||
Ctrl + insert key. |
||
Shift + insert key. |
||
Delete key. |
||
Ctrl + delete key. |
||
Shift + delete key. |
||
F1 key. |
||
Ctrl + F1 key. |
||
Shift + F1 key. |
||
F2 key. |
||
Ctrl + F2 key. |
||
Shift + F2 key. |
||
F3 key. |
||
Ctrl + F3 key. |
||
Shift + F3 key. |
||
F4 key. |
||
Ctrl + F4 key. |
||
Shift + F4 key. |
||
F5 key. |
||
Ctrl + F5 key. |
||
Shift + F5 key. |
||
F6 key. |
||
Ctrl + F6 key. |
||
Shift + F6 key. |
||
F7 key. |
||
Ctrl + F7 key. |
||
Shift + F7 key. |
||
F8 key. |
||
Ctrl + F8 key. |
||
Shift + F8 key. |
||
F9 key. |
||
Ctrl + F9 key. |
||
Shift + F9 key. |
||
F10 key. |
||
Ctrl + F10 key. |
||
Shift + F10 key. |
||
F11 key. |
||
Ctrl + F11 key. |
||
Shift + F11 key. |
||
F12 key. |
||
Ctrl + F12 key. |
||
Shift + F12 key. |
||
Reset foreground color to the default. |
||
Reset background color to the default. |
||
Reset foreground and background colors to the default. |
||
Reset scrolling area extent to that of the entire screen. |
||
Save the cursor's position. |
||
Move cursor to the last saved position. |
||
After showing a sixel image, leave cursor somewhere on the row below the image. |
||
After showing a sixel image, leave cursor to the right of the last row. |
||
Switch to the alternate screen buffer. |
||
Switch back to the regular screen buffer. |
||
Begins OSC passthrough for the GNU Screen multiplexer. |
||
Ends OSC passthrough for the GNU Screen multiplexer. |
||
Begins OSC passthrough for the tmux multiplexer. |
||
Ends OSC passthrough for the tmux multiplexer. |
||
Begin upload of virtual Kitty image for immediate display at cursor. |
||
Last control sequence plus one. |
#define CHAFA_TERM_INFO_ERROR (chafa_term_info_error_quark ())
Error domain for ChafaTermInfo. Errors in this domain will be from the ChafaTermInfoError enumeration. See GError for information on error domains.
Error codes returned by control sequence parsing.
A control sequence could exceed CHAFA_TERM_SEQ_LENGTH_MAX bytes if formatted with maximum argument lengths. |
||
An illegal escape sequence was used. |
||
A control sequence specified more than the maximum number of arguments, or an argument index was out of range. |