Mercurial > pidgin
annotate src/pluginpref.h @ 12466:31e4eb57cc86
[gaim-migrate @ 14776]
Patch sent to gaim-devel by Pradyumna Sampath
Corresponding to SF #1378865:
'In the menu:
"Accounts - Enable Account" menu item. Gives a list of
accounts that are *not* online. Shouldnt this be greyed
to indicate so ? If you think it should be here is a
patch that does the same , you may use it if you want to.'
committer: Tailor Script <tailor@pidgin.im>
| author | Richard Laager <rlaager@wiktel.com> |
|---|---|
| date | Mon, 12 Dec 2005 17:32:32 +0000 |
| parents | fc464a0abccc |
| children | 8ae981f2c9cb |
| rev | line source |
|---|---|
| 8713 | 1 /** |
| 2 * @file pluginpref.h Plugin Preferences API | |
| 3 * @ingroup core | |
| 4 * | |
| 5 * gaim | |
| 6 * | |
| 7 * Gaim is the legal property of its developers, whose names are too numerous | |
| 8 * to list here. Please refer to the COPYRIGHT file distributed with this | |
| 9 * source distribution. | |
| 10 * | |
| 11 * This program is free software; you can redistribute it and/or modify | |
| 12 * it under the terms of the GNU General Public License as published by | |
| 13 * the Free Software Foundation; either version 2 of the License, or | |
| 14 * (at your option) any later version. | |
| 15 * | |
| 16 * This program is distributed in the hope that it will be useful, | |
| 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 19 * GNU General Public License for more details. | |
| 20 * | |
| 21 * You should have received a copy of the GNU General Public License | |
| 22 * along with this program; if not, write to the Free Software | |
| 23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 24 * | |
| 25 */ | |
| 9713 | 26 #ifndef _GAIM_PLUGINPREF_H_ |
| 27 #define _GAIM_PLUGINPREF_H_ | |
| 8713 | 28 |
| 29 typedef struct _GaimPluginPrefFrame GaimPluginPrefFrame; | |
| 30 typedef struct _GaimPluginPref GaimPluginPref; | |
| 31 | |
| 32 typedef enum { | |
| 33 GAIM_PLUGIN_PREF_NONE, | |
| 9529 | 34 GAIM_PLUGIN_PREF_CHOICE, |
| 35 GAIM_PLUGIN_PREF_INFO, /**< no-value label */ | |
| 8713 | 36 } GaimPluginPrefType; |
| 37 | |
| 38 #include <glib.h> | |
| 39 #include "prefs.h" | |
| 40 | |
| 41 #ifdef __cplusplus | |
| 42 extern "C" { | |
| 43 #endif | |
| 44 | |
| 45 /**************************************************************************/ | |
| 46 /** @name Plugin Preference API */ | |
| 47 /**************************************************************************/ | |
| 48 /*@{*/ | |
| 49 | |
| 50 /** | |
| 51 * Create a new plugin preference frame | |
| 52 * | |
| 53 * @return a new GaimPluginPrefFrame | |
| 54 */ | |
|
12323
fc464a0abccc
[gaim-migrate @ 14627]
Richard Laager <rlaager@wiktel.com>
parents:
10414
diff
changeset
|
55 GaimPluginPrefFrame *gaim_plugin_pref_frame_new(void); |
| 8713 | 56 |
| 57 /** | |
| 58 * Destroy a plugin preference frame | |
| 59 * | |
| 60 * @param frame The plugin frame to destroy | |
| 61 */ | |
| 62 void gaim_plugin_pref_frame_destroy(GaimPluginPrefFrame *frame); | |
| 63 | |
| 64 /** | |
| 65 * Adds a plugin preference to a plugin preference frame | |
| 66 * | |
| 67 * @param frame The plugin frame to add the preference to | |
| 68 * @param pref The preference to add to the frame | |
| 69 */ | |
| 70 void gaim_plugin_pref_frame_add(GaimPluginPrefFrame *frame, GaimPluginPref *pref); | |
| 71 | |
| 72 /** | |
| 73 * Get the plugin preferences from a plugin preference frame | |
| 74 * | |
| 75 * @param frame The plugin frame to get the plugin preferences from | |
| 76 * @return a GList of plugin preferences | |
| 77 */ | |
| 78 GList *gaim_plugin_pref_frame_get_prefs(GaimPluginPrefFrame *frame); | |
| 10414 | 79 |
| 8713 | 80 /** |
| 81 * Create a new plugin preference | |
| 82 * | |
| 83 * @return a new GaimPluginPref | |
| 84 */ | |
|
12323
fc464a0abccc
[gaim-migrate @ 14627]
Richard Laager <rlaager@wiktel.com>
parents:
10414
diff
changeset
|
85 GaimPluginPref *gaim_plugin_pref_new(void); |
| 8713 | 86 |
| 87 /** | |
| 88 * Create a new plugin preference with name | |
| 89 * | |
| 90 * @param name The name of the pref | |
| 91 * @return a new GaimPluginPref | |
| 92 */ | |
| 93 GaimPluginPref *gaim_plugin_pref_new_with_name(char *name); | |
| 94 | |
| 95 /** | |
| 96 * Create a new plugin preference with label | |
| 97 * | |
| 98 * @param label The label to be displayed | |
| 99 * @return a new GaimPluginPref | |
| 100 */ | |
| 101 GaimPluginPref *gaim_plugin_pref_new_with_label(char *label); | |
| 102 | |
| 103 /** | |
| 104 * Create a new plugin preference with name and label | |
| 105 * | |
| 106 * @param name The name of the pref | |
| 107 * @param label The label to be displayed | |
| 108 * @return a new GaimPluginPref | |
| 109 */ | |
| 110 GaimPluginPref *gaim_plugin_pref_new_with_name_and_label(char *name, char *label); | |
| 111 | |
| 112 /** | |
| 113 * Destroy a plugin preference | |
| 114 * | |
| 115 * @param pref The preference to destroy | |
| 116 */ | |
| 117 void gaim_plugin_pref_destroy(GaimPluginPref *pref); | |
| 118 | |
| 119 /** | |
| 120 * Set a plugin pref name | |
| 121 * | |
| 122 * @param pref The plugin pref | |
| 123 * @param name The name of the pref | |
| 124 */ | |
| 125 void gaim_plugin_pref_set_name(GaimPluginPref *pref, char *name); | |
| 126 | |
| 127 /** | |
| 128 * Get a plugin pref name | |
| 129 * | |
| 130 * @param pref The plugin pref | |
| 131 * @return The name of the pref | |
| 132 */ | |
| 133 char *gaim_plugin_pref_get_name(GaimPluginPref *pref); | |
| 134 | |
| 135 /** | |
| 136 * Set a plugin pref label | |
| 137 * | |
| 138 * @param pref The plugin pref | |
| 139 * @param label The label for the plugin pref | |
| 140 */ | |
| 141 void gaim_plugin_pref_set_label(GaimPluginPref *pref, char *label); | |
| 142 | |
| 143 /** | |
| 144 * Get a plugin pref label | |
| 145 * | |
| 146 * @param pref The plugin pref | |
| 147 * @return The label for the plugin pref | |
| 148 */ | |
| 149 char *gaim_plugin_pref_get_label(GaimPluginPref *pref); | |
| 150 | |
| 151 /** | |
| 152 * Set the bounds for an integer pref | |
| 153 * | |
| 154 * @param pref The plugin pref | |
| 155 * @param min The min value | |
| 156 * @param max The max value | |
| 157 */ | |
| 158 void gaim_plugin_pref_set_bounds(GaimPluginPref *pref, int min, int max); | |
| 159 | |
| 160 /** | |
| 161 * Get the bounds for an integer pref | |
| 162 * | |
| 163 * @param pref The plugin pref | |
| 164 * @param min The min value | |
| 165 * @param max The max value | |
| 166 */ | |
| 167 void gaim_plugin_pref_get_bounds(GaimPluginPref *pref, int *min, int *max); | |
| 168 | |
| 169 /** | |
| 170 * Set the type of a plugin pref | |
| 171 * | |
| 172 * @param pref The plugin pref | |
| 173 * @param type The type | |
| 174 */ | |
| 175 void gaim_plugin_pref_set_type(GaimPluginPref *pref, GaimPluginPrefType type); | |
| 176 | |
| 177 /** | |
| 178 * Get the type of a plugin pref | |
| 179 * | |
| 180 * @param pref The plugin pref | |
| 181 * @return The type | |
| 182 */ | |
| 183 GaimPluginPrefType gaim_plugin_pref_get_type(GaimPluginPref *pref); | |
| 184 | |
| 185 /** | |
| 186 * Set the choices for a choices plugin pref | |
| 187 * | |
| 188 * @param pref The plugin pref | |
| 189 * @param label The label for the choice | |
| 190 * @param choice A gpointer of the choice | |
| 191 */ | |
| 192 void gaim_plugin_pref_add_choice(GaimPluginPref *pref, char *label, gpointer choice); | |
| 193 | |
| 194 /** | |
| 195 * Get the choices for a choices plugin pref | |
| 196 * | |
| 197 * @param pref The plugin pref | |
| 198 * @return GList of the choices | |
| 199 */ | |
| 200 GList *gaim_plugin_pref_get_choices(GaimPluginPref *pref); | |
| 201 | |
| 202 /** | |
| 203 * Set the max length for a string plugin pref | |
| 204 * | |
| 9000 | 205 * @param pref The plugin pref |
| 206 * @param max_length The max length of the string | |
| 8713 | 207 */ |
| 208 void gaim_plugin_pref_set_max_length(GaimPluginPref *pref, unsigned int max_length); | |
| 209 | |
| 210 /** | |
| 211 * Get the max length for a string plugin pref | |
| 212 * | |
| 213 * @param pref The plugin pref | |
| 214 * @return the max length | |
| 215 */ | |
| 216 unsigned int gaim_plugin_pref_get_max_length(GaimPluginPref *pref); | |
| 217 | |
| 9841 | 218 /** |
| 219 * Sets the masking of a string plugin pref | |
| 220 * | |
| 9939 | 221 * @param pref The plugin pref |
| 222 * @param mask The value to set | |
| 9841 | 223 */ |
| 224 void gaim_plugin_pref_set_masked(GaimPluginPref *pref, gboolean mask); | |
| 225 | |
| 226 /** | |
| 227 * Gets the masking of a string plugin pref | |
| 228 * | |
| 229 * @param pref The plugin pref | |
| 230 * @return The masking | |
| 231 */ | |
| 232 gboolean gaim_plugin_pref_get_masked(GaimPluginPref *pref); | |
| 233 | |
| 8713 | 234 /*@}*/ |
| 235 | |
| 236 #ifdef __cplusplus | |
| 237 } | |
| 238 #endif | |
| 239 | |
| 9713 | 240 #endif /* _GAIM_PLUGINPREF_H_ */ |
