]> git.0d.be Git - empathy.git/blob - libempathy-gtk/empathy-persona-view.h
remove linking UI
[empathy.git] / libempathy-gtk / empathy-persona-view.h
1 /*
2  * Copyright (C) 2005-2007 Imendio AB
3  * Copyright (C) 2007-2008, 2010 Collabora Ltd.
4  *
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.
9  *
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.
14  *
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
19  *
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>
24  *
25  * Based off EmpathyContactListView.
26  */
27
28 #ifndef __EMPATHY_PERSONA_VIEW_H__
29 #define __EMPATHY_PERSONA_VIEW_H__
30
31 #include <gtk/gtk.h>
32
33 #include <folks/folks.h>
34
35 #include "empathy-persona-store.h"
36
37 G_BEGIN_DECLS
38
39 typedef enum
40 {
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;
46
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))
58
59 typedef struct
60 {
61   GtkTreeView parent;
62   gpointer priv;
63 } EmpathyPersonaView;
64
65 typedef struct
66 {
67   GtkTreeViewClass parent_class;
68
69   void (* drag_individual_received) (EmpathyPersonaView *self,
70       GdkDragAction action,
71       FolksIndividual *individual);
72 } EmpathyPersonaViewClass;
73
74 GType empathy_persona_view_get_type (void) G_GNUC_CONST;
75
76 EmpathyPersonaView *empathy_persona_view_new (EmpathyPersonaStore *store,
77     EmpathyPersonaViewFeatureFlags features);
78
79 FolksPersona *empathy_persona_view_dup_selected (EmpathyPersonaView *self);
80
81 gboolean empathy_persona_view_get_show_offline (EmpathyPersonaView *self);
82 void empathy_persona_view_set_show_offline (EmpathyPersonaView *self,
83     gboolean show_offline);
84
85 G_END_DECLS
86
87 #endif /* __EMPATHY_PERSONA_VIEW_H__ */