Mercurial > pidgin
comparison libpurple/request.h @ 21337:998cf5d0b401
disapproval of revision '0e51fd6f70ba330cbc25cff479b5c6325e939196'
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Fri, 16 Nov 2007 23:00:03 +0000 |
parents | aabe638f56d9 |
children | b00c94436918 |
comparison
equal
deleted
inserted
replaced
21234:aabe638f56d9 | 21337:998cf5d0b401 |
---|---|
1313 const char *ok_text, GCallback ok_cb, | 1313 const char *ok_text, GCallback ok_cb, |
1314 const char *cancel_text, GCallback cancel_cb, | 1314 const char *cancel_text, GCallback cancel_cb, |
1315 PurpleAccount *account, const char *who, PurpleConversation *conv, | 1315 PurpleAccount *account, const char *who, PurpleConversation *conv, |
1316 const char *ui_hint, void *user_data); | 1316 const char *ui_hint, void *user_data); |
1317 | 1317 |
1318 #ifndef PURPLE_DISABLE_DEPRECATED | |
1319 /** | 1318 /** |
1320 * Prompts the user for text input. | 1319 * Prompts the user for text input. |
1321 * | 1320 * |
1322 * @param handle The plugin or connection handle. For some | 1321 * @param handle The plugin or connection handle. For some |
1323 * things this is EXTREMELY important. The | 1322 * things this is EXTREMELY important. The |
1361 gboolean multiline, gboolean masked, gchar *hint, | 1360 gboolean multiline, gboolean masked, gchar *hint, |
1362 const char *ok_text, GCallback ok_cb, | 1361 const char *ok_text, GCallback ok_cb, |
1363 const char *cancel_text, GCallback cancel_cb, | 1362 const char *cancel_text, GCallback cancel_cb, |
1364 PurpleAccount *account, const char *who, PurpleConversation *conv, | 1363 PurpleAccount *account, const char *who, PurpleConversation *conv, |
1365 void *user_data); | 1364 void *user_data); |
1366 #endif | |
1367 | 1365 |
1368 /** | 1366 /** |
1369 * Prompts the user for multiple-choice input. | 1367 * Prompts the user for multiple-choice input. |
1370 * | 1368 * |
1371 * @param handle The plugin or connection handle. For some | 1369 * @param handle The plugin or connection handle. For some |
1397 const char *ok_text, GCallback ok_cb, | 1395 const char *ok_text, GCallback ok_cb, |
1398 const char *cancel_text, GCallback cancel_cb, | 1396 const char *cancel_text, GCallback cancel_cb, |
1399 PurpleAccount *account, const char *who, PurpleConversation *conv, | 1397 PurpleAccount *account, const char *who, PurpleConversation *conv, |
1400 const char *ui_hint, void *user_data, ...) G_GNUC_NULL_TERMINATED; | 1398 const char *ui_hint, void *user_data, ...) G_GNUC_NULL_TERMINATED; |
1401 | 1399 |
1402 #ifndef PURPLE_DISABLE_DEPRECATED | |
1403 /** | 1400 /** |
1404 * Prompts the user for multiple-choice input. | 1401 * Prompts the user for multiple-choice input. |
1405 * | 1402 * |
1406 * @param handle The plugin or connection handle. For some | 1403 * @param handle The plugin or connection handle. For some |
1407 * things this is EXTREMELY important. See | 1404 * things this is EXTREMELY important. See |
1431 int default_value, | 1428 int default_value, |
1432 const char *ok_text, GCallback ok_cb, | 1429 const char *ok_text, GCallback ok_cb, |
1433 const char *cancel_text, GCallback cancel_cb, | 1430 const char *cancel_text, GCallback cancel_cb, |
1434 PurpleAccount *account, const char *who, PurpleConversation *conv, | 1431 PurpleAccount *account, const char *who, PurpleConversation *conv, |
1435 void *user_data, ...) G_GNUC_NULL_TERMINATED; | 1432 void *user_data, ...) G_GNUC_NULL_TERMINATED; |
1436 #endif | |
1437 | 1433 |
1438 /** | 1434 /** |
1439 * Prompts the user for multiple-choice input. | 1435 * Prompts the user for multiple-choice input. |
1440 * | 1436 * |
1441 * @param handle The plugin or connection handle. For some | 1437 * @param handle The plugin or connection handle. For some |
1467 const char *ok_text, GCallback ok_cb, | 1463 const char *ok_text, GCallback ok_cb, |
1468 const char *cancel_text, GCallback cancel_cb, | 1464 const char *cancel_text, GCallback cancel_cb, |
1469 PurpleAccount *account, const char *who, PurpleConversation *conv, | 1465 PurpleAccount *account, const char *who, PurpleConversation *conv, |
1470 const char *ui_hint, void *user_data, va_list choices); | 1466 const char *ui_hint, void *user_data, va_list choices); |
1471 | 1467 |
1472 #ifndef PURPLE_DISABLE_DEPRECATED | |
1473 /** | 1468 /** |
1474 * Prompts the user for multiple-choice input. | 1469 * Prompts the user for multiple-choice input. |
1475 * | 1470 * |
1476 * @param handle The plugin or connection handle. For some | 1471 * @param handle The plugin or connection handle. For some |
1477 * things this is EXTREMELY important. See | 1472 * things this is EXTREMELY important. See |
1501 int default_value, | 1496 int default_value, |
1502 const char *ok_text, GCallback ok_cb, | 1497 const char *ok_text, GCallback ok_cb, |
1503 const char *cancel_text, GCallback cancel_cb, | 1498 const char *cancel_text, GCallback cancel_cb, |
1504 PurpleAccount *account, const char *who, PurpleConversation *conv, | 1499 PurpleAccount *account, const char *who, PurpleConversation *conv, |
1505 void *user_data, va_list choices); | 1500 void *user_data, va_list choices); |
1506 #endif | |
1507 | 1501 |
1508 /** | 1502 /** |
1509 * Prompts the user for an action. | 1503 * Prompts the user for an action. |
1510 * | 1504 * |
1511 * This is often represented as a dialog with a button for each action. | 1505 * This is often represented as a dialog with a button for each action. |
1539 const char *primary, const char *secondary, | 1533 const char *primary, const char *secondary, |
1540 int default_action, | 1534 int default_action, |
1541 PurpleAccount *account, const char *who, PurpleConversation *conv, | 1535 PurpleAccount *account, const char *who, PurpleConversation *conv, |
1542 const char *ui_hint, void *user_data, size_t action_count, ...); | 1536 const char *ui_hint, void *user_data, size_t action_count, ...); |
1543 | 1537 |
1544 #ifndef PURPLE_DISABLE_DEPRECATED | |
1545 /** | 1538 /** |
1546 * Prompts the user for an action. | 1539 * Prompts the user for an action. |
1547 * | 1540 * |
1548 * This is often represented as a dialog with a button for each action. | 1541 * This is often represented as a dialog with a button for each action. |
1549 * | 1542 * |
1575 void *purple_request_action(void *handle, const char *title, | 1568 void *purple_request_action(void *handle, const char *title, |
1576 const char *primary, const char *secondary, | 1569 const char *primary, const char *secondary, |
1577 int default_action, | 1570 int default_action, |
1578 PurpleAccount *account, const char *who, PurpleConversation *conv, | 1571 PurpleAccount *account, const char *who, PurpleConversation *conv, |
1579 void *user_data, size_t action_count, ...); | 1572 void *user_data, size_t action_count, ...); |
1580 #endif | |
1581 | 1573 |
1582 /** | 1574 /** |
1583 * Prompts the user for an action. | 1575 * Prompts the user for an action. |
1584 * | 1576 * |
1585 * This is often represented as a dialog with a button for each action. | 1577 * This is often represented as a dialog with a button for each action. |
1608 int default_action, | 1600 int default_action, |
1609 PurpleAccount *account, const char *who, PurpleConversation *conv, | 1601 PurpleAccount *account, const char *who, PurpleConversation *conv, |
1610 const char *ui_hint, void *user_data, size_t action_count, | 1602 const char *ui_hint, void *user_data, size_t action_count, |
1611 va_list actions); | 1603 va_list actions); |
1612 | 1604 |
1613 #ifndef PURPLE_DISABLE_DEPRECATED | |
1614 /** | 1605 /** |
1615 * Prompts the user for an action. | 1606 * Prompts the user for an action. |
1616 * | 1607 * |
1617 * This is often represented as a dialog with a button for each action. | 1608 * This is often represented as a dialog with a button for each action. |
1618 * | 1609 * |
1639 const char *primary, const char *secondary, | 1630 const char *primary, const char *secondary, |
1640 int default_action, | 1631 int default_action, |
1641 PurpleAccount *account, const char *who, PurpleConversation *conv, | 1632 PurpleAccount *account, const char *who, PurpleConversation *conv, |
1642 void *user_data, size_t action_count, | 1633 void *user_data, size_t action_count, |
1643 va_list actions); | 1634 va_list actions); |
1644 #endif | |
1645 | 1635 |
1646 /** | 1636 /** |
1647 * Displays groups of fields for the user to fill in. | 1637 * Displays groups of fields for the user to fill in. |
1648 * | 1638 * |
1649 * @param handle The plugin or connection handle. For some | 1639 * @param handle The plugin or connection handle. For some |
1673 const char *ok_text, GCallback ok_cb, | 1663 const char *ok_text, GCallback ok_cb, |
1674 const char *cancel_text, GCallback cancel_cb, | 1664 const char *cancel_text, GCallback cancel_cb, |
1675 PurpleAccount *account, const char *who, PurpleConversation *conv, | 1665 PurpleAccount *account, const char *who, PurpleConversation *conv, |
1676 const char *ui_hint, void *user_data); | 1666 const char *ui_hint, void *user_data); |
1677 | 1667 |
1678 #ifndef PURPLE_DISABLE_DEPRECATED | |
1679 /** | 1668 /** |
1680 * Displays groups of fields for the user to fill in. | 1669 * Displays groups of fields for the user to fill in. |
1681 * | 1670 * |
1682 * @param handle The plugin or connection handle. For some | 1671 * @param handle The plugin or connection handle. For some |
1683 * things this is EXTREMELY important. See | 1672 * things this is EXTREMELY important. See |
1705 PurpleRequestFields *fields, | 1694 PurpleRequestFields *fields, |
1706 const char *ok_text, GCallback ok_cb, | 1695 const char *ok_text, GCallback ok_cb, |
1707 const char *cancel_text, GCallback cancel_cb, | 1696 const char *cancel_text, GCallback cancel_cb, |
1708 PurpleAccount *account, const char *who, PurpleConversation *conv, | 1697 PurpleAccount *account, const char *who, PurpleConversation *conv, |
1709 void *user_data); | 1698 void *user_data); |
1710 #endif | |
1711 | 1699 |
1712 /** | 1700 /** |
1713 * Closes a request. | 1701 * Closes a request. |
1714 * | 1702 * |
1715 * @param type The request type. | 1703 * @param type The request type. |
1734 ui_hint, user_data, yes_cb, no_cb) \ | 1722 ui_hint, user_data, yes_cb, no_cb) \ |
1735 purple_request_action_with_hint((handle), (title), (primary), (secondary), \ | 1723 purple_request_action_with_hint((handle), (title), (primary), (secondary), \ |
1736 (default_action), account, who, conv, (ui_hint), (user_data), 2, \ | 1724 (default_action), account, who, conv, (ui_hint), (user_data), 2, \ |
1737 _("_Yes"), (yes_cb), _("_No"), (no_cb)) | 1725 _("_Yes"), (yes_cb), _("_No"), (no_cb)) |
1738 | 1726 |
1739 #ifndef PURPLE_DISABLE_DEPRECATED | |
1740 /** | 1727 /** |
1741 * A wrapper for purple_request_action() that uses @c Yes and @c No buttons. | 1728 * A wrapper for purple_request_action() that uses @c Yes and @c No buttons. |
1742 * | 1729 * |
1743 * @deprecated Please use purple_request_yes_no_with_hint instead. | 1730 * @deprecated Please use purple_request_yes_no_with_hint instead. |
1744 */ | 1731 */ |
1746 default_action, account, who, conv, \ | 1733 default_action, account, who, conv, \ |
1747 user_data, yes_cb, no_cb) \ | 1734 user_data, yes_cb, no_cb) \ |
1748 purple_request_action((handle), (title), (primary), (secondary), \ | 1735 purple_request_action((handle), (title), (primary), (secondary), \ |
1749 (default_action), account, who, conv, (user_data), 2, \ | 1736 (default_action), account, who, conv, (user_data), 2, \ |
1750 _("_Yes"), (yes_cb), _("_No"), (no_cb)) | 1737 _("_Yes"), (yes_cb), _("_No"), (no_cb)) |
1751 #endif | |
1752 | 1738 |
1753 /** | 1739 /** |
1754 * A wrapper for purple_request_action() that uses @c OK and @c Cancel buttons. | 1740 * A wrapper for purple_request_action() that uses @c OK and @c Cancel buttons. |
1755 * | 1741 * |
1756 * @since 2.3.0 | 1742 * @since 2.3.0 |
1760 ui_hint, user_data, ok_cb, cancel_cb) \ | 1746 ui_hint, user_data, ok_cb, cancel_cb) \ |
1761 purple_request_action_with_hint((handle), (title), (primary), (secondary), \ | 1747 purple_request_action_with_hint((handle), (title), (primary), (secondary), \ |
1762 (default_action), account, who, conv, (ui_hint), (user_data), 2, \ | 1748 (default_action), account, who, conv, (ui_hint), (user_data), 2, \ |
1763 _("_OK"), (ok_cb), _("_Cancel"), (cancel_cb)) | 1749 _("_OK"), (ok_cb), _("_Cancel"), (cancel_cb)) |
1764 | 1750 |
1765 #ifndef PURPLE_DISABLE_DEPRECATED | |
1766 /** | 1751 /** |
1767 * A wrapper for purple_request_action() that uses @c OK and @c Cancel buttons. | 1752 * A wrapper for purple_request_action() that uses @c OK and @c Cancel buttons. |
1768 * | 1753 * |
1769 * @deprecated Please use purple_request_ok_cancel_with_hint instead. | 1754 * @deprecated Please use purple_request_ok_cancel_with_hint instead. |
1770 */ | 1755 */ |
1772 default_action, account, who, conv, \ | 1757 default_action, account, who, conv, \ |
1773 user_data, ok_cb, cancel_cb) \ | 1758 user_data, ok_cb, cancel_cb) \ |
1774 purple_request_action((handle), (title), (primary), (secondary), \ | 1759 purple_request_action((handle), (title), (primary), (secondary), \ |
1775 (default_action), account, who, conv, (user_data), 2, \ | 1760 (default_action), account, who, conv, (user_data), 2, \ |
1776 _("_OK"), (ok_cb), _("_Cancel"), (cancel_cb)) | 1761 _("_OK"), (ok_cb), _("_Cancel"), (cancel_cb)) |
1777 #endif | |
1778 | 1762 |
1779 /** | 1763 /** |
1780 * A wrapper for purple_request_action() that uses Accept and Cancel buttons. | 1764 * A wrapper for purple_request_action() that uses Accept and Cancel buttons. |
1781 * | 1765 * |
1782 * @since 2.3.0 | 1766 * @since 2.3.0 |
1786 ui_hint, user_data, accept_cb, cancel_cb) \ | 1770 ui_hint, user_data, accept_cb, cancel_cb) \ |
1787 purple_request_action_with_hint((handle), (title), (primary), (secondary), \ | 1771 purple_request_action_with_hint((handle), (title), (primary), (secondary), \ |
1788 (default_action), account, who, conv, (ui_hint), (user_data), 2, \ | 1772 (default_action), account, who, conv, (ui_hint), (user_data), 2, \ |
1789 _("_Accept"), (accept_cb), _("_Cancel"), (cancel_cb)) | 1773 _("_Accept"), (accept_cb), _("_Cancel"), (cancel_cb)) |
1790 | 1774 |
1791 #ifndef PURPLE_DISABLE_DEPRECATED | |
1792 /** | 1775 /** |
1793 * A wrapper for purple_request_action() that uses Accept and Cancel buttons. | 1776 * A wrapper for purple_request_action() that uses Accept and Cancel buttons. |
1794 * | 1777 * |
1795 * @deprecated Please use purple_request_accept_cancel_with_hint instead. | 1778 * @deprecated Please use purple_request_accept_cancel_with_hint instead. |
1796 */ | 1779 */ |
1798 default_action, account, who, conv, \ | 1781 default_action, account, who, conv, \ |
1799 user_data, accept_cb, cancel_cb) \ | 1782 user_data, accept_cb, cancel_cb) \ |
1800 purple_request_action((handle), (title), (primary), (secondary), \ | 1783 purple_request_action((handle), (title), (primary), (secondary), \ |
1801 (default_action), account, who, conv, (user_data), 2, \ | 1784 (default_action), account, who, conv, (user_data), 2, \ |
1802 _("_Accept"), (accept_cb), _("_Cancel"), (cancel_cb)) | 1785 _("_Accept"), (accept_cb), _("_Cancel"), (cancel_cb)) |
1803 #endif | |
1804 | 1786 |
1805 /** | 1787 /** |
1806 * Displays a file selector request dialog. Returns the selected filename to | 1788 * Displays a file selector request dialog. Returns the selected filename to |
1807 * the callback. Can be used for either opening a file or saving a file. | 1789 * the callback. Can be used for either opening a file or saving a file. |
1808 * | 1790 * |
1829 gboolean savedialog, | 1811 gboolean savedialog, |
1830 GCallback ok_cb, GCallback cancel_cb, | 1812 GCallback ok_cb, GCallback cancel_cb, |
1831 PurpleAccount *account, const char *who, PurpleConversation *conv, | 1813 PurpleAccount *account, const char *who, PurpleConversation *conv, |
1832 const char *ui_hint, void *user_data); | 1814 const char *ui_hint, void *user_data); |
1833 | 1815 |
1834 #ifndef PURPLE_DISABLE_DEPRECATED | |
1835 /** | 1816 /** |
1836 * Displays a file selector request dialog. Returns the selected filename to | 1817 * Displays a file selector request dialog. Returns the selected filename to |
1837 * the callback. Can be used for either opening a file or saving a file. | 1818 * the callback. Can be used for either opening a file or saving a file. |
1838 * | 1819 * |
1839 * @param handle The plugin or connection handle. For some | 1820 * @param handle The plugin or connection handle. For some |
1858 void *purple_request_file(void *handle, const char *title, const char *filename, | 1839 void *purple_request_file(void *handle, const char *title, const char *filename, |
1859 gboolean savedialog, | 1840 gboolean savedialog, |
1860 GCallback ok_cb, GCallback cancel_cb, | 1841 GCallback ok_cb, GCallback cancel_cb, |
1861 PurpleAccount *account, const char *who, PurpleConversation *conv, | 1842 PurpleAccount *account, const char *who, PurpleConversation *conv, |
1862 void *user_data); | 1843 void *user_data); |
1863 #endif | |
1864 | 1844 |
1865 /** | 1845 /** |
1866 * Displays a folder select dialog. Returns the selected filename to | 1846 * Displays a folder select dialog. Returns the selected filename to |
1867 * the callback. | 1847 * the callback. |
1868 * | 1848 * |
1886 void *purple_request_folder_with_hint(void *handle, const char *title, const char *dirname, | 1866 void *purple_request_folder_with_hint(void *handle, const char *title, const char *dirname, |
1887 GCallback ok_cb, GCallback cancel_cb, | 1867 GCallback ok_cb, GCallback cancel_cb, |
1888 PurpleAccount *account, const char *who, PurpleConversation *conv, | 1868 PurpleAccount *account, const char *who, PurpleConversation *conv, |
1889 const char *ui_hint, void *user_data); | 1869 const char *ui_hint, void *user_data); |
1890 | 1870 |
1891 #ifndef PURPLE_DISABLE_DEPRECATED | |
1892 /** | 1871 /** |
1893 * Displays a folder select dialog. Returns the selected filename to | 1872 * Displays a folder select dialog. Returns the selected filename to |
1894 * the callback. | 1873 * the callback. |
1895 * | 1874 * |
1896 * @param handle The plugin or connection handle. For some | 1875 * @param handle The plugin or connection handle. For some |
1912 */ | 1891 */ |
1913 void *purple_request_folder(void *handle, const char *title, const char *dirname, | 1892 void *purple_request_folder(void *handle, const char *title, const char *dirname, |
1914 GCallback ok_cb, GCallback cancel_cb, | 1893 GCallback ok_cb, GCallback cancel_cb, |
1915 PurpleAccount *account, const char *who, PurpleConversation *conv, | 1894 PurpleAccount *account, const char *who, PurpleConversation *conv, |
1916 void *user_data); | 1895 void *user_data); |
1917 #endif | |
1918 | 1896 |
1919 /*@}*/ | 1897 /*@}*/ |
1920 | 1898 |
1921 /**************************************************************************/ | 1899 /**************************************************************************/ |
1922 /** @name UI Registration Functions */ | 1900 /** @name UI Registration Functions */ |