]> git.0d.be Git - empathy.git/blob - libempathy-gtk/empathy-contact-list-view.h
Add en_GB in gitignore
[empathy.git] / libempathy-gtk / empathy-contact-list-view.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-2008 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_VIEW_H__
27 #define __EMPATHY_CONTACT_LIST_VIEW_H__
28
29 #include <gtk/gtktreeview.h>
30
31 #include <libempathy/empathy-contact.h>
32
33 #include "empathy-contact-list-store.h"
34 #include "empathy-contact-menu.h"
35
36 G_BEGIN_DECLS
37
38 #define EMPATHY_TYPE_CONTACT_LIST_VIEW         (empathy_contact_list_view_get_type ())
39 #define EMPATHY_CONTACT_LIST_VIEW(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), EMPATHY_TYPE_CONTACT_LIST_VIEW, EmpathyContactListView))
40 #define EMPATHY_CONTACT_LIST_VIEW_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), EMPATHY_TYPE_CONTACT_LIST_VIEW, EmpathyContactListViewClass))
41 #define EMPATHY_IS_CONTACT_LIST_VIEW(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), EMPATHY_TYPE_CONTACT_LIST_VIEW))
42 #define EMPATHY_IS_CONTACT_LIST_VIEW_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), EMPATHY_TYPE_CONTACT_LIST_VIEW))
43 #define EMPATHY_CONTACT_LIST_VIEW_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EMPATHY_TYPE_CONTACT_LIST_VIEW, EmpathyContactListViewClass))
44
45 typedef struct _EmpathyContactListView      EmpathyContactListView;
46 typedef struct _EmpathyContactListViewClass EmpathyContactListViewClass;
47
48 typedef enum {
49         EMPATHY_CONTACT_LIST_FEATURE_NONE = 0,
50         EMPATHY_CONTACT_LIST_FEATURE_GROUPS_SAVE = 1 << 0,
51         EMPATHY_CONTACT_LIST_FEATURE_GROUPS_RENAME = 1 << 1,
52         EMPATHY_CONTACT_LIST_FEATURE_GROUPS_REMOVE = 1 << 2,
53         EMPATHY_CONTACT_LIST_FEATURE_CONTACT_REMOVE = 1 << 3,
54         EMPATHY_CONTACT_LIST_FEATURE_CONTACT_DROP = 1 << 4,
55         EMPATHY_CONTACT_LIST_FEATURE_CONTACT_DRAG = 1 << 5,
56         EMPATHY_CONTACT_LIST_FEATURE_CONTACT_TOOLTIP = 1 << 6,
57         EMPATHY_CONTACT_LIST_FEATURE_ALL = (1 << 7) - 1,
58 } EmpathyContactListFeatureFlags;
59
60 struct _EmpathyContactListView {
61         GtkTreeView parent;
62         gpointer priv;
63 };
64
65 struct _EmpathyContactListViewClass {
66         GtkTreeViewClass parent_class;
67 };
68
69 GType                      empathy_contact_list_view_get_type           (void) G_GNUC_CONST;
70 EmpathyContactListView *   empathy_contact_list_view_new                (EmpathyContactListStore        *store,
71                                                                          EmpathyContactListFeatureFlags  list_features,
72                                                                          EmpathyContactFeatureFlags      contact_features);
73 EmpathyContact *           empathy_contact_list_view_get_selected       (EmpathyContactListView         *view);
74 gchar *                    empathy_contact_list_view_get_selected_group (EmpathyContactListView         *view);
75 GtkWidget *                empathy_contact_list_view_get_contact_menu   (EmpathyContactListView         *view);
76 GtkWidget *                empathy_contact_list_view_get_group_menu     (EmpathyContactListView         *view);
77
78 G_END_DECLS
79
80 #endif /* __EMPATHY_CONTACT_LIST_VIEW_H__ */
81