annotate src/prefs.h @ 9262:572e4658492c

[gaim-migrate @ 10061] Patch by Justin Wood. He says: "User icon would set wrong status There is a small window, that if you set a user icon, you'll set the wrong status for the next update. Thought this over, and it shouldn't have any nasty side effects.. but there are potential problems, if a status change message is lost. Things should be ok though, that said" committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Fri, 11 Jun 2004 00:16:36 +0000
parents 7a67c459ab8f
children 5e78d07f6b36
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 *
8046
fa6395637e2c [gaim-migrate @ 8730]
Sean Egan <seanegan@gmail.com>
parents: 6693
diff changeset
6 * Gaim is the legal property of its developers, whose names are too numerous
fa6395637e2c [gaim-migrate @ 8730]
Sean Egan <seanegan@gmail.com>
parents: 6693
diff changeset
7 * to list here. Please refer to the COPYRIGHT file distributed with this
fa6395637e2c [gaim-migrate @ 8730]
Sean Egan <seanegan@gmail.com>
parents: 6693
diff changeset
8 * source distribution.
5441
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
9 *
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
10 * This program is free software; you can redistribute it and/or modify
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
11 * 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
12 * the Free Software Foundation; either version 2 of the License, or
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
13 * (at your option) any later version.
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
14 *
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
15 * This program is distributed in the hope that it will be useful,
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
18 * GNU General Public License for more details.
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
19 *
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
20 * You should have received a copy of the GNU General Public License
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
21 * along with this program; if not, write to the Free Software
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
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 */
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
25
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
26 #ifndef _PREFS_H_
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
27 #define _PREFS_H_
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
28
5638
0bdfa28c678e [gaim-migrate @ 6047]
Christian Hammond <chipx86@chipx86.com>
parents: 5561
diff changeset
29 #include <glib.h>
0bdfa28c678e [gaim-migrate @ 6047]
Christian Hammond <chipx86@chipx86.com>
parents: 5561
diff changeset
30
5441
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 * Pref data types.
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 typedef enum _GaimPrefType
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
35 {
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
36 GAIM_PREF_NONE,
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
37 GAIM_PREF_BOOLEAN,
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
38 GAIM_PREF_INT,
5561
d67b5b4e1323 [gaim-migrate @ 5962]
Nathan Walp <nwalp@pidgin.im>
parents: 5545
diff changeset
39 GAIM_PREF_STRING,
d67b5b4e1323 [gaim-migrate @ 5962]
Nathan Walp <nwalp@pidgin.im>
parents: 5545
diff changeset
40 GAIM_PREF_STRING_LIST
5944
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5684
diff changeset
41
5441
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
42 } GaimPrefType;
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 * Pref change callback type
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
46 */
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 typedef void (*GaimPrefCallback) (const char *name, GaimPrefType type,
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
49 gpointer val, gpointer data);
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
50
5944
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5684
diff changeset
51 #ifdef __cplusplus
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5684
diff changeset
52 extern "C" {
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5684
diff changeset
53 #endif
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5684
diff changeset
54
5441
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 /** @name Prefs API */
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
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 * Initialize core prefs
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_init();
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 /**
8235
63c7a16a2c09 [gaim-migrate @ 8958]
Mark Doliner <mark@kingant.net>
parents: 8046
diff changeset
66 * Uninitializes the prefs subsystem.
63c7a16a2c09 [gaim-migrate @ 8958]
Mark Doliner <mark@kingant.net>
parents: 8046
diff changeset
67 */
63c7a16a2c09 [gaim-migrate @ 8958]
Mark Doliner <mark@kingant.net>
parents: 8046
diff changeset
68 void gaim_prefs_uninit(void);
63c7a16a2c09 [gaim-migrate @ 8958]
Mark Doliner <mark@kingant.net>
parents: 8046
diff changeset
69
63c7a16a2c09 [gaim-migrate @ 8958]
Mark Doliner <mark@kingant.net>
parents: 8046
diff changeset
70 /**
5441
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
71 * Add a new typeless pref.
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 * @param name The name of the pref
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
74 */
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
75 void gaim_prefs_add_none(const char *name);
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
76
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
77 /**
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
78 * Add a new boolean pref.
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
79 *
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
80 * @param name The name of the pref
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
81 * @param value The initial value to set
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
82 */
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
83 void gaim_prefs_add_bool(const char *name, gboolean value);
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
84
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
85 /**
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
86 * Add a new integer pref.
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
87 *
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
88 * @param name The name of the pref
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
89 * @param value The initial value to set
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
90 */
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
91 void gaim_prefs_add_int(const char *name, int value);
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
92
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
93 /**
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
94 * Add a new string pref.
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
95 *
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
96 * @param name The name of the pref
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
97 * @param value The initial value to set
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
98 */
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
99 void gaim_prefs_add_string(const char *name, const char *value);
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
100
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
101 /**
5561
d67b5b4e1323 [gaim-migrate @ 5962]
Nathan Walp <nwalp@pidgin.im>
parents: 5545
diff changeset
102 * Add a new string list pref.
d67b5b4e1323 [gaim-migrate @ 5962]
Nathan Walp <nwalp@pidgin.im>
parents: 5545
diff changeset
103 *
d67b5b4e1323 [gaim-migrate @ 5962]
Nathan Walp <nwalp@pidgin.im>
parents: 5545
diff changeset
104 * @param name The name of the pref
d67b5b4e1323 [gaim-migrate @ 5962]
Nathan Walp <nwalp@pidgin.im>
parents: 5545
diff changeset
105 * @param value The initial value to set
d67b5b4e1323 [gaim-migrate @ 5962]
Nathan Walp <nwalp@pidgin.im>
parents: 5545
diff changeset
106 */
d67b5b4e1323 [gaim-migrate @ 5962]
Nathan Walp <nwalp@pidgin.im>
parents: 5545
diff changeset
107 void gaim_prefs_add_string_list(const char *name, GList *value);
d67b5b4e1323 [gaim-migrate @ 5962]
Nathan Walp <nwalp@pidgin.im>
parents: 5545
diff changeset
108
d67b5b4e1323 [gaim-migrate @ 5962]
Nathan Walp <nwalp@pidgin.im>
parents: 5545
diff changeset
109 /**
5441
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
110 * Remove a pref.
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 */
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
114 void gaim_prefs_remove(const char *name);
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
115
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
116 /**
6693
8c1b5dd87fbf [gaim-migrate @ 7219]
Nathan Walp <nwalp@pidgin.im>
parents: 6538
diff changeset
117 * Rename a pref
8c1b5dd87fbf [gaim-migrate @ 7219]
Nathan Walp <nwalp@pidgin.im>
parents: 6538
diff changeset
118 *
8c1b5dd87fbf [gaim-migrate @ 7219]
Nathan Walp <nwalp@pidgin.im>
parents: 6538
diff changeset
119 * @param oldname The old name of the pref
8c1b5dd87fbf [gaim-migrate @ 7219]
Nathan Walp <nwalp@pidgin.im>
parents: 6538
diff changeset
120 * @param newname The new name for the pref
8c1b5dd87fbf [gaim-migrate @ 7219]
Nathan Walp <nwalp@pidgin.im>
parents: 6538
diff changeset
121 */
8c1b5dd87fbf [gaim-migrate @ 7219]
Nathan Walp <nwalp@pidgin.im>
parents: 6538
diff changeset
122 void gaim_prefs_rename(const char *oldname, const char *newname);
8c1b5dd87fbf [gaim-migrate @ 7219]
Nathan Walp <nwalp@pidgin.im>
parents: 6538
diff changeset
123
8c1b5dd87fbf [gaim-migrate @ 7219]
Nathan Walp <nwalp@pidgin.im>
parents: 6538
diff changeset
124 /**
8705
543b19a96ac5 [gaim-migrate @ 9458]
Luke Schierer <lschiere@pidgin.im>
parents: 8235
diff changeset
125 * Rename a boolean pref, toggling it's value
543b19a96ac5 [gaim-migrate @ 9458]
Luke Schierer <lschiere@pidgin.im>
parents: 8235
diff changeset
126 *
543b19a96ac5 [gaim-migrate @ 9458]
Luke Schierer <lschiere@pidgin.im>
parents: 8235
diff changeset
127 * @param oldname The old name of the pref
543b19a96ac5 [gaim-migrate @ 9458]
Luke Schierer <lschiere@pidgin.im>
parents: 8235
diff changeset
128 * @param newname The new name for the pref
543b19a96ac5 [gaim-migrate @ 9458]
Luke Schierer <lschiere@pidgin.im>
parents: 8235
diff changeset
129 */
543b19a96ac5 [gaim-migrate @ 9458]
Luke Schierer <lschiere@pidgin.im>
parents: 8235
diff changeset
130 void gaim_prefs_rename_boolean_toggle(const char *oldname, const char *newname);
543b19a96ac5 [gaim-migrate @ 9458]
Luke Schierer <lschiere@pidgin.im>
parents: 8235
diff changeset
131
543b19a96ac5 [gaim-migrate @ 9458]
Luke Schierer <lschiere@pidgin.im>
parents: 8235
diff changeset
132 /**
5441
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
133 * Remove all prefs.
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
134 */
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
135 void gaim_prefs_destroy();
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
136
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
137 /**
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
138 * Set raw pref value
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
139 *
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
140 * @param name The name of the pref
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
141 * @param value The value to set
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
142 */
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
143 void gaim_prefs_set_generic(const char *name, gpointer value);
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
144
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
145 /**
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
146 * Set boolean pref value
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
147 *
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
148 * @param name The name of the pref
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
149 * @param value The value to set
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
150 */
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
151 void gaim_prefs_set_bool(const char *name, gboolean value);
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
152
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
153 /**
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
154 * Set integer pref value
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
155 *
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
156 * @param name The name of the pref
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
157 * @param value The value to set
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
158 */
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
159 void gaim_prefs_set_int(const char *name, int value);
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
160
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
161 /**
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
162 * Set string pref value
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
163 *
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
164 * @param name The name of the pref
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
165 * @param value The value to set
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
166 */
5451
e1cc0c67e123 [gaim-migrate @ 5839]
Nathan Walp <nwalp@pidgin.im>
parents: 5441
diff changeset
167 void gaim_prefs_set_string(const char *name, const char *value);
5441
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
168
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
169 /**
5561
d67b5b4e1323 [gaim-migrate @ 5962]
Nathan Walp <nwalp@pidgin.im>
parents: 5545
diff changeset
170 * Set string pref value
d67b5b4e1323 [gaim-migrate @ 5962]
Nathan Walp <nwalp@pidgin.im>
parents: 5545
diff changeset
171 *
d67b5b4e1323 [gaim-migrate @ 5962]
Nathan Walp <nwalp@pidgin.im>
parents: 5545
diff changeset
172 * @param name The name of the pref
d67b5b4e1323 [gaim-migrate @ 5962]
Nathan Walp <nwalp@pidgin.im>
parents: 5545
diff changeset
173 * @param value The value to set
d67b5b4e1323 [gaim-migrate @ 5962]
Nathan Walp <nwalp@pidgin.im>
parents: 5545
diff changeset
174 */
d67b5b4e1323 [gaim-migrate @ 5962]
Nathan Walp <nwalp@pidgin.im>
parents: 5545
diff changeset
175 void gaim_prefs_set_string_list(const char *name, GList *value);
d67b5b4e1323 [gaim-migrate @ 5962]
Nathan Walp <nwalp@pidgin.im>
parents: 5545
diff changeset
176
d67b5b4e1323 [gaim-migrate @ 5962]
Nathan Walp <nwalp@pidgin.im>
parents: 5545
diff changeset
177 /**
6538
4bc050b1af34 [gaim-migrate @ 7056]
Ethan Blanton <elb@pidgin.im>
parents: 5944
diff changeset
178 * Get pref type
4bc050b1af34 [gaim-migrate @ 7056]
Ethan Blanton <elb@pidgin.im>
parents: 5944
diff changeset
179 *
4bc050b1af34 [gaim-migrate @ 7056]
Ethan Blanton <elb@pidgin.im>
parents: 5944
diff changeset
180 * @param name The name of the pref
4bc050b1af34 [gaim-migrate @ 7056]
Ethan Blanton <elb@pidgin.im>
parents: 5944
diff changeset
181 * @return The type of the pref
4bc050b1af34 [gaim-migrate @ 7056]
Ethan Blanton <elb@pidgin.im>
parents: 5944
diff changeset
182 */
4bc050b1af34 [gaim-migrate @ 7056]
Ethan Blanton <elb@pidgin.im>
parents: 5944
diff changeset
183 GaimPrefType gaim_prefs_get_type(const char *name);
4bc050b1af34 [gaim-migrate @ 7056]
Ethan Blanton <elb@pidgin.im>
parents: 5944
diff changeset
184
4bc050b1af34 [gaim-migrate @ 7056]
Ethan Blanton <elb@pidgin.im>
parents: 5944
diff changeset
185 /**
5441
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
186 * Get boolean pref value
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 * @param name The name of the pref
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
189 * @return The value of the pref
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
190 */
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
191 gboolean gaim_prefs_get_bool(const char *name);
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
192
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
193 /**
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
194 * Get integer pref value
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
195 *
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
196 * @param name The name of the pref
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
197 * @return The value of the pref
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
198 */
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
199 int gaim_prefs_get_int(const char *name);
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
200
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 * Get string pref value
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
203 *
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
204 * @param name The name of the pref
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
205 * @return The value of the pref
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
206 */
5545
7a64114641c3 [gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents: 5534
diff changeset
207 const char *gaim_prefs_get_string(const char *name);
5441
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 /**
5561
d67b5b4e1323 [gaim-migrate @ 5962]
Nathan Walp <nwalp@pidgin.im>
parents: 5545
diff changeset
210 * Get string pref value
d67b5b4e1323 [gaim-migrate @ 5962]
Nathan Walp <nwalp@pidgin.im>
parents: 5545
diff changeset
211 *
d67b5b4e1323 [gaim-migrate @ 5962]
Nathan Walp <nwalp@pidgin.im>
parents: 5545
diff changeset
212 * @param name The name of the pref
d67b5b4e1323 [gaim-migrate @ 5962]
Nathan Walp <nwalp@pidgin.im>
parents: 5545
diff changeset
213 * @return The value of the pref
d67b5b4e1323 [gaim-migrate @ 5962]
Nathan Walp <nwalp@pidgin.im>
parents: 5545
diff changeset
214 */
d67b5b4e1323 [gaim-migrate @ 5962]
Nathan Walp <nwalp@pidgin.im>
parents: 5545
diff changeset
215 GList *gaim_prefs_get_string_list(const char *name);
d67b5b4e1323 [gaim-migrate @ 5962]
Nathan Walp <nwalp@pidgin.im>
parents: 5545
diff changeset
216
d67b5b4e1323 [gaim-migrate @ 5962]
Nathan Walp <nwalp@pidgin.im>
parents: 5545
diff changeset
217 /**
5441
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
218 * Add a callback to a pref (and its children)
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
219 */
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
220 guint gaim_prefs_connect_callback(const char *name, GaimPrefCallback cb,
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
221 gpointer data);
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
222
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
223 /**
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
224 * Remove a callback to a pref
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
225 */
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
226 void gaim_prefs_disconnect_callback(guint callback_id);
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
227
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
228 /**
5684
b61520e71679 [gaim-migrate @ 6104]
Nathan Walp <nwalp@pidgin.im>
parents: 5638
diff changeset
229 * Trigger callbacks as if the pref changed
b61520e71679 [gaim-migrate @ 6104]
Nathan Walp <nwalp@pidgin.im>
parents: 5638
diff changeset
230 */
b61520e71679 [gaim-migrate @ 6104]
Nathan Walp <nwalp@pidgin.im>
parents: 5638
diff changeset
231 void gaim_prefs_trigger_callback(const char *name);
b61520e71679 [gaim-migrate @ 6104]
Nathan Walp <nwalp@pidgin.im>
parents: 5638
diff changeset
232
b61520e71679 [gaim-migrate @ 6104]
Nathan Walp <nwalp@pidgin.im>
parents: 5638
diff changeset
233 /**
5441
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
234 * Read preferences
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
235 */
5545
7a64114641c3 [gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents: 5534
diff changeset
236 gboolean gaim_prefs_load();
5441
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
237
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
238 /**
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
239 * Force an immediate write of preferences
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
240 */
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
241 void gaim_prefs_sync();
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
242
8900
7a67c459ab8f [gaim-migrate @ 9669]
Mark Doliner <mark@kingant.net>
parents: 8705
diff changeset
243 /**
7a67c459ab8f [gaim-migrate @ 9669]
Mark Doliner <mark@kingant.net>
parents: 8705
diff changeset
244 * Rename legacy prefs and delete some that no longer exist.
7a67c459ab8f [gaim-migrate @ 9669]
Mark Doliner <mark@kingant.net>
parents: 8705
diff changeset
245 */
7a67c459ab8f [gaim-migrate @ 9669]
Mark Doliner <mark@kingant.net>
parents: 8705
diff changeset
246 void gaim_prefs_update_old();
7a67c459ab8f [gaim-migrate @ 9669]
Mark Doliner <mark@kingant.net>
parents: 8705
diff changeset
247
5441
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
248 /*@}*/
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
249
5944
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5684
diff changeset
250 #ifdef __cplusplus
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5684
diff changeset
251 }
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5684
diff changeset
252 #endif
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5684
diff changeset
253
5441
e150a0cf4d6e [gaim-migrate @ 5823]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
254 #endif /* _PREFS_H_ */