]> git.0d.be Git - empathy.git/blob - libempathy-gtk/empathy-avatar-chooser.h
local-xmpp-assistant-widget: increase row-spacing
[empathy.git] / libempathy-gtk / empathy-avatar-chooser.h
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3  * Copyright (C) 2006-2007 Imendio AB.
4  * Copyright (C) 2007-2008 Collabora Ltd.
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of version 2 of the GNU General Public
8  * License as published by the Free Software Foundation.
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 library; if not, write to the
17  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
18  * Boston, MA  02110-1301  USA
19  *
20  * Authors: Based on Novell's e-image-chooser.
21  *          Xavier Claessens <xclaesse@gmail.com>
22  */
23
24 #ifndef __EMPATHY_AVATAR_CHOOSER_H__
25 #define __EMPATHY_AVATAR_CHOOSER_H__
26
27 #include <gtk/gtk.h>
28
29 #include <libempathy/empathy-contact.h>
30
31 G_BEGIN_DECLS
32
33 #define EMPATHY_TYPE_AVATAR_CHOOSER        (empathy_avatar_chooser_get_type ())
34 #define EMPATHY_AVATAR_CHOOSER(obj)        (G_TYPE_CHECK_INSTANCE_CAST ((obj), EMPATHY_TYPE_AVATAR_CHOOSER, EmpathyAvatarChooser))
35 #define EMPATHY_AVATAR_CHOOSER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), EMPATHY_TYPE_AVATAR_CHOOSER, EmpathyAvatarChooserClass))
36 #define EMPATHY_IS_AVATAR_CHOOSER(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EMPATHY_TYPE_AVATAR_CHOOSER))
37 #define EMPATHY_IS_AVATAR_CHOOSER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), EMPATHY_TYPE_AVATAR_CHOOSER))
38
39 typedef struct _EmpathyAvatarChooser        EmpathyAvatarChooser;
40 typedef struct _EmpathyAvatarChooserClass   EmpathyAvatarChooserClass;
41 typedef struct _EmpathyAvatarChooserPrivate EmpathyAvatarChooserPrivate;
42
43 struct _EmpathyAvatarChooser
44 {
45   GtkButton parent;
46
47   /*<private>*/
48   EmpathyAvatarChooserPrivate *priv;
49 };
50
51 struct _EmpathyAvatarChooserClass
52 {
53   GtkButtonClass parent_class;
54 };
55
56 GType empathy_avatar_chooser_get_type (void);
57
58 GtkWidget *empathy_avatar_chooser_new (void);
59
60 void empathy_avatar_chooser_set (EmpathyAvatarChooser *self,
61     EmpathyAvatar *avatar);
62
63 void empathy_avatar_chooser_get_image_data (EmpathyAvatarChooser *self,
64     const gchar **data,
65     gsize *data_size,
66     const gchar **mime_type);
67
68 void empathy_avatar_chooser_set_account (EmpathyAvatarChooser *self,
69     TpAccount *account);
70
71 #endif /* __EMPATHY_AVATAR_CHOOSER_H__ */