]> git.0d.be Git - empathy.git/blob - libempathy-gtk/empathy-avatar-chooser.h
dc82c0571c4718b33da86aa99c83e9b652e63ce5
[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 <gio/gio.h>
28 #include <gtk/gtk.h>
29
30 G_BEGIN_DECLS
31
32 #define EMPATHY_TYPE_AVATAR_CHOOSER        (empathy_avatar_chooser_get_type ())
33 #define EMPATHY_AVATAR_CHOOSER(obj)        (G_TYPE_CHECK_INSTANCE_CAST ((obj), EMPATHY_TYPE_AVATAR_CHOOSER, EmpathyAvatarChooser))
34 #define EMPATHY_AVATAR_CHOOSER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), EMPATHY_TYPE_AVATAR_CHOOSER, EmpathyAvatarChooserClass))
35 #define EMPATHY_IS_AVATAR_CHOOSER(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EMPATHY_TYPE_AVATAR_CHOOSER))
36 #define EMPATHY_IS_AVATAR_CHOOSER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), EMPATHY_TYPE_AVATAR_CHOOSER))
37
38 typedef struct _EmpathyAvatarChooser        EmpathyAvatarChooser;
39 typedef struct _EmpathyAvatarChooserClass   EmpathyAvatarChooserClass;
40 typedef struct _EmpathyAvatarChooserPrivate EmpathyAvatarChooserPrivate;
41
42 struct _EmpathyAvatarChooser
43 {
44   GtkButton parent;
45
46   /*<private>*/
47   EmpathyAvatarChooserPrivate *priv;
48 };
49
50 struct _EmpathyAvatarChooserClass
51 {
52   GtkButtonClass parent_class;
53 };
54
55 GType empathy_avatar_chooser_get_type (void);
56
57 GtkWidget *empathy_avatar_chooser_new (TpAccount *account);
58
59 void empathy_avatar_chooser_apply_async (EmpathyAvatarChooser *self,
60     GAsyncReadyCallback callback,
61     gpointer user_data);
62 gboolean empathy_avatar_chooser_apply_finish (EmpathyAvatarChooser *self,
63     GAsyncResult *result,
64     GError **error);
65
66 #endif /* __EMPATHY_AVATAR_CHOOSER_H__ */