Mercurial > pidgin.yaz
annotate src/prefs.h @ 9640:bc2079a32fd9
[gaim-migrate @ 10488]
I warmenhoved patch 996233 from Jon Oberheide. Thanks Jon!
From his description:
The main purpose of this patch is to set the focus of a
conversation when it is created. Currently, the focus
is set when the conversation is created from:
- double-clicking a buddy on the buddy list
- right-clicking a buddy and clicking "IM"
This patch sets the focus additionally for the
following circumstances:
- clicking "Buddies -> New Instant Message"
- clicking "IM" buddy list button
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Mon, 02 Aug 2004 03:21:32 +0000 |
parents | da88e2cd5c53 |
children | db62420a53a2 |
rev | line source |
---|---|
5441 | 1 /** |
2 * @file prefs.h Prefs API | |
3 * | |
4 * gaim | |
5 * | |
8046 | 6 * Gaim is the legal property of its developers, whose names are too numerous |
7 * to list here. Please refer to the COPYRIGHT file distributed with this | |
8 * source distribution. | |
5441 | 9 * |
10 * This program is free software; you can redistribute it and/or modify | |
11 * it under the terms of the GNU General Public License as published by | |
12 * the Free Software Foundation; either version 2 of the License, or | |
13 * (at your option) any later version. | |
14 * | |
15 * This program is distributed in the hope that it will be useful, | |
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 * GNU General Public License for more details. | |
19 * | |
20 * You should have received a copy of the GNU General Public License | |
21 * along with this program; if not, write to the Free Software | |
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
23 * | |
24 */ | |
25 | |
26 #ifndef _PREFS_H_ | |
27 #define _PREFS_H_ | |
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 | 31 /** |
32 * Pref data types. | |
33 */ | |
34 typedef enum _GaimPrefType | |
35 { | |
36 GAIM_PREF_NONE, | |
37 GAIM_PREF_BOOLEAN, | |
38 GAIM_PREF_INT, | |
5561 | 39 GAIM_PREF_STRING, |
40 GAIM_PREF_STRING_LIST | |
5944
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5684
diff
changeset
|
41 |
5441 | 42 } GaimPrefType; |
43 | |
44 /** | |
45 * Pref change callback type | |
46 */ | |
47 | |
48 typedef void (*GaimPrefCallback) (const char *name, GaimPrefType type, | |
49 gpointer val, gpointer data); | |
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 | 55 /**************************************************************************/ |
56 /** @name Prefs API */ | |
57 /**************************************************************************/ | |
58 /*@{*/ | |
59 | |
60 /** | |
61 * Initialize core prefs | |
62 */ | |
63 void gaim_prefs_init(); | |
64 | |
65 /** | |
8235 | 66 * Uninitializes the prefs subsystem. |
67 */ | |
68 void gaim_prefs_uninit(void); | |
69 | |
70 /** | |
5441 | 71 * Add a new typeless pref. |
72 * | |
73 * @param name The name of the pref | |
74 */ | |
75 void gaim_prefs_add_none(const char *name); | |
76 | |
77 /** | |
78 * Add a new boolean pref. | |
79 * | |
80 * @param name The name of the pref | |
81 * @param value The initial value to set | |
82 */ | |
83 void gaim_prefs_add_bool(const char *name, gboolean value); | |
84 | |
85 /** | |
86 * Add a new integer pref. | |
87 * | |
88 * @param name The name of the pref | |
89 * @param value The initial value to set | |
90 */ | |
91 void gaim_prefs_add_int(const char *name, int value); | |
92 | |
93 /** | |
94 * Add a new string pref. | |
95 * | |
96 * @param name The name of the pref | |
97 * @param value The initial value to set | |
98 */ | |
99 void gaim_prefs_add_string(const char *name, const char *value); | |
100 | |
101 /** | |
5561 | 102 * Add a new string list pref. |
103 * | |
104 * @param name The name of the pref | |
105 * @param value The initial value to set | |
106 */ | |
107 void gaim_prefs_add_string_list(const char *name, GList *value); | |
108 | |
109 /** | |
5441 | 110 * Remove a pref. |
111 * | |
112 * @param name The name of the pref | |
113 */ | |
114 void gaim_prefs_remove(const char *name); | |
115 | |
116 /** | |
6693 | 117 * Rename a pref |
118 * | |
119 * @param oldname The old name of the pref | |
120 * @param newname The new name for the pref | |
121 */ | |
122 void gaim_prefs_rename(const char *oldname, const char *newname); | |
123 | |
124 /** | |
8705 | 125 * Rename a boolean pref, toggling it's value |
126 * | |
127 * @param oldname The old name of the pref | |
128 * @param newname The new name for the pref | |
129 */ | |
130 void gaim_prefs_rename_boolean_toggle(const char *oldname, const char *newname); | |
131 | |
132 /** | |
5441 | 133 * Remove all prefs. |
134 */ | |
135 void gaim_prefs_destroy(); | |
136 | |
137 /** | |
138 * Set raw pref value | |
139 * | |
140 * @param name The name of the pref | |
141 * @param value The value to set | |
142 */ | |
143 void gaim_prefs_set_generic(const char *name, gpointer value); | |
144 | |
145 /** | |
146 * Set boolean pref value | |
147 * | |
148 * @param name The name of the pref | |
149 * @param value The value to set | |
150 */ | |
151 void gaim_prefs_set_bool(const char *name, gboolean value); | |
152 | |
153 /** | |
154 * Set integer pref value | |
155 * | |
156 * @param name The name of the pref | |
157 * @param value The value to set | |
158 */ | |
159 void gaim_prefs_set_int(const char *name, int value); | |
160 | |
161 /** | |
162 * Set string pref value | |
163 * | |
164 * @param name The name of the pref | |
165 * @param value The value to set | |
166 */ | |
5451 | 167 void gaim_prefs_set_string(const char *name, const char *value); |
5441 | 168 |
169 /** | |
5561 | 170 * Set string pref value |
171 * | |
172 * @param name The name of the pref | |
173 * @param value The value to set | |
174 */ | |
175 void gaim_prefs_set_string_list(const char *name, GList *value); | |
176 | |
177 /** | |
9611 | 178 * Check if a pref exists |
179 * | |
9619 | 180 * @param name The name of the pref |
181 * @return TRUE if the pref exists. Otherwise FALSE. | |
9611 | 182 */ |
183 gboolean gaim_prefs_exists(const char *name); | |
184 | |
185 /** | |
6538 | 186 * Get pref type |
187 * | |
188 * @param name The name of the pref | |
189 * @return The type of the pref | |
190 */ | |
191 GaimPrefType gaim_prefs_get_type(const char *name); | |
192 | |
193 /** | |
5441 | 194 * Get boolean pref value |
195 * | |
196 * @param name The name of the pref | |
197 * @return The value of the pref | |
198 */ | |
199 gboolean gaim_prefs_get_bool(const char *name); | |
200 | |
201 /** | |
202 * Get integer pref value | |
203 * | |
204 * @param name The name of the pref | |
205 * @return The value of the pref | |
206 */ | |
207 int gaim_prefs_get_int(const char *name); | |
208 | |
209 /** | |
210 * Get string pref value | |
211 * | |
212 * @param name The name of the pref | |
213 * @return The value of the pref | |
214 */ | |
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5534
diff
changeset
|
215 const char *gaim_prefs_get_string(const char *name); |
5441 | 216 |
217 /** | |
5561 | 218 * Get string pref value |
219 * | |
220 * @param name The name of the pref | |
221 * @return The value of the pref | |
222 */ | |
223 GList *gaim_prefs_get_string_list(const char *name); | |
224 | |
225 /** | |
5441 | 226 * Add a callback to a pref (and its children) |
227 */ | |
228 guint gaim_prefs_connect_callback(const char *name, GaimPrefCallback cb, | |
229 gpointer data); | |
230 | |
231 /** | |
232 * Remove a callback to a pref | |
233 */ | |
234 void gaim_prefs_disconnect_callback(guint callback_id); | |
235 | |
236 /** | |
5684 | 237 * Trigger callbacks as if the pref changed |
238 */ | |
239 void gaim_prefs_trigger_callback(const char *name); | |
240 | |
241 /** | |
5441 | 242 * Read preferences |
243 */ | |
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5534
diff
changeset
|
244 gboolean gaim_prefs_load(); |
5441 | 245 |
246 /** | |
247 * Force an immediate write of preferences | |
248 */ | |
249 void gaim_prefs_sync(); | |
250 | |
8900 | 251 /** |
252 * Rename legacy prefs and delete some that no longer exist. | |
253 */ | |
254 void gaim_prefs_update_old(); | |
255 | |
5441 | 256 /*@}*/ |
257 | |
5944
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5684
diff
changeset
|
258 #ifdef __cplusplus |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5684
diff
changeset
|
259 } |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5684
diff
changeset
|
260 #endif |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5684
diff
changeset
|
261 |
5441 | 262 #endif /* _PREFS_H_ */ |