## EmpathyAvatarChooser

EmpathyAvatarChooser — A widget used to change avatar

## Synopsis

    #include <libempathy-gtk/empathy-avatar-chooser.h>

                        EmpathyAvatarChooser;
    GtkWidget *         empathy_avatar_chooser_new          (void);
    void                empathy_avatar_chooser_set          (EmpathyAvatarChooser *chooser,
                                                             EmpathyAvatar *avatar);
    void                empathy_avatar_chooser_get_image_data
                                                            (EmpathyAvatarChooser *chooser,
                                                             const gchar **data,
                                                             gsize *data_size,
                                                             const gchar **mime_type);

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----GtkObject
                   +----GtkWidget
                         +----GtkContainer
                               +----GtkBin
                                     +----GtkButton
                                           +----EmpathyAvatarChooser

## Implemented Interfaces

EmpathyAvatarChooser implements GtkActivatable, AtkImplementorIface and GtkBuildable.

## Properties

      "connection"               TpConnection*         : Read / Write

## Signals

      "changed"                                        : Run Last

## Description

EmpathyAvatarChooser is a widget which extends GtkButton to provide a way of changing avatar.

## Details

### EmpathyAvatarChooser

    typedef struct _EmpathyAvatarChooser EmpathyAvatarChooser;

Widget which extends GtkButton to provide a way of changing avatar.

### empathy_avatar_chooser_new ()

    GtkWidget *         empathy_avatar_chooser_new          (void);

Creates a new EmpathyAvatarChooser.

Returns : | a new EmpathyAvatarChooser

### empathy_avatar_chooser_set ()

    void                empathy_avatar_chooser_set          (EmpathyAvatarChooser *chooser,
                                                             EmpathyAvatar *avatar);

Sets the `chooser` to display the avatar indicated by `avatar`.

`chooser` : | an EmpathyAvatarChooser
`avatar` : | a new EmpathyAvatar

### empathy_avatar_chooser_get_image_data ()

    void                empathy_avatar_chooser_get_image_data
                                                            (EmpathyAvatarChooser *chooser,
                                                             const gchar **data,
                                                             gsize *data_size,
                                                             const gchar **mime_type);

Gets image data about the currently selected avatar.

`chooser` : | an EmpathyAvatarChooser
`data` : | avatar bytes
`data_size` : | size of `data`
`mime_type` : | avatar mime-type

## Property Details

### The `"connection"` property

      "connection"               TpConnection*         : Read / Write

The TpConnection whose avatar should be shown and modified by the EmpathyAvatarChooser instance.

## Signal Details

### The `"changed"` signal

    void                user_function                      (EmpathyAvatarChooser *chooser,
                                                            gpointer              user_data)      : Run Last

Emitted when the chosen avatar has changed.

`chooser` : | an EmpathyAvatarChooser
`user_data` : | user data set when the signal handler was connected.