1 /*
2 * Utility functions for reading and setting preferences
3 *
4 * Authors:
5 * bulia byak <bulia@dr.com>
6 *
7 * Copyright (C) 2003 authors
8 *
9 * Released under GNU GPL, read the file 'COPYING' for more information
10 */
12 #ifndef SEEN_PREFS_UTILS_H
13 #define SEEN_PREFS_UTILS_H
15 #include <glib/gtypes.h>
16 #include <glib/gslist.h>
18 bool pref_path_exists(gchar const *path);
19 unsigned int pref_path_number_of_children(gchar const *path);
20 gchar * create_pref(gchar const *father_path, gchar const *child);
21 bool get_pref_children(gchar const *father_path, GSList ** children);
22 gchar * get_pref_nth_child(gchar const *father_path, unsigned int n);
24 void prefs_set_int_attribute(gchar const *path, gchar const *attr, long long int value);
25 long long int prefs_get_int_attribute(gchar const *path, gchar const *attr, long long int def);
26 long long int prefs_get_int_attribute_limited(gchar const *path, gchar const *attr, long long int def, long long int min, long long int max);
28 void prefs_set_double_attribute(gchar const *path, gchar const *attr, double value);
29 double prefs_get_double_attribute(gchar const *path, gchar const *attr, double def);
30 double prefs_get_double_attribute_limited(gchar const *path, gchar const *attr, double def, double min, double max);
32 gchar const *prefs_get_string_attribute(gchar const *path, gchar const *attr);
33 void prefs_set_string_attribute(gchar const *path, gchar const *attr, gchar const *value);
35 void prefs_set_recent_file(const gchar * uri, const gchar * name);
36 const gchar ** prefs_get_recent_files(void);
38 #endif /* !SEEN_PREFS_UTILS_H */
40 /*
41 Local Variables:
42 mode:c++
43 c-file-style:"stroustrup"
44 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
45 indent-tabs-mode:nil
46 fill-column:99
47 End:
48 */
49 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :