2 * Copyright (C) 2005-2007 Imendio AB
3 * Copyright (C) 2007-2008, 2010 Collabora Ltd.
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., 51 Franklin St, Fifth Floor,
18 * Boston, MA 02110-1301 USA
20 * Authors: Mikael Hallendal <micke@imendio.com>
21 * Martyn Russell <martyn@imendio.com>
22 * Xavier Claessens <xclaesse@gmail.com>
23 * Philip Withnall <philip.withnall@collabora.co.uk>
25 * Based off EmpathyContactListView.
28 #ifndef __EMPATHY_PERSONA_VIEW_H__
29 #define __EMPATHY_PERSONA_VIEW_H__
33 #include <folks/folks.h>
35 #include "empathy-persona-store.h"
41 EMPATHY_PERSONA_VIEW_FEATURE_NONE = 0,
42 EMPATHY_PERSONA_VIEW_FEATURE_PERSONA_DRAG = 1 << 0,
43 EMPATHY_PERSONA_VIEW_FEATURE_PERSONA_DROP = 1 << 1,
44 EMPATHY_PERSONA_VIEW_FEATURE_ALL = (1 << 2) - 1,
45 } EmpathyPersonaViewFeatureFlags;
47 #define EMPATHY_TYPE_PERSONA_VIEW (empathy_persona_view_get_type ())
48 #define EMPATHY_PERSONA_VIEW(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), \
49 EMPATHY_TYPE_PERSONA_VIEW, EmpathyPersonaView))
50 #define EMPATHY_PERSONA_VIEW_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), \
51 EMPATHY_TYPE_PERSONA_VIEW, EmpathyPersonaViewClass))
52 #define EMPATHY_IS_PERSONA_VIEW(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
53 EMPATHY_TYPE_PERSONA_VIEW))
54 #define EMPATHY_IS_PERSONA_VIEW_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), \
55 EMPATHY_TYPE_PERSONA_VIEW))
56 #define EMPATHY_PERSONA_VIEW_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
57 EMPATHY_TYPE_PERSONA_VIEW, EmpathyPersonaViewClass))
67 GtkTreeViewClass parent_class;
69 void (* drag_individual_received) (EmpathyPersonaView *self,
71 FolksIndividual *individual);
72 } EmpathyPersonaViewClass;
74 GType empathy_persona_view_get_type (void) G_GNUC_CONST;
76 EmpathyPersonaView *empathy_persona_view_new (EmpathyPersonaStore *store,
77 EmpathyPersonaViewFeatureFlags features);
79 FolksPersona *empathy_persona_view_dup_selected (EmpathyPersonaView *self);
81 gboolean empathy_persona_view_get_show_offline (EmpathyPersonaView *self);
82 void empathy_persona_view_set_show_offline (EmpathyPersonaView *self,
83 gboolean show_offline);
87 #endif /* __EMPATHY_PERSONA_VIEW_H__ */