## Styles

Styles — Styling from a configuration file

## Functions

void | gnt_style_read_configure_file ()
const char * | gnt_style_get ()
char * | gnt_style_get_from_name ()
char ** | gnt_style_get_string_list ()
int | gnt_style_get_color ()
gboolean | gnt_style_parse_bool ()
gboolean | gnt_style_get_bool ()
void | gnt_styles_get_keyremaps ()
void | gnt_style_read_actions ()
gboolean | gnt_style_read_menu_accels ()
void | gnt_style_read_workspaces ()
void | gnt_init_styles ()
void | gnt_uninit_styles ()

## Types and Values

enum | GntStyle

## Description

## Functions

### gnt_style_read_configure_file ()

    void
    gnt_style_read_configure_file (const char *filename);

Read configuration from a file.

#### Parameters

filename | The filename to read configuration from. |

### gnt_style_get ()

    const char *
    gnt_style_get (GntStyle style);

Get the user-setting for a style.

#### Parameters

style | The style. |

#### Returns

The user-setting, or `NULL`.

### gnt_style_get_from_name ()

    char *
    gnt_style_get_from_name (const char *group,
                             const char *key);

Get the value of a preference in ~/.gntrc.

#### Parameters

group | The name of the group in the keyfile. If `NULL`, the prgname will be used first, if available. Otherwise, "general" will be used. |
key | The key |

#### Returns

The value of the setting as a string, or `NULL`

Since: 2.1.0

### gnt_style_get_string_list ()

    char **
    gnt_style_get_string_list (const char *group,
                               const char *key,
                               gsize *length);

Get the value of a preference in ~/.gntrc.

#### Parameters

group | The name of the group in the keyfile. If `NULL`, the prgname will be used first, if available. Otherwise, "general" will be used. |
key | The key |
length | Return location for the number of strings returned, or NULL |

#### Returns

`NULL` terminated string array. The array should be freed with `g_strfreev()`.

[transfer full]

Since: 2.4.0

### gnt_style_get_color ()

    int
    gnt_style_get_color (char *group,
                         char *key);

Get the value of a color pair in ~/.gntrc.

#### Parameters

group | The name of the group in the keyfile. If `NULL`, the prgname will be used first, if available. Otherwise, "general" will be used. |
key | The key |

#### Returns

The value of the color as an int, or 0 on error.

Since: 2.4.0

### gnt_style_parse_bool ()

    gboolean
    gnt_style_parse_bool (const char *value);

Parse a boolean preference. For example, if 'value' is "false" (ignoring case) or "0", the return value will be `FALSE`, otherwise `TRUE`.

#### Parameters

value | The value of the boolean setting as a string |

#### Returns

The boolean value

Since: 2.1.0

### gnt_style_get_bool ()

    gboolean
    gnt_style_get_bool (GntStyle style,
                        gboolean def);

Get the boolean value for a user-setting.

#### Parameters

style | The style. |
def | The default value (i.e, the value if the user didn't define any value) |

#### Returns

The value of the setting.

### gnt_styles_get_keyremaps ()

    void
    gnt_styles_get_keyremaps (GType type,
                              GHashTable *hash);

`gnt_styles_get_keyremaps` has been deprecated since version 2.14.0 and should not be used in newly-written code.

Internal function -- do not use.

### gnt_style_read_actions ()

    void
    gnt_style_read_actions (GType type,
                            GntBindableClass *klass);

Internal function -- do not use.

### gnt_style_read_menu_accels ()

    gboolean
    gnt_style_read_menu_accels (const char *name,
                                GHashTable *table);

Read menu-accels from ~/.gntrc

#### Parameters

name | The name of the window. |
table | The hastable to store the accel information. |

#### Returns

`TRUE` if some accels were read, `FALSE` otherwise.

### gnt_style_read_workspaces ()

    void
    gnt_style_read_workspaces (GntWM *wm);

`gnt_style_read_workspaces` has been deprecated since version 2.14.0 and should not be used in newly-written code.

Reads workspace information.

Internal function -- do not use.

### gnt_init_styles ()

    void
    gnt_init_styles (void);

Initialize style settings.

### gnt_uninit_styles ()

    void
    gnt_uninit_styles (void);

Uninitialize style settings.

## Types and Values

### enum GntStyle

#### Members

GNT_STYLE_SHADOW |  |
GNT_STYLE_COLOR |  |
GNT_STYLE_MOUSE |  |
GNT_STYLE_WM |  |
GNT_STYLE_REMPOS |  |
GNT_STYLES |  |