Simplify handling of GG xfer auth queue.
[pidgin-git.git] / pidgin / pidginaccountchooser.h
blob76e083e4d3d17d2528f07044fa0014322d6bc2cc
1 /* pidgin
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.
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.
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.
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
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 Combo Box Widget
31 #include <gtk/gtk.h>
33 #include "pidgin.h"
35 #include "account.h"
37 G_BEGIN_DECLS
39 #define PIDGIN_TYPE_ACCOUNT_CHOOSER (pidgin_account_chooser_get_type())
41 G_DECLARE_FINAL_TYPE(PidginAccountChooser, pidgin_account_chooser, PIDGIN,
42 ACCOUNT_CHOOSER, GtkComboBox)
44 /**
45 * pidgin_account_chooser_new:
46 * @default_account: The account to select by default.
47 * @show_all: Whether or not to show all accounts, or just active accounts.
49 * Creates a combo box filled with accounts.
51 * Returns: (transfer full): The account chooser combo box.
53 * Since: 3.0.0
55 GtkWidget *pidgin_account_chooser_new(PurpleAccount *default_account,
56 gboolean show_all);
58 /**
59 * pidgin_account_chooser_set_filter_func:
60 * @chooser: The account chooser combo box.
61 * @filter_func: A function for checking if an account should be shown. This
62 * can be %NULL to remove any filter.
64 * Set the filter function used to determine which accounts to show.
66 * Since: 3.0.0
68 void pidgin_account_chooser_set_filter_func(
69 PidginAccountChooser *chooser, PurpleFilterAccountFunc filter_func);
71 /**
72 * pidgin_account_chooser_get_selected:
73 * @chooser: The chooser created by pidgin_account_chooser_new().
75 * Gets the currently selected account from an account combo box.
77 * Returns: (transfer none): Returns the #PurpleAccount that is currently
78 * selected.
80 * Since: 3.0.0
82 PurpleAccount *pidgin_account_chooser_get_selected(GtkWidget *chooser);
84 /**
85 * pidgin_account_chooser_set_selected:
86 * @chooser: The chooser created by pidgin_account_chooser_new().
87 * @account: The #PurpleAccount to select.
89 * Sets the currently selected account for an account combo box.
91 * Since: 3.0.0
93 void pidgin_account_chooser_set_selected(GtkWidget *chooser,
94 PurpleAccount *account);
96 G_END_DECLS
98 #endif /* PIDGIN_ACCOUNT_CHOOSER_H */