{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Adw.Objects.Avatar
(
Avatar(..) ,
IsAvatar ,
toAvatar ,
#if defined(ENABLE_OVERLOADING)
ResolveAvatarMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
AvatarDrawToTextureMethodInfo ,
#endif
avatarDrawToTexture ,
#if defined(ENABLE_OVERLOADING)
AvatarGetCustomImageMethodInfo ,
#endif
avatarGetCustomImage ,
#if defined(ENABLE_OVERLOADING)
AvatarGetIconNameMethodInfo ,
#endif
avatarGetIconName ,
#if defined(ENABLE_OVERLOADING)
AvatarGetShowInitialsMethodInfo ,
#endif
avatarGetShowInitials ,
#if defined(ENABLE_OVERLOADING)
AvatarGetSizeMethodInfo ,
#endif
avatarGetSize ,
#if defined(ENABLE_OVERLOADING)
AvatarGetTextMethodInfo ,
#endif
avatarGetText ,
avatarNew ,
#if defined(ENABLE_OVERLOADING)
AvatarSetCustomImageMethodInfo ,
#endif
avatarSetCustomImage ,
#if defined(ENABLE_OVERLOADING)
AvatarSetIconNameMethodInfo ,
#endif
avatarSetIconName ,
#if defined(ENABLE_OVERLOADING)
AvatarSetShowInitialsMethodInfo ,
#endif
avatarSetShowInitials ,
#if defined(ENABLE_OVERLOADING)
AvatarSetSizeMethodInfo ,
#endif
avatarSetSize ,
#if defined(ENABLE_OVERLOADING)
AvatarSetTextMethodInfo ,
#endif
avatarSetText ,
#if defined(ENABLE_OVERLOADING)
AvatarCustomImagePropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
avatarCustomImage ,
#endif
clearAvatarCustomImage ,
constructAvatarCustomImage ,
getAvatarCustomImage ,
setAvatarCustomImage ,
#if defined(ENABLE_OVERLOADING)
AvatarIconNamePropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
avatarIconName ,
#endif
clearAvatarIconName ,
constructAvatarIconName ,
getAvatarIconName ,
setAvatarIconName ,
#if defined(ENABLE_OVERLOADING)
AvatarShowInitialsPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
avatarShowInitials ,
#endif
constructAvatarShowInitials ,
getAvatarShowInitials ,
setAvatarShowInitials ,
#if defined(ENABLE_OVERLOADING)
AvatarSizePropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
avatarSize ,
#endif
constructAvatarSize ,
getAvatarSize ,
setAvatarSize ,
#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.GObject.Objects.Object as GObject.Object
import qualified GI.Gdk.Interfaces.Paintable as Gdk.Paintable
import qualified GI.Gdk.Objects.Texture as Gdk.Texture
import qualified GI.Gtk.Interfaces.Accessible as Gtk.Accessible
import qualified GI.Gtk.Interfaces.Buildable as Gtk.Buildable
import qualified GI.Gtk.Interfaces.ConstraintTarget as Gtk.ConstraintTarget
import qualified GI.Gtk.Objects.Widget as Gtk.Widget
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 "adw_avatar_get_type"
c_adw_avatar_get_type :: IO B.Types.GType
instance B.Types.TypedObject Avatar where
glibType :: IO GType
glibType = IO GType
c_adw_avatar_get_type
instance B.Types.GObject Avatar
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.Widget.Widget, GObject.Object.Object, Gtk.Accessible.Accessible, Gtk.Buildable.Buildable, Gtk.ConstraintTarget.ConstraintTarget]
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
instance B.GValue.IsGValue (Maybe Avatar) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_adw_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 "actionSetEnabled" o = Gtk.Widget.WidgetActionSetEnabledMethodInfo
ResolveAvatarMethod "activate" o = Gtk.Widget.WidgetActivateMethodInfo
ResolveAvatarMethod "activateAction" o = Gtk.Widget.WidgetActivateActionMethodInfo
ResolveAvatarMethod "activateDefault" o = Gtk.Widget.WidgetActivateDefaultMethodInfo
ResolveAvatarMethod "addController" o = Gtk.Widget.WidgetAddControllerMethodInfo
ResolveAvatarMethod "addCssClass" o = Gtk.Widget.WidgetAddCssClassMethodInfo
ResolveAvatarMethod "addMnemonicLabel" o = Gtk.Widget.WidgetAddMnemonicLabelMethodInfo
ResolveAvatarMethod "addTickCallback" o = Gtk.Widget.WidgetAddTickCallbackMethodInfo
ResolveAvatarMethod "allocate" o = Gtk.Widget.WidgetAllocateMethodInfo
ResolveAvatarMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveAvatarMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveAvatarMethod "childFocus" o = Gtk.Widget.WidgetChildFocusMethodInfo
ResolveAvatarMethod "computeBounds" o = Gtk.Widget.WidgetComputeBoundsMethodInfo
ResolveAvatarMethod "computeExpand" o = Gtk.Widget.WidgetComputeExpandMethodInfo
ResolveAvatarMethod "computePoint" o = Gtk.Widget.WidgetComputePointMethodInfo
ResolveAvatarMethod "computeTransform" o = Gtk.Widget.WidgetComputeTransformMethodInfo
ResolveAvatarMethod "contains" o = Gtk.Widget.WidgetContainsMethodInfo
ResolveAvatarMethod "createPangoContext" o = Gtk.Widget.WidgetCreatePangoContextMethodInfo
ResolveAvatarMethod "createPangoLayout" o = Gtk.Widget.WidgetCreatePangoLayoutMethodInfo
ResolveAvatarMethod "dragCheckThreshold" o = Gtk.Widget.WidgetDragCheckThresholdMethodInfo
ResolveAvatarMethod "drawToTexture" o = AvatarDrawToTextureMethodInfo
ResolveAvatarMethod "errorBell" o = Gtk.Widget.WidgetErrorBellMethodInfo
ResolveAvatarMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveAvatarMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveAvatarMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveAvatarMethod "grabFocus" o = Gtk.Widget.WidgetGrabFocusMethodInfo
ResolveAvatarMethod "hasCssClass" o = Gtk.Widget.WidgetHasCssClassMethodInfo
ResolveAvatarMethod "hasDefault" o = Gtk.Widget.WidgetHasDefaultMethodInfo
ResolveAvatarMethod "hasFocus" o = Gtk.Widget.WidgetHasFocusMethodInfo
ResolveAvatarMethod "hasVisibleFocus" o = Gtk.Widget.WidgetHasVisibleFocusMethodInfo
ResolveAvatarMethod "hide" o = Gtk.Widget.WidgetHideMethodInfo
ResolveAvatarMethod "inDestruction" o = Gtk.Widget.WidgetInDestructionMethodInfo
ResolveAvatarMethod "initTemplate" o = Gtk.Widget.WidgetInitTemplateMethodInfo
ResolveAvatarMethod "insertActionGroup" o = Gtk.Widget.WidgetInsertActionGroupMethodInfo
ResolveAvatarMethod "insertAfter" o = Gtk.Widget.WidgetInsertAfterMethodInfo
ResolveAvatarMethod "insertBefore" o = Gtk.Widget.WidgetInsertBeforeMethodInfo
ResolveAvatarMethod "isAncestor" o = Gtk.Widget.WidgetIsAncestorMethodInfo
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 "isVisible" o = Gtk.Widget.WidgetIsVisibleMethodInfo
ResolveAvatarMethod "keynavFailed" o = Gtk.Widget.WidgetKeynavFailedMethodInfo
ResolveAvatarMethod "listMnemonicLabels" o = Gtk.Widget.WidgetListMnemonicLabelsMethodInfo
ResolveAvatarMethod "map" o = Gtk.Widget.WidgetMapMethodInfo
ResolveAvatarMethod "measure" o = Gtk.Widget.WidgetMeasureMethodInfo
ResolveAvatarMethod "mnemonicActivate" o = Gtk.Widget.WidgetMnemonicActivateMethodInfo
ResolveAvatarMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveAvatarMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveAvatarMethod "observeChildren" o = Gtk.Widget.WidgetObserveChildrenMethodInfo
ResolveAvatarMethod "observeControllers" o = Gtk.Widget.WidgetObserveControllersMethodInfo
ResolveAvatarMethod "pick" o = Gtk.Widget.WidgetPickMethodInfo
ResolveAvatarMethod "queueAllocate" o = Gtk.Widget.WidgetQueueAllocateMethodInfo
ResolveAvatarMethod "queueDraw" o = Gtk.Widget.WidgetQueueDrawMethodInfo
ResolveAvatarMethod "queueResize" o = Gtk.Widget.WidgetQueueResizeMethodInfo
ResolveAvatarMethod "realize" o = Gtk.Widget.WidgetRealizeMethodInfo
ResolveAvatarMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveAvatarMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveAvatarMethod "removeController" o = Gtk.Widget.WidgetRemoveControllerMethodInfo
ResolveAvatarMethod "removeCssClass" o = Gtk.Widget.WidgetRemoveCssClassMethodInfo
ResolveAvatarMethod "removeMnemonicLabel" o = Gtk.Widget.WidgetRemoveMnemonicLabelMethodInfo
ResolveAvatarMethod "removeTickCallback" o = Gtk.Widget.WidgetRemoveTickCallbackMethodInfo
ResolveAvatarMethod "resetProperty" o = Gtk.Accessible.AccessibleResetPropertyMethodInfo
ResolveAvatarMethod "resetRelation" o = Gtk.Accessible.AccessibleResetRelationMethodInfo
ResolveAvatarMethod "resetState" o = Gtk.Accessible.AccessibleResetStateMethodInfo
ResolveAvatarMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveAvatarMethod "shouldLayout" o = Gtk.Widget.WidgetShouldLayoutMethodInfo
ResolveAvatarMethod "show" o = Gtk.Widget.WidgetShowMethodInfo
ResolveAvatarMethod "sizeAllocate" o = Gtk.Widget.WidgetSizeAllocateMethodInfo
ResolveAvatarMethod "snapshotChild" o = Gtk.Widget.WidgetSnapshotChildMethodInfo
ResolveAvatarMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveAvatarMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
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 "unsetStateFlags" o = Gtk.Widget.WidgetUnsetStateFlagsMethodInfo
ResolveAvatarMethod "updateProperty" o = Gtk.Accessible.AccessibleUpdatePropertyMethodInfo
ResolveAvatarMethod "updateRelation" o = Gtk.Accessible.AccessibleUpdateRelationMethodInfo
ResolveAvatarMethod "updateState" o = Gtk.Accessible.AccessibleUpdateStateMethodInfo
ResolveAvatarMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveAvatarMethod "getAccessibleRole" o = Gtk.Accessible.AccessibleGetAccessibleRoleMethodInfo
ResolveAvatarMethod "getAllocatedBaseline" o = Gtk.Widget.WidgetGetAllocatedBaselineMethodInfo
ResolveAvatarMethod "getAllocatedHeight" o = Gtk.Widget.WidgetGetAllocatedHeightMethodInfo
ResolveAvatarMethod "getAllocatedWidth" o = Gtk.Widget.WidgetGetAllocatedWidthMethodInfo
ResolveAvatarMethod "getAllocation" o = Gtk.Widget.WidgetGetAllocationMethodInfo
ResolveAvatarMethod "getAncestor" o = Gtk.Widget.WidgetGetAncestorMethodInfo
ResolveAvatarMethod "getBuildableId" o = Gtk.Buildable.BuildableGetBuildableIdMethodInfo
ResolveAvatarMethod "getCanFocus" o = Gtk.Widget.WidgetGetCanFocusMethodInfo
ResolveAvatarMethod "getCanTarget" o = Gtk.Widget.WidgetGetCanTargetMethodInfo
ResolveAvatarMethod "getChildVisible" o = Gtk.Widget.WidgetGetChildVisibleMethodInfo
ResolveAvatarMethod "getClipboard" o = Gtk.Widget.WidgetGetClipboardMethodInfo
ResolveAvatarMethod "getCssClasses" o = Gtk.Widget.WidgetGetCssClassesMethodInfo
ResolveAvatarMethod "getCssName" o = Gtk.Widget.WidgetGetCssNameMethodInfo
ResolveAvatarMethod "getCursor" o = Gtk.Widget.WidgetGetCursorMethodInfo
ResolveAvatarMethod "getCustomImage" o = AvatarGetCustomImageMethodInfo
ResolveAvatarMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveAvatarMethod "getDirection" o = Gtk.Widget.WidgetGetDirectionMethodInfo
ResolveAvatarMethod "getDisplay" o = Gtk.Widget.WidgetGetDisplayMethodInfo
ResolveAvatarMethod "getFirstChild" o = Gtk.Widget.WidgetGetFirstChildMethodInfo
ResolveAvatarMethod "getFocusChild" o = Gtk.Widget.WidgetGetFocusChildMethodInfo
ResolveAvatarMethod "getFocusOnClick" o = Gtk.Widget.WidgetGetFocusOnClickMethodInfo
ResolveAvatarMethod "getFocusable" o = Gtk.Widget.WidgetGetFocusableMethodInfo
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 "getHeight" o = Gtk.Widget.WidgetGetHeightMethodInfo
ResolveAvatarMethod "getHexpand" o = Gtk.Widget.WidgetGetHexpandMethodInfo
ResolveAvatarMethod "getHexpandSet" o = Gtk.Widget.WidgetGetHexpandSetMethodInfo
ResolveAvatarMethod "getIconName" o = AvatarGetIconNameMethodInfo
ResolveAvatarMethod "getLastChild" o = Gtk.Widget.WidgetGetLastChildMethodInfo
ResolveAvatarMethod "getLayoutManager" o = Gtk.Widget.WidgetGetLayoutManagerMethodInfo
ResolveAvatarMethod "getMapped" o = Gtk.Widget.WidgetGetMappedMethodInfo
ResolveAvatarMethod "getMarginBottom" o = Gtk.Widget.WidgetGetMarginBottomMethodInfo
ResolveAvatarMethod "getMarginEnd" o = Gtk.Widget.WidgetGetMarginEndMethodInfo
ResolveAvatarMethod "getMarginStart" o = Gtk.Widget.WidgetGetMarginStartMethodInfo
ResolveAvatarMethod "getMarginTop" o = Gtk.Widget.WidgetGetMarginTopMethodInfo
ResolveAvatarMethod "getName" o = Gtk.Widget.WidgetGetNameMethodInfo
ResolveAvatarMethod "getNative" o = Gtk.Widget.WidgetGetNativeMethodInfo
ResolveAvatarMethod "getNextSibling" o = Gtk.Widget.WidgetGetNextSiblingMethodInfo
ResolveAvatarMethod "getOpacity" o = Gtk.Widget.WidgetGetOpacityMethodInfo
ResolveAvatarMethod "getOverflow" o = Gtk.Widget.WidgetGetOverflowMethodInfo
ResolveAvatarMethod "getPangoContext" o = Gtk.Widget.WidgetGetPangoContextMethodInfo
ResolveAvatarMethod "getParent" o = Gtk.Widget.WidgetGetParentMethodInfo
ResolveAvatarMethod "getPreferredSize" o = Gtk.Widget.WidgetGetPreferredSizeMethodInfo
ResolveAvatarMethod "getPrevSibling" o = Gtk.Widget.WidgetGetPrevSiblingMethodInfo
ResolveAvatarMethod "getPrimaryClipboard" o = Gtk.Widget.WidgetGetPrimaryClipboardMethodInfo
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 "getRoot" o = Gtk.Widget.WidgetGetRootMethodInfo
ResolveAvatarMethod "getScaleFactor" o = Gtk.Widget.WidgetGetScaleFactorMethodInfo
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 "getStateFlags" o = Gtk.Widget.WidgetGetStateFlagsMethodInfo
ResolveAvatarMethod "getStyleContext" o = Gtk.Widget.WidgetGetStyleContextMethodInfo
ResolveAvatarMethod "getTemplateChild" o = Gtk.Widget.WidgetGetTemplateChildMethodInfo
ResolveAvatarMethod "getText" o = AvatarGetTextMethodInfo
ResolveAvatarMethod "getTooltipMarkup" o = Gtk.Widget.WidgetGetTooltipMarkupMethodInfo
ResolveAvatarMethod "getTooltipText" o = Gtk.Widget.WidgetGetTooltipTextMethodInfo
ResolveAvatarMethod "getValign" o = Gtk.Widget.WidgetGetValignMethodInfo
ResolveAvatarMethod "getVexpand" o = Gtk.Widget.WidgetGetVexpandMethodInfo
ResolveAvatarMethod "getVexpandSet" o = Gtk.Widget.WidgetGetVexpandSetMethodInfo
ResolveAvatarMethod "getVisible" o = Gtk.Widget.WidgetGetVisibleMethodInfo
ResolveAvatarMethod "getWidth" o = Gtk.Widget.WidgetGetWidthMethodInfo
ResolveAvatarMethod "setCanFocus" o = Gtk.Widget.WidgetSetCanFocusMethodInfo
ResolveAvatarMethod "setCanTarget" o = Gtk.Widget.WidgetSetCanTargetMethodInfo
ResolveAvatarMethod "setChildVisible" o = Gtk.Widget.WidgetSetChildVisibleMethodInfo
ResolveAvatarMethod "setCssClasses" o = Gtk.Widget.WidgetSetCssClassesMethodInfo
ResolveAvatarMethod "setCursor" o = Gtk.Widget.WidgetSetCursorMethodInfo
ResolveAvatarMethod "setCursorFromName" o = Gtk.Widget.WidgetSetCursorFromNameMethodInfo
ResolveAvatarMethod "setCustomImage" o = AvatarSetCustomImageMethodInfo
ResolveAvatarMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveAvatarMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveAvatarMethod "setDirection" o = Gtk.Widget.WidgetSetDirectionMethodInfo
ResolveAvatarMethod "setFocusChild" o = Gtk.Widget.WidgetSetFocusChildMethodInfo
ResolveAvatarMethod "setFocusOnClick" o = Gtk.Widget.WidgetSetFocusOnClickMethodInfo
ResolveAvatarMethod "setFocusable" o = Gtk.Widget.WidgetSetFocusableMethodInfo
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 "setHexpand" o = Gtk.Widget.WidgetSetHexpandMethodInfo
ResolveAvatarMethod "setHexpandSet" o = Gtk.Widget.WidgetSetHexpandSetMethodInfo
ResolveAvatarMethod "setIconName" o = AvatarSetIconNameMethodInfo
ResolveAvatarMethod "setLayoutManager" o = Gtk.Widget.WidgetSetLayoutManagerMethodInfo
ResolveAvatarMethod "setMarginBottom" o = Gtk.Widget.WidgetSetMarginBottomMethodInfo
ResolveAvatarMethod "setMarginEnd" o = Gtk.Widget.WidgetSetMarginEndMethodInfo
ResolveAvatarMethod "setMarginStart" o = Gtk.Widget.WidgetSetMarginStartMethodInfo
ResolveAvatarMethod "setMarginTop" o = Gtk.Widget.WidgetSetMarginTopMethodInfo
ResolveAvatarMethod "setName" o = Gtk.Widget.WidgetSetNameMethodInfo
ResolveAvatarMethod "setOpacity" o = Gtk.Widget.WidgetSetOpacityMethodInfo
ResolveAvatarMethod "setOverflow" o = Gtk.Widget.WidgetSetOverflowMethodInfo
ResolveAvatarMethod "setParent" o = Gtk.Widget.WidgetSetParentMethodInfo
ResolveAvatarMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveAvatarMethod "setReceivesDefault" o = Gtk.Widget.WidgetSetReceivesDefaultMethodInfo
ResolveAvatarMethod "setSensitive" o = Gtk.Widget.WidgetSetSensitiveMethodInfo
ResolveAvatarMethod "setShowInitials" o = AvatarSetShowInitialsMethodInfo
ResolveAvatarMethod "setSize" o = AvatarSetSizeMethodInfo
ResolveAvatarMethod "setSizeRequest" o = Gtk.Widget.WidgetSetSizeRequestMethodInfo
ResolveAvatarMethod "setStateFlags" o = Gtk.Widget.WidgetSetStateFlagsMethodInfo
ResolveAvatarMethod "setText" o = AvatarSetTextMethodInfo
ResolveAvatarMethod "setTooltipMarkup" o = Gtk.Widget.WidgetSetTooltipMarkupMethodInfo
ResolveAvatarMethod "setTooltipText" o = Gtk.Widget.WidgetSetTooltipTextMethodInfo
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 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
getAvatarCustomImage :: (MonadIO m, IsAvatar o) => o -> m (Maybe Gdk.Paintable.Paintable)
getAvatarCustomImage :: forall (m :: * -> *) o.
(MonadIO m, IsAvatar o) =>
o -> m (Maybe Paintable)
getAvatarCustomImage o
obj = IO (Maybe Paintable) -> m (Maybe Paintable)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe Paintable) -> m (Maybe Paintable))
-> IO (Maybe Paintable) -> m (Maybe Paintable)
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr Paintable -> Paintable)
-> IO (Maybe Paintable)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"custom-image" ManagedPtr Paintable -> Paintable
Gdk.Paintable.Paintable
setAvatarCustomImage :: (MonadIO m, IsAvatar o, Gdk.Paintable.IsPaintable a) => o -> a -> m ()
setAvatarCustomImage :: forall (m :: * -> *) o a.
(MonadIO m, IsAvatar o, IsPaintable a) =>
o -> a -> m ()
setAvatarCustomImage 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
"custom-image" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)
constructAvatarCustomImage :: (IsAvatar o, MIO.MonadIO m, Gdk.Paintable.IsPaintable a) => a -> m (GValueConstruct o)
constructAvatarCustomImage :: forall o (m :: * -> *) a.
(IsAvatar o, MonadIO m, IsPaintable a) =>
a -> m (GValueConstruct o)
constructAvatarCustomImage 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
"custom-image" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)
clearAvatarCustomImage :: (MonadIO m, IsAvatar o) => o -> m ()
clearAvatarCustomImage :: forall (m :: * -> *) o. (MonadIO m, IsAvatar o) => o -> m ()
clearAvatarCustomImage 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 Paintable -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"custom-image" (Maybe Paintable
forall a. Maybe a
Nothing :: Maybe Gdk.Paintable.Paintable)
#if defined(ENABLE_OVERLOADING)
data AvatarCustomImagePropertyInfo
instance AttrInfo AvatarCustomImagePropertyInfo where
type AttrAllowedOps AvatarCustomImagePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint AvatarCustomImagePropertyInfo = IsAvatar
type AttrSetTypeConstraint AvatarCustomImagePropertyInfo = Gdk.Paintable.IsPaintable
type AttrTransferTypeConstraint AvatarCustomImagePropertyInfo = Gdk.Paintable.IsPaintable
type AttrTransferType AvatarCustomImagePropertyInfo = Gdk.Paintable.Paintable
type AttrGetType AvatarCustomImagePropertyInfo = (Maybe Gdk.Paintable.Paintable)
type AttrLabel AvatarCustomImagePropertyInfo = "custom-image"
type AttrOrigin AvatarCustomImagePropertyInfo = Avatar
attrGet = getAvatarCustomImage
attrSet = setAvatarCustomImage
attrTransfer _ v = do
unsafeCastTo Gdk.Paintable.Paintable v
attrConstruct = constructAvatarCustomImage
attrClear = clearAvatarCustomImage
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Adw.Objects.Avatar.customImage"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-adwaita-1.0.1/docs/GI-Adw-Objects-Avatar.html#g:attr:customImage"
})
#endif
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"
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)
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)
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.Adw.Objects.Avatar.iconName"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-adwaita-1.0.1/docs/GI-Adw-Objects-Avatar.html#g:attr:iconName"
})
#endif
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"
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
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.Adw.Objects.Avatar.showInitials"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-adwaita-1.0.1/docs/GI-Adw-Objects-Avatar.html#g:attr:showInitials"
})
#endif
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"
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
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.Adw.Objects.Avatar.size"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-adwaita-1.0.1/docs/GI-Adw-Objects-Avatar.html#g:attr:size"
})
#endif
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"
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)
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)
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.Adw.Objects.Avatar.text"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-adwaita-1.0.1/docs/GI-Adw-Objects-Avatar.html#g:attr:text"
})
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Avatar
type instance O.AttributeList Avatar = AvatarAttributeList
type AvatarAttributeList = ('[ '("accessibleRole", Gtk.Accessible.AccessibleAccessibleRolePropertyInfo), '("canFocus", Gtk.Widget.WidgetCanFocusPropertyInfo), '("canTarget", Gtk.Widget.WidgetCanTargetPropertyInfo), '("cssClasses", Gtk.Widget.WidgetCssClassesPropertyInfo), '("cssName", Gtk.Widget.WidgetCssNamePropertyInfo), '("cursor", Gtk.Widget.WidgetCursorPropertyInfo), '("customImage", AvatarCustomImagePropertyInfo), '("focusOnClick", Gtk.Widget.WidgetFocusOnClickPropertyInfo), '("focusable", Gtk.Widget.WidgetFocusablePropertyInfo), '("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), '("layoutManager", Gtk.Widget.WidgetLayoutManagerPropertyInfo), '("marginBottom", Gtk.Widget.WidgetMarginBottomPropertyInfo), '("marginEnd", Gtk.Widget.WidgetMarginEndPropertyInfo), '("marginStart", Gtk.Widget.WidgetMarginStartPropertyInfo), '("marginTop", Gtk.Widget.WidgetMarginTopPropertyInfo), '("name", Gtk.Widget.WidgetNamePropertyInfo), '("opacity", Gtk.Widget.WidgetOpacityPropertyInfo), '("overflow", Gtk.Widget.WidgetOverflowPropertyInfo), '("parent", Gtk.Widget.WidgetParentPropertyInfo), '("receivesDefault", Gtk.Widget.WidgetReceivesDefaultPropertyInfo), '("root", Gtk.Widget.WidgetRootPropertyInfo), '("scaleFactor", Gtk.Widget.WidgetScaleFactorPropertyInfo), '("sensitive", Gtk.Widget.WidgetSensitivePropertyInfo), '("showInitials", AvatarShowInitialsPropertyInfo), '("size", AvatarSizePropertyInfo), '("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)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
avatarCustomImage :: AttrLabelProxy "customImage"
avatarCustomImage = AttrLabelProxy
avatarIconName :: AttrLabelProxy "iconName"
avatarIconName = 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 = ('[ '("destroy", Gtk.Widget.WidgetDestroySignalInfo), '("directionChanged", Gtk.Widget.WidgetDirectionChangedSignalInfo), '("hide", Gtk.Widget.WidgetHideSignalInfo), '("keynavFailed", Gtk.Widget.WidgetKeynavFailedSignalInfo), '("map", Gtk.Widget.WidgetMapSignalInfo), '("mnemonicActivate", Gtk.Widget.WidgetMnemonicActivateSignalInfo), '("moveFocus", Gtk.Widget.WidgetMoveFocusSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("queryTooltip", Gtk.Widget.WidgetQueryTooltipSignalInfo), '("realize", Gtk.Widget.WidgetRealizeSignalInfo), '("show", Gtk.Widget.WidgetShowSignalInfo), '("stateFlagsChanged", Gtk.Widget.WidgetStateFlagsChangedSignalInfo), '("unmap", Gtk.Widget.WidgetUnmapSignalInfo), '("unrealize", Gtk.Widget.WidgetUnrealizeSignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "adw_avatar_new" adw_avatar_new ::
Int32 ->
CString ->
CInt ->
IO (Ptr Avatar)
avatarNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
Int32
-> Maybe (T.Text)
-> Bool
-> m 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)
adw_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
foreign import ccall "adw_avatar_draw_to_texture" adw_avatar_draw_to_texture ::
Ptr Avatar ->
Int32 ->
IO (Ptr Gdk.Texture.Texture)
avatarDrawToTexture ::
(B.CallStack.HasCallStack, MonadIO m, IsAvatar a) =>
a
-> Int32
-> m Gdk.Texture.Texture
avatarDrawToTexture :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAvatar a) =>
a -> Int32 -> m Texture
avatarDrawToTexture a
self Int32
scaleFactor = IO Texture -> m Texture
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Texture -> m Texture) -> IO Texture -> m Texture
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 Texture
result <- Ptr Avatar -> Int32 -> IO (Ptr Texture)
adw_avatar_draw_to_texture Ptr Avatar
self' Int32
scaleFactor
Text -> Ptr Texture -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"avatarDrawToTexture" Ptr Texture
result
Texture
result' <- ((ManagedPtr Texture -> Texture) -> Ptr Texture -> IO Texture
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Texture -> Texture
Gdk.Texture.Texture) Ptr Texture
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Texture -> IO Texture
forall (m :: * -> *) a. Monad m => a -> m a
return Texture
result'
#if defined(ENABLE_OVERLOADING)
data AvatarDrawToTextureMethodInfo
instance (signature ~ (Int32 -> m Gdk.Texture.Texture), MonadIO m, IsAvatar a) => O.OverloadedMethod AvatarDrawToTextureMethodInfo a signature where
overloadedMethod = avatarDrawToTexture
instance O.OverloadedMethodInfo AvatarDrawToTextureMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Adw.Objects.Avatar.avatarDrawToTexture",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-adwaita-1.0.1/docs/GI-Adw-Objects-Avatar.html#v:avatarDrawToTexture"
})
#endif
foreign import ccall "adw_avatar_get_custom_image" adw_avatar_get_custom_image ::
Ptr Avatar ->
IO (Ptr Gdk.Paintable.Paintable)
avatarGetCustomImage ::
(B.CallStack.HasCallStack, MonadIO m, IsAvatar a) =>
a
-> m (Maybe Gdk.Paintable.Paintable)
avatarGetCustomImage :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAvatar a) =>
a -> m (Maybe Paintable)
avatarGetCustomImage a
self = IO (Maybe Paintable) -> m (Maybe Paintable)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Paintable) -> m (Maybe Paintable))
-> IO (Maybe Paintable) -> m (Maybe Paintable)
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 Paintable
result <- Ptr Avatar -> IO (Ptr Paintable)
adw_avatar_get_custom_image Ptr Avatar
self'
Maybe Paintable
maybeResult <- Ptr Paintable
-> (Ptr Paintable -> IO Paintable) -> IO (Maybe Paintable)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Paintable
result ((Ptr Paintable -> IO Paintable) -> IO (Maybe Paintable))
-> (Ptr Paintable -> IO Paintable) -> IO (Maybe Paintable)
forall a b. (a -> b) -> a -> b
$ \Ptr Paintable
result' -> do
Paintable
result'' <- ((ManagedPtr Paintable -> Paintable)
-> Ptr Paintable -> IO Paintable
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Paintable -> Paintable
Gdk.Paintable.Paintable) Ptr Paintable
result'
Paintable -> IO Paintable
forall (m :: * -> *) a. Monad m => a -> m a
return Paintable
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Maybe Paintable -> IO (Maybe Paintable)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Paintable
maybeResult
#if defined(ENABLE_OVERLOADING)
data AvatarGetCustomImageMethodInfo
instance (signature ~ (m (Maybe Gdk.Paintable.Paintable)), MonadIO m, IsAvatar a) => O.OverloadedMethod AvatarGetCustomImageMethodInfo a signature where
overloadedMethod = avatarGetCustomImage
instance O.OverloadedMethodInfo AvatarGetCustomImageMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Adw.Objects.Avatar.avatarGetCustomImage",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-adwaita-1.0.1/docs/GI-Adw-Objects-Avatar.html#v:avatarGetCustomImage"
})
#endif
foreign import ccall "adw_avatar_get_icon_name" adw_avatar_get_icon_name ::
Ptr Avatar ->
IO CString
avatarGetIconName ::
(B.CallStack.HasCallStack, MonadIO m, IsAvatar a) =>
a
-> m (Maybe T.Text)
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)
adw_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.Adw.Objects.Avatar.avatarGetIconName",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-adwaita-1.0.1/docs/GI-Adw-Objects-Avatar.html#v:avatarGetIconName"
})
#endif
foreign import ccall "adw_avatar_get_show_initials" adw_avatar_get_show_initials ::
Ptr Avatar ->
IO CInt
avatarGetShowInitials ::
(B.CallStack.HasCallStack, MonadIO m, IsAvatar a) =>
a
-> m Bool
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
adw_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.Adw.Objects.Avatar.avatarGetShowInitials",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-adwaita-1.0.1/docs/GI-Adw-Objects-Avatar.html#v:avatarGetShowInitials"
})
#endif
foreign import ccall "adw_avatar_get_size" adw_avatar_get_size ::
Ptr Avatar ->
IO Int32
avatarGetSize ::
(B.CallStack.HasCallStack, MonadIO m, IsAvatar a) =>
a
-> m Int32
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
adw_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.Adw.Objects.Avatar.avatarGetSize",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-adwaita-1.0.1/docs/GI-Adw-Objects-Avatar.html#v:avatarGetSize"
})
#endif
foreign import ccall "adw_avatar_get_text" adw_avatar_get_text ::
Ptr Avatar ->
IO CString
avatarGetText ::
(B.CallStack.HasCallStack, MonadIO m, IsAvatar a) =>
a
-> m (Maybe T.Text)
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)
adw_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.Adw.Objects.Avatar.avatarGetText",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-adwaita-1.0.1/docs/GI-Adw-Objects-Avatar.html#v:avatarGetText"
})
#endif
foreign import ccall "adw_avatar_set_custom_image" adw_avatar_set_custom_image ::
Ptr Avatar ->
Ptr Gdk.Paintable.Paintable ->
IO ()
avatarSetCustomImage ::
(B.CallStack.HasCallStack, MonadIO m, IsAvatar a, Gdk.Paintable.IsPaintable b) =>
a
-> Maybe (b)
-> m ()
avatarSetCustomImage :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsAvatar a, IsPaintable b) =>
a -> Maybe b -> m ()
avatarSetCustomImage a
self Maybe b
customImage = 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 Paintable
maybeCustomImage <- case Maybe b
customImage of
Maybe b
Nothing -> Ptr Paintable -> IO (Ptr Paintable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Paintable
forall a. Ptr a
nullPtr
Just b
jCustomImage -> do
Ptr Paintable
jCustomImage' <- b -> IO (Ptr Paintable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCustomImage
Ptr Paintable -> IO (Ptr Paintable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Paintable
jCustomImage'
Ptr Avatar -> Ptr Paintable -> IO ()
adw_avatar_set_custom_image Ptr Avatar
self' Ptr Paintable
maybeCustomImage
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
customImage b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data AvatarSetCustomImageMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsAvatar a, Gdk.Paintable.IsPaintable b) => O.OverloadedMethod AvatarSetCustomImageMethodInfo a signature where
overloadedMethod = avatarSetCustomImage
instance O.OverloadedMethodInfo AvatarSetCustomImageMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Adw.Objects.Avatar.avatarSetCustomImage",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-adwaita-1.0.1/docs/GI-Adw-Objects-Avatar.html#v:avatarSetCustomImage"
})
#endif
foreign import ccall "adw_avatar_set_icon_name" adw_avatar_set_icon_name ::
Ptr Avatar ->
CString ->
IO ()
avatarSetIconName ::
(B.CallStack.HasCallStack, MonadIO m, IsAvatar a) =>
a
-> Maybe (T.Text)
-> 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 ()
adw_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.Adw.Objects.Avatar.avatarSetIconName",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-adwaita-1.0.1/docs/GI-Adw-Objects-Avatar.html#v:avatarSetIconName"
})
#endif
foreign import ccall "adw_avatar_set_show_initials" adw_avatar_set_show_initials ::
Ptr Avatar ->
CInt ->
IO ()
avatarSetShowInitials ::
(B.CallStack.HasCallStack, MonadIO m, IsAvatar a) =>
a
-> Bool
-> 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 ()
adw_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.Adw.Objects.Avatar.avatarSetShowInitials",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-adwaita-1.0.1/docs/GI-Adw-Objects-Avatar.html#v:avatarSetShowInitials"
})
#endif
foreign import ccall "adw_avatar_set_size" adw_avatar_set_size ::
Ptr Avatar ->
Int32 ->
IO ()
avatarSetSize ::
(B.CallStack.HasCallStack, MonadIO m, IsAvatar a) =>
a
-> Int32
-> 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 ()
adw_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.Adw.Objects.Avatar.avatarSetSize",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-adwaita-1.0.1/docs/GI-Adw-Objects-Avatar.html#v:avatarSetSize"
})
#endif
foreign import ccall "adw_avatar_set_text" adw_avatar_set_text ::
Ptr Avatar ->
CString ->
IO ()
avatarSetText ::
(B.CallStack.HasCallStack, MonadIO m, IsAvatar a) =>
a
-> Maybe (T.Text)
-> 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 ()
adw_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.Adw.Objects.Avatar.avatarSetText",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-adwaita-1.0.1/docs/GI-Adw-Objects-Avatar.html#v:avatarSetText"
})
#endif