OssoABookAvatarImage

OssoABookAvatarImage — Avatar image widget.

Synopsis

                    OssoABookAvatarImage;
GtkWidget*          osso_abook_avatar_image_new         (void);
GtkWidget*          osso_abook_avatar_image_new_with_avatar
                                                        (OssoABookAvatar *avatar,
                                                         int size);
void                osso_abook_avatar_image_set_avatar  (OssoABookAvatarImage *image,
                                                         OssoABookAvatar *avatar);
OssoABookAvatar*    osso_abook_avatar_image_get_avatar  (OssoABookAvatarImage *image);
void                osso_abook_avatar_image_set_pixbuf  (OssoABookAvatarImage *image,
                                                         GdkPixbuf *pixbuf);
GdkPixbuf*          osso_abook_avatar_image_get_pixbuf  (OssoABookAvatarImage *image);
GdkPixbuf*          osso_abook_avatar_image_get_scaled_pixbuf
                                                        (OssoABookAvatarImage *image);
void                osso_abook_avatar_image_set_fallback_icon
                                                        (OssoABookAvatarImage *image,
                                                         const char *icon_name);
const char*         osso_abook_avatar_image_get_fallback_icon
                                                        (OssoABookAvatarImage *image);
void                osso_abook_avatar_image_set_size    (OssoABookAvatarImage *image,
                                                         int size);
int                 osso_abook_avatar_image_get_size    (OssoABookAvatarImage *image);
double              osso_abook_avatar_image_get_minimum_zoom
                                                        (OssoABookAvatarImage *image);
double              osso_abook_avatar_image_get_current_zoom
                                                        (OssoABookAvatarImage *image);
void                osso_abook_avatar_image_set_maximum_zoom
                                                        (OssoABookAvatarImage *image,
                                                         double limit);
double              osso_abook_avatar_image_get_maximum_zoom
                                                        (OssoABookAvatarImage *image);
void                osso_abook_avatar_image_set_xadjustment
                                                        (OssoABookAvatarImage *image,
                                                         GtkAdjustment *adjustment);
GtkAdjustment*      osso_abook_avatar_image_get_xadjustment
                                                        (OssoABookAvatarImage *image);
void                osso_abook_avatar_image_set_yadjustment
                                                        (OssoABookAvatarImage *image,
                                                         GtkAdjustment *adjustment);
GtkAdjustment*      osso_abook_avatar_image_get_yadjustment
                                                        (OssoABookAvatarImage *image);
void                osso_abook_avatar_image_set_zadjustment
                                                        (OssoABookAvatarImage *image,
                                                         GtkAdjustment *adjustment);
GtkAdjustment*      osso_abook_avatar_image_get_zadjustment
                                                        (OssoABookAvatarImage *image);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----OssoABookAvatarImage

Implemented Interfaces

OssoABookAvatarImage implements AtkImplementorIface and GtkBuildable.

Properties

  "avatar"                   OssoABookAvatar*      : Read / Write
  "current-zoom"             gdouble               : Read
  "fallback-icon"            gchar*                : Read / Write
  "maximum-zoom"             gdouble               : Read / Write
  "minimum-zoom"             gdouble               : Read
  "pixbuf"                   GdkPixbuf*            : Read / Write
  "size"                     gint                  : Read / Write
  "xadjustment"              GtkAdjustment*        : Read / Write
  "yadjustment"              GtkAdjustment*        : Read / Write
  "zadjustment"              GtkAdjustment*        : Read / Write

Description

OssoABookAvatarImage is a widget that shows a contact's OssoABookAvatar.

Details

OssoABookAvatarImage

typedef struct _OssoABookAvatarImage OssoABookAvatarImage;

All the fields of this structure are private to the object's implementation and should never be accessed directly.


osso_abook_avatar_image_new ()

GtkWidget*          osso_abook_avatar_image_new         (void);

Creates a new, empty OssoABookAvatarImage. You should use osso_abook_avatar_image_set_avatar() in order to display the avatar image.

Returns : the newly created OssoABookAvatarImage widget

osso_abook_avatar_image_new_with_avatar ()

GtkWidget*          osso_abook_avatar_image_new_with_avatar
                                                        (OssoABookAvatar *avatar,
                                                         int size);

avatar : the avatar to display
size : the size in pixels to use for the avatar
Returns : a newly created OssoABookAvatarImage widget

osso_abook_avatar_image_set_avatar ()

void                osso_abook_avatar_image_set_avatar  (OssoABookAvatarImage *image,
                                                         OssoABookAvatar *avatar);

Sets the avatar to be displayed.

image : a OssoABookAvatarImage
avatar : a OssoABookAvatar

osso_abook_avatar_image_get_avatar ()

OssoABookAvatar*    osso_abook_avatar_image_get_avatar  (OssoABookAvatarImage *image);

Retrieves the OssoABookAvatar object used by image.

image : a OssoABookAvatarImage
Returns : a OssoABookAvatar

osso_abook_avatar_image_set_pixbuf ()

void                osso_abook_avatar_image_set_pixbuf  (OssoABookAvatarImage *image,
                                                         GdkPixbuf *pixbuf);

Sets a pixbuf to be displayed in the image widget

image : a OssoABookAvatarImage
pixbuf : a pixbuf to display as an avatar image

osso_abook_avatar_image_get_pixbuf ()

GdkPixbuf*          osso_abook_avatar_image_get_pixbuf  (OssoABookAvatarImage *image);

Gets the pixbuf that image is displaying

image : a OssoABookAvatarImage
Returns : a pixbuf owned by image

osso_abook_avatar_image_get_scaled_pixbuf ()

GdkPixbuf*          osso_abook_avatar_image_get_scaled_pixbuf
                                                        (OssoABookAvatarImage *image);

Gets a scaled copy of the pixbuf that image is displaying

image : a OssoABookAvatarImage
Returns : a pixbuf owned by the caller

osso_abook_avatar_image_set_fallback_icon ()

void                osso_abook_avatar_image_set_fallback_icon
                                                        (OssoABookAvatarImage *image,
                                                         const char *icon_name);

If no other image is specified for image, the stock icon specified by icon_name will be used instead

image : a OssoABookAvatarImage
icon_name : an icon to use as a fallback

osso_abook_avatar_image_get_fallback_icon ()

const char*         osso_abook_avatar_image_get_fallback_icon
                                                        (OssoABookAvatarImage *image);

image : a OssoABookAvatarImage
Returns : the icon name of the fallback icon for image

osso_abook_avatar_image_set_size ()

void                osso_abook_avatar_image_set_size    (OssoABookAvatarImage *image,
                                                         int size);

Sets the display size for image

image : a OssoABookAvatarImage
size : the avatar size in pixels

osso_abook_avatar_image_get_size ()

int                 osso_abook_avatar_image_get_size    (OssoABookAvatarImage *image);

image : a OssoABookAvatarImage
Returns : the display size in pixels for image

osso_abook_avatar_image_get_minimum_zoom ()

double              osso_abook_avatar_image_get_minimum_zoom
                                                        (OssoABookAvatarImage *image);

image : a OssoABookAvatarImage
Returns : the minimum zoom level for image (1.0 means no scaling)

osso_abook_avatar_image_get_current_zoom ()

double              osso_abook_avatar_image_get_current_zoom
                                                        (OssoABookAvatarImage *image);

Gets the current zoom value. A zoom value of 1.0 means no scaling.

image : a OssoABookAvatarImage
Returns : the current zoom level for image

osso_abook_avatar_image_set_maximum_zoom ()

void                osso_abook_avatar_image_set_maximum_zoom
                                                        (OssoABookAvatarImage *image,
                                                         double limit);

Sets the maximum zoom level for image (1.0 means no scaling)

image : a OssoABookAvatarImage
limit : the new maximum zoom level for image

osso_abook_avatar_image_get_maximum_zoom ()

double              osso_abook_avatar_image_get_maximum_zoom
                                                        (OssoABookAvatarImage *image);

image : a OssoABookAvatarImage
Returns : the maximum zoom level for image (1.0 means no scaling)

osso_abook_avatar_image_set_xadjustment ()

void                osso_abook_avatar_image_set_xadjustment
                                                        (OssoABookAvatarImage *image,
                                                         GtkAdjustment *adjustment);

Sets the adjustment object to use for the X axis

image : a OssoABookAvatarImage
adjustment : a GtkAdjustment to use for the X axis

osso_abook_avatar_image_get_xadjustment ()

GtkAdjustment*      osso_abook_avatar_image_get_xadjustment
                                                        (OssoABookAvatarImage *image);

image : a OssoABookAvatarImage
Returns : the GtkAdjustment used for the X axis, owned by image

osso_abook_avatar_image_set_yadjustment ()

void                osso_abook_avatar_image_set_yadjustment
                                                        (OssoABookAvatarImage *image,
                                                         GtkAdjustment *adjustment);

Sets the adjustment object to use for the Y axis

image : a OssoABookAvatarImage
adjustment : a GtkAdjustment to use for the Y axis

osso_abook_avatar_image_get_yadjustment ()

GtkAdjustment*      osso_abook_avatar_image_get_yadjustment
                                                        (OssoABookAvatarImage *image);

image : a OssoABookAvatarImage
Returns : the GtkAdjustment used for the Y axis, owned by image

osso_abook_avatar_image_set_zadjustment ()

void                osso_abook_avatar_image_set_zadjustment
                                                        (OssoABookAvatarImage *image,
                                                         GtkAdjustment *adjustment);

Sets the adjustment object to use for the Z axis (also known as zoom)

image : a OssoABookAvatarImage
adjustment : a GtkAdjustment to use for zoom

osso_abook_avatar_image_get_zadjustment ()

GtkAdjustment*      osso_abook_avatar_image_get_zadjustment
                                                        (OssoABookAvatarImage *image);

image : a OssoABookAvatarImage
Returns : the GtkAdjustment used for zoom, owned by image

Property Details

The "avatar" property

  "avatar"                   OssoABookAvatar*      : Read / Write

Avatar object.


The "current-zoom" property

  "current-zoom"             gdouble               : Read

The current zoom level.

Allowed values: >= 0

Default value: 1


The "fallback-icon" property

  "fallback-icon"            gchar*                : Read / Write

The name of the fallback icon.

Default value: "general_default_avatar"


The "maximum-zoom" property

  "maximum-zoom"             gdouble               : Read / Write

The maximal allowed zoom level.

Allowed values: >= 0

Default value: 2


The "minimum-zoom" property

  "minimum-zoom"             gdouble               : Read

The minimal allowed zoom level.

Allowed values: >= 0

Default value: 1


The "pixbuf" property

  "pixbuf"                   GdkPixbuf*            : Read / Write

Pixbuf object of the avatar.


The "size" property

  "size"                     gint                  : Read / Write

Size of the avatar in pixels.

Allowed values: [16,800]

Default value: 144


The "xadjustment" property

  "xadjustment"              GtkAdjustment*        : Read / Write

The GtkAdjustment for the horizontal avatar position.


The "yadjustment" property

  "yadjustment"              GtkAdjustment*        : Read / Write

The GtkAdjustment for the vertical avatar position.


The "zadjustment" property

  "zadjustment"              GtkAdjustment*        : Read / Write

The GtkAdjustment for the avatar zoom.