Method

VteTerminalget_text

Declaration [src]

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

Description [src]

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

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

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

Parameters

is_selected VteSelectionFunc
 

A VteSelectionFunc callback.

user_data gpointer
 

User data to be passed to the callback.

attributes An array of VteCharAttributes
 

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

 The argument will be set by the function.
 The argument can be set to NULL.
 The instance takes ownership of the data, and is responsible for freeing it.

Return value

Returns: char*
 

A newly allocated text string, or NULL.

 The caller of the method takes ownership of the data, and is responsible for freeing it.
 The return value can be NULL.
 The string is a NUL terminated UTF-8 string.