GtkSource.StyleSchemeManager

g GObject.Object GObject.Object GtkSource.StyleSchemeManager GtkSource.StyleSchemeManager GObject.Object->GtkSource.StyleSchemeManager

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

get_default ()

class

new ()

append_search_path (path)

force_rescan ()

get_scheme (scheme_id)

get_scheme_ids ()

get_search_path ()

prepend_search_path (path)

set_search_path (path)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

scheme-ids

[str]

r

List of the ids of the available style schemes

search-path

[str]

r/w

List of directories and files where the style schemes are located

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

Class Details

class GtkSource.StyleSchemeManager(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

GtkSource.StyleSchemeManagerClass

classmethod get_default()
Returns:

a GtkSource.StyleSchemeManager. Return value is owned by GtkSource.View library and must not be unref’ed.

Return type:

GtkSource.StyleSchemeManager

Returns the default GtkSource.StyleSchemeManager instance.

classmethod new()
Returns:

a new GtkSource.StyleSchemeManager.

Return type:

GtkSource.StyleSchemeManager

Creates a new style manager. If you do not need more than one style manager then use GtkSource.StyleSchemeManager.get_default() instead.

append_search_path(path)
Parameters:

path (str) – a directory or a filename.

Appends path to the list of directories where the self looks for style scheme files. See GtkSource.StyleSchemeManager.set_search_path() for details.

force_rescan()

Mark any currently cached information about the available style scehems as invalid. All the available style schemes will be reloaded next time the self is accessed.

get_scheme(scheme_id)
Parameters:

scheme_id (str) – style scheme id to find.

Returns:

a GtkSource.StyleScheme object. Returned value is owned by self and must not be unref’ed.

Return type:

GtkSource.StyleScheme

Looks up style scheme by id.

get_scheme_ids()
Returns:

a None-terminated array of strings containing the ids of the available style schemes or None if no style scheme is available. The array is sorted alphabetically according to the scheme name. The array is owned by the self and must not be modified.

Return type:

[str] or None

Returns the ids of the available style schemes.

get_search_path()
Returns:

a None-terminated array of string containing the search path. The array is owned by the self and must not be modified.

Return type:

[str]

Returns the current search path for the self. See GtkSource.StyleSchemeManager.set_search_path() for details.

prepend_search_path(path)
Parameters:

path (str) – a directory or a filename.

Prepends path to the list of directories where the self looks for style scheme files. See GtkSource.StyleSchemeManager.set_search_path() for details.

set_search_path(path)
Parameters:

path ([str] or None) – a None-terminated array of strings or None.

Sets the list of directories where the self looks for style scheme files. If path is None, the search path is reset to default.

Property Details

GtkSource.StyleSchemeManager.props.scheme_ids
Name:

scheme-ids

Type:

[str]

Default Value:

[]

Flags:

READABLE

List of the ids of the available style schemes

GtkSource.StyleSchemeManager.props.search_path
Name:

search-path

Type:

[str]

Default Value:

[]

Flags:

READABLE, WRITABLE

List of directories and files where the style schemes are located