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_schemes ()

get_search_path ()

prepend_search_path (path)

set_search_path (path)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Name

Short Description

changed

Emitted when the manager has changed.

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:

the default GtkSource.StyleSchemeManager instance.

Return type:

GtkSource.StyleSchemeManager

classmethod new()
Returns:

a new GtkSource.StyleSchemeManager.

Return type:

GtkSource.StyleSchemeManager

Note: if you don’t need more than one style manager, then GtkSource.StyleSchemeManager.get_default() is more convenient to use.

append_search_path(path)
Parameters:

path (str) – a directory or a filename.

Adds path at the end of the self's search path (i.e., at the lowest priority). See GtkSource.StyleSchemeManager.set_search_path().

force_rescan()

Marks any currently cached information about the available style schemes 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:

the GtkSource.StyleScheme object corresponding to scheme_id, or None if not found.

Return type:

GtkSource.StyleScheme or None

get_schemes()
Returns:

a list of all the GtkSource.StyleScheme's that are part of self. The list is sorted alphabetically according to the scheme name.

Return type:

[GtkSource.StyleScheme]

New in version 300.0.

get_search_path()
Returns:

the search path of self.

Return type:

[str]

Gets the search path of self.

See also GtkSource.StyleSchemeManager.set_search_path().

prepend_search_path(path)
Parameters:

path (str) – a directory or a filename.

Adds path at the beginning of the self's search path (i.e., at the highest priority). See GtkSource.StyleSchemeManager.set_search_path().

set_search_path(path)
Parameters:

path ([str] or None) – a None-terminated array of strings, or None to reset the search path to its default value.

Sets the search path of self.

self will then try to load style schemes from the locations provided in the search path.

The search path can contain:

  • Paths to directories;

  • Paths to individual files.

To load the style schemes from the filesystem, GtkSource.StyleSchemeManager first looks at the first path, then the second path, etc. If there are duplicates (same GtkSource.StyleScheme ID), the first encountered one has the priority.

So the list of paths must be set in priority order, from highest to lowest.

Signal Details

GtkSource.StyleSchemeManager.signals.changed(style_scheme_manager)
Signal Name:

changed

Flags:

RUN_FIRST

Parameters:

style_scheme_manager (GtkSource.StyleSchemeManager) – The object which received the signal

Emitted when the manager has changed.

New in version 300.0.