Class: Vte::Terminal

Inherits:
Gtk::Widget
  • Object
show all
Extended by:
GLib::Deprecatable
Defined in:
lib/vte4/terminal.rb,
lib/vte4/deprecated.rb

Overview

All of these fields should be considered read-only, except for derived classes.

Instance Method Summary collapse

Constructor Details

#initializeVte::Terminal

Creates a new terminal widget.

Instance Method Details

#allow_boldBoolean

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

Returns:

  • (Boolean)

    true if bolding is enabled, false if not

#allow_bold=(allow_bold) ⇒ Boolean

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

Parameters:

  • allow_bold (Boolean)

Returns:

  • (Boolean)

    allow-bold

  • (Boolean)

    allow-bold

#allow_bold?Boolean

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

Returns:

  • (Boolean)

    allow-bold

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

Returns:

  • (Boolean)

    true if hyperlinks are enabled, false if not

#allow_hyperlink=(allow_hyperlink) ⇒ Boolean

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

Parameters:

  • allow_hyperlink (Boolean)

Returns:

  • (Boolean)

    allow-hyperlink

  • (Boolean)

    allow-hyperlink

#allow_hyperlink?Boolean

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

Returns:

  • (Boolean)

    allow-hyperlink

#audible_bellBoolean

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

Returns:

  • (Boolean)

    true if audible bell is enabled, false if not

#audible_bell=(audible_bell) ⇒ Boolean

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

Parameters:

  • audible_bell (Boolean)

Returns:

  • (Boolean)

    audible-bell

  • (Boolean)

    audible-bell

#audible_bell?Boolean

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

Returns:

  • (Boolean)

    audible-bell

#backspace_bindingVte::EraseBinding

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

Returns:

#backspace_binding=(backspace_binding) ⇒ Vte::EraseBinding

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

Parameters:

Returns:

#bold_is_brightBoolean

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.

Returns:

  • (Boolean)

    true if bold also enables bright, false if not

#bold_is_bright=(bold_is_bright) ⇒ Boolean

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:

  • bold_is_bright (Boolean)

Returns:

  • (Boolean)

    bold-is-bright

  • (Boolean)

    bold-is-bright

#bold_is_bright?Boolean

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.

Returns:

  • (Boolean)

    bold-is-bright

#cell_height_scaleFloat

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

Returns:

  • (Float)

    cell-height-scale

#cell_height_scale=(cell_height_scale) ⇒ Float

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

Parameters:

  • cell_height_scale (Float)

Returns:

  • (Float)

    cell-height-scale

  • (Float)

    cell-height-scale

#cell_width_scaleFloat

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

Returns:

  • (Float)

    cell-width-scale

#cell_width_scale=(cell_width_scale) ⇒ Float

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

Parameters:

  • cell_width_scale (Float)

Returns:

  • (Float)

    cell-width-scale

  • (Float)

    cell-width-scale

#char_heightVte::glong

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

Returns:

  • (Vte::glong)

    the height of a character cell

#char_widthVte::glong

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

Returns:

  • (Vte::glong)

    the width of a character cell

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

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:

  • x (Float)
  • y (Float)

Returns:

  • (String)

    a newly allocated string containing the target of the hyperlink, or nil

#check_match_at(x, y, tag) ⇒ String

Checks if the text in and around the position (x, y) 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 nil, 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:

  • x (Float)
  • y (Float)
  • tag (Integer)

    a location to store the tag, or nil

Returns:

  • (String)

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

#check_regex_array_at(x, y, regexes, n_regexes, match_flags, n_matches) ⇒ Array<String>

Like vte_terminal_check_regex_simple_at(), but returns an array of strings, containing the matching text (or nil 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 nil-terminated string array, and so you must not use g_strfreev() on it.

Parameters:

  • x (Float)
  • y (Float)
  • regexes (Array<Vte::Regex>)

    an array of Vte::Regex

  • n_regexes (Integer)

    number of items in regexes

  • match_flags (Integer)

    PCRE2 match flags, or 0

  • n_matches (Integer)

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

Returns:

  • (Array<String>)

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

#check_regex_simple_at(x, y, regexes, n_regexes, match_flags, matches) ⇒ Boolean

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

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

Parameters:

  • x (Float)
  • y (Float)
  • regexes (Array<Vte::Regex>)

    an array of Vte::Regex

  • n_regexes (Integer)

    number of items in regexes

  • match_flags (Integer)

    PCRE2 match flags, or 0

  • matches (Array<String>)

    a location to store the matches

Returns:

  • (Boolean)

    true iff any of the regexes produced a match

#cjk_ambiguous_widthInteger

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().

Returns:

  • (Integer)

    cjk-ambiguous-width

#cjk_ambiguous_width=(cjk_ambiguous_width) ⇒ Integer

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().

Parameters:

  • cjk_ambiguous_width (Integer)

Returns:

  • (Integer)

    cjk-ambiguous-width

  • (Integer)

    cjk-ambiguous-width

#clear_background=(setting) ⇒ nil

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:

  • setting (Boolean)

    whether to clear the background

Returns:

  • (nil)

#color_background=(background) ⇒ nil

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:

  • background (Gdk::RGBA)

    the new background color

Returns:

  • (nil)

#color_bold=(bold) ⇒ nil

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

Parameters:

  • bold (Gdk::RGBA)

    the new bold color or nil

Returns:

  • (nil)

#color_cursor=(cursor_background) ⇒ nil

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

Parameters:

  • cursor_background (Gdk::RGBA)

    the new color to use for the text cursor, or nil

Returns:

  • (nil)

#color_cursor_foreground=(cursor_foreground) ⇒ nil

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

Parameters:

  • cursor_foreground (Gdk::RGBA)

    the new color to use for the text cursor, or nil

Returns:

  • (nil)

#color_foreground=(foreground) ⇒ nil

Sets the foreground color used to draw normal text.

Parameters:

  • foreground (Gdk::RGBA)

    the new foreground color

Returns:

  • (nil)

#color_highlight=(highlight_background) ⇒ nil

Sets the background color for text which is highlighted. If nil, 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:

  • highlight_background (Gdk::RGBA)

    the new color to use for highlighted text, or nil

Returns:

  • (nil)

#color_highlight_foreground=(highlight_foreground) ⇒ nil

Sets the foreground color for text which is highlighted. If nil, 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:

  • highlight_foreground (Gdk::RGBA)

    the new color to use for highlighted text, or nil

Returns:

  • (nil)

#column_countVte::glong

Returns the number of columns.

Returns:

  • (Vte::glong)

    the number of columns

#context_menuGtk::Popover

The menu used for context menus. Note that context menu model set with the Vte::Terminal::context-menu-model property or vte_terminal_set_context_menu_model() takes precedence over this.

Returns:

  • (Gtk::Popover)

    context-menu

#context_menu=(context_menu) ⇒ Gtk::Popover

The menu used for context menus. Note that context menu model set with the Vte::Terminal::context-menu-model property or vte_terminal_set_context_menu_model() takes precedence over this.

Parameters:

  • context_menu (Gtk::Popover)

Returns:

  • (Gtk::Popover)

    context-menu

  • (Gtk::Popover)

    context-menu

#context_menu_modelGio::MenuModel

The menu model used for context menus. If non-nil, the context menu is generated from this model, and overrides a context menu set with the Vte::Terminal::context-menu property or vte_terminal_set_context_menu().

Returns:

  • (Gio::MenuModel)

    context-menu-model

#context_menu_model=(context_menu_model) ⇒ Gio::MenuModel

The menu model used for context menus. If non-nil, the context menu is generated from this model, and overrides a context menu set with the Vte::Terminal::context-menu property or vte_terminal_set_context_menu().

Parameters:

  • context_menu_model (Gio::MenuModel)

Returns:

  • (Gio::MenuModel)

    context-menu-model

  • (Gio::MenuModel)

    context-menu-model

#copy_clipboardnil

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

Returns:

  • (nil)

#copy_clipboard_format(format) ⇒ nil

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 Gtk::SelectionData) 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:

Returns:

  • (nil)

#copy_primarynil

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

Returns:

  • (nil)

#current_directory_uriString

The current directory URI, or nil if unset.

Returns:

  • (String)

    current-directory-uri

#current_directory_uri=(current_directory_uri) ⇒ String

The current directory URI, or nil if unset.

Parameters:

  • current_directory_uri (String)

Returns:

  • (String)

    current-directory-uri

  • (String)

    current-directory-uri

#current_file_uriString

The current file URI, or nil if unset.

Returns:

  • (String)

    current-file-uri

#current_file_uri=(current_file_uri) ⇒ String

The current file URI, or nil if unset.

Parameters:

  • current_file_uri (String)

Returns:

  • (String)

    current-file-uri

  • (String)

    current-file-uri

Sets whether or not the cursor will blink. Using %VTE_CURSOR_BLINK_SYSTEM will use the Gtk::Settings:gtk-cursor-blink setting.

Returns:

Sets whether or not the cursor will blink. Using %VTE_CURSOR_BLINK_SYSTEM will use the Gtk::Settings:gtk-cursor-blink setting.

Parameters:

Returns:

#cursor_shapeVte::CursorShape

Controls the shape of the cursor.

Returns:

#cursor_shape=(cursor_shape) ⇒ Vte::CursorShape

Controls the shape of the cursor.

Parameters:

Returns:

#delete_bindingVte::EraseBinding

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

Returns:

#delete_binding=(delete_binding) ⇒ Vte::EraseBinding

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

Parameters:

Returns:

#enable_bidiBoolean

Checks whether the terminal performs bidirectional text rendering.

Returns:

  • (Boolean)

    true if BiDi is enabled, false if not

#enable_bidi=(enable_bidi) ⇒ Boolean

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

Parameters:

  • enable_bidi (Boolean)

Returns:

  • (Boolean)

    enable-bidi

  • (Boolean)

    enable-bidi

#enable_bidi?Boolean

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

Returns:

  • (Boolean)

    enable-bidi

#enable_fallback_scrollingBoolean

Returns true if fallback scrolling is enabled.

Returns:

  • (Boolean)

    true if fallback scrolling is enabled

#enable_fallback_scrolling=(enable_fallback_scrolling) ⇒ Boolean

Parameters:

  • enable_fallback_scrolling (Boolean)

Returns:

  • (Boolean)

    enable-fallback-scrolling

  • (Boolean)

    enable-fallback-scrolling

#enable_fallback_scrolling?Boolean

Returns enable-fallback-scrolling.

Returns:

  • (Boolean)

    enable-fallback-scrolling

#enable_shapingBoolean

Checks whether the terminal shapes Arabic text.

Returns:

  • (Boolean)

    true if Arabic shaping is enabled, false if not

#enable_shaping=(enable_shaping) ⇒ Boolean

Controls whether or not the terminal will shape Arabic text.

Parameters:

  • enable_shaping (Boolean)

Returns:

  • (Boolean)

    enable-shaping

  • (Boolean)

    enable-shaping

#enable_shaping?Boolean

Controls whether or not the terminal will shape Arabic text.

Returns:

  • (Boolean)

    enable-shaping

#enable_sixelBoolean

Returns false.

Returns:

  • (Boolean)

    false

#enable_sixel=(enable_sixel) ⇒ Boolean

Controls whether SIXEL image support is enabled.

Parameters:

  • enable_sixel (Boolean)

Returns:

  • (Boolean)

    enable-sixel

  • (Boolean)

    enable-sixel

#enable_sixel?Boolean

Controls whether SIXEL image support is enabled.

Returns:

  • (Boolean)

    enable-sixel

#encodingString

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.

Returns:

  • (String)

    encoding

#encoding=(encoding) ⇒ String

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.

Parameters:

  • encoding (String)

Returns:

  • (String)

    encoding

  • (String)

    encoding

#feed(data, length) ⇒ nil

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

Parameters:

  • data (Array<Integer>)

    a string in the terminal's current encoding

  • length (Vte::gssize)

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

Returns:

  • (nil)

#feed_child(text, length) ⇒ nil

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

Parameters:

  • text (Array<Integer>)

    data to send to the child

  • length (Vte::gssize)

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

Returns:

  • (nil)

#feed_child_binary(data, length) ⇒ nil

Sends a block of binary data to the child.

Parameters:

  • data (Array<Integer>)

    data to send to the child

  • length (Integer)

    length of data

Returns:

  • (nil)

#fontPango::FontDescription

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. terminal uses to render text at the default font scale of 1.0.

Returns:

  • (Pango::FontDescription)

    a Pango::FontDescription describing the font the

#font=(font_desc) ⇒ nil

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:

  • font_desc (Pango::FontDescription)

    a Pango::FontDescription for the desired font, or nil

Returns:

  • (nil)

#font_descPango::FontDescription

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.

Returns:

  • (Pango::FontDescription)

    font-desc

#font_desc=(font_desc) ⇒ Pango::FontDescription

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.

Parameters:

  • font_desc (Pango::FontDescription)

Returns:

  • (Pango::FontDescription)

    font-desc

  • (Pango::FontDescription)

    font-desc

#font_optionscairo::FontOptions

The terminal's font options, or nil to use the default font options.

Note that on GTK4, the terminal by default uses font options with %CAIRO_HINT_METRICS_ON set; to override that, use this function to set a #cairo_font_options_t that has %CAIRO_HINT_METRICS_OFF set.

Returns:

  • (cairo::FontOptions)

    font-options

#font_options=(font_options) ⇒ cairo::FontOptions

The terminal's font options, or nil to use the default font options.

Note that on GTK4, the terminal by default uses font options with %CAIRO_HINT_METRICS_ON set; to override that, use this function to set a #cairo_font_options_t that has %CAIRO_HINT_METRICS_OFF set.

Parameters:

  • font_options (cairo::FontOptions)

Returns:

  • (cairo::FontOptions)

    font-options

  • (cairo::FontOptions)

    font-options

#font_scaleFloat

The terminal's font scale.

Returns:

  • (Float)

    font-scale

#font_scale=(font_scale) ⇒ Float

The terminal's font scale.

Parameters:

  • font_scale (Float)

Returns:

  • (Float)

    font-scale

  • (Float)

    font-scale

#get_color_background_for_draw(color) ⇒ nil

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:

  • color (Gdk::RGBA)

    a location to store a Gdk::RGBA color

Returns:

  • (nil)

#get_cursor_position(column, row) ⇒ nil

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:

  • column (Vte::glong)

    a location to store the column, or nil

  • row (Vte::glong)

    a location to store the row, or nil

Returns:

  • (nil)

#get_text(is_selected, user_data, attributes) ⇒ String

Extracts a view of the visible part of the terminal.

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

Note: since 0.68, passing a non-nil attributes parameter is deprecated. Starting with 0.72, passing a non-nil attributes parameter will make this function itself return nil. Since 0.72, passing a non-nil is_selected parameter will make this function itself return nil.

Parameters:

  • is_selected (Vte::SelectionFunc)

    a Vte::SelectionFunc callback. Deprecated: 0.44: Always pass nil here.

  • user_data (GObject)

    user data to be passed to the callback

  • attributes (Array<Vte::CharAttributes>)

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

Returns:

  • (String)

    a newly allocated text string, or nil.

#get_text_format(format) ⇒ String

Returns text from the visible part of the terminal in the specified format.

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

Parameters:

Returns:

  • (String)

    a newly allocated text string, or nil.

#get_text_include_trailing_spaces(is_selected, user_data, attributes) ⇒ String

Extracts a view of the visible part of the terminal.

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

Note: since 0.68, passing a non-nil array parameter is deprecated. Starting with 0.72, passing a non-nil array parameter will make this function itself return nil. Since 0.72, passing a non-nil is_selected parameter will make this function itself return nil.

Parameters:

  • is_selected (Vte::SelectionFunc)

    a Vte::SelectionFunc callback. Deprecated: 0.44: Always pass nil here.

  • user_data (GObject)

    user data to be passed to the callback

  • attributes (Array<Vte::CharAttributes>)

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

Returns:

  • (String)

    a newly allocated text string, or nil.

#get_text_range(start_row, start_col, end_row, end_col, is_selected, user_data, attributes) ⇒ String

Extracts a view of the visible part of the terminal. 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.

Since 0.68, passing a non-nil array parameter is deprecated. Since 0.72, passing a non-nil array parameter will make this function itself return nil. Since 0.72, passing a non-nil is_selected function will make this function itself return nil.

Parameters:

  • start_row (Vte::glong)

    first row to search for data

  • start_col (Vte::glong)

    first column to search for data

  • end_row (Vte::glong)

    last row to search for data

  • end_col (Vte::glong)

    last column to search for data

  • is_selected (Vte::SelectionFunc)

    a Vte::SelectionFunc callback. Deprecated: 0.44: Always pass nil here

  • user_data (GObject)

    user data to be passed to the callback

  • attributes (Array<Vte::CharAttributes>)

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

Returns:

  • (String)

    a newly allocated text string, or nil.

#get_text_range_format(format, start_row, start_col, end_row, end_col, length) ⇒ String

Returns the specified range of text in the specified format.

Parameters:

  • format (Vte::Format)

    the Vte::Format to use

  • start_row (Vte::glong)

    the first row of the range

  • start_col (Vte::glong)

    the first column of the range

  • end_row (Vte::glong)

    the last row of the range

  • end_col (Vte::glong)

    the last column of the range

  • length (Integer)

    a pointer to a #gsize to store the string length

Returns:

  • (String)

    a newly allocated string, or nil.

#get_text_selected(format) ⇒ String

Gets the currently selected text in the format specified by format. Since 0.72, this function also supports %VTE_FORMAT_HTML format.

Parameters:

Returns:

  • (String)

    a newly allocated string containing the selected text, or nil if there is no selection or the format is not supported

#get_text_selected_full(format, length) ⇒ String

Gets the currently selected text in the format specified by format.

Parameters:

  • format (Vte::Format)

    the Vte::Format to use

  • length (Integer)

    a pointer to a #gsize to store the string length

Returns:

  • (String)

    a newly allocated string containing the selected text, or nil if there is no selection or the format is not supported

#has_selectionBoolean

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

Returns:

  • (Boolean)

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

The currently hovered hyperlink URI, or nil if unset.

Returns:

  • (String)

    hyperlink-hover-uri

The currently hovered hyperlink URI, or nil if unset.

Parameters:

  • hyperlink_hover_uri (String)

Returns:

  • (String)

    hyperlink-hover-uri

  • (String)

    hyperlink-hover-uri

#icon_titleString

Returns icon-title.

Returns:

  • (String)

    icon-title

#icon_title=(icon_title) ⇒ String

Parameters:

  • icon_title (String)

Returns:

  • (String)

    icon-title

  • (String)

    icon-title

#input_enabledBoolean

Returns whether the terminal allow user input.

Returns:

  • (Boolean)

#input_enabled=(input_enabled) ⇒ Boolean

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.

Parameters:

  • input_enabled (Boolean)

Returns:

  • (Boolean)

    input-enabled

  • (Boolean)

    input-enabled

#input_enabled?Boolean

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.

Returns:

  • (Boolean)

    input-enabled

#match_add_regex(regex, flags) ⇒ Integer

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:

  • regex (Vte::Regex)

    a Vte::Regex

  • flags (Integer)

    PCRE2 match flags, or 0

Returns:

  • (Integer)

    an integer associated with this expression

#match_check(column, row, tag) ⇒ String

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 nil, 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:

  • column (Vte::glong)

    the text column

  • row (Vte::glong)

    the text row

  • tag (Integer)

    a location to store the tag, or nil

Returns:

  • (String)

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

#match_remove(tag) ⇒ nil

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:

  • tag (Integer)

    the tag of the regex to remove

Returns:

  • (nil)

#match_remove_allnil

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

Returns:

  • (nil)

#match_set_cursor(tag, cursor) ⇒ nil

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:

  • tag (Integer)

    the tag of the regex which should use the specified cursor

  • cursor (Gdk::Cursor)

    the Gdk::Cursor which the terminal should use when the pattern is highlighted, or nil to use the standard cursor

Returns:

  • (nil)

#match_set_cursor_name(tag, cursor_name) ⇒ nil

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

Parameters:

  • tag (Integer)

    the tag of the regex which should use the specified cursor

  • cursor_name (String)

    the name of the cursor

Returns:

  • (nil)

#mouse_autohideBoolean

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().

Returns:

  • (Boolean)

    true if autohiding is enabled, false if not

#mouse_autohide=(setting) ⇒ nil

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:

  • setting (Boolean)

    whether the mouse pointer should autohide

Returns:

  • (nil)

#paste_clipboardnil

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.

Returns:

  • (nil)

#paste_primarynil

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.

Returns:

  • (nil)

#paste_text(text) ⇒ nil

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:

  • text (String)

    a string to paste

Returns:

  • (nil)

#pointer_autohide=(pointer_autohide) ⇒ Boolean

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.

Parameters:

  • pointer_autohide (Boolean)

Returns:

  • (Boolean)

    pointer-autohide

  • (Boolean)

    pointer-autohide

#pointer_autohide?Boolean

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.

Returns:

  • (Boolean)

    pointer-autohide

#ptyVte::Pty

The PTY object for the terminal.

Returns:

#pty=(pty) ⇒ Vte::Pty

The PTY object for the terminal.

Parameters:

Returns:

#pty_new_sync(flags, cancellable) ⇒ Vte::Pty

Creates a new Vte::Pty, sets the emulation property from Vte::Terminal:emulation, and sets the size using terminal's size.

See vte_pty_new() for more information.

Parameters:

  • flags (Vte::PtyFlags)

    flags from Vte::PtyFlags

  • cancellable (Gio::Cancellable)

    a #GCancellable, or nil

Returns:

#reset(clear_tabstops, clear_history) ⇒ nil

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:

  • clear_tabstops (Boolean)

    whether to reset tabstops

  • clear_history (Boolean)

    whether to empty the terminal's scrollback buffer

Returns:

  • (nil)

#rewrap_on_resizeBoolean

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

Returns:

  • (Boolean)

    true if rewrapping is enabled, false if not

#rewrap_on_resize=(rewrap_on_resize) ⇒ Boolean

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

Parameters:

  • rewrap_on_resize (Boolean)

Returns:

  • (Boolean)

    rewrap-on-resize

  • (Boolean)

    rewrap-on-resize

#rewrap_on_resize?Boolean

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

Returns:

  • (Boolean)

    rewrap-on-resize

#row_countVte::glong

Returns the number of rows.

Returns:

  • (Vte::glong)

    the number of rows

#scroll_on_insertBoolean

the viewable history when the new data is received from the child.

Returns:

  • (Boolean)

    whether or not the terminal will forcibly scroll to the bottom of

#scroll_on_insert=(scroll_on_insert) ⇒ Boolean

Controls whether or not the terminal will forcibly scroll to the bottom of the viewable history when the text is inserted (e.g. by a paste).

Parameters:

  • scroll_on_insert (Boolean)

Returns:

  • (Boolean)

    scroll-on-insert

  • (Boolean)

    scroll-on-insert

#scroll_on_insert?Boolean

Controls whether or not the terminal will forcibly scroll to the bottom of the viewable history when the text is inserted (e.g. by a paste).

Returns:

  • (Boolean)

    scroll-on-insert

#scroll_on_keystrokeBoolean

the viewable history when the user presses a key. Modifier keys do not trigger this behavior.

Returns:

  • (Boolean)

    whether or not the terminal will forcibly scroll to the bottom of

#scroll_on_keystroke=(scroll_on_keystroke) ⇒ Boolean

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:

  • scroll_on_keystroke (Boolean)

Returns:

  • (Boolean)

    scroll-on-keystroke

  • (Boolean)

    scroll-on-keystroke

#scroll_on_keystroke?Boolean

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.

Returns:

  • (Boolean)

    scroll-on-keystroke

#scroll_on_outputBoolean

the viewable history when the new data is received from the child.

Returns:

  • (Boolean)

    whether or not the terminal will forcibly scroll to the bottom of

#scroll_on_output=(scroll_on_output) ⇒ Boolean

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:

  • scroll_on_output (Boolean)

Returns:

  • (Boolean)

    scroll-on-output

  • (Boolean)

    scroll-on-output

#scroll_on_output?Boolean

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.

Returns:

  • (Boolean)

    scroll-on-output

#scroll_unit_is_pixelsBoolean

Returns true if the scroll unit is pixels; or false if the unit is lines.

Returns:

  • (Boolean)

    true if the scroll unit is pixels; or false if the unit is lines

#scroll_unit_is_pixels=(scroll_unit_is_pixels) ⇒ Boolean

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.

Parameters:

  • scroll_unit_is_pixels (Boolean)

Returns:

  • (Boolean)

    scroll-unit-is-pixels

  • (Boolean)

    scroll-unit-is-pixels

#scroll_unit_is_pixels?Boolean

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.

Returns:

  • (Boolean)

    scroll-unit-is-pixels

#scrollback_linesInteger

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.

Returns:

  • (Integer)

    scrollback-lines

#scrollback_lines=(scrollback_lines) ⇒ Integer

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.

Parameters:

  • scrollback_lines (Integer)

Returns:

  • (Integer)

    scrollback-lines

  • (Integer)

    scrollback-lines

#search_find_nextBoolean

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

Returns:

  • (Boolean)

    true if a match was found

#search_find_previousBoolean

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

Returns:

  • (Boolean)

    true if a match was found

#search_get_regexVte::Regex

Returns the search Vte::Regex regex set in terminal, or nil.

Returns:

  • (Vte::Regex)

    the search Vte::Regex regex set in terminal, or nil

#search_get_wrap_aroundBoolean

Returns whether searching will wrap around.

Returns:

  • (Boolean)

    whether searching will wrap around

#search_set_regex(regex, flags) ⇒ nil

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

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

Parameters:

  • regex (Vte::Regex)

    a Vte::Regex, or nil

  • flags (Integer)

    PCRE2 match flags, or 0

Returns:

  • (nil)

#search_set_wrap_around(wrap_around) ⇒ nil

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

Parameters:

  • wrap_around (Boolean)

    whether search should wrap

Returns:

  • (nil)

#select_allnil

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

Returns:

  • (nil)

#set_colors(foreground, background, palette, palette_size) ⇒ nil

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 nil and palette_size is greater than 0, the new foreground color is taken from palette[7]. If background is nil and palette_size is greater than 0, the new background color is taken from palette[0].

Parameters:

  • foreground (Gdk::RGBA)

    the new foreground color, or nil

  • background (Gdk::RGBA)

    the new background color, or nil

  • palette (Array<Gdk::RGBA>)

    the color palette

  • palette_size (Integer)

    the number of entries in palette

Returns:

  • (nil)

#set_default_colorsnil

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

Returns:

  • (nil)

#set_size(columns, rows) ⇒ nil

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:

  • columns (Vte::glong)

    the desired number of columns

  • rows (Vte::glong)

    the desired number of rows

Returns:

  • (nil)

#spawn(options = {}) ⇒ Object



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/vte4/terminal.rb', line 19

def spawn(options={})
  pty_flags = options[:pty_flags] || PtyFlags::DEFAULT
  working_directory = options[:working_directory]
  argv = options[:argv] || [ENV["SHELL"] || "/bin/sh"]
  envv = options[:envv]
  default_spawn_flags = GLib::Spawn::SEARCH_PATH
  spawn_flags = options[:spawn_flags] || default_spawn_flags
  succeeded, pid = spawn_sync(pty_flags,
                              working_directory,
                              argv,
                              envv,
                              spawn_flags)
  if succeeded
    pid
  else
    nil
  end
end

#spawn_async(pty_flags, working_directory, argv, envv, spawn_flags, child_setup, child_setup_data, child_setup_data_destroy, timeout, cancellable, callback, user_data) ⇒ nil

A convenience function that wraps creating the Vte::Pty 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:

  • pty_flags (Vte::PtyFlags)

    flags from Vte::PtyFlags

  • working_directory (String)

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

  • argv (Array<Vte::filename>)

    child's argument vector

  • envv (Array<Vte::filename>)

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

  • spawn_flags (GLib::SpawnFlags)

    flags from GSpawn::Flags

  • child_setup (GLib::SpawnChildSetupFunc)

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

  • child_setup_data (GObject)

    user data for child_setup, or nil

  • child_setup_data_destroy (GLib::DestroyNotify)

    a GDestroy::Notify for child_setup_data, or nil

  • timeout (Integer)

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

  • cancellable (Gio::Cancellable)

    a #GCancellable, or nil

  • callback (Vte::TerminalSpawnAsyncCallback)

    a Vte::TerminalSpawnAsyncCallback, or nil

  • user_data (GObject)

    user data for callback, or nil

Returns:

  • (nil)

#spawn_sync(pty_flags, working_directory, argv, envv, spawn_flags, child_setup, child_setup_data, child_pid, cancellable) ⇒ Boolean

Starts the specified command under a newly-allocated controlling pseudo-terminal. The argv and envv lists should be nil-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:

  • pty_flags (Vte::PtyFlags)

    flags from Vte::PtyFlags

  • working_directory (String)

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

  • argv (Array<Vte::filename>)

    child's argument vector

  • envv (Array<Vte::filename>)

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

  • spawn_flags (GLib::SpawnFlags)

    flags from GSpawn::Flags

  • child_setup (GLib::SpawnChildSetupFunc)

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

  • child_setup_data (GObject)

    user data for child_setup

  • child_pid (GLib::Pid)

    a location to store the child PID, or nil

  • cancellable (Gio::Cancellable)

    a #GCancellable, or nil

Returns:

  • (Boolean)

    true on success, or false on error with error filled in

#spawn_with_fds_async(pty_flags, working_directory, argv, envv, fds, n_fds, map_fds, n_map_fds, spawn_flags, child_setup, child_setup_data, child_setup_data_destroy, timeout, cancellable, callback, user_data) ⇒ nil

A convenience function that wraps creating the Vte::Pty 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 nil #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-nil #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 nil, 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 nil 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 Vte::Terminal. 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:

  • pty_flags (Vte::PtyFlags)

    flags from Vte::PtyFlags

  • working_directory (String)

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

  • argv (Array<Vte::filename>)

    child's argument vector

  • envv (Array<Vte::filename>)

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

  • fds (Array<Integer>)

    an array of file descriptors, or nil

  • n_fds (Integer)

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

  • map_fds (Array<Integer>)

    an array of integers, or nil

  • n_map_fds (Integer)

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

  • spawn_flags (GLib::SpawnFlags)

    flags from GSpawn::Flags

  • child_setup (GLib::SpawnChildSetupFunc)

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

  • child_setup_data (GObject)

    user data for child_setup, or nil

  • child_setup_data_destroy (GLib::DestroyNotify)

    a GDestroy::Notify for child_setup_data, or nil

  • timeout (Integer)

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

  • cancellable (Gio::Cancellable)

    a #GCancellable, or nil

  • callback (Vte::TerminalSpawnAsyncCallback)

    a Vte::TerminalSpawnAsyncCallback, or nil

  • user_data (GObject)

    user data for callback, or nil

Returns:

  • (nil)

Controls whether or not the terminal will allow blinking text.

Returns:

Controls whether or not the terminal will allow blinking text.

Parameters:

Returns:

#unselect_allnil

Clears the current selection.

Returns:

  • (nil)

#watch_child(child_pid) ⇒ nil

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

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

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:

  • child_pid (GLib::Pid)

    a #GPid

Returns:

  • (nil)

#window_titleString

The terminal's title.

Returns:

  • (String)

    window-title

#window_title=(window_title) ⇒ String

The terminal's title.

Parameters:

  • window_title (String)

Returns:

  • (String)

    window-title

  • (String)

    window-title

#word_char_exceptionsString

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 nil, a built-in set is used.

Returns:

  • (String)

    word-char-exceptions

#word_char_exceptions=(word_char_exceptions) ⇒ String

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 nil, a built-in set is used.

Parameters:

  • word_char_exceptions (String)

Returns:

  • (String)

    word-char-exceptions

  • (String)

    word-char-exceptions

#write_contents_sync(stream, flags, cancellable) ⇒ Boolean

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

If cancellable is not nil, 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:

  • stream (Gio::OutputStream)

    a GOutput::Stream to write to

  • flags (Vte::WriteFlags)

    a set of Vte::WriteFlags

  • cancellable (Gio::Cancellable)

    a #GCancellable object, or nil

Returns:

  • (Boolean)

    true on success, false if there was an error

#xalignVte::Align

The horizontal alignment of terminal within its allocation.

Returns:

#xalign=(xalign) ⇒ Vte::Align

The horizontal alignment of terminal within its allocation.

Parameters:

Returns:

#xfillBoolean

Returns the horizontal fillment of terminal within its allocation.

Returns:

  • (Boolean)

    the horizontal fillment of terminal within its allocation

#xfill=(xfill) ⇒ Boolean

The horizontal fillment of terminal within its allocation.

Parameters:

  • xfill (Boolean)

Returns:

  • (Boolean)

    xfill

  • (Boolean)

    xfill

#xfill?Boolean

The horizontal fillment of terminal within its allocation.

Returns:

  • (Boolean)

    xfill

#yalignVte::Align

The vertical alignment of terminal within its allocation

Returns:

#yalign=(yalign) ⇒ Vte::Align

The vertical alignment of terminal within its allocation

Parameters:

Returns:

#yfillBoolean

Returns the vertical fillment of terminal within its allocation.

Returns:

  • (Boolean)

    the vertical fillment of terminal within its allocation

#yfill=(yfill) ⇒ Boolean

The vertical fillment of terminal within its allocation. Note that Vte::Terminal:yfill=true is only supported with Vte::Terminal:yalign=%VTE_ALIGN_START, and is ignored for all other yalign values.

Parameters:

  • yfill (Boolean)

Returns:

  • (Boolean)

    yfill

  • (Boolean)

    yfill

#yfill?Boolean

The vertical fillment of terminal within its allocation. Note that Vte::Terminal:yfill=true is only supported with Vte::Terminal:yalign=%VTE_ALIGN_START, and is ignored for all other yalign values.

Returns:

  • (Boolean)

    yfill