{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.Objects.Picture
(
Picture(..) ,
IsPicture ,
toPicture ,
#if defined(ENABLE_OVERLOADING)
ResolvePictureMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
PictureGetAlternativeTextMethodInfo ,
#endif
pictureGetAlternativeText ,
#if defined(ENABLE_OVERLOADING)
PictureGetCanShrinkMethodInfo ,
#endif
pictureGetCanShrink ,
#if defined(ENABLE_OVERLOADING)
PictureGetContentFitMethodInfo ,
#endif
pictureGetContentFit ,
#if defined(ENABLE_OVERLOADING)
PictureGetFileMethodInfo ,
#endif
pictureGetFile ,
#if defined(ENABLE_OVERLOADING)
PictureGetKeepAspectRatioMethodInfo ,
#endif
pictureGetKeepAspectRatio ,
#if defined(ENABLE_OVERLOADING)
PictureGetPaintableMethodInfo ,
#endif
pictureGetPaintable ,
pictureNew ,
pictureNewForFile ,
pictureNewForFilename ,
pictureNewForPaintable ,
pictureNewForPixbuf ,
pictureNewForResource ,
#if defined(ENABLE_OVERLOADING)
PictureSetAlternativeTextMethodInfo ,
#endif
pictureSetAlternativeText ,
#if defined(ENABLE_OVERLOADING)
PictureSetCanShrinkMethodInfo ,
#endif
pictureSetCanShrink ,
#if defined(ENABLE_OVERLOADING)
PictureSetContentFitMethodInfo ,
#endif
pictureSetContentFit ,
#if defined(ENABLE_OVERLOADING)
PictureSetFileMethodInfo ,
#endif
pictureSetFile ,
#if defined(ENABLE_OVERLOADING)
PictureSetFilenameMethodInfo ,
#endif
pictureSetFilename ,
#if defined(ENABLE_OVERLOADING)
PictureSetKeepAspectRatioMethodInfo ,
#endif
pictureSetKeepAspectRatio ,
#if defined(ENABLE_OVERLOADING)
PictureSetPaintableMethodInfo ,
#endif
pictureSetPaintable ,
#if defined(ENABLE_OVERLOADING)
PictureSetPixbufMethodInfo ,
#endif
pictureSetPixbuf ,
#if defined(ENABLE_OVERLOADING)
PictureSetResourceMethodInfo ,
#endif
pictureSetResource ,
#if defined(ENABLE_OVERLOADING)
PictureAlternativeTextPropertyInfo ,
#endif
clearPictureAlternativeText ,
constructPictureAlternativeText ,
getPictureAlternativeText ,
#if defined(ENABLE_OVERLOADING)
pictureAlternativeText ,
#endif
setPictureAlternativeText ,
#if defined(ENABLE_OVERLOADING)
PictureCanShrinkPropertyInfo ,
#endif
constructPictureCanShrink ,
getPictureCanShrink ,
#if defined(ENABLE_OVERLOADING)
pictureCanShrink ,
#endif
setPictureCanShrink ,
#if defined(ENABLE_OVERLOADING)
PictureContentFitPropertyInfo ,
#endif
constructPictureContentFit ,
getPictureContentFit ,
#if defined(ENABLE_OVERLOADING)
pictureContentFit ,
#endif
setPictureContentFit ,
#if defined(ENABLE_OVERLOADING)
PictureFilePropertyInfo ,
#endif
clearPictureFile ,
constructPictureFile ,
getPictureFile ,
#if defined(ENABLE_OVERLOADING)
pictureFile ,
#endif
setPictureFile ,
#if defined(ENABLE_OVERLOADING)
PictureKeepAspectRatioPropertyInfo ,
#endif
constructPictureKeepAspectRatio ,
getPictureKeepAspectRatio ,
#if defined(ENABLE_OVERLOADING)
pictureKeepAspectRatio ,
#endif
setPictureKeepAspectRatio ,
#if defined(ENABLE_OVERLOADING)
PicturePaintablePropertyInfo ,
#endif
clearPicturePaintable ,
constructPicturePaintable ,
getPicturePaintable ,
#if defined(ENABLE_OVERLOADING)
picturePaintable ,
#endif
setPicturePaintable ,
) 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.GHashTable as B.GHT
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.Kind as DK
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.GdkPixbuf.Objects.Pixbuf as GdkPixbuf.Pixbuf
import qualified GI.Gio.Interfaces.File as Gio.File
import {-# SOURCE #-} qualified GI.Gtk.Enums as Gtk.Enums
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Accessible as Gtk.Accessible
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Buildable as Gtk.Buildable
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.ConstraintTarget as Gtk.ConstraintTarget
import {-# SOURCE #-} qualified GI.Gtk.Objects.Widget as Gtk.Widget
newtype Picture = Picture (SP.ManagedPtr Picture)
deriving (Picture -> Picture -> Bool
(Picture -> Picture -> Bool)
-> (Picture -> Picture -> Bool) -> Eq Picture
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Picture -> Picture -> Bool
== :: Picture -> Picture -> Bool
$c/= :: Picture -> Picture -> Bool
/= :: Picture -> Picture -> Bool
Eq)
instance SP.ManagedPtrNewtype Picture where
toManagedPtr :: Picture -> ManagedPtr Picture
toManagedPtr (Picture ManagedPtr Picture
p) = ManagedPtr Picture
p
foreign import ccall "gtk_picture_get_type"
c_gtk_picture_get_type :: IO B.Types.GType
instance B.Types.TypedObject Picture where
glibType :: IO GType
glibType = IO GType
c_gtk_picture_get_type
instance B.Types.GObject Picture
class (SP.GObject o, O.IsDescendantOf Picture o) => IsPicture o
instance (SP.GObject o, O.IsDescendantOf Picture o) => IsPicture o
instance O.HasParentTypes Picture
type instance O.ParentTypes Picture = '[Gtk.Widget.Widget, GObject.Object.Object, Gtk.Accessible.Accessible, Gtk.Buildable.Buildable, Gtk.ConstraintTarget.ConstraintTarget]
toPicture :: (MIO.MonadIO m, IsPicture o) => o -> m Picture
toPicture :: forall (m :: * -> *) o. (MonadIO m, IsPicture o) => o -> m Picture
toPicture = IO Picture -> m Picture
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Picture -> m Picture) -> (o -> IO Picture) -> o -> m Picture
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr Picture -> Picture) -> o -> IO Picture
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr Picture -> Picture
Picture
instance B.GValue.IsGValue (Maybe Picture) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gtk_picture_get_type
gvalueSet_ :: Ptr GValue -> Maybe Picture -> IO ()
gvalueSet_ Ptr GValue
gv Maybe Picture
P.Nothing = Ptr GValue -> Ptr Picture -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr Picture
forall a. Ptr a
FP.nullPtr :: FP.Ptr Picture)
gvalueSet_ Ptr GValue
gv (P.Just Picture
obj) = Picture -> (Ptr Picture -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Picture
obj (Ptr GValue -> Ptr Picture -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe Picture)
gvalueGet_ Ptr GValue
gv = do
Ptr Picture
ptr <- Ptr GValue -> IO (Ptr Picture)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr Picture)
if Ptr Picture
ptr Ptr Picture -> Ptr Picture -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr Picture
forall a. Ptr a
FP.nullPtr
then Picture -> Maybe Picture
forall a. a -> Maybe a
P.Just (Picture -> Maybe Picture) -> IO Picture -> IO (Maybe Picture)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr Picture -> Picture) -> Ptr Picture -> IO Picture
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr Picture -> Picture
Picture Ptr Picture
ptr
else Maybe Picture -> IO (Maybe Picture)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Picture
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolvePictureMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolvePictureMethod "actionSetEnabled" o = Gtk.Widget.WidgetActionSetEnabledMethodInfo
ResolvePictureMethod "activate" o = Gtk.Widget.WidgetActivateMethodInfo
ResolvePictureMethod "activateAction" o = Gtk.Widget.WidgetActivateActionMethodInfo
ResolvePictureMethod "activateDefault" o = Gtk.Widget.WidgetActivateDefaultMethodInfo
ResolvePictureMethod "addController" o = Gtk.Widget.WidgetAddControllerMethodInfo
ResolvePictureMethod "addCssClass" o = Gtk.Widget.WidgetAddCssClassMethodInfo
ResolvePictureMethod "addMnemonicLabel" o = Gtk.Widget.WidgetAddMnemonicLabelMethodInfo
ResolvePictureMethod "addTickCallback" o = Gtk.Widget.WidgetAddTickCallbackMethodInfo
ResolvePictureMethod "allocate" o = Gtk.Widget.WidgetAllocateMethodInfo
ResolvePictureMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolvePictureMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolvePictureMethod "childFocus" o = Gtk.Widget.WidgetChildFocusMethodInfo
ResolvePictureMethod "computeBounds" o = Gtk.Widget.WidgetComputeBoundsMethodInfo
ResolvePictureMethod "computeExpand" o = Gtk.Widget.WidgetComputeExpandMethodInfo
ResolvePictureMethod "computePoint" o = Gtk.Widget.WidgetComputePointMethodInfo
ResolvePictureMethod "computeTransform" o = Gtk.Widget.WidgetComputeTransformMethodInfo
ResolvePictureMethod "contains" o = Gtk.Widget.WidgetContainsMethodInfo
ResolvePictureMethod "createPangoContext" o = Gtk.Widget.WidgetCreatePangoContextMethodInfo
ResolvePictureMethod "createPangoLayout" o = Gtk.Widget.WidgetCreatePangoLayoutMethodInfo
ResolvePictureMethod "disposeTemplate" o = Gtk.Widget.WidgetDisposeTemplateMethodInfo
ResolvePictureMethod "dragCheckThreshold" o = Gtk.Widget.WidgetDragCheckThresholdMethodInfo
ResolvePictureMethod "errorBell" o = Gtk.Widget.WidgetErrorBellMethodInfo
ResolvePictureMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolvePictureMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolvePictureMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolvePictureMethod "grabFocus" o = Gtk.Widget.WidgetGrabFocusMethodInfo
ResolvePictureMethod "hasCssClass" o = Gtk.Widget.WidgetHasCssClassMethodInfo
ResolvePictureMethod "hasDefault" o = Gtk.Widget.WidgetHasDefaultMethodInfo
ResolvePictureMethod "hasFocus" o = Gtk.Widget.WidgetHasFocusMethodInfo
ResolvePictureMethod "hasVisibleFocus" o = Gtk.Widget.WidgetHasVisibleFocusMethodInfo
ResolvePictureMethod "hide" o = Gtk.Widget.WidgetHideMethodInfo
ResolvePictureMethod "inDestruction" o = Gtk.Widget.WidgetInDestructionMethodInfo
ResolvePictureMethod "initTemplate" o = Gtk.Widget.WidgetInitTemplateMethodInfo
ResolvePictureMethod "insertActionGroup" o = Gtk.Widget.WidgetInsertActionGroupMethodInfo
ResolvePictureMethod "insertAfter" o = Gtk.Widget.WidgetInsertAfterMethodInfo
ResolvePictureMethod "insertBefore" o = Gtk.Widget.WidgetInsertBeforeMethodInfo
ResolvePictureMethod "isAncestor" o = Gtk.Widget.WidgetIsAncestorMethodInfo
ResolvePictureMethod "isDrawable" o = Gtk.Widget.WidgetIsDrawableMethodInfo
ResolvePictureMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolvePictureMethod "isFocus" o = Gtk.Widget.WidgetIsFocusMethodInfo
ResolvePictureMethod "isSensitive" o = Gtk.Widget.WidgetIsSensitiveMethodInfo
ResolvePictureMethod "isVisible" o = Gtk.Widget.WidgetIsVisibleMethodInfo
ResolvePictureMethod "keynavFailed" o = Gtk.Widget.WidgetKeynavFailedMethodInfo
ResolvePictureMethod "listMnemonicLabels" o = Gtk.Widget.WidgetListMnemonicLabelsMethodInfo
ResolvePictureMethod "map" o = Gtk.Widget.WidgetMapMethodInfo
ResolvePictureMethod "measure" o = Gtk.Widget.WidgetMeasureMethodInfo
ResolvePictureMethod "mnemonicActivate" o = Gtk.Widget.WidgetMnemonicActivateMethodInfo
ResolvePictureMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolvePictureMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolvePictureMethod "observeChildren" o = Gtk.Widget.WidgetObserveChildrenMethodInfo
ResolvePictureMethod "observeControllers" o = Gtk.Widget.WidgetObserveControllersMethodInfo
ResolvePictureMethod "pick" o = Gtk.Widget.WidgetPickMethodInfo
ResolvePictureMethod "queueAllocate" o = Gtk.Widget.WidgetQueueAllocateMethodInfo
ResolvePictureMethod "queueDraw" o = Gtk.Widget.WidgetQueueDrawMethodInfo
ResolvePictureMethod "queueResize" o = Gtk.Widget.WidgetQueueResizeMethodInfo
ResolvePictureMethod "realize" o = Gtk.Widget.WidgetRealizeMethodInfo
ResolvePictureMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolvePictureMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolvePictureMethod "removeController" o = Gtk.Widget.WidgetRemoveControllerMethodInfo
ResolvePictureMethod "removeCssClass" o = Gtk.Widget.WidgetRemoveCssClassMethodInfo
ResolvePictureMethod "removeMnemonicLabel" o = Gtk.Widget.WidgetRemoveMnemonicLabelMethodInfo
ResolvePictureMethod "removeTickCallback" o = Gtk.Widget.WidgetRemoveTickCallbackMethodInfo
ResolvePictureMethod "resetProperty" o = Gtk.Accessible.AccessibleResetPropertyMethodInfo
ResolvePictureMethod "resetRelation" o = Gtk.Accessible.AccessibleResetRelationMethodInfo
ResolvePictureMethod "resetState" o = Gtk.Accessible.AccessibleResetStateMethodInfo
ResolvePictureMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolvePictureMethod "shouldLayout" o = Gtk.Widget.WidgetShouldLayoutMethodInfo
ResolvePictureMethod "show" o = Gtk.Widget.WidgetShowMethodInfo
ResolvePictureMethod "sizeAllocate" o = Gtk.Widget.WidgetSizeAllocateMethodInfo
ResolvePictureMethod "snapshotChild" o = Gtk.Widget.WidgetSnapshotChildMethodInfo
ResolvePictureMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolvePictureMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolvePictureMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolvePictureMethod "translateCoordinates" o = Gtk.Widget.WidgetTranslateCoordinatesMethodInfo
ResolvePictureMethod "triggerTooltipQuery" o = Gtk.Widget.WidgetTriggerTooltipQueryMethodInfo
ResolvePictureMethod "unmap" o = Gtk.Widget.WidgetUnmapMethodInfo
ResolvePictureMethod "unparent" o = Gtk.Widget.WidgetUnparentMethodInfo
ResolvePictureMethod "unrealize" o = Gtk.Widget.WidgetUnrealizeMethodInfo
ResolvePictureMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolvePictureMethod "unsetStateFlags" o = Gtk.Widget.WidgetUnsetStateFlagsMethodInfo
ResolvePictureMethod "updateNextAccessibleSibling" o = Gtk.Accessible.AccessibleUpdateNextAccessibleSiblingMethodInfo
ResolvePictureMethod "updateProperty" o = Gtk.Accessible.AccessibleUpdatePropertyMethodInfo
ResolvePictureMethod "updateRelation" o = Gtk.Accessible.AccessibleUpdateRelationMethodInfo
ResolvePictureMethod "updateState" o = Gtk.Accessible.AccessibleUpdateStateMethodInfo
ResolvePictureMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolvePictureMethod "getAccessibleParent" o = Gtk.Accessible.AccessibleGetAccessibleParentMethodInfo
ResolvePictureMethod "getAccessibleRole" o = Gtk.Accessible.AccessibleGetAccessibleRoleMethodInfo
ResolvePictureMethod "getAllocatedBaseline" o = Gtk.Widget.WidgetGetAllocatedBaselineMethodInfo
ResolvePictureMethod "getAllocatedHeight" o = Gtk.Widget.WidgetGetAllocatedHeightMethodInfo
ResolvePictureMethod "getAllocatedWidth" o = Gtk.Widget.WidgetGetAllocatedWidthMethodInfo
ResolvePictureMethod "getAllocation" o = Gtk.Widget.WidgetGetAllocationMethodInfo
ResolvePictureMethod "getAlternativeText" o = PictureGetAlternativeTextMethodInfo
ResolvePictureMethod "getAncestor" o = Gtk.Widget.WidgetGetAncestorMethodInfo
ResolvePictureMethod "getAtContext" o = Gtk.Accessible.AccessibleGetAtContextMethodInfo
ResolvePictureMethod "getBounds" o = Gtk.Accessible.AccessibleGetBoundsMethodInfo
ResolvePictureMethod "getBuildableId" o = Gtk.Buildable.BuildableGetBuildableIdMethodInfo
ResolvePictureMethod "getCanFocus" o = Gtk.Widget.WidgetGetCanFocusMethodInfo
ResolvePictureMethod "getCanShrink" o = PictureGetCanShrinkMethodInfo
ResolvePictureMethod "getCanTarget" o = Gtk.Widget.WidgetGetCanTargetMethodInfo
ResolvePictureMethod "getChildVisible" o = Gtk.Widget.WidgetGetChildVisibleMethodInfo
ResolvePictureMethod "getClipboard" o = Gtk.Widget.WidgetGetClipboardMethodInfo
ResolvePictureMethod "getColor" o = Gtk.Widget.WidgetGetColorMethodInfo
ResolvePictureMethod "getContentFit" o = PictureGetContentFitMethodInfo
ResolvePictureMethod "getCssClasses" o = Gtk.Widget.WidgetGetCssClassesMethodInfo
ResolvePictureMethod "getCssName" o = Gtk.Widget.WidgetGetCssNameMethodInfo
ResolvePictureMethod "getCursor" o = Gtk.Widget.WidgetGetCursorMethodInfo
ResolvePictureMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolvePictureMethod "getDirection" o = Gtk.Widget.WidgetGetDirectionMethodInfo
ResolvePictureMethod "getDisplay" o = Gtk.Widget.WidgetGetDisplayMethodInfo
ResolvePictureMethod "getFile" o = PictureGetFileMethodInfo
ResolvePictureMethod "getFirstAccessibleChild" o = Gtk.Accessible.AccessibleGetFirstAccessibleChildMethodInfo
ResolvePictureMethod "getFirstChild" o = Gtk.Widget.WidgetGetFirstChildMethodInfo
ResolvePictureMethod "getFocusChild" o = Gtk.Widget.WidgetGetFocusChildMethodInfo
ResolvePictureMethod "getFocusOnClick" o = Gtk.Widget.WidgetGetFocusOnClickMethodInfo
ResolvePictureMethod "getFocusable" o = Gtk.Widget.WidgetGetFocusableMethodInfo
ResolvePictureMethod "getFontMap" o = Gtk.Widget.WidgetGetFontMapMethodInfo
ResolvePictureMethod "getFontOptions" o = Gtk.Widget.WidgetGetFontOptionsMethodInfo
ResolvePictureMethod "getFrameClock" o = Gtk.Widget.WidgetGetFrameClockMethodInfo
ResolvePictureMethod "getHalign" o = Gtk.Widget.WidgetGetHalignMethodInfo
ResolvePictureMethod "getHasTooltip" o = Gtk.Widget.WidgetGetHasTooltipMethodInfo
ResolvePictureMethod "getHeight" o = Gtk.Widget.WidgetGetHeightMethodInfo
ResolvePictureMethod "getHexpand" o = Gtk.Widget.WidgetGetHexpandMethodInfo
ResolvePictureMethod "getHexpandSet" o = Gtk.Widget.WidgetGetHexpandSetMethodInfo
ResolvePictureMethod "getKeepAspectRatio" o = PictureGetKeepAspectRatioMethodInfo
ResolvePictureMethod "getLastChild" o = Gtk.Widget.WidgetGetLastChildMethodInfo
ResolvePictureMethod "getLayoutManager" o = Gtk.Widget.WidgetGetLayoutManagerMethodInfo
ResolvePictureMethod "getMapped" o = Gtk.Widget.WidgetGetMappedMethodInfo
ResolvePictureMethod "getMarginBottom" o = Gtk.Widget.WidgetGetMarginBottomMethodInfo
ResolvePictureMethod "getMarginEnd" o = Gtk.Widget.WidgetGetMarginEndMethodInfo
ResolvePictureMethod "getMarginStart" o = Gtk.Widget.WidgetGetMarginStartMethodInfo
ResolvePictureMethod "getMarginTop" o = Gtk.Widget.WidgetGetMarginTopMethodInfo
ResolvePictureMethod "getName" o = Gtk.Widget.WidgetGetNameMethodInfo
ResolvePictureMethod "getNative" o = Gtk.Widget.WidgetGetNativeMethodInfo
ResolvePictureMethod "getNextAccessibleSibling" o = Gtk.Accessible.AccessibleGetNextAccessibleSiblingMethodInfo
ResolvePictureMethod "getNextSibling" o = Gtk.Widget.WidgetGetNextSiblingMethodInfo
ResolvePictureMethod "getOpacity" o = Gtk.Widget.WidgetGetOpacityMethodInfo
ResolvePictureMethod "getOverflow" o = Gtk.Widget.WidgetGetOverflowMethodInfo
ResolvePictureMethod "getPaintable" o = PictureGetPaintableMethodInfo
ResolvePictureMethod "getPangoContext" o = Gtk.Widget.WidgetGetPangoContextMethodInfo
ResolvePictureMethod "getParent" o = Gtk.Widget.WidgetGetParentMethodInfo
ResolvePictureMethod "getPlatformState" o = Gtk.Accessible.AccessibleGetPlatformStateMethodInfo
ResolvePictureMethod "getPreferredSize" o = Gtk.Widget.WidgetGetPreferredSizeMethodInfo
ResolvePictureMethod "getPrevSibling" o = Gtk.Widget.WidgetGetPrevSiblingMethodInfo
ResolvePictureMethod "getPrimaryClipboard" o = Gtk.Widget.WidgetGetPrimaryClipboardMethodInfo
ResolvePictureMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolvePictureMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolvePictureMethod "getRealized" o = Gtk.Widget.WidgetGetRealizedMethodInfo
ResolvePictureMethod "getReceivesDefault" o = Gtk.Widget.WidgetGetReceivesDefaultMethodInfo
ResolvePictureMethod "getRequestMode" o = Gtk.Widget.WidgetGetRequestModeMethodInfo
ResolvePictureMethod "getRoot" o = Gtk.Widget.WidgetGetRootMethodInfo
ResolvePictureMethod "getScaleFactor" o = Gtk.Widget.WidgetGetScaleFactorMethodInfo
ResolvePictureMethod "getSensitive" o = Gtk.Widget.WidgetGetSensitiveMethodInfo
ResolvePictureMethod "getSettings" o = Gtk.Widget.WidgetGetSettingsMethodInfo
ResolvePictureMethod "getSize" o = Gtk.Widget.WidgetGetSizeMethodInfo
ResolvePictureMethod "getSizeRequest" o = Gtk.Widget.WidgetGetSizeRequestMethodInfo
ResolvePictureMethod "getStateFlags" o = Gtk.Widget.WidgetGetStateFlagsMethodInfo
ResolvePictureMethod "getStyleContext" o = Gtk.Widget.WidgetGetStyleContextMethodInfo
ResolvePictureMethod "getTemplateChild" o = Gtk.Widget.WidgetGetTemplateChildMethodInfo
ResolvePictureMethod "getTooltipMarkup" o = Gtk.Widget.WidgetGetTooltipMarkupMethodInfo
ResolvePictureMethod "getTooltipText" o = Gtk.Widget.WidgetGetTooltipTextMethodInfo
ResolvePictureMethod "getValign" o = Gtk.Widget.WidgetGetValignMethodInfo
ResolvePictureMethod "getVexpand" o = Gtk.Widget.WidgetGetVexpandMethodInfo
ResolvePictureMethod "getVexpandSet" o = Gtk.Widget.WidgetGetVexpandSetMethodInfo
ResolvePictureMethod "getVisible" o = Gtk.Widget.WidgetGetVisibleMethodInfo
ResolvePictureMethod "getWidth" o = Gtk.Widget.WidgetGetWidthMethodInfo
ResolvePictureMethod "setAccessibleParent" o = Gtk.Accessible.AccessibleSetAccessibleParentMethodInfo
ResolvePictureMethod "setAlternativeText" o = PictureSetAlternativeTextMethodInfo
ResolvePictureMethod "setCanFocus" o = Gtk.Widget.WidgetSetCanFocusMethodInfo
ResolvePictureMethod "setCanShrink" o = PictureSetCanShrinkMethodInfo
ResolvePictureMethod "setCanTarget" o = Gtk.Widget.WidgetSetCanTargetMethodInfo
ResolvePictureMethod "setChildVisible" o = Gtk.Widget.WidgetSetChildVisibleMethodInfo
ResolvePictureMethod "setContentFit" o = PictureSetContentFitMethodInfo
ResolvePictureMethod "setCssClasses" o = Gtk.Widget.WidgetSetCssClassesMethodInfo
ResolvePictureMethod "setCursor" o = Gtk.Widget.WidgetSetCursorMethodInfo
ResolvePictureMethod "setCursorFromName" o = Gtk.Widget.WidgetSetCursorFromNameMethodInfo
ResolvePictureMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolvePictureMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolvePictureMethod "setDirection" o = Gtk.Widget.WidgetSetDirectionMethodInfo
ResolvePictureMethod "setFile" o = PictureSetFileMethodInfo
ResolvePictureMethod "setFilename" o = PictureSetFilenameMethodInfo
ResolvePictureMethod "setFocusChild" o = Gtk.Widget.WidgetSetFocusChildMethodInfo
ResolvePictureMethod "setFocusOnClick" o = Gtk.Widget.WidgetSetFocusOnClickMethodInfo
ResolvePictureMethod "setFocusable" o = Gtk.Widget.WidgetSetFocusableMethodInfo
ResolvePictureMethod "setFontMap" o = Gtk.Widget.WidgetSetFontMapMethodInfo
ResolvePictureMethod "setFontOptions" o = Gtk.Widget.WidgetSetFontOptionsMethodInfo
ResolvePictureMethod "setHalign" o = Gtk.Widget.WidgetSetHalignMethodInfo
ResolvePictureMethod "setHasTooltip" o = Gtk.Widget.WidgetSetHasTooltipMethodInfo
ResolvePictureMethod "setHexpand" o = Gtk.Widget.WidgetSetHexpandMethodInfo
ResolvePictureMethod "setHexpandSet" o = Gtk.Widget.WidgetSetHexpandSetMethodInfo
ResolvePictureMethod "setKeepAspectRatio" o = PictureSetKeepAspectRatioMethodInfo
ResolvePictureMethod "setLayoutManager" o = Gtk.Widget.WidgetSetLayoutManagerMethodInfo
ResolvePictureMethod "setMarginBottom" o = Gtk.Widget.WidgetSetMarginBottomMethodInfo
ResolvePictureMethod "setMarginEnd" o = Gtk.Widget.WidgetSetMarginEndMethodInfo
ResolvePictureMethod "setMarginStart" o = Gtk.Widget.WidgetSetMarginStartMethodInfo
ResolvePictureMethod "setMarginTop" o = Gtk.Widget.WidgetSetMarginTopMethodInfo
ResolvePictureMethod "setName" o = Gtk.Widget.WidgetSetNameMethodInfo
ResolvePictureMethod "setOpacity" o = Gtk.Widget.WidgetSetOpacityMethodInfo
ResolvePictureMethod "setOverflow" o = Gtk.Widget.WidgetSetOverflowMethodInfo
ResolvePictureMethod "setPaintable" o = PictureSetPaintableMethodInfo
ResolvePictureMethod "setParent" o = Gtk.Widget.WidgetSetParentMethodInfo
ResolvePictureMethod "setPixbuf" o = PictureSetPixbufMethodInfo
ResolvePictureMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolvePictureMethod "setReceivesDefault" o = Gtk.Widget.WidgetSetReceivesDefaultMethodInfo
ResolvePictureMethod "setResource" o = PictureSetResourceMethodInfo
ResolvePictureMethod "setSensitive" o = Gtk.Widget.WidgetSetSensitiveMethodInfo
ResolvePictureMethod "setSizeRequest" o = Gtk.Widget.WidgetSetSizeRequestMethodInfo
ResolvePictureMethod "setStateFlags" o = Gtk.Widget.WidgetSetStateFlagsMethodInfo
ResolvePictureMethod "setTooltipMarkup" o = Gtk.Widget.WidgetSetTooltipMarkupMethodInfo
ResolvePictureMethod "setTooltipText" o = Gtk.Widget.WidgetSetTooltipTextMethodInfo
ResolvePictureMethod "setValign" o = Gtk.Widget.WidgetSetValignMethodInfo
ResolvePictureMethod "setVexpand" o = Gtk.Widget.WidgetSetVexpandMethodInfo
ResolvePictureMethod "setVexpandSet" o = Gtk.Widget.WidgetSetVexpandSetMethodInfo
ResolvePictureMethod "setVisible" o = Gtk.Widget.WidgetSetVisibleMethodInfo
ResolvePictureMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolvePictureMethod t Picture, O.OverloadedMethod info Picture p) => OL.IsLabel t (Picture -> 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 ~ ResolvePictureMethod t Picture, O.OverloadedMethod info Picture p, R.HasField t Picture p) => R.HasField t Picture p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolvePictureMethod t Picture, O.OverloadedMethodInfo info Picture) => OL.IsLabel t (O.MethodProxy info Picture) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
getPictureAlternativeText :: (MonadIO m, IsPicture o) => o -> m (Maybe T.Text)
getPictureAlternativeText :: forall (m :: * -> *) o.
(MonadIO m, IsPicture o) =>
o -> m (Maybe Text)
getPictureAlternativeText o
obj = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
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
"alternative-text"
setPictureAlternativeText :: (MonadIO m, IsPicture o) => o -> T.Text -> m ()
setPictureAlternativeText :: forall (m :: * -> *) o.
(MonadIO m, IsPicture o) =>
o -> Text -> m ()
setPictureAlternativeText o
obj Text
val = IO () -> m ()
forall a. IO a -> m a
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
"alternative-text" (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
val)
constructPictureAlternativeText :: (IsPicture o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructPictureAlternativeText :: forall o (m :: * -> *).
(IsPicture o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructPictureAlternativeText Text
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
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 a. IO a -> IO a
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
"alternative-text" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)
clearPictureAlternativeText :: (MonadIO m, IsPicture o) => o -> m ()
clearPictureAlternativeText :: forall (m :: * -> *) o. (MonadIO m, IsPicture o) => o -> m ()
clearPictureAlternativeText o
obj = IO () -> m ()
forall a. IO a -> m a
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
"alternative-text" (Maybe Text
forall a. Maybe a
Nothing :: Maybe T.Text)
#if defined(ENABLE_OVERLOADING)
data PictureAlternativeTextPropertyInfo
instance AttrInfo PictureAlternativeTextPropertyInfo where
type AttrAllowedOps PictureAlternativeTextPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint PictureAlternativeTextPropertyInfo = IsPicture
type AttrSetTypeConstraint PictureAlternativeTextPropertyInfo = (~) T.Text
type AttrTransferTypeConstraint PictureAlternativeTextPropertyInfo = (~) T.Text
type AttrTransferType PictureAlternativeTextPropertyInfo = T.Text
type AttrGetType PictureAlternativeTextPropertyInfo = (Maybe T.Text)
type AttrLabel PictureAlternativeTextPropertyInfo = "alternative-text"
type AttrOrigin PictureAlternativeTextPropertyInfo = Picture
attrGet = getPictureAlternativeText
attrSet = setPictureAlternativeText
attrTransfer _ v = do
return v
attrConstruct = constructPictureAlternativeText
attrClear = clearPictureAlternativeText
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Picture.alternativeText"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.8/docs/GI-Gtk-Objects-Picture.html#g:attr:alternativeText"
})
#endif
getPictureCanShrink :: (MonadIO m, IsPicture o) => o -> m Bool
getPictureCanShrink :: forall (m :: * -> *) o. (MonadIO m, IsPicture o) => o -> m Bool
getPictureCanShrink o
obj = IO Bool -> m Bool
forall a. IO a -> m a
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
"can-shrink"
setPictureCanShrink :: (MonadIO m, IsPicture o) => o -> Bool -> m ()
setPictureCanShrink :: forall (m :: * -> *) o.
(MonadIO m, IsPicture o) =>
o -> Bool -> m ()
setPictureCanShrink o
obj Bool
val = IO () -> m ()
forall a. IO a -> m a
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
"can-shrink" Bool
val
constructPictureCanShrink :: (IsPicture o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructPictureCanShrink :: forall o (m :: * -> *).
(IsPicture o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructPictureCanShrink Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
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 a. IO a -> IO a
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
"can-shrink" Bool
val
#if defined(ENABLE_OVERLOADING)
data PictureCanShrinkPropertyInfo
instance AttrInfo PictureCanShrinkPropertyInfo where
type AttrAllowedOps PictureCanShrinkPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint PictureCanShrinkPropertyInfo = IsPicture
type AttrSetTypeConstraint PictureCanShrinkPropertyInfo = (~) Bool
type AttrTransferTypeConstraint PictureCanShrinkPropertyInfo = (~) Bool
type AttrTransferType PictureCanShrinkPropertyInfo = Bool
type AttrGetType PictureCanShrinkPropertyInfo = Bool
type AttrLabel PictureCanShrinkPropertyInfo = "can-shrink"
type AttrOrigin PictureCanShrinkPropertyInfo = Picture
attrGet = getPictureCanShrink
attrSet = setPictureCanShrink
attrTransfer _ v = do
return v
attrConstruct = constructPictureCanShrink
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Picture.canShrink"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.8/docs/GI-Gtk-Objects-Picture.html#g:attr:canShrink"
})
#endif
getPictureContentFit :: (MonadIO m, IsPicture o) => o -> m Gtk.Enums.ContentFit
getPictureContentFit :: forall (m :: * -> *) o.
(MonadIO m, IsPicture o) =>
o -> m ContentFit
getPictureContentFit o
obj = IO ContentFit -> m ContentFit
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO ContentFit -> m ContentFit) -> IO ContentFit -> m ContentFit
forall a b. (a -> b) -> a -> b
$ o -> String -> IO ContentFit
forall a b. (GObject a, Enum b, BoxedEnum b) => a -> String -> IO b
B.Properties.getObjectPropertyEnum o
obj String
"content-fit"
setPictureContentFit :: (MonadIO m, IsPicture o) => o -> Gtk.Enums.ContentFit -> m ()
setPictureContentFit :: forall (m :: * -> *) o.
(MonadIO m, IsPicture o) =>
o -> ContentFit -> m ()
setPictureContentFit o
obj ContentFit
val = IO () -> m ()
forall a. IO a -> m a
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 -> ContentFit -> IO ()
forall a b.
(GObject a, Enum b, BoxedEnum b) =>
a -> String -> b -> IO ()
B.Properties.setObjectPropertyEnum o
obj String
"content-fit" ContentFit
val
constructPictureContentFit :: (IsPicture o, MIO.MonadIO m) => Gtk.Enums.ContentFit -> m (GValueConstruct o)
constructPictureContentFit :: forall o (m :: * -> *).
(IsPicture o, MonadIO m) =>
ContentFit -> m (GValueConstruct o)
constructPictureContentFit ContentFit
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
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 a. IO a -> IO a
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 -> ContentFit -> IO (GValueConstruct o)
forall a o.
(Enum a, BoxedEnum a) =>
String -> a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyEnum String
"content-fit" ContentFit
val
#if defined(ENABLE_OVERLOADING)
data PictureContentFitPropertyInfo
instance AttrInfo PictureContentFitPropertyInfo where
type AttrAllowedOps PictureContentFitPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint PictureContentFitPropertyInfo = IsPicture
type AttrSetTypeConstraint PictureContentFitPropertyInfo = (~) Gtk.Enums.ContentFit
type AttrTransferTypeConstraint PictureContentFitPropertyInfo = (~) Gtk.Enums.ContentFit
type AttrTransferType PictureContentFitPropertyInfo = Gtk.Enums.ContentFit
type AttrGetType PictureContentFitPropertyInfo = Gtk.Enums.ContentFit
type AttrLabel PictureContentFitPropertyInfo = "content-fit"
type AttrOrigin PictureContentFitPropertyInfo = Picture
attrGet = getPictureContentFit
attrSet = setPictureContentFit
attrTransfer _ v = do
return v
attrConstruct = constructPictureContentFit
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Picture.contentFit"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.8/docs/GI-Gtk-Objects-Picture.html#g:attr:contentFit"
})
#endif
getPictureFile :: (MonadIO m, IsPicture o) => o -> m (Maybe Gio.File.File)
getPictureFile :: forall (m :: * -> *) o.
(MonadIO m, IsPicture o) =>
o -> m (Maybe File)
getPictureFile o
obj = IO (Maybe File) -> m (Maybe File)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe File) -> m (Maybe File))
-> IO (Maybe File) -> m (Maybe File)
forall a b. (a -> b) -> a -> b
$ o -> String -> (ManagedPtr File -> File) -> IO (Maybe File)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"file" ManagedPtr File -> File
Gio.File.File
setPictureFile :: (MonadIO m, IsPicture o, Gio.File.IsFile a) => o -> a -> m ()
setPictureFile :: forall (m :: * -> *) o a.
(MonadIO m, IsPicture o, IsFile a) =>
o -> a -> m ()
setPictureFile o
obj a
val = IO () -> m ()
forall a. IO a -> m a
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
"file" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)
constructPictureFile :: (IsPicture o, MIO.MonadIO m, Gio.File.IsFile a) => a -> m (GValueConstruct o)
constructPictureFile :: forall o (m :: * -> *) a.
(IsPicture o, MonadIO m, IsFile a) =>
a -> m (GValueConstruct o)
constructPictureFile a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
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 a. IO a -> IO a
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
"file" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)
clearPictureFile :: (MonadIO m, IsPicture o) => o -> m ()
clearPictureFile :: forall (m :: * -> *) o. (MonadIO m, IsPicture o) => o -> m ()
clearPictureFile o
obj = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe File -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"file" (Maybe File
forall a. Maybe a
Nothing :: Maybe Gio.File.File)
#if defined(ENABLE_OVERLOADING)
data PictureFilePropertyInfo
instance AttrInfo PictureFilePropertyInfo where
type AttrAllowedOps PictureFilePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint PictureFilePropertyInfo = IsPicture
type AttrSetTypeConstraint PictureFilePropertyInfo = Gio.File.IsFile
type AttrTransferTypeConstraint PictureFilePropertyInfo = Gio.File.IsFile
type AttrTransferType PictureFilePropertyInfo = Gio.File.File
type AttrGetType PictureFilePropertyInfo = (Maybe Gio.File.File)
type AttrLabel PictureFilePropertyInfo = "file"
type AttrOrigin PictureFilePropertyInfo = Picture
attrGet = getPictureFile
attrSet = setPictureFile
attrTransfer _ v = do
unsafeCastTo Gio.File.File v
attrConstruct = constructPictureFile
attrClear = clearPictureFile
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Picture.file"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.8/docs/GI-Gtk-Objects-Picture.html#g:attr:file"
})
#endif
getPictureKeepAspectRatio :: (MonadIO m, IsPicture o) => o -> m Bool
getPictureKeepAspectRatio :: forall (m :: * -> *) o. (MonadIO m, IsPicture o) => o -> m Bool
getPictureKeepAspectRatio o
obj = IO Bool -> m Bool
forall a. IO a -> m a
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
"keep-aspect-ratio"
setPictureKeepAspectRatio :: (MonadIO m, IsPicture o) => o -> Bool -> m ()
setPictureKeepAspectRatio :: forall (m :: * -> *) o.
(MonadIO m, IsPicture o) =>
o -> Bool -> m ()
setPictureKeepAspectRatio o
obj Bool
val = IO () -> m ()
forall a. IO a -> m a
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
"keep-aspect-ratio" Bool
val
constructPictureKeepAspectRatio :: (IsPicture o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructPictureKeepAspectRatio :: forall o (m :: * -> *).
(IsPicture o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructPictureKeepAspectRatio Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
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 a. IO a -> IO a
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
"keep-aspect-ratio" Bool
val
#if defined(ENABLE_OVERLOADING)
data PictureKeepAspectRatioPropertyInfo
instance AttrInfo PictureKeepAspectRatioPropertyInfo where
type AttrAllowedOps PictureKeepAspectRatioPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint PictureKeepAspectRatioPropertyInfo = IsPicture
type AttrSetTypeConstraint PictureKeepAspectRatioPropertyInfo = (~) Bool
type AttrTransferTypeConstraint PictureKeepAspectRatioPropertyInfo = (~) Bool
type AttrTransferType PictureKeepAspectRatioPropertyInfo = Bool
type AttrGetType PictureKeepAspectRatioPropertyInfo = Bool
type AttrLabel PictureKeepAspectRatioPropertyInfo = "keep-aspect-ratio"
type AttrOrigin PictureKeepAspectRatioPropertyInfo = Picture
attrGet = getPictureKeepAspectRatio
attrSet = setPictureKeepAspectRatio
attrTransfer _ v = do
return v
attrConstruct = constructPictureKeepAspectRatio
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Picture.keepAspectRatio"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.8/docs/GI-Gtk-Objects-Picture.html#g:attr:keepAspectRatio"
})
#endif
getPicturePaintable :: (MonadIO m, IsPicture o) => o -> m (Maybe Gdk.Paintable.Paintable)
getPicturePaintable :: forall (m :: * -> *) o.
(MonadIO m, IsPicture o) =>
o -> m (Maybe Paintable)
getPicturePaintable o
obj = IO (Maybe Paintable) -> m (Maybe Paintable)
forall a. IO a -> m a
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
"paintable" ManagedPtr Paintable -> Paintable
Gdk.Paintable.Paintable
setPicturePaintable :: (MonadIO m, IsPicture o, Gdk.Paintable.IsPaintable a) => o -> a -> m ()
setPicturePaintable :: forall (m :: * -> *) o a.
(MonadIO m, IsPicture o, IsPaintable a) =>
o -> a -> m ()
setPicturePaintable o
obj a
val = IO () -> m ()
forall a. IO a -> m a
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
"paintable" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)
constructPicturePaintable :: (IsPicture o, MIO.MonadIO m, Gdk.Paintable.IsPaintable a) => a -> m (GValueConstruct o)
constructPicturePaintable :: forall o (m :: * -> *) a.
(IsPicture o, MonadIO m, IsPaintable a) =>
a -> m (GValueConstruct o)
constructPicturePaintable a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
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 a. IO a -> IO a
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
"paintable" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)
clearPicturePaintable :: (MonadIO m, IsPicture o) => o -> m ()
clearPicturePaintable :: forall (m :: * -> *) o. (MonadIO m, IsPicture o) => o -> m ()
clearPicturePaintable o
obj = IO () -> m ()
forall a. IO a -> m a
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
"paintable" (Maybe Paintable
forall a. Maybe a
Nothing :: Maybe Gdk.Paintable.Paintable)
#if defined(ENABLE_OVERLOADING)
data PicturePaintablePropertyInfo
instance AttrInfo PicturePaintablePropertyInfo where
type AttrAllowedOps PicturePaintablePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint PicturePaintablePropertyInfo = IsPicture
type AttrSetTypeConstraint PicturePaintablePropertyInfo = Gdk.Paintable.IsPaintable
type AttrTransferTypeConstraint PicturePaintablePropertyInfo = Gdk.Paintable.IsPaintable
type AttrTransferType PicturePaintablePropertyInfo = Gdk.Paintable.Paintable
type AttrGetType PicturePaintablePropertyInfo = (Maybe Gdk.Paintable.Paintable)
type AttrLabel PicturePaintablePropertyInfo = "paintable"
type AttrOrigin PicturePaintablePropertyInfo = Picture
attrGet = getPicturePaintable
attrSet = setPicturePaintable
attrTransfer _ v = do
unsafeCastTo Gdk.Paintable.Paintable v
attrConstruct = constructPicturePaintable
attrClear = clearPicturePaintable
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Picture.paintable"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.8/docs/GI-Gtk-Objects-Picture.html#g:attr:paintable"
})
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Picture
type instance O.AttributeList Picture = PictureAttributeList
type PictureAttributeList = ('[ '("accessibleRole", Gtk.Accessible.AccessibleAccessibleRolePropertyInfo), '("alternativeText", PictureAlternativeTextPropertyInfo), '("canFocus", Gtk.Widget.WidgetCanFocusPropertyInfo), '("canShrink", PictureCanShrinkPropertyInfo), '("canTarget", Gtk.Widget.WidgetCanTargetPropertyInfo), '("contentFit", PictureContentFitPropertyInfo), '("cssClasses", Gtk.Widget.WidgetCssClassesPropertyInfo), '("cssName", Gtk.Widget.WidgetCssNamePropertyInfo), '("cursor", Gtk.Widget.WidgetCursorPropertyInfo), '("file", PictureFilePropertyInfo), '("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), '("keepAspectRatio", PictureKeepAspectRatioPropertyInfo), '("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), '("paintable", PicturePaintablePropertyInfo), '("parent", Gtk.Widget.WidgetParentPropertyInfo), '("receivesDefault", Gtk.Widget.WidgetReceivesDefaultPropertyInfo), '("root", Gtk.Widget.WidgetRootPropertyInfo), '("scaleFactor", Gtk.Widget.WidgetScaleFactorPropertyInfo), '("sensitive", Gtk.Widget.WidgetSensitivePropertyInfo), '("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, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
pictureAlternativeText :: AttrLabelProxy "alternativeText"
pictureAlternativeText = AttrLabelProxy
pictureCanShrink :: AttrLabelProxy "canShrink"
pictureCanShrink = AttrLabelProxy
pictureContentFit :: AttrLabelProxy "contentFit"
pictureContentFit = AttrLabelProxy
pictureFile :: AttrLabelProxy "file"
pictureFile = AttrLabelProxy
pictureKeepAspectRatio :: AttrLabelProxy "keepAspectRatio"
pictureKeepAspectRatio = AttrLabelProxy
picturePaintable :: AttrLabelProxy "paintable"
picturePaintable = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList Picture = PictureSignalList
type PictureSignalList = ('[ '("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, DK.Type)])
#endif
foreign import ccall "gtk_picture_new" gtk_picture_new ::
IO (Ptr Picture)
pictureNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
m Picture
pictureNew :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m Picture
pictureNew = IO Picture -> m Picture
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Picture -> m Picture) -> IO Picture -> m Picture
forall a b. (a -> b) -> a -> b
$ do
Ptr Picture
result <- IO (Ptr Picture)
gtk_picture_new
Text -> Ptr Picture -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"pictureNew" Ptr Picture
result
Picture
result' <- ((ManagedPtr Picture -> Picture) -> Ptr Picture -> IO Picture
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Picture -> Picture
Picture) Ptr Picture
result
Picture -> IO Picture
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Picture
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_picture_new_for_file" gtk_picture_new_for_file ::
Ptr Gio.File.File ->
IO (Ptr Picture)
pictureNewForFile ::
(B.CallStack.HasCallStack, MonadIO m, Gio.File.IsFile a) =>
Maybe (a)
-> m Picture
pictureNewForFile :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFile a) =>
Maybe a -> m Picture
pictureNewForFile Maybe a
file = IO Picture -> m Picture
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Picture -> m Picture) -> IO Picture -> m Picture
forall a b. (a -> b) -> a -> b
$ do
Ptr File
maybeFile <- case Maybe a
file of
Maybe a
Nothing -> Ptr File -> IO (Ptr File)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr File
forall a. Ptr a
nullPtr
Just a
jFile -> do
Ptr File
jFile' <- a -> IO (Ptr File)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
jFile
Ptr File -> IO (Ptr File)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr File
jFile'
Ptr Picture
result <- Ptr File -> IO (Ptr Picture)
gtk_picture_new_for_file Ptr File
maybeFile
Text -> Ptr Picture -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"pictureNewForFile" Ptr Picture
result
Picture
result' <- ((ManagedPtr Picture -> Picture) -> Ptr Picture -> IO Picture
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Picture -> Picture
Picture) Ptr Picture
result
Maybe a -> (a -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe a
file a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Picture -> IO Picture
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Picture
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_picture_new_for_filename" gtk_picture_new_for_filename ::
CString ->
IO (Ptr Picture)
pictureNewForFilename ::
(B.CallStack.HasCallStack, MonadIO m) =>
Maybe ([Char])
-> m Picture
pictureNewForFilename :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Maybe String -> m Picture
pictureNewForFilename Maybe String
filename = IO Picture -> m Picture
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Picture -> m Picture) -> IO Picture -> m Picture
forall a b. (a -> b) -> a -> b
$ do
Ptr CChar
maybeFilename <- case Maybe String
filename of
Maybe String
Nothing -> Ptr CChar -> IO (Ptr CChar)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
forall a. Ptr a
nullPtr
Just String
jFilename -> do
Ptr CChar
jFilename' <- String -> IO (Ptr CChar)
stringToCString String
jFilename
Ptr CChar -> IO (Ptr CChar)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
jFilename'
Ptr Picture
result <- Ptr CChar -> IO (Ptr Picture)
gtk_picture_new_for_filename Ptr CChar
maybeFilename
Text -> Ptr Picture -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"pictureNewForFilename" Ptr Picture
result
Picture
result' <- ((ManagedPtr Picture -> Picture) -> Ptr Picture -> IO Picture
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Picture -> Picture
Picture) Ptr Picture
result
Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
maybeFilename
Picture -> IO Picture
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Picture
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_picture_new_for_paintable" gtk_picture_new_for_paintable ::
Ptr Gdk.Paintable.Paintable ->
IO (Ptr Picture)
pictureNewForPaintable ::
(B.CallStack.HasCallStack, MonadIO m, Gdk.Paintable.IsPaintable a) =>
Maybe (a)
-> m Picture
pictureNewForPaintable :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPaintable a) =>
Maybe a -> m Picture
pictureNewForPaintable Maybe a
paintable = IO Picture -> m Picture
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Picture -> m Picture) -> IO Picture -> m Picture
forall a b. (a -> b) -> a -> b
$ do
Ptr Paintable
maybePaintable <- case Maybe a
paintable of
Maybe a
Nothing -> Ptr Paintable -> IO (Ptr Paintable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Paintable
forall a. Ptr a
nullPtr
Just a
jPaintable -> do
Ptr Paintable
jPaintable' <- a -> IO (Ptr Paintable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
jPaintable
Ptr Paintable -> IO (Ptr Paintable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Paintable
jPaintable'
Ptr Picture
result <- Ptr Paintable -> IO (Ptr Picture)
gtk_picture_new_for_paintable Ptr Paintable
maybePaintable
Text -> Ptr Picture -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"pictureNewForPaintable" Ptr Picture
result
Picture
result' <- ((ManagedPtr Picture -> Picture) -> Ptr Picture -> IO Picture
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Picture -> Picture
Picture) Ptr Picture
result
Maybe a -> (a -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe a
paintable a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Picture -> IO Picture
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Picture
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_picture_new_for_pixbuf" gtk_picture_new_for_pixbuf ::
Ptr GdkPixbuf.Pixbuf.Pixbuf ->
IO (Ptr Picture)
pictureNewForPixbuf ::
(B.CallStack.HasCallStack, MonadIO m, GdkPixbuf.Pixbuf.IsPixbuf a) =>
Maybe (a)
-> m Picture
pictureNewForPixbuf :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPixbuf a) =>
Maybe a -> m Picture
pictureNewForPixbuf Maybe a
pixbuf = IO Picture -> m Picture
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Picture -> m Picture) -> IO Picture -> m Picture
forall a b. (a -> b) -> a -> b
$ do
Ptr Pixbuf
maybePixbuf <- case Maybe a
pixbuf of
Maybe a
Nothing -> Ptr Pixbuf -> IO (Ptr Pixbuf)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Pixbuf
forall a. Ptr a
nullPtr
Just a
jPixbuf -> do
Ptr Pixbuf
jPixbuf' <- a -> IO (Ptr Pixbuf)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
jPixbuf
Ptr Pixbuf -> IO (Ptr Pixbuf)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Pixbuf
jPixbuf'
Ptr Picture
result <- Ptr Pixbuf -> IO (Ptr Picture)
gtk_picture_new_for_pixbuf Ptr Pixbuf
maybePixbuf
Text -> Ptr Picture -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"pictureNewForPixbuf" Ptr Picture
result
Picture
result' <- ((ManagedPtr Picture -> Picture) -> Ptr Picture -> IO Picture
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Picture -> Picture
Picture) Ptr Picture
result
Maybe a -> (a -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe a
pixbuf a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Picture -> IO Picture
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Picture
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_picture_new_for_resource" gtk_picture_new_for_resource ::
CString ->
IO (Ptr Picture)
pictureNewForResource ::
(B.CallStack.HasCallStack, MonadIO m) =>
Maybe (T.Text)
-> m Picture
pictureNewForResource :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Maybe Text -> m Picture
pictureNewForResource Maybe Text
resourcePath = IO Picture -> m Picture
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Picture -> m Picture) -> IO Picture -> m Picture
forall a b. (a -> b) -> a -> b
$ do
Ptr CChar
maybeResourcePath <- case Maybe Text
resourcePath of
Maybe Text
Nothing -> Ptr CChar -> IO (Ptr CChar)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
forall a. Ptr a
nullPtr
Just Text
jResourcePath -> do
Ptr CChar
jResourcePath' <- Text -> IO (Ptr CChar)
textToCString Text
jResourcePath
Ptr CChar -> IO (Ptr CChar)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
jResourcePath'
Ptr Picture
result <- Ptr CChar -> IO (Ptr Picture)
gtk_picture_new_for_resource Ptr CChar
maybeResourcePath
Text -> Ptr Picture -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"pictureNewForResource" Ptr Picture
result
Picture
result' <- ((ManagedPtr Picture -> Picture) -> Ptr Picture -> IO Picture
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Picture -> Picture
Picture) Ptr Picture
result
Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
maybeResourcePath
Picture -> IO Picture
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Picture
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_picture_get_alternative_text" gtk_picture_get_alternative_text ::
Ptr Picture ->
IO CString
pictureGetAlternativeText ::
(B.CallStack.HasCallStack, MonadIO m, IsPicture a) =>
a
-> m (Maybe T.Text)
pictureGetAlternativeText :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPicture a) =>
a -> m (Maybe Text)
pictureGetAlternativeText a
self = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
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 Picture
self' <- a -> IO (Ptr Picture)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr CChar
result <- Ptr Picture -> IO (Ptr CChar)
gtk_picture_get_alternative_text Ptr Picture
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 a. a -> IO a
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 a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
maybeResult
#if defined(ENABLE_OVERLOADING)
data PictureGetAlternativeTextMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsPicture a) => O.OverloadedMethod PictureGetAlternativeTextMethodInfo a signature where
overloadedMethod = pictureGetAlternativeText
instance O.OverloadedMethodInfo PictureGetAlternativeTextMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Picture.pictureGetAlternativeText",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.8/docs/GI-Gtk-Objects-Picture.html#v:pictureGetAlternativeText"
})
#endif
foreign import ccall "gtk_picture_get_can_shrink" gtk_picture_get_can_shrink ::
Ptr Picture ->
IO CInt
pictureGetCanShrink ::
(B.CallStack.HasCallStack, MonadIO m, IsPicture a) =>
a
-> m Bool
pictureGetCanShrink :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPicture a) =>
a -> m Bool
pictureGetCanShrink a
self = IO Bool -> m Bool
forall a. IO a -> m a
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 Picture
self' <- a -> IO (Ptr Picture)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CInt
result <- Ptr Picture -> IO CInt
gtk_picture_get_can_shrink Ptr Picture
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 a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data PictureGetCanShrinkMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsPicture a) => O.OverloadedMethod PictureGetCanShrinkMethodInfo a signature where
overloadedMethod = pictureGetCanShrink
instance O.OverloadedMethodInfo PictureGetCanShrinkMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Picture.pictureGetCanShrink",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.8/docs/GI-Gtk-Objects-Picture.html#v:pictureGetCanShrink"
})
#endif
foreign import ccall "gtk_picture_get_content_fit" gtk_picture_get_content_fit ::
Ptr Picture ->
IO CUInt
pictureGetContentFit ::
(B.CallStack.HasCallStack, MonadIO m, IsPicture a) =>
a
-> m Gtk.Enums.ContentFit
pictureGetContentFit :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPicture a) =>
a -> m ContentFit
pictureGetContentFit a
self = IO ContentFit -> m ContentFit
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ContentFit -> m ContentFit) -> IO ContentFit -> m ContentFit
forall a b. (a -> b) -> a -> b
$ do
Ptr Picture
self' <- a -> IO (Ptr Picture)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CUInt
result <- Ptr Picture -> IO CUInt
gtk_picture_get_content_fit Ptr Picture
self'
let result' :: ContentFit
result' = (Int -> ContentFit
forall a. Enum a => Int -> a
toEnum (Int -> ContentFit) -> (CUInt -> Int) -> CUInt -> ContentFit
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
ContentFit -> IO ContentFit
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ContentFit
result'
#if defined(ENABLE_OVERLOADING)
data PictureGetContentFitMethodInfo
instance (signature ~ (m Gtk.Enums.ContentFit), MonadIO m, IsPicture a) => O.OverloadedMethod PictureGetContentFitMethodInfo a signature where
overloadedMethod = pictureGetContentFit
instance O.OverloadedMethodInfo PictureGetContentFitMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Picture.pictureGetContentFit",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.8/docs/GI-Gtk-Objects-Picture.html#v:pictureGetContentFit"
})
#endif
foreign import ccall "gtk_picture_get_file" gtk_picture_get_file ::
Ptr Picture ->
IO (Ptr Gio.File.File)
pictureGetFile ::
(B.CallStack.HasCallStack, MonadIO m, IsPicture a) =>
a
-> m (Maybe Gio.File.File)
pictureGetFile :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPicture a) =>
a -> m (Maybe File)
pictureGetFile a
self = IO (Maybe File) -> m (Maybe File)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe File) -> m (Maybe File))
-> IO (Maybe File) -> m (Maybe File)
forall a b. (a -> b) -> a -> b
$ do
Ptr Picture
self' <- a -> IO (Ptr Picture)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr File
result <- Ptr Picture -> IO (Ptr File)
gtk_picture_get_file Ptr Picture
self'
Maybe File
maybeResult <- Ptr File -> (Ptr File -> IO File) -> IO (Maybe File)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr File
result ((Ptr File -> IO File) -> IO (Maybe File))
-> (Ptr File -> IO File) -> IO (Maybe File)
forall a b. (a -> b) -> a -> b
$ \Ptr File
result' -> do
File
result'' <- ((ManagedPtr File -> File) -> Ptr File -> IO File
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr File -> File
Gio.File.File) Ptr File
result'
File -> IO File
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return File
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Maybe File -> IO (Maybe File)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe File
maybeResult
#if defined(ENABLE_OVERLOADING)
data PictureGetFileMethodInfo
instance (signature ~ (m (Maybe Gio.File.File)), MonadIO m, IsPicture a) => O.OverloadedMethod PictureGetFileMethodInfo a signature where
overloadedMethod = pictureGetFile
instance O.OverloadedMethodInfo PictureGetFileMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Picture.pictureGetFile",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.8/docs/GI-Gtk-Objects-Picture.html#v:pictureGetFile"
})
#endif
foreign import ccall "gtk_picture_get_keep_aspect_ratio" gtk_picture_get_keep_aspect_ratio ::
Ptr Picture ->
IO CInt
{-# DEPRECATED pictureGetKeepAspectRatio ["(Since version 4.8)","Use 'GI.Gtk.Objects.Picture.pictureGetContentFit' instead. This will"," now return @FALSE@ only if [Picture:contentFit](\"GI.Gtk.Objects.Picture#g:attr:contentFit\") is"," @GTK_CONTENT_FIT_FILL@. Returns @TRUE@ otherwise."] #-}
pictureGetKeepAspectRatio ::
(B.CallStack.HasCallStack, MonadIO m, IsPicture a) =>
a
-> m Bool
pictureGetKeepAspectRatio :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPicture a) =>
a -> m Bool
pictureGetKeepAspectRatio a
self = IO Bool -> m Bool
forall a. IO a -> m a
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 Picture
self' <- a -> IO (Ptr Picture)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CInt
result <- Ptr Picture -> IO CInt
gtk_picture_get_keep_aspect_ratio Ptr Picture
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 a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data PictureGetKeepAspectRatioMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsPicture a) => O.OverloadedMethod PictureGetKeepAspectRatioMethodInfo a signature where
overloadedMethod = pictureGetKeepAspectRatio
instance O.OverloadedMethodInfo PictureGetKeepAspectRatioMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Picture.pictureGetKeepAspectRatio",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.8/docs/GI-Gtk-Objects-Picture.html#v:pictureGetKeepAspectRatio"
})
#endif
foreign import ccall "gtk_picture_get_paintable" gtk_picture_get_paintable ::
Ptr Picture ->
IO (Ptr Gdk.Paintable.Paintable)
pictureGetPaintable ::
(B.CallStack.HasCallStack, MonadIO m, IsPicture a) =>
a
-> m (Maybe Gdk.Paintable.Paintable)
pictureGetPaintable :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPicture a) =>
a -> m (Maybe Paintable)
pictureGetPaintable a
self = IO (Maybe Paintable) -> m (Maybe Paintable)
forall a. IO a -> m a
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 Picture
self' <- a -> IO (Ptr Picture)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr Paintable
result <- Ptr Picture -> IO (Ptr Paintable)
gtk_picture_get_paintable Ptr Picture
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 a. a -> IO a
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 a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Paintable
maybeResult
#if defined(ENABLE_OVERLOADING)
data PictureGetPaintableMethodInfo
instance (signature ~ (m (Maybe Gdk.Paintable.Paintable)), MonadIO m, IsPicture a) => O.OverloadedMethod PictureGetPaintableMethodInfo a signature where
overloadedMethod = pictureGetPaintable
instance O.OverloadedMethodInfo PictureGetPaintableMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Picture.pictureGetPaintable",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.8/docs/GI-Gtk-Objects-Picture.html#v:pictureGetPaintable"
})
#endif
foreign import ccall "gtk_picture_set_alternative_text" gtk_picture_set_alternative_text ::
Ptr Picture ->
CString ->
IO ()
pictureSetAlternativeText ::
(B.CallStack.HasCallStack, MonadIO m, IsPicture a) =>
a
-> Maybe (T.Text)
-> m ()
pictureSetAlternativeText :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPicture a) =>
a -> Maybe Text -> m ()
pictureSetAlternativeText a
self Maybe Text
alternativeText = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Picture
self' <- a -> IO (Ptr Picture)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr CChar
maybeAlternativeText <- case Maybe Text
alternativeText of
Maybe Text
Nothing -> Ptr CChar -> IO (Ptr CChar)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
forall a. Ptr a
nullPtr
Just Text
jAlternativeText -> do
Ptr CChar
jAlternativeText' <- Text -> IO (Ptr CChar)
textToCString Text
jAlternativeText
Ptr CChar -> IO (Ptr CChar)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
jAlternativeText'
Ptr Picture -> Ptr CChar -> IO ()
gtk_picture_set_alternative_text Ptr Picture
self' Ptr CChar
maybeAlternativeText
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
maybeAlternativeText
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PictureSetAlternativeTextMethodInfo
instance (signature ~ (Maybe (T.Text) -> m ()), MonadIO m, IsPicture a) => O.OverloadedMethod PictureSetAlternativeTextMethodInfo a signature where
overloadedMethod = pictureSetAlternativeText
instance O.OverloadedMethodInfo PictureSetAlternativeTextMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Picture.pictureSetAlternativeText",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.8/docs/GI-Gtk-Objects-Picture.html#v:pictureSetAlternativeText"
})
#endif
foreign import ccall "gtk_picture_set_can_shrink" gtk_picture_set_can_shrink ::
Ptr Picture ->
CInt ->
IO ()
pictureSetCanShrink ::
(B.CallStack.HasCallStack, MonadIO m, IsPicture a) =>
a
-> Bool
-> m ()
pictureSetCanShrink :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPicture a) =>
a -> Bool -> m ()
pictureSetCanShrink a
self Bool
canShrink = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Picture
self' <- a -> IO (Ptr Picture)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
let canShrink' :: CInt
canShrink' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.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
P.fromEnum) Bool
canShrink
Ptr Picture -> CInt -> IO ()
gtk_picture_set_can_shrink Ptr Picture
self' CInt
canShrink'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PictureSetCanShrinkMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsPicture a) => O.OverloadedMethod PictureSetCanShrinkMethodInfo a signature where
overloadedMethod = pictureSetCanShrink
instance O.OverloadedMethodInfo PictureSetCanShrinkMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Picture.pictureSetCanShrink",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.8/docs/GI-Gtk-Objects-Picture.html#v:pictureSetCanShrink"
})
#endif
foreign import ccall "gtk_picture_set_content_fit" gtk_picture_set_content_fit ::
Ptr Picture ->
CUInt ->
IO ()
pictureSetContentFit ::
(B.CallStack.HasCallStack, MonadIO m, IsPicture a) =>
a
-> Gtk.Enums.ContentFit
-> m ()
pictureSetContentFit :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPicture a) =>
a -> ContentFit -> m ()
pictureSetContentFit a
self ContentFit
contentFit = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Picture
self' <- a -> IO (Ptr Picture)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
let contentFit' :: CUInt
contentFit' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (ContentFit -> Int) -> ContentFit -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContentFit -> Int
forall a. Enum a => a -> Int
fromEnum) ContentFit
contentFit
Ptr Picture -> CUInt -> IO ()
gtk_picture_set_content_fit Ptr Picture
self' CUInt
contentFit'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PictureSetContentFitMethodInfo
instance (signature ~ (Gtk.Enums.ContentFit -> m ()), MonadIO m, IsPicture a) => O.OverloadedMethod PictureSetContentFitMethodInfo a signature where
overloadedMethod = pictureSetContentFit
instance O.OverloadedMethodInfo PictureSetContentFitMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Picture.pictureSetContentFit",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.8/docs/GI-Gtk-Objects-Picture.html#v:pictureSetContentFit"
})
#endif
foreign import ccall "gtk_picture_set_file" gtk_picture_set_file ::
Ptr Picture ->
Ptr Gio.File.File ->
IO ()
pictureSetFile ::
(B.CallStack.HasCallStack, MonadIO m, IsPicture a, Gio.File.IsFile b) =>
a
-> Maybe (b)
-> m ()
pictureSetFile :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsPicture a, IsFile b) =>
a -> Maybe b -> m ()
pictureSetFile a
self Maybe b
file = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Picture
self' <- a -> IO (Ptr Picture)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr File
maybeFile <- case Maybe b
file of
Maybe b
Nothing -> Ptr File -> IO (Ptr File)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr File
forall a. Ptr a
nullPtr
Just b
jFile -> do
Ptr File
jFile' <- b -> IO (Ptr File)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jFile
Ptr File -> IO (Ptr File)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr File
jFile'
Ptr Picture -> Ptr File -> IO ()
gtk_picture_set_file Ptr Picture
self' Ptr File
maybeFile
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
file b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PictureSetFileMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsPicture a, Gio.File.IsFile b) => O.OverloadedMethod PictureSetFileMethodInfo a signature where
overloadedMethod = pictureSetFile
instance O.OverloadedMethodInfo PictureSetFileMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Picture.pictureSetFile",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.8/docs/GI-Gtk-Objects-Picture.html#v:pictureSetFile"
})
#endif
foreign import ccall "gtk_picture_set_filename" gtk_picture_set_filename ::
Ptr Picture ->
CString ->
IO ()
pictureSetFilename ::
(B.CallStack.HasCallStack, MonadIO m, IsPicture a) =>
a
-> Maybe ([Char])
-> m ()
pictureSetFilename :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPicture a) =>
a -> Maybe String -> m ()
pictureSetFilename a
self Maybe String
filename = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Picture
self' <- a -> IO (Ptr Picture)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr CChar
maybeFilename <- case Maybe String
filename of
Maybe String
Nothing -> Ptr CChar -> IO (Ptr CChar)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
forall a. Ptr a
nullPtr
Just String
jFilename -> do
Ptr CChar
jFilename' <- String -> IO (Ptr CChar)
stringToCString String
jFilename
Ptr CChar -> IO (Ptr CChar)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
jFilename'
Ptr Picture -> Ptr CChar -> IO ()
gtk_picture_set_filename Ptr Picture
self' Ptr CChar
maybeFilename
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
maybeFilename
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PictureSetFilenameMethodInfo
instance (signature ~ (Maybe ([Char]) -> m ()), MonadIO m, IsPicture a) => O.OverloadedMethod PictureSetFilenameMethodInfo a signature where
overloadedMethod = pictureSetFilename
instance O.OverloadedMethodInfo PictureSetFilenameMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Picture.pictureSetFilename",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.8/docs/GI-Gtk-Objects-Picture.html#v:pictureSetFilename"
})
#endif
foreign import ccall "gtk_picture_set_keep_aspect_ratio" gtk_picture_set_keep_aspect_ratio ::
Ptr Picture ->
CInt ->
IO ()
{-# DEPRECATED pictureSetKeepAspectRatio ["(Since version 4.8)","Use 'GI.Gtk.Objects.Picture.pictureSetContentFit' instead. If still"," used, this method will always set the [Picture:contentFit](\"GI.Gtk.Objects.Picture#g:attr:contentFit\")"," property to @GTK_CONTENT_FIT_CONTAIN@ if /@keepAspectRatio@/ is true,"," otherwise it will set it to @GTK_CONTENT_FIT_FILL@."] #-}
pictureSetKeepAspectRatio ::
(B.CallStack.HasCallStack, MonadIO m, IsPicture a) =>
a
-> Bool
-> m ()
pictureSetKeepAspectRatio :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPicture a) =>
a -> Bool -> m ()
pictureSetKeepAspectRatio a
self Bool
keepAspectRatio = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Picture
self' <- a -> IO (Ptr Picture)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
let keepAspectRatio' :: CInt
keepAspectRatio' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.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
P.fromEnum) Bool
keepAspectRatio
Ptr Picture -> CInt -> IO ()
gtk_picture_set_keep_aspect_ratio Ptr Picture
self' CInt
keepAspectRatio'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PictureSetKeepAspectRatioMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsPicture a) => O.OverloadedMethod PictureSetKeepAspectRatioMethodInfo a signature where
overloadedMethod = pictureSetKeepAspectRatio
instance O.OverloadedMethodInfo PictureSetKeepAspectRatioMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Picture.pictureSetKeepAspectRatio",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.8/docs/GI-Gtk-Objects-Picture.html#v:pictureSetKeepAspectRatio"
})
#endif
foreign import ccall "gtk_picture_set_paintable" gtk_picture_set_paintable ::
Ptr Picture ->
Ptr Gdk.Paintable.Paintable ->
IO ()
pictureSetPaintable ::
(B.CallStack.HasCallStack, MonadIO m, IsPicture a, Gdk.Paintable.IsPaintable b) =>
a
-> Maybe (b)
-> m ()
pictureSetPaintable :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsPicture a, IsPaintable b) =>
a -> Maybe b -> m ()
pictureSetPaintable a
self Maybe b
paintable = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Picture
self' <- a -> IO (Ptr Picture)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr Paintable
maybePaintable <- case Maybe b
paintable of
Maybe b
Nothing -> Ptr Paintable -> IO (Ptr Paintable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Paintable
forall a. Ptr a
nullPtr
Just b
jPaintable -> do
Ptr Paintable
jPaintable' <- b -> IO (Ptr Paintable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jPaintable
Ptr Paintable -> IO (Ptr Paintable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Paintable
jPaintable'
Ptr Picture -> Ptr Paintable -> IO ()
gtk_picture_set_paintable Ptr Picture
self' Ptr Paintable
maybePaintable
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
paintable b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PictureSetPaintableMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsPicture a, Gdk.Paintable.IsPaintable b) => O.OverloadedMethod PictureSetPaintableMethodInfo a signature where
overloadedMethod = pictureSetPaintable
instance O.OverloadedMethodInfo PictureSetPaintableMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Picture.pictureSetPaintable",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.8/docs/GI-Gtk-Objects-Picture.html#v:pictureSetPaintable"
})
#endif
foreign import ccall "gtk_picture_set_pixbuf" gtk_picture_set_pixbuf ::
Ptr Picture ->
Ptr GdkPixbuf.Pixbuf.Pixbuf ->
IO ()
pictureSetPixbuf ::
(B.CallStack.HasCallStack, MonadIO m, IsPicture a, GdkPixbuf.Pixbuf.IsPixbuf b) =>
a
-> Maybe (b)
-> m ()
pictureSetPixbuf :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsPicture a, IsPixbuf b) =>
a -> Maybe b -> m ()
pictureSetPixbuf a
self Maybe b
pixbuf = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Picture
self' <- a -> IO (Ptr Picture)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr Pixbuf
maybePixbuf <- case Maybe b
pixbuf of
Maybe b
Nothing -> Ptr Pixbuf -> IO (Ptr Pixbuf)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Pixbuf
forall a. Ptr a
nullPtr
Just b
jPixbuf -> do
Ptr Pixbuf
jPixbuf' <- b -> IO (Ptr Pixbuf)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jPixbuf
Ptr Pixbuf -> IO (Ptr Pixbuf)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Pixbuf
jPixbuf'
Ptr Picture -> Ptr Pixbuf -> IO ()
gtk_picture_set_pixbuf Ptr Picture
self' Ptr Pixbuf
maybePixbuf
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
pixbuf b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PictureSetPixbufMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsPicture a, GdkPixbuf.Pixbuf.IsPixbuf b) => O.OverloadedMethod PictureSetPixbufMethodInfo a signature where
overloadedMethod = pictureSetPixbuf
instance O.OverloadedMethodInfo PictureSetPixbufMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Picture.pictureSetPixbuf",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.8/docs/GI-Gtk-Objects-Picture.html#v:pictureSetPixbuf"
})
#endif
foreign import ccall "gtk_picture_set_resource" gtk_picture_set_resource ::
Ptr Picture ->
CString ->
IO ()
pictureSetResource ::
(B.CallStack.HasCallStack, MonadIO m, IsPicture a) =>
a
-> Maybe (T.Text)
-> m ()
pictureSetResource :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPicture a) =>
a -> Maybe Text -> m ()
pictureSetResource a
self Maybe Text
resourcePath = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Picture
self' <- a -> IO (Ptr Picture)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr CChar
maybeResourcePath <- case Maybe Text
resourcePath of
Maybe Text
Nothing -> Ptr CChar -> IO (Ptr CChar)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
forall a. Ptr a
nullPtr
Just Text
jResourcePath -> do
Ptr CChar
jResourcePath' <- Text -> IO (Ptr CChar)
textToCString Text
jResourcePath
Ptr CChar -> IO (Ptr CChar)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
jResourcePath'
Ptr Picture -> Ptr CChar -> IO ()
gtk_picture_set_resource Ptr Picture
self' Ptr CChar
maybeResourcePath
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
maybeResourcePath
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PictureSetResourceMethodInfo
instance (signature ~ (Maybe (T.Text) -> m ()), MonadIO m, IsPicture a) => O.OverloadedMethod PictureSetResourceMethodInfo a signature where
overloadedMethod = pictureSetResource
instance O.OverloadedMethodInfo PictureSetResourceMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Picture.pictureSetResource",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.8/docs/GI-Gtk-Objects-Picture.html#v:pictureSetResource"
})
#endif