1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3 * Copyright (C) 2005-2007 Imendio AB
4 * Copyright (C) 2007 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., 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
21 * Authors: Mikael Hallendal <micke@imendio.com>
22 * Martyn Russell <martyn@imendio.com>
23 * Xavier Claessens <xclaesse@gmail.com>
26 #ifndef __GOSSIP_CONTACT_LIST_VIEW_H__
27 #define __GOSSIP_CONTACT_LIST_VIEW_H__
29 #include <gtk/gtktreeview.h>
31 #include <libempathy/gossip-contact.h>
33 #include "gossip-contact-list-store.h"
37 #define GOSSIP_TYPE_CONTACT_LIST_VIEW (gossip_contact_list_view_get_type ())
38 #define GOSSIP_CONTACT_LIST_VIEW(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GOSSIP_TYPE_CONTACT_LIST_VIEW, GossipContactListView))
39 #define GOSSIP_CONTACT_LIST_VIEW_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GOSSIP_TYPE_CONTACT_LIST_VIEW, GossipContactListViewClass))
40 #define GOSSIP_IS_CONTACT_LIST_VIEW(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GOSSIP_TYPE_CONTACT_LIST_VIEW))
41 #define GOSSIP_IS_CONTACT_LIST_VIEW_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GOSSIP_TYPE_CONTACT_LIST_VIEW))
42 #define GOSSIP_CONTACT_LIST_VIEW_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GOSSIP_TYPE_CONTACT_LIST_VIEW, GossipContactListViewClass))
44 typedef struct _GossipContactListView GossipContactListView;
45 typedef struct _GossipContactListViewClass GossipContactListViewClass;
46 typedef struct _GossipContactListViewPriv GossipContactListViewPriv;
48 struct _GossipContactListView {
52 struct _GossipContactListViewClass {
53 GtkTreeViewClass parent_class;
56 typedef void (*GossipContactListViewDragReceivedFunc) (GossipContact *contact,
58 const gchar *old_group,
59 const gchar *new_group,
62 GType gossip_contact_list_view_get_type (void) G_GNUC_CONST;
63 GossipContactListView *gossip_contact_list_view_new (GossipContactListStore *store);
64 GossipContact * gossip_contact_list_view_get_selected (GossipContactListView *view);
65 gchar * gossip_contact_list_view_get_selected_group (GossipContactListView *view);
66 GtkWidget * gossip_contact_list_view_get_contact_menu (GossipContactListView *view,
67 GossipContact *contact);
68 GtkWidget * gossip_contact_list_view_get_group_menu (GossipContactListView *view);
69 void gossip_contact_list_view_set_filter (GossipContactListView *view,
71 void gossip_contact_list_view_set_drag_received_func (GossipContactListView *view,
72 GossipContactListViewDragReceivedFunc func,
77 #endif /* __GOSSIP_CONTACT_LIST_VIEW_H__ */