1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3 * Copyright (C) 2004-2007 Imendio AB
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of the
8 * License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
15 * You should have received a copy of the GNU General Public
16 * License along with this program; if not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
20 * Authors: Mikael Hallendal <micke@imendio.com>
21 * Martyn Russell <martyn@imendio.com>
24 #ifndef __GOSSIP_CONTACT_LIST_H__
25 #define __GOSSIP_CONTACT_LIST_H__
27 #include <gtk/gtktreeview.h>
29 #include <libempathy/gossip-contact.h>
34 * GossipContactListSort
36 #define GOSSIP_TYPE_CONTACT_LIST_SORT (gossip_contact_list_sort_get_type ())
39 GOSSIP_CONTACT_LIST_SORT_STATE,
40 GOSSIP_CONTACT_LIST_SORT_NAME
41 } GossipContactListSort;
43 GType gossip_contact_list_sort_get_type (void) G_GNUC_CONST;
48 #define GOSSIP_TYPE_CONTACT_LIST (gossip_contact_list_get_type ())
49 #define GOSSIP_CONTACT_LIST(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GOSSIP_TYPE_CONTACT_LIST, GossipContactList))
50 #define GOSSIP_CONTACT_LIST_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GOSSIP_TYPE_CONTACT_LIST, GossipContactListClass))
51 #define GOSSIP_IS_CONTACT_LIST(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GOSSIP_TYPE_CONTACT_LIST))
52 #define GOSSIP_IS_CONTACT_LIST_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GOSSIP_TYPE_CONTACT_LIST))
53 #define GOSSIP_CONTACT_LIST_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GOSSIP_TYPE_CONTACT_LIST, GossipContactListClass))
55 typedef struct _GossipContactList GossipContactList;
56 typedef struct _GossipContactListClass GossipContactListClass;
57 typedef struct _GossipContactListPriv GossipContactListPriv;
59 struct _GossipContactList {
63 struct _GossipContactListClass {
64 GtkTreeViewClass parent_class;
67 GType gossip_contact_list_get_type (void) G_GNUC_CONST;
68 GossipContactList * gossip_contact_list_new (void);
69 GossipContact * gossip_contact_list_get_selected (GossipContactList *list);
70 gchar * gossip_contact_list_get_selected_group (GossipContactList *list);
71 gboolean gossip_contact_list_get_show_offline (GossipContactList *list);
72 gboolean gossip_contact_list_get_show_avatars (GossipContactList *list);
73 gboolean gossip_contact_list_get_is_compact (GossipContactList *list);
74 GossipContactListSort gossip_contact_list_get_sort_criterium (GossipContactList *list);
75 GtkWidget * gossip_contact_list_get_contact_menu (GossipContactList *list,
76 GossipContact *contact);
77 GtkWidget * gossip_contact_list_get_group_menu (GossipContactList *list);
78 void gossip_contact_list_set_show_offline (GossipContactList *list,
79 gboolean show_offline);
80 void gossip_contact_list_set_show_avatars (GossipContactList *list,
81 gboolean show_avatars);
82 void gossip_contact_list_set_is_compact (GossipContactList *list,
84 void gossip_contact_list_set_sort_criterium (GossipContactList *list,
85 GossipContactListSort sort_criterium);
86 void gossip_contact_list_set_filter (GossipContactList *list,
91 #endif /* __GOSSIP_CONTACT_LIST_H__ */