Display a context menu when clicking on audio/video icons (#590051)
[empathy-mirror.git] / libempathy-gtk / empathy-contact-list-view.h
blob17de5239b750143bd0d8a30e7dbbc0b729c58b48
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.
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.
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.
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., 51 Franklin St, Fifth Floor,
19 * Boston, MA 02110-1301 USA
21 * Authors: Mikael Hallendal <micke@imendio.com>
22 * Martyn Russell <martyn@imendio.com>
23 * Xavier Claessens <xclaesse@gmail.com>
26 #ifndef __EMPATHY_CONTACT_LIST_VIEW_H__
27 #define __EMPATHY_CONTACT_LIST_VIEW_H__
29 #include <gtk/gtk.h>
31 #include <libempathy/empathy-contact.h>
32 #include <libempathy/empathy-enum-types.h>
34 #include "empathy-contact-list-store.h"
35 #include "empathy-contact-menu.h"
37 G_BEGIN_DECLS
39 #define EMPATHY_TYPE_CONTACT_LIST_VIEW (empathy_contact_list_view_get_type ())
40 #define EMPATHY_CONTACT_LIST_VIEW(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EMPATHY_TYPE_CONTACT_LIST_VIEW, EmpathyContactListView))
41 #define EMPATHY_CONTACT_LIST_VIEW_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), EMPATHY_TYPE_CONTACT_LIST_VIEW, EmpathyContactListViewClass))
42 #define EMPATHY_IS_CONTACT_LIST_VIEW(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EMPATHY_TYPE_CONTACT_LIST_VIEW))
43 #define EMPATHY_IS_CONTACT_LIST_VIEW_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EMPATHY_TYPE_CONTACT_LIST_VIEW))
44 #define EMPATHY_CONTACT_LIST_VIEW_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EMPATHY_TYPE_CONTACT_LIST_VIEW, EmpathyContactListViewClass))
46 typedef struct _EmpathyContactListView EmpathyContactListView;
47 typedef struct _EmpathyContactListViewClass EmpathyContactListViewClass;
49 typedef enum {
50 EMPATHY_CONTACT_LIST_FEATURE_NONE = 0,
51 EMPATHY_CONTACT_LIST_FEATURE_GROUPS_SAVE = 1 << 0,
52 EMPATHY_CONTACT_LIST_FEATURE_GROUPS_RENAME = 1 << 1,
53 EMPATHY_CONTACT_LIST_FEATURE_GROUPS_REMOVE = 1 << 2,
54 EMPATHY_CONTACT_LIST_FEATURE_CONTACT_REMOVE = 1 << 3,
55 EMPATHY_CONTACT_LIST_FEATURE_CONTACT_DROP = 1 << 4,
56 EMPATHY_CONTACT_LIST_FEATURE_CONTACT_DRAG = 1 << 5,
57 EMPATHY_CONTACT_LIST_FEATURE_CONTACT_TOOLTIP = 1 << 6,
58 EMPATHY_CONTACT_LIST_FEATURE_ALL = (1 << 7) - 1,
59 } EmpathyContactListFeatureFlags;
61 struct _EmpathyContactListView {
62 GtkTreeView parent;
63 gpointer priv;
66 struct _EmpathyContactListViewClass {
67 GtkTreeViewClass parent_class;
70 GType empathy_contact_list_view_get_type (void) G_GNUC_CONST;
71 EmpathyContactListView * empathy_contact_list_view_new (EmpathyContactListStore *store,
72 EmpathyContactListFeatureFlags list_features,
73 EmpathyContactFeatureFlags contact_features);
74 EmpathyContact * empathy_contact_list_view_dup_selected (EmpathyContactListView *view);
75 EmpathyContactListFlags empathy_contact_list_view_get_flags (EmpathyContactListView *view);
76 gchar * empathy_contact_list_view_get_selected_group (EmpathyContactListView *view);
77 GtkWidget * empathy_contact_list_view_get_contact_menu (EmpathyContactListView *view);
78 GtkWidget * empathy_contact_list_view_get_group_menu (EmpathyContactListView *view);
80 G_END_DECLS
82 #endif /* __EMPATHY_CONTACT_LIST_VIEW_H__ */