go-conf: GOffice Reference Manual

## go-conf go-conf |

## Functions

void | (*GOConfMonitorFunc) ()
guint | go_conf_add_monitor ()
void | go_conf_free_node ()
gboolean | go_conf_get_bool ()
gdouble | go_conf_get_double ()
gchar * | go_conf_get_enum_as_str ()
gint | go_conf_get_int ()
GOConfNode * | go_conf_get_node ()
GSList * | go_conf_get_str_list ()
gchar * | go_conf_get_string ()
gboolean | go_conf_load_bool ()
gdouble | go_conf_load_double ()
int | go_conf_load_enum ()
gint | go_conf_load_int ()
GSList * | go_conf_load_str_list ()
gchar * | go_conf_load_string ()
void | go_conf_remove_monitor ()
void | go_conf_set_bool ()
void | go_conf_set_double ()
void | go_conf_set_enum ()
void | go_conf_set_int ()
void | go_conf_set_str_list ()
void | go_conf_set_string ()
void | go_conf_sync ()

## Types and Values

| GOConfNode

## Object Hierarchy

        GBoxed
        ╰── GOConfNode

## Description

## Functions

### GOConfMonitorFunc ()

    void
    (*GOConfMonitorFunc) (GOConfNode *node,
                          gchar const *key,
                          gpointer data);

### go_conf_add_monitor ()

    guint
    go_conf_add_monitor (GOConfNode *node,
                         gchar const *key,
                         GOConfMonitorFunc monitor,
                         gpointer data);

`monitor` will be called whenever the value associated with `key` changes.

#### Parameters

node | GOConfNode |
key | configuration key |
monitor | GOMonitorFunc. | [scope async]
data | user data |

#### Returns

the signal ID.

### go_conf_free_node ()

    void
    go_conf_free_node (GOConfNode *node);

### go_conf_get_bool ()

    gboolean
    go_conf_get_bool (GOConfNode *node,
                      gchar const *key);

### go_conf_get_double ()

    gdouble
    go_conf_get_double (GOConfNode *node,
                        gchar const *key);

### go_conf_get_enum_as_str ()

    gchar *
    go_conf_get_enum_as_str (GOConfNode *node,
                             gchar const *key);

### go_conf_get_int ()

    gint
    go_conf_get_int (GOConfNode *node,
                     gchar const *key);

### go_conf_get_node ()

    GOConfNode *
    go_conf_get_node (GOConfNode *parent,
                      gchar const *key);

#### Parameters

parent | parent node or `NULL` |
key | configuration key |

#### Returns

the GOConfNode associated with `key` .

[transfer full]

### go_conf_get_str_list ()

    GSList *
    go_conf_get_str_list (GOConfNode *node,
                          gchar const *key);

#### Parameters

node | GOConfNode |
key | configuration key |

#### Returns

a list of strings asociated with `key` .

[element-type utf8][transfer full]

### go_conf_get_string ()

    gchar *
    go_conf_get_string (GOConfNode *node,
                        gchar const *key);

#### Parameters

node | GOConfNode |
key | non-`NULL` string. |

#### Returns

the string value of `node` 's `key` child as a string which the called needs to free

### go_conf_load_bool ()

    gboolean
    go_conf_load_bool (GOConfNode *node,
                       gchar const *key,
                       gboolean default_val);

### go_conf_load_double ()

    gdouble
    go_conf_load_double (GOConfNode *node,
                         gchar const *key,
                         gdouble minima,
                         gdouble maxima,
                         gdouble default_val);

### go_conf_load_enum ()

    int
    go_conf_load_enum (GOConfNode *node,
                       gchar const *key,
                       GType t,
                       int default_val);

### go_conf_load_int ()

    gint
    go_conf_load_int (GOConfNode *node,
                      gchar const *key,
                      gint minima,
                      gint maxima,
                      gint default_val);

### go_conf_load_str_list ()

    GSList *
    go_conf_load_str_list (GOConfNode *node,
                           gchar const *key);

#### Parameters

node | GOConfNode |
key | configuration key |

#### Returns

a list of strings asociated with `key` .

[element-type utf8][transfer full]

### go_conf_load_string ()

    gchar *
    go_conf_load_string (GOConfNode *node,
                         gchar const *key);

### go_conf_remove_monitor ()

    void
    go_conf_remove_monitor (guint monitor_id);

### go_conf_set_bool ()

    void
    go_conf_set_bool (GOConfNode *node,
                      gchar const *key,
                      gboolean val);

### go_conf_set_double ()

    void
    go_conf_set_double (GOConfNode *node,
                        gchar const *key,
                        gdouble val);

### go_conf_set_enum ()

    void
    go_conf_set_enum (GOConfNode *node,
                      gchar const *key,
                      GType t,
                      gint val);

### go_conf_set_int ()

    void
    go_conf_set_int (GOConfNode *node,
                     gchar const *key,
                     gint val);

### go_conf_set_str_list ()

    void
    go_conf_set_str_list (GOConfNode *node,
                          gchar const *key,
                          GSList *list);

Sets `list` as the value for `key` .

#### Parameters

node | GOConfNode |
key | configuration key |
list | the list of strings to set. | [element-type utf8]

### go_conf_set_string ()

    void
    go_conf_set_string (GOConfNode *node,
                        gchar const *key,
                        gchar const *str);

### go_conf_sync ()

    void
    go_conf_sync (GOConfNode *node);

## Types and Values

### GOConfNode

    typedef struct _GOConfNode GOConfNode;