pidgin/pidginaccountchooser.h

changeset 39785
aa7e3b71802d
child 39786
7800f52d0ae6
equal deleted inserted replaced
39784:77e253a26eb9 39785:aa7e3b71802d
1 /* pidgin
2 *
3 * Pidgin is the legal property of its developers, whose names are too numerous
4 * to list here. Please refer to the COPYRIGHT file distributed with this
5 * source distribution.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
20 */
21
22 #ifndef PIDGIN_ACCOUNT_CHOOSER_H
23 #define PIDGIN_ACCOUNT_CHOOSER_H
24 /**
25 * SECTION:pidgin-account-chooser
26 * @section_id: pidgin-account-chooser
27 * @short_description: <filename>pidginaccountchooser.h</filename>
28 * @title: Pidgin Account Chooser Widget
29 */
30
31 #include "pidgin.h"
32
33 #include "account.h"
34
35 G_BEGIN_DECLS
36
37 /**
38 * pidgin_account_option_menu_new:
39 * @default_account: The account to select by default.
40 * @show_all: Whether or not to show all accounts, or just
41 * active accounts.
42 * @cb: (scope call): The callback to call when an account is selected.
43 * @filter_func: (scope call): A function for checking if an account should
44 * be shown. This can be NULL.
45 * @user_data: Data to pass to the callback function.
46 *
47 * Creates a drop-down option menu filled with accounts.
48 *
49 * Returns: (transfer full): The drop-down option menu.
50 */
51 GtkWidget *pidgin_account_option_menu_new(PurpleAccount *default_account,
52 gboolean show_all, GCallback cb,
53 PurpleFilterAccountFunc filter_func,
54 gpointer user_data);
55
56 /**
57 * pidgin_account_option_menu_get_selected:
58 * @optmenu: The drop-down option menu created by
59 * pidgin_account_option_menu_new.
60 *
61 * Gets the currently selected account from an account drop down box.
62 *
63 * Returns: (transfer none): Returns the PurpleAccount that is currently
64 * selected.
65 */
66 PurpleAccount *pidgin_account_option_menu_get_selected(GtkWidget *optmenu);
67
68 /**
69 * pidgin_account_option_menu_set_selected:
70 * @optmenu: The GtkOptionMenu created by
71 * pidgin_account_option_menu_new.
72 * @account: The PurpleAccount to select.
73 *
74 * Sets the currently selected account for an account drop down box.
75 */
76 void pidgin_account_option_menu_set_selected(GtkWidget *optmenu,
77 PurpleAccount *account);
78
79 G_END_DECLS
80
81 #endif /* PIDGIN_ACCOUNT_CHOOSER_H */

mercurial