annotate src/prefs.h @ 5866:d6b5cab288bb

[gaim-migrate @ 6297] Pounces are now imported and saved to disk. However, they are not yet loaded. I'll get to that tomorrow (later today? awwww!) committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Sat, 14 Jun 2003 11:55:15 +0000
parents b61520e71679
children 158196b2db19
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5441
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
1 /**
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
2 * @file prefs.h Prefs API
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
3 *
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
4 * gaim
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
5 *
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
6 * Copyright (C) 2003, Nathan Walp <faceprint@faceprint.com>
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
7 *
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
8 * This program is free software; you can redistribute it and/or modify
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
9 * it under the terms of the GNU General Public License as published by
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
10 * the Free Software Foundation; either version 2 of the License, or
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
11 * (at your option) any later version.
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
12 *
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
13 * This program is distributed in the hope that it will be useful,
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
16 * GNU General Public License for more details.
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
17 *
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
18 * You should have received a copy of the GNU General Public License
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
19 * along with this program; if not, write to the Free Software
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
21 *
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
22 */
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
23
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
24 #ifndef _PREFS_H_
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
25 #define _PREFS_H_
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
26
5638
0bdfa28c678e [gaim-migrate @ 6047]
Christian Hammond <chipx86@chipx86.com>
parents: 5561
diff changeset
27 #include <glib.h>
0bdfa28c678e [gaim-migrate @ 6047]
Christian Hammond <chipx86@chipx86.com>
parents: 5561
diff changeset
28
5441
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
29 /**
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
30 * Pref data types.
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
31 */
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
32 typedef enum _GaimPrefType
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
33 {
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
34 GAIM_PREF_NONE,
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
35 GAIM_PREF_BOOLEAN,
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
36 GAIM_PREF_INT,
5561
d67b5b4e1323 [gaim-migrate @ 5962]
Nathan Walp <nwalp@pidgin.im>
parents: 5545
diff changeset
37 GAIM_PREF_STRING,
d67b5b4e1323 [gaim-migrate @ 5962]
Nathan Walp <nwalp@pidgin.im>
parents: 5545
diff changeset
38 GAIM_PREF_STRING_LIST
5441
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
39 } GaimPrefType;
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
40
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
41 /**
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
42 * Pref change callback type
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
43 */
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
44
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
45 typedef void (*GaimPrefCallback) (const char *name, GaimPrefType type,
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
46 gpointer val, gpointer data);
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
47
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
48 /**************************************************************************/
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
49 /** @name Prefs API */
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
50 /**************************************************************************/
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
51 /*@{*/
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
52
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
53 /**
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
54 * Initialize core prefs
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
55 */
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
56 void gaim_prefs_init();
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
57
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
58 /**
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
59 * Add a new typeless pref.
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
60 *
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
61 * @param name The name of the pref
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
62 */
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
63 void gaim_prefs_add_none(const char *name);
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
64
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
65 /**
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
66 * Add a new boolean pref.
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
67 *
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
68 * @param name The name of the pref
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
69 * @param value The initial value to set
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
70 */
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
71 void gaim_prefs_add_bool(const char *name, gboolean value);
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
72
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
73 /**
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
74 * Add a new integer pref.
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
75 *
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
76 * @param name The name of the pref
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
77 * @param value The initial value to set
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
78 */
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
79 void gaim_prefs_add_int(const char *name, int value);
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
80
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
81 /**
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
82 * Add a new string pref.
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
83 *
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
84 * @param name The name of the pref
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
85 * @param value The initial value to set
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
86 */
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
87 void gaim_prefs_add_string(const char *name, const char *value);
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
88
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
89 /**
5561
d67b5b4e1323 [gaim-migrate @ 5962]
Nathan Walp <nwalp@pidgin.im>
parents: 5545
diff changeset
90 * Add a new string list pref.
d67b5b4e1323 [gaim-migrate @ 5962]
Nathan Walp <nwalp@pidgin.im>
parents: 5545
diff changeset
91 *
d67b5b4e1323 [gaim-migrate @ 5962]
Nathan Walp <nwalp@pidgin.im>
parents: 5545
diff changeset
92 * @param name The name of the pref
d67b5b4e1323 [gaim-migrate @ 5962]
Nathan Walp <nwalp@pidgin.im>
parents: 5545
diff changeset
93 * @param value The initial value to set
d67b5b4e1323 [gaim-migrate @ 5962]
Nathan Walp <nwalp@pidgin.im>
parents: 5545
diff changeset
94 */
d67b5b4e1323 [gaim-migrate @ 5962]
Nathan Walp <nwalp@pidgin.im>
parents: 5545
diff changeset
95 void gaim_prefs_add_string_list(const char *name, GList *value);
d67b5b4e1323 [gaim-migrate @ 5962]
Nathan Walp <nwalp@pidgin.im>
parents: 5545
diff changeset
96
d67b5b4e1323 [gaim-migrate @ 5962]
Nathan Walp <nwalp@pidgin.im>
parents: 5545
diff changeset
97 /**
5441
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
98 * Remove a pref.
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
99 *
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
100 * @param name The name of the pref
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
101 */
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
102 void gaim_prefs_remove(const char *name);
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
103
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
104 /**
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
105 * Remove all prefs.
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
106 */
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
107 void gaim_prefs_destroy();
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
108
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
109 /**
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
110 * Set raw pref value
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
111 *
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
112 * @param name The name of the pref
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
113 * @param value The value to set
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
114 */
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
115 void gaim_prefs_set_generic(const char *name, gpointer value);
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
116
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
117 /**
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
118 * Set boolean pref value
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
119 *
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
120 * @param name The name of the pref
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
121 * @param value The value to set
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
122 */
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
123 void gaim_prefs_set_bool(const char *name, gboolean value);
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
124
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
125 /**
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
126 * Set integer pref value
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
127 *
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
128 * @param name The name of the pref
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
129 * @param value The value to set
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
130 */
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
131 void gaim_prefs_set_int(const char *name, int value);
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
132
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
133 /**
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
134 * Set string pref value
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
135 *
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
136 * @param name The name of the pref
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
137 * @param value The value to set
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
138 */
5451
e1cc0c67e123 [gaim-migrate @ 5839]
Nathan Walp <nwalp@pidgin.im>
parents: 5441
diff changeset
139 void gaim_prefs_set_string(const char *name, const char *value);
5441
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
140
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
141 /**
5561
d67b5b4e1323 [gaim-migrate @ 5962]
Nathan Walp <nwalp@pidgin.im>
parents: 5545
diff changeset
142 * Set string pref value
d67b5b4e1323 [gaim-migrate @ 5962]
Nathan Walp <nwalp@pidgin.im>
parents: 5545
diff changeset
143 *
d67b5b4e1323 [gaim-migrate @ 5962]
Nathan Walp <nwalp@pidgin.im>
parents: 5545
diff changeset
144 * @param name The name of the pref
d67b5b4e1323 [gaim-migrate @ 5962]
Nathan Walp <nwalp@pidgin.im>
parents: 5545
diff changeset
145 * @param value The value to set
d67b5b4e1323 [gaim-migrate @ 5962]
Nathan Walp <nwalp@pidgin.im>
parents: 5545
diff changeset
146 */
d67b5b4e1323 [gaim-migrate @ 5962]
Nathan Walp <nwalp@pidgin.im>
parents: 5545
diff changeset
147 void gaim_prefs_set_string_list(const char *name, GList *value);
d67b5b4e1323 [gaim-migrate @ 5962]
Nathan Walp <nwalp@pidgin.im>
parents: 5545
diff changeset
148
d67b5b4e1323 [gaim-migrate @ 5962]
Nathan Walp <nwalp@pidgin.im>
parents: 5545
diff changeset
149 /**
5441
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
150 * Get boolean pref value
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
151 *
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
152 * @param name The name of the pref
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
153 * @return The value of the pref
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
154 */
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
155 gboolean gaim_prefs_get_bool(const char *name);
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
156
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
157 /**
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
158 * Get integer pref value
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
159 *
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
160 * @param name The name of the pref
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
161 * @return The value of the pref
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
162 */
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
163 int gaim_prefs_get_int(const char *name);
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
164
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
165 /**
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
166 * Get string pref value
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
167 *
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
168 * @param name The name of the pref
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
169 * @return The value of the pref
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
170 */
5545
7a64114641c3 [gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents: 5534
diff changeset
171 const char *gaim_prefs_get_string(const char *name);
5441
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
172
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
173 /**
5561
d67b5b4e1323 [gaim-migrate @ 5962]
Nathan Walp <nwalp@pidgin.im>
parents: 5545
diff changeset
174 * Get string pref value
d67b5b4e1323 [gaim-migrate @ 5962]
Nathan Walp <nwalp@pidgin.im>
parents: 5545
diff changeset
175 *
d67b5b4e1323 [gaim-migrate @ 5962]
Nathan Walp <nwalp@pidgin.im>
parents: 5545
diff changeset
176 * @param name The name of the pref
d67b5b4e1323 [gaim-migrate @ 5962]
Nathan Walp <nwalp@pidgin.im>
parents: 5545
diff changeset
177 * @return The value of the pref
d67b5b4e1323 [gaim-migrate @ 5962]
Nathan Walp <nwalp@pidgin.im>
parents: 5545
diff changeset
178 */
d67b5b4e1323 [gaim-migrate @ 5962]
Nathan Walp <nwalp@pidgin.im>
parents: 5545
diff changeset
179 GList *gaim_prefs_get_string_list(const char *name);
d67b5b4e1323 [gaim-migrate @ 5962]
Nathan Walp <nwalp@pidgin.im>
parents: 5545
diff changeset
180
d67b5b4e1323 [gaim-migrate @ 5962]
Nathan Walp <nwalp@pidgin.im>
parents: 5545
diff changeset
181 /**
5441
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
182 * Add a callback to a pref (and its children)
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
183 */
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
184 guint gaim_prefs_connect_callback(const char *name, GaimPrefCallback cb,
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
185 gpointer data);
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
186
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
187 /**
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
188 * Remove a callback to a pref
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
189 */
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
190 void gaim_prefs_disconnect_callback(guint callback_id);
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
191
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
192 /**
5684
b61520e71679 [gaim-migrate @ 6104]
Nathan Walp <nwalp@pidgin.im>
parents: 5638
diff changeset
193 * Trigger callbacks as if the pref changed
b61520e71679 [gaim-migrate @ 6104]
Nathan Walp <nwalp@pidgin.im>
parents: 5638
diff changeset
194 */
b61520e71679 [gaim-migrate @ 6104]
Nathan Walp <nwalp@pidgin.im>
parents: 5638
diff changeset
195 void gaim_prefs_trigger_callback(const char *name);
b61520e71679 [gaim-migrate @ 6104]
Nathan Walp <nwalp@pidgin.im>
parents: 5638
diff changeset
196
b61520e71679 [gaim-migrate @ 6104]
Nathan Walp <nwalp@pidgin.im>
parents: 5638
diff changeset
197 /**
5441
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
198 * Read preferences
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
199 */
5545
7a64114641c3 [gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents: 5534
diff changeset
200 gboolean gaim_prefs_load();
5441
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
201
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
202 /**
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
203 * Force an immediate write of preferences
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
204 */
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
205 void gaim_prefs_sync();
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
206
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
207 /*@}*/
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
208
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
209 #endif /* _PREFS_H_ */