2015-12-21 10:09:05 -05:00
|
|
|
/*
|
|
|
|
* Copyright 2015 (c) Anna Schumaker.
|
2015-12-21 10:35:32 -05:00
|
|
|
*
|
|
|
|
* The settings layer is used to store values configured by the user.
|
2015-12-21 10:09:05 -05:00
|
|
|
*/
|
2016-03-29 08:39:00 -04:00
|
|
|
#ifndef OCARINA_SETTINGS_H
|
|
|
|
#define OCARINA_SETTINGS_H
|
2015-12-21 10:09:05 -05:00
|
|
|
#include <glib.h>
|
2015-12-26 20:51:05 -05:00
|
|
|
#include <stdbool.h>
|
2015-12-21 10:09:05 -05:00
|
|
|
|
|
|
|
|
|
|
|
/* Called to initialize GUI settings. */
|
2016-03-29 08:39:00 -04:00
|
|
|
void settings_init();
|
2015-12-21 10:09:05 -05:00
|
|
|
|
|
|
|
/* Called to deinitialize GUI settings. */
|
2016-03-29 08:39:00 -04:00
|
|
|
void settings_deinit();
|
2015-12-21 10:09:05 -05:00
|
|
|
|
2015-12-21 10:35:32 -05:00
|
|
|
/* Called to configure a specific setting by key. */
|
2016-03-29 08:39:00 -04:00
|
|
|
void settings_set(const gchar *, unsigned int);
|
2015-12-21 10:35:32 -05:00
|
|
|
|
|
|
|
/* Called to access a specific setting by key. */
|
2016-03-29 08:39:00 -04:00
|
|
|
unsigned int settings_get(const gchar *);
|
2015-12-21 10:35:32 -05:00
|
|
|
|
2015-12-26 18:36:26 -05:00
|
|
|
/* Called to check if a specific settings exists. */
|
2016-03-29 08:39:00 -04:00
|
|
|
bool settings_has(const gchar *);
|
2015-12-26 18:36:26 -05:00
|
|
|
|
2015-12-21 10:09:05 -05:00
|
|
|
|
|
|
|
#ifdef CONFIG_TESTING
|
2016-03-29 08:39:00 -04:00
|
|
|
GHashTable *test_get_settings();
|
2015-12-21 10:09:05 -05:00
|
|
|
#endif /* CONFIG_TESTING */
|
2016-03-29 08:39:00 -04:00
|
|
|
#endif /* OCARINA_SETTINGS_H */
|