Avatar

Constructors

this
this(HdyAvatar* hdyAvatar, bool ownedRef)

Sets our main struct and passes it to the parent class.

this
this(int size, string text, bool showInitials)

Creates a new #HdyAvatar.

Members

Functions

getAvatarStruct
HdyAvatar* getAvatarStruct(bool transferOwnership)

Get the main Gtk struct

getIconName
string getIconName()

Gets the name of the icon in the icon theme to use when the icon should be displayed.

getShowInitials
bool getShowInitials()

Returns whether initials are used for the fallback or the icon.

getSize
int getSize()

Returns the size of the avatar.

getStruct
void* getStruct()

the main Gtk struct as a void*

getText
string getText()

Get the text used to generate the fallback initials and color

setIconName
void setIconName(string iconName)

Sets the name of the icon in the icon theme to use when the icon should be displayed. If no name is set, the avatar-default-symbolic icon will be used. If the name doesn't match a valid icon, it is an error and no icon will be displayed. If the icon theme is changed, the image will be updated automatically.

setImageLoadFunc
void setImageLoadFunc(HdyAvatarImageLoadFunc loadImage, void* userData, GDestroyNotify destroy)

A callback which is called when the custom image need to be reloaded for some reason (e.g. scale-factor changes).

setShowInitials
void setShowInitials(bool showInitials)

Sets whether the initials should be shown on the fallback avatar or the icon.

setSize
void setSize(int size)

Sets the size of the avatar.

setText
void setText(string text)

Set the text used to generate the fallback initials color

Static functions

getType
GType getType()

Variables

hdyAvatar
HdyAvatar* hdyAvatar;

the main Gtk struct

Meta