]> git.0d.be Git - empathy.git/blob - libempathy-gtk/empathy-contact-selector.h
Merge commit 'staz/dnd'
[empathy.git] / libempathy-gtk / empathy-contact-selector.h
1 /*
2 *  Copyright (C) 2007 Marco Barisione <marco@barisione.org>
3 *  Copyright (C) 2008 Collabora Ltd.
4 *
5 *  This library is free software; you can redistribute it and/or
6 *  modify it under the terms of the GNU Lesser General Public
7 *  License as published by the Free Software Foundation; either
8 *  version 2.1 of the License, or (at your option) any later version.
9 *
10 *  This library is distributed in the hope that it will be useful,
11 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13 *  Lesser General Public License for more details.
14 *
15 *  You should have received a copy of the GNU Lesser General Public
16 *  License along with this library; if not, write to the Free Software
17 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18 *
19 *  Authors: Marco Barisione <marco@barisione.org>
20 *           Elliot Fairweather <elliot.fairweather@collabora.co.uk>
21 */
22
23 #ifndef __EMPATHY_CONTACT_SELECTOR_H__
24 #define __EMPATHY_CONTACT_SELECTOR_H__
25
26 G_BEGIN_DECLS
27
28 #include <glib-object.h>
29 #include <gtk/gtk.h>
30
31 #include <libempathy/empathy-contact.h>
32 #include <libempathy-gtk/empathy-contact-list-store.h>
33
34 #define EMPATHY_TYPE_CONTACT_SELECTOR (empathy_contact_selector_get_type ())
35 #define EMPATHY_CONTACT_SELECTOR(object) (G_TYPE_CHECK_INSTANCE_CAST \
36         ((object), EMPATHY_TYPE_CONTACT_SELECTOR, EmpathyContactSelector))
37 #define EMPATHY_CONTACT_SELECTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), \
38         EMPATHY_TYPE_CONTACT_SELECTOR, EmpathyContactSelectorClass))
39 #define EMPATHY_IS_CONTACT_SELECTOR(object) (G_TYPE_CHECK_INSTANCE_TYPE \
40     ((object), EMPATHY_TYPE_CONTACT_SELECTOR))
41 #define EMPATHY_IS_CONTACT_SELECTOR_CLASS(klass) \
42     (G_TYPE_CHECK_CLASS_TYPE ((klass), EMPATHY_TYPE_CONTACT_SELECTOR))
43 #define EMPATHY_CONTACT_SELECTOR_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS \
44     ((object), EMPATHY_TYPE_CONTACT_SELECTOR, EmpathyContactSelectorClass))
45
46 typedef struct _EmpathyContactSelector EmpathyContactSelector;
47 typedef struct _EmpathyContactSelectorClass EmpathyContactSelectorClass;
48
49 struct _EmpathyContactSelector
50 {
51   GtkComboBox parent;
52
53   /*<private>*/
54   gpointer priv;
55 };
56
57 struct _EmpathyContactSelectorClass
58 {
59   GtkComboBoxClass parent_class;
60 };
61
62 GType empathy_contact_selector_get_type (void) G_GNUC_CONST;
63
64 GtkWidget * empathy_contact_selector_new (EmpathyContactList *contact_list);
65
66 EmpathyContact * empathy_contact_selector_dup_selected (EmpathyContactSelector *selector);
67
68 typedef gboolean (*EmpathyContactSelectorFilterFunc) (EmpathyContact *contact, gpointer user_data);
69
70 void empathy_contact_selector_set_visible (EmpathyContactSelector *selector,
71    EmpathyContactSelectorFilterFunc func, gpointer user_data);
72
73 G_END_DECLS
74
75 #endif /* __EMPATHY_CONTACT_SELECTOR_H__ */