Sat, 19 Jun 2004 16:05:50 +0000
[gaim-migrate @ 10125]
I went and made real-big buddy icons (most likely MSN or Yahoo) scale up
to 96x96 in the convo window. It's actually not as bad as I thought it
would be, but I'll let you guys decide what to do with it before Sunday
as I'm going to Long Island now.1
| 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 | */ | |
| 26 | #ifndef _PLUGIN_PREF_H_ | |
| 27 | #define _PLUGIN_PREF_H_ | |
| 28 | ||
| 29 | typedef struct _GaimPluginPrefFrame GaimPluginPrefFrame; | |
| 30 | typedef struct _GaimPluginPref GaimPluginPref; | |
| 31 | ||
| 32 | typedef enum { | |
| 33 | GAIM_PLUGIN_PREF_NONE, | |
| 34 | GAIM_PLUGIN_PREF_CHOICE | |
| 35 | } GaimPluginPrefType; | |
| 36 | ||
| 37 | #include <glib.h> | |
| 38 | #include "prefs.h" | |
| 39 | ||
| 40 | #ifdef __cplusplus | |
| 41 | extern "C" { | |
| 42 | #endif | |
| 43 | ||
| 44 | /**************************************************************************/ | |
| 45 | /** @name Plugin Preference API */ | |
| 46 | /**************************************************************************/ | |
| 47 | /*@{*/ | |
| 48 | ||
| 49 | /** | |
| 50 | * Create a new plugin preference frame | |
| 51 | * | |
| 52 | * @return a new GaimPluginPrefFrame | |
| 53 | */ | |
| 54 | GaimPluginPrefFrame *gaim_plugin_pref_frame_new(); | |
| 55 | ||
| 56 | /** | |
| 57 | * Destroy a plugin preference frame | |
| 58 | * | |
| 59 | * @param frame The plugin frame to destroy | |
| 60 | */ | |
| 61 | void gaim_plugin_pref_frame_destroy(GaimPluginPrefFrame *frame); | |
| 62 | ||
| 63 | /** | |
| 64 | * Adds a plugin preference to a plugin preference frame | |
| 65 | * | |
| 66 | * @param frame The plugin frame to add the preference to | |
| 67 | * @param pref The preference to add to the frame | |
| 68 | */ | |
| 69 | void gaim_plugin_pref_frame_add(GaimPluginPrefFrame *frame, GaimPluginPref *pref); | |
| 70 | ||
| 71 | /** | |
| 72 | * Get the plugin preferences from a plugin preference frame | |
| 73 | * | |
| 74 | * @param frame The plugin frame to get the plugin preferences from | |
| 75 | * @return a GList of plugin preferences | |
| 76 | */ | |
| 77 | GList *gaim_plugin_pref_frame_get_prefs(GaimPluginPrefFrame *frame); | |
| 78 | ||
| 79 | /** | |
| 80 | * Create a new plugin preference | |
| 81 | * | |
| 82 | * @return a new GaimPluginPref | |
| 83 | */ | |
| 84 | GaimPluginPref *gaim_plugin_pref_new(); | |
| 85 | ||
| 86 | /** | |
| 87 | * Create a new plugin preference with name | |
| 88 | * | |
| 89 | * @param name The name of the pref | |
| 90 | * @return a new GaimPluginPref | |
| 91 | */ | |
| 92 | GaimPluginPref *gaim_plugin_pref_new_with_name(char *name); | |
| 93 | ||
| 94 | /** | |
| 95 | * Create a new plugin preference with label | |
| 96 | * | |
| 97 | * @param label The label to be displayed | |
| 98 | * @return a new GaimPluginPref | |
| 99 | */ | |
| 100 | GaimPluginPref *gaim_plugin_pref_new_with_label(char *label); | |
| 101 | ||
| 102 | /** | |
| 103 | * Create a new plugin preference with name and label | |
| 104 | * | |
| 105 | * @param name The name of the pref | |
| 106 | * @param label The label to be displayed | |
| 107 | * @return a new GaimPluginPref | |
| 108 | */ | |
| 109 | GaimPluginPref *gaim_plugin_pref_new_with_name_and_label(char *name, char *label); | |
| 110 | ||
| 111 | /** | |
| 112 | * Destroy a plugin preference | |
| 113 | * | |
| 114 | * @param pref The preference to destroy | |
| 115 | */ | |
| 116 | void gaim_plugin_pref_destroy(GaimPluginPref *pref); | |
| 117 | ||
| 118 | /** | |
| 119 | * Set a plugin pref name | |
| 120 | * | |
| 121 | * @param pref The plugin pref | |
| 122 | * @param name The name of the pref | |
| 123 | */ | |
| 124 | void gaim_plugin_pref_set_name(GaimPluginPref *pref, char *name); | |
| 125 | ||
| 126 | /** | |
| 127 | * Get a plugin pref name | |
| 128 | * | |
| 129 | * @param pref The plugin pref | |
| 130 | * @return The name of the pref | |
| 131 | */ | |
| 132 | char *gaim_plugin_pref_get_name(GaimPluginPref *pref); | |
| 133 | ||
| 134 | /** | |
| 135 | * Set a plugin pref label | |
| 136 | * | |
| 137 | * @param pref The plugin pref | |
| 138 | * @param label The label for the plugin pref | |
| 139 | */ | |
| 140 | void gaim_plugin_pref_set_label(GaimPluginPref *pref, char *label); | |
| 141 | ||
| 142 | /** | |
| 143 | * Get a plugin pref label | |
| 144 | * | |
| 145 | * @param pref The plugin pref | |
| 146 | * @return The label for the plugin pref | |
| 147 | */ | |
| 148 | char *gaim_plugin_pref_get_label(GaimPluginPref *pref); | |
| 149 | ||
| 150 | /** | |
| 151 | * Set the bounds for an integer pref | |
| 152 | * | |
| 153 | * @param pref The plugin pref | |
| 154 | * @param min The min value | |
| 155 | * @param max The max value | |
| 156 | */ | |
| 157 | void gaim_plugin_pref_set_bounds(GaimPluginPref *pref, int min, int max); | |
| 158 | ||
| 159 | /** | |
| 160 | * Get the bounds for an integer pref | |
| 161 | * | |
| 162 | * @param pref The plugin pref | |
| 163 | * @param min The min value | |
| 164 | * @param max The max value | |
| 165 | */ | |
| 166 | void gaim_plugin_pref_get_bounds(GaimPluginPref *pref, int *min, int *max); | |
| 167 | ||
| 168 | /** | |
| 169 | * Set the type of a plugin pref | |
| 170 | * | |
| 171 | * @param pref The plugin pref | |
| 172 | * @param type The type | |
| 173 | */ | |
| 174 | void gaim_plugin_pref_set_type(GaimPluginPref *pref, GaimPluginPrefType type); | |
| 175 | ||
| 176 | /** | |
| 177 | * Get the type of a plugin pref | |
| 178 | * | |
| 179 | * @param pref The plugin pref | |
| 180 | * @return The type | |
| 181 | */ | |
| 182 | GaimPluginPrefType gaim_plugin_pref_get_type(GaimPluginPref *pref); | |
| 183 | ||
| 184 | /** | |
| 185 | * Set the choices for a choices plugin pref | |
| 186 | * | |
| 187 | * @param pref The plugin pref | |
| 188 | * @param label The label for the choice | |
| 189 | * @param choice A gpointer of the choice | |
| 190 | */ | |
| 191 | void gaim_plugin_pref_add_choice(GaimPluginPref *pref, char *label, gpointer choice); | |
| 192 | ||
| 193 | /** | |
| 194 | * Get the choices for a choices plugin pref | |
| 195 | * | |
| 196 | * @param pref The plugin pref | |
| 197 | * @return GList of the choices | |
| 198 | */ | |
| 199 | GList *gaim_plugin_pref_get_choices(GaimPluginPref *pref); | |
| 200 | ||
| 201 | /** | |
| 202 | * Set the max length for a string plugin pref | |
| 203 | * | |
| 9000 | 204 | * @param pref The plugin pref |
| 205 | * @param max_length The max length of the string | |
| 8713 | 206 | */ |
| 207 | void gaim_plugin_pref_set_max_length(GaimPluginPref *pref, unsigned int max_length); | |
| 208 | ||
| 209 | /** | |
| 210 | * Get the max length for a string plugin pref | |
| 211 | * | |
| 212 | * @param pref The plugin pref | |
| 213 | * @return the max length | |
| 214 | */ | |
| 215 | unsigned int gaim_plugin_pref_get_max_length(GaimPluginPref *pref); | |
| 216 | ||
| 217 | /*@}*/ | |
| 218 | ||
| 219 | #ifdef __cplusplus | |
| 220 | } | |
| 221 | #endif | |
| 222 | ||
| 223 | #endif /* _PLUGIN_PREF_H_ */ |