GtkSourceStyleSchemeManager: GtkSourceView 3 Reference Manual

## GtkSourceStyleSchemeManager GtkSourceStyleSchemeManager — Provides access to GtkSourceStyleSchemes |

## 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 ()
const gchar * const * | gtk_source_style_scheme_manager_get_scheme_ids ()
GtkSourceStyleScheme * | gtk_source_style_scheme_manager_get_scheme ()
void | gtk_source_style_scheme_manager_force_rescan ()

## Properties

GStrv | scheme-ids | Read
GStrv | search-path | Read / Write

## Types and Values

| GtkSourceStyleSchemeManager

## Object Hierarchy

        GObject
        ╰── GtkSourceStyleSchemeManager

## Includes

    #include <gtksourceview/gtksource.h>

## Description

Object which provides access to GtkSourceStyleSchemes.

## Functions

### gtk_source_style_scheme_manager_new ()

    GtkSourceStyleSchemeManager *
    gtk_source_style_scheme_manager_new (void);

Creates a new style manager. If you do not need more than one style manager then use `gtk_source_style_scheme_manager_get_default()` instead.

#### 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.

#### Returns

a GtkSourceStyleSchemeManager. Return value is owned by GtkSourceView library and must not be unref'ed.

[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 list of directories where the `manager` looks for style scheme files. If `path` is `NULL`, the search path is reset to default.

#### Parameters

manager | a GtkSourceStyleSchemeManager. |
path | a `NULL`-terminated array of strings or `NULL`. | [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);

Appends `path` to the list of directories where the `manager` looks for style scheme files. See `gtk_source_style_scheme_manager_set_search_path()` for details.

#### 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);

Prepends `path` to the list of directories where the `manager` looks for style scheme files. See `gtk_source_style_scheme_manager_set_search_path()` for details.

#### 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);

Returns the current search path for the `manager` . See `gtk_source_style_scheme_manager_set_search_path()` for details.

#### Parameters

manager | a GtkSourceStyleSchemeManager. |

#### Returns

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

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

### gtk_source_style_scheme_manager_get_scheme_ids ()

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

Returns the ids of the available style schemes.

#### Parameters

manager | a GtkSourceStyleSchemeManager. |

#### Returns

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

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

### gtk_source_style_scheme_manager_get_scheme ()

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

Looks up style scheme by id.

#### Parameters

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

#### Returns

a GtkSourceStyleScheme object. Returned value is owned by `manager` and must not be unref'ed.

[transfer none]

### gtk_source_style_scheme_manager_force_rescan ()

    void
    gtk_source_style_scheme_manager_force_rescan
                                   (GtkSourceStyleSchemeManager *manager);

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

#### Parameters

manager | a GtkSourceStyleSchemeManager. |

## Types and Values

### GtkSourceStyleSchemeManager

    typedef struct _GtkSourceStyleSchemeManager GtkSourceStyleSchemeManager;

## Property Details

### The `“scheme-ids”` property

      “scheme-ids”               GStrv

List of the ids of the available style schemes.

Flags: Read

### The `“search-path”` property

      “search-path”              GStrv

List of directories and files where the style schemes are located.

Flags: Read / Write

## See Also

GtkSourceStyleScheme