Functions#

get_encoding_supported(encoding: str) bool#

Queries whether the legacy encoding encoding is supported.

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

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

Added in version 0.60.

Deprecated since version 0.60: Please do not use it in newly written code

Parameters:

encoding – the name of the legacy encoding

Returns:

True iff the legacy encoding encoding is supported

get_encodings(include_aliases: bool) list[str]#

Gets the list of supported legacy encodings.

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

Added in version 0.60.

Deprecated since version 0.60: Please do not use it in newly written code

Parameters:

include_aliases – whether to include alias names

Returns:

the list of supported encodings; free with strfreev()

get_feature_flags() FeatureFlags#

Gets features VTE was compiled with.

Added in version 0.62.

Returns:

flags from FeatureFlags

get_features() str#

Gets a list of features vte was compiled with.

Added in version 0.40.

Returns:

a string with features

get_major_version() int#

Returns the major version of the VTE library at runtime. Contrast this with MAJOR_VERSION which represents the version of the VTE library that the code was compiled with.

Added in version 0.40.

Returns:

the major version

get_micro_version() int#

Returns the micro version of the VTE library at runtime. Contrast this with MICRO_VERSION which represents the version of the VTE library that the code was compiled with.

Added in version 0.40.

Returns:

the micro version

get_minor_version() int#

Returns the minor version of the VTE library at runtime. Contrast this with MINOR_VERSION which represents the version of the VTE library that the code was compiled with.

Added in version 0.40.

Returns:

the minor version

get_termprops() list[str] | None#

Gets the names of the installed termprops in an unspecified order.

Added in version 0.78.

Returns:

the names of the installed termprops, or None if there are no termprops

get_user_shell() str#

Gets the user’s shell, or None. In the latter case, the system default (usually “/bin/sh”) should be used.

Returns:

a newly allocated string with the user’s shell, or None

install_termprop(name: str, type: PropertyType, flags: PropertyFlags) int#

Installs a new terminal property that can be set by the application.

name must follow the rules for termprop names as laid out above; it must have at least 4 components, the first two of which must be “vte”, and “ext”. Use the TERMPROP_NAME_PREFIX macro which defines this name prefix.

You should use an identifier for your terminal as the first component after the prefix, as a namespace marker.

It is a programming error to call this function with a name that does not meet these requirements.

It is a programming error to call this function after any Terminal instances have been created.

It is a programming error to call this function if the named termprop is already installed with a different type or flags.

Added in version 0.78.

Parameters:
Returns:

an ID for the termprop

install_termprop_alias(name: str, target_name: str) int#

Installs a new terminal property name as an alias for the terminal property target_name.

Added in version 0.78.

Parameters:
  • name – a namespaced property name

  • target_name – the target property name

Returns:

the ID for the termprop target_name

pty_error_quark() int#
query_termprop(name: str) Tuple[bool, str, int, PropertyType, PropertyFlags]#

Gets the property type of the termprop. For properties installed by install_termprop(), the name starts with “vte.ext.”.

For an alias termprop (see install_termprop_alias()), resolved_name will be name of the alias’ target termprop; otherwise it will be name.

Added in version 0.78.

Parameters:

name – a termprop name

Returns:

True iff the termprop exists, and then prop, type and flags will be filled in

query_termprop_by_id(prop: int) Tuple[bool, str, PropertyType, PropertyFlags]#

Like query_termprop() except that it takes the termprop by ID. See that function for more information.

For an alias termprop (see install_termprop_alias()), resolved_name will be name of the alias’ target termprop; otherwise it will be name.

Added in version 0.78.

Parameters:

prop – a termprop ID

Returns:

True iff the termprop exists, and then name, type and flags will be filled in

regex_error_quark() int#
uuid_validate_string(str: str, len: int, fmt: UuidFormat) bool#
Parameters:
  • str

  • len

  • fmt