Mercurial > pidgin
comparison libpurple/request.h @ 22455:6cfb6e26787f
Remove duplicated docs for _varg variants of request functions; correct and
improve some other request docs.
author | Will Thompson <will.thompson@collabora.co.uk> |
---|---|
date | Tue, 11 Mar 2008 15:57:17 +0000 |
parents | 9df0a8c7c9b7 |
children | 5d681e194fb3 365b90fa23cf |
comparison
equal
deleted
inserted
replaced
22454:40ea7360d78d | 22455:6cfb6e26787f |
---|---|
236 void (*_purple_reserved3)(void); | 236 void (*_purple_reserved3)(void); |
237 void (*_purple_reserved4)(void); | 237 void (*_purple_reserved4)(void); |
238 } PurpleRequestUiOps; | 238 } PurpleRequestUiOps; |
239 | 239 |
240 typedef void (*PurpleRequestInputCb)(void *, const char *); | 240 typedef void (*PurpleRequestInputCb)(void *, const char *); |
241 | |
242 /** The type of callbacks passed to purple_request_action(). The first | |
243 * argument is the @a user_data parameter; the second is the index in the list | |
244 * of actions of the one chosen. | |
245 */ | |
241 typedef void (*PurpleRequestActionCb)(void *, int); | 246 typedef void (*PurpleRequestActionCb)(void *, int); |
242 typedef void (*PurpleRequestChoiceCb)(void *, int); | 247 typedef void (*PurpleRequestChoiceCb)(void *, int); |
243 typedef void (*PurpleRequestFieldsCb)(void *, PurpleRequestFields *fields); | 248 typedef void (*PurpleRequestFieldsCb)(void *, PurpleRequestFields *fields); |
244 typedef void (*PurpleRequestFileCb)(void *, const char *filename); | 249 typedef void (*PurpleRequestFileCb)(void *, const char *filename); |
245 | 250 |
1262 const char *cancel_text, GCallback cancel_cb, | 1267 const char *cancel_text, GCallback cancel_cb, |
1263 PurpleAccount *account, const char *who, PurpleConversation *conv, | 1268 PurpleAccount *account, const char *who, PurpleConversation *conv, |
1264 void *user_data, ...) G_GNUC_NULL_TERMINATED; | 1269 void *user_data, ...) G_GNUC_NULL_TERMINATED; |
1265 | 1270 |
1266 /** | 1271 /** |
1267 * Prompts the user for multiple-choice input. | 1272 * <tt>va_list</tt> version of purple_request_choice(); see its documentation. |
1268 * | |
1269 * @param handle The plugin or connection handle. For some things this | |
1270 * is <em>extremely</em> important. See the comments on | |
1271 * purple_request_input(). | |
1272 * @param title The title of the message, or @c NULL if it should have | |
1273 * no title. | |
1274 * @param primary The main point of the message, or @c NULL if you're | |
1275 * feeling enigmatic. | |
1276 * @param secondary Secondary information, or @c NULL if there is none. | |
1277 * @param default_value The default choice; this should be one of the values | |
1278 * listed in the varargs. | |
1279 * @param ok_text The text for the @c OK button, which may not be @c NULL. | |
1280 * @param ok_cb The callback for the @c OK button, which may not be @c | |
1281 * NULL. | |
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, or @c NULL to do | |
1285 * nothing. | |
1286 * @param account The #PurpleAccount associated with this request, or @c | |
1287 * NULL if none is | |
1288 * @param who The username of the buddy associated 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 | |
1292 * @param user_data The data to pass to the callback. | |
1293 * @param choices The choices, which should be pairs of <tt>char *</tt> | |
1294 * descriptions and <tt>int</tt> values, terminated with a | |
1295 * @c NULL parameter. | |
1296 * | |
1297 * @return A UI-specific handle. | |
1298 */ | 1273 */ |
1299 void *purple_request_choice_varg(void *handle, const char *title, | 1274 void *purple_request_choice_varg(void *handle, const char *title, |
1300 const char *primary, const char *secondary, int default_value, | 1275 const char *primary, const char *secondary, int default_value, |
1301 const char *ok_text, GCallback ok_cb, | 1276 const char *ok_text, GCallback ok_cb, |
1302 const char *cancel_text, GCallback cancel_cb, | 1277 const char *cancel_text, GCallback cancel_cb, |
1328 * @c NULL if none is. | 1303 * @c NULL if none is. |
1329 * @param user_data The data to pass to the callback. | 1304 * @param user_data The data to pass to the callback. |
1330 * @param action_count The number of actions. | 1305 * @param action_count The number of actions. |
1331 * @param ... A list of actions. These are pairs of | 1306 * @param ... A list of actions. These are pairs of |
1332 * arguments. The first of each pair is the | 1307 * arguments. The first of each pair is the |
1333 * <tt>char *</tt> that appears on the button. It should | 1308 * <tt>char *</tt> label that appears on the button. It |
1334 * have an underscore before the letter you want | 1309 * should have an underscore before the letter you want |
1335 * to use as the accelerator key for the button. | 1310 * to use as the accelerator key for the button. The |
1336 * The second of each pair is the <tt>GCallback</tt> | 1311 * second of each pair is the #PurpleRequestActionCb |
1337 * function to use when the button is clicked. | 1312 * function to use when the button is clicked. |
1338 * | 1313 * |
1339 * @return A UI-specific handle. | 1314 * @return A UI-specific handle. |
1340 */ | 1315 */ |
1341 void *purple_request_action(void *handle, const char *title, const char *primary, | 1316 void *purple_request_action(void *handle, const char *title, const char *primary, |
1342 const char *secondary, int default_action, PurpleAccount *account, | 1317 const char *secondary, int default_action, PurpleAccount *account, |
1343 const char *who, PurpleConversation *conv, void *user_data, | 1318 const char *who, PurpleConversation *conv, void *user_data, |
1344 size_t action_count, ...); | 1319 size_t action_count, ...); |
1345 | 1320 |
1346 /** | 1321 /** |
1347 * Prompts the user for an action. | 1322 * <tt>va_list</tt> version of purple_request_action(); see its documentation. |
1348 * | |
1349 * This is often represented as a dialog with a button for each action. | |
1350 * | |
1351 * @param handle The plugin or connection handle. For some things this | |
1352 * is <em>extremely</em> important. See the comments on | |
1353 * purple_request_input(). | |
1354 * @param title The title of the message, or @c NULL if it should have | |
1355 * no title. | |
1356 * @param primary The main point of the message, or @c NULL if you're | |
1357 * feeling enigmatic. | |
1358 * @param secondary Secondary information, or @c NULL if there is none. | |
1359 * @param default_action The default action, zero-indexed; if the third action | |
1360 * supplied should be the default, supply <tt>2</tt>. | |
1361 * The should be the action that users are most likely | |
1362 * to select. | |
1363 * @param account The #PurpleAccount associated with this request, or @c | |
1364 * NULL if none is. | |
1365 * @param who The username of the buddy associated with this request, | |
1366 * or @c NULL if none is. | |
1367 * @param conv The #PurpleConversation associated with this request, or | |
1368 * @c NULL if none is. | |
1369 * @param user_data The data to pass to the callback. | |
1370 * @param action_count The number of actions. | |
1371 * @param actions A list of actions. These are pairs of | |
1372 * arguments. The first of each pair is the | |
1373 * <tt>char *</tt> that appears on the button. It should | |
1374 * have an underscore before the letter you want | |
1375 * to use as the accelerator key for the button. | |
1376 * The second of each pair is the <tt>GCallback</tt> | |
1377 * function to use when the button is clicked. | |
1378 * | |
1379 * @return A UI-specific handle. | |
1380 */ | 1323 */ |
1381 void *purple_request_action_varg(void *handle, const char *title, | 1324 void *purple_request_action_varg(void *handle, const char *title, |
1382 const char *primary, const char *secondary, int default_action, | 1325 const char *primary, const char *secondary, int default_action, |
1383 PurpleAccount *account, const char *who, PurpleConversation *conv, | 1326 PurpleAccount *account, const char *who, PurpleConversation *conv, |
1384 void *user_data, size_t action_count, va_list actions); | 1327 void *user_data, size_t action_count, va_list actions); |