]> git.0d.be Git - empathy.git/blob - libempathy-gtk/empathy-contact-chooser.h
factor out start_gnome_contacts()
[empathy.git] / libempathy-gtk / empathy-contact-chooser.h
1 /*
2  * empathy-contact-chooser.h
3  *
4  * EmpathyContactChooser
5  *
6  * (c) 2010, Collabora Ltd.
7  *
8  * Authors:
9  *    Guillaume Desmottes <guillaume.desmottes@collabora.com>
10  */
11
12 #ifndef __EMPATHY_CONTACT_CHOOSER_H__
13 #define __EMPATHY_CONTACT_CHOOSER_H__
14
15 #include <gtk/gtk.h>
16
17 #include <telepathy-glib/account.h>
18
19 #include "libempathy/empathy-tp-chat.h"
20
21 G_BEGIN_DECLS
22
23 #define EMPATHY_TYPE_CONTACT_CHOOSER    (empathy_contact_chooser_get_type ())
24 #define EMPATHY_CONTACT_CHOOSER(obj)    (G_TYPE_CHECK_INSTANCE_CAST ((obj), EMPATHY_TYPE_CONTACT_CHOOSER, EmpathyContactChooser))
25 #define EMPATHY_CONTACT_CHOOSER_CLASS(obj)      (G_TYPE_CHECK_CLASS_CAST ((obj), EMPATHY_TYPE_CONTACT_CHOOSER, EmpathyContactChooserClass))
26 #define EMPATHY_IS_CONTACT_CHOOSER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EMPATHY_TYPE_CONTACT_CHOOSER))
27 #define EMPATHY_IS_CONTACT_CHOOSER_CLASS(obj)   (G_TYPE_CHECK_CLASS_TYPE ((obj), EMPATHY_TYPE_CONTACT_CHOOSER))
28 #define EMPATHY_CONTACT_CHOOSER_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), EMPATHY_TYPE_CONTACT_CHOOSER, EmpathyContactChooserClass))
29
30 typedef struct _EmpathyContactChooser EmpathyContactChooser;
31 typedef struct _EmpathyContactChooserClass EmpathyContactChooserClass;
32 typedef struct _EmpathyContactChooserPrivate EmpathyContactChooserPrivate;
33
34 typedef gboolean (*EmpathyContactChooserFilterFunc) (
35     EmpathyContactChooser *self,
36     FolksIndividual *individual,
37     gboolean is_online,
38     gboolean searching,
39     gpointer user_data);
40
41 struct _EmpathyContactChooser
42 {
43   GtkBox parent;
44
45   EmpathyContactChooserPrivate *priv;
46 };
47
48 struct _EmpathyContactChooserClass
49 {
50   GtkBoxClass parent_class;
51 };
52
53 GType empathy_contact_chooser_get_type (void);
54
55 GtkWidget * empathy_contact_chooser_new (void);
56
57 FolksIndividual * empathy_contact_chooser_dup_selected (
58     EmpathyContactChooser *self);
59
60 void empathy_contact_chooser_set_filter_func (EmpathyContactChooser *self,
61     EmpathyContactChooserFilterFunc func,
62     gpointer user_data);
63
64 void empathy_contact_chooser_show_search_entry (EmpathyContactChooser *self,
65     gboolean show);
66
67 void empathy_contact_chooser_show_tree_view (EmpathyContactChooser *self,
68     gboolean show);
69
70 G_END_DECLS
71
72 #endif