]> git.0d.be Git - empathy.git/blob - libempathy-gtk/gossip-contact-list-store.h
sv.po: Updated Swedish translation
[empathy.git] / libempathy-gtk / gossip-contact-list-store.h
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3  * Copyright (C) 2005-2007 Imendio AB
4  * Copyright (C) 2007 Collabora Ltd.
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License as
8  * published by the Free Software Foundation; either version 2 of the
9  * License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public
17  * License along with this program; if not, write to the
18  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  *
21  * Authors: Mikael Hallendal <micke@imendio.com>
22  *          Martyn Russell <martyn@imendio.com>
23  *          Xavier Claessens <xclaesse@gmail.com>
24  */
25
26 #ifndef __GOSSIP_CONTACT_LIST_STORE_H__
27 #define __GOSSIP_CONTACT_LIST_STORE_H__
28
29 #include <gtk/gtktreestore.h>
30
31 #include <libempathy/empathy-contact-list.h>
32 #include <libempathy/gossip-contact.h>
33
34 G_BEGIN_DECLS
35
36 /*
37  * GossipContactListStoreSort
38  */ 
39 #define GOSSIP_TYPE_CONTACT_LIST_STORE_SORT    (gossip_contact_list_store_sort_get_type ())
40
41 typedef enum {
42         GOSSIP_CONTACT_LIST_STORE_SORT_STATE,
43         GOSSIP_CONTACT_LIST_STORE_SORT_NAME
44 } GossipContactListStoreSort;
45
46 GType gossip_contact_list_store_sort_get_type (void) G_GNUC_CONST;
47
48 /*
49  * GossipContactListStore 
50  */ 
51 #define GOSSIP_TYPE_CONTACT_LIST_STORE         (gossip_contact_list_store_get_type ())
52 #define GOSSIP_CONTACT_LIST_STORE(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), GOSSIP_TYPE_CONTACT_LIST_STORE, GossipContactListStore))
53 #define GOSSIP_CONTACT_LIST_STORE_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), GOSSIP_TYPE_CONTACT_LIST_STORE, GossipContactListStoreClass))
54 #define GOSSIP_IS_CONTACT_LIST_STORE(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), GOSSIP_TYPE_CONTACT_LIST_STORE))
55 #define GOSSIP_IS_CONTACT_LIST_STORE_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), GOSSIP_TYPE_CONTACT_LIST_STORE))
56 #define GOSSIP_CONTACT_LIST_STORE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GOSSIP_TYPE_CONTACT_LIST_STORE, GossipContactListStoreClass))
57
58 typedef struct _GossipContactListStore      GossipContactListStore;
59 typedef struct _GossipContactListStoreClass GossipContactListStoreClass;
60 typedef struct _GossipContactListStorePriv  GossipContactListStorePriv;
61
62 enum {
63         COL_ICON_STATUS,
64         COL_PIXBUF_AVATAR,
65         COL_PIXBUF_AVATAR_VISIBLE,
66         COL_NAME,
67         COL_STATUS,
68         COL_STATUS_VISIBLE,
69         COL_CONTACT,
70         COL_IS_GROUP,
71         COL_IS_ACTIVE,
72         COL_IS_ONLINE,
73         COL_IS_SEPARATOR,
74         COL_COUNT
75 } GossipContactListStoreCol;
76
77 struct _GossipContactListStore {
78         GtkTreeStore            parent;
79 };
80
81 struct _GossipContactListStoreClass {
82         GtkTreeStoreClass       parent_class;
83 };
84 typedef GList *            (*GossipContactGroupsFunc)                   (GossipContact              *contact,
85                                                                          gpointer                    user_data);
86
87 GType                      gossip_contact_list_store_get_type           (void) G_GNUC_CONST;
88 GossipContactListStore *   gossip_contact_list_store_new                (EmpathyContactList         *list_iface);
89 EmpathyContactList *       gossip_contact_list_store_get_list_iface     (GossipContactListStore     *store);
90 gboolean                   gossip_contact_list_store_get_show_offline   (GossipContactListStore     *store);
91 void                       gossip_contact_list_store_set_show_offline   (GossipContactListStore     *store,
92                                                                          gboolean                    show_offline);
93 gboolean                   gossip_contact_list_store_get_show_avatars   (GossipContactListStore     *store);
94 void                       gossip_contact_list_store_set_show_avatars   (GossipContactListStore     *store,
95                                                                          gboolean                    show_avatars);
96 gboolean                   gossip_contact_list_store_get_is_compact     (GossipContactListStore     *store);
97 void                       gossip_contact_list_store_set_is_compact     (GossipContactListStore     *store,
98                                                                          gboolean                    is_compact);
99 GossipContactListStoreSort gossip_contact_list_store_get_sort_criterium (GossipContactListStore     *store);
100 void                       gossip_contact_list_store_set_sort_criterium (GossipContactListStore     *store,
101                                                                          GossipContactListStoreSort  sort_criterium);
102 gboolean                   gossip_contact_list_store_row_separator_func (GtkTreeModel               *model,
103                                                                          GtkTreeIter                *iter,
104                                                                          gpointer                    data);
105 gchar *                    gossip_contact_list_store_get_parent_group   (GtkTreeModel               *model,
106                                                                          GtkTreePath                *path,
107                                                                          gboolean                   *path_is_group);
108 gboolean                   gossip_contact_list_store_search_equal_func  (GtkTreeModel               *model,
109                                                                          gint                        column,
110                                                                          const gchar                *key,
111                                                                          GtkTreeIter                *iter,
112                                                                          gpointer                    search_data);
113 void                       gossip_contact_list_store_set_contact_groups_func (GossipContactListStore*store,
114                                                                          GossipContactGroupsFunc     func,
115                                                                          gpointer                    user_data);
116 void                       gossip_contact_list_store_update_contact_groups (GossipContactListStore  *store,
117                                                                          GossipContact              *contact);
118
119 G_END_DECLS
120
121 #endif /* __GOSSIP_CONTACT_LIST_STORE_H__ */
122