ChafaTermInfo: Chafa Reference Manual

## ChafaTermInfo ChafaTermInfo — Describes a particular terminal type |

## Functions

ChafaTermInfo * | chafa_term_info_new ()
ChafaTermInfo * | chafa_term_info_copy ()
void | chafa_term_info_ref ()
void | chafa_term_info_unref ()
ChafaTermInfo * | chafa_term_info_chain ()
void | chafa_term_info_supplement ()
const gchar * | chafa_term_info_get_name ()
void | chafa_term_info_set_name ()
ChafaTermQuirks | chafa_term_info_get_quirks ()
void | chafa_term_info_set_quirks ()
ChafaSymbolTags | chafa_term_info_get_safe_symbol_tags ()
void | chafa_term_info_set_safe_symbol_tags ()
const gchar * | chafa_term_info_get_seq ()
gint | chafa_term_info_set_seq ()
gboolean | chafa_term_info_have_seq ()
gboolean | chafa_term_info_get_inherit_seq ()
void | chafa_term_info_set_inherit_seq ()
gchar * | chafa_term_info_emit_seq ()
gchar * | chafa_term_info_emit_seq_valist ()
ChafaParseResult | chafa_term_info_parse_seq ()
ChafaParseResult | chafa_term_info_parse_seq_varargs ()
gboolean | chafa_term_info_is_canvas_mode_supported ()
ChafaCanvasMode | chafa_term_info_get_best_canvas_mode ()
gboolean | chafa_term_info_is_pixel_mode_supported ()
ChafaPixelMode | chafa_term_info_get_best_pixel_mode ()
gboolean | chafa_term_info_get_is_pixel_passthrough_needed ()
void | chafa_term_info_set_is_pixel_passthrough_needed ()
ChafaPassthrough | chafa_term_info_get_passthrough_type ()
gchar * | chafa_term_info_emit_reset_terminal_soft ()
gchar * | chafa_term_info_emit_reset_terminal_hard ()
gchar * | chafa_term_info_emit_reset_attributes ()
gchar * | chafa_term_info_emit_clear ()
gchar * | chafa_term_info_emit_cursor_to_pos ()
gchar * | chafa_term_info_emit_cursor_to_top_left ()
gchar * | chafa_term_info_emit_cursor_to_bottom_left ()
gchar * | chafa_term_info_emit_cursor_up ()
gchar * | chafa_term_info_emit_cursor_down ()
gchar * | chafa_term_info_emit_cursor_left ()
gchar * | chafa_term_info_emit_cursor_right ()
gchar * | chafa_term_info_emit_cursor_up_1 ()
gchar * | chafa_term_info_emit_cursor_down_1 ()
gchar * | chafa_term_info_emit_cursor_left_1 ()
gchar * | chafa_term_info_emit_cursor_right_1 ()
gchar * | chafa_term_info_emit_cursor_up_scroll ()
gchar * | chafa_term_info_emit_cursor_down_scroll ()
gchar * | chafa_term_info_emit_insert_cells ()
gchar * | chafa_term_info_emit_delete_cells ()
gchar * | chafa_term_info_emit_insert_rows ()
gchar * | chafa_term_info_emit_delete_rows ()
gchar * | chafa_term_info_emit_enable_cursor ()
gchar * | chafa_term_info_emit_disable_cursor ()
gchar * | chafa_term_info_emit_enable_echo ()
gchar * | chafa_term_info_emit_disable_echo ()
gchar * | chafa_term_info_emit_enable_insert ()
gchar * | chafa_term_info_emit_disable_insert ()
gchar * | chafa_term_info_emit_enable_wrap ()
gchar * | chafa_term_info_emit_disable_wrap ()
gchar * | chafa_term_info_emit_enable_bold ()
gchar * | chafa_term_info_emit_invert_colors ()
gchar * | chafa_term_info_emit_set_color_bg_8 ()
gchar * | chafa_term_info_emit_set_color_fg_8 ()
gchar * | chafa_term_info_emit_set_color_fgbg_8 ()
gchar * | chafa_term_info_emit_set_color_fg_16 ()
gchar * | chafa_term_info_emit_set_color_bg_16 ()
gchar * | chafa_term_info_emit_set_color_fgbg_16 ()
gchar * | chafa_term_info_emit_set_color_fg_256 ()
gchar * | chafa_term_info_emit_set_color_bg_256 ()
gchar * | chafa_term_info_emit_set_color_fgbg_256 ()
gchar * | chafa_term_info_emit_set_color_fg_direct ()
gchar * | chafa_term_info_emit_set_color_bg_direct ()
gchar * | chafa_term_info_emit_set_color_fgbg_direct ()
gchar * | chafa_term_info_emit_reset_color_fg ()
gchar * | chafa_term_info_emit_reset_color_bg ()
gchar * | chafa_term_info_emit_reset_color_fgbg ()
gchar * | chafa_term_info_emit_set_default_fg ()
gchar * | chafa_term_info_emit_set_default_bg ()
gchar * | chafa_term_info_emit_reset_default_fg ()
gchar * | chafa_term_info_emit_reset_default_bg ()
gchar * | chafa_term_info_emit_query_default_fg ()
gchar * | chafa_term_info_emit_query_default_bg ()
gchar * | chafa_term_info_emit_query_primary_device_attributes ()
gchar * | chafa_term_info_emit_primary_device_attributes ()
gchar * | chafa_term_info_emit_query_cell_size_px ()
gchar * | chafa_term_info_emit_cell_size_px ()
gchar * | chafa_term_info_emit_query_text_area_size_cells ()
gchar * | chafa_term_info_emit_text_area_size_cells ()
gchar * | chafa_term_info_emit_query_text_area_size_px ()
gchar * | chafa_term_info_emit_text_area_size_px ()
gchar * | chafa_term_info_emit_repeat_char ()
gchar * | chafa_term_info_emit_set_scrolling_rows ()
gchar * | chafa_term_info_emit_reset_scrolling_rows ()
gchar * | chafa_term_info_emit_save_cursor_pos ()
gchar * | chafa_term_info_emit_restore_cursor_pos ()
gchar * | chafa_term_info_emit_begin_sixels ()
gchar * | chafa_term_info_emit_end_sixels ()
gchar * | chafa_term_info_emit_enable_sixel_scrolling ()
gchar * | chafa_term_info_emit_disable_sixel_scrolling ()
gchar * | chafa_term_info_emit_set_sixel_advance_down ()
gchar * | chafa_term_info_emit_set_sixel_advance_right ()
gchar * | chafa_term_info_emit_begin_kitty_immediate_image_v1 ()
gchar * | chafa_term_info_emit_begin_kitty_immediate_virt_image_v1 ()
gchar * | chafa_term_info_emit_end_kitty_image ()
gchar * | chafa_term_info_emit_begin_kitty_image_chunk ()
gchar * | chafa_term_info_emit_end_kitty_image_chunk ()
gchar * | chafa_term_info_emit_begin_iterm2_image ()
gchar * | chafa_term_info_emit_end_iterm2_image ()
gchar * | chafa_term_info_emit_begin_screen_passthrough ()
gchar * | chafa_term_info_emit_end_screen_passthrough ()
gchar * | chafa_term_info_emit_enable_alt_screen ()
gchar * | chafa_term_info_emit_disable_alt_screen ()
gchar * | chafa_term_info_emit_begin_tmux_passthrough ()
gchar * | chafa_term_info_emit_end_tmux_passthrough ()
gchar * | chafa_term_info_emit_begin_hyperlink ()
gchar * | chafa_term_info_emit_begin_hyperlink_anchor ()
gchar * | chafa_term_info_emit_end_hyperlink ()
gchar * | chafa_term_info_emit_return_key ()
gchar * | chafa_term_info_emit_backspace_key ()
gchar * | chafa_term_info_emit_delete_key ()
gchar * | chafa_term_info_emit_delete_ctrl_key ()
gchar * | chafa_term_info_emit_delete_shift_key ()
gchar * | chafa_term_info_emit_insert_key ()
gchar * | chafa_term_info_emit_insert_ctrl_key ()
gchar * | chafa_term_info_emit_insert_shift_key ()
gchar * | chafa_term_info_emit_home_key ()
gchar * | chafa_term_info_emit_home_ctrl_key ()
gchar * | chafa_term_info_emit_home_shift_key ()
gchar * | chafa_term_info_emit_end_key ()
gchar * | chafa_term_info_emit_end_ctrl_key ()
gchar * | chafa_term_info_emit_end_shift_key ()
gchar * | chafa_term_info_emit_up_key ()
gchar * | chafa_term_info_emit_up_ctrl_key ()
gchar * | chafa_term_info_emit_up_shift_key ()
gchar * | chafa_term_info_emit_down_key ()
gchar * | chafa_term_info_emit_down_ctrl_key ()
gchar * | chafa_term_info_emit_down_shift_key ()
gchar * | chafa_term_info_emit_left_key ()
gchar * | chafa_term_info_emit_left_ctrl_key ()
gchar * | chafa_term_info_emit_left_shift_key ()
gchar * | chafa_term_info_emit_right_key ()
gchar * | chafa_term_info_emit_right_ctrl_key ()
gchar * | chafa_term_info_emit_right_shift_key ()
gchar * | chafa_term_info_emit_page_up_key ()
gchar * | chafa_term_info_emit_page_up_ctrl_key ()
gchar * | chafa_term_info_emit_page_up_shift_key ()
gchar * | chafa_term_info_emit_page_down_key ()
gchar * | chafa_term_info_emit_page_down_ctrl_key ()
gchar * | chafa_term_info_emit_page_down_shift_key ()
gchar * | chafa_term_info_emit_tab_key ()
gchar * | chafa_term_info_emit_tab_shift_key ()
gchar * | chafa_term_info_emit_f1_key ()
gchar * | chafa_term_info_emit_f1_ctrl_key ()
gchar * | chafa_term_info_emit_f1_shift_key ()
gchar * | chafa_term_info_emit_f2_key ()
gchar * | chafa_term_info_emit_f2_ctrl_key ()
gchar * | chafa_term_info_emit_f2_shift_key ()
gchar * | chafa_term_info_emit_f3_key ()
gchar * | chafa_term_info_emit_f3_ctrl_key ()
gchar * | chafa_term_info_emit_f3_shift_key ()
gchar * | chafa_term_info_emit_f4_key ()
gchar * | chafa_term_info_emit_f4_ctrl_key ()
gchar * | chafa_term_info_emit_f4_shift_key ()
gchar * | chafa_term_info_emit_f5_key ()
gchar * | chafa_term_info_emit_f5_ctrl_key ()
gchar * | chafa_term_info_emit_f5_shift_key ()
gchar * | chafa_term_info_emit_f6_key ()
gchar * | chafa_term_info_emit_f6_ctrl_key ()
gchar * | chafa_term_info_emit_f6_shift_key ()
gchar * | chafa_term_info_emit_f7_key ()
gchar * | chafa_term_info_emit_f7_ctrl_key ()
gchar * | chafa_term_info_emit_f7_shift_key ()
gchar * | chafa_term_info_emit_f8_key ()
gchar * | chafa_term_info_emit_f8_ctrl_key ()
gchar * | chafa_term_info_emit_f8_shift_key ()
gchar * | chafa_term_info_emit_f9_key ()
gchar * | chafa_term_info_emit_f9_ctrl_key ()
gchar * | chafa_term_info_emit_f9_shift_key ()
gchar * | chafa_term_info_emit_f10_key ()
gchar * | chafa_term_info_emit_f10_ctrl_key ()
gchar * | chafa_term_info_emit_f10_shift_key ()
gchar * | chafa_term_info_emit_f11_key ()
gchar * | chafa_term_info_emit_f11_ctrl_key ()
gchar * | chafa_term_info_emit_f11_shift_key ()
gchar * | chafa_term_info_emit_f12_key ()
gchar * | chafa_term_info_emit_f12_ctrl_key ()
gchar * | chafa_term_info_emit_f12_shift_key ()

## Types and Values

#define | CHAFA_TERM_SEQ_ARGS_MAX
#define | CHAFA_TERM_SEQ_LENGTH_MAX
enum | ChafaTermSeq
enum | ChafaTermQuirks
enum | ChafaParseResult
typedef | ChafaTermInfo
#define | CHAFA_TERM_INFO_ERROR
enum | ChafaTermInfoError

## Description

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.

## Functions

### chafa_term_info_new ()

    ChafaTermInfo *
    chafa_term_info_new (void);

Creates a new, blank ChafaTermInfo.

#### Returns

The new ChafaTermInfo

Since: 1.6

### chafa_term_info_copy ()

    ChafaTermInfo *
    chafa_term_info_copy (const ChafaTermInfo *term_info);

Creates a new ChafaTermInfo that's a copy of `term_info` .

#### Parameters

term_info | A ChafaTermInfo to copy. |

#### Returns

The new ChafaTermInfo

Since: 1.6

### chafa_term_info_ref ()

    void
    chafa_term_info_ref (ChafaTermInfo *term_info);

Adds a reference to `term_info` .

#### Parameters

term_info | ChafaTermInfo to add a reference to. |

Since: 1.6

### chafa_term_info_unref ()

    void
    chafa_term_info_unref (ChafaTermInfo *term_info);

Removes a reference from `term_info` .

#### Parameters

term_info | ChafaTermInfo to remove a reference from. |

Since: 1.6

### chafa_term_info_chain ()

    ChafaTermInfo *
    chafa_term_info_chain (ChafaTermInfo *outer,
                           ChafaTermInfo *inner);

Terminal emulators and applications are often nested, with the inner application's capabilities limiting, extending or modifying the outer's.

Examples are terminal multiplexers like Screen and tmux, or terminal emulators running inside editors like Emacs and vi.

This merges the `outer` and `inner` sequences into a single ChafaTermInfo according to the following rules.

For sequences marked as inherited in `inner` :

- If either `inner` or `outer` sequence is `NULL`, pick the `outer` sequence.

- Otherwise, pick `inner` sequence.

For sequences not marked as inherited, always use the `inner` sequence.

This allows for using the inner term's sequences while clearing them if the outer term does not support the sequence at all. This is useful for muxers (e.g. fbterm supports 256 colors, but with private seqs; we want to use the inner mux' corresponding seqs).

The merged ChafaTermInfo is a new instance, with the initial reference owned by the caller.

This function can be used repeatedly to create chains that're arbitrarily long, but is unlikely to be useful beyond three levels (terminal emulator, multiplexer, application).

#### Parameters

outer | The ChafaTermInfo for the outer terminal |
inner | The ChafaTermInfo for the inner terminal |

#### Returns

The merged ChafaTermInfo

Since: 1.16

### chafa_term_info_supplement ()

    void
    chafa_term_info_supplement (ChafaTermInfo *term_info,
                                ChafaTermInfo *source);

Supplements missing sequences in `term_info` with ones copied from `source` .

#### Parameters

term_info | A ChafaTermInfo to supplement |
source | A ChafaTermInfo to copy from |

Since: 1.6

### chafa_term_info_get_name ()

    const gchar *
    chafa_term_info_get_name (ChafaTermInfo *term_info);

Gets the name associated with the `term_info` . This may be NULL. The returned string belongs to `term_info` , and is only valid until the next operation on this data structure. Make a copy using `g_strdup()` if you need to keep it around.

#### Parameters

term_info | A ChafaTermInfo |

#### Returns

The name for this ChafaTermInfo, or `NULL`

Since: 1.16

### chafa_term_info_set_name ()

    void
    chafa_term_info_set_name (ChafaTermInfo *term_info,
                              const gchar *name);

Assigns a new name to `term_info` . The name should be a short lowercase ASCII string that uniquely identifies the terminal or program described by `term_info` .

#### Parameters

term_info | A ChafaTermInfo |
name | The new name for this ChafaTermInfo, or `NULL` |

Since: 1.16

### chafa_term_info_get_quirks ()

    ChafaTermQuirks
    chafa_term_info_get_quirks (ChafaTermInfo *term_info);

Gets the quirks associated with `term_info` .

#### Parameters

term_info | A ChafaTermInfo |

#### Returns

The ChafaTermQuirks flags

Since: 1.16

### chafa_term_info_set_quirks ()

    void
    chafa_term_info_set_quirks (ChafaTermInfo *term_info,
                                ChafaTermQuirks quirks);

Assigns a set of quirks to `term_info` .

#### Parameters

term_info | A ChafaTermInfo |
quirks | A set of ChafaTermQuirks flags |

Since: 1.16

### chafa_term_info_get_safe_symbol_tags ()

    ChafaSymbolTags
    chafa_term_info_get_safe_symbol_tags (ChafaTermInfo *term_info);

Gets the ChafaSymbolTags that are likely safe to use with `term_info` . The ChafaSymbolTags are a bitwise OR of flags from the enum.

#### Parameters

term_info | A ChafaTermInfo |

#### Returns

The ChafaSymbolTags

Since: 1.16

### chafa_term_info_set_safe_symbol_tags ()

    void
    chafa_term_info_set_safe_symbol_tags (ChafaTermInfo *term_info,
                                          ChafaSymbolTags tags);

Sets the ChafaSymbolTags that are likely safe to use with `term_info` . The `tags` are a bitwise OR of flags from the enum.

#### Parameters

term_info | A ChafaTermInfo |
tags | A set of ChafaSymbolTags |

Since: 1.16

### chafa_term_info_get_seq ()

    const gchar *
    chafa_term_info_get_seq (ChafaTermInfo *term_info,
                             ChafaTermSeq seq);

Gets the string equivalent of `seq` stored in `term_info` .

#### Parameters

term_info | A ChafaTermInfo. |
seq | A ChafaTermSeq to query for. |

#### Returns

An unformatted string sequence, or `NULL` if not set.

Since: 1.6

### chafa_term_info_set_seq ()

    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.

#### Parameters

term_info | A ChafaTermInfo. |
seq | A ChafaTermSeq to query for. |
str | A control sequence string, or `NULL` to clear. |
error | A return location for error details, or `NULL`. |

#### Returns

`TRUE` if parsing succeeded, `FALSE` otherwise

Since: 1.6

### chafa_term_info_have_seq ()

    gboolean
    chafa_term_info_have_seq (const ChafaTermInfo *term_info,
                              ChafaTermSeq seq);

Checks if `term_info` can emit `seq` .

#### Parameters

term_info | A ChafaTermInfo. |
seq | A ChafaTermSeq to query for. |

#### Returns

`TRUE` if `seq` can be emitted, `FALSE` otherwise

Since: 1.6

### chafa_term_info_get_inherit_seq ()

    gboolean
    chafa_term_info_get_inherit_seq (ChafaTermInfo *term_info,
                                     ChafaTermSeq seq);

Gets whether `seq` can be inherited from the outer ChafaTermInfo when chaining with `chafa_term_info_chain()`.

#### Parameters

term_info | A ChafaTermInfo |
seq | A ChafaTermSeq |

#### Returns

Whether `seq` gets inherited when chaining

Since: 1.16

### chafa_term_info_set_inherit_seq ()

    void
    chafa_term_info_set_inherit_seq (ChafaTermInfo *term_info,
                                     ChafaTermSeq seq,
                                     gboolean inherit);

Sets whether `seq` can be inherited from the outer ChafaTermInfo when chaining with `chafa_term_info_chain()`.

#### Parameters

term_info | A ChafaTermInfo |
seq | A ChafaTermSeq |
inherit | A boolean indicating whether `seq` should be inherited |

Since: 1.16

### chafa_term_info_emit_seq ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
seq | A ChafaTermSeq to emit |
... | A list of int arguments to insert in `seq` , terminated by -1 |

#### Returns

A newly allocated, zero-terminated formatted string, or `NULL` on error

Since: 1.14

### chafa_term_info_emit_seq_valist ()

    gchar *
    chafa_term_info_emit_seq_valist (ChafaTermInfo *term_info,
                                     ChafaTermSeq seq,
                                     va_list *args);

Behaves like `chafa_term_info_emit_seq()`, but takes the arguments as a va_list.

#### Parameters

term_info | A ChafaTermInfo |
seq | A ChafaTermSeq to emit |
args | A va_list of int arguments to insert in `seq` |

#### Returns

A newly allocated, zero-terminated formatted string, or `NULL` on error

Since: 1.16

### chafa_term_info_parse_seq ()

    ChafaParseResult
    chafa_term_info_parse_seq (ChafaTermInfo *term_info,
                               ChafaTermSeq seq,
                               gchar **input,
                               gint *input_len,
                               guint *args_out);

`chafa_term_info_parse_seq` has been deprecated since version 1.16 and should not be used in newly-written code.

Use `chafa_term_info_parse_seq_varargs()` instead.

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` .

Thus function can be used with seqs where the number of arguments is known in advance, but since it doesn't return the number of arguments parsed, it can't be used with variable-argument seqs.

It is recommended to use `chafa_term_info_parse_seq_varargs()` in all cases instead.

#### Parameters

term_info | A ChafaTermInfo |
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 |

#### Returns

A ChafaParseResult indicating success, failure or insufficient input data

Since: 1.14

### chafa_term_info_parse_seq_varargs ()

    ChafaParseResult
    chafa_term_info_parse_seq_varargs (ChafaTermInfo *term_info,
                                       ChafaTermSeq seq,
                                       gchar **input,
                                       gint *input_len,
                                       guint *args_out,
                                       gint *n_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` .

Any numeric parsed arguments are returned as an array starting at `args_out` , which must have room for up to CHAFA_TERM_SEQ_ARGS_MAX elements.

The number of parsed arguments is returned in `n_args_out` . This is useful for seqs with a variable number of arguments, like CHAFA_TERM_SEQ_PRIMARY_DEVICE_ATTRIBUTES.

Either or both of `args_out` and `n_args_out` can be `NULL`, in which case nothing is returned for that parameter.

#### Parameters

term_info | A ChafaTermInfo |
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 |
n_args_out | Pointer to storage for argument count |

#### Returns

A ChafaParseResult indicating success, failure or insufficient input data

Since: 1.16

### chafa_term_info_is_canvas_mode_supported ()

    gboolean
    chafa_term_info_is_canvas_mode_supported
                                   (ChafaTermInfo *term_info,
                                    ChafaCanvasMode canvas_mode);

Checks if `term_info` has terminal sequences that support `canvas_mode` .

#### Parameters

term_info | A ChafaTermInfo |
canvas_mode | A ChafaCanvasMode |

#### Returns

`TRUE` if `canvas_mode` is supported, `FALSE` otherwise.

Since: 1.16

### chafa_term_info_get_best_canvas_mode ()

    ChafaCanvasMode
    chafa_term_info_get_best_canvas_mode (ChafaTermInfo *term_info);

Gets the optimal ChafaCanvasMode supported by `term_info` .

#### Parameters

term_info | A ChafaTermInfo |

#### Returns

A ChafaCanvasMode

Since: 1.16

### chafa_term_info_is_pixel_mode_supported ()

    gboolean
    chafa_term_info_is_pixel_mode_supported
                                   (ChafaTermInfo *term_info,
                                    ChafaPixelMode pixel_mode);

Checks if `term_info` has terminal sequences that support `pixel_mode` .

#### Parameters

term_info | A ChafaTermInfo |
pixel_mode | A ChafaPixelMode |

#### Returns

`TRUE` if `pixel_mode` is supported, `FALSE` otherwise.

Since: 1.16

### chafa_term_info_get_best_pixel_mode ()

    ChafaPixelMode
    chafa_term_info_get_best_pixel_mode (ChafaTermInfo *term_info);

Gets the optimal ChafaPixelMode supported by `term_info` .

#### Parameters

term_info | A ChafaTermInfo |

#### Returns

A ChafaPixelMode

Since: 1.16

### chafa_term_info_get_is_pixel_passthrough_needed ()

    gboolean
    chafa_term_info_get_is_pixel_passthrough_needed
                                   (ChafaTermInfo *term_info,
                                    ChafaPixelMode pixel_mode);

Gets if passthrough should be used to convey images in `pixel_mode` . If needed, the passthrough type can be gotten from `chafa_term_info_get_passthrough_type()`.

#### Parameters

term_info | A ChafaTermInfo |
pixel_mode | A ChafaPixelMode |

#### Returns

`TRUE` if passthrough is needed, `FALSE` otherwise.

Since: 1.16

### chafa_term_info_set_is_pixel_passthrough_needed ()

    void
    chafa_term_info_set_is_pixel_passthrough_needed
                                   (ChafaTermInfo *term_info,
                                    ChafaPixelMode pixel_mode,
                                    gboolean pixel_passthrough_needed);

Specifies if passthrough should be used to convey images in `pixel_mode` .

#### Parameters

term_info | A ChafaTermInfo |
pixel_mode | A ChafaPixelMode |
pixel_passthrough_needed | A boolean indicating whether passthrough is needed |

Since: 1.16

### chafa_term_info_get_passthrough_type ()

    ChafaPassthrough
    chafa_term_info_get_passthrough_type (ChafaTermInfo *term_info);

Gets the passthrough mode supported by `term_info` .

#### Parameters

term_info | A ChafaTermInfo |

#### Returns

A ChafaPassthrough

Since: 1.16

### chafa_term_info_emit_reset_terminal_soft ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.6

### chafa_term_info_emit_reset_terminal_hard ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.6

### chafa_term_info_emit_reset_attributes ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.6

### chafa_term_info_emit_clear ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.6

### chafa_term_info_emit_cursor_to_pos ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |
x | Offset from left edge of display, zero-indexed |
y | Offset from top edge of display, zero-indexed |

#### Returns

Pointer to first byte after emitted string

Since: 1.6

### chafa_term_info_emit_cursor_to_top_left ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.6

### chafa_term_info_emit_cursor_to_bottom_left ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.6

### chafa_term_info_emit_cursor_up ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |
n | Distance to move the cursor |

#### Returns

Pointer to first byte after emitted string

Since: 1.6

### chafa_term_info_emit_cursor_down ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |
n | Distance to move the cursor |

#### Returns

Pointer to first byte after emitted string

Since: 1.6

### chafa_term_info_emit_cursor_left ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |
n | Distance to move the cursor |

#### Returns

Pointer to first byte after emitted string

Since: 1.6

### chafa_term_info_emit_cursor_right ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |
n | Distance to move the cursor |

#### Returns

Pointer to first byte after emitted string

Since: 1.6

### chafa_term_info_emit_cursor_up_1 ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.6

### chafa_term_info_emit_cursor_down_1 ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.6

### chafa_term_info_emit_cursor_left_1 ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.6

### chafa_term_info_emit_cursor_right_1 ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.6

### chafa_term_info_emit_cursor_up_scroll ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.6

### chafa_term_info_emit_cursor_down_scroll ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.6

### chafa_term_info_emit_insert_cells ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |
n | Number of cells to insert |

#### Returns

Pointer to first byte after emitted string

Since: 1.6

### chafa_term_info_emit_delete_cells ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |
n | Number of cells to delete |

#### Returns

Pointer to first byte after emitted string

Since: 1.6

### chafa_term_info_emit_insert_rows ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |
n | Number of rows to insert |

#### Returns

Pointer to first byte after emitted string

Since: 1.6

### chafa_term_info_emit_delete_rows ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |
n | Number of rows to delete |

#### Returns

Pointer to first byte after emitted string

Since: 1.6

### chafa_term_info_emit_enable_cursor ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.6

### chafa_term_info_emit_disable_cursor ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.6

### chafa_term_info_emit_enable_echo ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.6

### chafa_term_info_emit_disable_echo ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.6

### chafa_term_info_emit_enable_insert ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.6

### chafa_term_info_emit_disable_insert ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.6

### chafa_term_info_emit_enable_wrap ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.6

### chafa_term_info_emit_disable_wrap ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.6

### chafa_term_info_emit_enable_bold ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.12

### chafa_term_info_emit_invert_colors ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.6

### chafa_term_info_emit_set_color_bg_8 ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |
pen | Pen number, 0-7 |

#### Returns

Pointer to first byte after emitted string

Since: 1.12

### chafa_term_info_emit_set_color_fg_8 ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |
pen | Pen number, 0-7 |

#### Returns

Pointer to first byte after emitted string

Since: 1.12

### chafa_term_info_emit_set_color_fgbg_8 ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |
fg_pen | Foreground pen number, 0-7 |
bg_pen | Background pen number, 0-7 |

#### Returns

Pointer to first byte after emitted string

Since: 1.12

### chafa_term_info_emit_set_color_fg_16 ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |
pen | Pen number, 0-15 |

#### Returns

Pointer to first byte after emitted string

Since: 1.6

### chafa_term_info_emit_set_color_bg_16 ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |
pen | Pen number, 0-15 |

#### Returns

Pointer to first byte after emitted string

Since: 1.6

### chafa_term_info_emit_set_color_fgbg_16 ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |
fg_pen | Foreground pen number, 0-15 |
bg_pen | Background pen number, 0-15 |

#### Returns

Pointer to first byte after emitted string

Since: 1.6

### chafa_term_info_emit_set_color_fg_256 ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |
pen | Pen number, 0-255 |

#### Returns

Pointer to first byte after emitted string

Since: 1.6

### chafa_term_info_emit_set_color_bg_256 ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |
pen | Pen number, 0-255 |

#### Returns

Pointer to first byte after emitted string

Since: 1.6

### chafa_term_info_emit_set_color_fgbg_256 ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |
fg_pen | Foreground pen number, 0-255 |
bg_pen | Background pen number, 0-255 |

#### Returns

Pointer to first byte after emitted string

Since: 1.6

### chafa_term_info_emit_set_color_fg_direct ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |
r | Red component, 0-255 |
g | Green component, 0-255 |
b | Blue component, 0-255 |

#### Returns

Pointer to first byte after emitted string

Since: 1.6

### chafa_term_info_emit_set_color_bg_direct ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |
r | Red component, 0-255 |
g | Green component, 0-255 |
b | Blue component, 0-255 |

#### Returns

Pointer to first byte after emitted string

Since: 1.6

### chafa_term_info_emit_set_color_fgbg_direct ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
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 |

#### Returns

Pointer to first byte after emitted string

Since: 1.6

### chafa_term_info_emit_reset_color_fg ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_reset_color_bg ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_reset_color_fgbg ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_set_default_fg ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |
r | Red component (0-65535) |
g | Green component (0-65535) |
b | Blue component (0-65535) |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_set_default_bg ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |
r | Red component (0-65535) |
g | Green component (0-65535) |
b | Blue component (0-65535) |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_reset_default_fg ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_reset_default_bg ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_query_default_fg ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_query_default_bg ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_query_primary_device_attributes ()

    gchar *
    chafa_term_info_emit_query_primary_device_attributes
                                   (const ChafaTermInfo *term_info,
                                    gchar *dest);

Prints the control sequence for CHAFA_TERM_SEQ_QUERY_PRIMARY_DEVICE_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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.16

### chafa_term_info_emit_primary_device_attributes ()

    gchar *
    chafa_term_info_emit_primary_device_attributes
                                   (const ChafaTermInfo *term_info,
                                    gchar *dest,
                                    guint *args,
                                    gint n_args);

Prints the control sequence for CHAFA_TERM_SEQ_PRIMARY_DEVICE_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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |
args | Pointer to array of attributes |
n_args | Number of attributes in array |

#### Returns

Pointer to first byte after emitted string

Since: 1.16

### chafa_term_info_emit_query_cell_size_px ()

    gchar *
    chafa_term_info_emit_query_cell_size_px
                                   (const ChafaTermInfo *term_info,
                                    gchar *dest);

Prints the control sequence for CHAFA_TERM_SEQ_QUERY_CELL_SIZE_PX.

`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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.16

### chafa_term_info_emit_cell_size_px ()

    gchar *
    chafa_term_info_emit_cell_size_px (const ChafaTermInfo *term_info,
                                       gchar *dest,
                                       guint height_px,
                                       guint width_px);

Prints the control sequence for CHAFA_TERM_SEQ_CELL_SIZE_PX.

`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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |
height_px | Cell height in pixels |
width_px | Cell width in pixels |

#### Returns

Pointer to first byte after emitted string

Since: 1.16

### chafa_term_info_emit_query_text_area_size_cells ()

    gchar *
    chafa_term_info_emit_query_text_area_size_cells
                                   (const ChafaTermInfo *term_info,
                                    gchar *dest);

Prints the control sequence for CHAFA_TERM_SEQ_QUERY_TEXT_AREA_SIZE_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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.16

### chafa_term_info_emit_text_area_size_cells ()

    gchar *
    chafa_term_info_emit_text_area_size_cells
                                   (const ChafaTermInfo *term_info,
                                    gchar *dest,
                                    guint height_cells,
                                    guint width_cells);

Prints the control sequence for CHAFA_TERM_SEQ_TEXT_AREA_SIZE_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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |
height_cells | Text area height in cells |
width_cells | Text area width in cells |

#### Returns

Pointer to first byte after emitted string

Since: 1.16

### chafa_term_info_emit_query_text_area_size_px ()

    gchar *
    chafa_term_info_emit_query_text_area_size_px
                                   (const ChafaTermInfo *term_info,
                                    gchar *dest);

Prints the control sequence for CHAFA_TERM_SEQ_QUERY_TEXT_AREA_SIZE_PX.

`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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.16

### chafa_term_info_emit_text_area_size_px ()

    gchar *
    chafa_term_info_emit_text_area_size_px
                                   (const ChafaTermInfo *term_info,
                                    gchar *dest,
                                    guint height_px,
                                    guint width_px);

Prints the control sequence for CHAFA_TERM_SEQ_TEXT_AREA_SIZE_PX.

`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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |
height_px | Text area height in pixels |
width_px | Text area width in pixels |

#### Returns

Pointer to first byte after emitted string

Since: 1.16

### chafa_term_info_emit_repeat_char ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |
n | Number of repetitions |

#### Returns

Pointer to first byte after emitted string

Since: 1.6

### chafa_term_info_emit_set_scrolling_rows ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |
top | First row in scrolling area, zero-indexed |
bottom | Last row in scrolling area, zero-indexed |

#### Returns

Pointer to first byte after emitted string

Since: 1.6

### chafa_term_info_emit_reset_scrolling_rows ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_save_cursor_pos ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_restore_cursor_pos ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_begin_sixels ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |
p1 | Pixel aspect selector |
p2 | Background color selector |
p3 | Horizontal grid selector |

#### Returns

Pointer to first byte after emitted string

Since: 1.6

### chafa_term_info_emit_end_sixels ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.6

### chafa_term_info_emit_enable_sixel_scrolling ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.10

### chafa_term_info_emit_disable_sixel_scrolling ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.10

### chafa_term_info_emit_set_sixel_advance_down ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_set_sixel_advance_right ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_begin_kitty_immediate_image_v1 ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
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 |

#### Returns

Pointer to first byte after emitted string

Since: 1.8

### chafa_term_info_emit_begin_kitty_immediate_virt_image_v1 ()

    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_VIRT_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.

#### Parameters

term_info | A ChafaTermInfo |
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 |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_end_kitty_image ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.8

### chafa_term_info_emit_begin_kitty_image_chunk ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.8

### chafa_term_info_emit_end_kitty_image_chunk ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.8

### chafa_term_info_emit_begin_iterm2_image ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |
width | Image width in character cells |
height | Image height in character cells |

#### Returns

Pointer to first byte after emitted string

Since: 1.8

### chafa_term_info_emit_end_iterm2_image ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.8

### chafa_term_info_emit_begin_screen_passthrough ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_end_screen_passthrough ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_enable_alt_screen ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_disable_alt_screen ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_begin_tmux_passthrough ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_end_tmux_passthrough ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_begin_hyperlink ()

    gchar *
    chafa_term_info_emit_begin_hyperlink (const ChafaTermInfo *term_info,
                                          gchar *dest);

Prints the control sequence for CHAFA_TERM_SEQ_BEGIN_HYPERLINK.

`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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.18

### chafa_term_info_emit_begin_hyperlink_anchor ()

    gchar *
    chafa_term_info_emit_begin_hyperlink_anchor
                                   (const ChafaTermInfo *term_info,
                                    gchar *dest);

Prints the control sequence for CHAFA_TERM_SEQ_BEGIN_HYPERLINK_ANCHOR.

`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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.18

### chafa_term_info_emit_end_hyperlink ()

    gchar *
    chafa_term_info_emit_end_hyperlink (const ChafaTermInfo *term_info,
                                        gchar *dest);

Prints the control sequence for CHAFA_TERM_SEQ_END_HYPERLINK.

`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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.18

### chafa_term_info_emit_return_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_backspace_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_delete_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_delete_ctrl_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_delete_shift_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_insert_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_insert_ctrl_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_insert_shift_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_home_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_home_ctrl_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_home_shift_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_end_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_end_ctrl_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_end_shift_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_up_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_up_ctrl_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_up_shift_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_down_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_down_ctrl_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_down_shift_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_left_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_left_ctrl_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_left_shift_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_right_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_right_ctrl_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_right_shift_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_page_up_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_page_up_ctrl_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_page_up_shift_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_page_down_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_page_down_ctrl_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_page_down_shift_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_tab_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_tab_shift_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_f1_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_f1_ctrl_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_f1_shift_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_f2_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_f2_ctrl_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_f2_shift_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_f3_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_f3_ctrl_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_f3_shift_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_f4_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_f4_ctrl_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_f4_shift_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_f5_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_f5_ctrl_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_f5_shift_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_f6_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_f6_ctrl_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_f6_shift_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_f7_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_f7_ctrl_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_f7_shift_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_f8_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_f8_ctrl_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_f8_shift_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_f9_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_f9_ctrl_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_f9_shift_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_f10_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_f10_ctrl_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_f10_shift_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_f11_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_f11_ctrl_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_f11_shift_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_f12_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_f12_ctrl_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

### chafa_term_info_emit_f12_shift_key ()

    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.

#### Parameters

term_info | A ChafaTermInfo |
dest | String destination |

#### Returns

Pointer to first byte after emitted string

Since: 1.14

## Types and Values

### CHAFA_TERM_SEQ_ARGS_MAX

    #define CHAFA_TERM_SEQ_ARGS_MAX 24

### CHAFA_TERM_SEQ_LENGTH_MAX

    #define CHAFA_TERM_SEQ_LENGTH_MAX 96

### enum ChafaTermSeq

An enumeration of the control sequences supported by ChafaTermInfo.

#### Members

CHAFA_TERM_SEQ_RESET_TERMINAL_SOFT | Reset the terminal to configured defaults. |
CHAFA_TERM_SEQ_RESET_TERMINAL_HARD | Reset the terminal to factory defaults. |
CHAFA_TERM_SEQ_RESET_ATTRIBUTES | Reset active graphics rendition (colors and other attributes) to terminal defaults. |
CHAFA_TERM_SEQ_CLEAR | Clear the screen. |
CHAFA_TERM_SEQ_INVERT_COLORS | Invert foreground and background colors (disable with RESET_ATTRIBUTES). |
CHAFA_TERM_SEQ_CURSOR_TO_TOP_LEFT | Move cursor to top left of screen. |
CHAFA_TERM_SEQ_CURSOR_TO_BOTTOM_LEFT | Move cursor to bottom left of screen. |
CHAFA_TERM_SEQ_CURSOR_TO_POS | Move cursor to specific position. |
CHAFA_TERM_SEQ_CURSOR_UP_1 | Move cursor up one cell. |
CHAFA_TERM_SEQ_CURSOR_UP | Move cursor up N cells. |
CHAFA_TERM_SEQ_CURSOR_DOWN_1 | Move cursor down one cell. |
CHAFA_TERM_SEQ_CURSOR_DOWN | Move cursor down N cells. |
CHAFA_TERM_SEQ_CURSOR_LEFT_1 | Move cursor left one cell. |
CHAFA_TERM_SEQ_CURSOR_LEFT | Move cursor left N cells. |
CHAFA_TERM_SEQ_CURSOR_RIGHT_1 | Move cursor right one cell. |
CHAFA_TERM_SEQ_CURSOR_RIGHT | Move cursor right N cells. |
CHAFA_TERM_SEQ_CURSOR_UP_SCROLL | Move cursor up one cell. Scroll area contents down when at the edge. |
CHAFA_TERM_SEQ_CURSOR_DOWN_SCROLL | Move cursor down one cell. Scroll area contents up when at the edge. |
CHAFA_TERM_SEQ_INSERT_CELLS | Insert blank cells at cursor position. |
CHAFA_TERM_SEQ_DELETE_CELLS | Delete cells at cursor position. |
CHAFA_TERM_SEQ_INSERT_ROWS | Insert rows at cursor position. |
CHAFA_TERM_SEQ_DELETE_ROWS | Delete rows at cursor position. |
CHAFA_TERM_SEQ_SET_SCROLLING_ROWS | Set scrolling area extents. |
CHAFA_TERM_SEQ_ENABLE_INSERT | Enable insert mode. |
CHAFA_TERM_SEQ_DISABLE_INSERT | Disable insert mode. |
CHAFA_TERM_SEQ_ENABLE_CURSOR | Show the cursor. |
CHAFA_TERM_SEQ_DISABLE_CURSOR | Hide the cursor. |
CHAFA_TERM_SEQ_ENABLE_ECHO | Make the terminal echo input locally. |
CHAFA_TERM_SEQ_DISABLE_ECHO | Don't echo input locally. |
CHAFA_TERM_SEQ_ENABLE_WRAP | Make cursor wrap around to the next row after output in the final column. |
CHAFA_TERM_SEQ_DISABLE_WRAP | Make cursor stay in place after output to the final column. |
CHAFA_TERM_SEQ_SET_COLOR_FG_DIRECT | Set foreground color (directcolor/truecolor). |
CHAFA_TERM_SEQ_SET_COLOR_BG_DIRECT | Set background color (directcolor/truecolor). |
CHAFA_TERM_SEQ_SET_COLOR_FGBG_DIRECT | Set foreground and background color (directcolor/truecolor). |
CHAFA_TERM_SEQ_SET_COLOR_FG_256 | Set foreground color (256 colors). |
CHAFA_TERM_SEQ_SET_COLOR_BG_256 | Set background color (256 colors). |
CHAFA_TERM_SEQ_SET_COLOR_FGBG_256 | Set foreground and background colors (256 colors). |
CHAFA_TERM_SEQ_SET_COLOR_FG_16 | Set foreground color (16 colors). |
CHAFA_TERM_SEQ_SET_COLOR_BG_16 | Set background color (16 colors). |
CHAFA_TERM_SEQ_SET_COLOR_FGBG_16 | Set foreground and background colors (16 colors). |
CHAFA_TERM_SEQ_BEGIN_SIXELS | Begin sixel image data. |
CHAFA_TERM_SEQ_END_SIXELS | End sixel image data. |
CHAFA_TERM_SEQ_REPEAT_CHAR | Repeat previous character N times. |
CHAFA_TERM_SEQ_BEGIN_KITTY_IMMEDIATE_IMAGE_V1 | Begin upload of Kitty image for immediate display at cursor. |
CHAFA_TERM_SEQ_END_KITTY_IMAGE | End of Kitty image upload. |
CHAFA_TERM_SEQ_BEGIN_KITTY_IMAGE_CHUNK | Begin Kitty image data chunk. |
CHAFA_TERM_SEQ_END_KITTY_IMAGE_CHUNK | End Kitty image data chunk. |
CHAFA_TERM_SEQ_BEGIN_ITERM2_IMAGE | Begin iTerm2 image data. |
CHAFA_TERM_SEQ_END_ITERM2_IMAGE | End of iTerm2 image data. |
CHAFA_TERM_SEQ_ENABLE_SIXEL_SCROLLING | Enable sixel scrolling. |
CHAFA_TERM_SEQ_DISABLE_SIXEL_SCROLLING | Disable sixel scrolling. |
CHAFA_TERM_SEQ_ENABLE_BOLD | Enable boldface (disable with RESET_ATTRIBUTES). |
CHAFA_TERM_SEQ_SET_COLOR_FG_8 | Set foreground color (8 colors). |
CHAFA_TERM_SEQ_SET_COLOR_BG_8 | Set background color (8 colors). |
CHAFA_TERM_SEQ_SET_COLOR_FGBG_8 | Set foreground and background colors (8 colors). |
CHAFA_TERM_SEQ_RESET_DEFAULT_FG | Reset the default FG color to the terminal's default. |
CHAFA_TERM_SEQ_SET_DEFAULT_FG | Set the default FG to a specific RGB color. |
CHAFA_TERM_SEQ_QUERY_DEFAULT_FG | Query the default FG color. |
CHAFA_TERM_SEQ_RESET_DEFAULT_BG | Reset the default BG color to the terminal's default. |
CHAFA_TERM_SEQ_SET_DEFAULT_BG | Set the default BG to a specific RGB color. |
CHAFA_TERM_SEQ_QUERY_DEFAULT_BG | Query the default BG color. |
CHAFA_TERM_SEQ_RETURN_KEY | Return key. |
CHAFA_TERM_SEQ_BACKSPACE_KEY | Backspace key. |
CHAFA_TERM_SEQ_TAB_KEY | Tab key. |
CHAFA_TERM_SEQ_TAB_SHIFT_KEY | Shift + tab key. |
CHAFA_TERM_SEQ_UP_KEY | Up key. |
CHAFA_TERM_SEQ_UP_CTRL_KEY | Ctrl + up key. |
CHAFA_TERM_SEQ_UP_SHIFT_KEY | Shift + up key. |
CHAFA_TERM_SEQ_DOWN_KEY | Down key. |
CHAFA_TERM_SEQ_DOWN_CTRL_KEY | Ctrl + down key. |
CHAFA_TERM_SEQ_DOWN_SHIFT_KEY | Shift + down key. |
CHAFA_TERM_SEQ_LEFT_KEY | Left key. |
CHAFA_TERM_SEQ_LEFT_CTRL_KEY | Ctrl + left key. |
CHAFA_TERM_SEQ_LEFT_SHIFT_KEY | Shift + left key. |
CHAFA_TERM_SEQ_RIGHT_KEY | Right key. |
CHAFA_TERM_SEQ_RIGHT_CTRL_KEY | Ctrl + right key. |
CHAFA_TERM_SEQ_RIGHT_SHIFT_KEY | Shift + right key. |
CHAFA_TERM_SEQ_PAGE_UP_KEY | Page up key. |
CHAFA_TERM_SEQ_PAGE_UP_CTRL_KEY | Ctrl + page up key. |
CHAFA_TERM_SEQ_PAGE_UP_SHIFT_KEY | Shift + page up key. |
CHAFA_TERM_SEQ_PAGE_DOWN_KEY | Page down key. |
CHAFA_TERM_SEQ_PAGE_DOWN_CTRL_KEY | Ctrl + page down key. |
CHAFA_TERM_SEQ_PAGE_DOWN_SHIFT_KEY | Shift + page down key. |
CHAFA_TERM_SEQ_HOME_KEY | Home key. |
CHAFA_TERM_SEQ_HOME_CTRL_KEY | Ctrl + home key. |
CHAFA_TERM_SEQ_HOME_SHIFT_KEY | Shift + home key. |
CHAFA_TERM_SEQ_END_KEY | End key. |
CHAFA_TERM_SEQ_END_CTRL_KEY | Ctrl + end key. |
CHAFA_TERM_SEQ_END_SHIFT_KEY | Shift + end key. |
CHAFA_TERM_SEQ_INSERT_KEY | Insert key. |
CHAFA_TERM_SEQ_INSERT_CTRL_KEY | Ctrl + insert key. |
CHAFA_TERM_SEQ_INSERT_SHIFT_KEY | Shift + insert key. |
CHAFA_TERM_SEQ_DELETE_KEY | Delete key. |
CHAFA_TERM_SEQ_DELETE_CTRL_KEY | Ctrl + delete key. |
CHAFA_TERM_SEQ_DELETE_SHIFT_KEY | Shift + delete key. |
CHAFA_TERM_SEQ_F1_KEY | F1 key. |
CHAFA_TERM_SEQ_F1_CTRL_KEY | Ctrl + F1 key. |
CHAFA_TERM_SEQ_F1_SHIFT_KEY | Shift + F1 key. |
CHAFA_TERM_SEQ_F2_KEY | F2 key. |
CHAFA_TERM_SEQ_F2_CTRL_KEY | Ctrl + F2 key. |
CHAFA_TERM_SEQ_F2_SHIFT_KEY | Shift + F2 key. |
CHAFA_TERM_SEQ_F3_KEY | F3 key. |
CHAFA_TERM_SEQ_F3_CTRL_KEY | Ctrl + F3 key. |
CHAFA_TERM_SEQ_F3_SHIFT_KEY | Shift + F3 key. |
CHAFA_TERM_SEQ_F4_KEY | F4 key. |
CHAFA_TERM_SEQ_F4_CTRL_KEY | Ctrl + F4 key. |
CHAFA_TERM_SEQ_F4_SHIFT_KEY | Shift + F4 key. |
CHAFA_TERM_SEQ_F5_KEY | F5 key. |
CHAFA_TERM_SEQ_F5_CTRL_KEY | Ctrl + F5 key. |
CHAFA_TERM_SEQ_F5_SHIFT_KEY | Shift + F5 key. |
CHAFA_TERM_SEQ_F6_KEY | F6 key. |
CHAFA_TERM_SEQ_F6_CTRL_KEY | Ctrl + F6 key. |
CHAFA_TERM_SEQ_F6_SHIFT_KEY | Shift + F6 key. |
CHAFA_TERM_SEQ_F7_KEY | F7 key. |
CHAFA_TERM_SEQ_F7_CTRL_KEY | Ctrl + F7 key. |
CHAFA_TERM_SEQ_F7_SHIFT_KEY | Shift + F7 key. |
CHAFA_TERM_SEQ_F8_KEY | F8 key. |
CHAFA_TERM_SEQ_F8_CTRL_KEY | Ctrl + F8 key. |
CHAFA_TERM_SEQ_F8_SHIFT_KEY | Shift + F8 key. |
CHAFA_TERM_SEQ_F9_KEY | F9 key. |
CHAFA_TERM_SEQ_F9_CTRL_KEY | Ctrl + F9 key. |
CHAFA_TERM_SEQ_F9_SHIFT_KEY | Shift + F9 key. |
CHAFA_TERM_SEQ_F10_KEY | F10 key. |
CHAFA_TERM_SEQ_F10_CTRL_KEY | Ctrl + F10 key. |
CHAFA_TERM_SEQ_F10_SHIFT_KEY | Shift + F10 key. |
CHAFA_TERM_SEQ_F11_KEY | F11 key. |
CHAFA_TERM_SEQ_F11_CTRL_KEY | Ctrl + F11 key. |
CHAFA_TERM_SEQ_F11_SHIFT_KEY | Shift + F11 key. |
CHAFA_TERM_SEQ_F12_KEY | F12 key. |
CHAFA_TERM_SEQ_F12_CTRL_KEY | Ctrl + F12 key. |
CHAFA_TERM_SEQ_F12_SHIFT_KEY | Shift + F12 key. |
CHAFA_TERM_SEQ_RESET_COLOR_FG | Reset foreground color to the default. |
CHAFA_TERM_SEQ_RESET_COLOR_BG | Reset background color to the default. |
CHAFA_TERM_SEQ_RESET_COLOR_FGBG | Reset foreground and background colors to the default. |
CHAFA_TERM_SEQ_RESET_SCROLLING_ROWS | Reset scrolling area extent to that of the entire screen. |
CHAFA_TERM_SEQ_SAVE_CURSOR_POS | Save the cursor's position. |
CHAFA_TERM_SEQ_RESTORE_CURSOR_POS | Move cursor to the last saved position. |
CHAFA_TERM_SEQ_SET_SIXEL_ADVANCE_DOWN | After showing a sixel image, leave cursor somewhere on the row below the image. |
CHAFA_TERM_SEQ_SET_SIXEL_ADVANCE_RIGHT | After showing a sixel image, leave cursor to the right of the last row. |
CHAFA_TERM_SEQ_ENABLE_ALT_SCREEN | Switch to the alternate screen buffer. |
CHAFA_TERM_SEQ_DISABLE_ALT_SCREEN | Switch back to the regular screen buffer. |
CHAFA_TERM_SEQ_BEGIN_SCREEN_PASSTHROUGH | Begins OSC passthrough for the GNU Screen multiplexer. |
CHAFA_TERM_SEQ_END_SCREEN_PASSTHROUGH | Ends OSC passthrough for the GNU Screen multiplexer. |
CHAFA_TERM_SEQ_BEGIN_TMUX_PASSTHROUGH | Begins OSC passthrough for the tmux multiplexer. |
CHAFA_TERM_SEQ_END_TMUX_PASSTHROUGH | Ends OSC passthrough for the tmux multiplexer. |
CHAFA_TERM_SEQ_BEGIN_KITTY_IMMEDIATE_VIRT_IMAGE_V1 | Begin upload of virtual Kitty image for immediate display at cursor. |
CHAFA_TERM_SEQ_QUERY_PRIMARY_DEVICE_ATTRIBUTES | Queries the terminal for its primary device attributes. |
CHAFA_TERM_SEQ_PRIMARY_DEVICE_ATTRIBUTES | The terminal's primary device attributes. |
CHAFA_TERM_SEQ_QUERY_TEXT_AREA_SIZE_CELLS | Query the text area size in character cells. |
CHAFA_TERM_SEQ_TEXT_AREA_SIZE_CELLS | Indicate the text area size in character cells. |
CHAFA_TERM_SEQ_QUERY_TEXT_AREA_SIZE_PX | Query the text area size in pixels. |
CHAFA_TERM_SEQ_TEXT_AREA_SIZE_PX | Indicate the text area size in pixels. |
CHAFA_TERM_SEQ_QUERY_CELL_SIZE_PX | Query the character cell size in pixels. |
CHAFA_TERM_SEQ_CELL_SIZE_PX | Indicate the character cell size in pixels. |
CHAFA_TERM_SEQ_BEGIN_HYPERLINK | Begins an OSC 8-style hyperlink. The URL follows this. |
CHAFA_TERM_SEQ_BEGIN_HYPERLINK_ANCHOR | Separates an OSC 8-style hyperlink URL from its anchor (label). The label follows this. |
CHAFA_TERM_SEQ_END_HYPERLINK | Ends an OSC 8-style hyperlink. Closes both the preceding CHAFA_TERM_SEQ_BEGIN_HYPERLINK and CHAFA_TERM_SEQ_BEGIN_HYPERLINK_ANCHOR. |
CHAFA_TERM_SEQ_MAX | Last control sequence plus one. |

### enum ChafaTermQuirks

Flags denoting various terminal quirks.

#### Members

CHAFA_TERM_QUIRK_SIXEL_OVERSHOOT | After printing a sixel image in advance-down mode, terminal leaves the cursor below the final row instead of on top of it. |

### enum ChafaParseResult

An enumeration of the possible return values from the parsing function.

#### Members

CHAFA_PARSE_SUCCESS | Parsed successfully |
CHAFA_PARSE_FAILURE | Data mismatch |
CHAFA_PARSE_AGAIN | Partial success, but not enough input |

### ChafaTermInfo

    typedef struct ChafaTermInfo ChafaTermInfo;

### CHAFA_TERM_INFO_ERROR

    #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.

### enum ChafaTermInfoError

Error codes returned by control sequence parsing.

#### Members

CHAFA_TERM_INFO_ERROR_SEQ_TOO_LONG | A control sequence could exceed CHAFA_TERM_SEQ_LENGTH_MAX bytes if formatted with maximum argument lengths. |
CHAFA_TERM_INFO_ERROR_BAD_ESCAPE | An illegal escape sequence was used. |
CHAFA_TERM_INFO_ERROR_BAD_ARGUMENTS | A control sequence specified more than the maximum number of arguments, or an argument index was out of range. |