GnuCash
5.6-150-g038405b370+
|
Generic api to store and retrieve preferences. More...
#include <glib.h>
Go to the source code of this file.
Functions | |
gboolean | gnc_prefs_is_set_up (void) |
Test if preferences backend is set up. | |
void | gnc_prefs_block_all (void) |
Block all preference callbacks. | |
void | gnc_prefs_unblock_all (void) |
Unblock all preferences callbacks. | |
Early bird functions, needed before any backend has been set up | |
const gchar * | gnc_prefs_get_namespace_regexp (void) |
void | gnc_prefs_set_namespace_regexp (const gchar *str) |
gboolean | gnc_prefs_is_debugging_enabled (void) |
void | gnc_prefs_set_debugging (gboolean d) |
gboolean | gnc_prefs_is_extra_enabled (void) |
void | gnc_prefs_set_extra (gboolean enabled) |
gboolean | gnc_prefs_get_file_save_compressed (void) |
void | gnc_prefs_set_file_save_compressed (gboolean compressed) |
gint | gnc_prefs_get_file_retention_policy (void) |
void | gnc_prefs_set_file_retention_policy (gint policy) |
gint | gnc_prefs_get_file_retention_days (void) |
void | gnc_prefs_set_file_retention_days (gint days) |
guint | gnc_prefs_get_long_version (void) |
Listening for changes | |
gulong | gnc_prefs_register_cb (const char *group, const gchar *pref_name, gpointer func, gpointer user_data) |
Register a callback that gets triggered when the given preference changes. More... | |
void | gnc_prefs_remove_cb_by_func (const gchar *group, const gchar *pref_name, gpointer func, gpointer user_data) |
Remove a function that was registered for a callback when the given preference changed. More... | |
void | gnc_prefs_remove_cb_by_id (const gchar *group, guint id) |
Remove a function that was registered for a callback when a specific preference in the settings group changed. More... | |
guint | gnc_prefs_register_group_cb (const gchar *group, gpointer func, gpointer user_data) |
Register a callback for when any preference in the settings group is changed. More... | |
void | gnc_prefs_remove_group_cb_by_func (const gchar *group, gpointer func, gpointer user_data) |
Remove a function that was registered for a callback when any preference in the given settings group changed. More... | |
void | gnc_prefs_bind (const gchar *group, const gchar *pref_name, gpointer object, const gchar *property) |
Bind a setting to a g_object property. More... | |
Preference Getters | |
gboolean | gnc_prefs_get_bool (const gchar *group, const gchar *pref_name) |
Get a boolean value from the preferences backend. More... | |
gint | gnc_prefs_get_int (const gchar *group, const gchar *pref_name) |
Get an integer value from the preferences backend. More... | |
gint64 | gnc_prefs_get_int64 (const gchar *group, const gchar *pref_name) |
Get an 64 bit integer value from the preferences backend. More... | |
gdouble | gnc_prefs_get_float (const gchar *group, const gchar *pref_name) |
Get an float value from the preferences backend. More... | |
gchar * | gnc_prefs_get_string (const gchar *group, const gchar *pref_name) |
Get a string value from the preferences backend. More... | |
gint | gnc_prefs_get_enum (const gchar *group, const gchar *pref_name) |
Get an enum value from the preferences backend. More... | |
void | gnc_prefs_get_coords (const gchar *group, const gchar *pref_name, gdouble *x, gdouble *y) |
Get a pair of coordinates from the preferences backend. More... | |
GVariant * | gnc_prefs_get_value (const gchar *group, const gchar *pref_name) |
Get an arbitrary combination of values from the preferences backend. More... | |
Preference Setters and Unset Functions | |
gboolean | gnc_prefs_set_bool (const gchar *group, const gchar *pref_name, gboolean value) |
Store a boolean value into the preferences backend. More... | |
gboolean | gnc_prefs_set_int (const gchar *group, const gchar *pref_name, gint value) |
Store an integer value into the preferences backend. More... | |
gboolean | gnc_prefs_set_int64 (const gchar *group, const gchar *pref_name, gint64 value) |
Store a 64 bit integer value into the preferences backend. More... | |
gboolean | gnc_prefs_set_float (const gchar *group, const gchar *pref_name, gdouble value) |
Store a float value into the preferences backend. More... | |
gboolean | gnc_prefs_set_string (const gchar *group, const gchar *pref_name, const gchar *value) |
Store a string into the preferences backend. More... | |
gboolean | gnc_prefs_set_enum (const gchar *group, const gchar *pref_name, gint value) |
Store an enum value into the preferences backend. More... | |
gboolean | gnc_prefs_set_coords (const gchar *group, const gchar *pref_name, gdouble x, gdouble y) |
Store coordinates into the preferences backend. More... | |
gboolean | gnc_prefs_set_value (const gchar *group, const gchar *pref_name, GVariant *value) |
Store an arbitrary combination of values into the preferences backend. More... | |
void | gnc_prefs_reset (const gchar *group, const gchar *pref_name) |
Reset a preference to its default value in the preferences backend. More... | |
void | gnc_prefs_reset_group (const gchar *group) |
Reset all preferences in a group to their default values in the preferences backend. More... | |
gulong | gnc_prefs_get_reg_auto_raise_lists_id (void) |
Get and Set registered preference id for register auto_raise_lists. | |
void | gnc_prefs_set_reg_auto_raise_lists_id (gulong id) |
gulong | gnc_prefs_get_reg_negative_color_pref_id (void) |
Get and Set registered preference id for register negative_color_pref. | |
void | gnc_prefs_set_reg_negative_color_pref_id (gulong id) |
Generic api to store and retrieve preferences.
Definition in file gnc-prefs.h.