]> git.0d.be Git - empathy.git/blob - libempathy-gtk/empathy-contact-chooser.h
sort contacts by most recent event
[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 #include <folks/folks.h>
17
18 G_BEGIN_DECLS
19
20 #define EMPATHY_TYPE_CONTACT_CHOOSER    (empathy_contact_chooser_get_type ())
21 #define EMPATHY_CONTACT_CHOOSER(obj)    (G_TYPE_CHECK_INSTANCE_CAST ((obj), EMPATHY_TYPE_CONTACT_CHOOSER, EmpathyContactChooser))
22 #define EMPATHY_CONTACT_CHOOSER_CLASS(obj)      (G_TYPE_CHECK_CLASS_CAST ((obj), EMPATHY_TYPE_CONTACT_CHOOSER, EmpathyContactChooserClass))
23 #define EMPATHY_IS_CONTACT_CHOOSER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EMPATHY_TYPE_CONTACT_CHOOSER))
24 #define EMPATHY_IS_CONTACT_CHOOSER_CLASS(obj)   (G_TYPE_CHECK_CLASS_TYPE ((obj), EMPATHY_TYPE_CONTACT_CHOOSER))
25 #define EMPATHY_CONTACT_CHOOSER_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), EMPATHY_TYPE_CONTACT_CHOOSER, EmpathyContactChooserClass))
26
27 typedef struct _EmpathyContactChooser EmpathyContactChooser;
28 typedef struct _EmpathyContactChooserClass EmpathyContactChooserClass;
29 typedef struct _EmpathyContactChooserPrivate EmpathyContactChooserPrivate;
30
31 typedef gboolean (*EmpathyContactChooserFilterFunc) (
32     EmpathyContactChooser *self,
33     FolksIndividual *individual,
34     gboolean is_online,
35     gboolean searching,
36     gpointer user_data);
37
38 struct _EmpathyContactChooser
39 {
40   GtkBox parent;
41
42   EmpathyContactChooserPrivate *priv;
43 };
44
45 struct _EmpathyContactChooserClass
46 {
47   GtkBoxClass parent_class;
48 };
49
50 GType empathy_contact_chooser_get_type (void);
51
52 GtkWidget * empathy_contact_chooser_new (void);
53
54 FolksIndividual * empathy_contact_chooser_dup_selected (
55     EmpathyContactChooser *self);
56
57 void empathy_contact_chooser_set_filter_func (EmpathyContactChooser *self,
58     EmpathyContactChooserFilterFunc func,
59     gpointer user_data);
60
61 void empathy_contact_chooser_show_search_entry (EmpathyContactChooser *self,
62     gboolean show);
63
64 void empathy_contact_chooser_show_tree_view (EmpathyContactChooser *self,
65     gboolean show);
66
67 G_END_DECLS
68
69 #endif