{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson and Iñaki García Etxebarria
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- /No description available in the introspection data./

#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif

module GI.Handy.Objects.Avatar
    ( 

-- * Exported types
    Avatar(..)                              ,
    IsAvatar                                ,
    toAvatar                                ,


 -- * Methods
-- | 
-- 
--  === __Click to display all available methods, including inherited ones__
-- ==== Methods
-- [activate]("GI.Gtk.Objects.Widget#g:method:activate"), [addAccelerator]("GI.Gtk.Objects.Widget#g:method:addAccelerator"), [addChild]("GI.Gtk.Interfaces.Buildable#g:method:addChild"), [addDeviceEvents]("GI.Gtk.Objects.Widget#g:method:addDeviceEvents"), [addEvents]("GI.Gtk.Objects.Widget#g:method:addEvents"), [addMnemonicLabel]("GI.Gtk.Objects.Widget#g:method:addMnemonicLabel"), [addTickCallback]("GI.Gtk.Objects.Widget#g:method:addTickCallback"), [bindProperty]("GI.GObject.Objects.Object#g:method:bindProperty"), [bindPropertyFull]("GI.GObject.Objects.Object#g:method:bindPropertyFull"), [canActivateAccel]("GI.Gtk.Objects.Widget#g:method:canActivateAccel"), [childFocus]("GI.Gtk.Objects.Widget#g:method:childFocus"), [childNotify]("GI.Gtk.Objects.Widget#g:method:childNotify"), [classPath]("GI.Gtk.Objects.Widget#g:method:classPath"), [computeExpand]("GI.Gtk.Objects.Widget#g:method:computeExpand"), [constructChild]("GI.Gtk.Interfaces.Buildable#g:method:constructChild"), [createPangoContext]("GI.Gtk.Objects.Widget#g:method:createPangoContext"), [createPangoLayout]("GI.Gtk.Objects.Widget#g:method:createPangoLayout"), [customFinished]("GI.Gtk.Interfaces.Buildable#g:method:customFinished"), [customTagEnd]("GI.Gtk.Interfaces.Buildable#g:method:customTagEnd"), [customTagStart]("GI.Gtk.Interfaces.Buildable#g:method:customTagStart"), [destroy]("GI.Gtk.Objects.Widget#g:method:destroy"), [destroyed]("GI.Gtk.Objects.Widget#g:method:destroyed"), [deviceIsShadowed]("GI.Gtk.Objects.Widget#g:method:deviceIsShadowed"), [dragBegin]("GI.Gtk.Objects.Widget#g:method:dragBegin"), [dragBeginWithCoordinates]("GI.Gtk.Objects.Widget#g:method:dragBeginWithCoordinates"), [dragCheckThreshold]("GI.Gtk.Objects.Widget#g:method:dragCheckThreshold"), [dragDestAddImageTargets]("GI.Gtk.Objects.Widget#g:method:dragDestAddImageTargets"), [dragDestAddTextTargets]("GI.Gtk.Objects.Widget#g:method:dragDestAddTextTargets"), [dragDestAddUriTargets]("GI.Gtk.Objects.Widget#g:method:dragDestAddUriTargets"), [dragDestFindTarget]("GI.Gtk.Objects.Widget#g:method:dragDestFindTarget"), [dragDestGetTargetList]("GI.Gtk.Objects.Widget#g:method:dragDestGetTargetList"), [dragDestGetTrackMotion]("GI.Gtk.Objects.Widget#g:method:dragDestGetTrackMotion"), [dragDestSet]("GI.Gtk.Objects.Widget#g:method:dragDestSet"), [dragDestSetProxy]("GI.Gtk.Objects.Widget#g:method:dragDestSetProxy"), [dragDestSetTargetList]("GI.Gtk.Objects.Widget#g:method:dragDestSetTargetList"), [dragDestSetTrackMotion]("GI.Gtk.Objects.Widget#g:method:dragDestSetTrackMotion"), [dragDestUnset]("GI.Gtk.Objects.Widget#g:method:dragDestUnset"), [dragGetData]("GI.Gtk.Objects.Widget#g:method:dragGetData"), [dragHighlight]("GI.Gtk.Objects.Widget#g:method:dragHighlight"), [dragSourceAddImageTargets]("GI.Gtk.Objects.Widget#g:method:dragSourceAddImageTargets"), [dragSourceAddTextTargets]("GI.Gtk.Objects.Widget#g:method:dragSourceAddTextTargets"), [dragSourceAddUriTargets]("GI.Gtk.Objects.Widget#g:method:dragSourceAddUriTargets"), [dragSourceGetTargetList]("GI.Gtk.Objects.Widget#g:method:dragSourceGetTargetList"), [dragSourceSet]("GI.Gtk.Objects.Widget#g:method:dragSourceSet"), [dragSourceSetIconGicon]("GI.Gtk.Objects.Widget#g:method:dragSourceSetIconGicon"), [dragSourceSetIconName]("GI.Gtk.Objects.Widget#g:method:dragSourceSetIconName"), [dragSourceSetIconPixbuf]("GI.Gtk.Objects.Widget#g:method:dragSourceSetIconPixbuf"), [dragSourceSetIconStock]("GI.Gtk.Objects.Widget#g:method:dragSourceSetIconStock"), [dragSourceSetTargetList]("GI.Gtk.Objects.Widget#g:method:dragSourceSetTargetList"), [dragSourceUnset]("GI.Gtk.Objects.Widget#g:method:dragSourceUnset"), [dragUnhighlight]("GI.Gtk.Objects.Widget#g:method:dragUnhighlight"), [draw]("GI.Gtk.Objects.Widget#g:method:draw"), [drawToPixbuf]("GI.Handy.Objects.Avatar#g:method:drawToPixbuf"), [drawToPixbufAsync]("GI.Handy.Objects.Avatar#g:method:drawToPixbufAsync"), [drawToPixbufFinish]("GI.Handy.Objects.Avatar#g:method:drawToPixbufFinish"), [ensureStyle]("GI.Gtk.Objects.Widget#g:method:ensureStyle"), [errorBell]("GI.Gtk.Objects.Widget#g:method:errorBell"), [event]("GI.Gtk.Objects.Widget#g:method:event"), [forceFloating]("GI.GObject.Objects.Object#g:method:forceFloating"), [freezeChildNotify]("GI.Gtk.Objects.Widget#g:method:freezeChildNotify"), [freezeNotify]("GI.GObject.Objects.Object#g:method:freezeNotify"), [getv]("GI.GObject.Objects.Object#g:method:getv"), [grabAdd]("GI.Gtk.Objects.Widget#g:method:grabAdd"), [grabDefault]("GI.Gtk.Objects.Widget#g:method:grabDefault"), [grabFocus]("GI.Gtk.Objects.Widget#g:method:grabFocus"), [grabRemove]("GI.Gtk.Objects.Widget#g:method:grabRemove"), [hasDefault]("GI.Gtk.Objects.Widget#g:method:hasDefault"), [hasFocus]("GI.Gtk.Objects.Widget#g:method:hasFocus"), [hasGrab]("GI.Gtk.Objects.Widget#g:method:hasGrab"), [hasRcStyle]("GI.Gtk.Objects.Widget#g:method:hasRcStyle"), [hasScreen]("GI.Gtk.Objects.Widget#g:method:hasScreen"), [hasVisibleFocus]("GI.Gtk.Objects.Widget#g:method:hasVisibleFocus"), [hide]("GI.Gtk.Objects.Widget#g:method:hide"), [hideOnDelete]("GI.Gtk.Objects.Widget#g:method:hideOnDelete"), [inDestruction]("GI.Gtk.Objects.Widget#g:method:inDestruction"), [initTemplate]("GI.Gtk.Objects.Widget#g:method:initTemplate"), [inputShapeCombineRegion]("GI.Gtk.Objects.Widget#g:method:inputShapeCombineRegion"), [insertActionGroup]("GI.Gtk.Objects.Widget#g:method:insertActionGroup"), [intersect]("GI.Gtk.Objects.Widget#g:method:intersect"), [isAncestor]("GI.Gtk.Objects.Widget#g:method:isAncestor"), [isComposited]("GI.Gtk.Objects.Widget#g:method:isComposited"), [isDrawable]("GI.Gtk.Objects.Widget#g:method:isDrawable"), [isFloating]("GI.GObject.Objects.Object#g:method:isFloating"), [isFocus]("GI.Gtk.Objects.Widget#g:method:isFocus"), [isSensitive]("GI.Gtk.Objects.Widget#g:method:isSensitive"), [isToplevel]("GI.Gtk.Objects.Widget#g:method:isToplevel"), [isVisible]("GI.Gtk.Objects.Widget#g:method:isVisible"), [keynavFailed]("GI.Gtk.Objects.Widget#g:method:keynavFailed"), [listAccelClosures]("GI.Gtk.Objects.Widget#g:method:listAccelClosures"), [listActionPrefixes]("GI.Gtk.Objects.Widget#g:method:listActionPrefixes"), [listMnemonicLabels]("GI.Gtk.Objects.Widget#g:method:listMnemonicLabels"), [map]("GI.Gtk.Objects.Widget#g:method:map"), [mnemonicActivate]("GI.Gtk.Objects.Widget#g:method:mnemonicActivate"), [modifyBase]("GI.Gtk.Objects.Widget#g:method:modifyBase"), [modifyBg]("GI.Gtk.Objects.Widget#g:method:modifyBg"), [modifyCursor]("GI.Gtk.Objects.Widget#g:method:modifyCursor"), [modifyFg]("GI.Gtk.Objects.Widget#g:method:modifyFg"), [modifyFont]("GI.Gtk.Objects.Widget#g:method:modifyFont"), [modifyStyle]("GI.Gtk.Objects.Widget#g:method:modifyStyle"), [modifyText]("GI.Gtk.Objects.Widget#g:method:modifyText"), [notify]("GI.GObject.Objects.Object#g:method:notify"), [notifyByPspec]("GI.GObject.Objects.Object#g:method:notifyByPspec"), [overrideBackgroundColor]("GI.Gtk.Objects.Widget#g:method:overrideBackgroundColor"), [overrideColor]("GI.Gtk.Objects.Widget#g:method:overrideColor"), [overrideCursor]("GI.Gtk.Objects.Widget#g:method:overrideCursor"), [overrideFont]("GI.Gtk.Objects.Widget#g:method:overrideFont"), [overrideSymbolicColor]("GI.Gtk.Objects.Widget#g:method:overrideSymbolicColor"), [parserFinished]("GI.Gtk.Interfaces.Buildable#g:method:parserFinished"), [path]("GI.Gtk.Objects.Widget#g:method:path"), [queueAllocate]("GI.Gtk.Objects.Widget#g:method:queueAllocate"), [queueComputeExpand]("GI.Gtk.Objects.Widget#g:method:queueComputeExpand"), [queueDraw]("GI.Gtk.Objects.Widget#g:method:queueDraw"), [queueDrawArea]("GI.Gtk.Objects.Widget#g:method:queueDrawArea"), [queueDrawRegion]("GI.Gtk.Objects.Widget#g:method:queueDrawRegion"), [queueResize]("GI.Gtk.Objects.Widget#g:method:queueResize"), [queueResizeNoRedraw]("GI.Gtk.Objects.Widget#g:method:queueResizeNoRedraw"), [realize]("GI.Gtk.Objects.Widget#g:method:realize"), [ref]("GI.GObject.Objects.Object#g:method:ref"), [refSink]("GI.GObject.Objects.Object#g:method:refSink"), [regionIntersect]("GI.Gtk.Objects.Widget#g:method:regionIntersect"), [registerWindow]("GI.Gtk.Objects.Widget#g:method:registerWindow"), [removeAccelerator]("GI.Gtk.Objects.Widget#g:method:removeAccelerator"), [removeMnemonicLabel]("GI.Gtk.Objects.Widget#g:method:removeMnemonicLabel"), [removeTickCallback]("GI.Gtk.Objects.Widget#g:method:removeTickCallback"), [renderIcon]("GI.Gtk.Objects.Widget#g:method:renderIcon"), [renderIconPixbuf]("GI.Gtk.Objects.Widget#g:method:renderIconPixbuf"), [reparent]("GI.Gtk.Objects.Widget#g:method:reparent"), [resetRcStyles]("GI.Gtk.Objects.Widget#g:method:resetRcStyles"), [resetStyle]("GI.Gtk.Objects.Widget#g:method:resetStyle"), [runDispose]("GI.GObject.Objects.Object#g:method:runDispose"), [sendExpose]("GI.Gtk.Objects.Widget#g:method:sendExpose"), [sendFocusChange]("GI.Gtk.Objects.Widget#g:method:sendFocusChange"), [shapeCombineRegion]("GI.Gtk.Objects.Widget#g:method:shapeCombineRegion"), [show]("GI.Gtk.Objects.Widget#g:method:show"), [showAll]("GI.Gtk.Objects.Widget#g:method:showAll"), [showNow]("GI.Gtk.Objects.Widget#g:method:showNow"), [sizeAllocate]("GI.Gtk.Objects.Widget#g:method:sizeAllocate"), [sizeAllocateWithBaseline]("GI.Gtk.Objects.Widget#g:method:sizeAllocateWithBaseline"), [sizeRequest]("GI.Gtk.Objects.Widget#g:method:sizeRequest"), [stealData]("GI.GObject.Objects.Object#g:method:stealData"), [stealQdata]("GI.GObject.Objects.Object#g:method:stealQdata"), [styleAttach]("GI.Gtk.Objects.Widget#g:method:styleAttach"), [styleGetProperty]("GI.Gtk.Objects.Widget#g:method:styleGetProperty"), [thawChildNotify]("GI.Gtk.Objects.Widget#g:method:thawChildNotify"), [thawNotify]("GI.GObject.Objects.Object#g:method:thawNotify"), [translateCoordinates]("GI.Gtk.Objects.Widget#g:method:translateCoordinates"), [triggerTooltipQuery]("GI.Gtk.Objects.Widget#g:method:triggerTooltipQuery"), [unmap]("GI.Gtk.Objects.Widget#g:method:unmap"), [unparent]("GI.Gtk.Objects.Widget#g:method:unparent"), [unrealize]("GI.Gtk.Objects.Widget#g:method:unrealize"), [unref]("GI.GObject.Objects.Object#g:method:unref"), [unregisterWindow]("GI.Gtk.Objects.Widget#g:method:unregisterWindow"), [unsetStateFlags]("GI.Gtk.Objects.Widget#g:method:unsetStateFlags"), [watchClosure]("GI.GObject.Objects.Object#g:method:watchClosure").
-- 
-- ==== Getters
-- [getAccessible]("GI.Gtk.Objects.Widget#g:method:getAccessible"), [getActionGroup]("GI.Gtk.Objects.Widget#g:method:getActionGroup"), [getAllocatedBaseline]("GI.Gtk.Objects.Widget#g:method:getAllocatedBaseline"), [getAllocatedHeight]("GI.Gtk.Objects.Widget#g:method:getAllocatedHeight"), [getAllocatedSize]("GI.Gtk.Objects.Widget#g:method:getAllocatedSize"), [getAllocatedWidth]("GI.Gtk.Objects.Widget#g:method:getAllocatedWidth"), [getAllocation]("GI.Gtk.Objects.Widget#g:method:getAllocation"), [getAncestor]("GI.Gtk.Objects.Widget#g:method:getAncestor"), [getAppPaintable]("GI.Gtk.Objects.Widget#g:method:getAppPaintable"), [getCanDefault]("GI.Gtk.Objects.Widget#g:method:getCanDefault"), [getCanFocus]("GI.Gtk.Objects.Widget#g:method:getCanFocus"), [getChildRequisition]("GI.Gtk.Objects.Widget#g:method:getChildRequisition"), [getChildVisible]("GI.Gtk.Objects.Widget#g:method:getChildVisible"), [getClip]("GI.Gtk.Objects.Widget#g:method:getClip"), [getClipboard]("GI.Gtk.Objects.Widget#g:method:getClipboard"), [getCompositeName]("GI.Gtk.Objects.Widget#g:method:getCompositeName"), [getData]("GI.GObject.Objects.Object#g:method:getData"), [getDeviceEnabled]("GI.Gtk.Objects.Widget#g:method:getDeviceEnabled"), [getDeviceEvents]("GI.Gtk.Objects.Widget#g:method:getDeviceEvents"), [getDirection]("GI.Gtk.Objects.Widget#g:method:getDirection"), [getDisplay]("GI.Gtk.Objects.Widget#g:method:getDisplay"), [getDoubleBuffered]("GI.Gtk.Objects.Widget#g:method:getDoubleBuffered"), [getEvents]("GI.Gtk.Objects.Widget#g:method:getEvents"), [getFocusOnClick]("GI.Gtk.Objects.Widget#g:method:getFocusOnClick"), [getFontMap]("GI.Gtk.Objects.Widget#g:method:getFontMap"), [getFontOptions]("GI.Gtk.Objects.Widget#g:method:getFontOptions"), [getFrameClock]("GI.Gtk.Objects.Widget#g:method:getFrameClock"), [getHalign]("GI.Gtk.Objects.Widget#g:method:getHalign"), [getHasTooltip]("GI.Gtk.Objects.Widget#g:method:getHasTooltip"), [getHasWindow]("GI.Gtk.Objects.Widget#g:method:getHasWindow"), [getHexpand]("GI.Gtk.Objects.Widget#g:method:getHexpand"), [getHexpandSet]("GI.Gtk.Objects.Widget#g:method:getHexpandSet"), [getIconName]("GI.Handy.Objects.Avatar#g:method:getIconName"), [getInternalChild]("GI.Gtk.Interfaces.Buildable#g:method:getInternalChild"), [getLoadableIcon]("GI.Handy.Objects.Avatar#g:method:getLoadableIcon"), [getMapped]("GI.Gtk.Objects.Widget#g:method:getMapped"), [getMarginBottom]("GI.Gtk.Objects.Widget#g:method:getMarginBottom"), [getMarginEnd]("GI.Gtk.Objects.Widget#g:method:getMarginEnd"), [getMarginLeft]("GI.Gtk.Objects.Widget#g:method:getMarginLeft"), [getMarginRight]("GI.Gtk.Objects.Widget#g:method:getMarginRight"), [getMarginStart]("GI.Gtk.Objects.Widget#g:method:getMarginStart"), [getMarginTop]("GI.Gtk.Objects.Widget#g:method:getMarginTop"), [getModifierMask]("GI.Gtk.Objects.Widget#g:method:getModifierMask"), [getModifierStyle]("GI.Gtk.Objects.Widget#g:method:getModifierStyle"), [getName]("GI.Gtk.Objects.Widget#g:method:getName"), [getNoShowAll]("GI.Gtk.Objects.Widget#g:method:getNoShowAll"), [getOpacity]("GI.Gtk.Objects.Widget#g:method:getOpacity"), [getPangoContext]("GI.Gtk.Objects.Widget#g:method:getPangoContext"), [getParent]("GI.Gtk.Objects.Widget#g:method:getParent"), [getParentWindow]("GI.Gtk.Objects.Widget#g:method:getParentWindow"), [getPath]("GI.Gtk.Objects.Widget#g:method:getPath"), [getPointer]("GI.Gtk.Objects.Widget#g:method:getPointer"), [getPreferredHeight]("GI.Gtk.Objects.Widget#g:method:getPreferredHeight"), [getPreferredHeightAndBaselineForWidth]("GI.Gtk.Objects.Widget#g:method:getPreferredHeightAndBaselineForWidth"), [getPreferredHeightForWidth]("GI.Gtk.Objects.Widget#g:method:getPreferredHeightForWidth"), [getPreferredSize]("GI.Gtk.Objects.Widget#g:method:getPreferredSize"), [getPreferredWidth]("GI.Gtk.Objects.Widget#g:method:getPreferredWidth"), [getPreferredWidthForHeight]("GI.Gtk.Objects.Widget#g:method:getPreferredWidthForHeight"), [getProperty]("GI.GObject.Objects.Object#g:method:getProperty"), [getQdata]("GI.GObject.Objects.Object#g:method:getQdata"), [getRealized]("GI.Gtk.Objects.Widget#g:method:getRealized"), [getReceivesDefault]("GI.Gtk.Objects.Widget#g:method:getReceivesDefault"), [getRequestMode]("GI.Gtk.Objects.Widget#g:method:getRequestMode"), [getRequisition]("GI.Gtk.Objects.Widget#g:method:getRequisition"), [getRootWindow]("GI.Gtk.Objects.Widget#g:method:getRootWindow"), [getScaleFactor]("GI.Gtk.Objects.Widget#g:method:getScaleFactor"), [getScreen]("GI.Gtk.Objects.Widget#g:method:getScreen"), [getSensitive]("GI.Gtk.Objects.Widget#g:method:getSensitive"), [getSettings]("GI.Gtk.Objects.Widget#g:method:getSettings"), [getShowInitials]("GI.Handy.Objects.Avatar#g:method:getShowInitials"), [getSize]("GI.Handy.Objects.Avatar#g:method:getSize"), [getSizeRequest]("GI.Gtk.Objects.Widget#g:method:getSizeRequest"), [getState]("GI.Gtk.Objects.Widget#g:method:getState"), [getStateFlags]("GI.Gtk.Objects.Widget#g:method:getStateFlags"), [getStyle]("GI.Gtk.Objects.Widget#g:method:getStyle"), [getStyleContext]("GI.Gtk.Objects.Widget#g:method:getStyleContext"), [getSupportMultidevice]("GI.Gtk.Objects.Widget#g:method:getSupportMultidevice"), [getTemplateChild]("GI.Gtk.Objects.Widget#g:method:getTemplateChild"), [getText]("GI.Handy.Objects.Avatar#g:method:getText"), [getTooltipMarkup]("GI.Gtk.Objects.Widget#g:method:getTooltipMarkup"), [getTooltipText]("GI.Gtk.Objects.Widget#g:method:getTooltipText"), [getTooltipWindow]("GI.Gtk.Objects.Widget#g:method:getTooltipWindow"), [getToplevel]("GI.Gtk.Objects.Widget#g:method:getToplevel"), [getValign]("GI.Gtk.Objects.Widget#g:method:getValign"), [getValignWithBaseline]("GI.Gtk.Objects.Widget#g:method:getValignWithBaseline"), [getVexpand]("GI.Gtk.Objects.Widget#g:method:getVexpand"), [getVexpandSet]("GI.Gtk.Objects.Widget#g:method:getVexpandSet"), [getVisible]("GI.Gtk.Objects.Widget#g:method:getVisible"), [getVisual]("GI.Gtk.Objects.Widget#g:method:getVisual"), [getWindow]("GI.Gtk.Objects.Widget#g:method:getWindow").
-- 
-- ==== Setters
-- [setAccelPath]("GI.Gtk.Objects.Widget#g:method:setAccelPath"), [setAllocation]("GI.Gtk.Objects.Widget#g:method:setAllocation"), [setAppPaintable]("GI.Gtk.Objects.Widget#g:method:setAppPaintable"), [setBuildableProperty]("GI.Gtk.Interfaces.Buildable#g:method:setBuildableProperty"), [setCanDefault]("GI.Gtk.Objects.Widget#g:method:setCanDefault"), [setCanFocus]("GI.Gtk.Objects.Widget#g:method:setCanFocus"), [setChildVisible]("GI.Gtk.Objects.Widget#g:method:setChildVisible"), [setClip]("GI.Gtk.Objects.Widget#g:method:setClip"), [setCompositeName]("GI.Gtk.Objects.Widget#g:method:setCompositeName"), [setData]("GI.GObject.Objects.Object#g:method:setData"), [setDataFull]("GI.GObject.Objects.Object#g:method:setDataFull"), [setDeviceEnabled]("GI.Gtk.Objects.Widget#g:method:setDeviceEnabled"), [setDeviceEvents]("GI.Gtk.Objects.Widget#g:method:setDeviceEvents"), [setDirection]("GI.Gtk.Objects.Widget#g:method:setDirection"), [setDoubleBuffered]("GI.Gtk.Objects.Widget#g:method:setDoubleBuffered"), [setEvents]("GI.Gtk.Objects.Widget#g:method:setEvents"), [setFocusOnClick]("GI.Gtk.Objects.Widget#g:method:setFocusOnClick"), [setFontMap]("GI.Gtk.Objects.Widget#g:method:setFontMap"), [setFontOptions]("GI.Gtk.Objects.Widget#g:method:setFontOptions"), [setHalign]("GI.Gtk.Objects.Widget#g:method:setHalign"), [setHasTooltip]("GI.Gtk.Objects.Widget#g:method:setHasTooltip"), [setHasWindow]("GI.Gtk.Objects.Widget#g:method:setHasWindow"), [setHexpand]("GI.Gtk.Objects.Widget#g:method:setHexpand"), [setHexpandSet]("GI.Gtk.Objects.Widget#g:method:setHexpandSet"), [setIconName]("GI.Handy.Objects.Avatar#g:method:setIconName"), [setImageLoadFunc]("GI.Handy.Objects.Avatar#g:method:setImageLoadFunc"), [setLoadableIcon]("GI.Handy.Objects.Avatar#g:method:setLoadableIcon"), [setMapped]("GI.Gtk.Objects.Widget#g:method:setMapped"), [setMarginBottom]("GI.Gtk.Objects.Widget#g:method:setMarginBottom"), [setMarginEnd]("GI.Gtk.Objects.Widget#g:method:setMarginEnd"), [setMarginLeft]("GI.Gtk.Objects.Widget#g:method:setMarginLeft"), [setMarginRight]("GI.Gtk.Objects.Widget#g:method:setMarginRight"), [setMarginStart]("GI.Gtk.Objects.Widget#g:method:setMarginStart"), [setMarginTop]("GI.Gtk.Objects.Widget#g:method:setMarginTop"), [setName]("GI.Gtk.Objects.Widget#g:method:setName"), [setNoShowAll]("GI.Gtk.Objects.Widget#g:method:setNoShowAll"), [setOpacity]("GI.Gtk.Objects.Widget#g:method:setOpacity"), [setParent]("GI.Gtk.Objects.Widget#g:method:setParent"), [setParentWindow]("GI.Gtk.Objects.Widget#g:method:setParentWindow"), [setProperty]("GI.GObject.Objects.Object#g:method:setProperty"), [setRealized]("GI.Gtk.Objects.Widget#g:method:setRealized"), [setReceivesDefault]("GI.Gtk.Objects.Widget#g:method:setReceivesDefault"), [setRedrawOnAllocate]("GI.Gtk.Objects.Widget#g:method:setRedrawOnAllocate"), [setSensitive]("GI.Gtk.Objects.Widget#g:method:setSensitive"), [setShowInitials]("GI.Handy.Objects.Avatar#g:method:setShowInitials"), [setSize]("GI.Handy.Objects.Avatar#g:method:setSize"), [setSizeRequest]("GI.Gtk.Objects.Widget#g:method:setSizeRequest"), [setState]("GI.Gtk.Objects.Widget#g:method:setState"), [setStateFlags]("GI.Gtk.Objects.Widget#g:method:setStateFlags"), [setStyle]("GI.Gtk.Objects.Widget#g:method:setStyle"), [setSupportMultidevice]("GI.Gtk.Objects.Widget#g:method:setSupportMultidevice"), [setText]("GI.Handy.Objects.Avatar#g:method:setText"), [setTooltipMarkup]("GI.Gtk.Objects.Widget#g:method:setTooltipMarkup"), [setTooltipText]("GI.Gtk.Objects.Widget#g:method:setTooltipText"), [setTooltipWindow]("GI.Gtk.Objects.Widget#g:method:setTooltipWindow"), [setValign]("GI.Gtk.Objects.Widget#g:method:setValign"), [setVexpand]("GI.Gtk.Objects.Widget#g:method:setVexpand"), [setVexpandSet]("GI.Gtk.Objects.Widget#g:method:setVexpandSet"), [setVisible]("GI.Gtk.Objects.Widget#g:method:setVisible"), [setVisual]("GI.Gtk.Objects.Widget#g:method:setVisual"), [setWindow]("GI.Gtk.Objects.Widget#g:method:setWindow").

#if defined(ENABLE_OVERLOADING)
    ResolveAvatarMethod                     ,
#endif

-- ** drawToPixbuf #method:drawToPixbuf#

#if defined(ENABLE_OVERLOADING)
    AvatarDrawToPixbufMethodInfo            ,
#endif
    avatarDrawToPixbuf                      ,


-- ** drawToPixbufAsync #method:drawToPixbufAsync#

#if defined(ENABLE_OVERLOADING)
    AvatarDrawToPixbufAsyncMethodInfo       ,
#endif
    avatarDrawToPixbufAsync                 ,


-- ** drawToPixbufFinish #method:drawToPixbufFinish#

#if defined(ENABLE_OVERLOADING)
    AvatarDrawToPixbufFinishMethodInfo      ,
#endif
    avatarDrawToPixbufFinish                ,


-- ** getIconName #method:getIconName#

#if defined(ENABLE_OVERLOADING)
    AvatarGetIconNameMethodInfo             ,
#endif
    avatarGetIconName                       ,


-- ** getLoadableIcon #method:getLoadableIcon#

#if defined(ENABLE_OVERLOADING)
    AvatarGetLoadableIconMethodInfo         ,
#endif
    avatarGetLoadableIcon                   ,


-- ** getShowInitials #method:getShowInitials#

#if defined(ENABLE_OVERLOADING)
    AvatarGetShowInitialsMethodInfo         ,
#endif
    avatarGetShowInitials                   ,


-- ** getSize #method:getSize#

#if defined(ENABLE_OVERLOADING)
    AvatarGetSizeMethodInfo                 ,
#endif
    avatarGetSize                           ,


-- ** getText #method:getText#

#if defined(ENABLE_OVERLOADING)
    AvatarGetTextMethodInfo                 ,
#endif
    avatarGetText                           ,


-- ** new #method:new#

    avatarNew                               ,


-- ** setIconName #method:setIconName#

#if defined(ENABLE_OVERLOADING)
    AvatarSetIconNameMethodInfo             ,
#endif
    avatarSetIconName                       ,


-- ** setImageLoadFunc #method:setImageLoadFunc#

#if defined(ENABLE_OVERLOADING)
    AvatarSetImageLoadFuncMethodInfo        ,
#endif
    avatarSetImageLoadFunc                  ,


-- ** setLoadableIcon #method:setLoadableIcon#

#if defined(ENABLE_OVERLOADING)
    AvatarSetLoadableIconMethodInfo         ,
#endif
    avatarSetLoadableIcon                   ,


-- ** setShowInitials #method:setShowInitials#

#if defined(ENABLE_OVERLOADING)
    AvatarSetShowInitialsMethodInfo         ,
#endif
    avatarSetShowInitials                   ,


-- ** setSize #method:setSize#

#if defined(ENABLE_OVERLOADING)
    AvatarSetSizeMethodInfo                 ,
#endif
    avatarSetSize                           ,


-- ** setText #method:setText#

#if defined(ENABLE_OVERLOADING)
    AvatarSetTextMethodInfo                 ,
#endif
    avatarSetText                           ,




 -- * Properties


-- ** iconName #attr: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/

#if defined(ENABLE_OVERLOADING)
    AvatarIconNamePropertyInfo              ,
#endif
#if defined(ENABLE_OVERLOADING)
    avatarIconName                          ,
#endif
    clearAvatarIconName                     ,
    constructAvatarIconName                 ,
    getAvatarIconName                       ,
    setAvatarIconName                       ,


-- ** loadableIcon #attr:loadableIcon#
-- | A t'GI.Gio.Interfaces.LoadableIcon.LoadableIcon' used to load the avatar.
-- 
-- /Since: 1.2/

#if defined(ENABLE_OVERLOADING)
    AvatarLoadableIconPropertyInfo          ,
#endif
#if defined(ENABLE_OVERLOADING)
    avatarLoadableIcon                      ,
#endif
    clearAvatarLoadableIcon                 ,
    constructAvatarLoadableIcon             ,
    getAvatarLoadableIcon                   ,
    setAvatarLoadableIcon                   ,


-- ** showInitials #attr:showInitials#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    AvatarShowInitialsPropertyInfo          ,
#endif
#if defined(ENABLE_OVERLOADING)
    avatarShowInitials                      ,
#endif
    constructAvatarShowInitials             ,
    getAvatarShowInitials                   ,
    setAvatarShowInitials                   ,


-- ** size #attr:size#
-- | The avatar size of the avatar.

#if defined(ENABLE_OVERLOADING)
    AvatarSizePropertyInfo                  ,
#endif
#if defined(ENABLE_OVERLOADING)
    avatarSize                              ,
#endif
    constructAvatarSize                     ,
    getAvatarSize                           ,
    setAvatarSize                           ,


-- ** text #attr:text#
-- | The text used for the initials and for generating the color.
-- If t'GI.Handy.Objects.Avatar.Avatar':@/show-initials/@ is 'P.False' it\'s only used to generate the color.

#if defined(ENABLE_OVERLOADING)
    AvatarTextPropertyInfo                  ,
#endif
#if defined(ENABLE_OVERLOADING)
    avatarText                              ,
#endif
    clearAvatarText                         ,
    constructAvatarText                     ,
    getAvatarText                           ,
    setAvatarText                           ,




    ) where

import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P

import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R

import qualified GI.Atk.Interfaces.ImplementorIface as Atk.ImplementorIface
import qualified GI.GLib.Callbacks as GLib.Callbacks
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.GdkPixbuf.Objects.Pixbuf as GdkPixbuf.Pixbuf
import qualified GI.Gio.Callbacks as Gio.Callbacks
import qualified GI.Gio.Interfaces.AsyncResult as Gio.AsyncResult
import qualified GI.Gio.Interfaces.LoadableIcon as Gio.LoadableIcon
import qualified GI.Gio.Objects.Cancellable as Gio.Cancellable
import qualified GI.Gtk.Interfaces.Buildable as Gtk.Buildable
import qualified GI.Gtk.Objects.DrawingArea as Gtk.DrawingArea
import qualified GI.Gtk.Objects.Widget as Gtk.Widget
import qualified GI.Handy.Callbacks as Handy.Callbacks

-- | Memory-managed wrapper type.
newtype Avatar = Avatar (SP.ManagedPtr Avatar)
    deriving (Avatar -> Avatar -> Bool
(Avatar -> Avatar -> Bool)
-> (Avatar -> Avatar -> Bool) -> Eq Avatar
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Avatar -> Avatar -> Bool
$c/= :: Avatar -> Avatar -> Bool
== :: Avatar -> Avatar -> Bool
$c== :: Avatar -> Avatar -> Bool
Eq)

instance SP.ManagedPtrNewtype Avatar where
    toManagedPtr :: Avatar -> ManagedPtr Avatar
toManagedPtr (Avatar ManagedPtr Avatar
p) = ManagedPtr Avatar
p

foreign import ccall "hdy_avatar_get_type"
    c_hdy_avatar_get_type :: IO B.Types.GType

instance B.Types.TypedObject Avatar where
    glibType :: IO GType
glibType = IO GType
c_hdy_avatar_get_type

instance B.Types.GObject Avatar

-- | Type class for types which can be safely cast to `Avatar`, for instance with `toAvatar`.
class (SP.GObject o, O.IsDescendantOf Avatar o) => IsAvatar o
instance (SP.GObject o, O.IsDescendantOf Avatar o) => IsAvatar o

instance O.HasParentTypes Avatar
type instance O.ParentTypes Avatar = '[Gtk.DrawingArea.DrawingArea, Gtk.Widget.Widget, GObject.Object.Object, Atk.ImplementorIface.ImplementorIface, Gtk.Buildable.Buildable]

-- | Cast to `Avatar`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.
toAvatar :: (MIO.MonadIO m, IsAvatar o) => o -> m Avatar
toAvatar :: forall (m :: * -> *) o. (MonadIO m, IsAvatar o) => o -> m Avatar
toAvatar = IO Avatar -> m Avatar
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Avatar -> m Avatar) -> (o -> IO Avatar) -> o -> m Avatar
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr Avatar -> Avatar) -> o -> IO Avatar
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
 ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr Avatar -> Avatar
Avatar

-- | Convert 'Avatar' to and from 'Data.GI.Base.GValue.GValue'. See 'Data.GI.Base.GValue.toGValue' and 'Data.GI.Base.GValue.fromGValue'.
instance B.GValue.IsGValue (Maybe Avatar) where
    gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_hdy_avatar_get_type
    gvalueSet_ :: Ptr GValue -> Maybe Avatar -> IO ()
gvalueSet_ Ptr GValue
gv Maybe Avatar
P.Nothing = Ptr GValue -> Ptr Avatar -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr Avatar
forall a. Ptr a
FP.nullPtr :: FP.Ptr Avatar)
    gvalueSet_ Ptr GValue
gv (P.Just Avatar
obj) = Avatar -> (Ptr Avatar -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Avatar
obj (Ptr GValue -> Ptr Avatar -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
    gvalueGet_ :: Ptr GValue -> IO (Maybe Avatar)
gvalueGet_ Ptr GValue
gv = do
        Ptr Avatar
ptr <- Ptr GValue -> IO (Ptr Avatar)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr Avatar)
        if Ptr Avatar
ptr Ptr Avatar -> Ptr Avatar -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr Avatar
forall a. Ptr a
FP.nullPtr
        then Avatar -> Maybe Avatar
forall a. a -> Maybe a
P.Just (Avatar -> Maybe Avatar) -> IO Avatar -> IO (Maybe Avatar)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr Avatar -> Avatar) -> Ptr Avatar -> IO Avatar
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr Avatar -> Avatar
Avatar Ptr Avatar
ptr
        else Maybe Avatar -> IO (Maybe Avatar)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Avatar
forall a. Maybe a
P.Nothing
        
    

#if defined(ENABLE_OVERLOADING)
type family ResolveAvatarMethod (t :: Symbol) (o :: *) :: * where
    ResolveAvatarMethod "activate" o = Gtk.Widget.WidgetActivateMethodInfo
    ResolveAvatarMethod "addAccelerator" o = Gtk.Widget.WidgetAddAcceleratorMethodInfo
    ResolveAvatarMethod "addChild" o = Gtk.Buildable.BuildableAddChildMethodInfo
    ResolveAvatarMethod "addDeviceEvents" o = Gtk.Widget.WidgetAddDeviceEventsMethodInfo
    ResolveAvatarMethod "addEvents" o = Gtk.Widget.WidgetAddEventsMethodInfo
    ResolveAvatarMethod "addMnemonicLabel" o = Gtk.Widget.WidgetAddMnemonicLabelMethodInfo
    ResolveAvatarMethod "addTickCallback" o = Gtk.Widget.WidgetAddTickCallbackMethodInfo
    ResolveAvatarMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveAvatarMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveAvatarMethod "canActivateAccel" o = Gtk.Widget.WidgetCanActivateAccelMethodInfo
    ResolveAvatarMethod "childFocus" o = Gtk.Widget.WidgetChildFocusMethodInfo
    ResolveAvatarMethod "childNotify" o = Gtk.Widget.WidgetChildNotifyMethodInfo
    ResolveAvatarMethod "classPath" o = Gtk.Widget.WidgetClassPathMethodInfo
    ResolveAvatarMethod "computeExpand" o = Gtk.Widget.WidgetComputeExpandMethodInfo
    ResolveAvatarMethod "constructChild" o = Gtk.Buildable.BuildableConstructChildMethodInfo
    ResolveAvatarMethod "createPangoContext" o = Gtk.Widget.WidgetCreatePangoContextMethodInfo
    ResolveAvatarMethod "createPangoLayout" o = Gtk.Widget.WidgetCreatePangoLayoutMethodInfo
    ResolveAvatarMethod "customFinished" o = Gtk.Buildable.BuildableCustomFinishedMethodInfo
    ResolveAvatarMethod "customTagEnd" o = Gtk.Buildable.BuildableCustomTagEndMethodInfo
    ResolveAvatarMethod "customTagStart" o = Gtk.Buildable.BuildableCustomTagStartMethodInfo
    ResolveAvatarMethod "destroy" o = Gtk.Widget.WidgetDestroyMethodInfo
    ResolveAvatarMethod "destroyed" o = Gtk.Widget.WidgetDestroyedMethodInfo
    ResolveAvatarMethod "deviceIsShadowed" o = Gtk.Widget.WidgetDeviceIsShadowedMethodInfo
    ResolveAvatarMethod "dragBegin" o = Gtk.Widget.WidgetDragBeginMethodInfo
    ResolveAvatarMethod "dragBeginWithCoordinates" o = Gtk.Widget.WidgetDragBeginWithCoordinatesMethodInfo
    ResolveAvatarMethod "dragCheckThreshold" o = Gtk.Widget.WidgetDragCheckThresholdMethodInfo
    ResolveAvatarMethod "dragDestAddImageTargets" o = Gtk.Widget.WidgetDragDestAddImageTargetsMethodInfo
    ResolveAvatarMethod "dragDestAddTextTargets" o = Gtk.Widget.WidgetDragDestAddTextTargetsMethodInfo
    ResolveAvatarMethod "dragDestAddUriTargets" o = Gtk.Widget.WidgetDragDestAddUriTargetsMethodInfo
    ResolveAvatarMethod "dragDestFindTarget" o = Gtk.Widget.WidgetDragDestFindTargetMethodInfo
    ResolveAvatarMethod "dragDestGetTargetList" o = Gtk.Widget.WidgetDragDestGetTargetListMethodInfo
    ResolveAvatarMethod "dragDestGetTrackMotion" o = Gtk.Widget.WidgetDragDestGetTrackMotionMethodInfo
    ResolveAvatarMethod "dragDestSet" o = Gtk.Widget.WidgetDragDestSetMethodInfo
    ResolveAvatarMethod "dragDestSetProxy" o = Gtk.Widget.WidgetDragDestSetProxyMethodInfo
    ResolveAvatarMethod "dragDestSetTargetList" o = Gtk.Widget.WidgetDragDestSetTargetListMethodInfo
    ResolveAvatarMethod "dragDestSetTrackMotion" o = Gtk.Widget.WidgetDragDestSetTrackMotionMethodInfo
    ResolveAvatarMethod "dragDestUnset" o = Gtk.Widget.WidgetDragDestUnsetMethodInfo
    ResolveAvatarMethod "dragGetData" o = Gtk.Widget.WidgetDragGetDataMethodInfo
    ResolveAvatarMethod "dragHighlight" o = Gtk.Widget.WidgetDragHighlightMethodInfo
    ResolveAvatarMethod "dragSourceAddImageTargets" o = Gtk.Widget.WidgetDragSourceAddImageTargetsMethodInfo
    ResolveAvatarMethod "dragSourceAddTextTargets" o = Gtk.Widget.WidgetDragSourceAddTextTargetsMethodInfo
    ResolveAvatarMethod "dragSourceAddUriTargets" o = Gtk.Widget.WidgetDragSourceAddUriTargetsMethodInfo
    ResolveAvatarMethod "dragSourceGetTargetList" o = Gtk.Widget.WidgetDragSourceGetTargetListMethodInfo
    ResolveAvatarMethod "dragSourceSet" o = Gtk.Widget.WidgetDragSourceSetMethodInfo
    ResolveAvatarMethod "dragSourceSetIconGicon" o = Gtk.Widget.WidgetDragSourceSetIconGiconMethodInfo
    ResolveAvatarMethod "dragSourceSetIconName" o = Gtk.Widget.WidgetDragSourceSetIconNameMethodInfo
    ResolveAvatarMethod "dragSourceSetIconPixbuf" o = Gtk.Widget.WidgetDragSourceSetIconPixbufMethodInfo
    ResolveAvatarMethod "dragSourceSetIconStock" o = Gtk.Widget.WidgetDragSourceSetIconStockMethodInfo
    ResolveAvatarMethod "dragSourceSetTargetList" o = Gtk.Widget.WidgetDragSourceSetTargetListMethodInfo
    ResolveAvatarMethod "dragSourceUnset" o = Gtk.Widget.WidgetDragSourceUnsetMethodInfo
    ResolveAvatarMethod "dragUnhighlight" o = Gtk.Widget.WidgetDragUnhighlightMethodInfo
    ResolveAvatarMethod "draw" o = Gtk.Widget.WidgetDrawMethodInfo
    ResolveAvatarMethod "drawToPixbuf" o = AvatarDrawToPixbufMethodInfo
    ResolveAvatarMethod "drawToPixbufAsync" o = AvatarDrawToPixbufAsyncMethodInfo
    ResolveAvatarMethod "drawToPixbufFinish" o = AvatarDrawToPixbufFinishMethodInfo
    ResolveAvatarMethod "ensureStyle" o = Gtk.Widget.WidgetEnsureStyleMethodInfo
    ResolveAvatarMethod "errorBell" o = Gtk.Widget.WidgetErrorBellMethodInfo
    ResolveAvatarMethod "event" o = Gtk.Widget.WidgetEventMethodInfo
    ResolveAvatarMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveAvatarMethod "freezeChildNotify" o = Gtk.Widget.WidgetFreezeChildNotifyMethodInfo
    ResolveAvatarMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveAvatarMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveAvatarMethod "grabAdd" o = Gtk.Widget.WidgetGrabAddMethodInfo
    ResolveAvatarMethod "grabDefault" o = Gtk.Widget.WidgetGrabDefaultMethodInfo
    ResolveAvatarMethod "grabFocus" o = Gtk.Widget.WidgetGrabFocusMethodInfo
    ResolveAvatarMethod "grabRemove" o = Gtk.Widget.WidgetGrabRemoveMethodInfo
    ResolveAvatarMethod "hasDefault" o = Gtk.Widget.WidgetHasDefaultMethodInfo
    ResolveAvatarMethod "hasFocus" o = Gtk.Widget.WidgetHasFocusMethodInfo
    ResolveAvatarMethod "hasGrab" o = Gtk.Widget.WidgetHasGrabMethodInfo
    ResolveAvatarMethod "hasRcStyle" o = Gtk.Widget.WidgetHasRcStyleMethodInfo
    ResolveAvatarMethod "hasScreen" o = Gtk.Widget.WidgetHasScreenMethodInfo
    ResolveAvatarMethod "hasVisibleFocus" o = Gtk.Widget.WidgetHasVisibleFocusMethodInfo
    ResolveAvatarMethod "hide" o = Gtk.Widget.WidgetHideMethodInfo
    ResolveAvatarMethod "hideOnDelete" o = Gtk.Widget.WidgetHideOnDeleteMethodInfo
    ResolveAvatarMethod "inDestruction" o = Gtk.Widget.WidgetInDestructionMethodInfo
    ResolveAvatarMethod "initTemplate" o = Gtk.Widget.WidgetInitTemplateMethodInfo
    ResolveAvatarMethod "inputShapeCombineRegion" o = Gtk.Widget.WidgetInputShapeCombineRegionMethodInfo
    ResolveAvatarMethod "insertActionGroup" o = Gtk.Widget.WidgetInsertActionGroupMethodInfo
    ResolveAvatarMethod "intersect" o = Gtk.Widget.WidgetIntersectMethodInfo
    ResolveAvatarMethod "isAncestor" o = Gtk.Widget.WidgetIsAncestorMethodInfo
    ResolveAvatarMethod "isComposited" o = Gtk.Widget.WidgetIsCompositedMethodInfo
    ResolveAvatarMethod "isDrawable" o = Gtk.Widget.WidgetIsDrawableMethodInfo
    ResolveAvatarMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveAvatarMethod "isFocus" o = Gtk.Widget.WidgetIsFocusMethodInfo
    ResolveAvatarMethod "isSensitive" o = Gtk.Widget.WidgetIsSensitiveMethodInfo
    ResolveAvatarMethod "isToplevel" o = Gtk.Widget.WidgetIsToplevelMethodInfo
    ResolveAvatarMethod "isVisible" o = Gtk.Widget.WidgetIsVisibleMethodInfo
    ResolveAvatarMethod "keynavFailed" o = Gtk.Widget.WidgetKeynavFailedMethodInfo
    ResolveAvatarMethod "listAccelClosures" o = Gtk.Widget.WidgetListAccelClosuresMethodInfo
    ResolveAvatarMethod "listActionPrefixes" o = Gtk.Widget.WidgetListActionPrefixesMethodInfo
    ResolveAvatarMethod "listMnemonicLabels" o = Gtk.Widget.WidgetListMnemonicLabelsMethodInfo
    ResolveAvatarMethod "map" o = Gtk.Widget.WidgetMapMethodInfo
    ResolveAvatarMethod "mnemonicActivate" o = Gtk.Widget.WidgetMnemonicActivateMethodInfo
    ResolveAvatarMethod "modifyBase" o = Gtk.Widget.WidgetModifyBaseMethodInfo
    ResolveAvatarMethod "modifyBg" o = Gtk.Widget.WidgetModifyBgMethodInfo
    ResolveAvatarMethod "modifyCursor" o = Gtk.Widget.WidgetModifyCursorMethodInfo
    ResolveAvatarMethod "modifyFg" o = Gtk.Widget.WidgetModifyFgMethodInfo
    ResolveAvatarMethod "modifyFont" o = Gtk.Widget.WidgetModifyFontMethodInfo
    ResolveAvatarMethod "modifyStyle" o = Gtk.Widget.WidgetModifyStyleMethodInfo
    ResolveAvatarMethod "modifyText" o = Gtk.Widget.WidgetModifyTextMethodInfo
    ResolveAvatarMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveAvatarMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveAvatarMethod "overrideBackgroundColor" o = Gtk.Widget.WidgetOverrideBackgroundColorMethodInfo
    ResolveAvatarMethod "overrideColor" o = Gtk.Widget.WidgetOverrideColorMethodInfo
    ResolveAvatarMethod "overrideCursor" o = Gtk.Widget.WidgetOverrideCursorMethodInfo
    ResolveAvatarMethod "overrideFont" o = Gtk.Widget.WidgetOverrideFontMethodInfo
    ResolveAvatarMethod "overrideSymbolicColor" o = Gtk.Widget.WidgetOverrideSymbolicColorMethodInfo
    ResolveAvatarMethod "parserFinished" o = Gtk.Buildable.BuildableParserFinishedMethodInfo
    ResolveAvatarMethod "path" o = Gtk.Widget.WidgetPathMethodInfo
    ResolveAvatarMethod "queueAllocate" o = Gtk.Widget.WidgetQueueAllocateMethodInfo
    ResolveAvatarMethod "queueComputeExpand" o = Gtk.Widget.WidgetQueueComputeExpandMethodInfo
    ResolveAvatarMethod "queueDraw" o = Gtk.Widget.WidgetQueueDrawMethodInfo
    ResolveAvatarMethod "queueDrawArea" o = Gtk.Widget.WidgetQueueDrawAreaMethodInfo
    ResolveAvatarMethod "queueDrawRegion" o = Gtk.Widget.WidgetQueueDrawRegionMethodInfo
    ResolveAvatarMethod "queueResize" o = Gtk.Widget.WidgetQueueResizeMethodInfo
    ResolveAvatarMethod "queueResizeNoRedraw" o = Gtk.Widget.WidgetQueueResizeNoRedrawMethodInfo
    ResolveAvatarMethod "realize" o = Gtk.Widget.WidgetRealizeMethodInfo
    ResolveAvatarMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveAvatarMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveAvatarMethod "regionIntersect" o = Gtk.Widget.WidgetRegionIntersectMethodInfo
    ResolveAvatarMethod "registerWindow" o = Gtk.Widget.WidgetRegisterWindowMethodInfo
    ResolveAvatarMethod "removeAccelerator" o = Gtk.Widget.WidgetRemoveAcceleratorMethodInfo
    ResolveAvatarMethod "removeMnemonicLabel" o = Gtk.Widget.WidgetRemoveMnemonicLabelMethodInfo
    ResolveAvatarMethod "removeTickCallback" o = Gtk.Widget.WidgetRemoveTickCallbackMethodInfo
    ResolveAvatarMethod "renderIcon" o = Gtk.Widget.WidgetRenderIconMethodInfo
    ResolveAvatarMethod "renderIconPixbuf" o = Gtk.Widget.WidgetRenderIconPixbufMethodInfo
    ResolveAvatarMethod "reparent" o = Gtk.Widget.WidgetReparentMethodInfo
    ResolveAvatarMethod "resetRcStyles" o = Gtk.Widget.WidgetResetRcStylesMethodInfo
    ResolveAvatarMethod "resetStyle" o = Gtk.Widget.WidgetResetStyleMethodInfo
    ResolveAvatarMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveAvatarMethod "sendExpose" o = Gtk.Widget.WidgetSendExposeMethodInfo
    ResolveAvatarMethod "sendFocusChange" o = Gtk.Widget.WidgetSendFocusChangeMethodInfo
    ResolveAvatarMethod "shapeCombineRegion" o = Gtk.Widget.WidgetShapeCombineRegionMethodInfo
    ResolveAvatarMethod "show" o = Gtk.Widget.WidgetShowMethodInfo
    ResolveAvatarMethod "showAll" o = Gtk.Widget.WidgetShowAllMethodInfo
    ResolveAvatarMethod "showNow" o = Gtk.Widget.WidgetShowNowMethodInfo
    ResolveAvatarMethod "sizeAllocate" o = Gtk.Widget.WidgetSizeAllocateMethodInfo
    ResolveAvatarMethod "sizeAllocateWithBaseline" o = Gtk.Widget.WidgetSizeAllocateWithBaselineMethodInfo
    ResolveAvatarMethod "sizeRequest" o = Gtk.Widget.WidgetSizeRequestMethodInfo
    ResolveAvatarMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveAvatarMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveAvatarMethod "styleAttach" o = Gtk.Widget.WidgetStyleAttachMethodInfo
    ResolveAvatarMethod "styleGetProperty" o = Gtk.Widget.WidgetStyleGetPropertyMethodInfo
    ResolveAvatarMethod "thawChildNotify" o = Gtk.Widget.WidgetThawChildNotifyMethodInfo
    ResolveAvatarMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveAvatarMethod "translateCoordinates" o = Gtk.Widget.WidgetTranslateCoordinatesMethodInfo
    ResolveAvatarMethod "triggerTooltipQuery" o = Gtk.Widget.WidgetTriggerTooltipQueryMethodInfo
    ResolveAvatarMethod "unmap" o = Gtk.Widget.WidgetUnmapMethodInfo
    ResolveAvatarMethod "unparent" o = Gtk.Widget.WidgetUnparentMethodInfo
    ResolveAvatarMethod "unrealize" o = Gtk.Widget.WidgetUnrealizeMethodInfo
    ResolveAvatarMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveAvatarMethod "unregisterWindow" o = Gtk.Widget.WidgetUnregisterWindowMethodInfo
    ResolveAvatarMethod "unsetStateFlags" o = Gtk.Widget.WidgetUnsetStateFlagsMethodInfo
    ResolveAvatarMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveAvatarMethod "getAccessible" o = Gtk.Widget.WidgetGetAccessibleMethodInfo
    ResolveAvatarMethod "getActionGroup" o = Gtk.Widget.WidgetGetActionGroupMethodInfo
    ResolveAvatarMethod "getAllocatedBaseline" o = Gtk.Widget.WidgetGetAllocatedBaselineMethodInfo
    ResolveAvatarMethod "getAllocatedHeight" o = Gtk.Widget.WidgetGetAllocatedHeightMethodInfo
    ResolveAvatarMethod "getAllocatedSize" o = Gtk.Widget.WidgetGetAllocatedSizeMethodInfo
    ResolveAvatarMethod "getAllocatedWidth" o = Gtk.Widget.WidgetGetAllocatedWidthMethodInfo
    ResolveAvatarMethod "getAllocation" o = Gtk.Widget.WidgetGetAllocationMethodInfo
    ResolveAvatarMethod "getAncestor" o = Gtk.Widget.WidgetGetAncestorMethodInfo
    ResolveAvatarMethod "getAppPaintable" o = Gtk.Widget.WidgetGetAppPaintableMethodInfo
    ResolveAvatarMethod "getCanDefault" o = Gtk.Widget.WidgetGetCanDefaultMethodInfo
    ResolveAvatarMethod "getCanFocus" o = Gtk.Widget.WidgetGetCanFocusMethodInfo
    ResolveAvatarMethod "getChildRequisition" o = Gtk.Widget.WidgetGetChildRequisitionMethodInfo
    ResolveAvatarMethod "getChildVisible" o = Gtk.Widget.WidgetGetChildVisibleMethodInfo
    ResolveAvatarMethod "getClip" o = Gtk.Widget.WidgetGetClipMethodInfo
    ResolveAvatarMethod "getClipboard" o = Gtk.Widget.WidgetGetClipboardMethodInfo
    ResolveAvatarMethod "getCompositeName" o = Gtk.Widget.WidgetGetCompositeNameMethodInfo
    ResolveAvatarMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveAvatarMethod "getDeviceEnabled" o = Gtk.Widget.WidgetGetDeviceEnabledMethodInfo
    ResolveAvatarMethod "getDeviceEvents" o = Gtk.Widget.WidgetGetDeviceEventsMethodInfo
    ResolveAvatarMethod "getDirection" o = Gtk.Widget.WidgetGetDirectionMethodInfo
    ResolveAvatarMethod "getDisplay" o = Gtk.Widget.WidgetGetDisplayMethodInfo
    ResolveAvatarMethod "getDoubleBuffered" o = Gtk.Widget.WidgetGetDoubleBufferedMethodInfo
    ResolveAvatarMethod "getEvents" o = Gtk.Widget.WidgetGetEventsMethodInfo
    ResolveAvatarMethod "getFocusOnClick" o = Gtk.Widget.WidgetGetFocusOnClickMethodInfo
    ResolveAvatarMethod "getFontMap" o = Gtk.Widget.WidgetGetFontMapMethodInfo
    ResolveAvatarMethod "getFontOptions" o = Gtk.Widget.WidgetGetFontOptionsMethodInfo
    ResolveAvatarMethod "getFrameClock" o = Gtk.Widget.WidgetGetFrameClockMethodInfo
    ResolveAvatarMethod "getHalign" o = Gtk.Widget.WidgetGetHalignMethodInfo
    ResolveAvatarMethod "getHasTooltip" o = Gtk.Widget.WidgetGetHasTooltipMethodInfo
    ResolveAvatarMethod "getHasWindow" o = Gtk.Widget.WidgetGetHasWindowMethodInfo
    ResolveAvatarMethod "getHexpand" o = Gtk.Widget.WidgetGetHexpandMethodInfo
    ResolveAvatarMethod "getHexpandSet" o = Gtk.Widget.WidgetGetHexpandSetMethodInfo
    ResolveAvatarMethod "getIconName" o = AvatarGetIconNameMethodInfo
    ResolveAvatarMethod "getInternalChild" o = Gtk.Buildable.BuildableGetInternalChildMethodInfo
    ResolveAvatarMethod "getLoadableIcon" o = AvatarGetLoadableIconMethodInfo
    ResolveAvatarMethod "getMapped" o = Gtk.Widget.WidgetGetMappedMethodInfo
    ResolveAvatarMethod "getMarginBottom" o = Gtk.Widget.WidgetGetMarginBottomMethodInfo
    ResolveAvatarMethod "getMarginEnd" o = Gtk.Widget.WidgetGetMarginEndMethodInfo
    ResolveAvatarMethod "getMarginLeft" o = Gtk.Widget.WidgetGetMarginLeftMethodInfo
    ResolveAvatarMethod "getMarginRight" o = Gtk.Widget.WidgetGetMarginRightMethodInfo
    ResolveAvatarMethod "getMarginStart" o = Gtk.Widget.WidgetGetMarginStartMethodInfo
    ResolveAvatarMethod "getMarginTop" o = Gtk.Widget.WidgetGetMarginTopMethodInfo
    ResolveAvatarMethod "getModifierMask" o = Gtk.Widget.WidgetGetModifierMaskMethodInfo
    ResolveAvatarMethod "getModifierStyle" o = Gtk.Widget.WidgetGetModifierStyleMethodInfo
    ResolveAvatarMethod "getName" o = Gtk.Widget.WidgetGetNameMethodInfo
    ResolveAvatarMethod "getNoShowAll" o = Gtk.Widget.WidgetGetNoShowAllMethodInfo
    ResolveAvatarMethod "getOpacity" o = Gtk.Widget.WidgetGetOpacityMethodInfo
    ResolveAvatarMethod "getPangoContext" o = Gtk.Widget.WidgetGetPangoContextMethodInfo
    ResolveAvatarMethod "getParent" o = Gtk.Widget.WidgetGetParentMethodInfo
    ResolveAvatarMethod "getParentWindow" o = Gtk.Widget.WidgetGetParentWindowMethodInfo
    ResolveAvatarMethod "getPath" o = Gtk.Widget.WidgetGetPathMethodInfo
    ResolveAvatarMethod "getPointer" o = Gtk.Widget.WidgetGetPointerMethodInfo
    ResolveAvatarMethod "getPreferredHeight" o = Gtk.Widget.WidgetGetPreferredHeightMethodInfo
    ResolveAvatarMethod "getPreferredHeightAndBaselineForWidth" o = Gtk.Widget.WidgetGetPreferredHeightAndBaselineForWidthMethodInfo
    ResolveAvatarMethod "getPreferredHeightForWidth" o = Gtk.Widget.WidgetGetPreferredHeightForWidthMethodInfo
    ResolveAvatarMethod "getPreferredSize" o = Gtk.Widget.WidgetGetPreferredSizeMethodInfo
    ResolveAvatarMethod "getPreferredWidth" o = Gtk.Widget.WidgetGetPreferredWidthMethodInfo
    ResolveAvatarMethod "getPreferredWidthForHeight" o = Gtk.Widget.WidgetGetPreferredWidthForHeightMethodInfo
    ResolveAvatarMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveAvatarMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveAvatarMethod "getRealized" o = Gtk.Widget.WidgetGetRealizedMethodInfo
    ResolveAvatarMethod "getReceivesDefault" o = Gtk.Widget.WidgetGetReceivesDefaultMethodInfo
    ResolveAvatarMethod "getRequestMode" o = Gtk.Widget.WidgetGetRequestModeMethodInfo
    ResolveAvatarMethod "getRequisition" o = Gtk.Widget.WidgetGetRequisitionMethodInfo
    ResolveAvatarMethod "getRootWindow" o = Gtk.Widget.WidgetGetRootWindowMethodInfo
    ResolveAvatarMethod "getScaleFactor" o = Gtk.Widget.WidgetGetScaleFactorMethodInfo
    ResolveAvatarMethod "getScreen" o = Gtk.Widget.WidgetGetScreenMethodInfo
    ResolveAvatarMethod "getSensitive" o = Gtk.Widget.WidgetGetSensitiveMethodInfo
    ResolveAvatarMethod "getSettings" o = Gtk.Widget.WidgetGetSettingsMethodInfo
    ResolveAvatarMethod "getShowInitials" o = AvatarGetShowInitialsMethodInfo
    ResolveAvatarMethod "getSize" o = AvatarGetSizeMethodInfo
    ResolveAvatarMethod "getSizeRequest" o = Gtk.Widget.WidgetGetSizeRequestMethodInfo
    ResolveAvatarMethod "getState" o = Gtk.Widget.WidgetGetStateMethodInfo
    ResolveAvatarMethod "getStateFlags" o = Gtk.Widget.WidgetGetStateFlagsMethodInfo
    ResolveAvatarMethod "getStyle" o = Gtk.Widget.WidgetGetStyleMethodInfo
    ResolveAvatarMethod "getStyleContext" o = Gtk.Widget.WidgetGetStyleContextMethodInfo
    ResolveAvatarMethod "getSupportMultidevice" o = Gtk.Widget.WidgetGetSupportMultideviceMethodInfo
    ResolveAvatarMethod "getTemplateChild" o = Gtk.Widget.WidgetGetTemplateChildMethodInfo
    ResolveAvatarMethod "getText" o = AvatarGetTextMethodInfo
    ResolveAvatarMethod "getTooltipMarkup" o = Gtk.Widget.WidgetGetTooltipMarkupMethodInfo
    ResolveAvatarMethod "getTooltipText" o = Gtk.Widget.WidgetGetTooltipTextMethodInfo
    ResolveAvatarMethod "getTooltipWindow" o = Gtk.Widget.WidgetGetTooltipWindowMethodInfo
    ResolveAvatarMethod "getToplevel" o = Gtk.Widget.WidgetGetToplevelMethodInfo
    ResolveAvatarMethod "getValign" o = Gtk.Widget.WidgetGetValignMethodInfo
    ResolveAvatarMethod "getValignWithBaseline" o = Gtk.Widget.WidgetGetValignWithBaselineMethodInfo
    ResolveAvatarMethod "getVexpand" o = Gtk.Widget.WidgetGetVexpandMethodInfo
    ResolveAvatarMethod "getVexpandSet" o = Gtk.Widget.WidgetGetVexpandSetMethodInfo
    ResolveAvatarMethod "getVisible" o = Gtk.Widget.WidgetGetVisibleMethodInfo
    ResolveAvatarMethod "getVisual" o = Gtk.Widget.WidgetGetVisualMethodInfo
    ResolveAvatarMethod "getWindow" o = Gtk.Widget.WidgetGetWindowMethodInfo
    ResolveAvatarMethod "setAccelPath" o = Gtk.Widget.WidgetSetAccelPathMethodInfo
    ResolveAvatarMethod "setAllocation" o = Gtk.Widget.WidgetSetAllocationMethodInfo
    ResolveAvatarMethod "setAppPaintable" o = Gtk.Widget.WidgetSetAppPaintableMethodInfo
    ResolveAvatarMethod "setBuildableProperty" o = Gtk.Buildable.BuildableSetBuildablePropertyMethodInfo
    ResolveAvatarMethod "setCanDefault" o = Gtk.Widget.WidgetSetCanDefaultMethodInfo
    ResolveAvatarMethod "setCanFocus" o = Gtk.Widget.WidgetSetCanFocusMethodInfo
    ResolveAvatarMethod "setChildVisible" o = Gtk.Widget.WidgetSetChildVisibleMethodInfo
    ResolveAvatarMethod "setClip" o = Gtk.Widget.WidgetSetClipMethodInfo
    ResolveAvatarMethod "setCompositeName" o = Gtk.Widget.WidgetSetCompositeNameMethodInfo
    ResolveAvatarMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveAvatarMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    ResolveAvatarMethod "setDeviceEnabled" o = Gtk.Widget.WidgetSetDeviceEnabledMethodInfo
    ResolveAvatarMethod "setDeviceEvents" o = Gtk.Widget.WidgetSetDeviceEventsMethodInfo
    ResolveAvatarMethod "setDirection" o = Gtk.Widget.WidgetSetDirectionMethodInfo
    ResolveAvatarMethod "setDoubleBuffered" o = Gtk.Widget.WidgetSetDoubleBufferedMethodInfo
    ResolveAvatarMethod "setEvents" o = Gtk.Widget.WidgetSetEventsMethodInfo
    ResolveAvatarMethod "setFocusOnClick" o = Gtk.Widget.WidgetSetFocusOnClickMethodInfo
    ResolveAvatarMethod "setFontMap" o = Gtk.Widget.WidgetSetFontMapMethodInfo
    ResolveAvatarMethod "setFontOptions" o = Gtk.Widget.WidgetSetFontOptionsMethodInfo
    ResolveAvatarMethod "setHalign" o = Gtk.Widget.WidgetSetHalignMethodInfo
    ResolveAvatarMethod "setHasTooltip" o = Gtk.Widget.WidgetSetHasTooltipMethodInfo
    ResolveAvatarMethod "setHasWindow" o = Gtk.Widget.WidgetSetHasWindowMethodInfo
    ResolveAvatarMethod "setHexpand" o = Gtk.Widget.WidgetSetHexpandMethodInfo
    ResolveAvatarMethod "setHexpandSet" o = Gtk.Widget.WidgetSetHexpandSetMethodInfo
    ResolveAvatarMethod "setIconName" o = AvatarSetIconNameMethodInfo
    ResolveAvatarMethod "setImageLoadFunc" o = AvatarSetImageLoadFuncMethodInfo
    ResolveAvatarMethod "setLoadableIcon" o = AvatarSetLoadableIconMethodInfo
    ResolveAvatarMethod "setMapped" o = Gtk.Widget.WidgetSetMappedMethodInfo
    ResolveAvatarMethod "setMarginBottom" o = Gtk.Widget.WidgetSetMarginBottomMethodInfo
    ResolveAvatarMethod "setMarginEnd" o = Gtk.Widget.WidgetSetMarginEndMethodInfo
    ResolveAvatarMethod "setMarginLeft" o = Gtk.Widget.WidgetSetMarginLeftMethodInfo
    ResolveAvatarMethod "setMarginRight" o = Gtk.Widget.WidgetSetMarginRightMethodInfo
    ResolveAvatarMethod "setMarginStart" o = Gtk.Widget.WidgetSetMarginStartMethodInfo
    ResolveAvatarMethod "setMarginTop" o = Gtk.Widget.WidgetSetMarginTopMethodInfo
    ResolveAvatarMethod "setName" o = Gtk.Widget.WidgetSetNameMethodInfo
    ResolveAvatarMethod "setNoShowAll" o = Gtk.Widget.WidgetSetNoShowAllMethodInfo
    ResolveAvatarMethod "setOpacity" o = Gtk.Widget.WidgetSetOpacityMethodInfo
    ResolveAvatarMethod "setParent" o = Gtk.Widget.WidgetSetParentMethodInfo
    ResolveAvatarMethod "setParentWindow" o = Gtk.Widget.WidgetSetParentWindowMethodInfo
    ResolveAvatarMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveAvatarMethod "setRealized" o = Gtk.Widget.WidgetSetRealizedMethodInfo
    ResolveAvatarMethod "setReceivesDefault" o = Gtk.Widget.WidgetSetReceivesDefaultMethodInfo
    ResolveAvatarMethod "setRedrawOnAllocate" o = Gtk.Widget.WidgetSetRedrawOnAllocateMethodInfo
    ResolveAvatarMethod "setSensitive" o = Gtk.Widget.WidgetSetSensitiveMethodInfo
    ResolveAvatarMethod "setShowInitials" o = AvatarSetShowInitialsMethodInfo
    ResolveAvatarMethod "setSize" o = AvatarSetSizeMethodInfo
    ResolveAvatarMethod "setSizeRequest" o = Gtk.Widget.WidgetSetSizeRequestMethodInfo
    ResolveAvatarMethod "setState" o = Gtk.Widget.WidgetSetStateMethodInfo
    ResolveAvatarMethod "setStateFlags" o = Gtk.Widget.WidgetSetStateFlagsMethodInfo
    ResolveAvatarMethod "setStyle" o = Gtk.Widget.WidgetSetStyleMethodInfo
    ResolveAvatarMethod "setSupportMultidevice" o = Gtk.Widget.WidgetSetSupportMultideviceMethodInfo
    ResolveAvatarMethod "setText" o = AvatarSetTextMethodInfo
    ResolveAvatarMethod "setTooltipMarkup" o = Gtk.Widget.WidgetSetTooltipMarkupMethodInfo
    ResolveAvatarMethod "setTooltipText" o = Gtk.Widget.WidgetSetTooltipTextMethodInfo
    ResolveAvatarMethod "setTooltipWindow" o = Gtk.Widget.WidgetSetTooltipWindowMethodInfo
    ResolveAvatarMethod "setValign" o = Gtk.Widget.WidgetSetValignMethodInfo
    ResolveAvatarMethod "setVexpand" o = Gtk.Widget.WidgetSetVexpandMethodInfo
    ResolveAvatarMethod "setVexpandSet" o = Gtk.Widget.WidgetSetVexpandSetMethodInfo
    ResolveAvatarMethod "setVisible" o = Gtk.Widget.WidgetSetVisibleMethodInfo
    ResolveAvatarMethod "setVisual" o = Gtk.Widget.WidgetSetVisualMethodInfo
    ResolveAvatarMethod "setWindow" o = Gtk.Widget.WidgetSetWindowMethodInfo
    ResolveAvatarMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveAvatarMethod t Avatar, O.OverloadedMethod info Avatar p) => OL.IsLabel t (Avatar -> p) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.overloadedMethod @info
#else
    fromLabel _ = O.overloadedMethod @info
#endif

#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveAvatarMethod t Avatar, O.OverloadedMethod info Avatar p, R.HasField t Avatar p) => R.HasField t Avatar p where
    getField = O.overloadedMethod @info

#endif

instance (info ~ ResolveAvatarMethod t Avatar, O.OverloadedMethodInfo info Avatar) => OL.IsLabel t (O.MethodProxy info Avatar) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.MethodProxy
#else
    fromLabel _ = O.MethodProxy
#endif

#endif

-- VVV Prop "icon-name"
   -- Type: TBasicType TUTF8
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just True,Just True)

-- | Get the value of the “@icon-name@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' avatar #iconName
-- @
getAvatarIconName :: (MonadIO m, IsAvatar o) => o -> m (Maybe T.Text)
getAvatarIconName :: forall (m :: * -> *) o.
(MonadIO m, IsAvatar o) =>
o -> m (Maybe Text)
getAvatarIconName o
obj = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"icon-name"

-- | Set the value of the “@icon-name@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' avatar [ #iconName 'Data.GI.Base.Attributes.:=' value ]
-- @
setAvatarIconName :: (MonadIO m, IsAvatar o) => o -> T.Text -> m ()
setAvatarIconName :: forall (m :: * -> *) o.
(MonadIO m, IsAvatar o) =>
o -> Text -> m ()
setAvatarIconName o
obj Text
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj String
"icon-name" (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
val)

-- | Construct a `GValueConstruct` with valid value for the “@icon-name@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructAvatarIconName :: (IsAvatar o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructAvatarIconName :: forall o (m :: * -> *).
(IsAvatar o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructAvatarIconName Text
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"icon-name" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)

-- | Set the value of the “@icon-name@” property to `Nothing`.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.clear' #iconName
-- @
clearAvatarIconName :: (MonadIO m, IsAvatar o) => o -> m ()
clearAvatarIconName :: forall (m :: * -> *) o. (MonadIO m, IsAvatar o) => o -> m ()
clearAvatarIconName o
obj = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj String
"icon-name" (Maybe Text
forall a. Maybe a
Nothing :: Maybe T.Text)

#if defined(ENABLE_OVERLOADING)
data AvatarIconNamePropertyInfo
instance AttrInfo AvatarIconNamePropertyInfo where
    type AttrAllowedOps AvatarIconNamePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint AvatarIconNamePropertyInfo = IsAvatar
    type AttrSetTypeConstraint AvatarIconNamePropertyInfo = (~) T.Text
    type AttrTransferTypeConstraint AvatarIconNamePropertyInfo = (~) T.Text
    type AttrTransferType AvatarIconNamePropertyInfo = T.Text
    type AttrGetType AvatarIconNamePropertyInfo = (Maybe T.Text)
    type AttrLabel AvatarIconNamePropertyInfo = "icon-name"
    type AttrOrigin AvatarIconNamePropertyInfo = Avatar
    attrGet = getAvatarIconName
    attrSet = setAvatarIconName
    attrTransfer _ v = do
        return v
    attrConstruct = constructAvatarIconName
    attrClear = clearAvatarIconName
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Handy.Objects.Avatar.iconName"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-handy-1.0.1/docs/GI-Handy-Objects-Avatar.html#g:attr:iconName"
        })
#endif

-- VVV Prop "loadable-icon"
   -- Type: TInterface (Name {namespace = "Gio", name = "LoadableIcon"})
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just True,Just True)

-- | Get the value of the “@loadable-icon@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' avatar #loadableIcon
-- @
getAvatarLoadableIcon :: (MonadIO m, IsAvatar o) => o -> m (Maybe Gio.LoadableIcon.LoadableIcon)
getAvatarLoadableIcon :: forall (m :: * -> *) o.
(MonadIO m, IsAvatar o) =>
o -> m (Maybe LoadableIcon)
getAvatarLoadableIcon o
obj = IO (Maybe LoadableIcon) -> m (Maybe LoadableIcon)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe LoadableIcon) -> m (Maybe LoadableIcon))
-> IO (Maybe LoadableIcon) -> m (Maybe LoadableIcon)
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr LoadableIcon -> LoadableIcon)
-> IO (Maybe LoadableIcon)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"loadable-icon" ManagedPtr LoadableIcon -> LoadableIcon
Gio.LoadableIcon.LoadableIcon

-- | Set the value of the “@loadable-icon@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' avatar [ #loadableIcon 'Data.GI.Base.Attributes.:=' value ]
-- @
setAvatarLoadableIcon :: (MonadIO m, IsAvatar o, Gio.LoadableIcon.IsLoadableIcon a) => o -> a -> m ()
setAvatarLoadableIcon :: forall (m :: * -> *) o a.
(MonadIO m, IsAvatar o, IsLoadableIcon a) =>
o -> a -> m ()
setAvatarLoadableIcon o
obj a
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Maybe a -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"loadable-icon" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)

-- | Construct a `GValueConstruct` with valid value for the “@loadable-icon@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructAvatarLoadableIcon :: (IsAvatar o, MIO.MonadIO m, Gio.LoadableIcon.IsLoadableIcon a) => a -> m (GValueConstruct o)
constructAvatarLoadableIcon :: forall o (m :: * -> *) a.
(IsAvatar o, MonadIO m, IsLoadableIcon a) =>
a -> m (GValueConstruct o)
constructAvatarLoadableIcon a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"loadable-icon" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)

-- | Set the value of the “@loadable-icon@” property to `Nothing`.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.clear' #loadableIcon
-- @
clearAvatarLoadableIcon :: (MonadIO m, IsAvatar o) => o -> m ()
clearAvatarLoadableIcon :: forall (m :: * -> *) o. (MonadIO m, IsAvatar o) => o -> m ()
clearAvatarLoadableIcon o
obj = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe LoadableIcon -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"loadable-icon" (Maybe LoadableIcon
forall a. Maybe a
Nothing :: Maybe Gio.LoadableIcon.LoadableIcon)

#if defined(ENABLE_OVERLOADING)
data AvatarLoadableIconPropertyInfo
instance AttrInfo AvatarLoadableIconPropertyInfo where
    type AttrAllowedOps AvatarLoadableIconPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint AvatarLoadableIconPropertyInfo = IsAvatar
    type AttrSetTypeConstraint AvatarLoadableIconPropertyInfo = Gio.LoadableIcon.IsLoadableIcon
    type AttrTransferTypeConstraint AvatarLoadableIconPropertyInfo = Gio.LoadableIcon.IsLoadableIcon
    type AttrTransferType AvatarLoadableIconPropertyInfo = Gio.LoadableIcon.LoadableIcon
    type AttrGetType AvatarLoadableIconPropertyInfo = (Maybe Gio.LoadableIcon.LoadableIcon)
    type AttrLabel AvatarLoadableIconPropertyInfo = "loadable-icon"
    type AttrOrigin AvatarLoadableIconPropertyInfo = Avatar
    attrGet = getAvatarLoadableIcon
    attrSet = setAvatarLoadableIcon
    attrTransfer _ v = do
        unsafeCastTo Gio.LoadableIcon.LoadableIcon v
    attrConstruct = constructAvatarLoadableIcon
    attrClear = clearAvatarLoadableIcon
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Handy.Objects.Avatar.loadableIcon"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-handy-1.0.1/docs/GI-Handy-Objects-Avatar.html#g:attr:loadableIcon"
        })
#endif

-- VVV Prop "show-initials"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

-- | Get the value of the “@show-initials@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' avatar #showInitials
-- @
getAvatarShowInitials :: (MonadIO m, IsAvatar o) => o -> m Bool
getAvatarShowInitials :: forall (m :: * -> *) o. (MonadIO m, IsAvatar o) => o -> m Bool
getAvatarShowInitials o
obj = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"show-initials"

-- | Set the value of the “@show-initials@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' avatar [ #showInitials 'Data.GI.Base.Attributes.:=' value ]
-- @
setAvatarShowInitials :: (MonadIO m, IsAvatar o) => o -> Bool -> m ()
setAvatarShowInitials :: forall (m :: * -> *) o.
(MonadIO m, IsAvatar o) =>
o -> Bool -> m ()
setAvatarShowInitials o
obj Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj String
"show-initials" Bool
val

-- | Construct a `GValueConstruct` with valid value for the “@show-initials@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructAvatarShowInitials :: (IsAvatar o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructAvatarShowInitials :: forall o (m :: * -> *).
(IsAvatar o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructAvatarShowInitials Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"show-initials" Bool
val

#if defined(ENABLE_OVERLOADING)
data AvatarShowInitialsPropertyInfo
instance AttrInfo AvatarShowInitialsPropertyInfo where
    type AttrAllowedOps AvatarShowInitialsPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint AvatarShowInitialsPropertyInfo = IsAvatar
    type AttrSetTypeConstraint AvatarShowInitialsPropertyInfo = (~) Bool
    type AttrTransferTypeConstraint AvatarShowInitialsPropertyInfo = (~) Bool
    type AttrTransferType AvatarShowInitialsPropertyInfo = Bool
    type AttrGetType AvatarShowInitialsPropertyInfo = Bool
    type AttrLabel AvatarShowInitialsPropertyInfo = "show-initials"
    type AttrOrigin AvatarShowInitialsPropertyInfo = Avatar
    attrGet = getAvatarShowInitials
    attrSet = setAvatarShowInitials
    attrTransfer _ v = do
        return v
    attrConstruct = constructAvatarShowInitials
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Handy.Objects.Avatar.showInitials"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-handy-1.0.1/docs/GI-Handy-Objects-Avatar.html#g:attr:showInitials"
        })
#endif

-- VVV Prop "size"
   -- Type: TBasicType TInt
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

-- | Get the value of the “@size@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' avatar #size
-- @
getAvatarSize :: (MonadIO m, IsAvatar o) => o -> m Int32
getAvatarSize :: forall (m :: * -> *) o. (MonadIO m, IsAvatar o) => o -> m Int32
getAvatarSize o
obj = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Int32
forall a. GObject a => a -> String -> IO Int32
B.Properties.getObjectPropertyInt32 o
obj String
"size"

-- | Set the value of the “@size@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' avatar [ #size 'Data.GI.Base.Attributes.:=' value ]
-- @
setAvatarSize :: (MonadIO m, IsAvatar o) => o -> Int32 -> m ()
setAvatarSize :: forall (m :: * -> *) o.
(MonadIO m, IsAvatar o) =>
o -> Int32 -> m ()
setAvatarSize o
obj Int32
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Int32 -> IO ()
forall a. GObject a => a -> String -> Int32 -> IO ()
B.Properties.setObjectPropertyInt32 o
obj String
"size" Int32
val

-- | Construct a `GValueConstruct` with valid value for the “@size@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructAvatarSize :: (IsAvatar o, MIO.MonadIO m) => Int32 -> m (GValueConstruct o)
constructAvatarSize :: forall o (m :: * -> *).
(IsAvatar o, MonadIO m) =>
Int32 -> m (GValueConstruct o)
constructAvatarSize Int32
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Int32 -> IO (GValueConstruct o)
forall o. String -> Int32 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyInt32 String
"size" Int32
val

#if defined(ENABLE_OVERLOADING)
data AvatarSizePropertyInfo
instance AttrInfo AvatarSizePropertyInfo where
    type AttrAllowedOps AvatarSizePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint AvatarSizePropertyInfo = IsAvatar
    type AttrSetTypeConstraint AvatarSizePropertyInfo = (~) Int32
    type AttrTransferTypeConstraint AvatarSizePropertyInfo = (~) Int32
    type AttrTransferType AvatarSizePropertyInfo = Int32
    type AttrGetType AvatarSizePropertyInfo = Int32
    type AttrLabel AvatarSizePropertyInfo = "size"
    type AttrOrigin AvatarSizePropertyInfo = Avatar
    attrGet = getAvatarSize
    attrSet = setAvatarSize
    attrTransfer _ v = do
        return v
    attrConstruct = constructAvatarSize
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Handy.Objects.Avatar.size"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-handy-1.0.1/docs/GI-Handy-Objects-Avatar.html#g:attr:size"
        })
#endif

-- VVV Prop "text"
   -- Type: TBasicType TUTF8
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just True,Just True)

-- | Get the value of the “@text@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' avatar #text
-- @
getAvatarText :: (MonadIO m, IsAvatar o) => o -> m (Maybe T.Text)
getAvatarText :: forall (m :: * -> *) o.
(MonadIO m, IsAvatar o) =>
o -> m (Maybe Text)
getAvatarText o
obj = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"text"

-- | Set the value of the “@text@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' avatar [ #text 'Data.GI.Base.Attributes.:=' value ]
-- @
setAvatarText :: (MonadIO m, IsAvatar o) => o -> T.Text -> m ()
setAvatarText :: forall (m :: * -> *) o.
(MonadIO m, IsAvatar o) =>
o -> Text -> m ()
setAvatarText o
obj Text
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj String
"text" (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
val)

-- | Construct a `GValueConstruct` with valid value for the “@text@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructAvatarText :: (IsAvatar o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructAvatarText :: forall o (m :: * -> *).
(IsAvatar o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructAvatarText Text
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"text" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)

-- | Set the value of the “@text@” property to `Nothing`.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.clear' #text
-- @
clearAvatarText :: (MonadIO m, IsAvatar o) => o -> m ()
clearAvatarText :: forall (m :: * -> *) o. (MonadIO m, IsAvatar o) => o -> m ()
clearAvatarText o
obj = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj String
"text" (Maybe Text
forall a. Maybe a
Nothing :: Maybe T.Text)

#if defined(ENABLE_OVERLOADING)
data AvatarTextPropertyInfo
instance AttrInfo AvatarTextPropertyInfo where
    type AttrAllowedOps AvatarTextPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint AvatarTextPropertyInfo = IsAvatar
    type AttrSetTypeConstraint AvatarTextPropertyInfo = (~) T.Text
    type AttrTransferTypeConstraint AvatarTextPropertyInfo = (~) T.Text
    type AttrTransferType AvatarTextPropertyInfo = T.Text
    type AttrGetType AvatarTextPropertyInfo = (Maybe T.Text)
    type AttrLabel AvatarTextPropertyInfo = "text"
    type AttrOrigin AvatarTextPropertyInfo = Avatar
    attrGet = getAvatarText
    attrSet = setAvatarText
    attrTransfer _ v = do
        return v
    attrConstruct = constructAvatarText
    attrClear = clearAvatarText
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Handy.Objects.Avatar.text"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-handy-1.0.1/docs/GI-Handy-Objects-Avatar.html#g:attr:text"
        })
#endif

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Avatar
type instance O.AttributeList Avatar = AvatarAttributeList
type AvatarAttributeList = ('[ '("appPaintable", Gtk.Widget.WidgetAppPaintablePropertyInfo), '("canDefault", Gtk.Widget.WidgetCanDefaultPropertyInfo), '("canFocus", Gtk.Widget.WidgetCanFocusPropertyInfo), '("compositeChild", Gtk.Widget.WidgetCompositeChildPropertyInfo), '("doubleBuffered", Gtk.Widget.WidgetDoubleBufferedPropertyInfo), '("events", Gtk.Widget.WidgetEventsPropertyInfo), '("expand", Gtk.Widget.WidgetExpandPropertyInfo), '("focusOnClick", Gtk.Widget.WidgetFocusOnClickPropertyInfo), '("halign", Gtk.Widget.WidgetHalignPropertyInfo), '("hasDefault", Gtk.Widget.WidgetHasDefaultPropertyInfo), '("hasFocus", Gtk.Widget.WidgetHasFocusPropertyInfo), '("hasTooltip", Gtk.Widget.WidgetHasTooltipPropertyInfo), '("heightRequest", Gtk.Widget.WidgetHeightRequestPropertyInfo), '("hexpand", Gtk.Widget.WidgetHexpandPropertyInfo), '("hexpandSet", Gtk.Widget.WidgetHexpandSetPropertyInfo), '("iconName", AvatarIconNamePropertyInfo), '("isFocus", Gtk.Widget.WidgetIsFocusPropertyInfo), '("loadableIcon", AvatarLoadableIconPropertyInfo), '("margin", Gtk.Widget.WidgetMarginPropertyInfo), '("marginBottom", Gtk.Widget.WidgetMarginBottomPropertyInfo), '("marginEnd", Gtk.Widget.WidgetMarginEndPropertyInfo), '("marginLeft", Gtk.Widget.WidgetMarginLeftPropertyInfo), '("marginRight", Gtk.Widget.WidgetMarginRightPropertyInfo), '("marginStart", Gtk.Widget.WidgetMarginStartPropertyInfo), '("marginTop", Gtk.Widget.WidgetMarginTopPropertyInfo), '("name", Gtk.Widget.WidgetNamePropertyInfo), '("noShowAll", Gtk.Widget.WidgetNoShowAllPropertyInfo), '("opacity", Gtk.Widget.WidgetOpacityPropertyInfo), '("parent", Gtk.Widget.WidgetParentPropertyInfo), '("receivesDefault", Gtk.Widget.WidgetReceivesDefaultPropertyInfo), '("scaleFactor", Gtk.Widget.WidgetScaleFactorPropertyInfo), '("sensitive", Gtk.Widget.WidgetSensitivePropertyInfo), '("showInitials", AvatarShowInitialsPropertyInfo), '("size", AvatarSizePropertyInfo), '("style", Gtk.Widget.WidgetStylePropertyInfo), '("text", AvatarTextPropertyInfo), '("tooltipMarkup", Gtk.Widget.WidgetTooltipMarkupPropertyInfo), '("tooltipText", Gtk.Widget.WidgetTooltipTextPropertyInfo), '("valign", Gtk.Widget.WidgetValignPropertyInfo), '("vexpand", Gtk.Widget.WidgetVexpandPropertyInfo), '("vexpandSet", Gtk.Widget.WidgetVexpandSetPropertyInfo), '("visible", Gtk.Widget.WidgetVisiblePropertyInfo), '("widthRequest", Gtk.Widget.WidgetWidthRequestPropertyInfo), '("window", Gtk.Widget.WidgetWindowPropertyInfo)] :: [(Symbol, *)])
#endif

#if defined(ENABLE_OVERLOADING)
avatarIconName :: AttrLabelProxy "iconName"
avatarIconName = AttrLabelProxy

avatarLoadableIcon :: AttrLabelProxy "loadableIcon"
avatarLoadableIcon = AttrLabelProxy

avatarShowInitials :: AttrLabelProxy "showInitials"
avatarShowInitials = AttrLabelProxy

avatarSize :: AttrLabelProxy "size"
avatarSize = AttrLabelProxy

avatarText :: AttrLabelProxy "text"
avatarText = AttrLabelProxy

#endif

#if defined(ENABLE_OVERLOADING)
type instance O.SignalList Avatar = AvatarSignalList
type AvatarSignalList = ('[ '("accelClosuresChanged", Gtk.Widget.WidgetAccelClosuresChangedSignalInfo), '("buttonPressEvent", Gtk.Widget.WidgetButtonPressEventSignalInfo), '("buttonReleaseEvent", Gtk.Widget.WidgetButtonReleaseEventSignalInfo), '("canActivateAccel", Gtk.Widget.WidgetCanActivateAccelSignalInfo), '("childNotify", Gtk.Widget.WidgetChildNotifySignalInfo), '("compositedChanged", Gtk.Widget.WidgetCompositedChangedSignalInfo), '("configureEvent", Gtk.Widget.WidgetConfigureEventSignalInfo), '("damageEvent", Gtk.Widget.WidgetDamageEventSignalInfo), '("deleteEvent", Gtk.Widget.WidgetDeleteEventSignalInfo), '("destroy", Gtk.Widget.WidgetDestroySignalInfo), '("destroyEvent", Gtk.Widget.WidgetDestroyEventSignalInfo), '("directionChanged", Gtk.Widget.WidgetDirectionChangedSignalInfo), '("dragBegin", Gtk.Widget.WidgetDragBeginSignalInfo), '("dragDataDelete", Gtk.Widget.WidgetDragDataDeleteSignalInfo), '("dragDataGet", Gtk.Widget.WidgetDragDataGetSignalInfo), '("dragDataReceived", Gtk.Widget.WidgetDragDataReceivedSignalInfo), '("dragDrop", Gtk.Widget.WidgetDragDropSignalInfo), '("dragEnd", Gtk.Widget.WidgetDragEndSignalInfo), '("dragFailed", Gtk.Widget.WidgetDragFailedSignalInfo), '("dragLeave", Gtk.Widget.WidgetDragLeaveSignalInfo), '("dragMotion", Gtk.Widget.WidgetDragMotionSignalInfo), '("draw", Gtk.Widget.WidgetDrawSignalInfo), '("enterNotifyEvent", Gtk.Widget.WidgetEnterNotifyEventSignalInfo), '("event", Gtk.Widget.WidgetEventSignalInfo), '("eventAfter", Gtk.Widget.WidgetEventAfterSignalInfo), '("focus", Gtk.Widget.WidgetFocusSignalInfo), '("focusInEvent", Gtk.Widget.WidgetFocusInEventSignalInfo), '("focusOutEvent", Gtk.Widget.WidgetFocusOutEventSignalInfo), '("grabBrokenEvent", Gtk.Widget.WidgetGrabBrokenEventSignalInfo), '("grabFocus", Gtk.Widget.WidgetGrabFocusSignalInfo), '("grabNotify", Gtk.Widget.WidgetGrabNotifySignalInfo), '("hide", Gtk.Widget.WidgetHideSignalInfo), '("hierarchyChanged", Gtk.Widget.WidgetHierarchyChangedSignalInfo), '("keyPressEvent", Gtk.Widget.WidgetKeyPressEventSignalInfo), '("keyReleaseEvent", Gtk.Widget.WidgetKeyReleaseEventSignalInfo), '("keynavFailed", Gtk.Widget.WidgetKeynavFailedSignalInfo), '("leaveNotifyEvent", Gtk.Widget.WidgetLeaveNotifyEventSignalInfo), '("map", Gtk.Widget.WidgetMapSignalInfo), '("mapEvent", Gtk.Widget.WidgetMapEventSignalInfo), '("mnemonicActivate", Gtk.Widget.WidgetMnemonicActivateSignalInfo), '("motionNotifyEvent", Gtk.Widget.WidgetMotionNotifyEventSignalInfo), '("moveFocus", Gtk.Widget.WidgetMoveFocusSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("parentSet", Gtk.Widget.WidgetParentSetSignalInfo), '("popupMenu", Gtk.Widget.WidgetPopupMenuSignalInfo), '("propertyNotifyEvent", Gtk.Widget.WidgetPropertyNotifyEventSignalInfo), '("proximityInEvent", Gtk.Widget.WidgetProximityInEventSignalInfo), '("proximityOutEvent", Gtk.Widget.WidgetProximityOutEventSignalInfo), '("queryTooltip", Gtk.Widget.WidgetQueryTooltipSignalInfo), '("realize", Gtk.Widget.WidgetRealizeSignalInfo), '("screenChanged", Gtk.Widget.WidgetScreenChangedSignalInfo), '("scrollEvent", Gtk.Widget.WidgetScrollEventSignalInfo), '("selectionClearEvent", Gtk.Widget.WidgetSelectionClearEventSignalInfo), '("selectionGet", Gtk.Widget.WidgetSelectionGetSignalInfo), '("selectionNotifyEvent", Gtk.Widget.WidgetSelectionNotifyEventSignalInfo), '("selectionReceived", Gtk.Widget.WidgetSelectionReceivedSignalInfo), '("selectionRequestEvent", Gtk.Widget.WidgetSelectionRequestEventSignalInfo), '("show", Gtk.Widget.WidgetShowSignalInfo), '("showHelp", Gtk.Widget.WidgetShowHelpSignalInfo), '("sizeAllocate", Gtk.Widget.WidgetSizeAllocateSignalInfo), '("stateChanged", Gtk.Widget.WidgetStateChangedSignalInfo), '("stateFlagsChanged", Gtk.Widget.WidgetStateFlagsChangedSignalInfo), '("styleSet", Gtk.Widget.WidgetStyleSetSignalInfo), '("styleUpdated", Gtk.Widget.WidgetStyleUpdatedSignalInfo), '("touchEvent", Gtk.Widget.WidgetTouchEventSignalInfo), '("unmap", Gtk.Widget.WidgetUnmapSignalInfo), '("unmapEvent", Gtk.Widget.WidgetUnmapEventSignalInfo), '("unrealize", Gtk.Widget.WidgetUnrealizeSignalInfo), '("visibilityNotifyEvent", Gtk.Widget.WidgetVisibilityNotifyEventSignalInfo), '("windowStateEvent", Gtk.Widget.WidgetWindowStateEventSignalInfo)] :: [(Symbol, *)])

#endif

-- method Avatar::new
-- method type : Constructor
-- Args: [ Arg
--           { argCName = "size"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The size of the avatar"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "text"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "The text used to generate the color and initials if\n@show_initials is %TRUE. The color is selected at random if @text is empty."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "show_initials"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "whether to show the initials or the fallback icon on\ntop of the color generated based on @text."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Handy" , name = "Avatar" })
-- throws : False
-- Skip return : False

foreign import ccall "hdy_avatar_new" hdy_avatar_new :: 
    Int32 ->                                -- size : TBasicType TInt
    CString ->                              -- text : TBasicType TUTF8
    CInt ->                                 -- show_initials : TBasicType TBoolean
    IO (Ptr Avatar)

-- | Creates a new t'GI.Handy.Objects.Avatar.Avatar'.
avatarNew ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Int32
    -- ^ /@size@/: The size of the avatar
    -> Maybe (T.Text)
    -- ^ /@text@/: The text used to generate the color and initials if
    -- /@showInitials@/ is 'P.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 t'GI.Handy.Objects.Avatar.Avatar'
avatarNew :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Int32 -> Maybe Text -> Bool -> m Avatar
avatarNew Int32
size Maybe Text
text Bool
showInitials = IO Avatar -> m Avatar
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Avatar -> m Avatar) -> IO Avatar -> m Avatar
forall a b. (a -> b) -> a -> b
$ do
    Ptr CChar
maybeText <- case Maybe Text
text of
        Maybe Text
Nothing -> Ptr CChar -> IO (Ptr CChar)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
forall a. Ptr a
nullPtr
        Just Text
jText -> do
            Ptr CChar
jText' <- Text -> IO (Ptr CChar)
textToCString Text
jText
            Ptr CChar -> IO (Ptr CChar)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
jText'
    let showInitials' :: CInt
showInitials' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
showInitials
    Ptr Avatar
result <- Int32 -> Ptr CChar -> CInt -> IO (Ptr Avatar)
hdy_avatar_new Int32
size Ptr CChar
maybeText CInt
showInitials'
    Text -> Ptr Avatar -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"avatarNew" Ptr Avatar
result
    Avatar
result' <- ((ManagedPtr Avatar -> Avatar) -> Ptr Avatar -> IO Avatar
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Avatar -> Avatar
Avatar) Ptr Avatar
result
    Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
maybeText
    Avatar -> IO Avatar
forall (m :: * -> *) a. Monad m => a -> m a
return Avatar
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method Avatar::draw_to_pixbuf
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Handy" , name = "Avatar" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #HdyAvatar" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "size"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The size of the pixbuf"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "scale_factor"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The scale factor" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "GdkPixbuf" , name = "Pixbuf" })
-- throws : False
-- Skip return : False

foreign import ccall "hdy_avatar_draw_to_pixbuf" hdy_avatar_draw_to_pixbuf :: 
    Ptr Avatar ->                           -- self : TInterface (Name {namespace = "Handy", name = "Avatar"})
    Int32 ->                                -- size : TBasicType TInt
    Int32 ->                                -- scale_factor : TBasicType TInt
    IO (Ptr GdkPixbuf.Pixbuf.Pixbuf)

-- | Renders /@self@/ into a pixbuf at /@size@/ and /@scaleFactor@/. This can be used to export the fallback avatar.
-- 
-- /Since: 1.2/
avatarDrawToPixbuf ::
    (B.CallStack.HasCallStack, MonadIO m, IsAvatar a) =>
    a
    -- ^ /@self@/: a t'GI.Handy.Objects.Avatar.Avatar'
    -> Int32
    -- ^ /@size@/: The size of the pixbuf
    -> Int32
    -- ^ /@scaleFactor@/: The scale factor
    -> m GdkPixbuf.Pixbuf.Pixbuf
    -- ^ __Returns:__ the pixbuf.
avatarDrawToPixbuf :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAvatar a) =>
a -> Int32 -> Int32 -> m Pixbuf
avatarDrawToPixbuf a
self Int32
size Int32
scaleFactor = IO Pixbuf -> m Pixbuf
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Pixbuf -> m Pixbuf) -> IO Pixbuf -> m Pixbuf
forall a b. (a -> b) -> a -> b
$ do
    Ptr Avatar
self' <- a -> IO (Ptr Avatar)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Ptr Pixbuf
result <- Ptr Avatar -> Int32 -> Int32 -> IO (Ptr Pixbuf)
hdy_avatar_draw_to_pixbuf Ptr Avatar
self' Int32
size Int32
scaleFactor
    Text -> Ptr Pixbuf -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"avatarDrawToPixbuf" Ptr Pixbuf
result
    Pixbuf
result' <- ((ManagedPtr Pixbuf -> Pixbuf) -> Ptr Pixbuf -> IO Pixbuf
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Pixbuf -> Pixbuf
GdkPixbuf.Pixbuf.Pixbuf) Ptr Pixbuf
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    Pixbuf -> IO Pixbuf
forall (m :: * -> *) a. Monad m => a -> m a
return Pixbuf
result'

#if defined(ENABLE_OVERLOADING)
data AvatarDrawToPixbufMethodInfo
instance (signature ~ (Int32 -> Int32 -> m GdkPixbuf.Pixbuf.Pixbuf), MonadIO m, IsAvatar a) => O.OverloadedMethod AvatarDrawToPixbufMethodInfo a signature where
    overloadedMethod = avatarDrawToPixbuf

instance O.OverloadedMethodInfo AvatarDrawToPixbufMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Handy.Objects.Avatar.avatarDrawToPixbuf",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-handy-1.0.1/docs/GI-Handy-Objects-Avatar.html#v:avatarDrawToPixbuf"
        })


#endif

-- method Avatar::draw_to_pixbuf_async
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Handy" , name = "Avatar" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #HdyAvatar" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "size"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The size of the pixbuf"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "scale_factor"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The scale factor" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "cancellable"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "Cancellable" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "optional #GCancellable object, %NULL to ignore"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "callback"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "AsyncReadyCallback" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "a #GAsyncReadyCallback to call when the avatar is generated"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeAsync
--           , argClosure = 5
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the data to pass to callback function"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hdy_avatar_draw_to_pixbuf_async" hdy_avatar_draw_to_pixbuf_async :: 
    Ptr Avatar ->                           -- self : TInterface (Name {namespace = "Handy", name = "Avatar"})
    Int32 ->                                -- size : TBasicType TInt
    Int32 ->                                -- scale_factor : TBasicType TInt
    Ptr Gio.Cancellable.Cancellable ->      -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})
    FunPtr Gio.Callbacks.C_AsyncReadyCallback -> -- callback : TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    IO ()

-- | Renders asynchronously /@self@/ into a pixbuf at /@size@/ and /@scaleFactor@/.
-- This can be used to export the fallback avatar.
-- 
-- /Since: 1.2/
avatarDrawToPixbufAsync ::
    (B.CallStack.HasCallStack, MonadIO m, IsAvatar a, Gio.Cancellable.IsCancellable b) =>
    a
    -- ^ /@self@/: a t'GI.Handy.Objects.Avatar.Avatar'
    -> Int32
    -- ^ /@size@/: The size of the pixbuf
    -> Int32
    -- ^ /@scaleFactor@/: The scale factor
    -> Maybe (b)
    -- ^ /@cancellable@/: optional t'GI.Gio.Objects.Cancellable.Cancellable' object, 'P.Nothing' to ignore
    -> Maybe (Gio.Callbacks.AsyncReadyCallback)
    -- ^ /@callback@/: a t'GI.Gio.Callbacks.AsyncReadyCallback' to call when the avatar is generated
    -> m ()
avatarDrawToPixbufAsync :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsAvatar a, IsCancellable b) =>
a -> Int32 -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()
avatarDrawToPixbufAsync a
self Int32
size Int32
scaleFactor Maybe b
cancellable Maybe AsyncReadyCallback
callback = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Avatar
self' <- a -> IO (Ptr Avatar)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
        Maybe b
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
        Just b
jCancellable -> do
            Ptr Cancellable
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
            Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
    FunPtr C_AsyncReadyCallback
maybeCallback <- case Maybe AsyncReadyCallback
callback of
        Maybe AsyncReadyCallback
Nothing -> FunPtr C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
forall (m :: * -> *) a. Monad m => a -> m a
return (Ptr Any -> FunPtr C_AsyncReadyCallback
forall a b. Ptr a -> FunPtr b
castPtrToFunPtr Ptr Any
forall a. Ptr a
nullPtr)
        Just AsyncReadyCallback
jCallback -> do
            Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback <- IO (Ptr (FunPtr C_AsyncReadyCallback))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))
            FunPtr C_AsyncReadyCallback
jCallback' <- C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
Gio.Callbacks.mk_AsyncReadyCallback (Maybe (Ptr (FunPtr C_AsyncReadyCallback))
-> AsyncReadyCallback_WithClosures -> C_AsyncReadyCallback
Gio.Callbacks.wrap_AsyncReadyCallback (Ptr (FunPtr C_AsyncReadyCallback)
-> Maybe (Ptr (FunPtr C_AsyncReadyCallback))
forall a. a -> Maybe a
Just Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback) (AsyncReadyCallback -> AsyncReadyCallback_WithClosures
Gio.Callbacks.drop_closures_AsyncReadyCallback AsyncReadyCallback
jCallback))
            Ptr (FunPtr C_AsyncReadyCallback)
-> FunPtr C_AsyncReadyCallback -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback FunPtr C_AsyncReadyCallback
jCallback'
            FunPtr C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
forall (m :: * -> *) a. Monad m => a -> m a
return FunPtr C_AsyncReadyCallback
jCallback'
    let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
    Ptr Avatar
-> Int32
-> Int32
-> Ptr Cancellable
-> FunPtr C_AsyncReadyCallback
-> Ptr ()
-> IO ()
hdy_avatar_draw_to_pixbuf_async Ptr Avatar
self' Int32
size Int32
scaleFactor Ptr Cancellable
maybeCancellable FunPtr C_AsyncReadyCallback
maybeCallback Ptr ()
forall a. Ptr a
userData
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data AvatarDrawToPixbufAsyncMethodInfo
instance (signature ~ (Int32 -> Int32 -> Maybe (b) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsAvatar a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod AvatarDrawToPixbufAsyncMethodInfo a signature where
    overloadedMethod = avatarDrawToPixbufAsync

instance O.OverloadedMethodInfo AvatarDrawToPixbufAsyncMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Handy.Objects.Avatar.avatarDrawToPixbufAsync",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-handy-1.0.1/docs/GI-Handy-Objects-Avatar.html#v:avatarDrawToPixbufAsync"
        })


#endif

-- method Avatar::draw_to_pixbuf_finish
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Handy" , name = "Avatar" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #HdyAvatar" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "async_result"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "AsyncResult" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GAsyncResult" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "GdkPixbuf" , name = "Pixbuf" })
-- throws : False
-- Skip return : False

foreign import ccall "hdy_avatar_draw_to_pixbuf_finish" hdy_avatar_draw_to_pixbuf_finish :: 
    Ptr Avatar ->                           -- self : TInterface (Name {namespace = "Handy", name = "Avatar"})
    Ptr Gio.AsyncResult.AsyncResult ->      -- async_result : TInterface (Name {namespace = "Gio", name = "AsyncResult"})
    IO (Ptr GdkPixbuf.Pixbuf.Pixbuf)

-- | Finishes an asynchronous draw of an avatar to a pixbuf.
-- 
-- /Since: 1.2/
avatarDrawToPixbufFinish ::
    (B.CallStack.HasCallStack, MonadIO m, IsAvatar a, Gio.AsyncResult.IsAsyncResult b) =>
    a
    -- ^ /@self@/: a t'GI.Handy.Objects.Avatar.Avatar'
    -> b
    -- ^ /@asyncResult@/: a t'GI.Gio.Interfaces.AsyncResult.AsyncResult'
    -> m GdkPixbuf.Pixbuf.Pixbuf
    -- ^ __Returns:__ a t'GI.GdkPixbuf.Objects.Pixbuf.Pixbuf'
avatarDrawToPixbufFinish :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsAvatar a, IsAsyncResult b) =>
a -> b -> m Pixbuf
avatarDrawToPixbufFinish a
self b
asyncResult = IO Pixbuf -> m Pixbuf
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Pixbuf -> m Pixbuf) -> IO Pixbuf -> m Pixbuf
forall a b. (a -> b) -> a -> b
$ do
    Ptr Avatar
self' <- a -> IO (Ptr Avatar)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Ptr AsyncResult
asyncResult' <- b -> IO (Ptr AsyncResult)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
asyncResult
    Ptr Pixbuf
result <- Ptr Avatar -> Ptr AsyncResult -> IO (Ptr Pixbuf)
hdy_avatar_draw_to_pixbuf_finish Ptr Avatar
self' Ptr AsyncResult
asyncResult'
    Text -> Ptr Pixbuf -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"avatarDrawToPixbufFinish" Ptr Pixbuf
result
    Pixbuf
result' <- ((ManagedPtr Pixbuf -> Pixbuf) -> Ptr Pixbuf -> IO Pixbuf
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Pixbuf -> Pixbuf
GdkPixbuf.Pixbuf.Pixbuf) Ptr Pixbuf
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
asyncResult
    Pixbuf -> IO Pixbuf
forall (m :: * -> *) a. Monad m => a -> m a
return Pixbuf
result'

#if defined(ENABLE_OVERLOADING)
data AvatarDrawToPixbufFinishMethodInfo
instance (signature ~ (b -> m GdkPixbuf.Pixbuf.Pixbuf), MonadIO m, IsAvatar a, Gio.AsyncResult.IsAsyncResult b) => O.OverloadedMethod AvatarDrawToPixbufFinishMethodInfo a signature where
    overloadedMethod = avatarDrawToPixbufFinish

instance O.OverloadedMethodInfo AvatarDrawToPixbufFinishMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Handy.Objects.Avatar.avatarDrawToPixbufFinish",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-handy-1.0.1/docs/GI-Handy-Objects-Avatar.html#v:avatarDrawToPixbufFinish"
        })


#endif

-- method Avatar::get_icon_name
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Handy" , name = "Avatar" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #HdyAvatar" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "hdy_avatar_get_icon_name" hdy_avatar_get_icon_name :: 
    Ptr Avatar ->                           -- self : TInterface (Name {namespace = "Handy", name = "Avatar"})
    IO CString

-- | Gets the name of the icon in the icon theme to use when the icon should be
-- displayed.
-- 
-- /Since: 1.0/
avatarGetIconName ::
    (B.CallStack.HasCallStack, MonadIO m, IsAvatar a) =>
    a
    -- ^ /@self@/: a t'GI.Handy.Objects.Avatar.Avatar'
    -> m (Maybe T.Text)
    -- ^ __Returns:__ the name of the icon from the icon theme.
avatarGetIconName :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAvatar a) =>
a -> m (Maybe Text)
avatarGetIconName a
self = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Avatar
self' <- a -> IO (Ptr Avatar)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Ptr CChar
result <- Ptr Avatar -> IO (Ptr CChar)
hdy_avatar_get_icon_name Ptr Avatar
self'
    Maybe Text
maybeResult <- Ptr CChar -> (Ptr CChar -> IO Text) -> IO (Maybe Text)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr CChar
result ((Ptr CChar -> IO Text) -> IO (Maybe Text))
-> (Ptr CChar -> IO Text) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \Ptr CChar
result' -> do
        Text
result'' <- HasCallStack => Ptr CChar -> IO Text
Ptr CChar -> IO Text
cstringToText Ptr CChar
result'
        Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    Maybe Text -> IO (Maybe Text)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
maybeResult

#if defined(ENABLE_OVERLOADING)
data AvatarGetIconNameMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsAvatar a) => O.OverloadedMethod AvatarGetIconNameMethodInfo a signature where
    overloadedMethod = avatarGetIconName

instance O.OverloadedMethodInfo AvatarGetIconNameMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Handy.Objects.Avatar.avatarGetIconName",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-handy-1.0.1/docs/GI-Handy-Objects-Avatar.html#v:avatarGetIconName"
        })


#endif

-- method Avatar::get_loadable_icon
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Handy" , name = "Avatar" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #HdyAvatar" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "Gio" , name = "LoadableIcon" })
-- throws : False
-- Skip return : False

foreign import ccall "hdy_avatar_get_loadable_icon" hdy_avatar_get_loadable_icon :: 
    Ptr Avatar ->                           -- self : TInterface (Name {namespace = "Handy", name = "Avatar"})
    IO (Ptr Gio.LoadableIcon.LoadableIcon)

-- | Gets the t'GI.Gio.Interfaces.LoadableIcon.LoadableIcon' set via 'GI.Handy.Objects.Avatar.avatarSetLoadableIcon'.
-- 
-- /Since: 1.2/
avatarGetLoadableIcon ::
    (B.CallStack.HasCallStack, MonadIO m, IsAvatar a) =>
    a
    -- ^ /@self@/: a t'GI.Handy.Objects.Avatar.Avatar'
    -> m (Maybe Gio.LoadableIcon.LoadableIcon)
    -- ^ __Returns:__ the t'GI.Gio.Interfaces.LoadableIcon.LoadableIcon'
avatarGetLoadableIcon :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAvatar a) =>
a -> m (Maybe LoadableIcon)
avatarGetLoadableIcon a
self = IO (Maybe LoadableIcon) -> m (Maybe LoadableIcon)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe LoadableIcon) -> m (Maybe LoadableIcon))
-> IO (Maybe LoadableIcon) -> m (Maybe LoadableIcon)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Avatar
self' <- a -> IO (Ptr Avatar)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Ptr LoadableIcon
result <- Ptr Avatar -> IO (Ptr LoadableIcon)
hdy_avatar_get_loadable_icon Ptr Avatar
self'
    Maybe LoadableIcon
maybeResult <- Ptr LoadableIcon
-> (Ptr LoadableIcon -> IO LoadableIcon) -> IO (Maybe LoadableIcon)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr LoadableIcon
result ((Ptr LoadableIcon -> IO LoadableIcon) -> IO (Maybe LoadableIcon))
-> (Ptr LoadableIcon -> IO LoadableIcon) -> IO (Maybe LoadableIcon)
forall a b. (a -> b) -> a -> b
$ \Ptr LoadableIcon
result' -> do
        LoadableIcon
result'' <- ((ManagedPtr LoadableIcon -> LoadableIcon)
-> Ptr LoadableIcon -> IO LoadableIcon
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr LoadableIcon -> LoadableIcon
Gio.LoadableIcon.LoadableIcon) Ptr LoadableIcon
result'
        LoadableIcon -> IO LoadableIcon
forall (m :: * -> *) a. Monad m => a -> m a
return LoadableIcon
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    Maybe LoadableIcon -> IO (Maybe LoadableIcon)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe LoadableIcon
maybeResult

#if defined(ENABLE_OVERLOADING)
data AvatarGetLoadableIconMethodInfo
instance (signature ~ (m (Maybe Gio.LoadableIcon.LoadableIcon)), MonadIO m, IsAvatar a) => O.OverloadedMethod AvatarGetLoadableIconMethodInfo a signature where
    overloadedMethod = avatarGetLoadableIcon

instance O.OverloadedMethodInfo AvatarGetLoadableIconMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Handy.Objects.Avatar.avatarGetLoadableIcon",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-handy-1.0.1/docs/GI-Handy-Objects-Avatar.html#v:avatarGetLoadableIcon"
        })


#endif

-- method Avatar::get_show_initials
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Handy" , name = "Avatar" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #HdyAvatar" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "hdy_avatar_get_show_initials" hdy_avatar_get_show_initials :: 
    Ptr Avatar ->                           -- self : TInterface (Name {namespace = "Handy", name = "Avatar"})
    IO CInt

-- | Returns whether initials are used for the fallback or the icon.
avatarGetShowInitials ::
    (B.CallStack.HasCallStack, MonadIO m, IsAvatar a) =>
    a
    -- ^ /@self@/: a t'GI.Handy.Objects.Avatar.Avatar'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the initials are used for the fallback.
avatarGetShowInitials :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAvatar a) =>
a -> m Bool
avatarGetShowInitials a
self = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Avatar
self' <- a -> IO (Ptr Avatar)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    CInt
result <- Ptr Avatar -> IO CInt
hdy_avatar_get_show_initials Ptr Avatar
self'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data AvatarGetShowInitialsMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsAvatar a) => O.OverloadedMethod AvatarGetShowInitialsMethodInfo a signature where
    overloadedMethod = avatarGetShowInitials

instance O.OverloadedMethodInfo AvatarGetShowInitialsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Handy.Objects.Avatar.avatarGetShowInitials",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-handy-1.0.1/docs/GI-Handy-Objects-Avatar.html#v:avatarGetShowInitials"
        })


#endif

-- method Avatar::get_size
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Handy" , name = "Avatar" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #HdyAvatar" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hdy_avatar_get_size" hdy_avatar_get_size :: 
    Ptr Avatar ->                           -- self : TInterface (Name {namespace = "Handy", name = "Avatar"})
    IO Int32

-- | Returns the size of the avatar.
avatarGetSize ::
    (B.CallStack.HasCallStack, MonadIO m, IsAvatar a) =>
    a
    -- ^ /@self@/: a t'GI.Handy.Objects.Avatar.Avatar'
    -> m Int32
    -- ^ __Returns:__ the size of the avatar.
avatarGetSize :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAvatar a) =>
a -> m Int32
avatarGetSize a
self = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr Avatar
self' <- a -> IO (Ptr Avatar)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Int32
result <- Ptr Avatar -> IO Int32
hdy_avatar_get_size Ptr Avatar
self'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

#if defined(ENABLE_OVERLOADING)
data AvatarGetSizeMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsAvatar a) => O.OverloadedMethod AvatarGetSizeMethodInfo a signature where
    overloadedMethod = avatarGetSize

instance O.OverloadedMethodInfo AvatarGetSizeMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Handy.Objects.Avatar.avatarGetSize",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-handy-1.0.1/docs/GI-Handy-Objects-Avatar.html#v:avatarGetSize"
        })


#endif

-- method Avatar::get_text
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Handy" , name = "Avatar" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #HdyAvatar" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "hdy_avatar_get_text" hdy_avatar_get_text :: 
    Ptr Avatar ->                           -- self : TInterface (Name {namespace = "Handy", name = "Avatar"})
    IO CString

-- | Get the text used to generate the fallback initials and color
avatarGetText ::
    (B.CallStack.HasCallStack, MonadIO m, IsAvatar a) =>
    a
    -- ^ /@self@/: a t'GI.Handy.Objects.Avatar.Avatar'
    -> m (Maybe T.Text)
    -- ^ __Returns:__ returns the text used to generate
    -- the fallback initials. This is the internal string used by
    -- the t'GI.Handy.Objects.Avatar.Avatar', and must not be modified.
avatarGetText :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAvatar a) =>
a -> m (Maybe Text)
avatarGetText a
self = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Avatar
self' <- a -> IO (Ptr Avatar)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Ptr CChar
result <- Ptr Avatar -> IO (Ptr CChar)
hdy_avatar_get_text Ptr Avatar
self'
    Maybe Text
maybeResult <- Ptr CChar -> (Ptr CChar -> IO Text) -> IO (Maybe Text)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr CChar
result ((Ptr CChar -> IO Text) -> IO (Maybe Text))
-> (Ptr CChar -> IO Text) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \Ptr CChar
result' -> do
        Text
result'' <- HasCallStack => Ptr CChar -> IO Text
Ptr CChar -> IO Text
cstringToText Ptr CChar
result'
        Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    Maybe Text -> IO (Maybe Text)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
maybeResult

#if defined(ENABLE_OVERLOADING)
data AvatarGetTextMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsAvatar a) => O.OverloadedMethod AvatarGetTextMethodInfo a signature where
    overloadedMethod = avatarGetText

instance O.OverloadedMethodInfo AvatarGetTextMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Handy.Objects.Avatar.avatarGetText",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-handy-1.0.1/docs/GI-Handy-Objects-Avatar.html#v:avatarGetText"
        })


#endif

-- method Avatar::set_icon_name
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Handy" , name = "Avatar" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #HdyAvatar" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "icon_name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the name of the icon from the icon theme"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hdy_avatar_set_icon_name" hdy_avatar_set_icon_name :: 
    Ptr Avatar ->                           -- self : TInterface (Name {namespace = "Handy", name = "Avatar"})
    CString ->                              -- icon_name : TBasicType TUTF8
    IO ()

-- | 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/
avatarSetIconName ::
    (B.CallStack.HasCallStack, MonadIO m, IsAvatar a) =>
    a
    -- ^ /@self@/: a t'GI.Handy.Objects.Avatar.Avatar'
    -> Maybe (T.Text)
    -- ^ /@iconName@/: the name of the icon from the icon theme
    -> m ()
avatarSetIconName :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAvatar a) =>
a -> Maybe Text -> m ()
avatarSetIconName a
self Maybe Text
iconName = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Avatar
self' <- a -> IO (Ptr Avatar)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Ptr CChar
maybeIconName <- case Maybe Text
iconName of
        Maybe Text
Nothing -> Ptr CChar -> IO (Ptr CChar)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
forall a. Ptr a
nullPtr
        Just Text
jIconName -> do
            Ptr CChar
jIconName' <- Text -> IO (Ptr CChar)
textToCString Text
jIconName
            Ptr CChar -> IO (Ptr CChar)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
jIconName'
    Ptr Avatar -> Ptr CChar -> IO ()
hdy_avatar_set_icon_name Ptr Avatar
self' Ptr CChar
maybeIconName
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
maybeIconName
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data AvatarSetIconNameMethodInfo
instance (signature ~ (Maybe (T.Text) -> m ()), MonadIO m, IsAvatar a) => O.OverloadedMethod AvatarSetIconNameMethodInfo a signature where
    overloadedMethod = avatarSetIconName

instance O.OverloadedMethodInfo AvatarSetIconNameMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Handy.Objects.Avatar.avatarSetIconName",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-handy-1.0.1/docs/GI-Handy-Objects-Avatar.html#v:avatarSetIconName"
        })


#endif

-- method Avatar::set_image_load_func
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Handy" , name = "Avatar" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #HdyAvatar" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "load_image"
--           , argType =
--               TInterface
--                 Name { namespace = "Handy" , name = "AvatarImageLoadFunc" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "callback to set a custom image"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeNotified
--           , argClosure = 2
--           , argDestroy = 3
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "user data passed to @load_image"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "destroy"
--           , argType =
--               TInterface Name { namespace = "GLib" , name = "DestroyNotify" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "destroy notifier for @user_data"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeAsync
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hdy_avatar_set_image_load_func" hdy_avatar_set_image_load_func :: 
    Ptr Avatar ->                           -- self : TInterface (Name {namespace = "Handy", name = "Avatar"})
    FunPtr Handy.Callbacks.C_AvatarImageLoadFunc -> -- load_image : TInterface (Name {namespace = "Handy", name = "AvatarImageLoadFunc"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    FunPtr GLib.Callbacks.C_DestroyNotify -> -- destroy : TInterface (Name {namespace = "GLib", name = "DestroyNotify"})
    IO ()

{-# DEPRECATED avatarSetImageLoadFunc ["(Since version 1.2)","use 'GI.Handy.Objects.Avatar.avatarSetLoadableIcon' instead."] #-}
-- | A callback which is called when the custom image need to be reloaded for some
-- reason (e.g. scale-factor changes).
avatarSetImageLoadFunc ::
    (B.CallStack.HasCallStack, MonadIO m, IsAvatar a) =>
    a
    -- ^ /@self@/: a t'GI.Handy.Objects.Avatar.Avatar'
    -> Maybe (Handy.Callbacks.AvatarImageLoadFunc)
    -- ^ /@loadImage@/: callback to set a custom image
    -> m ()
avatarSetImageLoadFunc :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAvatar a) =>
a -> Maybe AvatarImageLoadFunc -> m ()
avatarSetImageLoadFunc a
self Maybe AvatarImageLoadFunc
loadImage = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Avatar
self' <- a -> IO (Ptr Avatar)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    FunPtr C_AvatarImageLoadFunc
maybeLoadImage <- case Maybe AvatarImageLoadFunc
loadImage of
        Maybe AvatarImageLoadFunc
Nothing -> FunPtr C_AvatarImageLoadFunc -> IO (FunPtr C_AvatarImageLoadFunc)
forall (m :: * -> *) a. Monad m => a -> m a
return (Ptr Any -> FunPtr C_AvatarImageLoadFunc
forall a b. Ptr a -> FunPtr b
castPtrToFunPtr Ptr Any
forall a. Ptr a
nullPtr)
        Just AvatarImageLoadFunc
jLoadImage -> do
            FunPtr C_AvatarImageLoadFunc
jLoadImage' <- C_AvatarImageLoadFunc -> IO (FunPtr C_AvatarImageLoadFunc)
Handy.Callbacks.mk_AvatarImageLoadFunc (Maybe (Ptr (FunPtr C_AvatarImageLoadFunc))
-> AvatarImageLoadFunc_WithClosures -> C_AvatarImageLoadFunc
Handy.Callbacks.wrap_AvatarImageLoadFunc Maybe (Ptr (FunPtr C_AvatarImageLoadFunc))
forall a. Maybe a
Nothing (AvatarImageLoadFunc -> AvatarImageLoadFunc_WithClosures
Handy.Callbacks.drop_closures_AvatarImageLoadFunc AvatarImageLoadFunc
jLoadImage))
            FunPtr C_AvatarImageLoadFunc -> IO (FunPtr C_AvatarImageLoadFunc)
forall (m :: * -> *) a. Monad m => a -> m a
return FunPtr C_AvatarImageLoadFunc
jLoadImage'
    let userData :: Ptr ()
userData = FunPtr C_AvatarImageLoadFunc -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_AvatarImageLoadFunc
maybeLoadImage
    let destroy :: FunPtr (Ptr a -> IO ())
destroy = FunPtr (Ptr a -> IO ())
forall a. FunPtr (Ptr a -> IO ())
SP.safeFreeFunPtrPtr
    Ptr Avatar
-> FunPtr C_AvatarImageLoadFunc
-> Ptr ()
-> FunPtr (Ptr () -> IO ())
-> IO ()
hdy_avatar_set_image_load_func Ptr Avatar
self' FunPtr C_AvatarImageLoadFunc
maybeLoadImage Ptr ()
userData FunPtr (Ptr () -> IO ())
forall a. FunPtr (Ptr a -> IO ())
destroy
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data AvatarSetImageLoadFuncMethodInfo
instance (signature ~ (Maybe (Handy.Callbacks.AvatarImageLoadFunc) -> m ()), MonadIO m, IsAvatar a) => O.OverloadedMethod AvatarSetImageLoadFuncMethodInfo a signature where
    overloadedMethod = avatarSetImageLoadFunc

instance O.OverloadedMethodInfo AvatarSetImageLoadFuncMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Handy.Objects.Avatar.avatarSetImageLoadFunc",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-handy-1.0.1/docs/GI-Handy-Objects-Avatar.html#v:avatarSetImageLoadFunc"
        })


#endif

-- method Avatar::set_loadable_icon
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Handy" , name = "Avatar" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #HdyAvatar" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "icon"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "LoadableIcon" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GLoadableIcon" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hdy_avatar_set_loadable_icon" hdy_avatar_set_loadable_icon :: 
    Ptr Avatar ->                           -- self : TInterface (Name {namespace = "Handy", name = "Avatar"})
    Ptr Gio.LoadableIcon.LoadableIcon ->    -- icon : TInterface (Name {namespace = "Gio", name = "LoadableIcon"})
    IO ()

-- | Sets the t'GI.Gio.Interfaces.LoadableIcon.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 'P.Nothing'.
-- 
-- The t'GI.Gio.Interfaces.LoadableIcon.LoadableIcon' set via this function is prefered over a set t'GI.Handy.Callbacks.AvatarImageLoadFunc'.
-- 
-- /Since: 1.2/
avatarSetLoadableIcon ::
    (B.CallStack.HasCallStack, MonadIO m, IsAvatar a, Gio.LoadableIcon.IsLoadableIcon b) =>
    a
    -- ^ /@self@/: a t'GI.Handy.Objects.Avatar.Avatar'
    -> Maybe (b)
    -- ^ /@icon@/: a t'GI.Gio.Interfaces.LoadableIcon.LoadableIcon'
    -> m ()
avatarSetLoadableIcon :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsAvatar a, IsLoadableIcon b) =>
a -> Maybe b -> m ()
avatarSetLoadableIcon a
self Maybe b
icon = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Avatar
self' <- a -> IO (Ptr Avatar)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Ptr LoadableIcon
maybeIcon <- case Maybe b
icon of
        Maybe b
Nothing -> Ptr LoadableIcon -> IO (Ptr LoadableIcon)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr LoadableIcon
forall a. Ptr a
nullPtr
        Just b
jIcon -> do
            Ptr LoadableIcon
jIcon' <- b -> IO (Ptr LoadableIcon)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jIcon
            Ptr LoadableIcon -> IO (Ptr LoadableIcon)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr LoadableIcon
jIcon'
    Ptr Avatar -> Ptr LoadableIcon -> IO ()
hdy_avatar_set_loadable_icon Ptr Avatar
self' Ptr LoadableIcon
maybeIcon
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
icon b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data AvatarSetLoadableIconMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsAvatar a, Gio.LoadableIcon.IsLoadableIcon b) => O.OverloadedMethod AvatarSetLoadableIconMethodInfo a signature where
    overloadedMethod = avatarSetLoadableIcon

instance O.OverloadedMethodInfo AvatarSetLoadableIconMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Handy.Objects.Avatar.avatarSetLoadableIcon",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-handy-1.0.1/docs/GI-Handy-Objects-Avatar.html#v:avatarSetLoadableIcon"
        })


#endif

-- method Avatar::set_show_initials
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Handy" , name = "Avatar" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #HdyAvatar" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "show_initials"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "whether the initials should be shown on the fallback avatar\nor the icon."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hdy_avatar_set_show_initials" hdy_avatar_set_show_initials :: 
    Ptr Avatar ->                           -- self : TInterface (Name {namespace = "Handy", name = "Avatar"})
    CInt ->                                 -- show_initials : TBasicType TBoolean
    IO ()

-- | Sets whether the initials should be shown on the fallback avatar or the icon.
avatarSetShowInitials ::
    (B.CallStack.HasCallStack, MonadIO m, IsAvatar a) =>
    a
    -- ^ /@self@/: a t'GI.Handy.Objects.Avatar.Avatar'
    -> Bool
    -- ^ /@showInitials@/: whether the initials should be shown on the fallback avatar
    -- or the icon.
    -> m ()
avatarSetShowInitials :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAvatar a) =>
a -> Bool -> m ()
avatarSetShowInitials a
self Bool
showInitials = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Avatar
self' <- a -> IO (Ptr Avatar)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    let showInitials' :: CInt
showInitials' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
showInitials
    Ptr Avatar -> CInt -> IO ()
hdy_avatar_set_show_initials Ptr Avatar
self' CInt
showInitials'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data AvatarSetShowInitialsMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsAvatar a) => O.OverloadedMethod AvatarSetShowInitialsMethodInfo a signature where
    overloadedMethod = avatarSetShowInitials

instance O.OverloadedMethodInfo AvatarSetShowInitialsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Handy.Objects.Avatar.avatarSetShowInitials",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-handy-1.0.1/docs/GI-Handy-Objects-Avatar.html#v:avatarSetShowInitials"
        })


#endif

-- method Avatar::set_size
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Handy" , name = "Avatar" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #HdyAvatar" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "size"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The size to be used for the avatar"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hdy_avatar_set_size" hdy_avatar_set_size :: 
    Ptr Avatar ->                           -- self : TInterface (Name {namespace = "Handy", name = "Avatar"})
    Int32 ->                                -- size : TBasicType TInt
    IO ()

-- | Sets the size of the avatar.
avatarSetSize ::
    (B.CallStack.HasCallStack, MonadIO m, IsAvatar a) =>
    a
    -- ^ /@self@/: a t'GI.Handy.Objects.Avatar.Avatar'
    -> Int32
    -- ^ /@size@/: The size to be used for the avatar
    -> m ()
avatarSetSize :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAvatar a) =>
a -> Int32 -> m ()
avatarSetSize a
self Int32
size = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Avatar
self' <- a -> IO (Ptr Avatar)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Ptr Avatar -> Int32 -> IO ()
hdy_avatar_set_size Ptr Avatar
self' Int32
size
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data AvatarSetSizeMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m, IsAvatar a) => O.OverloadedMethod AvatarSetSizeMethodInfo a signature where
    overloadedMethod = avatarSetSize

instance O.OverloadedMethodInfo AvatarSetSizeMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Handy.Objects.Avatar.avatarSetSize",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-handy-1.0.1/docs/GI-Handy-Objects-Avatar.html#v:avatarSetSize"
        })


#endif

-- method Avatar::set_text
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Handy" , name = "Avatar" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #HdyAvatar" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "text"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the text used to get the initials and color"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hdy_avatar_set_text" hdy_avatar_set_text :: 
    Ptr Avatar ->                           -- self : TInterface (Name {namespace = "Handy", name = "Avatar"})
    CString ->                              -- text : TBasicType TUTF8
    IO ()

-- | Set the text used to generate the fallback initials color
avatarSetText ::
    (B.CallStack.HasCallStack, MonadIO m, IsAvatar a) =>
    a
    -- ^ /@self@/: a t'GI.Handy.Objects.Avatar.Avatar'
    -> Maybe (T.Text)
    -- ^ /@text@/: the text used to get the initials and color
    -> m ()
avatarSetText :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAvatar a) =>
a -> Maybe Text -> m ()
avatarSetText a
self Maybe Text
text = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Avatar
self' <- a -> IO (Ptr Avatar)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Ptr CChar
maybeText <- case Maybe Text
text of
        Maybe Text
Nothing -> Ptr CChar -> IO (Ptr CChar)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
forall a. Ptr a
nullPtr
        Just Text
jText -> do
            Ptr CChar
jText' <- Text -> IO (Ptr CChar)
textToCString Text
jText
            Ptr CChar -> IO (Ptr CChar)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
jText'
    Ptr Avatar -> Ptr CChar -> IO ()
hdy_avatar_set_text Ptr Avatar
self' Ptr CChar
maybeText
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
maybeText
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data AvatarSetTextMethodInfo
instance (signature ~ (Maybe (T.Text) -> m ()), MonadIO m, IsAvatar a) => O.OverloadedMethod AvatarSetTextMethodInfo a signature where
    overloadedMethod = avatarSetText

instance O.OverloadedMethodInfo AvatarSetTextMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Handy.Objects.Avatar.avatarSetText",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-handy-1.0.1/docs/GI-Handy-Objects-Avatar.html#v:avatarSetText"
        })


#endif