![]() | ![]() | ![]() | VTE Reference Manual | ![]() |
---|
VteTerminal — A terminal widget implementation.
struct VteTerminal; enum VteTerminalEraseBinding; GtkWidget* vte_terminal_new (void); void vte_terminal_im_append_menuitems (VteTerminal *terminal, GtkMenuShell *menushell); pid_t vte_terminal_fork_command (VteTerminal *terminal, const char *command, char **argv, char **envv, const char *directory, gboolean lastlog, gboolean utmp, gboolean wtmp); pid_t vte_terminal_forkpty (VteTerminal *terminal, char **envv, const char *directory, gboolean lastlog, gboolean utmp, gboolean wtmp); void vte_terminal_feed (VteTerminal *terminal, const char *data, glong length); void vte_terminal_feed_child (VteTerminal *terminal, const char *data, glong length); void vte_terminal_copy_clipboard (VteTerminal *terminal); void vte_terminal_paste_clipboard (VteTerminal *terminal); void vte_terminal_copy_primary (VteTerminal *terminal); void vte_terminal_paste_primary (VteTerminal *terminal); void vte_terminal_set_size (VteTerminal *terminal, glong columns, glong rows); void vte_terminal_set_audible_bell (VteTerminal *terminal, gboolean is_audible); gboolean vte_terminal_get_audible_bell (VteTerminal *terminal); void vte_terminal_set_visible_bell (VteTerminal *terminal, gboolean is_visible); gboolean vte_terminal_get_visible_bell (VteTerminal *terminal); void vte_terminal_set_allow_bold (VteTerminal *terminal, gboolean allow_bold); gboolean vte_terminal_get_allow_bold (VteTerminal *terminal); void vte_terminal_set_scroll_on_output (VteTerminal *terminal, gboolean scroll); void vte_terminal_set_scroll_on_keystroke (VteTerminal *terminal, gboolean scroll); void vte_terminal_set_color_bold (VteTerminal *terminal, const GdkColor *bold); void vte_terminal_set_color_foreground (VteTerminal *terminal, const GdkColor *foreground); void vte_terminal_set_color_background (VteTerminal *terminal, const GdkColor *background); void vte_terminal_set_color_dim (VteTerminal *terminal, const GdkColor *dim); void vte_terminal_set_color_cursor (VteTerminal *terminal, const GdkColor *cursor_background); void vte_terminal_set_color_highlight (VteTerminal *terminal, const GdkColor *highlight_background); void vte_terminal_set_colors (VteTerminal *terminal, const GdkColor *foreground, const GdkColor *background, const GdkColor *palette, glong palette_size); void vte_terminal_set_default_colors (VteTerminal *terminal); void vte_terminal_set_background_image (VteTerminal *terminal, GdkPixbuf *image); void vte_terminal_set_background_image_file (VteTerminal *terminal, const char *path); void vte_terminal_set_background_saturation (VteTerminal *terminal, double saturation); void vte_terminal_set_background_transparent (VteTerminal *terminal, gboolean transparent); void vte_terminal_set_background_tint_color (VteTerminal *terminal, const GdkColor *color); void vte_terminal_set_scroll_background (VteTerminal *terminal, gboolean scroll); void vte_terminal_set_cursor_blinks (VteTerminal *terminal, gboolean blink); void vte_terminal_set_scrollback_lines (VteTerminal *terminal, glong lines); void vte_terminal_set_font (VteTerminal *terminal, const PangoFontDescription *font_desc); void vte_terminal_set_font_from_string (VteTerminal *terminal, const char *name); void vte_terminal_set_font_from_string_full (VteTerminal *terminal, const char *name, VteTerminalAntiAlias antialias); void vte_terminal_set_font_full (VteTerminal *terminal, const PangoFontDescription *font_desc, VteTerminalAntiAlias antialias); const PangoFontDescription* vte_terminal_get_font (VteTerminal *terminal); gboolean vte_terminal_get_using_xft (VteTerminal *terminal); gboolean vte_terminal_get_has_selection (VteTerminal *terminal); void vte_terminal_set_word_chars (VteTerminal *terminal, const char *spec); gboolean vte_terminal_is_word_char (VteTerminal *terminal, gunichar c); void vte_terminal_set_backspace_binding (VteTerminal *terminal, VteTerminalEraseBinding binding); void vte_terminal_set_delete_binding (VteTerminal *terminal, VteTerminalEraseBinding binding); void vte_terminal_set_mouse_autohide (VteTerminal *terminal, gboolean setting); gboolean vte_terminal_get_mouse_autohide (VteTerminal *terminal); void vte_terminal_reset (VteTerminal *terminal, gboolean full, gboolean clear_history); char* vte_terminal_get_text (VteTerminal *terminal, gboolean (*is_selected) (VteTerminal *terminal,glong column,glong row,gpointer data), gpointer data, GArray *attributes); char* vte_terminal_get_text_range (VteTerminal *terminal, glong start_row, glong start_col, glong end_row, glong end_col, gboolean (*is_selected) (VteTerminal *terminal,glong column,glong row,gpointer data), gpointer data, GArray *attributes); void vte_terminal_get_cursor_position (VteTerminal *terminal, glong *column, glong *row); void vte_terminal_match_clear_all (VteTerminal *terminal); int vte_terminal_match_add (VteTerminal *terminal, const char *match); void vte_terminal_match_remove (VteTerminal *terminal, int tag); char* vte_terminal_match_check (VteTerminal *terminal, glong column, glong row, int *tag); void vte_terminal_match_set_cursor (VteTerminal *terminal, int tag, GdkCursor *cursor); void vte_terminal_match_set_cursor_type (VteTerminal *terminal, int tag, GdkCursorType cursor_type); void vte_terminal_set_emulation (VteTerminal *terminal, const char *emulation); const char* vte_terminal_get_emulation (VteTerminal *terminal); const char* vte_terminal_get_default_emulation (VteTerminal *terminal); void vte_terminal_set_encoding (VteTerminal *terminal, const char *codeset); const char* vte_terminal_get_encoding (VteTerminal *terminal); const char* vte_terminal_get_status_line (VteTerminal *terminal); void vte_terminal_get_padding (VteTerminal *terminal, int *xpad, int *ypad); GtkAdjustment* vte_terminal_get_adjustment (VteTerminal *terminal); glong vte_terminal_get_char_ascent (VteTerminal *terminal); glong vte_terminal_get_char_descent (VteTerminal *terminal); glong vte_terminal_get_char_height (VteTerminal *terminal); glong vte_terminal_get_char_width (VteTerminal *terminal); glong vte_terminal_get_column_count (VteTerminal *terminal); const char* vte_terminal_get_icon_title (VteTerminal *terminal); glong vte_terminal_get_row_count (VteTerminal *terminal); const char* vte_terminal_get_window_title (VteTerminal *terminal);
"char-size-changed" void user_function (VteTerminal *vteterminal, guint arg1, guint arg2, gpointer user_data); "child-exited" void user_function (VteTerminal *vteterminal, gpointer user_data); "commit" void user_function (VteTerminal *vteterminal, gchar *arg1, guint arg2, gpointer user_data); "contents-changed" void user_function (VteTerminal *vteterminal, gpointer user_data); "cursor-moved" void user_function (VteTerminal *vteterminal, gpointer user_data); "decrease-font-size" void user_function (VteTerminal *vteterminal, gpointer user_data); "deiconify-window" void user_function (VteTerminal *vteterminal, gpointer user_data); "emulation-changed" void user_function (VteTerminal *vteterminal, gpointer user_data); "encoding-changed" void user_function (VteTerminal *vteterminal, gpointer user_data); "eof" void user_function (VteTerminal *vteterminal, gpointer user_data); "icon-title-changed" void user_function (VteTerminal *vteterminal, gpointer user_data); "iconify-window" void user_function (VteTerminal *vteterminal, gpointer user_data); "increase-font-size" void user_function (VteTerminal *vteterminal, gpointer user_data); "lower-window" void user_function (VteTerminal *vteterminal, gpointer user_data); "maximize-window" void user_function (VteTerminal *vteterminal, gpointer user_data); "move-window" void user_function (VteTerminal *vteterminal, guint arg1, guint arg2, gpointer user_data); "raise-window" void user_function (VteTerminal *vteterminal, gpointer user_data); "refresh-window" void user_function (VteTerminal *vteterminal, gpointer user_data); "resize-window" void user_function (VteTerminal *vteterminal, guint arg1, guint arg2, gpointer user_data); "restore-window" void user_function (VteTerminal *vteterminal, gpointer user_data); "selection-changed" void user_function (VteTerminal *vteterminal, gpointer user_data); "status-line-changed" void user_function (VteTerminal *vteterminal, gpointer user_data); "text-deleted" void user_function (VteTerminal *vteterminal, gpointer user_data); "text-inserted" void user_function (VteTerminal *vteterminal, gpointer user_data); "text-modified" void user_function (VteTerminal *vteterminal, gpointer user_data); "text-scrolled" void user_function (VteTerminal *vteterminal, gint arg1, gpointer user_data); "window-title-changed" void user_function (VteTerminal *vteterminal, gpointer user_data);
struct VteTerminal { /* Widget implementation stuffs. */ GtkWidget widget; GtkAdjustment *adjustment; /* Scrolling adjustment. */ /* Metric and sizing data. */ glong char_width, char_height; /* dimensions of character cells */ glong char_ascent, char_descent; /* important font metrics */ glong row_count, column_count; /* dimensions of the window */ /* Titles. */ char *window_title; char *icon_title; };
All of these fields should be considered read-only.
GtkWidget widget | |
GtkAdjustment *adjustment | Scroll bar adjustments. |
glong char_width | Width of a narrow character cell. |
glong char_height | Height of a character cell. |
glong char_ascent | The distance (in pixels) from the baseline of drawn text to the top of the character cell. |
glong char_descent | The distance (in pixels) from the baseline of drawn text to the bottom of the character cell. |
glong row_count | Number of visible rows. |
glong column_count | Number of visible columns. |
char *window_title | The terminal's idea of what the window's title should be. |
char *icon_title | The terminal's idea of what the window's title should be when iconified. |
typedef enum { VTE_ERASE_AUTO, VTE_ERASE_ASCII_BACKSPACE, VTE_ERASE_ASCII_DELETE, VTE_ERASE_DELETE_SEQUENCE } VteTerminalEraseBinding;
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.
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. |
GtkWidget* vte_terminal_new (void);
Create a new terminal widget.
Returns : | a new VteTerminal object |
void vte_terminal_im_append_menuitems (VteTerminal *terminal, GtkMenuShell *menushell);
Appends menu items for various input methods to the given menu. The user can select one of these items to modify the input method used by the terminal.
terminal : | a VteTerminal |
menushell : | a GtkMenuShell |
pid_t vte_terminal_fork_command (VteTerminal *terminal, const char *command, char **argv, char **envv, const char *directory, gboolean lastlog, gboolean utmp, gboolean wtmp);
Starts the specified command under a newly-allocated controlling pseudo-terminal. The argv and envv lists should be NULL-terminated, and argv[0] is expected to be the name of the file being run, as it would be if execve() were being called. TERM is automatically set to reflect the terminal widget's emulation setting. If lastlog, utmp, or wtmp are TRUE, logs the session to the specified system log files.
terminal : | a VteTerminal |
command : | the name of a binary to run |
argv : | the argument list to be passed to command |
envv : | a list of environment variables to be added to the environment before starting command, or NULL |
directory : | the name of a directory the command should start in, or NULL |
lastlog : | TRUE if the session should be logged to the lastlog |
utmp : | TRUE if the session should be logged to the utmp/utmpx log |
wtmp : | TRUE if the session should be logged to the wtmp/wtmpx log |
Returns : | the ID of the new process |
pid_t vte_terminal_forkpty (VteTerminal *terminal, char **envv, const char *directory, gboolean lastlog, gboolean utmp, gboolean wtmp);
Starts a new child process under a newly-allocated controlling pseudo-terminal. TERM is automatically set to reflect the terminal widget's emulation setting. If lastlog, utmp, or wtmp are TRUE, logs the session to the specified system log files.
terminal : | a VteTerminal |
envv : | a list of environment variables to be added to the environment before starting returning in the child process, or NULL |
directory : | the name of a directory the child process should change to, or NULL |
lastlog : | TRUE if the session should be logged to the lastlog |
utmp : | TRUE if the session should be logged to the utmp/utmpx log |
wtmp : | TRUE if the session should be logged to the wtmp/wtmpx log |
Returns : | the ID of the new process in the parent, 0 in the child, and -1 if there was an error |
Since 0.11.11
void vte_terminal_feed (VteTerminal *terminal, const char *data, glong length);
Interprets data as if it were data received from a child process. This can either be used to drive the terminal without a child process, or just to mess with your users.
terminal : | a VteTerminal |
data : | a string in the terminal's current encoding |
length : | the length of the string |
void vte_terminal_feed_child (VteTerminal *terminal, const char *data, glong length);
Sends a block of UTF-8 text to the child as if it were entered by the user at the keyboard.
terminal : | a VteTerminal |
data : | data to send to the child |
length : | length of text |
void vte_terminal_copy_clipboard (VteTerminal *terminal);
Places the selected text in the terminal in the GDK_SELECTION_CLIPBOARD selection.
terminal : | a VteTerminal |
void vte_terminal_paste_clipboard (VteTerminal *terminal);
Sends the contents of the GDK_SELECTION_CLIPBOARD selection to the terminal's child. If necessary, the data is converted from UTF-8 to the terminal's current encoding.
terminal : | a VteTerminal |
void vte_terminal_copy_primary (VteTerminal *terminal);
Places the selected text in the terminal in the GDK_SELECTION_PRIMARY selection.
terminal : | a VteTerminal |
void vte_terminal_paste_primary (VteTerminal *terminal);
Sends the contents of the GDK_SELECTION_PRIMARY selection to the terminal's child. If necessary, the data is converted from UTF-8 to the terminal's current encoding. The terminal will call also paste the GDK_SELECTION_PRIMARY selection when the user clicks with the the second mouse button or presses Shift+Insert.
terminal : | a VteTerminal |
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.
terminal : | a VteTerminal |
columns : | the desired number of columns |
rows : | the desired number of rows |
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.
terminal : | a VteTerminal |
is_audible : | TRUE if the terminal should beep |
gboolean vte_terminal_get_audible_bell (VteTerminal *terminal);
Checks whether or not the terminal will beep when the child outputs the "bl" sequence.
terminal : | a VteTerminal |
Returns : | TRUE if audible bell is enabled, FALSE if not |
void vte_terminal_set_visible_bell (VteTerminal *terminal, gboolean is_visible);
Controls whether or not the terminal will present a visible bell to the user when the child outputs the "bl" sequence. The terminal will clear itself to the default foreground color and then repaint itself.
terminal : | a VteTerminal |
is_visible : | TRUE if the terminal should flash |
gboolean vte_terminal_get_visible_bell (VteTerminal *terminal);
Checks whether or not the terminal will present a visible bell to the user when the child outputs the "bl" sequence. The terminal will clear itself to the default foreground color and then repaint itself.
terminal : | a VteTerminal |
Returns : | TRUE if visible bell is enabled, FALSE if not |
void vte_terminal_set_allow_bold (VteTerminal *terminal, gboolean allow_bold);
Controls whether or not the terminal will attempt to draw bold text by repainting text with a different offset.
terminal : | a VteTerminal |
allow_bold : | TRUE if the terminal should attempt to draw bold text |
gboolean vte_terminal_get_allow_bold (VteTerminal *terminal);
Checks whether or not the terminal will attempt to draw bold text by repainting text with a one-pixel offset.
terminal : | a VteTerminal |
Returns : | TRUE if bolding is enabled, FALSE if not |
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.
terminal : | a VteTerminal |
scroll : | TRUE if the terminal should scroll on output |
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.
terminal : | a VteTerminal |
scroll : | TRUE if the terminal should scroll on keystrokes |
void vte_terminal_set_color_bold (VteTerminal *terminal, const GdkColor *bold);
Sets the color used to draw bold text in the default foreground color.
terminal : | a VteTerminal |
bold : | the new bold color |
void vte_terminal_set_color_foreground (VteTerminal *terminal, const GdkColor *foreground);
Sets the foreground color used to draw normal text
terminal : | a VteTerminal |
foreground : | the new foreground color |
void vte_terminal_set_color_background (VteTerminal *terminal, const GdkColor *background);
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.
terminal : | a VteTerminal |
background : | the new background color |
void vte_terminal_set_color_dim (VteTerminal *terminal, const GdkColor *dim);
Sets the color used to draw dim text in the default foreground color.
terminal : | a VteTerminal |
dim : | the new dim color |
void vte_terminal_set_color_cursor (VteTerminal *terminal, const GdkColor *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.
terminal : | a VteTerminal |
cursor_background : | the new color to use for the text cursor |
Since 0.11.11
void vte_terminal_set_color_highlight (VteTerminal *terminal, const GdkColor *highlight_background);
Sets the background color for text which is highlighted. If NULL, highlighted text (which is usually highlighted because it is selected) will be drawn with foreground and background colors reversed.
terminal : | a VteTerminal |
highlight_background : | the new color to use for highlighted text |
Since 0.11.11
void vte_terminal_set_colors (VteTerminal *terminal, const GdkColor *foreground, const GdkColor *background, const GdkColor *palette, glong palette_size);
The terminal widget uses a 28-color model comprised of the default foreground and background colors, the bold foreground color, the dim foreground color, an eight color palette, bold versions of the eight color palette, and a dim version of the the eight color palette.
palette_size must be either 0, 8, 16, or 24. 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]. If palette_size is 8 or 16, the third (dim) and possibly the second (bold) 8-color palettes are extrapolated from the new background color and the items in palette.
terminal : | a VteTerminal |
foreground : | the new foreground color, or NULL |
background : | the new background color, or NULL |
palette : | the color palette |
palette_size : | the number of entries in palette |
void vte_terminal_set_default_colors (VteTerminal *terminal);
Reset the terminal palette to reasonable compiled-in defaults.
terminal : | a VteTerminal |
void vte_terminal_set_background_image (VteTerminal *terminal, GdkPixbuf *image);
Sets a background image for the widget. Text which would otherwise be drawn using the default background color will instead be drawn over the specified image. If necessary, the image will be tiled to cover the widget's entire visible area. If specified by vte_terminal_set_background_saturation(), the terminal will tint its in-memory copy of the image before applying it to the terminal.
terminal : | a VteTerminal |
image : | a GdkPixbuf to use, or NULL to cancel |
void vte_terminal_set_background_image_file (VteTerminal *terminal, const char *path);
Sets a background image for the widget. If specified by vte_terminal_set_background_saturation(), the terminal will tint its in-memory copy of the image before applying it to the terminal.
terminal : | a VteTerminal |
path : | path to an image file |
void vte_terminal_set_background_saturation (VteTerminal *terminal, double saturation);
If a background image has been set using vte_terminal_set_background_image(), vte_terminal_set_background_image_file(), or vte_terminal_set_background_transparent(), and the saturation value is less than 1.0, the terminal will adjust the colors of the image before drawing the image. To do so, the terminal will create a copy of the background image (or snapshot of the root window) and modify its pixel values.
terminal : | a VteTerminal |
saturation : | a floating point value between 0.0 and 1.0. |
void vte_terminal_set_background_transparent (VteTerminal *terminal, gboolean transparent);
Sets the terminal's background image to the pixmap stored in the root window, adjusted so that if there are no windows below your application, the widget will appear to be transparent.
terminal : | a VteTerminal |
transparent : | TRUE if the terminal should fake transparency |
void vte_terminal_set_background_tint_color (VteTerminal *terminal, const GdkColor *color);
If a background image has been set using vte_terminal_set_background_image(), vte_terminal_set_background_image_file(), or vte_terminal_set_background_transparent(), and the value set by vte_terminal_set_background_saturation() is less than one, the terminal will adjust the color of the image before drawing the image. To do so, the terminal will create a copy of the background image (or snapshot of the root window) and modify its pixel values. The initial tint color is black.
terminal : | a VteTerminal |
color : | a color which the terminal background should be tinted to if its saturation is not 1.0. |
Since 0.11
void vte_terminal_set_scroll_background (VteTerminal *terminal, gboolean scroll);
Controls whether or not the terminal will scroll the background image (if one is set) when the text in the window must be scrolled.
terminal : | a VteTerminal |
scroll : | TRUE if the terminal should scroll the background image along with text. |
Since 0.11
void vte_terminal_set_cursor_blinks (VteTerminal *terminal, gboolean blink);
Sets whether or not the cursor will blink. The length of the blinking cycle is controlled by the "gtk-cursor-blink-time" GTK+ setting.
terminal : | a VteTerminal |
blink : | TRUE if the cursor should blink |
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. 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.
terminal : | a VteTerminal |
lines : | the length of the history buffer |
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.
terminal : | a VteTerminal |
font_desc : | The PangoFontDescription of the desired font. |
void vte_terminal_set_font_from_string (VteTerminal *terminal, const char *name);
A convenience function which converts name into a PangoFontDescription and passes it to vte_terminal_set_font().
terminal : | a VteTerminal |
name : | A string describing the font. |
void vte_terminal_set_font_from_string_full (VteTerminal *terminal, const char *name, VteTerminalAntiAlias antialias);
A convenience function which converts name into a PangoFontDescription and passes it to vte_terminal_set_font_full().
terminal : | a VteTerminal |
name : | A string describing the font. |
antialias : | Whether or not to antialias the font (if possible). |
Since 0.11.11
void vte_terminal_set_font_full (VteTerminal *terminal, const PangoFontDescription *font_desc, VteTerminalAntiAlias antialias);
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.
terminal : | a VteTerminal |
font_desc : | The PangoFontDescription of the desired font. |
antialias : | Specify if anti aliasing of the fonts is to be used or not. |
Since 0.11.11
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.
terminal : | a VteTerminal |
Returns : | a PangoFontDescription describing the font the terminal is currently using to render text. |
gboolean vte_terminal_get_using_xft (VteTerminal *terminal);
A VteTerminal can use multiple methods to draw text. This function allows an application to determine whether or not the current method uses fontconfig to find fonts. This setting cannot be changed by the caller, but in practice usually matches the behavior of GTK+ itself.
terminal : | a VteTerminal |
Returns : | TRUE if the terminal is using fontconfig to find fonts, FALSE if the terminal is using PangoX. |
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.
terminal : | a VteTerminal |
Returns : | TRUE if part of the text in the terminal is selected. |
void vte_terminal_set_word_chars (VteTerminal *terminal, const char *spec);
When the user double-clicks to start selection, the terminal will extend the selection on word boundaries. It will treat characters included in spec as parts of words, and all other characters as word separators. Ranges of characters can be specified by separating them with a hyphen.
As a special case, if spec is NULL or the empty string, the terminal will treat all graphic non-punctuation non-space characters as word characters.
terminal : | a VteTerminal |
spec : | a specification |
gboolean vte_terminal_is_word_char (VteTerminal *terminal, gunichar c);
Checks if a particular character is considered to be part of a word or not, based on the values last passed to vte_terminal_set_word_chars().
terminal : | a VteTerminal |
c : | a candidate Unicode code point |
Returns : | TRUE if the character is considered to be part of a word |
void vte_terminal_set_backspace_binding (VteTerminal *terminal, VteTerminalEraseBinding 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.
terminal : | a VteTerminal |
binding : | a VteTerminalEraseBinding for the backspace key |
void vte_terminal_set_delete_binding (VteTerminal *terminal, VteTerminalEraseBinding 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.
terminal : | a VteTerminal |
binding : | a VteTerminalEraseBinding for the delete key |
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().
terminal : | a VteTerminal |
setting : | TRUE if the autohide should be enabled |
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().
terminal : | a VteTerminal |
Returns : | TRUE if autohiding is enabled, FALSE if not. |
void vte_terminal_reset (VteTerminal *terminal, gboolean full, 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.
terminal : | a VteTerminal |
full : | TRUE to reset tabstops |
clear_history : | TRUE to empty the terminal's scrollback buffer |
char* vte_terminal_get_text (VteTerminal *terminal, gboolean (*is_selected) (VteTerminal *terminal,glong column,glong row,gpointer data), gpointer data, GArray *attributes);
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.
terminal : | a VteTerminal |
is_selected : | a callback |
data : | user data to be passed to the callback |
attributes : | location for storing text attributes |
Returns : | a text string which must be freed by the caller, or NULL. |
char* vte_terminal_get_text_range (VteTerminal *terminal, glong start_row, glong start_col, glong end_row, glong end_col, gboolean (*is_selected) (VteTerminal *terminal,glong column,glong row,gpointer data), gpointer data, GArray *attributes);
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.
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 callback |
data : | user data to be passed to the callback |
attributes : | location for storing text attributes |
Returns : | a text string which must be freed by the caller, or NULL. |
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.
terminal : | a VteTerminal |
column : | long which will hold the column |
row : | long which will hold the row |
void vte_terminal_match_clear_all (VteTerminal *terminal);
Clears the list of regular expressions the terminal uses to highlight text when the user moves the mouse cursor.
terminal : | a VteTerminal |
int vte_terminal_match_add (VteTerminal *terminal, const char *match);
Adds a regular expression 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.
terminal : | a VteTerminal |
match : | a regular expression |
Returns : | an integer associated with this expression |
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.
terminal : | a VteTerminal |
tag : | the tag of the regex to remove |
char* vte_terminal_match_check (VteTerminal *terminal, glong column, glong row, int *tag);
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.
terminal : | a VteTerminal |
column : | the text column |
row : | the text row |
tag : | pointer to an integer |
Returns : | a string which matches one of the previously set regular expressions, and which must be freed by the caller. |
void vte_terminal_match_set_cursor (VteTerminal *terminal, int tag, GdkCursor *cursor);
Sets which cursor the terminal will use if the pointer is over the pattern specified by tag. The terminal keeps a reference to cursor.
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 |
Since 0.11
void vte_terminal_match_set_cursor_type (VteTerminal *terminal, int tag, GdkCursorType cursor_type);
Sets which cursor the terminal will use if the pointer is over the pattern specified by tag. A convenience wrapper for vte_terminal_match_set_cursor().
terminal : | a VteTerminal |
tag : | the tag of the regex which should use the specified cursor |
cursor_type : | a GdkCursorType |
Since 0.11.9
void vte_terminal_set_emulation (VteTerminal *terminal, const char *emulation);
Sets what type of terminal the widget attempts to emulate by scanning for control sequences defined in the system's termcap file. Unless you are interested in this feature, always use "xterm".
terminal : | a VteTerminal |
emulation : | the name of a terminal description |
const char* vte_terminal_get_emulation (VteTerminal *terminal);
Queries the terminal for its current emulation, as last set by a call to vte_terminal_set_emulation().
terminal : | a VteTerminal |
Returns : | the name of the terminal type the widget is attempting to emulate |
const char* vte_terminal_get_default_emulation (VteTerminal *terminal);
Queries the terminal for its default emulation, which is attempted if the terminal type passed to vte_terminal_set_emulation() is NULL.
terminal : | a VteTerminal |
Returns : | the name of the default terminal type the widget attempts to emulate Since 0.11.11 |
void vte_terminal_set_encoding (VteTerminal *terminal, const char *codeset);
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. The default encoding is defined by the application's locale settings.
terminal : | a VteTerminal |
codeset : | a valid g_iconv target |
const char* vte_terminal_get_encoding (VteTerminal *terminal);
Determines the name of the encoding in which the terminal expects data to be encoded.
terminal : | a VteTerminal |
Returns : | the current encoding for the terminal. |
const char* vte_terminal_get_status_line (VteTerminal *terminal);
Some terminal emulations specify a status line which is separate from the main display area, and define a means for applications to move the cursor to the status line and back.
terminal : | a VteTerminal |
Returns : | the current contents of the terminal's status line. For terminals like "xterm", this will usually be the empty string. The string must not be modified or freed by the caller. |
void vte_terminal_get_padding (VteTerminal *terminal, int *xpad, int *ypad);
Determines the amount of additional space the widget is using to pad the edges of its visible area. This is necessary for cases where characters in the selected font don't themselves include a padding area and the text itself would otherwise be contiguous with the window border. Applications which use the widget's row_count, column_count, char_height, and char_width fields to set geometry hints using gtk_window_set_geometry_hints() will need to add this value to the base size. The values returned in xpad and ypad are the total padding used in each direction, and do not need to be doubled.
terminal : | a VteTerminal |
xpad : | address in which to store left/right-edge padding |
ypad : | address in which to store top/bottom-edge ypadding |
GtkAdjustment* vte_terminal_get_adjustment (VteTerminal *terminal);
An accessor function provided for the benefit of language bindings.
terminal : | a VteTerminal |
Returns : | the contents of terminal's adjustment field |
glong vte_terminal_get_char_ascent (VteTerminal *terminal);
An accessor function provided for the benefit of language bindings.
terminal : | a VteTerminal |
Returns : | the contents of terminal's char_ascent field |
glong vte_terminal_get_char_descent (VteTerminal *terminal);
An accessor function provided for the benefit of language bindings.
terminal : | a VteTerminal |
Returns : | the contents of terminal's char_descent field |
glong vte_terminal_get_char_height (VteTerminal *terminal);
An accessor function provided for the benefit of language bindings.
terminal : | a VteTerminal |
Returns : | the contents of terminal's char_height field |
glong vte_terminal_get_char_width (VteTerminal *terminal);
An accessor function provided for the benefit of language bindings.
terminal : | a VteTerminal |
Returns : | the contents of terminal's char_width field |
glong vte_terminal_get_column_count (VteTerminal *terminal);
An accessor function provided for the benefit of language bindings.
terminal : | a VteTerminal |
Returns : | the contents of terminal's column_count field |
const char* vte_terminal_get_icon_title (VteTerminal *terminal);
An accessor function provided for the benefit of language bindings.
terminal : | a VteTerminal |
Returns : | the contents of terminal's icon_title field |
glong vte_terminal_get_row_count (VteTerminal *terminal);
An accessor function provided for the benefit of language bindings.
terminal : | a VteTerminal |
Returns : | the contents of terminal's row_count field |
const char* vte_terminal_get_window_title (VteTerminal *terminal);
An accessor function provided for the benefit of language bindings.
terminal : | a VteTerminal |
Returns : | the contents of terminal's window_title field |
void user_function (VteTerminal *vteterminal, guint arg1, guint arg2, gpointer user_data);
Emitted whenever selection of a new font causes the values of the char_width or char_height fields to change.
vteterminal : | the object which received the signal. |
arg1 : | the new character cell width. |
arg2 : | the new character cell height. |
user_data : | user data set when the signal handler was connected. |
void user_function (VteTerminal *vteterminal, gpointer user_data);
This signal is emitted when the terminal detects that a child started using vte_terminal_fork_command() has exited.
vteterminal : | the object which received the signal. |
user_data : | user data set when the signal handler was connected. |
void user_function (VteTerminal *vteterminal, gchar *arg1, guint arg2, gpointer user_data);
Emitted whenever the terminal receives input from the user and prepares to send it to the child process. The signal is emitted even when there is no child process.
vteterminal : | the object which received the signal. |
arg1 : | a string of text. |
arg2 : | the length of that string of text. |
user_data : | user data set when the signal handler was connected. |
void user_function (VteTerminal *vteterminal, gpointer user_data);
Emitted whenever the visible appearance of the terminal has changed. Used primarily by VteTerminalAccessible.
vteterminal : | the object which received the signal. |
user_data : | user data set when the signal handler was connected. |
void user_function (VteTerminal *vteterminal, gpointer user_data);
Emitted whenever the cursor moves to a new character cell. Used primarily by VteTerminalAccessible.
vteterminal : | the object which received the signal. |
user_data : | user data set when the signal handler was connected. |
void user_function (VteTerminal *vteterminal, gpointer user_data);
Emitted when the user hits the '-' key while holding the Control key.
vteterminal : | the object which received the signal. |
user_data : | user data set when the signal handler was connected. |
void user_function (VteTerminal *vteterminal, gpointer user_data);
Emitted at the child application's request.
vteterminal : | the object which received the signal. |
user_data : | user data set when the signal handler was connected. |
void user_function (VteTerminal *vteterminal, gpointer user_data);
Emitted whenever the terminal's emulation changes, only possible at the parent application's request.
vteterminal : | the object which received the signal. |
user_data : | user data set when the signal handler was connected. |
void user_function (VteTerminal *vteterminal, gpointer user_data);
Emitted whenever the terminal's current encoding has changed, either as a result of receiving a control sequence which toggled between the local and UTF-8 encodings, or at the parent application's request.
vteterminal : | the object which received the signal. |
user_data : | user data set when the signal handler was connected. |
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.
vteterminal : | the object which received the signal. |
user_data : | user data set when the signal handler was connected. |
void user_function (VteTerminal *vteterminal, gpointer user_data);
Emitted when the terminal's icon_title field is modified.
vteterminal : | the object which received the signal. |
user_data : | user data set when the signal handler was connected. |
void user_function (VteTerminal *vteterminal, gpointer user_data);
Emitted at the child application's request.
vteterminal : | the object which received the signal. |
user_data : | user data set when the signal handler was connected. |
void user_function (VteTerminal *vteterminal, gpointer user_data);
Emitted when the user hits the '+' key while holding the Control key.
vteterminal : | the object which received the signal. |
user_data : | user data set when the signal handler was connected. |
void user_function (VteTerminal *vteterminal, gpointer user_data);
Emitted at the child application's request.
vteterminal : | the object which received the signal. |
user_data : | user data set when the signal handler was connected. |
void user_function (VteTerminal *vteterminal, gpointer user_data);
Emitted at the child application's request.
vteterminal : | the object which received the signal. |
user_data : | user data set when the signal handler was connected. |
void user_function (VteTerminal *vteterminal, guint arg1, guint arg2, gpointer user_data);
Emitted at the child application's request.
vteterminal : | the object which received the signal. |
arg1 : | the terminal's desired location, X coordinate. |
arg2 : | the terminal's desired location, Y coordinate. |
user_data : | user data set when the signal handler was connected. |
void user_function (VteTerminal *vteterminal, gpointer user_data);
Emitted at the child application's request.
vteterminal : | the object which received the signal. |
user_data : | user data set when the signal handler was connected. |
void user_function (VteTerminal *vteterminal, gpointer user_data);
Emitted at the child application's request.
vteterminal : | the object which received the signal. |
user_data : | user data set when the signal handler was connected. |
void user_function (VteTerminal *vteterminal, guint arg1, guint arg2, gpointer user_data);
Emitted at the child application's request.
vteterminal : | the object which received the signal. |
arg1 : | the desired width in pixels, including padding. |
arg2 : | the desired height in pixels, including padding. |
user_data : | user data set when the signal handler was connected. |
void user_function (VteTerminal *vteterminal, gpointer user_data);
Emitted at the child application's request.
vteterminal : | the object which received the signal. |
user_data : | user data set when the signal handler was connected. |
void user_function (VteTerminal *vteterminal, gpointer user_data);
Emitted whenever the contents of terminal's selection changes.
vteterminal : | the object which received the signal. |
user_data : | user data set when the signal handler was connected. |
void user_function (VteTerminal *vteterminal, gpointer user_data);
Emitted whenever the contents of the status line are modified or cleared.
vteterminal : | the object which received the signal. |
user_data : | user data set when the signal handler was connected. |
void user_function (VteTerminal *vteterminal, gpointer user_data);
An internal signal used for communication between the terminal and its accessibility peer. May not be emitted under certain circumstances.
vteterminal : | the object which received the signal. |
user_data : | user data set when the signal handler was connected. |
void user_function (VteTerminal *vteterminal, gpointer user_data);
An internal signal used for communication between the terminal and its accessibility peer. May not be emitted under certain circumstances.
vteterminal : | the object which received the signal. |
user_data : | user data set when the signal handler was connected. |
void user_function (VteTerminal *vteterminal, gpointer user_data);
An internal signal used for communication between the terminal and its accessibility peer. May not be emitted under certain circumstances.
vteterminal : | the object which received the signal. |
user_data : | user data set when the signal handler was connected. |
void user_function (VteTerminal *vteterminal, gint arg1, gpointer user_data);
An internal signal used for communication between the terminal and its accessibility peer. May not be emitted under certain circumstances.
vteterminal : | the object which received the signal. |
arg1 : | |
user_data : | user data set when the signal handler was connected. |
void user_function (VteTerminal *vteterminal, gpointer user_data);
Emitted when the terminal's window_title field is modified.
vteterminal : | the object which received the signal. |
user_data : | user data set when the signal handler was connected. |
<< VTE | VteTerminalAccessible >> |