GtkSourceStyleSchemeManager: libgedit-gtksourceview 300 Reference Manual

## GtkSourceStyleSchemeManager GtkSourceStyleSchemeManager — Provides access to GtkSourceStyleScheme's |

## Functions

GtkSourceStyleSchemeManager * | gtk_source_style_scheme_manager_new ()
GtkSourceStyleSchemeManager * | gtk_source_style_scheme_manager_get_default ()
void | gtk_source_style_scheme_manager_set_search_path ()
void | gtk_source_style_scheme_manager_append_search_path ()
void | gtk_source_style_scheme_manager_prepend_search_path ()
const gchar * const * | gtk_source_style_scheme_manager_get_search_path ()
GList * | gtk_source_style_scheme_manager_get_schemes ()
GtkSourceStyleScheme * | gtk_source_style_scheme_manager_get_scheme ()
void | gtk_source_style_scheme_manager_force_rescan ()

## Signals

void | changed | Run First

## Types and Values

struct | GtkSourceStyleSchemeManager

## Object Hierarchy

        GObject
        ╰── GtkSourceStyleSchemeManager

## Includes

    #include <gtksourceview/gtksource.h>

## Description

Object which provides access to GtkSourceStyleScheme's.

## Functions

### gtk_source_style_scheme_manager_new ()

    GtkSourceStyleSchemeManager *
    gtk_source_style_scheme_manager_new (void);

Note: if you don't need more than one style manager, then `gtk_source_style_scheme_manager_get_default()` is more convenient to use.

#### Returns

a new GtkSourceStyleSchemeManager.

### gtk_source_style_scheme_manager_get_default ()

    GtkSourceStyleSchemeManager *
    gtk_source_style_scheme_manager_get_default
                                   (void);

#### Returns

the default GtkSourceStyleSchemeManager instance.

[transfer none]

### gtk_source_style_scheme_manager_set_search_path ()

    void
    gtk_source_style_scheme_manager_set_search_path
                                   (GtkSourceStyleSchemeManager *manager,
                                    gchar **path);

Sets the search path of `manager` .

`manager` 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, GtkSourceStyleSchemeManager first looks at the first path, then the second path, etc. If there are duplicates (same GtkSourceStyleScheme ID), the first encountered one has the priority.

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

#### Parameters

manager | a GtkSourceStyleSchemeManager. |
path | a `NULL`-terminated array of strings, or `NULL` to reset the search path to its default value. | [array zero-terminated=1][nullable]

### gtk_source_style_scheme_manager_append_search_path ()

    void
    gtk_source_style_scheme_manager_append_search_path
                                   (GtkSourceStyleSchemeManager *manager,
                                    const gchar *path);

Adds `path` at the end of the `manager` 's search path (i.e., at the lowest priority). See `gtk_source_style_scheme_manager_set_search_path()`.

#### Parameters

manager | a GtkSourceStyleSchemeManager. |
path | a directory or a filename. |

### gtk_source_style_scheme_manager_prepend_search_path ()

    void
    gtk_source_style_scheme_manager_prepend_search_path
                                   (GtkSourceStyleSchemeManager *manager,
                                    const gchar *path);

Adds `path` at the beginning of the `manager` 's search path (i.e., at the highest priority). See `gtk_source_style_scheme_manager_set_search_path()`.

#### Parameters

manager | a GtkSourceStyleSchemeManager. |
path | a directory or a filename. |

### gtk_source_style_scheme_manager_get_search_path ()

    const gchar * const *
    gtk_source_style_scheme_manager_get_search_path
                                   (GtkSourceStyleSchemeManager *manager);

Gets the search path of `manager` .

See also `gtk_source_style_scheme_manager_set_search_path()`.

#### Parameters

manager | a GtkSourceStyleSchemeManager. |

#### Returns

the search path of `manager` .

[array zero-terminated=1][transfer none]

### gtk_source_style_scheme_manager_get_schemes ()

    GList *
    gtk_source_style_scheme_manager_get_schemes
                                   (GtkSourceStyleSchemeManager *manager);

#### Parameters

manager | a GtkSourceStyleSchemeManager. |

#### Returns

a list of all the GtkSourceStyleScheme's that are part of `manager` . The list is sorted alphabetically according to the scheme name.

[transfer container][element-type GtkSourceStyleScheme]

Since: 300.0

### gtk_source_style_scheme_manager_get_scheme ()

    GtkSourceStyleScheme *
    gtk_source_style_scheme_manager_get_scheme
                                   (GtkSourceStyleSchemeManager *manager,
                                    const gchar *scheme_id);

#### Parameters

manager | a GtkSourceStyleSchemeManager. |
scheme_id | style scheme ID to find. |

#### Returns

the GtkSourceStyleScheme object corresponding to `scheme_id` , or `NULL` if not found.

[transfer none][nullable]

### gtk_source_style_scheme_manager_force_rescan ()

    void
    gtk_source_style_scheme_manager_force_rescan
                                   (GtkSourceStyleSchemeManager *manager);

Marks any currently cached information about the available style schemes as invalid. All the available style schemes will be reloaded next time the `manager` is accessed.

#### Parameters

manager | a GtkSourceStyleSchemeManager. |

## Types and Values

### struct GtkSourceStyleSchemeManager

    struct GtkSourceStyleSchemeManager;

## Signal Details

### The `“changed”` signal

    void
    user_function (GtkSourceStyleSchemeManager *manager,
                   gpointer                     user_data)

Emitted when the `manager` has changed.

#### Parameters

manager | the GtkSourceStyleSchemeManager emitting the signal. |
user_data | user data set when the signal handler was connected. |

Flags: Run First

Since: 300.0