Details
OssoABookAvatarIface
typedef struct {
GdkPixbuf * (* get_image_scaled) (OssoABookAvatar *avatar,
int width,
int height,
gboolean crop);
GdkPixbuf * (* get_server_image_scaled) (OssoABookAvatar *avatar,
int width,
int height,
gboolean crop);
const char * (* get_fallback_icon_name) (OssoABookAvatar *avatar);
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()
|
get_server_image_scaled () |
|
get_fallback_icon_name () |
|
load_error () |
virtual method for OssoABookAvatar::load-error
|
osso_abook_avatar_get_image ()
GdkPixbuf* osso_abook_avatar_get_image (OssoABookAvatar *avatar);
Retrieves the avatar image from avatar
.
avatar : |
a OssoABookAvatar
|
Returns : |
the avatar image. The returned GdkPixbuf is
owned by the avatar object and should not be modified or
freed.
|
osso_abook_avatar_get_image_scaled ()
GdkPixbuf* osso_abook_avatar_get_image_scaled (OssoABookAvatar *avatar,
int width,
int 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.
|
osso_abook_avatar_get_server_image ()
GdkPixbuf* osso_abook_avatar_get_server_image (OssoABookAvatar *avatar);
Retrieves the sever provided avatar image from avatar
.
avatar : |
a OssoABookAvatar
|
Returns : |
the sever provided avatar image. The returned GdkPixbuf
is owned by the avatar object and should not be modified or freed.
|
osso_abook_avatar_get_server_image_scaled ()
GdkPixbuf* osso_abook_avatar_get_server_image_scaled
(OssoABookAvatar *avatar,
int width,
int height,
gboolean crop);
Retrieves the server provided 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 server provided avatar image. You should
use g_object_unref() after you're done using it.
|
osso_abook_avatar_get_fallback_icon_name ()
const char* osso_abook_avatar_get_fallback_icon_name
(OssoABookAvatar *avatar);
osso_abook_avatar_is_user_selected ()
gboolean osso_abook_avatar_is_user_selected (OssoABookAvatar *avatar);
Returns whether the OssoABookAvatar was set by the user. Note that a return
value of FALSE
doesn't necessarily mean that there is no avatar set if this
OssoABookAvatar is also a master OssoABookContact.
avatar : |
a OssoABookAvatar
|
Returns : |
TRUE if the avatar was selected by the user.
|
osso_abook_avatar_is_done_loading ()
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.
|