{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.Objects.Image
(
Image(..) ,
IsImage ,
toImage ,
#if defined(ENABLE_OVERLOADING)
ResolveImageMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
ImageClearMethodInfo ,
#endif
imageClear ,
#if defined(ENABLE_OVERLOADING)
ImageGetGiconMethodInfo ,
#endif
imageGetGicon ,
#if defined(ENABLE_OVERLOADING)
ImageGetIconNameMethodInfo ,
#endif
imageGetIconName ,
#if defined(ENABLE_OVERLOADING)
ImageGetIconSizeMethodInfo ,
#endif
imageGetIconSize ,
#if defined(ENABLE_OVERLOADING)
ImageGetPaintableMethodInfo ,
#endif
imageGetPaintable ,
#if defined(ENABLE_OVERLOADING)
ImageGetPixelSizeMethodInfo ,
#endif
imageGetPixelSize ,
#if defined(ENABLE_OVERLOADING)
ImageGetStorageTypeMethodInfo ,
#endif
imageGetStorageType ,
imageNew ,
imageNewFromFile ,
imageNewFromGicon ,
imageNewFromIconName ,
imageNewFromPaintable ,
imageNewFromPixbuf ,
imageNewFromResource ,
#if defined(ENABLE_OVERLOADING)
ImageSetFromFileMethodInfo ,
#endif
imageSetFromFile ,
#if defined(ENABLE_OVERLOADING)
ImageSetFromGiconMethodInfo ,
#endif
imageSetFromGicon ,
#if defined(ENABLE_OVERLOADING)
ImageSetFromIconNameMethodInfo ,
#endif
imageSetFromIconName ,
#if defined(ENABLE_OVERLOADING)
ImageSetFromPaintableMethodInfo ,
#endif
imageSetFromPaintable ,
#if defined(ENABLE_OVERLOADING)
ImageSetFromPixbufMethodInfo ,
#endif
imageSetFromPixbuf ,
#if defined(ENABLE_OVERLOADING)
ImageSetFromResourceMethodInfo ,
#endif
imageSetFromResource ,
#if defined(ENABLE_OVERLOADING)
ImageSetIconSizeMethodInfo ,
#endif
imageSetIconSize ,
#if defined(ENABLE_OVERLOADING)
ImageSetPixelSizeMethodInfo ,
#endif
imageSetPixelSize ,
#if defined(ENABLE_OVERLOADING)
ImageFilePropertyInfo ,
#endif
clearImageFile ,
constructImageFile ,
getImageFile ,
#if defined(ENABLE_OVERLOADING)
imageFile ,
#endif
setImageFile ,
#if defined(ENABLE_OVERLOADING)
ImageGiconPropertyInfo ,
#endif
clearImageGicon ,
constructImageGicon ,
getImageGicon ,
#if defined(ENABLE_OVERLOADING)
imageGicon ,
#endif
setImageGicon ,
#if defined(ENABLE_OVERLOADING)
ImageIconNamePropertyInfo ,
#endif
clearImageIconName ,
constructImageIconName ,
getImageIconName ,
#if defined(ENABLE_OVERLOADING)
imageIconName ,
#endif
setImageIconName ,
#if defined(ENABLE_OVERLOADING)
ImageIconSizePropertyInfo ,
#endif
constructImageIconSize ,
getImageIconSize ,
#if defined(ENABLE_OVERLOADING)
imageIconSize ,
#endif
setImageIconSize ,
#if defined(ENABLE_OVERLOADING)
ImagePaintablePropertyInfo ,
#endif
clearImagePaintable ,
constructImagePaintable ,
getImagePaintable ,
#if defined(ENABLE_OVERLOADING)
imagePaintable ,
#endif
setImagePaintable ,
#if defined(ENABLE_OVERLOADING)
ImagePixelSizePropertyInfo ,
#endif
constructImagePixelSize ,
getImagePixelSize ,
#if defined(ENABLE_OVERLOADING)
imagePixelSize ,
#endif
setImagePixelSize ,
#if defined(ENABLE_OVERLOADING)
ImageResourcePropertyInfo ,
#endif
clearImageResource ,
constructImageResource ,
getImageResource ,
#if defined(ENABLE_OVERLOADING)
imageResource ,
#endif
setImageResource ,
#if defined(ENABLE_OVERLOADING)
ImageStorageTypePropertyInfo ,
#endif
getImageStorageType ,
#if defined(ENABLE_OVERLOADING)
imageStorageType ,
#endif
#if defined(ENABLE_OVERLOADING)
ImageUseFallbackPropertyInfo ,
#endif
constructImageUseFallback ,
getImageUseFallback ,
#if defined(ENABLE_OVERLOADING)
imageUseFallback ,
#endif
setImageUseFallback ,
) 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.Icon as Gio.Icon
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 Image = Image (SP.ManagedPtr Image)
deriving (Image -> Image -> Bool
(Image -> Image -> Bool) -> (Image -> Image -> Bool) -> Eq Image
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Image -> Image -> Bool
== :: Image -> Image -> Bool
$c/= :: Image -> Image -> Bool
/= :: Image -> Image -> Bool
Eq)
instance SP.ManagedPtrNewtype Image where
toManagedPtr :: Image -> ManagedPtr Image
toManagedPtr (Image ManagedPtr Image
p) = ManagedPtr Image
p
foreign import ccall "gtk_image_get_type"
c_gtk_image_get_type :: IO B.Types.GType
instance B.Types.TypedObject Image where
glibType :: IO GType
glibType = IO GType
c_gtk_image_get_type
instance B.Types.GObject Image
class (SP.GObject o, O.IsDescendantOf Image o) => IsImage o
instance (SP.GObject o, O.IsDescendantOf Image o) => IsImage o
instance O.HasParentTypes Image
type instance O.ParentTypes Image = '[Gtk.Widget.Widget, GObject.Object.Object, Gtk.Accessible.Accessible, Gtk.Buildable.Buildable, Gtk.ConstraintTarget.ConstraintTarget]
toImage :: (MIO.MonadIO m, IsImage o) => o -> m Image
toImage :: forall (m :: * -> *) o. (MonadIO m, IsImage o) => o -> m Image
toImage = IO Image -> m Image
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Image -> m Image) -> (o -> IO Image) -> o -> m Image
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr Image -> Image) -> o -> IO Image
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr Image -> Image
Image
instance B.GValue.IsGValue (Maybe Image) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gtk_image_get_type
gvalueSet_ :: Ptr GValue -> Maybe Image -> IO ()
gvalueSet_ Ptr GValue
gv Maybe Image
P.Nothing = Ptr GValue -> Ptr Image -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr Image
forall a. Ptr a
FP.nullPtr :: FP.Ptr Image)
gvalueSet_ Ptr GValue
gv (P.Just Image
obj) = Image -> (Ptr Image -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Image
obj (Ptr GValue -> Ptr Image -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe Image)
gvalueGet_ Ptr GValue
gv = do
Ptr Image
ptr <- Ptr GValue -> IO (Ptr Image)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr Image)
if Ptr Image
ptr Ptr Image -> Ptr Image -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr Image
forall a. Ptr a
FP.nullPtr
then Image -> Maybe Image
forall a. a -> Maybe a
P.Just (Image -> Maybe Image) -> IO Image -> IO (Maybe Image)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr Image -> Image) -> Ptr Image -> IO Image
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr Image -> Image
Image Ptr Image
ptr
else Maybe Image -> IO (Maybe Image)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Image
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveImageMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveImageMethod "actionSetEnabled" o = Gtk.Widget.WidgetActionSetEnabledMethodInfo
ResolveImageMethod "activate" o = Gtk.Widget.WidgetActivateMethodInfo
ResolveImageMethod "activateAction" o = Gtk.Widget.WidgetActivateActionMethodInfo
ResolveImageMethod "activateDefault" o = Gtk.Widget.WidgetActivateDefaultMethodInfo
ResolveImageMethod "addController" o = Gtk.Widget.WidgetAddControllerMethodInfo
ResolveImageMethod "addCssClass" o = Gtk.Widget.WidgetAddCssClassMethodInfo
ResolveImageMethod "addMnemonicLabel" o = Gtk.Widget.WidgetAddMnemonicLabelMethodInfo
ResolveImageMethod "addTickCallback" o = Gtk.Widget.WidgetAddTickCallbackMethodInfo
ResolveImageMethod "allocate" o = Gtk.Widget.WidgetAllocateMethodInfo
ResolveImageMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveImageMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveImageMethod "childFocus" o = Gtk.Widget.WidgetChildFocusMethodInfo
ResolveImageMethod "clear" o = ImageClearMethodInfo
ResolveImageMethod "computeBounds" o = Gtk.Widget.WidgetComputeBoundsMethodInfo
ResolveImageMethod "computeExpand" o = Gtk.Widget.WidgetComputeExpandMethodInfo
ResolveImageMethod "computePoint" o = Gtk.Widget.WidgetComputePointMethodInfo
ResolveImageMethod "computeTransform" o = Gtk.Widget.WidgetComputeTransformMethodInfo
ResolveImageMethod "contains" o = Gtk.Widget.WidgetContainsMethodInfo
ResolveImageMethod "createPangoContext" o = Gtk.Widget.WidgetCreatePangoContextMethodInfo
ResolveImageMethod "createPangoLayout" o = Gtk.Widget.WidgetCreatePangoLayoutMethodInfo
ResolveImageMethod "disposeTemplate" o = Gtk.Widget.WidgetDisposeTemplateMethodInfo
ResolveImageMethod "dragCheckThreshold" o = Gtk.Widget.WidgetDragCheckThresholdMethodInfo
ResolveImageMethod "errorBell" o = Gtk.Widget.WidgetErrorBellMethodInfo
ResolveImageMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveImageMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveImageMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveImageMethod "grabFocus" o = Gtk.Widget.WidgetGrabFocusMethodInfo
ResolveImageMethod "hasCssClass" o = Gtk.Widget.WidgetHasCssClassMethodInfo
ResolveImageMethod "hasDefault" o = Gtk.Widget.WidgetHasDefaultMethodInfo
ResolveImageMethod "hasFocus" o = Gtk.Widget.WidgetHasFocusMethodInfo
ResolveImageMethod "hasVisibleFocus" o = Gtk.Widget.WidgetHasVisibleFocusMethodInfo
ResolveImageMethod "hide" o = Gtk.Widget.WidgetHideMethodInfo
ResolveImageMethod "inDestruction" o = Gtk.Widget.WidgetInDestructionMethodInfo
ResolveImageMethod "initTemplate" o = Gtk.Widget.WidgetInitTemplateMethodInfo
ResolveImageMethod "insertActionGroup" o = Gtk.Widget.WidgetInsertActionGroupMethodInfo
ResolveImageMethod "insertAfter" o = Gtk.Widget.WidgetInsertAfterMethodInfo
ResolveImageMethod "insertBefore" o = Gtk.Widget.WidgetInsertBeforeMethodInfo
ResolveImageMethod "isAncestor" o = Gtk.Widget.WidgetIsAncestorMethodInfo
ResolveImageMethod "isDrawable" o = Gtk.Widget.WidgetIsDrawableMethodInfo
ResolveImageMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveImageMethod "isFocus" o = Gtk.Widget.WidgetIsFocusMethodInfo
ResolveImageMethod "isSensitive" o = Gtk.Widget.WidgetIsSensitiveMethodInfo
ResolveImageMethod "isVisible" o = Gtk.Widget.WidgetIsVisibleMethodInfo
ResolveImageMethod "keynavFailed" o = Gtk.Widget.WidgetKeynavFailedMethodInfo
ResolveImageMethod "listMnemonicLabels" o = Gtk.Widget.WidgetListMnemonicLabelsMethodInfo
ResolveImageMethod "map" o = Gtk.Widget.WidgetMapMethodInfo
ResolveImageMethod "measure" o = Gtk.Widget.WidgetMeasureMethodInfo
ResolveImageMethod "mnemonicActivate" o = Gtk.Widget.WidgetMnemonicActivateMethodInfo
ResolveImageMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveImageMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveImageMethod "observeChildren" o = Gtk.Widget.WidgetObserveChildrenMethodInfo
ResolveImageMethod "observeControllers" o = Gtk.Widget.WidgetObserveControllersMethodInfo
ResolveImageMethod "pick" o = Gtk.Widget.WidgetPickMethodInfo
ResolveImageMethod "queueAllocate" o = Gtk.Widget.WidgetQueueAllocateMethodInfo
ResolveImageMethod "queueDraw" o = Gtk.Widget.WidgetQueueDrawMethodInfo
ResolveImageMethod "queueResize" o = Gtk.Widget.WidgetQueueResizeMethodInfo
ResolveImageMethod "realize" o = Gtk.Widget.WidgetRealizeMethodInfo
ResolveImageMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveImageMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveImageMethod "removeController" o = Gtk.Widget.WidgetRemoveControllerMethodInfo
ResolveImageMethod "removeCssClass" o = Gtk.Widget.WidgetRemoveCssClassMethodInfo
ResolveImageMethod "removeMnemonicLabel" o = Gtk.Widget.WidgetRemoveMnemonicLabelMethodInfo
ResolveImageMethod "removeTickCallback" o = Gtk.Widget.WidgetRemoveTickCallbackMethodInfo
ResolveImageMethod "resetProperty" o = Gtk.Accessible.AccessibleResetPropertyMethodInfo
ResolveImageMethod "resetRelation" o = Gtk.Accessible.AccessibleResetRelationMethodInfo
ResolveImageMethod "resetState" o = Gtk.Accessible.AccessibleResetStateMethodInfo
ResolveImageMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveImageMethod "shouldLayout" o = Gtk.Widget.WidgetShouldLayoutMethodInfo
ResolveImageMethod "show" o = Gtk.Widget.WidgetShowMethodInfo
ResolveImageMethod "sizeAllocate" o = Gtk.Widget.WidgetSizeAllocateMethodInfo
ResolveImageMethod "snapshotChild" o = Gtk.Widget.WidgetSnapshotChildMethodInfo
ResolveImageMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveImageMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveImageMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveImageMethod "translateCoordinates" o = Gtk.Widget.WidgetTranslateCoordinatesMethodInfo
ResolveImageMethod "triggerTooltipQuery" o = Gtk.Widget.WidgetTriggerTooltipQueryMethodInfo
ResolveImageMethod "unmap" o = Gtk.Widget.WidgetUnmapMethodInfo
ResolveImageMethod "unparent" o = Gtk.Widget.WidgetUnparentMethodInfo
ResolveImageMethod "unrealize" o = Gtk.Widget.WidgetUnrealizeMethodInfo
ResolveImageMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveImageMethod "unsetStateFlags" o = Gtk.Widget.WidgetUnsetStateFlagsMethodInfo
ResolveImageMethod "updateNextAccessibleSibling" o = Gtk.Accessible.AccessibleUpdateNextAccessibleSiblingMethodInfo
ResolveImageMethod "updateProperty" o = Gtk.Accessible.AccessibleUpdatePropertyMethodInfo
ResolveImageMethod "updateRelation" o = Gtk.Accessible.AccessibleUpdateRelationMethodInfo
ResolveImageMethod "updateState" o = Gtk.Accessible.AccessibleUpdateStateMethodInfo
ResolveImageMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveImageMethod "getAccessibleParent" o = Gtk.Accessible.AccessibleGetAccessibleParentMethodInfo
ResolveImageMethod "getAccessibleRole" o = Gtk.Accessible.AccessibleGetAccessibleRoleMethodInfo
ResolveImageMethod "getAllocatedBaseline" o = Gtk.Widget.WidgetGetAllocatedBaselineMethodInfo
ResolveImageMethod "getAllocatedHeight" o = Gtk.Widget.WidgetGetAllocatedHeightMethodInfo
ResolveImageMethod "getAllocatedWidth" o = Gtk.Widget.WidgetGetAllocatedWidthMethodInfo
ResolveImageMethod "getAllocation" o = Gtk.Widget.WidgetGetAllocationMethodInfo
ResolveImageMethod "getAncestor" o = Gtk.Widget.WidgetGetAncestorMethodInfo
ResolveImageMethod "getAtContext" o = Gtk.Accessible.AccessibleGetAtContextMethodInfo
ResolveImageMethod "getBounds" o = Gtk.Accessible.AccessibleGetBoundsMethodInfo
ResolveImageMethod "getBuildableId" o = Gtk.Buildable.BuildableGetBuildableIdMethodInfo
ResolveImageMethod "getCanFocus" o = Gtk.Widget.WidgetGetCanFocusMethodInfo
ResolveImageMethod "getCanTarget" o = Gtk.Widget.WidgetGetCanTargetMethodInfo
ResolveImageMethod "getChildVisible" o = Gtk.Widget.WidgetGetChildVisibleMethodInfo
ResolveImageMethod "getClipboard" o = Gtk.Widget.WidgetGetClipboardMethodInfo
ResolveImageMethod "getColor" o = Gtk.Widget.WidgetGetColorMethodInfo
ResolveImageMethod "getCssClasses" o = Gtk.Widget.WidgetGetCssClassesMethodInfo
ResolveImageMethod "getCssName" o = Gtk.Widget.WidgetGetCssNameMethodInfo
ResolveImageMethod "getCursor" o = Gtk.Widget.WidgetGetCursorMethodInfo
ResolveImageMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveImageMethod "getDirection" o = Gtk.Widget.WidgetGetDirectionMethodInfo
ResolveImageMethod "getDisplay" o = Gtk.Widget.WidgetGetDisplayMethodInfo
ResolveImageMethod "getFirstAccessibleChild" o = Gtk.Accessible.AccessibleGetFirstAccessibleChildMethodInfo
ResolveImageMethod "getFirstChild" o = Gtk.Widget.WidgetGetFirstChildMethodInfo
ResolveImageMethod "getFocusChild" o = Gtk.Widget.WidgetGetFocusChildMethodInfo
ResolveImageMethod "getFocusOnClick" o = Gtk.Widget.WidgetGetFocusOnClickMethodInfo
ResolveImageMethod "getFocusable" o = Gtk.Widget.WidgetGetFocusableMethodInfo
ResolveImageMethod "getFontMap" o = Gtk.Widget.WidgetGetFontMapMethodInfo
ResolveImageMethod "getFontOptions" o = Gtk.Widget.WidgetGetFontOptionsMethodInfo
ResolveImageMethod "getFrameClock" o = Gtk.Widget.WidgetGetFrameClockMethodInfo
ResolveImageMethod "getGicon" o = ImageGetGiconMethodInfo
ResolveImageMethod "getHalign" o = Gtk.Widget.WidgetGetHalignMethodInfo
ResolveImageMethod "getHasTooltip" o = Gtk.Widget.WidgetGetHasTooltipMethodInfo
ResolveImageMethod "getHeight" o = Gtk.Widget.WidgetGetHeightMethodInfo
ResolveImageMethod "getHexpand" o = Gtk.Widget.WidgetGetHexpandMethodInfo
ResolveImageMethod "getHexpandSet" o = Gtk.Widget.WidgetGetHexpandSetMethodInfo
ResolveImageMethod "getIconName" o = ImageGetIconNameMethodInfo
ResolveImageMethod "getIconSize" o = ImageGetIconSizeMethodInfo
ResolveImageMethod "getLastChild" o = Gtk.Widget.WidgetGetLastChildMethodInfo
ResolveImageMethod "getLayoutManager" o = Gtk.Widget.WidgetGetLayoutManagerMethodInfo
ResolveImageMethod "getMapped" o = Gtk.Widget.WidgetGetMappedMethodInfo
ResolveImageMethod "getMarginBottom" o = Gtk.Widget.WidgetGetMarginBottomMethodInfo
ResolveImageMethod "getMarginEnd" o = Gtk.Widget.WidgetGetMarginEndMethodInfo
ResolveImageMethod "getMarginStart" o = Gtk.Widget.WidgetGetMarginStartMethodInfo
ResolveImageMethod "getMarginTop" o = Gtk.Widget.WidgetGetMarginTopMethodInfo
ResolveImageMethod "getName" o = Gtk.Widget.WidgetGetNameMethodInfo
ResolveImageMethod "getNative" o = Gtk.Widget.WidgetGetNativeMethodInfo
ResolveImageMethod "getNextAccessibleSibling" o = Gtk.Accessible.AccessibleGetNextAccessibleSiblingMethodInfo
ResolveImageMethod "getNextSibling" o = Gtk.Widget.WidgetGetNextSiblingMethodInfo
ResolveImageMethod "getOpacity" o = Gtk.Widget.WidgetGetOpacityMethodInfo
ResolveImageMethod "getOverflow" o = Gtk.Widget.WidgetGetOverflowMethodInfo
ResolveImageMethod "getPaintable" o = ImageGetPaintableMethodInfo
ResolveImageMethod "getPangoContext" o = Gtk.Widget.WidgetGetPangoContextMethodInfo
ResolveImageMethod "getParent" o = Gtk.Widget.WidgetGetParentMethodInfo
ResolveImageMethod "getPixelSize" o = ImageGetPixelSizeMethodInfo
ResolveImageMethod "getPlatformState" o = Gtk.Accessible.AccessibleGetPlatformStateMethodInfo
ResolveImageMethod "getPreferredSize" o = Gtk.Widget.WidgetGetPreferredSizeMethodInfo
ResolveImageMethod "getPrevSibling" o = Gtk.Widget.WidgetGetPrevSiblingMethodInfo
ResolveImageMethod "getPrimaryClipboard" o = Gtk.Widget.WidgetGetPrimaryClipboardMethodInfo
ResolveImageMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveImageMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveImageMethod "getRealized" o = Gtk.Widget.WidgetGetRealizedMethodInfo
ResolveImageMethod "getReceivesDefault" o = Gtk.Widget.WidgetGetReceivesDefaultMethodInfo
ResolveImageMethod "getRequestMode" o = Gtk.Widget.WidgetGetRequestModeMethodInfo
ResolveImageMethod "getRoot" o = Gtk.Widget.WidgetGetRootMethodInfo
ResolveImageMethod "getScaleFactor" o = Gtk.Widget.WidgetGetScaleFactorMethodInfo
ResolveImageMethod "getSensitive" o = Gtk.Widget.WidgetGetSensitiveMethodInfo
ResolveImageMethod "getSettings" o = Gtk.Widget.WidgetGetSettingsMethodInfo
ResolveImageMethod "getSize" o = Gtk.Widget.WidgetGetSizeMethodInfo
ResolveImageMethod "getSizeRequest" o = Gtk.Widget.WidgetGetSizeRequestMethodInfo
ResolveImageMethod "getStateFlags" o = Gtk.Widget.WidgetGetStateFlagsMethodInfo
ResolveImageMethod "getStorageType" o = ImageGetStorageTypeMethodInfo
ResolveImageMethod "getStyleContext" o = Gtk.Widget.WidgetGetStyleContextMethodInfo
ResolveImageMethod "getTemplateChild" o = Gtk.Widget.WidgetGetTemplateChildMethodInfo
ResolveImageMethod "getTooltipMarkup" o = Gtk.Widget.WidgetGetTooltipMarkupMethodInfo
ResolveImageMethod "getTooltipText" o = Gtk.Widget.WidgetGetTooltipTextMethodInfo
ResolveImageMethod "getValign" o = Gtk.Widget.WidgetGetValignMethodInfo
ResolveImageMethod "getVexpand" o = Gtk.Widget.WidgetGetVexpandMethodInfo
ResolveImageMethod "getVexpandSet" o = Gtk.Widget.WidgetGetVexpandSetMethodInfo
ResolveImageMethod "getVisible" o = Gtk.Widget.WidgetGetVisibleMethodInfo
ResolveImageMethod "getWidth" o = Gtk.Widget.WidgetGetWidthMethodInfo
ResolveImageMethod "setAccessibleParent" o = Gtk.Accessible.AccessibleSetAccessibleParentMethodInfo
ResolveImageMethod "setCanFocus" o = Gtk.Widget.WidgetSetCanFocusMethodInfo
ResolveImageMethod "setCanTarget" o = Gtk.Widget.WidgetSetCanTargetMethodInfo
ResolveImageMethod "setChildVisible" o = Gtk.Widget.WidgetSetChildVisibleMethodInfo
ResolveImageMethod "setCssClasses" o = Gtk.Widget.WidgetSetCssClassesMethodInfo
ResolveImageMethod "setCursor" o = Gtk.Widget.WidgetSetCursorMethodInfo
ResolveImageMethod "setCursorFromName" o = Gtk.Widget.WidgetSetCursorFromNameMethodInfo
ResolveImageMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveImageMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveImageMethod "setDirection" o = Gtk.Widget.WidgetSetDirectionMethodInfo
ResolveImageMethod "setFocusChild" o = Gtk.Widget.WidgetSetFocusChildMethodInfo
ResolveImageMethod "setFocusOnClick" o = Gtk.Widget.WidgetSetFocusOnClickMethodInfo
ResolveImageMethod "setFocusable" o = Gtk.Widget.WidgetSetFocusableMethodInfo
ResolveImageMethod "setFontMap" o = Gtk.Widget.WidgetSetFontMapMethodInfo
ResolveImageMethod "setFontOptions" o = Gtk.Widget.WidgetSetFontOptionsMethodInfo
ResolveImageMethod "setFromFile" o = ImageSetFromFileMethodInfo
ResolveImageMethod "setFromGicon" o = ImageSetFromGiconMethodInfo
ResolveImageMethod "setFromIconName" o = ImageSetFromIconNameMethodInfo
ResolveImageMethod "setFromPaintable" o = ImageSetFromPaintableMethodInfo
ResolveImageMethod "setFromPixbuf" o = ImageSetFromPixbufMethodInfo
ResolveImageMethod "setFromResource" o = ImageSetFromResourceMethodInfo
ResolveImageMethod "setHalign" o = Gtk.Widget.WidgetSetHalignMethodInfo
ResolveImageMethod "setHasTooltip" o = Gtk.Widget.WidgetSetHasTooltipMethodInfo
ResolveImageMethod "setHexpand" o = Gtk.Widget.WidgetSetHexpandMethodInfo
ResolveImageMethod "setHexpandSet" o = Gtk.Widget.WidgetSetHexpandSetMethodInfo
ResolveImageMethod "setIconSize" o = ImageSetIconSizeMethodInfo
ResolveImageMethod "setLayoutManager" o = Gtk.Widget.WidgetSetLayoutManagerMethodInfo
ResolveImageMethod "setMarginBottom" o = Gtk.Widget.WidgetSetMarginBottomMethodInfo
ResolveImageMethod "setMarginEnd" o = Gtk.Widget.WidgetSetMarginEndMethodInfo
ResolveImageMethod "setMarginStart" o = Gtk.Widget.WidgetSetMarginStartMethodInfo
ResolveImageMethod "setMarginTop" o = Gtk.Widget.WidgetSetMarginTopMethodInfo
ResolveImageMethod "setName" o = Gtk.Widget.WidgetSetNameMethodInfo
ResolveImageMethod "setOpacity" o = Gtk.Widget.WidgetSetOpacityMethodInfo
ResolveImageMethod "setOverflow" o = Gtk.Widget.WidgetSetOverflowMethodInfo
ResolveImageMethod "setParent" o = Gtk.Widget.WidgetSetParentMethodInfo
ResolveImageMethod "setPixelSize" o = ImageSetPixelSizeMethodInfo
ResolveImageMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveImageMethod "setReceivesDefault" o = Gtk.Widget.WidgetSetReceivesDefaultMethodInfo
ResolveImageMethod "setSensitive" o = Gtk.Widget.WidgetSetSensitiveMethodInfo
ResolveImageMethod "setSizeRequest" o = Gtk.Widget.WidgetSetSizeRequestMethodInfo
ResolveImageMethod "setStateFlags" o = Gtk.Widget.WidgetSetStateFlagsMethodInfo
ResolveImageMethod "setTooltipMarkup" o = Gtk.Widget.WidgetSetTooltipMarkupMethodInfo
ResolveImageMethod "setTooltipText" o = Gtk.Widget.WidgetSetTooltipTextMethodInfo
ResolveImageMethod "setValign" o = Gtk.Widget.WidgetSetValignMethodInfo
ResolveImageMethod "setVexpand" o = Gtk.Widget.WidgetSetVexpandMethodInfo
ResolveImageMethod "setVexpandSet" o = Gtk.Widget.WidgetSetVexpandSetMethodInfo
ResolveImageMethod "setVisible" o = Gtk.Widget.WidgetSetVisibleMethodInfo
ResolveImageMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveImageMethod t Image, O.OverloadedMethod info Image p) => OL.IsLabel t (Image -> 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 ~ ResolveImageMethod t Image, O.OverloadedMethod info Image p, R.HasField t Image p) => R.HasField t Image p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveImageMethod t Image, O.OverloadedMethodInfo info Image) => OL.IsLabel t (O.MethodProxy info Image) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
getImageFile :: (MonadIO m, IsImage o) => o -> m (Maybe T.Text)
getImageFile :: forall (m :: * -> *) o.
(MonadIO m, IsImage o) =>
o -> m (Maybe Text)
getImageFile 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
"file"
setImageFile :: (MonadIO m, IsImage o) => o -> T.Text -> m ()
setImageFile :: forall (m :: * -> *) o. (MonadIO m, IsImage o) => o -> Text -> m ()
setImageFile 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
"file" (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
val)
constructImageFile :: (IsImage o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructImageFile :: forall o (m :: * -> *).
(IsImage o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructImageFile 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
"file" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)
clearImageFile :: (MonadIO m, IsImage o) => o -> m ()
clearImageFile :: forall (m :: * -> *) o. (MonadIO m, IsImage o) => o -> m ()
clearImageFile 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
"file" (Maybe Text
forall a. Maybe a
Nothing :: Maybe T.Text)
#if defined(ENABLE_OVERLOADING)
data ImageFilePropertyInfo
instance AttrInfo ImageFilePropertyInfo where
type AttrAllowedOps ImageFilePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint ImageFilePropertyInfo = IsImage
type AttrSetTypeConstraint ImageFilePropertyInfo = (~) T.Text
type AttrTransferTypeConstraint ImageFilePropertyInfo = (~) T.Text
type AttrTransferType ImageFilePropertyInfo = T.Text
type AttrGetType ImageFilePropertyInfo = (Maybe T.Text)
type AttrLabel ImageFilePropertyInfo = "file"
type AttrOrigin ImageFilePropertyInfo = Image
attrGet = getImageFile
attrSet = setImageFile
attrTransfer _ v = do
return v
attrConstruct = constructImageFile
attrClear = clearImageFile
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Image.file"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.8/docs/GI-Gtk-Objects-Image.html#g:attr:file"
})
#endif
getImageGicon :: (MonadIO m, IsImage o) => o -> m (Maybe Gio.Icon.Icon)
getImageGicon :: forall (m :: * -> *) o.
(MonadIO m, IsImage o) =>
o -> m (Maybe Icon)
getImageGicon o
obj = IO (Maybe Icon) -> m (Maybe Icon)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe Icon) -> m (Maybe Icon))
-> IO (Maybe Icon) -> m (Maybe Icon)
forall a b. (a -> b) -> a -> b
$ o -> String -> (ManagedPtr Icon -> Icon) -> IO (Maybe Icon)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"gicon" ManagedPtr Icon -> Icon
Gio.Icon.Icon
setImageGicon :: (MonadIO m, IsImage o, Gio.Icon.IsIcon a) => o -> a -> m ()
setImageGicon :: forall (m :: * -> *) o a.
(MonadIO m, IsImage o, IsIcon a) =>
o -> a -> m ()
setImageGicon 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
"gicon" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)
constructImageGicon :: (IsImage o, MIO.MonadIO m, Gio.Icon.IsIcon a) => a -> m (GValueConstruct o)
constructImageGicon :: forall o (m :: * -> *) a.
(IsImage o, MonadIO m, IsIcon a) =>
a -> m (GValueConstruct o)
constructImageGicon 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
"gicon" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)
clearImageGicon :: (MonadIO m, IsImage o) => o -> m ()
clearImageGicon :: forall (m :: * -> *) o. (MonadIO m, IsImage o) => o -> m ()
clearImageGicon 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 Icon -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"gicon" (Maybe Icon
forall a. Maybe a
Nothing :: Maybe Gio.Icon.Icon)
#if defined(ENABLE_OVERLOADING)
data ImageGiconPropertyInfo
instance AttrInfo ImageGiconPropertyInfo where
type AttrAllowedOps ImageGiconPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint ImageGiconPropertyInfo = IsImage
type AttrSetTypeConstraint ImageGiconPropertyInfo = Gio.Icon.IsIcon
type AttrTransferTypeConstraint ImageGiconPropertyInfo = Gio.Icon.IsIcon
type AttrTransferType ImageGiconPropertyInfo = Gio.Icon.Icon
type AttrGetType ImageGiconPropertyInfo = (Maybe Gio.Icon.Icon)
type AttrLabel ImageGiconPropertyInfo = "gicon"
type AttrOrigin ImageGiconPropertyInfo = Image
attrGet = getImageGicon
attrSet = setImageGicon
attrTransfer _ v = do
unsafeCastTo Gio.Icon.Icon v
attrConstruct = constructImageGicon
attrClear = clearImageGicon
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Image.gicon"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.8/docs/GI-Gtk-Objects-Image.html#g:attr:gicon"
})
#endif
getImageIconName :: (MonadIO m, IsImage o) => o -> m (Maybe T.Text)
getImageIconName :: forall (m :: * -> *) o.
(MonadIO m, IsImage o) =>
o -> m (Maybe Text)
getImageIconName 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
"icon-name"
setImageIconName :: (MonadIO m, IsImage o) => o -> T.Text -> m ()
setImageIconName :: forall (m :: * -> *) o. (MonadIO m, IsImage o) => o -> Text -> m ()
setImageIconName 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
"icon-name" (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
val)
constructImageIconName :: (IsImage o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructImageIconName :: forall o (m :: * -> *).
(IsImage o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructImageIconName 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
"icon-name" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)
clearImageIconName :: (MonadIO m, IsImage o) => o -> m ()
clearImageIconName :: forall (m :: * -> *) o. (MonadIO m, IsImage o) => o -> m ()
clearImageIconName 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
"icon-name" (Maybe Text
forall a. Maybe a
Nothing :: Maybe T.Text)
#if defined(ENABLE_OVERLOADING)
data ImageIconNamePropertyInfo
instance AttrInfo ImageIconNamePropertyInfo where
type AttrAllowedOps ImageIconNamePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint ImageIconNamePropertyInfo = IsImage
type AttrSetTypeConstraint ImageIconNamePropertyInfo = (~) T.Text
type AttrTransferTypeConstraint ImageIconNamePropertyInfo = (~) T.Text
type AttrTransferType ImageIconNamePropertyInfo = T.Text
type AttrGetType ImageIconNamePropertyInfo = (Maybe T.Text)
type AttrLabel ImageIconNamePropertyInfo = "icon-name"
type AttrOrigin ImageIconNamePropertyInfo = Image
attrGet = getImageIconName
attrSet = setImageIconName
attrTransfer _ v = do
return v
attrConstruct = constructImageIconName
attrClear = clearImageIconName
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Image.iconName"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.8/docs/GI-Gtk-Objects-Image.html#g:attr:iconName"
})
#endif
getImageIconSize :: (MonadIO m, IsImage o) => o -> m Gtk.Enums.IconSize
getImageIconSize :: forall (m :: * -> *) o. (MonadIO m, IsImage o) => o -> m IconSize
getImageIconSize o
obj = IO IconSize -> m IconSize
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO IconSize -> m IconSize) -> IO IconSize -> m IconSize
forall a b. (a -> b) -> a -> b
$ o -> String -> IO IconSize
forall a b. (GObject a, Enum b, BoxedEnum b) => a -> String -> IO b
B.Properties.getObjectPropertyEnum o
obj String
"icon-size"
setImageIconSize :: (MonadIO m, IsImage o) => o -> Gtk.Enums.IconSize -> m ()
setImageIconSize :: forall (m :: * -> *) o.
(MonadIO m, IsImage o) =>
o -> IconSize -> m ()
setImageIconSize o
obj IconSize
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 -> IconSize -> IO ()
forall a b.
(GObject a, Enum b, BoxedEnum b) =>
a -> String -> b -> IO ()
B.Properties.setObjectPropertyEnum o
obj String
"icon-size" IconSize
val
constructImageIconSize :: (IsImage o, MIO.MonadIO m) => Gtk.Enums.IconSize -> m (GValueConstruct o)
constructImageIconSize :: forall o (m :: * -> *).
(IsImage o, MonadIO m) =>
IconSize -> m (GValueConstruct o)
constructImageIconSize IconSize
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 -> IconSize -> IO (GValueConstruct o)
forall a o.
(Enum a, BoxedEnum a) =>
String -> a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyEnum String
"icon-size" IconSize
val
#if defined(ENABLE_OVERLOADING)
data ImageIconSizePropertyInfo
instance AttrInfo ImageIconSizePropertyInfo where
type AttrAllowedOps ImageIconSizePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint ImageIconSizePropertyInfo = IsImage
type AttrSetTypeConstraint ImageIconSizePropertyInfo = (~) Gtk.Enums.IconSize
type AttrTransferTypeConstraint ImageIconSizePropertyInfo = (~) Gtk.Enums.IconSize
type AttrTransferType ImageIconSizePropertyInfo = Gtk.Enums.IconSize
type AttrGetType ImageIconSizePropertyInfo = Gtk.Enums.IconSize
type AttrLabel ImageIconSizePropertyInfo = "icon-size"
type AttrOrigin ImageIconSizePropertyInfo = Image
attrGet = getImageIconSize
attrSet = setImageIconSize
attrTransfer _ v = do
return v
attrConstruct = constructImageIconSize
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Image.iconSize"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.8/docs/GI-Gtk-Objects-Image.html#g:attr:iconSize"
})
#endif
getImagePaintable :: (MonadIO m, IsImage o) => o -> m (Maybe Gdk.Paintable.Paintable)
getImagePaintable :: forall (m :: * -> *) o.
(MonadIO m, IsImage o) =>
o -> m (Maybe Paintable)
getImagePaintable 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
setImagePaintable :: (MonadIO m, IsImage o, Gdk.Paintable.IsPaintable a) => o -> a -> m ()
setImagePaintable :: forall (m :: * -> *) o a.
(MonadIO m, IsImage o, IsPaintable a) =>
o -> a -> m ()
setImagePaintable 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)
constructImagePaintable :: (IsImage o, MIO.MonadIO m, Gdk.Paintable.IsPaintable a) => a -> m (GValueConstruct o)
constructImagePaintable :: forall o (m :: * -> *) a.
(IsImage o, MonadIO m, IsPaintable a) =>
a -> m (GValueConstruct o)
constructImagePaintable 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)
clearImagePaintable :: (MonadIO m, IsImage o) => o -> m ()
clearImagePaintable :: forall (m :: * -> *) o. (MonadIO m, IsImage o) => o -> m ()
clearImagePaintable 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 ImagePaintablePropertyInfo
instance AttrInfo ImagePaintablePropertyInfo where
type AttrAllowedOps ImagePaintablePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint ImagePaintablePropertyInfo = IsImage
type AttrSetTypeConstraint ImagePaintablePropertyInfo = Gdk.Paintable.IsPaintable
type AttrTransferTypeConstraint ImagePaintablePropertyInfo = Gdk.Paintable.IsPaintable
type AttrTransferType ImagePaintablePropertyInfo = Gdk.Paintable.Paintable
type AttrGetType ImagePaintablePropertyInfo = (Maybe Gdk.Paintable.Paintable)
type AttrLabel ImagePaintablePropertyInfo = "paintable"
type AttrOrigin ImagePaintablePropertyInfo = Image
attrGet = getImagePaintable
attrSet = setImagePaintable
attrTransfer _ v = do
unsafeCastTo Gdk.Paintable.Paintable v
attrConstruct = constructImagePaintable
attrClear = clearImagePaintable
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Image.paintable"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.8/docs/GI-Gtk-Objects-Image.html#g:attr:paintable"
})
#endif
getImagePixelSize :: (MonadIO m, IsImage o) => o -> m Int32
getImagePixelSize :: forall (m :: * -> *) o. (MonadIO m, IsImage o) => o -> m Int32
getImagePixelSize o
obj = IO Int32 -> m Int32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Int32
forall a. GObject a => a -> String -> IO Int32
B.Properties.getObjectPropertyInt32 o
obj String
"pixel-size"
setImagePixelSize :: (MonadIO m, IsImage o) => o -> Int32 -> m ()
setImagePixelSize :: forall (m :: * -> *) o.
(MonadIO m, IsImage o) =>
o -> Int32 -> m ()
setImagePixelSize o
obj Int32
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 -> Int32 -> IO ()
forall a. GObject a => a -> String -> Int32 -> IO ()
B.Properties.setObjectPropertyInt32 o
obj String
"pixel-size" Int32
val
constructImagePixelSize :: (IsImage o, MIO.MonadIO m) => Int32 -> m (GValueConstruct o)
constructImagePixelSize :: forall o (m :: * -> *).
(IsImage o, MonadIO m) =>
Int32 -> m (GValueConstruct o)
constructImagePixelSize Int32
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 -> Int32 -> IO (GValueConstruct o)
forall o. String -> Int32 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyInt32 String
"pixel-size" Int32
val
#if defined(ENABLE_OVERLOADING)
data ImagePixelSizePropertyInfo
instance AttrInfo ImagePixelSizePropertyInfo where
type AttrAllowedOps ImagePixelSizePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint ImagePixelSizePropertyInfo = IsImage
type AttrSetTypeConstraint ImagePixelSizePropertyInfo = (~) Int32
type AttrTransferTypeConstraint ImagePixelSizePropertyInfo = (~) Int32
type AttrTransferType ImagePixelSizePropertyInfo = Int32
type AttrGetType ImagePixelSizePropertyInfo = Int32
type AttrLabel ImagePixelSizePropertyInfo = "pixel-size"
type AttrOrigin ImagePixelSizePropertyInfo = Image
attrGet = getImagePixelSize
attrSet = setImagePixelSize
attrTransfer _ v = do
return v
attrConstruct = constructImagePixelSize
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Image.pixelSize"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.8/docs/GI-Gtk-Objects-Image.html#g:attr:pixelSize"
})
#endif
getImageResource :: (MonadIO m, IsImage o) => o -> m (Maybe T.Text)
getImageResource :: forall (m :: * -> *) o.
(MonadIO m, IsImage o) =>
o -> m (Maybe Text)
getImageResource 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
"resource"
setImageResource :: (MonadIO m, IsImage o) => o -> T.Text -> m ()
setImageResource :: forall (m :: * -> *) o. (MonadIO m, IsImage o) => o -> Text -> m ()
setImageResource 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
"resource" (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
val)
constructImageResource :: (IsImage o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructImageResource :: forall o (m :: * -> *).
(IsImage o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructImageResource 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
"resource" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)
clearImageResource :: (MonadIO m, IsImage o) => o -> m ()
clearImageResource :: forall (m :: * -> *) o. (MonadIO m, IsImage o) => o -> m ()
clearImageResource 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
"resource" (Maybe Text
forall a. Maybe a
Nothing :: Maybe T.Text)
#if defined(ENABLE_OVERLOADING)
data ImageResourcePropertyInfo
instance AttrInfo ImageResourcePropertyInfo where
type AttrAllowedOps ImageResourcePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint ImageResourcePropertyInfo = IsImage
type AttrSetTypeConstraint ImageResourcePropertyInfo = (~) T.Text
type AttrTransferTypeConstraint ImageResourcePropertyInfo = (~) T.Text
type AttrTransferType ImageResourcePropertyInfo = T.Text
type AttrGetType ImageResourcePropertyInfo = (Maybe T.Text)
type AttrLabel ImageResourcePropertyInfo = "resource"
type AttrOrigin ImageResourcePropertyInfo = Image
attrGet = getImageResource
attrSet = setImageResource
attrTransfer _ v = do
return v
attrConstruct = constructImageResource
attrClear = clearImageResource
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Image.resource"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.8/docs/GI-Gtk-Objects-Image.html#g:attr:resource"
})
#endif
getImageStorageType :: (MonadIO m, IsImage o) => o -> m Gtk.Enums.ImageType
getImageStorageType :: forall (m :: * -> *) o. (MonadIO m, IsImage o) => o -> m ImageType
getImageStorageType o
obj = IO ImageType -> m ImageType
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO ImageType -> m ImageType) -> IO ImageType -> m ImageType
forall a b. (a -> b) -> a -> b
$ o -> String -> IO ImageType
forall a b. (GObject a, Enum b, BoxedEnum b) => a -> String -> IO b
B.Properties.getObjectPropertyEnum o
obj String
"storage-type"
#if defined(ENABLE_OVERLOADING)
data ImageStorageTypePropertyInfo
instance AttrInfo ImageStorageTypePropertyInfo where
type AttrAllowedOps ImageStorageTypePropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint ImageStorageTypePropertyInfo = IsImage
type AttrSetTypeConstraint ImageStorageTypePropertyInfo = (~) ()
type AttrTransferTypeConstraint ImageStorageTypePropertyInfo = (~) ()
type AttrTransferType ImageStorageTypePropertyInfo = ()
type AttrGetType ImageStorageTypePropertyInfo = Gtk.Enums.ImageType
type AttrLabel ImageStorageTypePropertyInfo = "storage-type"
type AttrOrigin ImageStorageTypePropertyInfo = Image
attrGet = getImageStorageType
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Image.storageType"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.8/docs/GI-Gtk-Objects-Image.html#g:attr:storageType"
})
#endif
getImageUseFallback :: (MonadIO m, IsImage o) => o -> m Bool
getImageUseFallback :: forall (m :: * -> *) o. (MonadIO m, IsImage o) => o -> m Bool
getImageUseFallback 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
"use-fallback"
setImageUseFallback :: (MonadIO m, IsImage o) => o -> Bool -> m ()
setImageUseFallback :: forall (m :: * -> *) o. (MonadIO m, IsImage o) => o -> Bool -> m ()
setImageUseFallback 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
"use-fallback" Bool
val
constructImageUseFallback :: (IsImage o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructImageUseFallback :: forall o (m :: * -> *).
(IsImage o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructImageUseFallback 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
"use-fallback" Bool
val
#if defined(ENABLE_OVERLOADING)
data ImageUseFallbackPropertyInfo
instance AttrInfo ImageUseFallbackPropertyInfo where
type AttrAllowedOps ImageUseFallbackPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint ImageUseFallbackPropertyInfo = IsImage
type AttrSetTypeConstraint ImageUseFallbackPropertyInfo = (~) Bool
type AttrTransferTypeConstraint ImageUseFallbackPropertyInfo = (~) Bool
type AttrTransferType ImageUseFallbackPropertyInfo = Bool
type AttrGetType ImageUseFallbackPropertyInfo = Bool
type AttrLabel ImageUseFallbackPropertyInfo = "use-fallback"
type AttrOrigin ImageUseFallbackPropertyInfo = Image
attrGet = getImageUseFallback
attrSet = setImageUseFallback
attrTransfer _ v = do
return v
attrConstruct = constructImageUseFallback
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Image.useFallback"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.8/docs/GI-Gtk-Objects-Image.html#g:attr:useFallback"
})
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Image
type instance O.AttributeList Image = ImageAttributeList
type ImageAttributeList = ('[ '("accessibleRole", Gtk.Accessible.AccessibleAccessibleRolePropertyInfo), '("canFocus", Gtk.Widget.WidgetCanFocusPropertyInfo), '("canTarget", Gtk.Widget.WidgetCanTargetPropertyInfo), '("cssClasses", Gtk.Widget.WidgetCssClassesPropertyInfo), '("cssName", Gtk.Widget.WidgetCssNamePropertyInfo), '("cursor", Gtk.Widget.WidgetCursorPropertyInfo), '("file", ImageFilePropertyInfo), '("focusOnClick", Gtk.Widget.WidgetFocusOnClickPropertyInfo), '("focusable", Gtk.Widget.WidgetFocusablePropertyInfo), '("gicon", ImageGiconPropertyInfo), '("halign", Gtk.Widget.WidgetHalignPropertyInfo), '("hasDefault", Gtk.Widget.WidgetHasDefaultPropertyInfo), '("hasFocus", Gtk.Widget.WidgetHasFocusPropertyInfo), '("hasTooltip", Gtk.Widget.WidgetHasTooltipPropertyInfo), '("heightRequest", Gtk.Widget.WidgetHeightRequestPropertyInfo), '("hexpand", Gtk.Widget.WidgetHexpandPropertyInfo), '("hexpandSet", Gtk.Widget.WidgetHexpandSetPropertyInfo), '("iconName", ImageIconNamePropertyInfo), '("iconSize", ImageIconSizePropertyInfo), '("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", ImagePaintablePropertyInfo), '("parent", Gtk.Widget.WidgetParentPropertyInfo), '("pixelSize", ImagePixelSizePropertyInfo), '("receivesDefault", Gtk.Widget.WidgetReceivesDefaultPropertyInfo), '("resource", ImageResourcePropertyInfo), '("root", Gtk.Widget.WidgetRootPropertyInfo), '("scaleFactor", Gtk.Widget.WidgetScaleFactorPropertyInfo), '("sensitive", Gtk.Widget.WidgetSensitivePropertyInfo), '("storageType", ImageStorageTypePropertyInfo), '("tooltipMarkup", Gtk.Widget.WidgetTooltipMarkupPropertyInfo), '("tooltipText", Gtk.Widget.WidgetTooltipTextPropertyInfo), '("useFallback", ImageUseFallbackPropertyInfo), '("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)
imageFile :: AttrLabelProxy "file"
imageFile = AttrLabelProxy
imageGicon :: AttrLabelProxy "gicon"
imageGicon = AttrLabelProxy
imageIconName :: AttrLabelProxy "iconName"
imageIconName = AttrLabelProxy
imageIconSize :: AttrLabelProxy "iconSize"
imageIconSize = AttrLabelProxy
imagePaintable :: AttrLabelProxy "paintable"
imagePaintable = AttrLabelProxy
imagePixelSize :: AttrLabelProxy "pixelSize"
imagePixelSize = AttrLabelProxy
imageResource :: AttrLabelProxy "resource"
imageResource = AttrLabelProxy
imageStorageType :: AttrLabelProxy "storageType"
imageStorageType = AttrLabelProxy
imageUseFallback :: AttrLabelProxy "useFallback"
imageUseFallback = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList Image = ImageSignalList
type ImageSignalList = ('[ '("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_image_new" gtk_image_new ::
IO (Ptr Image)
imageNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
m Image
imageNew :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m Image
imageNew = IO Image -> m Image
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Image -> m Image) -> IO Image -> m Image
forall a b. (a -> b) -> a -> b
$ do
Ptr Image
result <- IO (Ptr Image)
gtk_image_new
Text -> Ptr Image -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"imageNew" Ptr Image
result
Image
result' <- ((ManagedPtr Image -> Image) -> Ptr Image -> IO Image
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Image -> Image
Image) Ptr Image
result
Image -> IO Image
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Image
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_image_new_from_file" gtk_image_new_from_file ::
CString ->
IO (Ptr Image)
imageNewFromFile ::
(B.CallStack.HasCallStack, MonadIO m) =>
[Char]
-> m Image
imageNewFromFile :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
String -> m Image
imageNewFromFile String
filename = IO Image -> m Image
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Image -> m Image) -> IO Image -> m Image
forall a b. (a -> b) -> a -> b
$ do
CString
filename' <- String -> IO CString
stringToCString String
filename
Ptr Image
result <- CString -> IO (Ptr Image)
gtk_image_new_from_file CString
filename'
Text -> Ptr Image -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"imageNewFromFile" Ptr Image
result
Image
result' <- ((ManagedPtr Image -> Image) -> Ptr Image -> IO Image
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Image -> Image
Image) Ptr Image
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
filename'
Image -> IO Image
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Image
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_image_new_from_gicon" gtk_image_new_from_gicon ::
Ptr Gio.Icon.Icon ->
IO (Ptr Image)
imageNewFromGicon ::
(B.CallStack.HasCallStack, MonadIO m, Gio.Icon.IsIcon a) =>
a
-> m Image
imageNewFromGicon :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsIcon a) =>
a -> m Image
imageNewFromGicon a
icon = IO Image -> m Image
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Image -> m Image) -> IO Image -> m Image
forall a b. (a -> b) -> a -> b
$ do
Ptr Icon
icon' <- a -> IO (Ptr Icon)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
icon
Ptr Image
result <- Ptr Icon -> IO (Ptr Image)
gtk_image_new_from_gicon Ptr Icon
icon'
Text -> Ptr Image -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"imageNewFromGicon" Ptr Image
result
Image
result' <- ((ManagedPtr Image -> Image) -> Ptr Image -> IO Image
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Image -> Image
Image) Ptr Image
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
icon
Image -> IO Image
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Image
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_image_new_from_icon_name" gtk_image_new_from_icon_name ::
CString ->
IO (Ptr Image)
imageNewFromIconName ::
(B.CallStack.HasCallStack, MonadIO m) =>
Maybe (T.Text)
-> m Image
imageNewFromIconName :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Maybe Text -> m Image
imageNewFromIconName Maybe Text
iconName = IO Image -> m Image
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Image -> m Image) -> IO Image -> m Image
forall a b. (a -> b) -> a -> b
$ do
CString
maybeIconName <- case Maybe Text
iconName of
Maybe Text
Nothing -> CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just Text
jIconName -> do
CString
jIconName' <- Text -> IO CString
textToCString Text
jIconName
CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jIconName'
Ptr Image
result <- CString -> IO (Ptr Image)
gtk_image_new_from_icon_name CString
maybeIconName
Text -> Ptr Image -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"imageNewFromIconName" Ptr Image
result
Image
result' <- ((ManagedPtr Image -> Image) -> Ptr Image -> IO Image
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Image -> Image
Image) Ptr Image
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeIconName
Image -> IO Image
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Image
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_image_new_from_paintable" gtk_image_new_from_paintable ::
Ptr Gdk.Paintable.Paintable ->
IO (Ptr Image)
imageNewFromPaintable ::
(B.CallStack.HasCallStack, MonadIO m, Gdk.Paintable.IsPaintable a) =>
Maybe (a)
-> m Image
imageNewFromPaintable :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPaintable a) =>
Maybe a -> m Image
imageNewFromPaintable Maybe a
paintable = IO Image -> m Image
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Image -> m Image) -> IO Image -> m Image
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 Image
result <- Ptr Paintable -> IO (Ptr Image)
gtk_image_new_from_paintable Ptr Paintable
maybePaintable
Text -> Ptr Image -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"imageNewFromPaintable" Ptr Image
result
Image
result' <- ((ManagedPtr Image -> Image) -> Ptr Image -> IO Image
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Image -> Image
Image) Ptr Image
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
Image -> IO Image
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Image
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_image_new_from_pixbuf" gtk_image_new_from_pixbuf ::
Ptr GdkPixbuf.Pixbuf.Pixbuf ->
IO (Ptr Image)
imageNewFromPixbuf ::
(B.CallStack.HasCallStack, MonadIO m, GdkPixbuf.Pixbuf.IsPixbuf a) =>
Maybe (a)
-> m Image
imageNewFromPixbuf :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPixbuf a) =>
Maybe a -> m Image
imageNewFromPixbuf Maybe a
pixbuf = IO Image -> m Image
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Image -> m Image) -> IO Image -> m Image
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 Image
result <- Ptr Pixbuf -> IO (Ptr Image)
gtk_image_new_from_pixbuf Ptr Pixbuf
maybePixbuf
Text -> Ptr Image -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"imageNewFromPixbuf" Ptr Image
result
Image
result' <- ((ManagedPtr Image -> Image) -> Ptr Image -> IO Image
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Image -> Image
Image) Ptr Image
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
Image -> IO Image
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Image
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_image_new_from_resource" gtk_image_new_from_resource ::
CString ->
IO (Ptr Image)
imageNewFromResource ::
(B.CallStack.HasCallStack, MonadIO m) =>
T.Text
-> m Image
imageNewFromResource :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Text -> m Image
imageNewFromResource Text
resourcePath = IO Image -> m Image
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Image -> m Image) -> IO Image -> m Image
forall a b. (a -> b) -> a -> b
$ do
CString
resourcePath' <- Text -> IO CString
textToCString Text
resourcePath
Ptr Image
result <- CString -> IO (Ptr Image)
gtk_image_new_from_resource CString
resourcePath'
Text -> Ptr Image -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"imageNewFromResource" Ptr Image
result
Image
result' <- ((ManagedPtr Image -> Image) -> Ptr Image -> IO Image
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Image -> Image
Image) Ptr Image
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
resourcePath'
Image -> IO Image
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Image
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_image_clear" gtk_image_clear ::
Ptr Image ->
IO ()
imageClear ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m ()
imageClear :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m ()
imageClear a
image = 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 Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
Ptr Image -> IO ()
gtk_image_clear Ptr Image
image'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ImageClearMethodInfo
instance (signature ~ (m ()), MonadIO m, IsImage a) => O.OverloadedMethod ImageClearMethodInfo a signature where
overloadedMethod = imageClear
instance O.OverloadedMethodInfo ImageClearMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Image.imageClear",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.8/docs/GI-Gtk-Objects-Image.html#v:imageClear"
})
#endif
foreign import ccall "gtk_image_get_gicon" gtk_image_get_gicon ::
Ptr Image ->
IO (Ptr Gio.Icon.Icon)
imageGetGicon ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m (Maybe Gio.Icon.Icon)
imageGetGicon :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m (Maybe Icon)
imageGetGicon a
image = IO (Maybe Icon) -> m (Maybe Icon)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Icon) -> m (Maybe Icon))
-> IO (Maybe Icon) -> m (Maybe Icon)
forall a b. (a -> b) -> a -> b
$ do
Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
Ptr Icon
result <- Ptr Image -> IO (Ptr Icon)
gtk_image_get_gicon Ptr Image
image'
Maybe Icon
maybeResult <- Ptr Icon -> (Ptr Icon -> IO Icon) -> IO (Maybe Icon)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Icon
result ((Ptr Icon -> IO Icon) -> IO (Maybe Icon))
-> (Ptr Icon -> IO Icon) -> IO (Maybe Icon)
forall a b. (a -> b) -> a -> b
$ \Ptr Icon
result' -> do
Icon
result'' <- ((ManagedPtr Icon -> Icon) -> Ptr Icon -> IO Icon
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Icon -> Icon
Gio.Icon.Icon) Ptr Icon
result'
Icon -> IO Icon
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Icon
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
Maybe Icon -> IO (Maybe Icon)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Icon
maybeResult
#if defined(ENABLE_OVERLOADING)
data ImageGetGiconMethodInfo
instance (signature ~ (m (Maybe Gio.Icon.Icon)), MonadIO m, IsImage a) => O.OverloadedMethod ImageGetGiconMethodInfo a signature where
overloadedMethod = imageGetGicon
instance O.OverloadedMethodInfo ImageGetGiconMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Image.imageGetGicon",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.8/docs/GI-Gtk-Objects-Image.html#v:imageGetGicon"
})
#endif
foreign import ccall "gtk_image_get_icon_name" gtk_image_get_icon_name ::
Ptr Image ->
IO CString
imageGetIconName ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m (Maybe T.Text)
imageGetIconName :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m (Maybe Text)
imageGetIconName a
image = 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 Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
CString
result <- Ptr Image -> IO CString
gtk_image_get_icon_name Ptr Image
image'
Maybe Text
maybeResult <- CString -> (CString -> IO Text) -> IO (Maybe Text)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull CString
result ((CString -> IO Text) -> IO (Maybe Text))
-> (CString -> IO Text) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \CString
result' -> do
Text
result'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
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
image
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 ImageGetIconNameMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsImage a) => O.OverloadedMethod ImageGetIconNameMethodInfo a signature where
overloadedMethod = imageGetIconName
instance O.OverloadedMethodInfo ImageGetIconNameMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Image.imageGetIconName",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.8/docs/GI-Gtk-Objects-Image.html#v:imageGetIconName"
})
#endif
foreign import ccall "gtk_image_get_icon_size" gtk_image_get_icon_size ::
Ptr Image ->
IO CUInt
imageGetIconSize ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m Gtk.Enums.IconSize
imageGetIconSize :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m IconSize
imageGetIconSize a
image = IO IconSize -> m IconSize
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO IconSize -> m IconSize) -> IO IconSize -> m IconSize
forall a b. (a -> b) -> a -> b
$ do
Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
CUInt
result <- Ptr Image -> IO CUInt
gtk_image_get_icon_size Ptr Image
image'
let result' :: IconSize
result' = (Int -> IconSize
forall a. Enum a => Int -> a
toEnum (Int -> IconSize) -> (CUInt -> Int) -> CUInt -> IconSize
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
image
IconSize -> IO IconSize
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return IconSize
result'
#if defined(ENABLE_OVERLOADING)
data ImageGetIconSizeMethodInfo
instance (signature ~ (m Gtk.Enums.IconSize), MonadIO m, IsImage a) => O.OverloadedMethod ImageGetIconSizeMethodInfo a signature where
overloadedMethod = imageGetIconSize
instance O.OverloadedMethodInfo ImageGetIconSizeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Image.imageGetIconSize",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.8/docs/GI-Gtk-Objects-Image.html#v:imageGetIconSize"
})
#endif
foreign import ccall "gtk_image_get_paintable" gtk_image_get_paintable ::
Ptr Image ->
IO (Ptr Gdk.Paintable.Paintable)
imageGetPaintable ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m (Maybe Gdk.Paintable.Paintable)
imageGetPaintable :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m (Maybe Paintable)
imageGetPaintable a
image = 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 Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
Ptr Paintable
result <- Ptr Image -> IO (Ptr Paintable)
gtk_image_get_paintable Ptr Image
image'
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
image
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 ImageGetPaintableMethodInfo
instance (signature ~ (m (Maybe Gdk.Paintable.Paintable)), MonadIO m, IsImage a) => O.OverloadedMethod ImageGetPaintableMethodInfo a signature where
overloadedMethod = imageGetPaintable
instance O.OverloadedMethodInfo ImageGetPaintableMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Image.imageGetPaintable",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.8/docs/GI-Gtk-Objects-Image.html#v:imageGetPaintable"
})
#endif
foreign import ccall "gtk_image_get_pixel_size" gtk_image_get_pixel_size ::
Ptr Image ->
IO Int32
imageGetPixelSize ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m Int32
imageGetPixelSize :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Int32
imageGetPixelSize a
image = IO Int32 -> m Int32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
Int32
result <- Ptr Image -> IO Int32
gtk_image_get_pixel_size Ptr Image
image'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
Int32 -> IO Int32
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data ImageGetPixelSizeMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsImage a) => O.OverloadedMethod ImageGetPixelSizeMethodInfo a signature where
overloadedMethod = imageGetPixelSize
instance O.OverloadedMethodInfo ImageGetPixelSizeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Image.imageGetPixelSize",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.8/docs/GI-Gtk-Objects-Image.html#v:imageGetPixelSize"
})
#endif
foreign import ccall "gtk_image_get_storage_type" gtk_image_get_storage_type ::
Ptr Image ->
IO CUInt
imageGetStorageType ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m Gtk.Enums.ImageType
imageGetStorageType :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m ImageType
imageGetStorageType a
image = IO ImageType -> m ImageType
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ImageType -> m ImageType) -> IO ImageType -> m ImageType
forall a b. (a -> b) -> a -> b
$ do
Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
CUInt
result <- Ptr Image -> IO CUInt
gtk_image_get_storage_type Ptr Image
image'
let result' :: ImageType
result' = (Int -> ImageType
forall a. Enum a => Int -> a
toEnum (Int -> ImageType) -> (CUInt -> Int) -> CUInt -> ImageType
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
image
ImageType -> IO ImageType
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ImageType
result'
#if defined(ENABLE_OVERLOADING)
data ImageGetStorageTypeMethodInfo
instance (signature ~ (m Gtk.Enums.ImageType), MonadIO m, IsImage a) => O.OverloadedMethod ImageGetStorageTypeMethodInfo a signature where
overloadedMethod = imageGetStorageType
instance O.OverloadedMethodInfo ImageGetStorageTypeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Image.imageGetStorageType",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.8/docs/GI-Gtk-Objects-Image.html#v:imageGetStorageType"
})
#endif
foreign import ccall "gtk_image_set_from_file" gtk_image_set_from_file ::
Ptr Image ->
CString ->
IO ()
imageSetFromFile ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> Maybe ([Char])
-> m ()
imageSetFromFile :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Maybe String -> m ()
imageSetFromFile a
image 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 Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
CString
maybeFilename <- case Maybe String
filename of
Maybe String
Nothing -> CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just String
jFilename -> do
CString
jFilename' <- String -> IO CString
stringToCString String
jFilename
CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jFilename'
Ptr Image -> CString -> IO ()
gtk_image_set_from_file Ptr Image
image' CString
maybeFilename
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeFilename
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ImageSetFromFileMethodInfo
instance (signature ~ (Maybe ([Char]) -> m ()), MonadIO m, IsImage a) => O.OverloadedMethod ImageSetFromFileMethodInfo a signature where
overloadedMethod = imageSetFromFile
instance O.OverloadedMethodInfo ImageSetFromFileMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Image.imageSetFromFile",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.8/docs/GI-Gtk-Objects-Image.html#v:imageSetFromFile"
})
#endif
foreign import ccall "gtk_image_set_from_gicon" gtk_image_set_from_gicon ::
Ptr Image ->
Ptr Gio.Icon.Icon ->
IO ()
imageSetFromGicon ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a, Gio.Icon.IsIcon b) =>
a
-> b
-> m ()
imageSetFromGicon :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsImage a, IsIcon b) =>
a -> b -> m ()
imageSetFromGicon a
image b
icon = 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 Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
Ptr Icon
icon' <- b -> IO (Ptr Icon)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
icon
Ptr Image -> Ptr Icon -> IO ()
gtk_image_set_from_gicon Ptr Image
image' Ptr Icon
icon'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
icon
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ImageSetFromGiconMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsImage a, Gio.Icon.IsIcon b) => O.OverloadedMethod ImageSetFromGiconMethodInfo a signature where
overloadedMethod = imageSetFromGicon
instance O.OverloadedMethodInfo ImageSetFromGiconMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Image.imageSetFromGicon",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.8/docs/GI-Gtk-Objects-Image.html#v:imageSetFromGicon"
})
#endif
foreign import ccall "gtk_image_set_from_icon_name" gtk_image_set_from_icon_name ::
Ptr Image ->
CString ->
IO ()
imageSetFromIconName ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> Maybe (T.Text)
-> m ()
imageSetFromIconName :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Maybe Text -> m ()
imageSetFromIconName a
image Maybe Text
iconName = 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 Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
CString
maybeIconName <- case Maybe Text
iconName of
Maybe Text
Nothing -> CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just Text
jIconName -> do
CString
jIconName' <- Text -> IO CString
textToCString Text
jIconName
CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jIconName'
Ptr Image -> CString -> IO ()
gtk_image_set_from_icon_name Ptr Image
image' CString
maybeIconName
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeIconName
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ImageSetFromIconNameMethodInfo
instance (signature ~ (Maybe (T.Text) -> m ()), MonadIO m, IsImage a) => O.OverloadedMethod ImageSetFromIconNameMethodInfo a signature where
overloadedMethod = imageSetFromIconName
instance O.OverloadedMethodInfo ImageSetFromIconNameMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Image.imageSetFromIconName",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.8/docs/GI-Gtk-Objects-Image.html#v:imageSetFromIconName"
})
#endif
foreign import ccall "gtk_image_set_from_paintable" gtk_image_set_from_paintable ::
Ptr Image ->
Ptr Gdk.Paintable.Paintable ->
IO ()
imageSetFromPaintable ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a, Gdk.Paintable.IsPaintable b) =>
a
-> Maybe (b)
-> m ()
imageSetFromPaintable :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsImage a, IsPaintable b) =>
a -> Maybe b -> m ()
imageSetFromPaintable a
image 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 Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
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 Image -> Ptr Paintable -> IO ()
gtk_image_set_from_paintable Ptr Image
image' Ptr Paintable
maybePaintable
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
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 ImageSetFromPaintableMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsImage a, Gdk.Paintable.IsPaintable b) => O.OverloadedMethod ImageSetFromPaintableMethodInfo a signature where
overloadedMethod = imageSetFromPaintable
instance O.OverloadedMethodInfo ImageSetFromPaintableMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Image.imageSetFromPaintable",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.8/docs/GI-Gtk-Objects-Image.html#v:imageSetFromPaintable"
})
#endif
foreign import ccall "gtk_image_set_from_pixbuf" gtk_image_set_from_pixbuf ::
Ptr Image ->
Ptr GdkPixbuf.Pixbuf.Pixbuf ->
IO ()
imageSetFromPixbuf ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a, GdkPixbuf.Pixbuf.IsPixbuf b) =>
a
-> Maybe (b)
-> m ()
imageSetFromPixbuf :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsImage a, IsPixbuf b) =>
a -> Maybe b -> m ()
imageSetFromPixbuf a
image 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 Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
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 Image -> Ptr Pixbuf -> IO ()
gtk_image_set_from_pixbuf Ptr Image
image' Ptr Pixbuf
maybePixbuf
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
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 ImageSetFromPixbufMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsImage a, GdkPixbuf.Pixbuf.IsPixbuf b) => O.OverloadedMethod ImageSetFromPixbufMethodInfo a signature where
overloadedMethod = imageSetFromPixbuf
instance O.OverloadedMethodInfo ImageSetFromPixbufMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Image.imageSetFromPixbuf",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.8/docs/GI-Gtk-Objects-Image.html#v:imageSetFromPixbuf"
})
#endif
foreign import ccall "gtk_image_set_from_resource" gtk_image_set_from_resource ::
Ptr Image ->
CString ->
IO ()
imageSetFromResource ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> Maybe (T.Text)
-> m ()
imageSetFromResource :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Maybe Text -> m ()
imageSetFromResource a
image 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 Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
CString
maybeResourcePath <- case Maybe Text
resourcePath of
Maybe Text
Nothing -> CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just Text
jResourcePath -> do
CString
jResourcePath' <- Text -> IO CString
textToCString Text
jResourcePath
CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jResourcePath'
Ptr Image -> CString -> IO ()
gtk_image_set_from_resource Ptr Image
image' CString
maybeResourcePath
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeResourcePath
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ImageSetFromResourceMethodInfo
instance (signature ~ (Maybe (T.Text) -> m ()), MonadIO m, IsImage a) => O.OverloadedMethod ImageSetFromResourceMethodInfo a signature where
overloadedMethod = imageSetFromResource
instance O.OverloadedMethodInfo ImageSetFromResourceMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Image.imageSetFromResource",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.8/docs/GI-Gtk-Objects-Image.html#v:imageSetFromResource"
})
#endif
foreign import ccall "gtk_image_set_icon_size" gtk_image_set_icon_size ::
Ptr Image ->
CUInt ->
IO ()
imageSetIconSize ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> Gtk.Enums.IconSize
-> m ()
imageSetIconSize :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> IconSize -> m ()
imageSetIconSize a
image IconSize
iconSize = 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 Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
let iconSize' :: CUInt
iconSize' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (IconSize -> Int) -> IconSize -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. IconSize -> Int
forall a. Enum a => a -> Int
fromEnum) IconSize
iconSize
Ptr Image -> CUInt -> IO ()
gtk_image_set_icon_size Ptr Image
image' CUInt
iconSize'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ImageSetIconSizeMethodInfo
instance (signature ~ (Gtk.Enums.IconSize -> m ()), MonadIO m, IsImage a) => O.OverloadedMethod ImageSetIconSizeMethodInfo a signature where
overloadedMethod = imageSetIconSize
instance O.OverloadedMethodInfo ImageSetIconSizeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Image.imageSetIconSize",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.8/docs/GI-Gtk-Objects-Image.html#v:imageSetIconSize"
})
#endif
foreign import ccall "gtk_image_set_pixel_size" gtk_image_set_pixel_size ::
Ptr Image ->
Int32 ->
IO ()
imageSetPixelSize ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> Int32
-> m ()
imageSetPixelSize :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Int32 -> m ()
imageSetPixelSize a
image Int32
pixelSize = 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 Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
Ptr Image -> Int32 -> IO ()
gtk_image_set_pixel_size Ptr Image
image' Int32
pixelSize
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ImageSetPixelSizeMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m, IsImage a) => O.OverloadedMethod ImageSetPixelSizeMethodInfo a signature where
overloadedMethod = imageSetPixelSize
instance O.OverloadedMethodInfo ImageSetPixelSizeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Image.imageSetPixelSize",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.8/docs/GI-Gtk-Objects-Image.html#v:imageSetPixelSize"
})
#endif