]> git.0d.be Git - empathy.git/blob - libempathy-gtk/empathy-contact-list-store.h
Remove empathy-marshal-main.c and include empathy-marshal.h from
[empathy.git] / libempathy-gtk / empathy-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 __EMPATHY_CONTACT_LIST_STORE_H__
27 #define __EMPATHY_CONTACT_LIST_STORE_H__
28
29 #include <gtk/gtktreestore.h>
30
31 #include <libempathy/empathy-contact-list.h>
32 #include <libempathy/empathy-contact.h>
33
34 G_BEGIN_DECLS
35
36 /*
37  * EmpathyContactListStoreSort
38  */ 
39 typedef enum {
40         EMPATHY_CONTACT_LIST_STORE_SORT_STATE,
41         EMPATHY_CONTACT_LIST_STORE_SORT_NAME
42 } EmpathyContactListStoreSort;
43
44 /*
45  * EmpathyContactListStore 
46  */ 
47 #define EMPATHY_TYPE_CONTACT_LIST_STORE         (empathy_contact_list_store_get_type ())
48 #define EMPATHY_CONTACT_LIST_STORE(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), EMPATHY_TYPE_CONTACT_LIST_STORE, EmpathyContactListStore))
49 #define EMPATHY_CONTACT_LIST_STORE_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), EMPATHY_TYPE_CONTACT_LIST_STORE, EmpathyContactListStoreClass))
50 #define EMPATHY_IS_CONTACT_LIST_STORE(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), EMPATHY_TYPE_CONTACT_LIST_STORE))
51 #define EMPATHY_IS_CONTACT_LIST_STORE_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), EMPATHY_TYPE_CONTACT_LIST_STORE))
52 #define EMPATHY_CONTACT_LIST_STORE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EMPATHY_TYPE_CONTACT_LIST_STORE, EmpathyContactListStoreClass))
53
54 typedef struct _EmpathyContactListStore      EmpathyContactListStore;
55 typedef struct _EmpathyContactListStoreClass EmpathyContactListStoreClass;
56 typedef struct _EmpathyContactListStorePriv  EmpathyContactListStorePriv;
57
58 enum {
59         COL_ICON_STATUS,
60         COL_PIXBUF_AVATAR,
61         COL_PIXBUF_AVATAR_VISIBLE,
62         COL_NAME,
63         COL_STATUS,
64         COL_STATUS_VISIBLE,
65         COL_CONTACT,
66         COL_IS_GROUP,
67         COL_IS_ACTIVE,
68         COL_IS_ONLINE,
69         COL_IS_SEPARATOR,
70         COL_COUNT
71 } EmpathyContactListStoreCol;
72
73 struct _EmpathyContactListStore {
74         GtkTreeStore            parent;
75 };
76
77 struct _EmpathyContactListStoreClass {
78         GtkTreeStoreClass       parent_class;
79 };
80 typedef GList *            (*EmpathyContactGroupsFunc)                   (EmpathyContact              *contact,
81                                                                          gpointer                    user_data);
82
83 GType                      empathy_contact_list_store_get_type           (void) G_GNUC_CONST;
84 EmpathyContactListStore *   empathy_contact_list_store_new                (EmpathyContactList         *list_iface);
85 EmpathyContactList *       empathy_contact_list_store_get_list_iface     (EmpathyContactListStore     *store);
86 gboolean                   empathy_contact_list_store_get_show_offline   (EmpathyContactListStore     *store);
87 void                       empathy_contact_list_store_set_show_offline   (EmpathyContactListStore     *store,
88                                                                          gboolean                    show_offline);
89 gboolean                   empathy_contact_list_store_get_show_avatars   (EmpathyContactListStore     *store);
90 void                       empathy_contact_list_store_set_show_avatars   (EmpathyContactListStore     *store,
91                                                                          gboolean                    show_avatars);
92 gboolean                   empathy_contact_list_store_get_is_compact     (EmpathyContactListStore     *store);
93 void                       empathy_contact_list_store_set_is_compact     (EmpathyContactListStore     *store,
94                                                                          gboolean                    is_compact);
95 EmpathyContactListStoreSort empathy_contact_list_store_get_sort_criterium (EmpathyContactListStore     *store);
96 void                       empathy_contact_list_store_set_sort_criterium (EmpathyContactListStore     *store,
97                                                                          EmpathyContactListStoreSort  sort_criterium);
98 gboolean                   empathy_contact_list_store_row_separator_func (GtkTreeModel               *model,
99                                                                          GtkTreeIter                *iter,
100                                                                          gpointer                    data);
101 gchar *                    empathy_contact_list_store_get_parent_group   (GtkTreeModel               *model,
102                                                                          GtkTreePath                *path,
103                                                                          gboolean                   *path_is_group);
104 gboolean                   empathy_contact_list_store_search_equal_func  (GtkTreeModel               *model,
105                                                                          gint                        column,
106                                                                          const gchar                *key,
107                                                                          GtkTreeIter                *iter,
108                                                                          gpointer                    search_data);
109 void                       empathy_contact_list_store_set_contact_groups_func (EmpathyContactListStore*store,
110                                                                          EmpathyContactGroupsFunc     func,
111                                                                          gpointer                    user_data);
112 void                       empathy_contact_list_store_update_contact_groups (EmpathyContactListStore  *store,
113                                                                          EmpathyContact              *contact);
114
115 G_END_DECLS
116
117 #endif /* __EMPATHY_CONTACT_LIST_STORE_H__ */
118