VteTerminal

VteTerminal — A terminal widget implementation

Functions

gboolean (*VteSelectionFunc) ()
GtkWidget * vte_terminal_new ()
void vte_terminal_feed ()
void vte_terminal_feed_child ()
void vte_terminal_select_all ()
void vte_terminal_unselect_all ()
void vte_terminal_copy_clipboard_format ()
void vte_terminal_paste_clipboard ()
void vte_terminal_paste_text ()
void vte_terminal_copy_primary ()
void vte_terminal_paste_primary ()
void vte_terminal_set_size ()
void vte_terminal_set_font_scale ()
gdouble vte_terminal_get_font_scale ()
void vte_terminal_set_audible_bell ()
gboolean vte_terminal_get_audible_bell ()
void vte_terminal_set_allow_bold ()
gboolean vte_terminal_get_allow_bold ()
void vte_terminal_set_bold_is_bright ()
gboolean vte_terminal_get_bold_is_bright ()
void vte_terminal_set_allow_hyperlink ()
gboolean vte_terminal_get_allow_hyperlink ()
void vte_terminal_set_enable_fallback_scrolling ()
gboolean vte_terminal_get_enable_fallback_scrolling ()
void vte_terminal_set_scroll_on_output ()
gboolean vte_terminal_get_scroll_on_output ()
void vte_terminal_set_scroll_on_keystroke ()
gboolean vte_terminal_get_scroll_on_keystroke ()
void vte_terminal_set_scroll_unit_is_pixels ()
gboolean vte_terminal_get_scroll_unit_is_pixels ()
void vte_terminal_set_cell_height_scale ()
double vte_terminal_get_cell_height_scale ()
void vte_terminal_set_cell_width_scale ()
double vte_terminal_get_cell_width_scale ()
void vte_terminal_set_color_bold ()
void vte_terminal_set_color_foreground ()
void vte_terminal_set_color_background ()
void vte_terminal_set_color_cursor ()
void vte_terminal_set_color_cursor_foreground ()
void vte_terminal_set_color_highlight ()
void vte_terminal_set_color_highlight_foreground ()
void vte_terminal_set_colors ()
void vte_terminal_set_default_colors ()
void vte_terminal_set_cursor_shape ()
VteCursorShape vte_terminal_get_cursor_shape ()
VteCursorBlinkMode vte_terminal_get_cursor_blink_mode ()
void vte_terminal_set_cursor_blink_mode ()
VteTextBlinkMode vte_terminal_get_text_blink_mode ()
void vte_terminal_set_text_blink_mode ()
void vte_terminal_set_scrollback_lines ()
glong vte_terminal_get_scrollback_lines ()
void vte_terminal_set_font ()
const PangoFontDescription * vte_terminal_get_font ()
gboolean vte_terminal_get_has_selection ()
void vte_terminal_set_backspace_binding ()
void vte_terminal_set_delete_binding ()
void vte_terminal_set_mouse_autohide ()
gboolean vte_terminal_get_mouse_autohide ()
void vte_terminal_set_enable_bidi ()
gboolean vte_terminal_get_enable_bidi ()
void vte_terminal_set_enable_shaping ()
gboolean vte_terminal_get_enable_shaping ()
void vte_terminal_reset ()
char * vte_terminal_get_text ()
char * vte_terminal_get_text_range ()
void vte_terminal_get_cursor_position ()
char * vte_terminal_hyperlink_check_event ()
int vte_terminal_match_add_regex ()
void vte_terminal_match_remove ()
void vte_terminal_match_remove_all ()
char * vte_terminal_match_check ()
char * vte_terminal_match_check_event ()
void vte_terminal_match_set_cursor_name ()
void vte_terminal_set_cjk_ambiguous_width ()
int vte_terminal_get_cjk_ambiguous_width ()
void vte_terminal_set_word_char_exceptions ()
const char * vte_terminal_get_word_char_exceptions ()
void vte_terminal_set_input_enabled ()
gboolean vte_terminal_get_input_enabled ()
gboolean vte_terminal_get_enable_sixel ()
void vte_terminal_set_enable_sixel ()
gboolean vte_terminal_write_contents_sync ()
gboolean vte_terminal_search_find_next ()
gboolean vte_terminal_search_find_previous ()
VteRegex * vte_terminal_search_get_regex ()
gboolean vte_terminal_search_get_wrap_around ()
void vte_terminal_search_set_regex ()
void vte_terminal_search_set_wrap_around ()
char ** vte_terminal_event_check_regex_array ()
gboolean vte_terminal_event_check_regex_simple ()
char * vte_get_user_shell ()
const char * vte_get_features ()
VteFeatureFlags vte_get_feature_flags ()
char ** vte_get_encodings ()
gboolean vte_get_encoding_supported ()
void (*VteTerminalSpawnAsyncCallback) ()
void vte_terminal_spawn_async ()
void vte_terminal_spawn_with_fds_async ()
VtePty * vte_terminal_get_pty ()
void vte_terminal_set_pty ()
VtePty * vte_terminal_pty_new_sync ()
void vte_terminal_watch_child ()
void vte_terminal_set_clear_background ()
void vte_terminal_get_color_background_for_draw ()
glong vte_terminal_get_char_height ()
glong vte_terminal_get_char_width ()
glong vte_terminal_get_column_count ()
glong vte_terminal_get_row_count ()
const char * vte_terminal_get_window_title ()
const char * vte_terminal_get_current_directory_uri ()
const char * vte_terminal_get_current_file_uri ()
void vte_terminal_copy_clipboard ()
void vte_terminal_match_set_cursor ()
void vte_terminal_match_set_cursor_type ()
int vte_terminal_match_add_gregex ()
GRegex * vte_terminal_search_get_gregex ()
void vte_terminal_search_set_gregex ()
gboolean vte_terminal_event_check_gregex_simple ()
gboolean vte_terminal_spawn_sync ()
void vte_terminal_get_geometry_hints ()
void vte_terminal_set_geometry_hints_for_window ()
const char * vte_terminal_get_icon_title ()
gboolean vte_terminal_set_encoding ()
const char * vte_terminal_get_encoding ()
char * vte_terminal_get_text_include_trailing_spaces ()
void vte_terminal_set_rewrap_on_resize ()
gboolean vte_terminal_get_rewrap_on_resize ()
void vte_terminal_feed_child_binary ()

Properties

gboolean allow-bold Read / Write
gboolean allow-hyperlink Read / Write
gboolean audible-bell Read / Write
VteEraseBinding backspace-binding Read / Write
gboolean bold-is-bright Read / Write
double cell-height-scale Read / Write
double cell-width-scale Read / Write
int cjk-ambiguous-width Read / Write
char * current-directory-uri Read
char * current-file-uri Read
VteCursorBlinkMode cursor-blink-mode Read / Write
VteCursorShape cursor-shape Read / Write
VteEraseBinding delete-binding Read / Write
gboolean enable-bidi Read / Write
gboolean enable-fallback-scrolling Read / Write
gboolean enable-shaping Read / Write
gboolean enable-sixel Read / Write
char * encoding Read / Write
PangoFontDescription * font-desc Read / Write
double font-scale Read / Write
char * hyperlink-hover-uri Read
char * icon-title Read
gboolean input-enabled Read / Write
gboolean pointer-autohide Read / Write
VtePty * pty Read / Write
gboolean rewrap-on-resize Read / Write
gboolean scroll-on-keystroke Read / Write
gboolean scroll-on-output Read / Write
gboolean scroll-unit-is-pixels Read / Write
guint scrollback-lines Read / Write
VteTextBlinkMode text-blink-mode Read / Write
char * window-title Read
char * word-char-exceptions Read

Signals

void bell Run Last
void char-size-changed Run Last
void child-exited Run Last
void commit Run Last
void contents-changed Run Last
void copy-clipboard Action
void current-directory-uri-changed Run Last
void current-file-uri-changed Run Last
void cursor-moved Run Last
void decrease-font-size Run Last
void deiconify-window Run Last
void encoding-changed Run Last
void eof Run Last
void hyperlink-hover-uri-changed Run Last
void icon-title-changed Run Last
void iconify-window Run Last
void increase-font-size Run Last
void lower-window Run Last
void maximize-window Run Last
void move-window Run Last
void paste-clipboard Action
void raise-window Run Last
void refresh-window Run Last
void resize-window Run Last
void restore-window Run Last
void selection-changed Run Last
void text-deleted Run Last
void text-inserted Run Last
void text-modified Run Last
void text-scrolled Run Last
void window-title-changed Run Last

Types and Values

Object Hierarchy

    GEnum
    ├── VteCursorBlinkMode
    ├── VteCursorShape
    ├── VteEraseBinding
    ├── VteTextBlinkMode
    ╰── VteWriteFlags
    GObject
    ╰── GInitiallyUnowned
        ╰── GtkWidget
            ╰── VteTerminal

Implemented Interfaces

VteTerminal implements AtkImplementorIface, GtkBuildable and GtkScrollable.

Description

A VteTerminal is a terminal emulator implemented as a GTK3 widget.

Functions

VteSelectionFunc ()

gboolean
(*VteSelectionFunc) (VteTerminal *terminal,
                     glong column,
                     glong row,
                     gpointer data);

Specifies the type of a selection function used to check whether a cell has to be selected or not.

Parameters

terminal

terminal in which the cell is.

 

column

column in which the cell is.

 

row

row in which the cell is.

 

data

user data.

[closure]

Returns

TRUE if cell has to be selected; FALSE if otherwise.


vte_terminal_new ()

GtkWidget *
vte_terminal_new (void);

Creates a new terminal widget.

Returns

a new VteTerminal object.

[transfer none][type Vte.Terminal]


vte_terminal_feed ()

void
vte_terminal_feed (VteTerminal *terminal,
                   const char *data,
                   gssize length);

Interprets data as if it were data received from a child process.

Parameters

terminal

a VteTerminal

 

data

a string in the terminal's current encoding.

[array length=length][element-type guint8][allow-none]

length

the length of the string, or -1 to use the full length or a nul-terminated string

 

vte_terminal_feed_child ()

void
vte_terminal_feed_child (VteTerminal *terminal,
                         const char *text,
                         gssize length);

Sends a block of UTF-8 text to the child as if it were entered by the user at the keyboard.

Parameters

terminal

a VteTerminal

 

text

data to send to the child.

[array length=length][element-type guint8][allow-none]

length

length of text in bytes, or -1 if text is NUL-terminated

 

vte_terminal_select_all ()

void
vte_terminal_select_all (VteTerminal *terminal);

Selects all text within the terminal (not including the scrollback buffer).

Parameters

terminal

a VteTerminal

 

vte_terminal_unselect_all ()

void
vte_terminal_unselect_all (VteTerminal *terminal);

Clears the current selection.

Parameters

terminal

a VteTerminal

 

vte_terminal_copy_clipboard_format ()

void
vte_terminal_copy_clipboard_format (VteTerminal *terminal,
                                    VteFormat format);

Places the selected text in the terminal in the GDK_SELECTION_CLIPBOARD selection in the form specified by format .

For all formats, the selection data (see GtkSelectionData) will include the text targets (see gtk_target_list_add_text_targets() and gtk_selection_data_targets_includes_text()). For VTE_FORMAT_HTML, the selection will also include the "text/html" target, which when requested, returns the HTML data in UTF-16 with a U+FEFF BYTE ORDER MARK character at the start.

Parameters

terminal

a VteTerminal

 

format

a VteFormat

 

Since: 0.50


vte_terminal_paste_clipboard ()

void
vte_terminal_paste_clipboard (VteTerminal *terminal);

Sends the contents of the GDK_SELECTION_CLIPBOARD selection to the terminal's child. It's called on paste menu item, or when user presses Shift+Insert.

Parameters

terminal

a VteTerminal

 

vte_terminal_paste_text ()

void
vte_terminal_paste_text (VteTerminal *terminal,
                         char const*text);

Sends text to the terminal's child as if retrived from the clipboard, this differs from vte_terminal_feed_child() in that it may process text before passing it to the child (e.g. apply bracketed mode)

Parameters

terminal

a VteTerminal

 

text

a string to paste

 

Since: 0.68


vte_terminal_copy_primary ()

void
vte_terminal_copy_primary (VteTerminal *terminal);

Places the selected text in the terminal in the GDK_SELECTION_PRIMARY selection.

Parameters

terminal

a VteTerminal

 

vte_terminal_paste_primary ()

void
vte_terminal_paste_primary (VteTerminal *terminal);

Sends the contents of the GDK_SELECTION_PRIMARY selection to the terminal's child. The terminal will call also paste the GDK_SELECTION_PRIMARY selection when the user clicks with the the second mouse button.

Parameters

terminal

a VteTerminal

 

vte_terminal_set_size ()

void
vte_terminal_set_size (VteTerminal *terminal,
                       glong columns,
                       glong rows);

Attempts to change the terminal's size in terms of rows and columns. If the attempt succeeds, the widget will resize itself to the proper size.

Parameters

terminal

a VteTerminal

 

columns

the desired number of columns

 

rows

the desired number of rows

 

vte_terminal_set_font_scale ()

void
vte_terminal_set_font_scale (VteTerminal *terminal,
                             gdouble scale);

Sets the terminal's font scale to scale .

Parameters

terminal

a VteTerminal

 

scale

the font scale

 

vte_terminal_get_font_scale ()

gdouble
vte_terminal_get_font_scale (VteTerminal *terminal);

Parameters

terminal

a VteTerminal

 

Returns

the terminal's font scale


vte_terminal_set_audible_bell ()

void
vte_terminal_set_audible_bell (VteTerminal *terminal,
                               gboolean is_audible);

Controls whether or not the terminal will beep when the child outputs the "bl" sequence.

Parameters

terminal

a VteTerminal

 

is_audible

TRUE if the terminal should beep

 

vte_terminal_get_audible_bell ()

gboolean
vte_terminal_get_audible_bell (VteTerminal *terminal);

Checks whether or not the terminal will beep when the child outputs the "bl" sequence.

Parameters

terminal

a VteTerminal

 

Returns

TRUE if audible bell is enabled, FALSE if not


vte_terminal_set_allow_bold ()

void
vte_terminal_set_allow_bold (VteTerminal *terminal,
                             gboolean allow_bold);

vte_terminal_set_allow_bold has been deprecated since version 0.60 and should not be used in newly-written code.

There's probably no reason for this feature to exist.

Controls whether or not the terminal will attempt to draw bold text, by using a bold font variant.

Parameters

terminal

a VteTerminal

 

allow_bold

TRUE if the terminal should attempt to draw bold text

 

vte_terminal_get_allow_bold ()

gboolean
vte_terminal_get_allow_bold (VteTerminal *terminal);

vte_terminal_get_allow_bold has been deprecated since version 0.60 and should not be used in newly-written code.

There's probably no reason for this feature to exist.

Checks whether or not the terminal will attempt to draw bold text, by using a bold font variant.

Parameters

terminal

a VteTerminal

 

Returns

TRUE if bolding is enabled, FALSE if not


vte_terminal_set_bold_is_bright ()

void
vte_terminal_set_bold_is_bright (VteTerminal *terminal,
                                 gboolean bold_is_bright);

Sets whether the SGR 1 attribute also switches to the bright counterpart of the first 8 palette colors, in addition to making them bold (legacy behavior) or if SGR 1 only enables bold and leaves the color intact.

Parameters

terminal

a VteTerminal

 

bold_is_bright

TRUE if bold should also enable bright

 

Since: 0.52


vte_terminal_get_bold_is_bright ()

gboolean
vte_terminal_get_bold_is_bright (VteTerminal *terminal);

Checks whether the SGR 1 attribute also switches to the bright counterpart of the first 8 palette colors, in addition to making them bold (legacy behavior) or if SGR 1 only enables bold and leaves the color intact.

Parameters

terminal

a VteTerminal

 

Returns

TRUE if bold also enables bright, FALSE if not

Since: 0.52


vte_terminal_set_allow_hyperlink ()

void
vte_terminal_set_allow_hyperlink (VteTerminal *terminal,
                                  gboolean allow_hyperlink);

Controls whether or not hyperlinks (OSC 8 escape sequence) are allowed.

Parameters

terminal

a VteTerminal

 

allow_hyperlink

TRUE if the terminal should allow hyperlinks

 

Since: 0.50


vte_terminal_get_allow_hyperlink ()

gboolean
vte_terminal_get_allow_hyperlink (VteTerminal *terminal);

Checks whether or not hyperlinks (OSC 8 escape sequence) are allowed.

Parameters

terminal

a VteTerminal

 

Returns

TRUE if hyperlinks are enabled, FALSE if not

Since: 0.50


vte_terminal_set_enable_fallback_scrolling ()

void
vte_terminal_set_enable_fallback_scrolling
                               (VteTerminal *terminal,
                                gboolean enable);

Controls whether the terminal uses scroll events to scroll the history if the event was not otherwise consumed by it.

This function is rarely useful, except when the terminal is added to a GtkScrolledWindow, to perform kinetic scrolling (while vte itself does not, yet, implement kinetic scrolling by itself).

Parameters

terminal

a VteTerminal

 

enable

whether to enable fallback scrolling

 

Since: 0.64


vte_terminal_get_enable_fallback_scrolling ()

gboolean
vte_terminal_get_enable_fallback_scrolling
                               (VteTerminal *terminal);

Parameters

terminal

a VteTerminal

 

Returns

TRUE if fallback scrolling is enabled

Since: 0.64


vte_terminal_set_scroll_on_output ()

void
vte_terminal_set_scroll_on_output (VteTerminal *terminal,
                                   gboolean scroll);

Controls whether or not the terminal will forcibly scroll to the bottom of the viewable history when the new data is received from the child.

Parameters

terminal

a VteTerminal

 

scroll

whether the terminal should scroll on output

 

vte_terminal_get_scroll_on_output ()

gboolean
vte_terminal_get_scroll_on_output (VteTerminal *terminal);

Parameters

terminal

a VteTerminal

 

Returns

whether or not the terminal will forcibly scroll to the bottom of the viewable history when the new data is received from the child.

Since: 0.52


vte_terminal_set_scroll_on_keystroke ()

void
vte_terminal_set_scroll_on_keystroke (VteTerminal *terminal,
                                      gboolean scroll);

Controls whether or not the terminal will forcibly scroll to the bottom of the viewable history when the user presses a key. Modifier keys do not trigger this behavior.

Parameters

terminal

a VteTerminal

 

scroll

whether the terminal should scroll on keystrokes

 

vte_terminal_get_scroll_on_keystroke ()

gboolean
vte_terminal_get_scroll_on_keystroke (VteTerminal *terminal);

Parameters

terminal

a VteTerminal

 

Returns

whether or not the terminal will forcibly scroll to the bottom of the viewable history when the user presses a key. Modifier keys do not trigger this behavior.

Since: 0.52


vte_terminal_set_scroll_unit_is_pixels ()

void
vte_terminal_set_scroll_unit_is_pixels
                               (VteTerminal *terminal,
                                gboolean enable);

Controls whether the terminal's scroll unit is lines or pixels.

This function is rarely useful, except when the terminal is added to a GtkScrolledWindow.

Parameters

terminal

a VteTerminal

 

enable

whether to use pixels as scroll unit

 

Since: 0.66


vte_terminal_get_scroll_unit_is_pixels ()

gboolean
vte_terminal_get_scroll_unit_is_pixels
                               (VteTerminal *terminal);

Parameters

terminal

a VteTerminal

 

Returns

TRUE if the scroll unit is pixels; or FALSE if the unit is lines

Since: 0.66


vte_terminal_set_cell_height_scale ()

void
vte_terminal_set_cell_height_scale (VteTerminal *terminal,
                                    double scale);

Sets the terminal's cell height scale to scale .

This can be used to increase the line spacing. (The font's height is not affected.) Valid values go from 1.0 (default) to 2.0 ("double spacing").

Parameters

terminal

a VteTerminal

 

scale

the cell height scale

 

Since: 0.52


vte_terminal_get_cell_height_scale ()

double
vte_terminal_get_cell_height_scale (VteTerminal *terminal);

Parameters

terminal

a VteTerminal

 

Returns

the terminal's cell height scale

Since: 0.52


vte_terminal_set_cell_width_scale ()

void
vte_terminal_set_cell_width_scale (VteTerminal *terminal,
                                   double scale);

Sets the terminal's cell width scale to scale .

This can be used to increase the letter spacing. (The font's width is not affected.) Valid values go from 1.0 (default) to 2.0.

Parameters

terminal

a VteTerminal

 

scale

the cell width scale

 

Since: 0.52


vte_terminal_get_cell_width_scale ()

double
vte_terminal_get_cell_width_scale (VteTerminal *terminal);

Parameters

terminal

a VteTerminal

 

Returns

the terminal's cell width scale

Since: 0.52


vte_terminal_set_color_bold ()

void
vte_terminal_set_color_bold (VteTerminal *terminal,
                             const GdkRGBA *bold);

Sets the color used to draw bold text in the default foreground color. If bold is NULL then the default color is used.

Parameters

terminal

a VteTerminal

 

bold

the new bold color or NULL.

[allow-none]

vte_terminal_set_color_foreground ()

void
vte_terminal_set_color_foreground (VteTerminal *terminal);

Sets the foreground color used to draw normal text.

Parameters

terminal

a VteTerminal

 

foreground

the new foreground color

 

vte_terminal_set_color_background ()

void
vte_terminal_set_color_background (VteTerminal *terminal);

Sets the background color for text which does not have a specific background color assigned. Only has effect when no background image is set and when the terminal is not transparent.

Parameters

terminal

a VteTerminal

 

background

the new background color

 

vte_terminal_set_color_cursor ()

void
vte_terminal_set_color_cursor (VteTerminal *terminal,
                               const GdkRGBA *cursor_background);

Sets the background color for text which is under the cursor. If NULL, text under the cursor will be drawn with foreground and background colors reversed.

Parameters

terminal

a VteTerminal

 

cursor_background

the new color to use for the text cursor, or NULL.

[allow-none]

vte_terminal_set_color_cursor_foreground ()

void
vte_terminal_set_color_cursor_foreground
                               (VteTerminal *terminal,
                                const GdkRGBA *cursor_foreground);

Sets the foreground color for text which is under the cursor. If NULL, text under the cursor will be drawn with foreground and background colors reversed.

Parameters

terminal

a VteTerminal

 

cursor_foreground

the new color to use for the text cursor, or NULL.

[allow-none]

Since: 0.44


vte_terminal_set_color_highlight ()

void
vte_terminal_set_color_highlight (VteTerminal *terminal,
                                  const GdkRGBA *highlight_background);

Sets the background color for text which is highlighted. If NULL, it is unset. If neither highlight background nor highlight foreground are set, highlighted text (which is usually highlighted because it is selected) will be drawn with foreground and background colors reversed.

Parameters

terminal

a VteTerminal

 

highlight_background

the new color to use for highlighted text, or NULL.

[allow-none]

vte_terminal_set_color_highlight_foreground ()

void
vte_terminal_set_color_highlight_foreground
                               (VteTerminal *terminal,
                                const GdkRGBA *highlight_foreground);

Sets the foreground color for text which is highlighted. If NULL, it is unset. If neither highlight background nor highlight foreground are set, highlighted text (which is usually highlighted because it is selected) will be drawn with foreground and background colors reversed.

Parameters

terminal

a VteTerminal

 

highlight_foreground

the new color to use for highlighted text, or NULL.

[allow-none]

vte_terminal_set_colors ()

void
vte_terminal_set_colors (VteTerminal *terminal,
                         const GdkRGBA *foreground,
                         const GdkRGBA *background,
                         const GdkRGBA *palette,
                         gsize palette_size);

palette specifies the new values for the 256 palette colors: 8 standard colors, their 8 bright counterparts, 6x6x6 color cube, and 24 grayscale colors. Omitted entries will default to a hardcoded value.

palette_size must be 0, 8, 16, 232 or 256.

If foreground is NULL and palette_size is greater than 0, the new foreground color is taken from palette [7]. If background is NULL and palette_size is greater than 0, the new background color is taken from palette [0].

Parameters

terminal

a VteTerminal

 

foreground

the new foreground color, or NULL.

[allow-none]

background

the new background color, or NULL.

[allow-none]

palette

the color palette.

[array length=palette_size zero-terminated=0][element-type Gdk.RGBA][allow-none]

palette_size

the number of entries in palette

 

vte_terminal_set_default_colors ()

void
vte_terminal_set_default_colors (VteTerminal *terminal);

Reset the terminal palette to reasonable compiled-in default color.

Parameters

terminal

a VteTerminal

 

vte_terminal_set_cursor_shape ()

void
vte_terminal_set_cursor_shape (VteTerminal *terminal,
                               VteCursorShape shape);

Sets the shape of the cursor drawn.

Parameters

terminal

a VteTerminal

 

shape

the VteCursorShape to use

 

vte_terminal_get_cursor_shape ()

VteCursorShape
vte_terminal_get_cursor_shape (VteTerminal *terminal);

Returns the currently set cursor shape.

Parameters

terminal

a VteTerminal

 

Returns

cursor shape.


vte_terminal_get_cursor_blink_mode ()

VteCursorBlinkMode
vte_terminal_get_cursor_blink_mode (VteTerminal *terminal);

Returns the currently set cursor blink mode.

Parameters

terminal

a VteTerminal

 

Returns

cursor blink mode.


vte_terminal_set_cursor_blink_mode ()

void
vte_terminal_set_cursor_blink_mode (VteTerminal *terminal,
                                    VteCursorBlinkMode mode);

Sets whether or not the cursor will blink. Using VTE_CURSOR_BLINK_SYSTEM will use the “gtk-cursor-blink” setting.

Parameters

terminal

a VteTerminal

 

mode

the VteCursorBlinkMode to use

 

vte_terminal_get_text_blink_mode ()

VteTextBlinkMode
vte_terminal_get_text_blink_mode (VteTerminal *terminal);

Checks whether or not the terminal will allow blinking text.

Parameters

terminal

a VteTerminal

 

Returns

the blinking setting

Since: 0.52


vte_terminal_set_text_blink_mode ()

void
vte_terminal_set_text_blink_mode (VteTerminal *terminal,
                                  VteTextBlinkMode text_blink_mode);

Controls whether or not the terminal will allow blinking text.

Parameters

terminal

a VteTerminal

 

text_blink_mode

the VteTextBlinkMode to use

 

Since: 0.52


vte_terminal_set_scrollback_lines ()

void
vte_terminal_set_scrollback_lines (VteTerminal *terminal,
                                   glong lines);

Sets the length of the scrollback buffer used by the terminal. The size of the scrollback buffer will be set to the larger of this value and the number of visible rows the widget can display, so 0 can safely be used to disable scrollback.

A negative value means "infinite scrollback".

Note that this setting only affects the normal screen buffer. No scrollback is allowed on the alternate screen buffer.

Parameters

terminal

a VteTerminal

 

lines

the length of the history buffer

 

vte_terminal_get_scrollback_lines ()

glong
vte_terminal_get_scrollback_lines (VteTerminal *terminal);

Parameters

terminal

a VteTerminal

 

Returns

length of the scrollback buffer used by the terminal. A negative value means "infinite scrollback".

Since: 0.52


vte_terminal_set_font ()

void
vte_terminal_set_font (VteTerminal *terminal,
                       const PangoFontDescription *font_desc);

Sets the font used for rendering all text displayed by the terminal, overriding any fonts set using gtk_widget_modify_font(). The terminal will immediately attempt to load the desired font, retrieve its metrics, and attempt to resize itself to keep the same number of rows and columns. The font scale is applied to the specified font.

Parameters

terminal

a VteTerminal

 

font_desc

a PangoFontDescription for the desired font, or NULL.

[allow-none]

vte_terminal_get_font ()

const PangoFontDescription *
vte_terminal_get_font (VteTerminal *terminal);

Queries the terminal for information about the fonts which will be used to draw text in the terminal. The actual font takes the font scale into account, this is not reflected in the return value, the unscaled font is returned.

Parameters

terminal

a VteTerminal

 

Returns

a PangoFontDescription describing the font the terminal uses to render text at the default font scale of 1.0.

[transfer none]


vte_terminal_get_has_selection ()

gboolean
vte_terminal_get_has_selection (VteTerminal *terminal);

Checks if the terminal currently contains selected text. Note that this is different from determining if the terminal is the owner of any GtkClipboard items.

Parameters

terminal

a VteTerminal

 

Returns

TRUE if part of the text in the terminal is selected.


vte_terminal_set_backspace_binding ()

void
vte_terminal_set_backspace_binding (VteTerminal *terminal,
                                    VteEraseBinding binding);

Modifies the terminal's backspace key binding, which controls what string or control sequence the terminal sends to its child when the user presses the backspace key.

Parameters

terminal

a VteTerminal

 

binding

a VteEraseBinding for the backspace key

 

vte_terminal_set_delete_binding ()

void
vte_terminal_set_delete_binding (VteTerminal *terminal,
                                 VteEraseBinding binding);

Modifies the terminal's delete key binding, which controls what string or control sequence the terminal sends to its child when the user presses the delete key.

Parameters

terminal

a VteTerminal

 

binding

a VteEraseBinding for the delete key

 

vte_terminal_set_mouse_autohide ()

void
vte_terminal_set_mouse_autohide (VteTerminal *terminal,
                                 gboolean setting);

Changes the value of the terminal's mouse autohide setting. When autohiding is enabled, the mouse cursor will be hidden when the user presses a key and shown when the user moves the mouse. This setting can be read using vte_terminal_get_mouse_autohide().

Parameters

terminal

a VteTerminal

 

setting

whether the mouse pointer should autohide

 

vte_terminal_get_mouse_autohide ()

gboolean
vte_terminal_get_mouse_autohide (VteTerminal *terminal);

Determines the value of the terminal's mouse autohide setting. When autohiding is enabled, the mouse cursor will be hidden when the user presses a key and shown when the user moves the mouse. This setting can be changed using vte_terminal_set_mouse_autohide().

Parameters

terminal

a VteTerminal

 

Returns

TRUE if autohiding is enabled, FALSE if not


vte_terminal_set_enable_bidi ()

void
vte_terminal_set_enable_bidi (VteTerminal *terminal,
                              gboolean enable_bidi);

Controls whether or not the terminal will perform bidirectional text rendering.

Parameters

terminal

a VteTerminal

 

enable_bidi

TRUE to enable BiDi support

 

Since: 0.58


vte_terminal_get_enable_bidi ()

gboolean
vte_terminal_get_enable_bidi (VteTerminal *terminal);

Checks whether the terminal performs bidirectional text rendering.

Parameters

terminal

a VteTerminal

 

Returns

TRUE if BiDi is enabled, FALSE if not

Since: 0.58


vte_terminal_set_enable_shaping ()

void
vte_terminal_set_enable_shaping (VteTerminal *terminal,
                                 gboolean enable_shaping);

Controls whether or not the terminal will shape Arabic text.

Parameters

terminal

a VteTerminal

 

enable_shaping

TRUE to enable Arabic shaping

 

Since: 0.58


vte_terminal_get_enable_shaping ()

gboolean
vte_terminal_get_enable_shaping (VteTerminal *terminal);

Checks whether the terminal shapes Arabic text.

Parameters

terminal

a VteTerminal

 

Returns

TRUE if Arabic shaping is enabled, FALSE if not

Since: 0.58


vte_terminal_reset ()

void
vte_terminal_reset (VteTerminal *terminal,
                    gboolean clear_tabstops,
                    gboolean clear_history);

Resets as much of the terminal's internal state as possible, discarding any unprocessed input data, resetting character attributes, cursor state, national character set state, status line, terminal modes (insert/delete), selection state, and encoding.

Parameters

terminal

a VteTerminal

 

clear_tabstops

whether to reset tabstops

 

clear_history

whether to empty the terminal's scrollback buffer

 

vte_terminal_get_text ()

char *
vte_terminal_get_text (VteTerminal *terminal,
                       VteSelectionFunc is_selected,
                       gpointer user_data);

Extracts a view of the visible part of the terminal. If is_selected is not NULL, characters will only be read if is_selected returns TRUE after being passed the column and row, respectively. A VteCharAttributes structure is added to attributes for each byte added to the returned string detailing the character's position, colors, and other characteristics.

This method is unaware of BiDi. The columns returned in attributes are logical columns.

Note: since 0.68, passing a non-NULL array parameter is deprecated. Starting with 0.70, passing a non-NULL array parameter will make this function itself return NULL.

Parameters

terminal

a VteTerminal

 

is_selected

a VteSelectionFunc callback.

[scope call][allow-none]

user_data

user data to be passed to the callback.

[closure]

attributes

location for storing text attributes. Deprecated: 0.68: Always pass NULL here.

[nullable][out caller-allocates][transfer full][array][element-type Vte.CharAttributes]

Returns

a newly allocated text string, or NULL.

[transfer full][nullable]


vte_terminal_get_text_range ()

char *
vte_terminal_get_text_range (VteTerminal *terminal,
                             glong start_row,
                             glong start_col,
                             glong end_row,
                             glong end_col,
                             VteSelectionFunc is_selected,
                             gpointer user_data);

Extracts a view of the visible part of the terminal. If is_selected is not NULL, characters will only be read if is_selected returns TRUE after being passed the column and row, respectively. A VteCharAttributes structure is added to attributes for each byte added to the returned string detailing the character's position, colors, and other characteristics. The entire scrollback buffer is scanned, so it is possible to read the entire contents of the buffer using this function.

This method is unaware of BiDi. The columns passed in start_col and end_row , and returned in attributes are logical columns.

Note: since 0.68, passing a non-NULL array parameter is deprecated. Starting with 0.70, passing a non-NULL array parameter will make this function itself return NULL.

Parameters

terminal

a VteTerminal

 

start_row

first row to search for data

 

start_col

first column to search for data

 

end_row

last row to search for data

 

end_col

last column to search for data

 

is_selected

a VteSelectionFunc callback.

[scope call][allow-none]

user_data

user data to be passed to the callback.

[closure]

attributes

location for storing text attributes. Deprecated: 0.68: Always pass NULL here.

[nullable][out caller-allocates][transfer full][array][element-type Vte.CharAttributes]

Returns

a newly allocated text string, or NULL.

[transfer full][nullable]


vte_terminal_get_cursor_position ()

void
vte_terminal_get_cursor_position (VteTerminal *terminal,
                                  glong *column,
                                  glong *row);

Reads the location of the insertion cursor and returns it. The row coordinate is absolute.

This method is unaware of BiDi. The returned column is logical column.

Parameters

terminal

a VteTerminal

 

column

a location to store the column, or NULL.

[out][allow-none]

row

a location to store the row, or NULL.

[out][allow-none]

vte_terminal_hyperlink_check_event ()

char *
vte_terminal_hyperlink_check_event (VteTerminal *terminal);

Returns a nonempty string: the target of the explicit hyperlink (printed using the OSC 8 escape sequence) at the position of the event, or NULL.

Proper use of the escape sequence should result in URI-encoded URIs with a proper scheme like "http://", "https://", "file://", "mailto:" etc. This is, however, not enforced by VTE. The caller must tolerate the returned string potentially not being a valid URI.

Parameters

terminal

a VteTerminal

 

event

a GdkEvent

 

Returns

a newly allocated string containing the target of the hyperlink, or NULL.

[transfer full][nullable]

Since: 0.50


vte_terminal_match_add_regex ()

int
vte_terminal_match_add_regex (VteTerminal *terminal,
                              VteRegex *regex);

Adds the regular expression regex to the list of matching expressions. When the user moves the mouse cursor over a section of displayed text which matches this expression, the text will be highlighted.

Note that regex should have been created using the PCRE2_MULTILINE flag.

Parameters

terminal

a VteTerminal

 

regex

a VteRegex.

[transfer none]

flags

PCRE2 match flags, or 0

 

Returns

an integer associated with this expression

Since: 0.46


vte_terminal_match_remove ()

void
vte_terminal_match_remove (VteTerminal *terminal,
                           int tag);

Removes the regular expression which is associated with the given tag from the list of expressions which the terminal will highlight when the user moves the mouse cursor over matching text.

Parameters

terminal

a VteTerminal

 

tag

the tag of the regex to remove

 

vte_terminal_match_remove_all ()

void
vte_terminal_match_remove_all (VteTerminal *terminal);

Clears the list of regular expressions the terminal uses to highlight text when the user moves the mouse cursor.

Parameters

terminal

a VteTerminal

 

vte_terminal_match_check ()

char *
vte_terminal_match_check (VteTerminal *terminal,
                          glong column,
                          glong row);

vte_terminal_match_check has been deprecated since version 0.46 and should not be used in newly-written code.

Use vte_terminal_match_check_event() instead.

Checks if the text in and around the specified position matches any of the regular expressions previously set using vte_terminal_match_add(). If a match exists, the text string is returned and if tag is not NULL, the number associated with the matched regular expression will be stored in tag .

If more than one regular expression has been set with vte_terminal_match_add(), then expressions are checked in the order in which they were added.

Parameters

terminal

a VteTerminal

 

column

the text column

 

row

the text row

 

tag

a location to store the tag, or NULL.

[out][allow-none]

Returns

a newly allocated string which matches one of the previously set regular expressions.

[transfer full][nullable]


vte_terminal_match_check_event ()

char *
vte_terminal_match_check_event (VteTerminal *terminal,
                                GdkEvent *event);

Checks if the text in and around the position of the event matches any of the regular expressions previously set using vte_terminal_match_add(). If a match exists, the text string is returned and if tag is not NULL, the number associated with the matched regular expression will be stored in tag .

If more than one regular expression has been set with vte_terminal_match_add(), then expressions are checked in the order in which they were added.

Parameters

terminal

a VteTerminal

 

event

a GdkEvent

 

tag

a location to store the tag, or NULL.

[out][allow-none]

Returns

a newly allocated string which matches one of the previously set regular expressions, or NULL if there is no match.

[transfer full][nullable]


vte_terminal_match_set_cursor_name ()

void
vte_terminal_match_set_cursor_name (VteTerminal *terminal,
                                    int tag);

Sets which cursor the terminal will use if the pointer is over the pattern specified by tag .

Parameters

terminal

a VteTerminal

 

tag

the tag of the regex which should use the specified cursor

 

cursor_name

the name of the cursor

 

vte_terminal_set_cjk_ambiguous_width ()

void
vte_terminal_set_cjk_ambiguous_width (VteTerminal *terminal,
                                      int width);

This setting controls whether ambiguous-width characters are narrow or wide. (Note that when using a non-UTF-8 encoding set via vte_terminal_set_encoding(), the width of ambiguous-width characters is fixed and determined by the encoding itself.)

Parameters

terminal

a VteTerminal

 

width

either 1 (narrow) or 2 (wide)

 

vte_terminal_get_cjk_ambiguous_width ()

int
vte_terminal_get_cjk_ambiguous_width (VteTerminal *terminal);

Returns whether ambiguous-width characters are narrow or wide. (Note that when using a non-UTF-8 encoding set via vte_terminal_set_encoding(), the width of ambiguous-width characters is fixed and determined by the encoding itself.)

Parameters

terminal

a VteTerminal

 

Returns

1 if ambiguous-width characters are narrow, or 2 if they are wide


vte_terminal_set_word_char_exceptions ()

void
vte_terminal_set_word_char_exceptions (VteTerminal *terminal,
                                       const char *exceptions);

With this function you can provide a set of characters which will be considered parts of a word when doing word-wise selection, in addition to the default which only considers alphanumeric characters part of a word.

The characters in exceptions must be non-alphanumeric, each character must occur only once, and if exceptions contains the character U+002D HYPHEN-MINUS, it must be at the start of the string.

Use NULL to reset the set of exception characters to the default.

Parameters

terminal

a VteTerminal

 

exceptions

a string of ASCII punctuation characters, or NULL

 

Since: 0.40


vte_terminal_get_word_char_exceptions ()

const char *
vte_terminal_get_word_char_exceptions (VteTerminal *terminal);

Returns the set of characters which will be considered parts of a word when doing word-wise selection, in addition to the default which only considers alphanumeric characters part of a word.

If NULL, a built-in set is used.

Parameters

terminal

a VteTerminal

 

Returns

a string, or NULL.

[nullable][transfer none]

Since: 0.40


vte_terminal_set_input_enabled ()

void
vte_terminal_set_input_enabled (VteTerminal *terminal,
                                gboolean enabled);

Enables or disables user input. When user input is disabled, the terminal's child will not receive any key press, or mouse button press or motion events sent to it.

Parameters

terminal

a VteTerminal

 

enabled

whether to enable user input

 

vte_terminal_get_input_enabled ()

gboolean
vte_terminal_get_input_enabled (VteTerminal *terminal);

Returns whether the terminal allow user input.

Parameters

terminal

a VteTerminal

 

vte_terminal_get_enable_sixel ()

gboolean
vte_terminal_get_enable_sixel (VteTerminal *terminal);

Parameters

terminal

a VteTerminal

 

Returns

FALSE

Since: 0.62


vte_terminal_set_enable_sixel ()

void
vte_terminal_set_enable_sixel (VteTerminal *terminal,
                               gboolean enabled);

Set whether to enable SIXEL images.

Parameters

terminal

a VteTerminal

 

enabled

whether to enable SIXEL images

 

Since: 0.62


vte_terminal_write_contents_sync ()

gboolean
vte_terminal_write_contents_sync (VteTerminal *terminal,
                                  GOutputStream *stream,
                                  VteWriteFlags flags,
                                  GCancellable *cancellable);

Write contents of the current contents of terminal (including any scrollback history) to stream according to flags .

If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned in error .

This is a synchronous operation and will make the widget (and input processing) during the write operation, which may take a long time depending on scrollback history and stream availability for writing.

Parameters

terminal

a VteTerminal

 

stream

a GOutputStream to write to

 

flags

a set of VteWriteFlags

 

cancellable

a GCancellable object, or NULL.

[allow-none]

error

a GError location to store the error occuring, or NULL.

[allow-none]

Returns

TRUE on success, FALSE if there was an error


vte_terminal_search_find_next ()

gboolean
vte_terminal_search_find_next (VteTerminal *terminal);

Searches the next string matching the search regex set with vte_terminal_search_set_regex().

Parameters

terminal

a VteTerminal

 

Returns

TRUE if a match was found


vte_terminal_search_find_previous ()

gboolean
vte_terminal_search_find_previous (VteTerminal *terminal);

Searches the previous string matching the search regex set with vte_terminal_search_set_regex().

Parameters

terminal

a VteTerminal

 

Returns

TRUE if a match was found


vte_terminal_search_get_regex ()

VteRegex *
vte_terminal_search_get_regex (VteTerminal *terminal);

Parameters

terminal

a VteTerminal

 

Returns

the search VteRegex regex set in terminal , or NULL.

[transfer none]

Since: 0.46


vte_terminal_search_get_wrap_around ()

gboolean
vte_terminal_search_get_wrap_around (VteTerminal *terminal);

Parameters

terminal

a VteTerminal

 

Returns

whether searching will wrap around


vte_terminal_search_set_regex ()

void
vte_terminal_search_set_regex (VteTerminal *terminal,
                               VteRegex *regex,
                               guint32 flags);

Sets the regex to search for. Unsets the search regex when passed NULL.

Note that regex should have been created using the PCRE2_MULTILINE flag.

Parameters

terminal

a VteTerminal

 

regex

a VteRegex, or NULL.

[allow-none]

flags

PCRE2 match flags, or 0

 

Since: 0.46


vte_terminal_search_set_wrap_around ()

void
vte_terminal_search_set_wrap_around (VteTerminal *terminal,
                                     gboolean wrap_around);

Sets whether search should wrap around to the beginning of the terminal content when reaching its end.

Parameters

terminal

a VteTerminal

 

wrap_around

whether search should wrap

 

vte_terminal_event_check_regex_array ()

char **
vte_terminal_event_check_regex_array (VteTerminal *terminal,
                                      GdkEvent *event,
                                      VteRegex **regexes,
                                      gsize n_regexes,
                                      guint32 match_flags);

Like vte_terminal_event_check_regex_simple(), but returns an array of strings, containing the matching text (or NULL if no match) corresponding to each of the regexes in regexes .

You must free each string and the array; but note that this is *not* a NULL-terminated string array, and so you must *not* use g_strfreev() on it.

[rename-to vte_terminal_event_check_regex_simple]

Parameters

terminal

a VteTerminal

 

event

a GdkEvent

 

regexes

an array of VteRegex.

[array length=n_regexes]

n_regexes

number of items in regexes

 

match_flags

PCRE2 match flags, or 0

 

n_matches

number of items in matches , which is always equal to n_regexes .

[out][optional]

Returns

a newly allocated array of strings, or NULL if none of the regexes matched.

[nullable][transfer full][array length=n_matches]

Since: 0.62


vte_terminal_event_check_regex_simple ()

gboolean
vte_terminal_event_check_regex_simple (VteTerminal *terminal,
                                       GdkEvent *event,
                                       VteRegex **regexes,
                                       gsize n_regexes,
                                       guint32 match_flags);

Checks each regex in regexes if the text in and around the position of the event matches the regular expressions. If a match exists, the matched text is stored in matches at the position of the regex in regexes ; otherwise NULL is stored there. Each non-NULL element of matches should be freed with g_free().

Note that the regexes in regexes should have been created using the PCRE2_MULTILINE flag.

[skip]

Parameters

terminal

a VteTerminal

 

event

a GdkEvent

 

regexes

an array of VteRegex.

[array length=n_regexes]

n_regexes

number of items in regexes

 

match_flags

PCRE2 match flags, or 0

 

matches

a location to store the matches.

[out caller-allocates][array length=n_regexes][transfer full]

Returns

TRUE iff any of the regexes produced a match

Since: 0.46


vte_get_user_shell ()

char *
vte_get_user_shell (void);

Gets the user's shell, or NULL. In the latter case, the system default (usually "/bin/sh") should be used.

Returns

a newly allocated string with the user's shell, or NULL.

[transfer full][type filename]


vte_get_features ()

const char *
vte_get_features (void);

Gets a list of features vte was compiled with.

Returns

a string with features.

[transfer none]

Since: 0.40


vte_get_feature_flags ()

VteFeatureFlags
vte_get_feature_flags (void);

Gets features VTE was compiled with.

Returns

flags from VteFeatureFlags.

[transfer none]

Since: 0.62


vte_get_encodings ()

char **
vte_get_encodings (gboolean include_aliases);

vte_get_encodings has been deprecated since version 0.60 and should not be used in newly-written code.

Gets the list of supported legacy encodings.

If ICU support is not available, this returns an empty vector. Note that UTF-8 is always supported; you can select it by passing NULL to vte_terminal_set_encoding().

Parameters

include_aliases

whether to include alias names

 

Returns

the list of supported encodings; free with g_strfreev().

[transfer full]

Since: 0.60


vte_get_encoding_supported ()

gboolean
vte_get_encoding_supported (const char *encoding);

vte_get_encoding_supported has been deprecated since version 0.60 and should not be used in newly-written code.

Queries whether the legacy encoding encoding is supported.

If ICU support is not available, this function always returns FALSE.

Note that UTF-8 is always supported; you can select it by passing NULL to vte_terminal_set_encoding().

Parameters

encoding

the name of the legacy encoding

 

Returns

TRUE iff the legacy encoding encoding is supported

Since: 0.60


VteTerminalSpawnAsyncCallback ()

void
(*VteTerminalSpawnAsyncCallback) (VteTerminal *terminal,
                                  GPid pid,
                                  GError *error,
                                  gpointer user_data);

Callback for vte_terminal_spawn_async().

On success, pid contains the PID of the spawned process, and error is NULL. On failure, pid is -1 and error contains the error information.

Parameters

terminal

the VteTerminal

 

pid

a GPid

 

error

a GError, or NULL

 

user_data

user data that was passed to vte_terminal_spawn_async

 

Since: 0.48


vte_terminal_spawn_async ()

void
vte_terminal_spawn_async (VteTerminal *terminal,
                          VtePtyFlags pty_flags,
                          const char *working_directory,
                          char **argv,
                          char **envv,
                          GSpawnFlags spawn_flags,
                          GSpawnChildSetupFunc child_setup,
                          gpointer child_setup_data,
                          GDestroyNotify child_setup_data_destroy,
                          int timeout,
                          GCancellable *cancellable,
                          VteTerminalSpawnAsyncCallback callback);

A convenience function that wraps creating the VtePty and spawning the child process on it. Like vte_terminal_spawn_with_fds_async(), except that this function does not allow passing file descriptors to the child process. See vte_terminal_spawn_with_fds_async() for more information.

Parameters

terminal

a VteTerminal

 

pty_flags

flags from VtePtyFlags

 

working_directory

the name of a directory the command should start in, or NULL to use the current working directory.

[allow-none]

argv

child's argument vector.

[array zero-terminated=1][element-type filename]

envv

a list of environment variables to be added to the environment before starting the process, or NULL.

[allow-none][array zero-terminated=1][element-type filename]

spawn_flags

flags from GSpawnFlags

 

child_setup

an extra child setup function to run in the child just before exec(), or NULL.

[allow-none][scope async]

child_setup_data

user data for child_setup , or NULL.

[nullable][closure child_setup]

child_setup_data_destroy

a GDestroyNotify for child_setup_data , or NULL.

[nullable][destroy child_setup_data]

timeout

a timeout value in ms, -1 for the default timeout, or G_MAXINT to wait indefinitely

 

cancellable

a GCancellable, or NULL.

[allow-none]

callback

a VteTerminalSpawnAsyncCallback, or NULL.

[nullable][scope async]

user_data

user data for callback , or NULL.

[nullable][closure callback]

Since: 0.48


vte_terminal_spawn_with_fds_async ()

void
vte_terminal_spawn_with_fds_async (VteTerminal *terminal,
                                   VtePtyFlags pty_flags,
                                   char const*working_directory,
                                   char const* const*argv,
                                   char const* const*envv,
                                   int const*fds,
                                   int n_fds,
                                   int const*map_fds,
                                   int n_map_fds,
                                   GSpawnFlags spawn_flags,
                                   GSpawnChildSetupFunc child_setup,
                                   gpointer child_setup_data,
                                   GDestroyNotify child_setup_data_destroy,
                                   int timeout,
                                   GCancellable *cancellable,
                                   VteTerminalSpawnAsyncCallback callback);

A convenience function that wraps creating the VtePty and spawning the child process on it. See vte_pty_new_sync(), vte_pty_spawn_with_fds_async(), and vte_pty_spawn_finish() for more information.

When the operation is finished successfully, callback will be called with the child GPid, and a NULL GError. The child PID will already be watched via vte_terminal_watch_child().

When the operation fails, callback will be called with a -1 GPid, and a non-NULL GError containing the error information.

Note that G_SPAWN_STDOUT_TO_DEV_NULL, G_SPAWN_STDERR_TO_DEV_NULL, and G_SPAWN_CHILD_INHERITS_STDIN are not supported in spawn_flags , since stdin, stdout and stderr of the child process will always be connected to the PTY.

If fds is not NULL, the child process will map the file descriptors from fds according to map_fds ; n_map_fds must be less or equal to n_fds . This function will take ownership of the file descriptors in fds ; you must not use or close them after this call.

Note that all open file descriptors apart from those mapped as above will be closed in the child. (If you want to keep some other file descriptor open for use in the child process, you need to use a child setup function that unsets the FD_CLOEXEC flag on that file descriptor manually.)

Beginning with 0.60, and on linux only, and unless VTE_SPAWN_NO_SYSTEMD_SCOPE is passed in spawn_flags , the newly created child process will be moved to its own systemd user scope; and if VTE_SPAWN_REQUIRE_SYSTEMD_SCOPE is passed, and creation of the systemd user scope fails, the whole spawn will fail. You can override the options used for the systemd user scope by providing a systemd override file for 'vte-spawn-.scope' unit. See man:systemd.unit(5) for further information.

Note that if terminal has been destroyed before the operation is called, callback will be called with a NULL terminal ; you must not do anything in the callback besides freeing any resources associated with user_data , but taking care not to access the now-destroyed VteTerminal. Note that in this case, if spawning was successful, the child process will be aborted automatically.

Beginning with 0.52, sets PWD to working_directory in order to preserve symlink components. The caller should also make sure that symlinks were preserved while constructing the value of working_directory , e.g. by using vte_terminal_get_current_directory_uri(), g_get_current_dir() or get_current_dir_name().

Parameters

terminal

a VteTerminal

 

pty_flags

flags from VtePtyFlags

 

working_directory

the name of a directory the command should start in, or NULL to use the current working directory.

[allow-none]

argv

child's argument vector.

[array zero-terminated=1][element-type filename]

envv

a list of environment variables to be added to the environment before starting the process, or NULL.

[allow-none][array zero-terminated=1][element-type filename]

fds

an array of file descriptors, or NULL.

[nullable][array length=n_fds][transfer none][scope call]

n_fds

the number of file descriptors in fds , or 0 if fds is NULL

 

map_fds

an array of integers, or NULL.

[nullable][array length=n_map_fds][transfer none][scope call]

n_map_fds

the number of elements in map_fds , or 0 if map_fds is NULL

 

spawn_flags

flags from GSpawnFlags

 

child_setup

an extra child setup function to run in the child just before exec(), or NULL.

[allow-none][scope async]

child_setup_data

user data for child_setup , or NULL.

[nullable][closure child_setup]

child_setup_data_destroy

a GDestroyNotify for child_setup_data , or NULL.

[nullable][destroy child_setup_data]

timeout

a timeout value in ms, -1 for the default timeout, or G_MAXINT to wait indefinitely

 

cancellable

a GCancellable, or NULL.

[allow-none]

callback

a VteTerminalSpawnAsyncCallback, or NULL.

[nullable][scope async]

user_data

user data for callback , or NULL.

[nullable][closure callback]

Since: 0.62


vte_terminal_get_pty ()

VtePty *
vte_terminal_get_pty (VteTerminal *terminal);

Returns the VtePty of terminal .

Parameters

terminal

a VteTerminal

 

Returns

a VtePty, or NULL.

[transfer none]


vte_terminal_set_pty ()

void
vte_terminal_set_pty (VteTerminal *terminal,
                      VtePty *pty);

Sets pty as the PTY to use in terminal . Use NULL to unset the PTY.

Parameters

terminal

a VteTerminal

 

pty

a VtePty, or NULL.

[allow-none]

vte_terminal_pty_new_sync ()

VtePty *
vte_terminal_pty_new_sync (VteTerminal *terminal,
                           VtePtyFlags flags,
                           GCancellable *cancellable,
                           GError **error);

Creates a new VtePty, sets the emulation property from “emulation”, and sets the size using terminal 's size.

See vte_pty_new() for more information.

Parameters

terminal

a VteTerminal

 

flags

flags from VtePtyFlags

 

cancellable

a GCancellable, or NULL.

[allow-none]

error

return location for a GError, or NULL.

[allow-none]

Returns

a new VtePty.

[transfer full]


vte_terminal_watch_child ()

void
vte_terminal_watch_child (VteTerminal *terminal,
                          GPid child_pid);

Watches child_pid . When the process exists, the “child-exited” signal will be called with the child's exit status.

Prior to calling this function, a VtePty must have been set in terminal using vte_terminal_set_pty(). When the child exits, the terminal's VtePty will be set to NULL.

Note: g_child_watch_add() or g_child_watch_add_full() must not have been called for child_pid , nor a GSource for it been created with g_child_watch_source_new().

Note: when using the g_spawn_async() family of functions, the G_SPAWN_DO_NOT_REAP_CHILD flag MUST have been passed.

Parameters

terminal

a VteTerminal

 

child_pid

a GPid

 

vte_terminal_set_clear_background ()

void
vte_terminal_set_clear_background (VteTerminal *terminal,
                                   gboolean setting);

Sets whether to paint the background with the background colour. The default is TRUE.

This function is rarely useful. One use for it is to add a background image to the terminal.

Parameters

terminal

a VteTerminal

 

setting

whether to clear the background

 

Since: 0.52


vte_terminal_get_color_background_for_draw ()

void
vte_terminal_get_color_background_for_draw
                               (VteTerminal *terminal);

Returns the background colour, as used by terminal when drawing the background, which may be different from the color set by vte_terminal_set_color_background().

Note: you must only call this function while handling the GtkWidget::draw signal.

This function is rarely useful. One use for it is if you disable drawing the background (see vte_terminal_set_clear_background()) and then need to draw the background yourself.

Parameters

terminal

a VteTerminal

 

color

a location to store a GdkRGBA color.

[out]

Since: 0.54


vte_terminal_get_char_height ()

glong
vte_terminal_get_char_height (VteTerminal *terminal);

Parameters

terminal

a VteTerminal

 

Returns

the height of a character cell

Note that this method should rather be called vte_terminal_get_cell_height, because the return value takes cell-height-scale into account.


vte_terminal_get_char_width ()

glong
vte_terminal_get_char_width (VteTerminal *terminal);

Parameters

terminal

a VteTerminal

 

Returns

the width of a character cell

Note that this method should rather be called vte_terminal_get_cell_width, because the return value takes cell-width-scale into account.


vte_terminal_get_column_count ()

glong
vte_terminal_get_column_count (VteTerminal *terminal);

Parameters

terminal

a VteTerminal

 

Returns

the number of columns


vte_terminal_get_row_count ()

glong
vte_terminal_get_row_count (VteTerminal *terminal);

Parameters

terminal

a VteTerminal

 

Returns

the number of rows


vte_terminal_get_window_title ()

const char *
vte_terminal_get_window_title (VteTerminal *terminal);

Parameters

terminal

a VteTerminal

 

Returns

the window title, or NULL.

[nullable][transfer none]


vte_terminal_get_current_directory_uri ()

const char *
vte_terminal_get_current_directory_uri
                               (VteTerminal *terminal);

Parameters

terminal

a VteTerminal

 

Returns

the URI of the current directory of the process running in the terminal, or NULL.

[nullable][transfer none]


vte_terminal_get_current_file_uri ()

const char *
vte_terminal_get_current_file_uri (VteTerminal *terminal);

Parameters

terminal

a VteTerminal

 

Returns

the URI of the current file the process running in the terminal is operating on, or NULL if not set.

[nullable][transfer none]


vte_terminal_copy_clipboard ()

void
vte_terminal_copy_clipboard (VteTerminal *terminal);

vte_terminal_copy_clipboard has been deprecated since version 0.50 and should not be used in newly-written code.

Use vte_terminal_copy_clipboard_format() with VTE_FORMAT_TEXT instead.

Places the selected text in the terminal in the GDK_SELECTION_CLIPBOARD selection.

Parameters

terminal

a VteTerminal

 

vte_terminal_match_set_cursor ()

void
vte_terminal_match_set_cursor (VteTerminal *terminal,
                               int tag,
                               GdkCursor *cursor);

vte_terminal_match_set_cursor has been deprecated since version 0.40 and should not be used in newly-written code.

Use vte_terminal_match_set_cursor_name() instead.

Sets which cursor the terminal will use if the pointer is over the pattern specified by tag . The terminal keeps a reference to cursor .

Parameters

terminal

a VteTerminal

 

tag

the tag of the regex which should use the specified cursor

 

cursor

the GdkCursor which the terminal should use when the pattern is highlighted, or NULL to use the standard cursor.

[allow-none]

vte_terminal_match_set_cursor_type ()

void
vte_terminal_match_set_cursor_type (VteTerminal *terminal,
                                    int tag,
                                    GdkCursorType cursor_type);

vte_terminal_match_set_cursor_type has been deprecated since version 0.54 and should not be used in newly-written code.

Use vte_terminal_match_set_cursor_name() instead.

Sets which cursor the terminal will use if the pointer is over the pattern specified by tag .

Parameters

terminal

a VteTerminal

 

tag

the tag of the regex which should use the specified cursor

 

cursor_type

a GdkCursorType

 

vte_terminal_match_add_gregex ()

int
vte_terminal_match_add_gregex (VteTerminal *terminal,
                               GRegex *gregex);

vte_terminal_match_add_gregex has been deprecated since version 0.46 and should not be used in newly-written code.

Use vte_terminal_match_add_regex() instead.

This function does nothing since version 0.60.

Parameters

terminal

a VteTerminal

 

gregex

a GRegex

 

gflags

the GRegexMatchFlags to use when matching the regex

 

Returns

-1


vte_terminal_search_get_gregex ()

GRegex *
vte_terminal_search_get_gregex (VteTerminal *terminal);

vte_terminal_search_get_gregex has been deprecated since version 0.46 and should not be used in newly-written code.

use vte_terminal_search_get_regex() instead.

Parameters

terminal

a VteTerminal

 

Returns

NULL.

[transfer none]


vte_terminal_search_set_gregex ()

void
vte_terminal_search_set_gregex (VteTerminal *terminal,
                                GRegex *gregex,
                                GRegexMatchFlags gflags);

vte_terminal_search_set_gregex has been deprecated since version 0.46 and should not be used in newly-written code.

use vte_terminal_search_set_regex() instead.

This function does nothing since version 0.60.

Parameters

terminal

a VteTerminal

 

gregex

a GRegex, or NULL.

[allow-none]

gflags

flags from GRegexMatchFlags

 

vte_terminal_event_check_gregex_simple ()

gboolean
vte_terminal_event_check_gregex_simple
                               (VteTerminal *terminal,
                                GdkEvent *event,
                                GRegex **regexes,
                                gsize n_regexes,
                                GRegexMatchFlags match_flags);

vte_terminal_event_check_gregex_simple has been deprecated since version 0.46 and should not be used in newly-written code.

Use vte_terminal_event_check_regex_simple() instead.

This function does nothing.

Parameters

terminal

a VteTerminal

 

event

a GdkEvent

 

regexes

an array of GRegex.

[array length=n_regexes]

n_regexes

number of items in regexes

 

match_flags

the GRegexMatchFlags to use when matching the regexes

 

matches

a location to store the matches.

[out caller-allocates][array length=n_regexes]

Returns

FALSE

Since: 0.44


vte_terminal_spawn_sync ()

gboolean
vte_terminal_spawn_sync (VteTerminal *terminal,
                         VtePtyFlags pty_flags,
                         const char *working_directory,
                         char **argv,
                         char **envv,
                         GSpawnFlags spawn_flags,
                         GSpawnChildSetupFunc child_setup,
                         gpointer child_setup_data,
                         GPid *child_pid,
                         GCancellable *cancellable);

vte_terminal_spawn_sync has been deprecated since version 0.48 and should not be used in newly-written code.

Use vte_terminal_spawn_async() instead.

Starts the specified command under a newly-allocated controlling pseudo-terminal. The argv and envv lists should be NULL-terminated. The "TERM" environment variable is automatically set to a default value, but can be overridden from envv . pty_flags controls logging the session to the specified system log files.

Note that G_SPAWN_DO_NOT_REAP_CHILD will always be added to spawn_flags .

Note also that G_SPAWN_STDOUT_TO_DEV_NULL, G_SPAWN_STDERR_TO_DEV_NULL, and G_SPAWN_CHILD_INHERITS_STDIN are not supported in spawn_flags , since stdin, stdout and stderr of the child process will always be connected to the PTY.

Note that all open file descriptors will be closed in the child. If you want to keep some file descriptor open for use in the child process, you need to use a child setup function that unsets the FD_CLOEXEC flag on that file descriptor.

See vte_pty_new(), g_spawn_async() and vte_terminal_watch_child() for more information.

Beginning with 0.52, sets PWD to working_directory in order to preserve symlink components. The caller should also make sure that symlinks were preserved while constructing the value of working_directory , e.g. by using vte_terminal_get_current_directory_uri(), g_get_current_dir() or get_current_dir_name().

Parameters

terminal

a VteTerminal

 

pty_flags

flags from VtePtyFlags

 

working_directory

the name of a directory the command should start in, or NULL to use the current working directory.

[allow-none]

argv

child's argument vector.

[array zero-terminated=1][element-type filename]

envv

a list of environment variables to be added to the environment before starting the process, or NULL.

[allow-none][array zero-terminated=1][element-type filename]

spawn_flags

flags from GSpawnFlags

 

child_setup

an extra child setup function to run in the child just before exec(), or NULL.

[allow-none][scope call]

child_setup_data

user data for child_setup

 

child_pid

a location to store the child PID, or NULL.

[out][allow-none][transfer full]

cancellable

a GCancellable, or NULL.

[allow-none]

error

return location for a GError, or NULL.

[allow-none]

Returns

TRUE on success, or FALSE on error with error filled in


vte_terminal_get_geometry_hints ()

void
vte_terminal_get_geometry_hints (VteTerminal *terminal,
                                 GdkGeometry *hints,
                                 int min_rows);

vte_terminal_get_geometry_hints has been deprecated since version 0.52 and should not be used in newly-written code.

Fills in some hints from terminal 's geometry. The hints filled are those covered by the GDK_HINT_RESIZE_INC, GDK_HINT_MIN_SIZE and GDK_HINT_BASE_SIZE flags.

See gtk_window_set_geometry_hints() for more information.

terminal must be realized (see gtk_widget_get_realized()).

Parameters

terminal

a VteTerminal

 

hints

a GdkGeometry to fill in.

[out caller-allocates]

min_rows

the minimum number of rows to request

 

min_columns

the minimum number of columns to request

 

vte_terminal_set_geometry_hints_for_window ()

void
vte_terminal_set_geometry_hints_for_window
                               (VteTerminal *terminal);

vte_terminal_set_geometry_hints_for_window has been deprecated since version 0.52 and should not be used in newly-written code.

Sets terminal as window 's geometry widget. See gtk_window_set_geometry_hints() for more information.

terminal must be realized (see gtk_widget_get_realized()).

Parameters

terminal

a VteTerminal

 

window

a GtkWindow

 

vte_terminal_get_icon_title ()

const char *
vte_terminal_get_icon_title (VteTerminal *terminal);

vte_terminal_get_icon_title has been deprecated since version 0.54 and should not be used in newly-written code.

Parameters

terminal

a VteTerminal

 

Returns

NULL.

[nullable][transfer none]


vte_terminal_set_encoding ()

gboolean
vte_terminal_set_encoding (VteTerminal *terminal,
                           const char *codeset,
                           GError **error);

vte_terminal_set_encoding has been deprecated since version 0.54 and should not be used in newly-written code.

Support for non-UTF-8 is deprecated.

Changes the encoding the terminal will expect data from the child to be encoded with. For certain terminal types, applications executing in the terminal can change the encoding. If codeset is NULL, it uses "UTF-8".

Note: Support for non-UTF-8 is deprecated and may get removed altogether. Instead of this function, you should use a wrapper like luit(1) when spawning the child process.

Parameters

terminal

a VteTerminal

 

codeset

target charset, or NULL to use UTF-8.

[allow-none]

error

return location for a GError, or NULL.

[allow-none]

Returns

TRUE if the encoding could be changed to the specified one, or FALSE with error set to G_CONVERT_ERROR_NO_CONVERSION.


vte_terminal_get_encoding ()

const char *
vte_terminal_get_encoding (VteTerminal *terminal);

vte_terminal_get_encoding has been deprecated since version 0.54 and should not be used in newly-written code.

Support for non-UTF-8 is deprecated.

Determines the name of the encoding in which the terminal expects data to be encoded, or NULL if UTF-8 is in use.

Parameters

terminal

a VteTerminal

 

Returns

the current encoding for the terminal.

[nullable][transfer none]


vte_terminal_get_text_include_trailing_spaces ()

char *
vte_terminal_get_text_include_trailing_spaces
                               (VteTerminal *terminal,
                                VteSelectionFunc is_selected,
                                gpointer user_data);

vte_terminal_get_text_include_trailing_spaces has been deprecated since version 0.56 and should not be used in newly-written code.

Use vte_terminal_get_text() instead.

Extracts a view of the visible part of the terminal. If is_selected is not NULL, characters will only be read if is_selected returns TRUE after being passed the column and row, respectively. A VteCharAttributes structure is added to attributes for each byte added to the returned string detailing the character's position, colors, and other characteristics.

This method is unaware of BiDi. The columns returned in attributes are logical columns.

Note: since 0.68, passing a non-NULL array parameter is deprecated. Starting with 0.70, passing a non-NULL array parameter will make this function itself return NULL.

Parameters

terminal

a VteTerminal

 

is_selected

a VteSelectionFunc callback.

[scope call][allow-none]

user_data

user data to be passed to the callback.

[closure]

attributes

location for storing text attributes. Deprecated: 0.68: Always pass NULL here.

[out caller-allocates][transfer full][array][element-type Vte.CharAttributes]

Returns

a newly allocated text string, or NULL.

[transfer full]


vte_terminal_set_rewrap_on_resize ()

void
vte_terminal_set_rewrap_on_resize (VteTerminal *terminal,
                                   gboolean rewrap);

vte_terminal_set_rewrap_on_resize has been deprecated since version 0.58 and should not be used in newly-written code.

Controls whether or not the terminal will rewrap its contents, including the scrollback history, whenever the terminal's width changes.

Parameters

terminal

a VteTerminal

 

rewrap

TRUE if the terminal should rewrap on resize

 

vte_terminal_get_rewrap_on_resize ()

gboolean
vte_terminal_get_rewrap_on_resize (VteTerminal *terminal);

vte_terminal_get_rewrap_on_resize has been deprecated since version 0.58 and should not be used in newly-written code.

Checks whether or not the terminal will rewrap its contents upon resize.

Parameters

terminal

a VteTerminal

 

Returns

TRUE if rewrapping is enabled, FALSE if not


vte_terminal_feed_child_binary ()

void
vte_terminal_feed_child_binary (VteTerminal *terminal,
                                const guint8 *data,
                                gsize length);

vte_terminal_feed_child_binary has been deprecated since version 0.60 and should not be used in newly-written code.

Don't send binary data. Use vte_terminal_feed_child() instead to send UTF-8 text

Sends a block of binary data to the child.

Parameters

terminal

a VteTerminal

 

data

data to send to the child.

[array length=length][element-type guint8][allow-none]

length

length of data

 

Types and Values

struct VteTerminal

struct VteTerminal;

enum VteAlign

An enumeration type that can be used to specify how the terminal uses extra allocated space.

Members

VTE_ALIGN_START

align to left/top

 

VTE_ALIGN_CENTER

align to centre

 

VTE_ALIGN_END

align to right/bottom

 

Since: 0.68


enum VteCursorBlinkMode

An enumerated type which can be used to indicate the cursor blink mode for the terminal.

Members

VTE_CURSOR_BLINK_SYSTEM

Follow GTK+ settings for cursor blinking.

 

VTE_CURSOR_BLINK_ON

Cursor blinks.

 

VTE_CURSOR_BLINK_OFF

Cursor does not blink.

 

enum VteCursorShape

An enumerated type which can be used to indicate what should the terminal draw at the cursor position.

Members

VTE_CURSOR_SHAPE_BLOCK

Draw a block cursor. This is the default.

 

VTE_CURSOR_SHAPE_IBEAM

Draw a vertical bar on the left side of character. This is similar to the default cursor for other GTK+ widgets.

 

VTE_CURSOR_SHAPE_UNDERLINE

Draw a horizontal bar below the character.

 

enum VteEraseBinding

An enumerated type which can be used to indicate which string the terminal should send to an application when the user presses the Delete or Backspace keys.

Members

VTE_ERASE_AUTO

For backspace, attempt to determine the right value from the terminal's IO settings. For delete, use the control sequence.

 

VTE_ERASE_ASCII_BACKSPACE

Send an ASCII backspace character (0x08).

 

VTE_ERASE_ASCII_DELETE

Send an ASCII delete character (0x7F).

 

VTE_ERASE_DELETE_SEQUENCE

Send the "@7 " control sequence.

 

VTE_ERASE_TTY

Send terminal's "erase" setting.

 

enum VteTextBlinkMode

An enumerated type which can be used to indicate whether the terminal allows the text contents to be blinked.

Members

VTE_TEXT_BLINK_NEVER

Do not blink the text.

 

VTE_TEXT_BLINK_FOCUSED

Allow blinking text only if the terminal is focused.

 

VTE_TEXT_BLINK_UNFOCUSED

Allow blinking text only if the terminal is unfocused.

 

VTE_TEXT_BLINK_ALWAYS

Allow blinking text. This is the default.

 

Since: 0.52


enum VteFormat

An enumeration type that can be used to specify the format the selection should be copied to the clipboard in.

Members

VTE_FORMAT_TEXT

Export as plain text

 

VTE_FORMAT_HTML

Export as HTML formatted text

 

Since: 0.50


enum VteWriteFlags

A flag type to determine how terminal contents should be written to an output stream.

Members

VTE_WRITE_DEFAULT

Write contents as UTF-8 text. This is the default.

 

enum VteFeatureFlags

An enumeration type for features.

Members

VTE_FEATURE_FLAG_BIDI

whether VTE was built with bidirectional text support

 

VTE_FEATURE_FLAG_ICU

whether VTE was built with ICU support

 

VTE_FEATURE_FLAG_SYSTEMD

whether VTE was built with systemd support

 

VTE_FEATURE_FLAG_SIXEL

whether VTE was built with SIXEL support

 

VTE_FEATURE_FLAGS_MASK

mask of all feature flags

 

Since: 0.62

Property Details

The “allow-bold” property

  “allow-bold”               gboolean

Controls whether or not the terminal will attempt to draw bold text, by using a bold font variant.

VteTerminal:allow-bold has been deprecated since version 0.60 and should not be used in newly-written code.

There's probably no reason for this feature to exist.

Owner: VteTerminal

Flags: Read / Write

Default value: TRUE


The “allow-hyperlink” property

  “allow-hyperlink”          gboolean

Controls whether or not hyperlinks (OSC 8 escape sequence) are recognized and displayed.

Owner: VteTerminal

Flags: Read / Write

Default value: FALSE

Since: 0.50


The “audible-bell” property

  “audible-bell”             gboolean

Controls whether or not the terminal will beep when the child outputs the "bl" sequence.

Owner: VteTerminal

Flags: Read / Write

Default value: TRUE


The “backspace-binding” property

  “backspace-binding”        VteEraseBinding

Controls what string or control sequence the terminal sends to its child when the user presses the backspace key.

Owner: VteTerminal

Flags: Read / Write

Default value: VTE_ERASE_AUTO


The “bold-is-bright” property

  “bold-is-bright”           gboolean

Whether the SGR 1 attribute also switches to the bright counterpart of the first 8 palette colors, in addition to making them bold (legacy behavior) or if SGR 1 only enables bold and leaves the color intact.

Owner: VteTerminal

Flags: Read / Write

Default value: FALSE

Since: 0.52


The “cell-height-scale” property

  “cell-height-scale”        double

Scale factor for the cell height, to increase line spacing. (The font's height is not affected.)

Owner: VteTerminal

Flags: Read / Write

Allowed values: [1,2]

Default value: 1

Since: 0.52


The “cell-width-scale” property

  “cell-width-scale”         double

Scale factor for the cell width, to increase letter spacing. (The font's width is not affected.)

Owner: VteTerminal

Flags: Read / Write

Allowed values: [1,2]

Default value: 1

Since: 0.52


The “cjk-ambiguous-width” property

  “cjk-ambiguous-width”      int

This setting controls whether ambiguous-width characters are narrow or wide. (Note that when using a non-UTF-8 encoding set via vte_terminal_set_encoding(), the width of ambiguous-width characters is fixed and determined by the encoding itself.)

This setting only takes effect the next time the terminal is reset, either via escape sequence or with vte_terminal_reset().

Owner: VteTerminal

Flags: Read / Write

Allowed values: [1,2]

Default value: 1


The “current-directory-uri” property

  “current-directory-uri”    char *

The current directory URI, or NULL if unset.

Owner: VteTerminal

Flags: Read

Default value: NULL


The “current-file-uri” property

  “current-file-uri”         char *

The current file URI, or NULL if unset.

Owner: VteTerminal

Flags: Read

Default value: NULL


The “cursor-blink-mode” property

  “cursor-blink-mode”        VteCursorBlinkMode

Sets whether or not the cursor will blink. Using VTE_CURSOR_BLINK_SYSTEM will use the “gtk-cursor-blink” setting.

Owner: VteTerminal

Flags: Read / Write

Default value: VTE_CURSOR_BLINK_SYSTEM


The “cursor-shape” property

  “cursor-shape”             VteCursorShape

Controls the shape of the cursor.

Owner: VteTerminal

Flags: Read / Write

Default value: VTE_CURSOR_SHAPE_BLOCK


The “delete-binding” property

  “delete-binding”           VteEraseBinding

Controls what string or control sequence the terminal sends to its child when the user presses the delete key.

Owner: VteTerminal

Flags: Read / Write

Default value: VTE_ERASE_AUTO


The “enable-bidi” property

  “enable-bidi”              gboolean

Controls whether or not the terminal will perform bidirectional text rendering.

Owner: VteTerminal

Flags: Read / Write

Default value: TRUE

Since: 0.58


The “enable-fallback-scrolling” property

  “enable-fallback-scrolling” gboolean

Owner: VteTerminal

Flags: Read / Write

Default value: TRUE


The “enable-shaping” property

  “enable-shaping”           gboolean

Controls whether or not the terminal will shape Arabic text.

Owner: VteTerminal

Flags: Read / Write

Default value: TRUE

Since: 0.58


The “enable-sixel” property

  “enable-sixel”             gboolean

Controls whether SIXEL image support is enabled.

Owner: VteTerminal

Flags: Read / Write

Default value: FALSE

Since: 0.62


The “encoding” property

  “encoding”                 char *

Controls the encoding the terminal will expect data from the child to be encoded with. For certain terminal types, applications executing in the terminal can change the encoding. The default is defined by the application's locale settings.

VteTerminal:encoding has been deprecated since version 0.54 and should not be used in newly-written code.

Instead of using this, you should use a tool like luit(1) when support for non-UTF-8 is required

Owner: VteTerminal

Flags: Read / Write

Default value: NULL


The “font-desc” property

  “font-desc”                PangoFontDescription *

Specifies the font used for rendering all text displayed by the terminal, overriding any fonts set using gtk_widget_modify_font(). The terminal will immediately attempt to load the desired font, retrieve its metrics, and attempt to resize itself to keep the same number of rows and columns.

Owner: VteTerminal

Flags: Read / Write


The “font-scale” property

  “font-scale”               double

The terminal's font scale.

Owner: VteTerminal

Flags: Read / Write

Allowed values: [0.25,4]

Default value: 1


The “hyperlink-hover-uri” property

  “hyperlink-hover-uri”      char *

The currently hovered hyperlink URI, or NULL if unset.

Owner: VteTerminal

Flags: Read

Default value: NULL

Since: 0.50


The “icon-title” property

  “icon-title”               char *

VteTerminal:icon-title has been deprecated since version 0.54 and should not be used in newly-written code.

This property is always NULL.

Owner: VteTerminal

Flags: Read

Default value: NULL


The “input-enabled” property

  “input-enabled”            gboolean

Controls whether the terminal allows user input. When user input is disabled, key press and mouse button press and motion events are not sent to the terminal's child.

Owner: VteTerminal

Flags: Read / Write

Default value: TRUE


The “pointer-autohide” property

  “pointer-autohide”         gboolean

Controls the value of the terminal's mouse autohide setting. When autohiding is enabled, the mouse cursor will be hidden when the user presses a key and shown when the user moves the mouse.

Owner: VteTerminal

Flags: Read / Write

Default value: FALSE


The “pty” property

  “pty”                      VtePty *

The PTY object for the terminal.

Owner: VteTerminal

Flags: Read / Write


The “rewrap-on-resize” property

  “rewrap-on-resize”         gboolean

Controls whether or not the terminal will rewrap its contents, including the scrollback buffer, whenever the terminal's width changes.

VteTerminal:rewrap-on-resize has been deprecated since version 0.58 and should not be used in newly-written code.

Owner: VteTerminal

Flags: Read / Write

Default value: TRUE


The “scroll-on-keystroke” property

  “scroll-on-keystroke”      gboolean

Controls whether or not the terminal will forcibly scroll to the bottom of the viewable history when the user presses a key. Modifier keys do not trigger this behavior.

Owner: VteTerminal

Flags: Read / Write

Default value: FALSE


The “scroll-on-output” property

  “scroll-on-output”         gboolean

Controls whether or not the terminal will forcibly scroll to the bottom of the viewable history when the new data is received from the child.

Owner: VteTerminal

Flags: Read / Write

Default value: TRUE


The “scroll-unit-is-pixels” property

  “scroll-unit-is-pixels”    gboolean

Controls whether the terminal's GtkAdjustment values unit is lines or pixels. This can be enabled when the terminal is the child of a GtkScrolledWindow to fix some bugs with its kinetic scrolling.

Owner: VteTerminal

Flags: Read / Write

Default value: FALSE

Since: 0.66


The “scrollback-lines” property

  “scrollback-lines”         guint

The length of the scrollback buffer used by the terminal. The size of the scrollback buffer will be set to the larger of this value and the number of visible rows the widget can display, so 0 can safely be used to disable scrollback. Note that this setting only affects the normal screen buffer. For terminal types which have an alternate screen buffer, no scrollback is allowed on the alternate screen buffer.

Owner: VteTerminal

Flags: Read / Write

Default value: 512


The “text-blink-mode” property

  “text-blink-mode”          VteTextBlinkMode

Controls whether or not the terminal will allow blinking text.

Owner: VteTerminal

Flags: Read / Write

Default value: VTE_TEXT_BLINK_ALWAYS

Since: 0.52


The “window-title” property

  “window-title”             char *

The terminal's title.

Owner: VteTerminal

Flags: Read

Default value: NULL


The “word-char-exceptions” property

  “word-char-exceptions”     char *

The set of characters which will be considered parts of a word when doing word-wise selection, in addition to the default which only considers alphanumeric characters part of a word.

If NULL, a built-in set is used.

Owner: VteTerminal

Flags: Read

Default value: NULL

Since: 0.40

Signal Details

The “bell” signal

void
user_function (VteTerminal *vteterminal,
               gpointer     user_data)

This signal is emitted when the a child sends a bell request to the terminal.

Parameters

vteterminal

the object which received the signal

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “char-size-changed” signal

void
user_function (VteTerminal *vteterminal,
               guint        width,
               guint        height,
               gpointer     user_data)

Emitted whenever the cell size changes, e.g. due to a change in font, font-scale or cell-width/height-scale.

Note that this signal should rather be called "cell-size-changed".

Parameters

vteterminal

the object which received the signal

 

width

the new character cell width

 

height

the new character cell height

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “child-exited” signal

void
user_function (VteTerminal *vteterminal,
               int          status,
               gpointer     user_data)

This signal is emitted when the terminal detects that a child watched using vte_terminal_watch_child() has exited.

Parameters

vteterminal

the object which received the signal

 

status

the child's exit status

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “commit” signal

void
user_function (VteTerminal *vteterminal,
               char        *text,
               guint        size,
               gpointer     user_data)

Emitted whenever the terminal receives input from the user and prepares to send it to the child process.

Parameters

vteterminal

the object which received the signal

 

text

a string of text

 

size

the length of that string of text

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “contents-changed” signal

void
user_function (VteTerminal *vteterminal,
               gpointer     user_data)

Emitted whenever the visible appearance of the terminal has changed. Used primarily by VteTerminalAccessible.

Parameters

vteterminal

the object which received the signal

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “copy-clipboard” signal

void
user_function (VteTerminal *vteterminal,
               gpointer     user_data)

Emitted whenever vte_terminal_copy_clipboard() is called.

Parameters

vteterminal

the object which received the signal

 

user_data

user data set when the signal handler was connected.

 

Flags: Action


The “current-directory-uri-changed” signal

void
user_function (VteTerminal *vteterminal,
               gpointer     user_data)

Emitted when the current directory URI is modified.

Parameters

vteterminal

the object which received the signal

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “current-file-uri-changed” signal

void
user_function (VteTerminal *vteterminal,
               gpointer     user_data)

Emitted when the current file URI is modified.

Parameters

vteterminal

the object which received the signal

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “cursor-moved” signal

void
user_function (VteTerminal *vteterminal,
               gpointer     user_data)

Emitted whenever the cursor moves to a new character cell. Used primarily by VteTerminalAccessible.

Parameters

vteterminal

the object which received the signal

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “decrease-font-size” signal

void
user_function (VteTerminal *vteterminal,
               gpointer     user_data)

Emitted when the user hits the '-' key while holding the Control key.

Parameters

vteterminal

the object which received the signal

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “deiconify-window” signal

void
user_function (VteTerminal *vteterminal,
               gpointer     user_data)

Never emitted.

VteTerminal::deiconify-window has been deprecated since version 0.60 and should not be used in newly-written code.

Parameters

vteterminal

the object which received the signal

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “encoding-changed” signal

void
user_function (VteTerminal *vteterminal,
               gpointer     user_data)

Emitted whenever the terminal's current encoding has changed.

Note: support for non-UTF-8 is deprecated.

Parameters

vteterminal

the object which received the signal

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “eof” signal

void
user_function (VteTerminal *vteterminal,
               gpointer     user_data)

Emitted when the terminal receives an end-of-file from a child which is running in the terminal. This signal is frequently (but not always) emitted with a “child-exited” signal.

Parameters

vteterminal

the object which received the signal

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “hyperlink-hover-uri-changed” signal

void
user_function (VteTerminal  *vteterminal,
               char         *uri,
               GdkRectangle *bbox,
               gpointer      user_data)

Emitted when the hovered hyperlink changes.

uri and bbox are owned by VTE, must not be modified, and might change after the signal handlers returns.

The signal is not re-emitted when the bounding box changes for the same hyperlink. This might change in a future VTE version without notice.

Parameters

vteterminal

the object which received the signal

 

uri

the nonempty target URI under the mouse, or NULL

 

bbox

the bounding box of the hyperlink anchor text, or NULL

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

Since: 0.50


The “icon-title-changed” signal

void
user_function (VteTerminal *vteterminal,
               gpointer     user_data)

VteTerminal::icon-title-changed has been deprecated since version 0.54 and should not be used in newly-written code.

This signal is never emitted.

Parameters

vteterminal

the object which received the signal

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “iconify-window” signal

void
user_function (VteTerminal *vteterminal,
               gpointer     user_data)

Never emitted.

VteTerminal::iconify-window has been deprecated since version 0.60 and should not be used in newly-written code.

Parameters

vteterminal

the object which received the signal

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “increase-font-size” signal

void
user_function (VteTerminal *vteterminal,
               gpointer     user_data)

Emitted when the user hits the '+' key while holding the Control key.

Parameters

vteterminal

the object which received the signal

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “lower-window” signal

void
user_function (VteTerminal *vteterminal,
               gpointer     user_data)

Never emitted.

VteTerminal::lower-window has been deprecated since version 0.60 and should not be used in newly-written code.

Parameters

vteterminal

the object which received the signal

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “maximize-window” signal

void
user_function (VteTerminal *vteterminal,
               gpointer     user_data)

Never emitted.

VteTerminal::maximize-window has been deprecated since version 0.60 and should not be used in newly-written code.

Parameters

vteterminal

the object which received the signal

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “move-window” signal

void
user_function (VteTerminal *vteterminal,
               guint        x,
               guint        y,
               gpointer     user_data)

Never emitted.

VteTerminal::move-window has been deprecated since version 0.60 and should not be used in newly-written code.

Parameters

vteterminal

the object which received the signal

 

x

the terminal's desired location, X coordinate

 

y

the terminal's desired location, Y coordinate

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “paste-clipboard” signal

void
user_function (VteTerminal *vteterminal,
               gpointer     user_data)

Emitted whenever vte_terminal_paste_clipboard() is called.

Parameters

vteterminal

the object which received the signal

 

user_data

user data set when the signal handler was connected.

 

Flags: Action


The “raise-window” signal

void
user_function (VteTerminal *vteterminal,
               gpointer     user_data)

Never emitted.

VteTerminal::raise-window has been deprecated since version 0.60 and should not be used in newly-written code.

Parameters

vteterminal

the object which received the signal

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “refresh-window” signal

void
user_function (VteTerminal *vteterminal,
               gpointer     user_data)

Never emitted.

VteTerminal::refresh-window has been deprecated since version 0.60 and should not be used in newly-written code.

Parameters

vteterminal

the object which received the signal

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “resize-window” signal

void
user_function (VteTerminal *vteterminal,
               guint        width,
               guint        height,
               gpointer     user_data)

Emitted at the child application's request.

Parameters

vteterminal

the object which received the signal

 

width

the desired number of columns

 

height

the desired number of rows

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “restore-window” signal

void
user_function (VteTerminal *vteterminal,
               gpointer     user_data)

Never emitted.

VteTerminal::restore-window has been deprecated since version 0.60 and should not be used in newly-written code.

Parameters

vteterminal

the object which received the signal

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “selection-changed” signal

void
user_function (VteTerminal *vteterminal,
               gpointer     user_data)

Emitted whenever the contents of terminal's selection changes.

Parameters

vteterminal

the object which received the signal

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “text-deleted” signal

void
user_function (VteTerminal *vteterminal,
               gpointer     user_data)

VteTerminal::text-deleted has been deprecated since version 0.66 and should not be used in newly-written code.

This signal is never emitted.

Parameters

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “text-inserted” signal

void
user_function (VteTerminal *vteterminal,
               gpointer     user_data)

VteTerminal::text-inserted has been deprecated since version 0.66 and should not be used in newly-written code.

This signal is never emitted.

Parameters

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “text-modified” signal

void
user_function (VteTerminal *vteterminal,
               gpointer     user_data)

VteTerminal::text-modified has been deprecated since version 0.66 and should not be used in newly-written code.

This signal is never emitted.

Parameters

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “text-scrolled” signal

void
user_function (VteTerminal *vteterminal,
               int          delta,
               gpointer     user_data)

VteTerminal::text-scrolled has been deprecated since version 0.66 and should not be used in newly-written code.

This signal is never emitted.

Parameters

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “window-title-changed” signal

void
user_function (VteTerminal *vteterminal,
               gpointer     user_data)

Emitted when the “window-title” property is modified.

Parameters

vteterminal

the object which received the signal

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last