gi-handy-1.0.1: libhandy bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Handy.Objects.Avatar

Description

No description available in the introspection data.

Synopsis

Exported types

newtype Avatar Source #

Memory-managed wrapper type.

Constructors

Avatar (ManagedPtr Avatar) 

Instances

Instances details
Eq Avatar Source # 
Instance details

Defined in GI.Handy.Objects.Avatar

Methods

(==) :: Avatar -> Avatar -> Bool #

(/=) :: Avatar -> Avatar -> Bool #

GObject Avatar Source # 
Instance details

Defined in GI.Handy.Objects.Avatar

ManagedPtrNewtype Avatar Source # 
Instance details

Defined in GI.Handy.Objects.Avatar

TypedObject Avatar Source # 
Instance details

Defined in GI.Handy.Objects.Avatar

Methods

glibType :: IO GType #

HasParentTypes Avatar Source # 
Instance details

Defined in GI.Handy.Objects.Avatar

IsGValue (Maybe Avatar) Source #

Convert Avatar to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Handy.Objects.Avatar

type ParentTypes Avatar Source # 
Instance details

Defined in GI.Handy.Objects.Avatar

class (GObject o, IsDescendantOf Avatar o) => IsAvatar o Source #

Type class for types which can be safely cast to Avatar, for instance with toAvatar.

Instances

Instances details
(GObject o, IsDescendantOf Avatar o) => IsAvatar o Source # 
Instance details

Defined in GI.Handy.Objects.Avatar

toAvatar :: (MonadIO m, IsAvatar o) => o -> m Avatar Source #

Cast to Avatar, for types for which this is known to be safe. For general casts, use castTo.

Methods

Click to display all available methods, including inherited ones

Expand

Methods

activate, addAccelerator, addChild, addDeviceEvents, addEvents, addMnemonicLabel, addTickCallback, bindProperty, bindPropertyFull, canActivateAccel, childFocus, childNotify, classPath, computeExpand, constructChild, createPangoContext, createPangoLayout, customFinished, customTagEnd, customTagStart, destroy, destroyed, deviceIsShadowed, dragBegin, dragBeginWithCoordinates, dragCheckThreshold, dragDestAddImageTargets, dragDestAddTextTargets, dragDestAddUriTargets, dragDestFindTarget, dragDestGetTargetList, dragDestGetTrackMotion, dragDestSet, dragDestSetProxy, dragDestSetTargetList, dragDestSetTrackMotion, dragDestUnset, dragGetData, dragHighlight, dragSourceAddImageTargets, dragSourceAddTextTargets, dragSourceAddUriTargets, dragSourceGetTargetList, dragSourceSet, dragSourceSetIconGicon, dragSourceSetIconName, dragSourceSetIconPixbuf, dragSourceSetIconStock, dragSourceSetTargetList, dragSourceUnset, dragUnhighlight, draw, drawToPixbuf, drawToPixbufAsync, drawToPixbufFinish, ensureStyle, errorBell, event, forceFloating, freezeChildNotify, freezeNotify, getv, grabAdd, grabDefault, grabFocus, grabRemove, hasDefault, hasFocus, hasGrab, hasRcStyle, hasScreen, hasVisibleFocus, hide, hideOnDelete, inDestruction, initTemplate, inputShapeCombineRegion, insertActionGroup, intersect, isAncestor, isComposited, isDrawable, isFloating, isFocus, isSensitive, isToplevel, isVisible, keynavFailed, listAccelClosures, listActionPrefixes, listMnemonicLabels, map, mnemonicActivate, modifyBase, modifyBg, modifyCursor, modifyFg, modifyFont, modifyStyle, modifyText, notify, notifyByPspec, overrideBackgroundColor, overrideColor, overrideCursor, overrideFont, overrideSymbolicColor, parserFinished, path, queueAllocate, queueComputeExpand, queueDraw, queueDrawArea, queueDrawRegion, queueResize, queueResizeNoRedraw, realize, ref, refSink, regionIntersect, registerWindow, removeAccelerator, removeMnemonicLabel, removeTickCallback, renderIcon, renderIconPixbuf, reparent, resetRcStyles, resetStyle, runDispose, sendExpose, sendFocusChange, shapeCombineRegion, show, showAll, showNow, sizeAllocate, sizeAllocateWithBaseline, sizeRequest, stealData, stealQdata, styleAttach, styleGetProperty, thawChildNotify, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unregisterWindow, unsetStateFlags, watchClosure.

Getters

getAccessible, getActionGroup, getAllocatedBaseline, getAllocatedHeight, getAllocatedSize, getAllocatedWidth, getAllocation, getAncestor, getAppPaintable, getCanDefault, getCanFocus, getChildRequisition, getChildVisible, getClip, getClipboard, getCompositeName, getData, getDeviceEnabled, getDeviceEvents, getDirection, getDisplay, getDoubleBuffered, getEvents, getFocusOnClick, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHasWindow, getHexpand, getHexpandSet, getIconName, getInternalChild, getLoadableIcon, getMapped, getMarginBottom, getMarginEnd, getMarginLeft, getMarginRight, getMarginStart, getMarginTop, getModifierMask, getModifierStyle, getName, getNoShowAll, getOpacity, getPangoContext, getParent, getParentWindow, getPath, getPointer, getPreferredHeight, getPreferredHeightAndBaselineForWidth, getPreferredHeightForWidth, getPreferredSize, getPreferredWidth, getPreferredWidthForHeight, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRequisition, getRootWindow, getScaleFactor, getScreen, getSensitive, getSettings, getShowInitials, getSize, getSizeRequest, getState, getStateFlags, getStyle, getStyleContext, getSupportMultidevice, getTemplateChild, getText, getTooltipMarkup, getTooltipText, getTooltipWindow, getToplevel, getValign, getValignWithBaseline, getVexpand, getVexpandSet, getVisible, getVisual, getWindow.

Setters

setAccelPath, setAllocation, setAppPaintable, setBuildableProperty, setCanDefault, setCanFocus, setChildVisible, setClip, setCompositeName, setData, setDataFull, setDeviceEnabled, setDeviceEvents, setDirection, setDoubleBuffered, setEvents, setFocusOnClick, setFontMap, setFontOptions, setHalign, setHasTooltip, setHasWindow, setHexpand, setHexpandSet, setIconName, setImageLoadFunc, setLoadableIcon, setMapped, setMarginBottom, setMarginEnd, setMarginLeft, setMarginRight, setMarginStart, setMarginTop, setName, setNoShowAll, setOpacity, setParent, setParentWindow, setProperty, setRealized, setReceivesDefault, setRedrawOnAllocate, setSensitive, setShowInitials, setSize, setSizeRequest, setState, setStateFlags, setStyle, setSupportMultidevice, setText, setTooltipMarkup, setTooltipText, setTooltipWindow, setValign, setVexpand, setVexpandSet, setVisible, setVisual, setWindow.

drawToPixbuf

avatarDrawToPixbuf Source #

Arguments

:: (HasCallStack, MonadIO m, IsAvatar a) 
=> a

self: a Avatar

-> Int32

size: The size of the pixbuf

-> Int32

scaleFactor: The scale factor

-> m Pixbuf

Returns: the pixbuf.

Renders self into a pixbuf at size and scaleFactor. This can be used to export the fallback avatar.

Since: 1.2

drawToPixbufAsync

avatarDrawToPixbufAsync Source #

Arguments

:: (HasCallStack, MonadIO m, IsAvatar a, IsCancellable b) 
=> a

self: a Avatar

-> Int32

size: The size of the pixbuf

-> Int32

scaleFactor: The scale factor

-> Maybe b

cancellable: optional Cancellable object, Nothing to ignore

-> Maybe AsyncReadyCallback

callback: a AsyncReadyCallback to call when the avatar is generated

-> m () 

Renders asynchronously self into a pixbuf at size and scaleFactor. This can be used to export the fallback avatar.

Since: 1.2

drawToPixbufFinish

avatarDrawToPixbufFinish Source #

Arguments

:: (HasCallStack, MonadIO m, IsAvatar a, IsAsyncResult b) 
=> a

self: a Avatar

-> b

asyncResult: a AsyncResult

-> m Pixbuf

Returns: a Pixbuf

Finishes an asynchronous draw of an avatar to a pixbuf.

Since: 1.2

getIconName

avatarGetIconName Source #

Arguments

:: (HasCallStack, MonadIO m, IsAvatar a) 
=> a

self: a Avatar

-> m (Maybe Text)

Returns: the name of the icon from the icon theme.

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

Since: 1.0

getLoadableIcon

avatarGetLoadableIcon Source #

Arguments

:: (HasCallStack, MonadIO m, IsAvatar a) 
=> a

self: a Avatar

-> m (Maybe LoadableIcon)

Returns: the LoadableIcon

Gets the LoadableIcon set via avatarSetLoadableIcon.

Since: 1.2

getShowInitials

avatarGetShowInitials Source #

Arguments

:: (HasCallStack, MonadIO m, IsAvatar a) 
=> a

self: a Avatar

-> m Bool

Returns: True if the initials are used for the fallback.

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

getSize

avatarGetSize Source #

Arguments

:: (HasCallStack, MonadIO m, IsAvatar a) 
=> a

self: a Avatar

-> m Int32

Returns: the size of the avatar.

Returns the size of the avatar.

getText

avatarGetText Source #

Arguments

:: (HasCallStack, MonadIO m, IsAvatar a) 
=> a

self: a Avatar

-> m (Maybe Text)

Returns: returns the text used to generate the fallback initials. This is the internal string used by the Avatar, and must not be modified.

Get the text used to generate the fallback initials and color

new

avatarNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Int32

size: The size of the avatar

-> Maybe Text

text: The text used to generate the color and initials if showInitials is True. The color is selected at random if text is empty.

-> Bool

showInitials: whether to show the initials or the fallback icon on top of the color generated based on text.

-> m Avatar

Returns: the newly created Avatar

Creates a new Avatar.

setIconName

avatarSetIconName Source #

Arguments

:: (HasCallStack, MonadIO m, IsAvatar a) 
=> a

self: a Avatar

-> Maybe Text

iconName: the name of the icon from the icon theme

-> m () 

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.

Since: 1.0

setImageLoadFunc

avatarSetImageLoadFunc Source #

Arguments

:: (HasCallStack, MonadIO m, IsAvatar a) 
=> a

self: a Avatar

-> Maybe AvatarImageLoadFunc

loadImage: callback to set a custom image

-> m () 

Deprecated: (Since version 1.2)use avatarSetLoadableIcon instead.

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

setLoadableIcon

avatarSetLoadableIcon Source #

Arguments

:: (HasCallStack, MonadIO m, IsAvatar a, IsLoadableIcon b) 
=> a

self: a Avatar

-> Maybe b

icon: a LoadableIcon

-> m () 

Sets the LoadableIcon to use as an avatar. The previous avatar is displayed till the new avatar is loaded, to immediately remove the custom avatar set the loadable-icon to Nothing.

The LoadableIcon set via this function is prefered over a set AvatarImageLoadFunc.

Since: 1.2

setShowInitials

avatarSetShowInitials Source #

Arguments

:: (HasCallStack, MonadIO m, IsAvatar a) 
=> a

self: a Avatar

-> Bool

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

-> m () 

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

setSize

avatarSetSize Source #

Arguments

:: (HasCallStack, MonadIO m, IsAvatar a) 
=> a

self: a Avatar

-> Int32

size: The size to be used for the avatar

-> m () 

Sets the size of the avatar.

setText

avatarSetText Source #

Arguments

:: (HasCallStack, MonadIO m, IsAvatar a) 
=> a

self: a Avatar

-> Maybe Text

text: the text used to get the initials and color

-> m () 

Set the text used to generate the fallback initials color

Properties

iconName

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.

Since: 1.0

clearAvatarIconName :: (MonadIO m, IsAvatar o) => o -> m () Source #

Set the value of the “icon-name” property to Nothing. When overloading is enabled, this is equivalent to

clear #iconName

constructAvatarIconName :: (IsAvatar o, MonadIO m) => Text -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “icon-name” property. This is rarely needed directly, but it is used by new.

getAvatarIconName :: (MonadIO m, IsAvatar o) => o -> m (Maybe Text) Source #

Get the value of the “icon-name” property. When overloading is enabled, this is equivalent to

get avatar #iconName

setAvatarIconName :: (MonadIO m, IsAvatar o) => o -> Text -> m () Source #

Set the value of the “icon-name” property. When overloading is enabled, this is equivalent to

set avatar [ #iconName := value ]

loadableIcon

A LoadableIcon used to load the avatar.

Since: 1.2

clearAvatarLoadableIcon :: (MonadIO m, IsAvatar o) => o -> m () Source #

Set the value of the “loadable-icon” property to Nothing. When overloading is enabled, this is equivalent to

clear #loadableIcon

constructAvatarLoadableIcon :: (IsAvatar o, MonadIO m, IsLoadableIcon a) => a -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “loadable-icon” property. This is rarely needed directly, but it is used by new.

getAvatarLoadableIcon :: (MonadIO m, IsAvatar o) => o -> m (Maybe LoadableIcon) Source #

Get the value of the “loadable-icon” property. When overloading is enabled, this is equivalent to

get avatar #loadableIcon

setAvatarLoadableIcon :: (MonadIO m, IsAvatar o, IsLoadableIcon a) => o -> a -> m () Source #

Set the value of the “loadable-icon” property. When overloading is enabled, this is equivalent to

set avatar [ #loadableIcon := value ]

showInitials

No description available in the introspection data.

constructAvatarShowInitials :: (IsAvatar o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “show-initials” property. This is rarely needed directly, but it is used by new.

getAvatarShowInitials :: (MonadIO m, IsAvatar o) => o -> m Bool Source #

Get the value of the “show-initials” property. When overloading is enabled, this is equivalent to

get avatar #showInitials

setAvatarShowInitials :: (MonadIO m, IsAvatar o) => o -> Bool -> m () Source #

Set the value of the “show-initials” property. When overloading is enabled, this is equivalent to

set avatar [ #showInitials := value ]

size

The avatar size of the avatar.

constructAvatarSize :: (IsAvatar o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “size” property. This is rarely needed directly, but it is used by new.

getAvatarSize :: (MonadIO m, IsAvatar o) => o -> m Int32 Source #

Get the value of the “size” property. When overloading is enabled, this is equivalent to

get avatar #size

setAvatarSize :: (MonadIO m, IsAvatar o) => o -> Int32 -> m () Source #

Set the value of the “size” property. When overloading is enabled, this is equivalent to

set avatar [ #size := value ]

text

The text used for the initials and for generating the color. If Avatar:show-initials is False it's only used to generate the color.

clearAvatarText :: (MonadIO m, IsAvatar o) => o -> m () Source #

Set the value of the “text” property to Nothing. When overloading is enabled, this is equivalent to

clear #text

constructAvatarText :: (IsAvatar o, MonadIO m) => Text -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “text” property. This is rarely needed directly, but it is used by new.

getAvatarText :: (MonadIO m, IsAvatar o) => o -> m (Maybe Text) Source #

Get the value of the “text” property. When overloading is enabled, this is equivalent to

get avatar #text

setAvatarText :: (MonadIO m, IsAvatar o) => o -> Text -> m () Source #

Set the value of the “text” property. When overloading is enabled, this is equivalent to

set avatar [ #text := value ]