linux学习记录
分类:
2008-09-25 15:27:20
void vte_terminal_set_cursor_blink_mode (VteTerminal *terminal,
VteTerminalCursorBlinkMode mode);
Sets whether or not the cursor will blink. Using VTE_CURSOR_BLINK_SYSTEM
will use the
terminal : |
a VteTerminal |
mode : |
the |
Since 0.16.15
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,
constPangoFontDescription *font_desc);
Sets the font used for rendering all text displayed by the terminal,
overriding any fonts set using gtk_widget_modify_font()
terminal : |
a VteTerminal |
font_desc : |
The |
void vte_terminal_set_font_from_string (VteTerminal *terminal,
constchar *name);
A convenience function which converts name
into a vte_terminal_set_font()
.
terminal : |
a VteTerminal |
name : |
A string describing the font. |
void vte_terminal_set_font_from_string_full
(VteTerminal *terminal,
constchar *name,
VteTerminalAntiAlias antialias);
A convenience function which converts name
into a 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,
constPangoFontDescription *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()
terminal : |
a VteTerminal |
font_desc : |
The |
antialias : |
Specify if anti aliasing of the fonts is to be used or not. |
Since 0.11.11
constPangoFontDescription * 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 |
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 FALSE |
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
terminal : |
a VteTerminal |
Returns : | TRUE |
void vte_terminal_set_word_chars (VteTerminal *terminal,
constchar *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
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 |
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 |
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 FALSE |
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 |
clear_history : |
TRUE |
char * vte_terminal_get_text (VteTerminal *terminal,
gboolean (is_selectedVteTerminal *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
is_selected
returns TRUE
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_include_trailing_spaces
(VteTerminal *terminal,
gboolean (is_selectedVteTerminal *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
is_selected
returns TRUE
attributes
for each byte added to the returned string detailing
the character's position, colors, and other characteristics. This function
differs from vte_terminal_get_text in that trailing spaces at the end of
lines are included.
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 |
Since 0.11.11
char * vte_terminal_get_text_range (VteTerminal *terminal,
glong start_row,
glong start_col,
glong end_row,
glong end_col,
gboolean (is_selectedVteTerminal *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
is_selected
returns TRUE
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,
constchar *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
Deprecated : 0.16.15
|
int vte_terminal_match_add_gregex (VteTerminal *terminal,
GRegex *regex,
GRegexMatchFlags flags);
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.
terminal : |
a VteTerminal |
regex : |
a |
flags : |
the |
Returns : | an integer associated with this expression |
Since 0.16.15
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
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 |
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
.
terminal : |
a VteTerminal |
tag : |
the tag of the regex which should use the specified cursor |
cursor_type : |
a |
Since 0.11.9
void vte_terminal_match_set_cursor_name (VteTerminal *terminal,
int tag,
constchar *cursor_name);
Sets which cursor the terminal will use if the pointer is over the pattern
specified by tag
.
terminal : |
a VteTerminal |
tag : |
the tag of the regex which should use the specified cursor |
cursor_name : |
the name of the cursor |
Since 0.16.15
void vte_terminal_set_emulation (VteTerminal *terminal,
constchar *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 |
constchar * 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 |
constchar * 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,
constchar *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 |
constchar * 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. |
constchar * 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 gtk_window_set_geometry_hints()
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
|
constchar * 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
|
constchar * 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
|
"char-size-changed"
signalvoid user_function (VteTerminal *vteterminal,
guint arg1,
guint arg2,
gpointer user_data) : Run Last
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. |
"child-exited"
signalvoid user_function (VteTerminal *vteterminal,
gpointer user_data) : Run Last
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. |
"commit"
signalvoid user_function (VteTerminal *vteterminal,
gchar *arg1,
guint arg2,
gpointer user_data) : Run Last
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. |
"contents-changed"
signalvoid user_function (VteTerminal *vteterminal,
gpointer user_data) : Run Last
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. |
"copy-clipboard"
signalvoid user_function (VteTerminal *vteterminal,
gpointer user_data) : Run Last / Action
Emitted whenever vte_terminal_copy_clipboard()
is called.
vteterminal : |
the object which received the signal. |
user_data : |
user data set when the signal handler was connected. |
"cursor-moved"
signalvoid user_function (VteTerminal *vteterminal,
gpointer user_data) : Run Last
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. |
"decrease-font-size"
signalvoid user_function (VteTerminal *vteterminal,
gpointer user_data) : Run Last
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. |
"deiconify-window"
signalvoid user_function (VteTerminal *vteterminal,
gpointer user_data) : Run Last
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. |
"emulation-changed"
signalvoid user_function (VteTerminal *vteterminal,
gpointer user_data) : Run Last
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. |
"encoding-changed"
signalvoid user_function (VteTerminal *vteterminal,
gpointer user_data) : Run Last
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. |
"eof"
signalvoid user_function (VteTerminal *vteterminal,
gpointer user_data) : Run Last
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. |
"icon-title-changed"
signalvoid user_function (VteTerminal *vteterminal,
gpointer user_data) : Run Last
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. |
"iconify-window"
signalvoid user_function (VteTerminal *vteterminal,
gpointer user_data) : Run Last
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. |
"increase-font-size"
signalvoid user_function (VteTerminal *vteterminal,
gpointer user_data) : Run Last
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. |
"lower-window"
signalvoid user_function (VteTerminal *vteterminal,
gpointer user_data) : Run Last
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. |
"maximize-window"
signalvoid user_function (VteTerminal *vteterminal,
gpointer user_data) : Run Last
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. |
"move-window"
signalvoid user_function (VteTerminal *vteterminal,
guint arg1,
guint arg2,
gpointer user_data) : Run Last
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. |
"paste-clipboard"
signalvoid user_function (VteTerminal *vteterminal,
gpointer user_data) : Run Last / Action
Emitted whenever vte_terminal_paste_clipboard()
is called.
vteterminal : |
the object which received the signal. |
user_data : |
user data set when the signal handler was connected. |
"raise-window"
signalvoid user_function (VteTerminal *vteterminal,
gpointer user_data) : Run Last
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. |
"refresh-window"
signalvoid user_function (VteTerminal *vteterminal,
gpointer user_data) : Run Last
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. |
"resize-window"
signalvoid user_function (VteTerminal *vteterminal,
guint arg1,
guint arg2,
gpointer user_data) : Run Last
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. |
"restore-window"
signalvoid user_function (VteTerminal *vteterminal,
gpointer user_data) : Run Last
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. |
"selection-changed"
signalvoid user_function (VteTerminal *vteterminal,
gpointer user_data) : Run Last
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. |
"set-scroll-adjustments"
signalvoid user_function (VteTerminal *vteterminal,
GtkAdjustment *arg1,
GtkAdjustment *arg2,
gpointer user_data) : Run Last
vteterminal : |
the object which received the signal. |
arg1 : |
|
arg2 : |
|
user_data : |
user data set when the signal handler was connected. |
"status-line-changed"
signalvoid user_function (VteTerminal *vteterminal,
gpointer user_data) : Run Last
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. |
"text-deleted"
signalvoid user_function (VteTerminal *vteterminal,
gpointer user_data) : Run Last
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. |
"text-inserted"
signalvoid user_function (VteTerminal *vteterminal,
gpointer user_data) : Run Last
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. |
"text-modified"
signalvoid user_function (VteTerminal *vteterminal,
gpointer user_data) : Run Last
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. |
"text-scrolled"
signalvoid user_function (VteTerminal *vteterminal,
gint arg1,
gpointer user_data) : Run Last
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 : |
the number of lines scrolled. |
user_data : |
user data set when the signal handler was connected. |
"window-title-changed"
signalvoid user_function (VteTerminal *vteterminal,
gpointer user_data) : Run Last
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. |