]> git.0d.be Git - empathy.git/blob - libempathy-gtk/gossip-contact-list-model.h
Split GossipContactList into two objects: GossipContactListStore
[empathy.git] / libempathy-gtk / gossip-contact-list-model.h
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3  * Copyright (C) 2004-2007 Imendio AB
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License as
7  * published by the Free Software Foundation; either version 2 of the
8  * License, or (at your option) any later version.
9  *
10  * This program 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  * General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public
16  * License along with this program; if not, write to the
17  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18  * Boston, MA 02111-1307, USA.
19  *
20  * Authors: Mikael Hallendal <micke@imendio.com>
21  *          Martyn Russell <martyn@imendio.com>
22  */
23
24 #ifndef __GOSSIP_CONTACT_LIST_H__
25 #define __GOSSIP_CONTACT_LIST_H__
26
27 #include <gtk/gtktreeview.h>
28
29 #include <libempathy/gossip-contact.h>
30
31 G_BEGIN_DECLS
32
33 /*
34  * GossipContactListSort
35  */ 
36 #define GOSSIP_TYPE_CONTACT_LIST_SORT    (gossip_contact_list_sort_get_type ())
37
38 typedef enum {
39         GOSSIP_CONTACT_LIST_SORT_STATE,
40         GOSSIP_CONTACT_LIST_SORT_NAME
41 } GossipContactListSort;
42
43 GType gossip_contact_list_sort_get_type (void) G_GNUC_CONST;
44
45 /*
46  * GossipContactList 
47  */ 
48 #define GOSSIP_TYPE_CONTACT_LIST         (gossip_contact_list_get_type ())
49 #define GOSSIP_CONTACT_LIST(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), GOSSIP_TYPE_CONTACT_LIST, GossipContactList))
50 #define GOSSIP_CONTACT_LIST_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), GOSSIP_TYPE_CONTACT_LIST, GossipContactListClass))
51 #define GOSSIP_IS_CONTACT_LIST(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), GOSSIP_TYPE_CONTACT_LIST))
52 #define GOSSIP_IS_CONTACT_LIST_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), GOSSIP_TYPE_CONTACT_LIST))
53 #define GOSSIP_CONTACT_LIST_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GOSSIP_TYPE_CONTACT_LIST, GossipContactListClass))
54
55 typedef struct _GossipContactList      GossipContactList;
56 typedef struct _GossipContactListClass GossipContactListClass;
57 typedef struct _GossipContactListPriv  GossipContactListPriv;
58
59 struct _GossipContactList {
60         GtkTreeView            parent;
61 };
62
63 struct _GossipContactListClass {
64         GtkTreeViewClass       parent_class;
65 };
66
67 GType                 gossip_contact_list_get_type           (void) G_GNUC_CONST;
68 GossipContactList *   gossip_contact_list_new                (void);
69 GossipContact *       gossip_contact_list_get_selected       (GossipContactList     *list);
70 gchar *               gossip_contact_list_get_selected_group (GossipContactList     *list);
71 gboolean              gossip_contact_list_get_show_offline   (GossipContactList     *list);
72 gboolean              gossip_contact_list_get_show_avatars   (GossipContactList     *list);
73 gboolean              gossip_contact_list_get_is_compact     (GossipContactList     *list);
74 GossipContactListSort gossip_contact_list_get_sort_criterium (GossipContactList     *list);
75 GtkWidget *           gossip_contact_list_get_contact_menu   (GossipContactList     *list,
76                                                               GossipContact         *contact);
77 GtkWidget *           gossip_contact_list_get_group_menu     (GossipContactList     *list);
78 void                  gossip_contact_list_set_show_offline   (GossipContactList     *list,
79                                                               gboolean               show_offline);
80 void                  gossip_contact_list_set_show_avatars   (GossipContactList     *list,
81                                                               gboolean               show_avatars);
82 void                  gossip_contact_list_set_is_compact     (GossipContactList     *list,
83                                                               gboolean               is_compact);
84 void                  gossip_contact_list_set_sort_criterium (GossipContactList     *list,
85                                                               GossipContactListSort  sort_criterium);
86 void                  gossip_contact_list_set_filter         (GossipContactList     *list,
87                                                               const gchar           *filter);
88
89 G_END_DECLS
90
91 #endif /* __GOSSIP_CONTACT_LIST_H__ */
92