aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-avatar-chooser.c
diff options
context:
space:
mode:
authorJonny Lamb <jonny.lamb@collabora.co.uk>2009-04-23 07:44:36 +0800
committerJonny Lamb <jonny.lamb@collabora.co.uk>2009-04-23 07:45:38 +0800
commit3b01b7ca985d788eca42749fd7a63c970b7ecde2 (patch)
tree1de7457dcf1858cc9a4d0fefafaf50f004f8b767 /libempathy-gtk/empathy-avatar-chooser.c
parent56fa37ef682ea7e8f676f4c974b76c06242466d2 (diff)
downloadgsoc2013-empathy-3b01b7ca985d788eca42749fd7a63c970b7ecde2.tar
gsoc2013-empathy-3b01b7ca985d788eca42749fd7a63c970b7ecde2.tar.gz
gsoc2013-empathy-3b01b7ca985d788eca42749fd7a63c970b7ecde2.tar.bz2
gsoc2013-empathy-3b01b7ca985d788eca42749fd7a63c970b7ecde2.tar.lz
gsoc2013-empathy-3b01b7ca985d788eca42749fd7a63c970b7ecde2.tar.xz
gsoc2013-empathy-3b01b7ca985d788eca42749fd7a63c970b7ecde2.tar.zst
gsoc2013-empathy-3b01b7ca985d788eca42749fd7a63c970b7ecde2.zip
Add documentation for EmpathyAvatarChooser.
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
Diffstat (limited to 'libempathy-gtk/empathy-avatar-chooser.c')
-rw-r--r--libempathy-gtk/empathy-avatar-chooser.c53
1 files changed, 53 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-avatar-chooser.c b/libempathy-gtk/empathy-avatar-chooser.c
index a70befbc6..c86b85d25 100644
--- a/libempathy-gtk/empathy-avatar-chooser.c
+++ b/libempathy-gtk/empathy-avatar-chooser.c
@@ -39,6 +39,23 @@
#define DEBUG_FLAG EMPATHY_DEBUG_OTHER
#include <libempathy/empathy-debug.h>
+/**
+ * SECTION:empathy-avatar-chooser
+ * @title: EmpathyAvatarChooser
+ * @short_description: A widget used to change avatar
+ * @include: libempathy-gtk/empathy-avatar-chooser.h
+ *
+ * #EmpathyAvatarChooser is a widget which extends #GtkButton to
+ * provide a way of changing avatar.
+ */
+
+/**
+ * EmpathyAvatarChooser:
+ * @parent: parent object
+ *
+ * Widget which extends #GtkButton to provide a way of changing avatar.
+ */
+
#define AVATAR_SIZE_SAVE 96
#define AVATAR_SIZE_VIEW 64
#define DEFAULT_DIR DATADIR"/pixmaps/faces"
@@ -161,6 +178,13 @@ empathy_avatar_chooser_class_init (EmpathyAvatarChooserClass *klass)
object_class->get_property = avatar_chooser_get_property;
object_class->set_property = avatar_chooser_set_property;
+ /**
+ * EmpathyAvatarChooser::changed:
+ * @chooser: an #EmpathyAvatarChooser
+ *
+ * Emitted when the chosen avatar has changed.
+ *
+ */
signals[CHANGED] =
g_signal_new ("changed",
G_TYPE_FROM_CLASS (klass),
@@ -170,6 +194,12 @@ empathy_avatar_chooser_class_init (EmpathyAvatarChooserClass *klass)
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
+ /**
+ * EmpathyAvatarChooser:connection:
+ *
+ * The #TpConnection whose avatar should be shown and modified by
+ * the #EmpathyAvatarChooser instance.
+ */
param_spec = g_param_spec_object ("connection",
"TpConnection",
"TpConnection whose avatar should be "
@@ -983,12 +1013,26 @@ avatar_chooser_clicked_cb (GtkWidget *button,
g_free (saved_dir);
}
+/**
+ * empathy_avatar_chooser_new:
+ *
+ * Creates a new #EmpathyAvatarChooser.
+ *
+ * Return value: a new #EmpathyAvatarChooser
+ */
GtkWidget *
empathy_avatar_chooser_new ()
{
return g_object_new (EMPATHY_TYPE_AVATAR_CHOOSER, NULL);
}
+/**
+ * empathy_avatar_chooser_set:
+ * @chooser: an #EmpathyAvatarChooser
+ * @avatar: a new #EmpathyAvatar
+ *
+ * Sets the @chooser to display the avatar indicated by @avatar.
+ */
void
empathy_avatar_chooser_set (EmpathyAvatarChooser *chooser,
EmpathyAvatar *avatar)
@@ -1002,6 +1046,15 @@ empathy_avatar_chooser_set (EmpathyAvatarChooser *chooser,
}
}
+/**
+ * empathy_avatar_chooser_get_image_data:
+ * @chooser: an #EmpathyAvatarChooser
+ * @data: avatar bytes
+ * @data_size: size of @data
+ * @mime_type: avatar mime-type
+ *
+ * Gets image data about the currently selected avatar.
+ */
void
empathy_avatar_chooser_get_image_data (EmpathyAvatarChooser *chooser,
const gchar **data,