Mercurial > pidgin
comparison libpurple/request.h @ 21876:2ca7a3d28186
merge of '0bab002372d4ff0eac85fc22d99e014cd044b900'
and 'f60024a049490db3b4b14922c237f7bc7c140045'
| author | Richard Laager <rlaager@wiktel.com> |
|---|---|
| date | Tue, 18 Dec 2007 18:18:31 +0000 |
| parents | a92574a57460 |
| children | 050218f87c21 |
comparison
equal
deleted
inserted
replaced
| 21835:567b77c90a1b | 21876:2ca7a3d28186 |
|---|---|
| 181 /** | 181 /** |
| 182 * Request UI operations. | 182 * Request UI operations. |
| 183 */ | 183 */ |
| 184 typedef struct | 184 typedef struct |
| 185 { | 185 { |
| 186 /** @see purple_request_input(). */ | |
| 186 void *(*request_input)(const char *title, const char *primary, | 187 void *(*request_input)(const char *title, const char *primary, |
| 187 const char *secondary, const char *default_value, | 188 const char *secondary, const char *default_value, |
| 188 gboolean multiline, gboolean masked, gchar *hint, | 189 gboolean multiline, gboolean masked, gchar *hint, |
| 189 const char *ok_text, GCallback ok_cb, | 190 const char *ok_text, GCallback ok_cb, |
| 190 const char *cancel_text, GCallback cancel_cb, | 191 const char *cancel_text, GCallback cancel_cb, |
| 191 PurpleAccount *account, const char *who, PurpleConversation *conv, | 192 PurpleAccount *account, const char *who, |
| 192 void *user_data); | 193 PurpleConversation *conv, void *user_data); |
| 194 | |
| 195 /** @see purple_request_choice_varg(). */ | |
| 193 void *(*request_choice)(const char *title, const char *primary, | 196 void *(*request_choice)(const char *title, const char *primary, |
| 194 const char *secondary, int default_value, | 197 const char *secondary, int default_value, |
| 195 const char *ok_text, GCallback ok_cb, | 198 const char *ok_text, GCallback ok_cb, |
| 196 const char *cancel_text, GCallback cancel_cb, | 199 const char *cancel_text, GCallback cancel_cb, |
| 197 PurpleAccount *account, const char *who, PurpleConversation *conv, | 200 PurpleAccount *account, const char *who, |
| 198 void *user_data, va_list choices); | 201 PurpleConversation *conv, void *user_data, |
| 202 va_list choices); | |
| 203 | |
| 204 /** @see purple_request_action_varg(). */ | |
| 199 void *(*request_action)(const char *title, const char *primary, | 205 void *(*request_action)(const char *title, const char *primary, |
| 200 const char *secondary, int default_action, | 206 const char *secondary, int default_action, |
| 201 PurpleAccount *account, const char *who, PurpleConversation *conv, | 207 PurpleAccount *account, const char *who, |
| 202 void *user_data, size_t action_count, | 208 PurpleConversation *conv, void *user_data, |
| 203 va_list actions); | 209 size_t action_count, va_list actions); |
| 210 | |
| 211 /** @see purple_request_fields(). */ | |
| 204 void *(*request_fields)(const char *title, const char *primary, | 212 void *(*request_fields)(const char *title, const char *primary, |
| 205 const char *secondary, PurpleRequestFields *fields, | 213 const char *secondary, PurpleRequestFields *fields, |
| 206 const char *ok_text, GCallback ok_cb, | 214 const char *ok_text, GCallback ok_cb, |
| 207 const char *cancel_text, GCallback cancel_cb, | 215 const char *cancel_text, GCallback cancel_cb, |
| 208 PurpleAccount *account, const char *who, PurpleConversation *conv, | 216 PurpleAccount *account, const char *who, |
| 209 void *user_data); | 217 PurpleConversation *conv, void *user_data); |
| 218 | |
| 219 /** @see purple_request_file(). */ | |
| 210 void *(*request_file)(const char *title, const char *filename, | 220 void *(*request_file)(const char *title, const char *filename, |
| 211 gboolean savedialog, GCallback ok_cb, GCallback cancel_cb, | 221 gboolean savedialog, GCallback ok_cb, |
| 212 PurpleAccount *account, const char *who, PurpleConversation *conv, | 222 GCallback cancel_cb, PurpleAccount *account, |
| 213 void *user_data); | 223 const char *who, PurpleConversation *conv, |
| 224 void *user_data); | |
| 225 | |
| 214 void (*close_request)(PurpleRequestType type, void *ui_handle); | 226 void (*close_request)(PurpleRequestType type, void *ui_handle); |
| 227 | |
| 228 /** @see purple_request_folder(). */ | |
| 215 void *(*request_folder)(const char *title, const char *dirname, | 229 void *(*request_folder)(const char *title, const char *dirname, |
| 216 GCallback ok_cb, GCallback cancel_cb, | 230 GCallback ok_cb, GCallback cancel_cb, |
| 217 PurpleAccount *account, const char *who, PurpleConversation *conv, | 231 PurpleAccount *account, const char *who, |
| 218 void *user_data); | 232 PurpleConversation *conv, void *user_data); |
| 219 | 233 |
| 220 void (*_purple_reserved1)(void); | 234 void (*_purple_reserved1)(void); |
| 221 void (*_purple_reserved2)(void); | 235 void (*_purple_reserved2)(void); |
| 222 void (*_purple_reserved3)(void); | 236 void (*_purple_reserved3)(void); |
| 223 void (*_purple_reserved4)(void); | 237 void (*_purple_reserved4)(void); |
| 1157 | 1171 |
| 1158 /** | 1172 /** |
| 1159 * Prompts the user for text input. | 1173 * Prompts the user for text input. |
| 1160 * | 1174 * |
| 1161 * @param handle The plugin or connection handle. For some | 1175 * @param handle The plugin or connection handle. For some |
| 1162 * things this is EXTREMELY important. The | 1176 * things this is <em>extremely</em> important. The |
| 1163 * handle is used to programmatically close | 1177 * handle is used to programmatically close the request |
| 1164 * the request dialog when it is no longer | 1178 * dialog when it is no longer needed. For PRPLs this |
| 1165 * needed. For PRPLs this is often a pointer | 1179 * is often a pointer to the #PurpleConnection |
| 1166 * to the PurpleConnection instance. For plugins | 1180 * instance. For plugins this should be a similar, |
| 1167 * this should be a similar, unique memory | 1181 * unique memory location. This value is important |
| 1168 * location. This value is important because | 1182 * because it allows a request to be closed with |
| 1169 * it allows a request to be closed, say, when | 1183 * purple_request_close_with_handle() when, for |
| 1170 * you sign offline. If the request is NOT | 1184 * example, you sign offline. If the request is |
| 1171 * closed it is VERY likely to cause a crash | 1185 * <em>not</em> closed it is <strong>very</strong> |
| 1172 * whenever the callback handler functions are | 1186 * likely to cause a crash whenever the callback |
| 1173 * triggered. | 1187 * handler functions are triggered. |
| 1174 * @param title The title of the message. | 1188 * @param title The title of the message, or @c NULL if it should have |
| 1175 * @param primary The main point of the message. | 1189 * no title. |
| 1176 * @param secondary The secondary information. | 1190 * @param primary The main point of the message, or @c NULL if you're |
| 1191 * feeling enigmatic. | |
| 1192 * @param secondary Secondary information, or @c NULL if there is none. | |
| 1177 * @param default_value The default value. | 1193 * @param default_value The default value. |
| 1178 * @param multiline TRUE if the inputted text can span multiple lines. | 1194 * @param multiline @c TRUE if the inputted text can span multiple lines. |
| 1179 * @param masked TRUE if the inputted text should be masked in some way. | 1195 * @param masked @c TRUE if the inputted text should be masked in some |
| 1196 * way (such as by displaying characters as stars). This | |
| 1197 * might be because the input is some kind of password. | |
| 1180 * @param hint Optionally suggest how the input box should appear. | 1198 * @param hint Optionally suggest how the input box should appear. |
| 1181 * Use "html," for example, to allow the user to enter | 1199 * Use "html", for example, to allow the user to enter |
| 1182 * HTML. | 1200 * HTML. |
| 1183 * @param ok_text The text for the @c OK button. | 1201 * @param ok_text The text for the @c OK button, which may not be @c NULL. |
| 1184 * @param ok_cb The callback for the @c OK button. | 1202 * @param ok_cb The callback for the @c OK button, which may not be @c |
| 1185 * @param cancel_text The text for the @c Cancel button. | 1203 * NULL. |
| 1186 * @param cancel_cb The callback for the @c Cancel button. | 1204 * @param cancel_text The text for the @c Cancel button, which may not be @c |
| 1187 * @param account The PurpleAccount associated with this request, or NULL if none is | 1205 * NULL. |
| 1188 * @param who The username of the buddy assocaited with this request, or NULL if none is | 1206 * @param cancel_cb The callback for the @c Cancel button, which may not be |
| 1189 * @param conv The PurpleConversation associated with this request, or NULL if none is | 1207 * @c NULL. |
| 1208 * @param account The #PurpleAccount associated with this request, or @c | |
| 1209 * NULL if none is. | |
| 1210 * @param who The username of the buddy assonciated with this request, | |
| 1211 * or @c NULL if none is. | |
| 1212 * @param conv The #PurpleConversation associated with this request, or | |
| 1213 * @c NULL if none is. | |
| 1190 * @param user_data The data to pass to the callback. | 1214 * @param user_data The data to pass to the callback. |
| 1191 * | 1215 * |
| 1192 * @return A UI-specific handle. | 1216 * @return A UI-specific handle. |
| 1193 */ | 1217 */ |
| 1194 void *purple_request_input(void *handle, const char *title, | 1218 void *purple_request_input(void *handle, const char *title, const char *primary, |
| 1195 const char *primary, const char *secondary, | 1219 const char *secondary, const char *default_value, gboolean multiline, |
| 1196 const char *default_value, | 1220 gboolean masked, gchar *hint, |
| 1197 gboolean multiline, gboolean masked, gchar *hint, | 1221 const char *ok_text, GCallback ok_cb, |
| 1198 const char *ok_text, GCallback ok_cb, | 1222 const char *cancel_text, GCallback cancel_cb, |
| 1199 const char *cancel_text, GCallback cancel_cb, | 1223 PurpleAccount *account, const char *who, PurpleConversation *conv, |
| 1200 PurpleAccount *account, const char *who, PurpleConversation *conv, | 1224 void *user_data); |
| 1201 void *user_data); | |
| 1202 | 1225 |
| 1203 /** | 1226 /** |
| 1204 * Prompts the user for multiple-choice input. | 1227 * Prompts the user for multiple-choice input. |
| 1205 * | 1228 * |
| 1206 * @param handle The plugin or connection handle. For some | 1229 * @param handle The plugin or connection handle. For some things this |
| 1207 * things this is EXTREMELY important. See | 1230 * is <em>extremely</em> important. See the comments on |
| 1208 * the comments on purple_request_input. | 1231 * purple_request_input(). |
| 1209 * @param title The title of the message. | 1232 * @param title The title of the message, or @c NULL if it should have |
| 1210 * @param primary The main point of the message. | 1233 * no title. |
| 1211 * @param secondary The secondary information. | 1234 * @param primary The main point of the message, or @c NULL if you're |
| 1212 * @param default_value The default value. | 1235 * feeling enigmatic. |
| 1213 * @param ok_text The text for the @c OK button. | 1236 * @param secondary Secondary information, or @c NULL if there is none. |
| 1214 * @param ok_cb The callback for the @c OK button. | 1237 * @param default_value The default choice; this should be one of the values |
| 1215 * @param cancel_text The text for the @c Cancel button. | 1238 * listed in the varargs. |
| 1216 * @param cancel_cb The callback for the @c Cancel button. | 1239 * @param ok_text The text for the @c OK button, which may not be @c NULL. |
| 1217 * @param account The PurpleAccount associated with this request, or NULL if none is | 1240 * @param ok_cb The callback for the @c OK button, which may not be @c |
| 1218 * @param who The username of the buddy assocaited with this request, or NULL if none is | 1241 * NULL. |
| 1219 * @param conv The PurpleConversation associated with this request, or NULL if none is | 1242 * @param cancel_text The text for the @c Cancel button, which may not be @c |
| 1243 * NULL. | |
| 1244 * @param cancel_cb The callback for the @c Cancel button, which may not be | |
| 1245 * @c NULL. | |
| 1246 * @param account The #PurpleAccount associated with this request, or @c | |
| 1247 * NULL if none is. | |
| 1248 * @param who The username of the buddy assonciated with this request, | |
| 1249 * or @c NULL if none is. | |
| 1250 * @param conv The #PurpleConversation associated with this request, or | |
| 1251 * @c NULL if none is. | |
| 1220 * @param user_data The data to pass to the callback. | 1252 * @param user_data The data to pass to the callback. |
| 1221 * @param ... The choices. This argument list should be | 1253 * @param ... The choices, which should be pairs of <tt>char *</tt> |
| 1222 * terminated with a NULL parameter. | 1254 * descriptions and <tt>int</tt> values, terminated with a |
| 1255 * @c NULL parameter. | |
| 1223 * | 1256 * |
| 1224 * @return A UI-specific handle. | 1257 * @return A UI-specific handle. |
| 1225 */ | 1258 */ |
| 1226 void *purple_request_choice(void *handle, const char *title, | 1259 void *purple_request_choice(void *handle, const char *title, const char *primary, |
| 1227 const char *primary, const char *secondary, | 1260 const char *secondary, int default_value, |
| 1228 int default_value, | 1261 const char *ok_text, GCallback ok_cb, |
| 1229 const char *ok_text, GCallback ok_cb, | 1262 const char *cancel_text, GCallback cancel_cb, |
| 1230 const char *cancel_text, GCallback cancel_cb, | 1263 PurpleAccount *account, const char *who, PurpleConversation *conv, |
| 1231 PurpleAccount *account, const char *who, PurpleConversation *conv, | 1264 void *user_data, ...) G_GNUC_NULL_TERMINATED; |
| 1232 void *user_data, ...) G_GNUC_NULL_TERMINATED; | |
| 1233 | 1265 |
| 1234 /** | 1266 /** |
| 1235 * Prompts the user for multiple-choice input. | 1267 * Prompts the user for multiple-choice input. |
| 1236 * | 1268 * |
| 1237 * @param handle The plugin or connection handle. For some | 1269 * @param handle The plugin or connection handle. For some things this |
| 1238 * things this is EXTREMELY important. See | 1270 * is <em>extremely</em> important. See the comments on |
| 1239 * the comments on purple_request_input. | 1271 * purple_request_input(). |
| 1240 * @param title The title of the message. | 1272 * @param title The title of the message, or @c NULL if it should have |
| 1241 * @param primary The main point of the message. | 1273 * no title. |
| 1242 * @param secondary The secondary information. | 1274 * @param primary The main point of the message, or @c NULL if you're |
| 1243 * @param default_value The default value. | 1275 * feeling enigmatic. |
| 1244 * @param ok_text The text for the @c OK button. | 1276 * @param secondary Secondary information, or @c NULL if there is none. |
| 1245 * @param ok_cb The callback for the @c OK button. | 1277 * @param default_value The default choice; this should be one of the values |
| 1246 * @param cancel_text The text for the @c Cancel button. | 1278 * listed in the varargs. |
| 1247 * @param cancel_cb The callback for the @c Cancel button. | 1279 * @param ok_text The text for the @c OK button, which may not be @c NULL. |
| 1248 * @param account The PurpleAccount associated with this request, or NULL if none is | 1280 * @param ok_cb The callback for the @c OK button, which may not be @c |
| 1249 * @param who The username of the buddy assocaited with this request, or NULL if none is | 1281 * NULL. |
| 1250 * @param conv The PurpleConversation associated with this request, or NULL if none is | 1282 * @param cancel_text The text for the @c Cancel button, which may not be @c |
| 1283 * NULL. | |
| 1284 * @param cancel_cb The callback for the @c Cancel button, which may not be | |
| 1285 * @c NULL. | |
| 1286 * @param account The #PurpleAccount associated with this request, or @c | |
| 1287 * NULL if none is | |
| 1288 * @param who The username of the buddy assonciated with this request, | |
| 1289 * or @c NULL if none is | |
| 1290 * @param conv The #PurpleConversation associated with this request, or | |
| 1291 * @c NULL if none is | |
| 1251 * @param user_data The data to pass to the callback. | 1292 * @param user_data The data to pass to the callback. |
| 1252 * @param choices The choices. This argument list should be | 1293 * @param choices The choices, which should be pairs of <tt>char *</tt> |
| 1253 * terminated with a @c NULL parameter. | 1294 * descriptions and <tt>int</tt> values, terminated with a |
| 1295 * @c NULL parameter. | |
| 1254 * | 1296 * |
| 1255 * @return A UI-specific handle. | 1297 * @return A UI-specific handle. |
| 1256 */ | 1298 */ |
| 1257 void *purple_request_choice_varg(void *handle, const char *title, | 1299 void *purple_request_choice_varg(void *handle, const char *title, |
| 1258 const char *primary, const char *secondary, | 1300 const char *primary, const char *secondary, int default_value, |
| 1259 int default_value, | 1301 const char *ok_text, GCallback ok_cb, |
| 1260 const char *ok_text, GCallback ok_cb, | 1302 const char *cancel_text, GCallback cancel_cb, |
| 1261 const char *cancel_text, GCallback cancel_cb, | 1303 PurpleAccount *account, const char *who, PurpleConversation *conv, |
| 1262 PurpleAccount *account, const char *who, PurpleConversation *conv, | 1304 void *user_data, va_list choices); |
| 1263 void *user_data, va_list choices); | |
| 1264 | 1305 |
| 1265 /** | 1306 /** |
| 1266 * Prompts the user for an action. | 1307 * Prompts the user for an action. |
| 1267 * | 1308 * |
| 1268 * This is often represented as a dialog with a button for each action. | 1309 * This is often represented as a dialog with a button for each action. |
| 1269 * | 1310 * |
| 1270 * @param handle The plugin or connection handle. For some | 1311 * @param handle The plugin or connection handle. For some things this |
| 1271 * things this is EXTREMELY important. See | 1312 * is <em>extremely</em> important. See the comments on |
| 1272 * the comments on purple_request_input. | 1313 * purple_request_input(). |
| 1273 * @param title The title of the message. | 1314 * @param title The title of the message, or @c NULL if it should have |
| 1274 * @param primary The main point of the message. | 1315 * no title. |
| 1275 * @param secondary The secondary information. | 1316 * @param primary The main point of the message, or @c NULL if you're |
| 1276 * @param default_action The default value. | 1317 * feeling enigmatic. |
| 1277 * @param account The PurpleAccount associated with this request, or NULL if none is | 1318 * @param secondary Secondary information, or @c NULL if there is none. |
| 1278 * @param who The username of the buddy assocaited with this request, or NULL if none is | 1319 * @param default_action The default action, zero-indexed; if the third action |
| 1279 * @param conv The PurpleConversation associated with this request, or NULL if none is | 1320 * supplied should be the default, supply <tt>2</tt>. |
| 1321 * @param account The #PurpleAccount associated with this request, or @c | |
| 1322 * NULL if none is. | |
| 1323 * @param who The username of the buddy assonciated with this request, | |
| 1324 * or @c NULL if none is. | |
| 1325 * @param conv The #PurpleConversation associated with this request, or | |
| 1326 * @c NULL if none is. | |
| 1280 * @param user_data The data to pass to the callback. | 1327 * @param user_data The data to pass to the callback. |
| 1281 * @param action_count The number of actions. | 1328 * @param action_count The number of actions. |
| 1282 * @param ... A list of actions. These are pairs of | 1329 * @param ... A list of actions. These are pairs of |
| 1283 * arguments. The first of each pair is the | 1330 * arguments. The first of each pair is the |
| 1284 * string that appears on the button. It should | 1331 * <tt>char *</tt> that appears on the button. It should |
| 1285 * have an underscore before the letter you want | 1332 * have an underscore before the letter you want |
| 1286 * to use as the accelerator key for the button. | 1333 * to use as the accelerator key for the button. |
| 1287 * The second of each pair is the callback | 1334 * The second of each pair is the <tt>GCallback</tt> |
| 1288 * function to use when the button is clicked. | 1335 * function to use when the button is clicked. |
| 1289 * | 1336 * |
| 1290 * @return A UI-specific handle. | 1337 * @return A UI-specific handle. |
| 1291 */ | 1338 */ |
| 1292 void *purple_request_action(void *handle, const char *title, | 1339 void *purple_request_action(void *handle, const char *title, const char *primary, |
| 1293 const char *primary, const char *secondary, | 1340 const char *secondary, int default_action, PurpleAccount *account, |
| 1294 int default_action, | 1341 const char *who, PurpleConversation *conv, void *user_data, |
| 1295 PurpleAccount *account, const char *who, PurpleConversation *conv, | 1342 size_t action_count, ...); |
| 1296 void *user_data, size_t action_count, ...); | |
| 1297 | 1343 |
| 1298 /** | 1344 /** |
| 1299 * Prompts the user for an action. | 1345 * Prompts the user for an action. |
| 1300 * | 1346 * |
| 1301 * This is often represented as a dialog with a button for each action. | 1347 * This is often represented as a dialog with a button for each action. |
| 1302 * | 1348 * |
| 1303 * @param handle The plugin or connection handle. For some | 1349 * @param handle The plugin or connection handle. For some things this |
| 1304 * things this is EXTREMELY important. See | 1350 * is <em>extremely</em> important. See the comments on |
| 1305 * the comments on purple_request_input. | 1351 * purple_request_input(). |
| 1306 * @param title The title of the message. | 1352 * @param title The title of the message, or @c NULL if it should have |
| 1307 * @param primary The main point of the message. | 1353 * no title. |
| 1308 * @param secondary The secondary information. | 1354 * @param primary The main point of the message, or @c NULL if you're |
| 1309 * @param default_action The default value. | 1355 * feeling enigmatic. |
| 1310 * @param account The PurpleAccount associated with this request, or NULL if none is | 1356 * @param secondary Secondary information, or @c NULL if there is none. |
| 1311 * @param who The username of the buddy assocaited with this request, or NULL if none is | 1357 * @param default_action The default action, zero-indexed; if the third action |
| 1312 * @param conv The PurpleConversation associated with this request, or NULL if none is | 1358 * supplied should be the default, supply <tt>2</tt>. |
| 1359 * @param account The #PurpleAccount associated with this request, or @c | |
| 1360 * NULL if none is. | |
| 1361 * @param who The username of the buddy assonciated with this request, | |
| 1362 * or @c NULL if none is. | |
| 1363 * @param conv The #PurpleConversation associated with this request, or | |
| 1364 * @c NULL if none is. | |
| 1313 * @param user_data The data to pass to the callback. | 1365 * @param user_data The data to pass to the callback. |
| 1314 * @param action_count The number of actions. | 1366 * @param action_count The number of actions. |
| 1315 * @param actions A list of actions and callbacks. | 1367 * @param actions A list of actions. These are pairs of |
| 1368 * arguments. The first of each pair is the | |
| 1369 * <tt>char *</tt> that appears on the button. It should | |
| 1370 * have an underscore before the letter you want | |
| 1371 * to use as the accelerator key for the button. | |
| 1372 * The second of each pair is the <tt>GCallback</tt> | |
| 1373 * function to use when the button is clicked. | |
| 1316 * | 1374 * |
| 1317 * @return A UI-specific handle. | 1375 * @return A UI-specific handle. |
| 1318 */ | 1376 */ |
| 1319 void *purple_request_action_varg(void *handle, const char *title, | 1377 void *purple_request_action_varg(void *handle, const char *title, |
| 1320 const char *primary, const char *secondary, | 1378 const char *primary, const char *secondary, int default_action, |
| 1321 int default_action, | 1379 PurpleAccount *account, const char *who, PurpleConversation *conv, |
| 1322 PurpleAccount *account, const char *who, PurpleConversation *conv, | 1380 void *user_data, size_t action_count, va_list actions); |
| 1323 void *user_data, size_t action_count, | |
| 1324 va_list actions); | |
| 1325 | 1381 |
| 1326 /** | 1382 /** |
| 1327 * Displays groups of fields for the user to fill in. | 1383 * Displays groups of fields for the user to fill in. |
| 1328 * | 1384 * |
| 1329 * @param handle The plugin or connection handle. For some | 1385 * @param handle The plugin or connection handle. For some things this |
| 1330 * things this is EXTREMELY important. See | 1386 * is <em>extremely</em> important. See the comments on |
| 1331 * the comments on purple_request_input. | 1387 * purple_request_input(). |
| 1332 * @param title The title of the message. | 1388 * @param title The title of the message, or @c NULL if it should have |
| 1333 * @param primary The main point of the message. | 1389 * no title. |
| 1334 * @param secondary The secondary information. | 1390 * @param primary The main point of the message, or @c NULL if you're |
| 1391 * feeling enigmatic. | |
| 1392 * @param secondary Secondary information, or @c NULL if there is none. | |
| 1335 * @param fields The list of fields. | 1393 * @param fields The list of fields. |
| 1336 * @param ok_text The text for the @c OK button. | 1394 * @param ok_text The text for the @c OK button, which may not be @c NULL. |
| 1337 * @param ok_cb The callback for the @c OK button. | 1395 * @param ok_cb The callback for the @c OK button, which may not be @c |
| 1338 * @param cancel_text The text for the @c Cancel button. | 1396 * NULL. |
| 1339 * @param cancel_cb The callback for the @c Cancel button. | 1397 * @param cancel_text The text for the @c Cancel button, which may not be @c |
| 1340 * @param account The PurpleAccount associated with this request, or NULL if none is | 1398 * NULL. |
| 1341 * @param who The username of the buddy associated with this request, or NULL if none is | 1399 * @param cancel_cb The callback for the @c Cancel button, which may not be |
| 1342 * @param conv The PurpleConversation associated with this request, or NULL if none is | 1400 * @c NULL. |
| 1401 * @param account The #PurpleAccount associated with this request, or @c | |
| 1402 * NULL if none is | |
| 1403 * @param who The username of the buddy assonciated with this request, | |
| 1404 * or @c NULL if none is | |
| 1405 * @param conv The #PurpleConversation associated with this request, or | |
| 1406 * @c NULL if none is | |
| 1343 * @param user_data The data to pass to the callback. | 1407 * @param user_data The data to pass to the callback. |
| 1344 * | 1408 * |
| 1345 * @return A UI-specific handle. | 1409 * @return A UI-specific handle. |
| 1346 */ | 1410 */ |
| 1347 void *purple_request_fields(void *handle, const char *title, | 1411 void *purple_request_fields(void *handle, const char *title, const char *primary, |
| 1348 const char *primary, const char *secondary, | 1412 const char *secondary, PurpleRequestFields *fields, |
| 1349 PurpleRequestFields *fields, | 1413 const char *ok_text, GCallback ok_cb, |
| 1350 const char *ok_text, GCallback ok_cb, | 1414 const char *cancel_text, GCallback cancel_cb, |
| 1351 const char *cancel_text, GCallback cancel_cb, | 1415 PurpleAccount *account, const char *who, PurpleConversation *conv, |
| 1352 PurpleAccount *account, const char *who, PurpleConversation *conv, | 1416 void *user_data); |
| 1353 void *user_data); | |
| 1354 | 1417 |
| 1355 /** | 1418 /** |
| 1356 * Closes a request. | 1419 * Closes a request. |
| 1357 * | 1420 * |
| 1358 * @param type The request type. | 1421 * @param type The request type. |
| 1361 void purple_request_close(PurpleRequestType type, void *uihandle); | 1424 void purple_request_close(PurpleRequestType type, void *uihandle); |
| 1362 | 1425 |
| 1363 /** | 1426 /** |
| 1364 * Closes all requests registered with the specified handle. | 1427 * Closes all requests registered with the specified handle. |
| 1365 * | 1428 * |
| 1366 * @param handle The handle. | 1429 * @param handle The handle, as supplied as the @a handle parameter to one of the |
| 1430 * <tt>purple_request_*</tt> functions. | |
| 1431 * | |
| 1432 * @see purple_request_input(). | |
| 1367 */ | 1433 */ |
| 1368 void purple_request_close_with_handle(void *handle); | 1434 void purple_request_close_with_handle(void *handle); |
| 1369 | 1435 |
| 1370 /** | 1436 /** |
| 1371 * A wrapper for purple_request_action() that uses @c Yes and @c No buttons. | 1437 * A wrapper for purple_request_action() that uses @c Yes and @c No buttons. |
| 1399 | 1465 |
| 1400 /** | 1466 /** |
| 1401 * Displays a file selector request dialog. Returns the selected filename to | 1467 * Displays a file selector request dialog. Returns the selected filename to |
| 1402 * the callback. Can be used for either opening a file or saving a file. | 1468 * the callback. Can be used for either opening a file or saving a file. |
| 1403 * | 1469 * |
| 1404 * @param handle The plugin or connection handle. For some | 1470 * @param handle The plugin or connection handle. For some things this |
| 1405 * things this is EXTREMELY important. See | 1471 * is <em>extremely</em> important. See the comments on |
| 1406 * the comments on purple_request_input. | 1472 * purple_request_input(). |
| 1407 * @param title The title for the dialog (may be @c NULL) | 1473 * @param title The title of the message, or @c NULL if it should have |
| 1474 * no title. | |
| 1408 * @param filename The default filename (may be @c NULL) | 1475 * @param filename The default filename (may be @c NULL) |
| 1409 * @param savedialog True if this dialog is being used to save a file. | 1476 * @param savedialog True if this dialog is being used to save a file. |
| 1410 * False if it is being used to open a file. | 1477 * False if it is being used to open a file. |
| 1411 * @param ok_cb The callback for the @c OK button. | 1478 * @param ok_cb The callback for the @c OK button. |
| 1412 * @param cancel_cb The callback for the @c Cancel button. | 1479 * @param cancel_cb The callback for the @c Cancel button. |
| 1413 * @param account The PurpleAccount associated with this request, or NULL if none is | 1480 * @param account The #PurpleAccount associated with this request, or @c |
| 1414 * @param who The username of the buddy assocaited with this request, or NULL if none is | 1481 * NULL if none is |
| 1415 * @param conv The PurpleConversation associated with this request, or NULL if none is | 1482 * @param who The username of the buddy assonciated with this request, |
| 1483 * or @c NULL if none is | |
| 1484 * @param conv The #PurpleConversation associated with this request, or | |
| 1485 * @c NULL if none is | |
| 1416 * @param user_data The data to pass to the callback. | 1486 * @param user_data The data to pass to the callback. |
| 1417 * | 1487 * |
| 1418 * @return A UI-specific handle. | 1488 * @return A UI-specific handle. |
| 1419 */ | 1489 */ |
| 1420 void *purple_request_file(void *handle, const char *title, const char *filename, | 1490 void *purple_request_file(void *handle, const char *title, const char *filename, |
| 1421 gboolean savedialog, | 1491 gboolean savedialog, GCallback ok_cb, GCallback cancel_cb, |
| 1422 GCallback ok_cb, GCallback cancel_cb, | 1492 PurpleAccount *account, const char *who, PurpleConversation *conv, |
| 1423 PurpleAccount *account, const char *who, PurpleConversation *conv, | 1493 void *user_data); |
| 1424 void *user_data); | |
| 1425 | 1494 |
| 1426 /** | 1495 /** |
| 1427 * Displays a folder select dialog. Returns the selected filename to | 1496 * Displays a folder select dialog. Returns the selected filename to |
| 1428 * the callback. | 1497 * the callback. |
| 1429 * | 1498 * |
| 1430 * @param handle The plugin or connection handle. For some | 1499 * @param handle The plugin or connection handle. For some things this |
| 1431 * things this is EXTREMELY important. See | 1500 * is <em>extremely</em> important. See the comments on |
| 1432 * the comments on purple_request_input. | 1501 * purple_request_input(). |
| 1433 * @param title The title for the dialog (may be @c NULL) | 1502 * @param title The title of the message, or @c NULL if it should have |
| 1503 * no title. | |
| 1434 * @param dirname The default directory name (may be @c NULL) | 1504 * @param dirname The default directory name (may be @c NULL) |
| 1435 * @param ok_cb The callback for the @c OK button. | 1505 * @param ok_cb The callback for the @c OK button. |
| 1436 * @param cancel_cb The callback for the @c Cancel button. | 1506 * @param cancel_cb The callback for the @c Cancel button. |
| 1437 * @param account The PurpleAccount associated with this request, or NULL if none is | 1507 * @param account The #PurpleAccount associated with this request, or @c |
| 1438 * @param who The username of the buddy assocaited with this request, or NULL if none is | 1508 * NULL if none is |
| 1439 * @param conv The PurpleConversation associated with this request, or NULL if none is | 1509 * @param who The username of the buddy assonciated with this request, |
| 1510 * or @c NULL if none is | |
| 1511 * @param conv The #PurpleConversation associated with this request, or | |
| 1512 * @c NULL if none is | |
| 1440 * @param user_data The data to pass to the callback. | 1513 * @param user_data The data to pass to the callback. |
| 1441 * | 1514 * |
| 1442 * @return A UI-specific handle. | 1515 * @return A UI-specific handle. |
| 1443 */ | 1516 */ |
| 1444 void *purple_request_folder(void *handle, const char *title, const char *dirname, | 1517 void *purple_request_folder(void *handle, const char *title, const char *dirname, |
| 1445 GCallback ok_cb, GCallback cancel_cb, | 1518 GCallback ok_cb, GCallback cancel_cb, |
| 1446 PurpleAccount *account, const char *who, PurpleConversation *conv, | 1519 PurpleAccount *account, const char *who, PurpleConversation *conv, |
| 1447 void *user_data); | 1520 void *user_data); |
| 1448 | 1521 |
| 1449 /*@}*/ | 1522 /*@}*/ |
| 1450 | 1523 |
| 1451 /**************************************************************************/ | 1524 /**************************************************************************/ |
| 1452 /** @name UI Registration Functions */ | 1525 /** @name UI Registration Functions */ |
