Osso Addressbook Reference Manual | ||||
---|---|---|---|---|
OssoABookAvatar; OssoABookAvatarIface; GdkPixbuf* osso_abook_avatar_get_image (OssoABookAvatar *avatar); GdkPixbuf* osso_abook_avatar_get_image_scaled (OssoABookAvatar *avatar, gint width, gint height, gboolean crop); gboolean osso_abook_avatar_is_done_loading (OssoABookAvatar *avatar);
typedef struct _OssoABookAvatar OssoABookAvatar;
Dummy type for the OssoABookAvatar interface.
typedef struct { GdkPixbuf * (* get_image_scaled) (OssoABookAvatar *avatar, int width, int height, gboolean crop); void (* load_error) (OssoABookAvatar *avatar, const GError *error); } OssoABookAvatarIface;
Virtual methods of the OssoABookAvatar interface.
get_image_scaled () |
virtual method for osso_abook_avatar_get_image_scaled()
|
load_error () |
virtual method for OssoABookAvatar::load-error |
GdkPixbuf* osso_abook_avatar_get_image (OssoABookAvatar *avatar);
Retrieves the avatar image from avatar
. The avatar is
automatically scaled to a 64x64 pixels image so it is
suited for display in a OssoABookTreeView. If you need
a different size, use osso_abook_avatar_get_image_scaled()
.
avatar : |
a OssoABookAvatar |
Returns : | the avatar image. The returned GdkPixbuf is owned by the avatar object and should not be modified or freed. |
GdkPixbuf* osso_abook_avatar_get_image_scaled (OssoABookAvatar *avatar, gint width, gint height, gboolean crop);
Retrieves the avatar image from avatar
. If width
and height
are -1, the full image is returned; otherwise, the image will
be scaled to the desired size. if crop
is TRUE
, the image
will be cropped to fit into the desired size, otherwise it will
be downscaled to fit.
avatar : |
a OssoABookAvatar |
width : |
desired width of the avatar image, or -1 |
height : |
desired height of the avatar image, or -1 |
crop : |
whether the image should be cropped or downscaled |
Returns : | the avatar image. You should use g_object_unref()
after you're done using it.
|
gboolean osso_abook_avatar_is_done_loading (OssoABookAvatar *avatar);
Returns whether the OssoABookAvatar object has finished loading the image for the avatar.
avatar : |
a OssoABookAvatar |
Returns : | TRUE if the avatar has successfully loaded the image.
|