Module: Vte

Extended by:
GLib::Deprecatable
Defined in:
lib/vte3/pty.rb,
lib/vte3.rb,
lib/vte3/regex.rb,
lib/vte3/loader.rb,
lib/vte3/version.rb,
lib/vte3/terminal.rb,
lib/vte3/deprecated.rb

Overview

Copyright (C) 2014-2015 Ruby-GNOME2 Project Team

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

Defined Under Namespace

Modules: Align, CursorBlinkMode, CursorShape, EraseBinding, FeatureFlags, Format, PtyError, PtyFlags, RegexError, TextBlinkMode, Version, WriteFlags Classes: Error, Loader, Pty, Regex, Terminal

Constant Summary collapse

MAJOR_VERSION =

The major version number of the VTE library (e.g. in version 3.1.4 this is 3).

0
MICRO_VERSION =

The micro version number of the VTE library (e.g. in version 3.1.4 this is 4).

0
MINOR_VERSION =

The minor version number of the VTE library (e.g. in version 3.1.4 this is 1).

76
REGEX_FLAGS_DEFAULT =
1075314688
SPAWN_NO_PARENT_ENVV =

Use this as a spawn flag (together with flags from GSpawn::Flags) in vte_pty_spawn_async().

Normally, the spawned process inherits the environment from the parent process; when this flag is used, only the environment variables passed to vte_pty_spawn_async() etc. are passed to the child process.

33554432
SPAWN_NO_SYSTEMD_SCOPE =

Use this as a spawn flag (together with flags from GSpawn::Flags) in vte_pty_spawn_async().

Prevents vte_pty_spawn_async() etc. from moving the newly created child process to a systemd user scope.

67108864
SPAWN_REQUIRE_SYSTEMD_SCOPE =

Use this as a spawn flag (together with flags from GSpawn::Flags) in vte_pty_spawn_async().

Requires vte_pty_spawn_async() etc. to move the newly created child process to a systemd user scope; if that fails, the whole spawn fails.

This is supported on Linux only.

134217728
TEST_FLAGS_ALL =
18446744073709551615
TEST_FLAGS_NONE =
0
LOG_DOMAIN =
"Vte"

Instance Method Summary collapse

Instance Method Details

#event_context_get_typeGLib::Type

Returns:

  • (GLib::Type)

#feature_flagsVte::FeatureFlags

Gets features VTE was compiled with.

Returns:

#featuresString

Gets a list of features vte was compiled with.

Returns:

  • (String)

    a string with features

#get_encoding_supported(encoding) ⇒ Boolean

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 nil to vte_terminal_set_encoding().

Parameters:

  • encoding (String)

    the name of the legacy encoding

Returns:

  • (Boolean)

    true iff the legacy encoding encoding is supported

#get_encodings(include_aliases) ⇒ Array<String>

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 nil to vte_terminal_set_encoding().

Parameters:

  • include_aliases (Boolean)

    whether to include alias names

Returns:

  • (Array<String>)

    the list of supported encodings; free with g_strfreev()

#major_versionInteger

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

Returns:

  • (Integer)

    the major version

#micro_versionInteger

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

Returns:

  • (Integer)

    the micro version

#minor_versionInteger

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

Returns:

  • (Integer)

    the minor version

#pty_error_quarkGLib::Quark

Error domain for VTE PTY errors. Errors in this domain will be from the Vte::PtyError enumeration. See #GError for more information on error domains.

Returns:

  • (GLib::Quark)

    the error domain for VTE PTY errors

#regex_error_quarkGLib::Quark

Returns:

  • (GLib::Quark)

#test_flags=(flags) ⇒ nil

Sets test flags. This function is only useful for implementing unit tests for vte itself; it is a no-op in non-debug builds.

Parameters:

  • flags (Integer)

    flags

Returns:

  • (nil)

#user_shellVte::filename

Gets the user's shell, or nil. In the latter case, the system default (usually "/bin/sh") should be used.

Returns:

  • (Vte::filename)

    a newly allocated string with the user's shell, or nil