Mercurial > pidgin
comparison libpurple/notify.h @ 24470:d038fc351194
Remove stray whitespace and wrap the function comments at less than 80
characters.
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Mon, 17 Nov 2008 21:31:36 +0000 |
parents | 8282911d5e17 |
children | 2d4f0dd04334 |
comparison
equal
deleted
inserted
replaced
24469:002a58d4af7d | 24470:d038fc351194 |
---|---|
234 | 234 |
235 /** | 235 /** |
236 * Adds a stock button that will be displayed in the search results dialog. | 236 * Adds a stock button that will be displayed in the search results dialog. |
237 * | 237 * |
238 * @param results The search results object. | 238 * @param results The search results object. |
239 * @param type Type of the button. (TODO: Only one button of a given type can be displayed.) | 239 * @param type Type of the button. (TODO: Only one button of a given type |
240 * can be displayed.) | |
240 * @param cb Function that will be called on the click event. | 241 * @param cb Function that will be called on the click event. |
241 */ | 242 */ |
242 void purple_notify_searchresults_button_add(PurpleNotifySearchResults *results, | 243 void purple_notify_searchresults_button_add(PurpleNotifySearchResults *results, |
243 PurpleNotifySearchButtonType type, | 244 PurpleNotifySearchButtonType type, |
244 PurpleNotifySearchResultsCallback cb); | 245 PurpleNotifySearchResultsCallback cb); |
245 | 246 |
246 | 247 |
247 /** | 248 /** |
248 * Adds a plain labelled button that will be displayed in the search results dialog. | 249 * Adds a plain labelled button that will be displayed in the search results |
249 * | 250 * dialog. |
251 * | |
250 * @param results The search results object | 252 * @param results The search results object |
251 * @param label The label to display | 253 * @param label The label to display |
252 * @param cb Function that will be called on the click event | 254 * @param cb Function that will be called on the click event |
253 */ | 255 */ |
254 void purple_notify_searchresults_button_add_labeled(PurpleNotifySearchResults *results, | 256 void purple_notify_searchresults_button_add_labeled(PurpleNotifySearchResults *results, |
265 | 267 |
266 /** | 268 /** |
267 * Returns a newly created search result column object. | 269 * Returns a newly created search result column object. |
268 * | 270 * |
269 * @param title Title of the column. NOTE: Title will get g_strdup()ed. | 271 * @param title Title of the column. NOTE: Title will get g_strdup()ed. |
270 * | 272 * |
271 * @return The new search column object. | 273 * @return The new search column object. |
272 */ | 274 */ |
273 PurpleNotifySearchColumn *purple_notify_searchresults_column_new(const char *title); | 275 PurpleNotifySearchColumn *purple_notify_searchresults_column_new(const char *title); |
274 | 276 |
275 /** | 277 /** |
468 * the connection and username from which the user information came. | 470 * the connection and username from which the user information came. |
469 * | 471 * |
470 * The text is essentially a stripped-down format of HTML, the same that | 472 * The text is essentially a stripped-down format of HTML, the same that |
471 * IMs may send. | 473 * IMs may send. |
472 * | 474 * |
473 * @param gc The PurpleConnection handle associated with the information. | 475 * @param gc The PurpleConnection handle associated with the information. |
474 * @param who The username associated with the information. | 476 * @param who The username associated with the information. |
475 * @param user_info The PurpleNotifyUserInfo which contains the information | 477 * @param user_info The PurpleNotifyUserInfo which contains the information |
476 * @param cb The callback to call when the user closes | 478 * @param cb The callback to call when the user closes the notification. |
477 * the notification. | 479 * @param user_data The data to pass to the callback. |
478 * @param user_data The data to pass to the callback. | 480 * |
479 * | 481 * @return A UI-specific handle. |
480 * @return A UI-specific handle. | |
481 */ | 482 */ |
482 void *purple_notify_userinfo(PurpleConnection *gc, const char *who, | 483 void *purple_notify_userinfo(PurpleConnection *gc, const char *who, |
483 PurpleNotifyUserInfo *user_info, PurpleNotifyCloseCallback cb, | 484 PurpleNotifyUserInfo *user_info, PurpleNotifyCloseCallback cb, |
484 gpointer user_data); | 485 gpointer user_data); |
485 | 486 |
486 /** | 487 /** |
487 * Create a new PurpleNotifyUserInfo which is suitable for passing to purple_notify_userinfo() | 488 * Create a new PurpleNotifyUserInfo which is suitable for passing to |
488 * | 489 * purple_notify_userinfo() |
489 * @return A new PurpleNotifyUserInfo, which the caller must destroy when done | 490 * |
491 * @return A new PurpleNotifyUserInfo, which the caller must destroy when done | |
490 */ | 492 */ |
491 PurpleNotifyUserInfo *purple_notify_user_info_new(void); | 493 PurpleNotifyUserInfo *purple_notify_user_info_new(void); |
492 | 494 |
493 /** | 495 /** |
494 * Destroy a PurpleNotifyUserInfo | 496 * Destroy a PurpleNotifyUserInfo |
495 * | 497 * |
496 * @param user_info The PurpleNotifyUserInfo | 498 * @param user_info The PurpleNotifyUserInfo |
497 */ | 499 */ |
498 void purple_notify_user_info_destroy(PurpleNotifyUserInfo *user_info); | 500 void purple_notify_user_info_destroy(PurpleNotifyUserInfo *user_info); |
499 | 501 |
500 /** | 502 /** |
501 * Retrieve the array of PurpleNotifyUserInfoEntry objects from a PurpleNotifyUserInfo | 503 * Retrieve the array of PurpleNotifyUserInfoEntry objects from a |
502 * | 504 * PurpleNotifyUserInfo |
503 * This GList may be manipulated directly with normal GList functions such as g_list_insert(). Only | 505 * |
504 * PurpleNotifyUserInfoEntry are allowed in the list. If a PurpleNotifyUserInfoEntry item is added to the list, | 506 * This GList may be manipulated directly with normal GList functions such |
505 * it should not be g_free()'d by the caller; PurpleNotifyUserInfo will g_free it when destroyed. | 507 * as g_list_insert(). Only PurpleNotifyUserInfoEntry are allowed in the |
506 * | 508 * list. If a PurpleNotifyUserInfoEntry item is added to the list, it |
507 * To remove a PurpleNotifyUserInfoEntry, use purple_notify_user_info_remove_entry(). Do not use the GList directly. | 509 * should not be g_free()'d by the caller; PurpleNotifyUserInfo will g_free |
508 * | 510 * it when destroyed. |
509 * @param user_info The PurpleNotifyUserInfo | 511 * |
510 * | 512 * To remove a PurpleNotifyUserInfoEntry, use |
511 * @constreturn A GList of PurpleNotifyUserInfoEntry objects | 513 * purple_notify_user_info_remove_entry(). Do not use the GList directly. |
514 * | |
515 * @param user_info The PurpleNotifyUserInfo | |
516 * | |
517 * @constreturn A GList of PurpleNotifyUserInfoEntry objects | |
512 */ | 518 */ |
513 GList *purple_notify_user_info_get_entries(PurpleNotifyUserInfo *user_info); | 519 GList *purple_notify_user_info_get_entries(PurpleNotifyUserInfo *user_info); |
514 | 520 |
515 /** | 521 /** |
516 * Create a textual representation of a PurpleNotifyUserInfo, separating entries with newline | 522 * Create a textual representation of a PurpleNotifyUserInfo, separating |
517 * | 523 * entries with newline |
518 * @param user_info The PurpleNotifyUserInfo | 524 * |
519 * @param newline The separation character | 525 * @param user_info The PurpleNotifyUserInfo |
526 * @param newline The separation character | |
520 */ | 527 */ |
521 char *purple_notify_user_info_get_text_with_newline(PurpleNotifyUserInfo *user_info, const char *newline); | 528 char *purple_notify_user_info_get_text_with_newline(PurpleNotifyUserInfo *user_info, const char *newline); |
522 | 529 |
523 /** | 530 /** |
524 * Add a label/value pair to a PurpleNotifyUserInfo object. | 531 * Add a label/value pair to a PurpleNotifyUserInfo object. |
525 * PurpleNotifyUserInfo keeps track of the order in which pairs are added. | 532 * PurpleNotifyUserInfo keeps track of the order in which pairs are added. |
526 * | 533 * |
527 * @param user_info The PurpleNotifyUserInfo | 534 * @param user_info The PurpleNotifyUserInfo |
528 * @param label A label, which for example might be displayed by a UI with a colon after it ("Status:"). Do not include a colon. | 535 * @param label A label, which for example might be displayed by a |
529 * If NULL, value will be displayed without a label. | 536 * UI with a colon after it ("Status:"). Do not include |
530 * @param value The value, which might be displayed by a UI after the label. | 537 * a colon. If NULL, value will be displayed without a |
531 * If NULL, label will still be displayed; the UI should then treat label as independent | 538 * label. |
532 * and not include a colon if it would otherwise. | 539 * @param value The value, which might be displayed by a UI after |
540 * the label. If NULL, label will still be displayed; | |
541 * the UI should then treat label as independent and not | |
542 * include a colon if it would otherwise. | |
533 */ | 543 */ |
534 void purple_notify_user_info_add_pair(PurpleNotifyUserInfo *user_info, const char *label, const char *value); | 544 void purple_notify_user_info_add_pair(PurpleNotifyUserInfo *user_info, const char *label, const char *value); |
535 | 545 |
536 /** | 546 /** |
537 * Prepend a label/value pair to a PurpleNotifyUserInfo object | 547 * Prepend a label/value pair to a PurpleNotifyUserInfo object |
538 * | 548 * |
539 * @param user_info The PurpleNotifyUserInfo | 549 * @param user_info The PurpleNotifyUserInfo |
540 * @param label A label, which for example might be displayed by a UI with a colon after it ("Status:"). Do not include a colon. | 550 * @param label A label, which for example might be displayed by a |
541 * If NULL, value will be displayed without a label. | 551 * UI with a colon after it ("Status:"). Do not include |
542 * @param value The value, which might be displayed by a UI after the label. | 552 * a colon. If NULL, value will be displayed without a |
543 * If NULL, label will still be displayed; the UI should then treat label as independent | 553 * label. |
544 * and not include a colon if it would otherwise. | 554 * @param value The value, which might be displayed by a UI after |
555 * the label. If NULL, label will still be displayed; | |
556 * the UI should then treat label as independent and not | |
557 * include a colon if it would otherwise. | |
545 */ | 558 */ |
546 void purple_notify_user_info_prepend_pair(PurpleNotifyUserInfo *user_info, const char *label, const char *value); | 559 void purple_notify_user_info_prepend_pair(PurpleNotifyUserInfo *user_info, const char *label, const char *value); |
547 | 560 |
548 /** | 561 /** |
549 * Remove a PurpleNotifyUserInfoEntry from a PurpleNotifyUserInfo object without freeing the entry. | 562 * Remove a PurpleNotifyUserInfoEntry from a PurpleNotifyUserInfo object |
550 * | 563 * without freeing the entry. |
551 * @param user_info The PurpleNotifyUserInfo | 564 * |
552 * @param user_info_entry The PurpleNotifyUserInfoEntry | 565 * @param user_info The PurpleNotifyUserInfo |
566 * @param user_info_entry The PurpleNotifyUserInfoEntry | |
553 */ | 567 */ |
554 void purple_notify_user_info_remove_entry(PurpleNotifyUserInfo *user_info, PurpleNotifyUserInfoEntry *user_info_entry); | 568 void purple_notify_user_info_remove_entry(PurpleNotifyUserInfo *user_info, PurpleNotifyUserInfoEntry *user_info_entry); |
569 | |
555 /** | 570 /** |
556 * Create a new PurpleNotifyUserInfoEntry | 571 * Create a new PurpleNotifyUserInfoEntry |
557 * | 572 * |
558 * If added to a PurpleNotifyUserInfo object, this should not be free()'d, as PurpleNotifyUserInfo will do so | 573 * If added to a PurpleNotifyUserInfo object, this should not be free()'d, |
559 * when destroyed. purple_notify_user_info_add_pair() and purple_notify_user_info_prepend_pair() are convenience | 574 * as PurpleNotifyUserInfo will do so when destroyed. |
560 * methods for creating entries and adding them to a PurpleNotifyUserInfo. | 575 * purple_notify_user_info_add_pair() and |
561 * | 576 * purple_notify_user_info_prepend_pair() are convenience methods for |
562 * @param label A label, which for example might be displayed by a UI with a colon after it ("Status:"). Do not include a colon. | 577 * creating entries and adding them to a PurpleNotifyUserInfo. |
563 * If NULL, value will be displayed without a label. | 578 * |
564 * @param value The value, which might be displayed by a UI after the label. | 579 * @param label A label, which for example might be displayed by a UI |
565 * If NULL, label will still be displayed; the UI should then treat label as independent | 580 * with a colon after it ("Status:"). Do not include a |
566 * and not include a colon if it would otherwise. | 581 * colon. If NULL, value will be displayed without a label. |
582 * @param value The value, which might be displayed by a UI after the | |
583 * label. If NULL, label will still be displayed; the UI | |
584 * should then treat label as independent and not include a | |
585 * colon if it would otherwise. | |
567 * | 586 * |
568 * @result A new PurpleNotifyUserInfoEntry | 587 * @result A new PurpleNotifyUserInfoEntry |
569 */ | 588 */ |
570 PurpleNotifyUserInfoEntry *purple_notify_user_info_entry_new(const char *label, const char *value); | 589 PurpleNotifyUserInfoEntry *purple_notify_user_info_entry_new(const char *label, const char *value); |
571 | 590 |
572 /** | 591 /** |
573 * Add a section break. A UI might display this as a horizontal line. | 592 * Add a section break. A UI might display this as a horizontal line. |
574 * | 593 * |
575 * @param user_info The PurpleNotifyUserInfo | 594 * @param user_info The PurpleNotifyUserInfo |
576 */ | 595 */ |
577 void purple_notify_user_info_add_section_break(PurpleNotifyUserInfo *user_info); | 596 void purple_notify_user_info_add_section_break(PurpleNotifyUserInfo *user_info); |
578 | 597 |
579 /** | 598 /** |
580 * Prepend a section break. A UI might display this as a horizontal line. | 599 * Prepend a section break. A UI might display this as a horizontal line. |
581 * | 600 * |
582 * @param user_info The PurpleNotifyUserInfo | 601 * @param user_info The PurpleNotifyUserInfo |
583 * @since 2.5.0 | 602 * @since 2.5.0 |
584 */ | 603 */ |
585 void purple_notify_user_info_prepend_section_break(PurpleNotifyUserInfo *user_info); | 604 void purple_notify_user_info_prepend_section_break(PurpleNotifyUserInfo *user_info); |
586 | 605 |
587 /** | 606 /** |
588 * Add a section header. A UI might display this in a different font from other text. | 607 * Add a section header. A UI might display this in a different font |
589 * | 608 * from other text. |
590 * @param user_info The PurpleNotifyUserInfo | 609 * |
591 * @param label The name of the section | 610 * @param user_info The PurpleNotifyUserInfo |
611 * @param label The name of the section | |
592 */ | 612 */ |
593 void purple_notify_user_info_add_section_header(PurpleNotifyUserInfo *user_info, const char *label); | 613 void purple_notify_user_info_add_section_header(PurpleNotifyUserInfo *user_info, const char *label); |
594 | 614 |
595 /** | 615 /** |
596 * Prepend a section header. A UI might display this in a different font from other text. | 616 * Prepend a section header. A UI might display this in a different font |
597 * | 617 * from other text. |
598 * @param user_info The PurpleNotifyUserInfo | 618 * |
599 * @param label The name of the section | 619 * @param user_info The PurpleNotifyUserInfo |
620 * @param label The name of the section | |
600 * @since 2.5.0 | 621 * @since 2.5.0 |
601 */ | 622 */ |
602 void purple_notify_user_info_prepend_section_header(PurpleNotifyUserInfo *user_info, const char *label); | 623 void purple_notify_user_info_prepend_section_header(PurpleNotifyUserInfo *user_info, const char *label); |
603 | 624 |
604 /** | 625 /** |
605 * Remove the last item which was added to a PurpleNotifyUserInfo. This could be used to remove a section header which is not needed. | 626 * Remove the last item which was added to a PurpleNotifyUserInfo. This |
627 * could be used to remove a section header which is not needed. | |
606 */ | 628 */ |
607 void purple_notify_user_info_remove_last_item(PurpleNotifyUserInfo *user_info); | 629 void purple_notify_user_info_remove_last_item(PurpleNotifyUserInfo *user_info); |
608 | 630 |
609 /** | 631 /** |
610 * Get the label for a PurpleNotifyUserInfoEntry | 632 * Get the label for a PurpleNotifyUserInfoEntry |
611 * | 633 * |
612 * @param user_info_entry The PurpleNotifyUserInfoEntry | 634 * @param user_info_entry The PurpleNotifyUserInfoEntry |
613 * | 635 * |
614 * @result The label | 636 * @return The label |
615 */ | 637 */ |
616 const gchar *purple_notify_user_info_entry_get_label(PurpleNotifyUserInfoEntry *user_info_entry); | 638 const gchar *purple_notify_user_info_entry_get_label(PurpleNotifyUserInfoEntry *user_info_entry); |
617 | 639 |
618 /** | 640 /** |
619 * Set the label for a PurpleNotifyUserInfoEntry | 641 * Set the label for a PurpleNotifyUserInfoEntry |
620 * | 642 * |
621 * @param user_info_entry The PurpleNotifyUserInfoEntry | 643 * @param user_info_entry The PurpleNotifyUserInfoEntry |
622 * @param label The label | 644 * @param label The label |
623 */ | 645 */ |
624 void purple_notify_user_info_entry_set_label(PurpleNotifyUserInfoEntry *user_info_entry, const char *label); | 646 void purple_notify_user_info_entry_set_label(PurpleNotifyUserInfoEntry *user_info_entry, const char *label); |
625 | 647 |
626 /** | 648 /** |
627 * Get the value for a PurpleNotifyUserInfoEntry | 649 * Get the value for a PurpleNotifyUserInfoEntry |
628 * | 650 * |
629 * @param user_info_entry The PurpleNotifyUserInfoEntry | 651 * @param user_info_entry The PurpleNotifyUserInfoEntry |
630 * | 652 * |
631 * @result The value | 653 * @result The value |
632 */ | 654 */ |
633 const gchar *purple_notify_user_info_entry_get_value(PurpleNotifyUserInfoEntry *user_info_entry); | 655 const gchar *purple_notify_user_info_entry_get_value(PurpleNotifyUserInfoEntry *user_info_entry); |
634 | 656 |
635 /** | 657 /** |
636 * Set the value for a PurpleNotifyUserInfoEntry | 658 * Set the value for a PurpleNotifyUserInfoEntry |
637 * | 659 * |
638 * @param user_info_entry The PurpleNotifyUserInfoEntry | 660 * @param user_info_entry The PurpleNotifyUserInfoEntry |
639 * @param value The value | 661 * @param value The value |
640 */ | 662 */ |
641 void purple_notify_user_info_entry_set_value(PurpleNotifyUserInfoEntry *user_info_entry, const char *value); | 663 void purple_notify_user_info_entry_set_value(PurpleNotifyUserInfoEntry *user_info_entry, const char *value); |
642 | 664 |
643 | 665 |
644 /** | 666 /** |
645 * Get the type of a PurpleNotifyUserInfoEntry | 667 * Get the type of a PurpleNotifyUserInfoEntry |
646 * | 668 * |
647 * @param user_info_entry The PurpleNotifyUserInfoEntry | 669 * @param user_info_entry The PurpleNotifyUserInfoEntry |
648 * | 670 * |
649 * @result The PurpleNotifyUserInfoEntryType | 671 * @return The PurpleNotifyUserInfoEntryType |
650 */ | 672 */ |
651 PurpleNotifyUserInfoEntryType purple_notify_user_info_entry_get_type(PurpleNotifyUserInfoEntry *user_info_entry); | 673 PurpleNotifyUserInfoEntryType purple_notify_user_info_entry_get_type(PurpleNotifyUserInfoEntry *user_info_entry); |
652 | 674 |
653 /** | 675 /** |
654 * Set the type of a PurpleNotifyUserInfoEntry | 676 * Set the type of a PurpleNotifyUserInfoEntry |
655 * | 677 * |
656 * @param user_info_entry The PurpleNotifyUserInfoEntry | 678 * @param user_info_entry The PurpleNotifyUserInfoEntry |
657 * @param type The PurpleNotifyUserInfoEntryType | 679 * @param type The PurpleNotifyUserInfoEntryType |
658 */ | 680 */ |
659 void purple_notify_user_info_entry_set_type(PurpleNotifyUserInfoEntry *user_info_entry, | 681 void purple_notify_user_info_entry_set_type(PurpleNotifyUserInfoEntry *user_info_entry, |
660 PurpleNotifyUserInfoEntryType type); | 682 PurpleNotifyUserInfoEntryType type); |
661 | 683 |
662 /** | 684 /** |