#include "types.h"
#include "macros.h"
Go to the source code of this file.
|
bool | girara_setting_add (girara_session_t *session, const char *name, const void *value, girara_setting_type_t type, bool init_only, const char *description, girara_setting_callback_t callback, void *data) GIRARA_VISIBLE |
|
bool | girara_setting_set (girara_session_t *session, const char *name, const void *value) GIRARA_VISIBLE |
|
bool | girara_setting_get (girara_session_t *session, const char *name, void *dest) GIRARA_VISIBLE |
|
girara_setting_t * | girara_setting_find (girara_session_t *session, const char *name) GIRARA_VISIBLE |
|
const char * | girara_setting_get_name (const girara_setting_t *setting) GIRARA_VISIBLE |
|
bool | girara_setting_get_value (girara_setting_t *setting, void *dest) GIRARA_VISIBLE |
|
girara_setting_type_t | girara_setting_get_type (girara_setting_t *setting) GIRARA_VISIBLE |
|
void | girara_setting_set_value (girara_session_t *session, girara_setting_t *setting, const void *value) GIRARA_VISIBLE |
|
◆ girara_setting_add()
Adds an additional entry in the settings list
- Parameters
-
session | The used girara session |
name | The name of the setting |
value | The value of the setting |
type | The type of the setting |
init_only | Will only available on initialization |
description | Description of the setting |
callback | Function that is called when the setting changes |
data | Arbitrary data that can be used by callbacks |
- Returns
- TRUE No error occurred
-
FALSE An error occurred
◆ girara_setting_find()
girara_setting_t * girara_setting_find |
( |
girara_session_t * |
session, |
|
|
const char * |
name |
|
) |
| |
Find a setting.
- Parameters
-
session | The girara session |
name | name of the setting |
- Returns
- the setting or NULL if it doesn't exist
◆ girara_setting_get()
bool girara_setting_get |
( |
girara_session_t * |
session, |
|
|
const char * |
name, |
|
|
void * |
dest |
|
) |
| |
Retrieve the value of a setting. If the setting is a string, the value stored in dest has to be deallocated with g_free.
- Parameters
-
session | The used girara session |
name | The name of the setting |
dest | A pointer to the destination of the result. |
- Returns
- true if the setting exists, false otherwise.
◆ girara_setting_get_name()
Get the setting's name.
- Parameters
-
- Returns
- the setting's name
◆ girara_setting_get_type()
Get the setting's value.
- Parameters
-
- Returns
- the value
◆ girara_setting_get_value()
Get the setting's value. If the setting is a string, the value stored in dest has to be deallocated with g_free.
- Parameters
-
setting | The setting |
dest | A pointer to the destination of the result. |
- Returns
- true if the setting exists, false otherwise.
◆ girara_setting_set()
bool girara_setting_set |
( |
girara_session_t * |
session, |
|
|
const char * |
name, |
|
|
const void * |
value |
|
) |
| |
Sets the value of a setting
- Parameters
-
session | The used girara session |
name | The name of the setting |
value | The new value of the setting |
- Returns
- TRUE No error occurred
-
FALSE An error occurred
◆ girara_setting_set_value()
void girara_setting_set_value |
( |
girara_session_t * |
session, |
|
|
girara_setting_t * |
setting, |
|
|
const void * |
value |
|
) |
| |
Set the setting's value. If session is NULL, the setting's callback won't be called.
- Parameters
-
session | The girara session |
setting | The setting |
value | The new value |