{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- The t'GI.Gtk.Objects.Image.Image' widget displays an image. Various kinds of object
-- can be displayed as an image; most typically, you would load a
-- t'GI.Gdk.Objects.Texture.Texture' from a file, and then display that.
-- There’s a convenience function to do this, 'GI.Gtk.Objects.Image.imageNewFromFile',
-- used as follows:
-- 
-- === /C code/
-- >
-- >  GtkWidget *image;
-- >  image = gtk_image_new_from_file ("myfile.png");
-- 
-- If the file isn’t loaded successfully, the image will contain a
-- “broken image” icon similar to that used in many web browsers.
-- If you want to handle errors in loading the file yourself,
-- for example by displaying an error message, then load the image with
-- 'GI.Gdk.Objects.Texture.textureNewFromFile', then create the t'GI.Gtk.Objects.Image.Image' with
-- 'GI.Gtk.Objects.Image.imageNewFromPaintable'.
-- 
-- Sometimes an application will want to avoid depending on external data
-- files, such as image files. See the documentation of t'GI.Gio.Structs.Resource.Resource' for details.
-- In this case, the t'GI.Gtk.Objects.Image.Image':@/resource/@, 'GI.Gtk.Objects.Image.imageNewFromResource' and
-- 'GI.Gtk.Objects.Image.imageSetFromResource' should be used.
-- 
-- = CSS nodes
-- 
-- GtkImage has a single CSS node with the name image. The style classes
-- .normal-icons or .large-icons may appear, depending on the t'GI.Gtk.Objects.Image.Image':@/icon-size/@
-- property.

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

module GI.Gtk.Objects.Image
    ( 

-- * Exported types
    Image(..)                               ,
    IsImage                                 ,
    toImage                                 ,
    noImage                                 ,


 -- * Methods
-- ** Overloaded methods #method:Overloaded methods#

#if defined(ENABLE_OVERLOADING)
    ResolveImageMethod                      ,
#endif


-- ** clear #method:clear#

#if defined(ENABLE_OVERLOADING)
    ImageClearMethodInfo                    ,
#endif
    imageClear                              ,


-- ** getGicon #method:getGicon#

#if defined(ENABLE_OVERLOADING)
    ImageGetGiconMethodInfo                 ,
#endif
    imageGetGicon                           ,


-- ** getIconName #method:getIconName#

#if defined(ENABLE_OVERLOADING)
    ImageGetIconNameMethodInfo              ,
#endif
    imageGetIconName                        ,


-- ** getIconSize #method:getIconSize#

#if defined(ENABLE_OVERLOADING)
    ImageGetIconSizeMethodInfo              ,
#endif
    imageGetIconSize                        ,


-- ** getPaintable #method:getPaintable#

#if defined(ENABLE_OVERLOADING)
    ImageGetPaintableMethodInfo             ,
#endif
    imageGetPaintable                       ,


-- ** getPixelSize #method:getPixelSize#

#if defined(ENABLE_OVERLOADING)
    ImageGetPixelSizeMethodInfo             ,
#endif
    imageGetPixelSize                       ,


-- ** getStorageType #method:getStorageType#

#if defined(ENABLE_OVERLOADING)
    ImageGetStorageTypeMethodInfo           ,
#endif
    imageGetStorageType                     ,


-- ** new #method:new#

    imageNew                                ,


-- ** newFromFile #method:newFromFile#

    imageNewFromFile                        ,


-- ** newFromGicon #method:newFromGicon#

    imageNewFromGicon                       ,


-- ** newFromIconName #method:newFromIconName#

    imageNewFromIconName                    ,


-- ** newFromPaintable #method:newFromPaintable#

    imageNewFromPaintable                   ,


-- ** newFromPixbuf #method:newFromPixbuf#

    imageNewFromPixbuf                      ,


-- ** newFromResource #method:newFromResource#

    imageNewFromResource                    ,


-- ** setFromFile #method:setFromFile#

#if defined(ENABLE_OVERLOADING)
    ImageSetFromFileMethodInfo              ,
#endif
    imageSetFromFile                        ,


-- ** setFromGicon #method:setFromGicon#

#if defined(ENABLE_OVERLOADING)
    ImageSetFromGiconMethodInfo             ,
#endif
    imageSetFromGicon                       ,


-- ** setFromIconName #method:setFromIconName#

#if defined(ENABLE_OVERLOADING)
    ImageSetFromIconNameMethodInfo          ,
#endif
    imageSetFromIconName                    ,


-- ** setFromPaintable #method:setFromPaintable#

#if defined(ENABLE_OVERLOADING)
    ImageSetFromPaintableMethodInfo         ,
#endif
    imageSetFromPaintable                   ,


-- ** setFromPixbuf #method:setFromPixbuf#

#if defined(ENABLE_OVERLOADING)
    ImageSetFromPixbufMethodInfo            ,
#endif
    imageSetFromPixbuf                      ,


-- ** setFromResource #method:setFromResource#

#if defined(ENABLE_OVERLOADING)
    ImageSetFromResourceMethodInfo          ,
#endif
    imageSetFromResource                    ,


-- ** setIconSize #method:setIconSize#

#if defined(ENABLE_OVERLOADING)
    ImageSetIconSizeMethodInfo              ,
#endif
    imageSetIconSize                        ,


-- ** setPixelSize #method:setPixelSize#

#if defined(ENABLE_OVERLOADING)
    ImageSetPixelSizeMethodInfo             ,
#endif
    imageSetPixelSize                       ,




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

#if defined(ENABLE_OVERLOADING)
    ImageFilePropertyInfo                   ,
#endif
    clearImageFile                          ,
    constructImageFile                      ,
    getImageFile                            ,
#if defined(ENABLE_OVERLOADING)
    imageFile                               ,
#endif
    setImageFile                            ,


-- ** gicon #attr:gicon#
-- | The GIcon displayed in the GtkImage. For themed icons,
-- If the icon theme is changed, the image will be updated
-- automatically.

#if defined(ENABLE_OVERLOADING)
    ImageGiconPropertyInfo                  ,
#endif
    clearImageGicon                         ,
    constructImageGicon                     ,
    getImageGicon                           ,
#if defined(ENABLE_OVERLOADING)
    imageGicon                              ,
#endif
    setImageGicon                           ,


-- ** iconName #attr:iconName#
-- | The name of the icon in the icon theme. If the icon theme is
-- changed, the image will be updated automatically.

#if defined(ENABLE_OVERLOADING)
    ImageIconNamePropertyInfo               ,
#endif
    clearImageIconName                      ,
    constructImageIconName                  ,
    getImageIconName                        ,
#if defined(ENABLE_OVERLOADING)
    imageIconName                           ,
#endif
    setImageIconName                        ,


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

#if defined(ENABLE_OVERLOADING)
    ImageIconSizePropertyInfo               ,
#endif
    constructImageIconSize                  ,
    getImageIconSize                        ,
#if defined(ENABLE_OVERLOADING)
    imageIconSize                           ,
#endif
    setImageIconSize                        ,


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

#if defined(ENABLE_OVERLOADING)
    ImagePaintablePropertyInfo              ,
#endif
    clearImagePaintable                     ,
    constructImagePaintable                 ,
    getImagePaintable                       ,
#if defined(ENABLE_OVERLOADING)
    imagePaintable                          ,
#endif
    setImagePaintable                       ,


-- ** pixelSize #attr:pixelSize#
-- | The \"pixel-size\" property can be used to specify a fixed size
-- overriding the t'GI.Gtk.Objects.Image.Image':@/icon-size/@ property for images of type
-- 'GI.Gtk.Enums.ImageTypeIconName'.

#if defined(ENABLE_OVERLOADING)
    ImagePixelSizePropertyInfo              ,
#endif
    constructImagePixelSize                 ,
    getImagePixelSize                       ,
#if defined(ENABLE_OVERLOADING)
    imagePixelSize                          ,
#endif
    setImagePixelSize                       ,


-- ** resource #attr:resource#
-- | A path to a resource file to display.

#if defined(ENABLE_OVERLOADING)
    ImageResourcePropertyInfo               ,
#endif
    clearImageResource                      ,
    constructImageResource                  ,
    getImageResource                        ,
#if defined(ENABLE_OVERLOADING)
    imageResource                           ,
#endif
    setImageResource                        ,


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

#if defined(ENABLE_OVERLOADING)
    ImageStorageTypePropertyInfo            ,
#endif
    getImageStorageType                     ,
#if defined(ENABLE_OVERLOADING)
    imageStorageType                        ,
#endif


-- ** useFallback #attr:useFallback#
-- | Whether the icon displayed in the GtkImage will use
-- standard icon names fallback. The value of this property
-- is only relevant for images of type 'GI.Gtk.Enums.ImageTypeIconName'
-- and 'GI.Gtk.Enums.ImageTypeGicon'.

#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.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL

import qualified GI.Atk.Interfaces.ImplementorIface as Atk.ImplementorIface
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.Buildable as Gtk.Buildable
import {-# SOURCE #-} qualified GI.Gtk.Objects.Widget as Gtk.Widget

-- | Memory-managed wrapper type.
newtype Image = Image (ManagedPtr Image)
    deriving (Image -> Image -> Bool
(Image -> Image -> Bool) -> (Image -> Image -> Bool) -> Eq Image
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Image -> Image -> Bool
$c/= :: Image -> Image -> Bool
== :: Image -> Image -> Bool
$c== :: Image -> Image -> Bool
Eq)
foreign import ccall "gtk_image_get_type"
    c_gtk_image_get_type :: IO GType

instance GObject Image where
    gobjectType :: IO GType
gobjectType = IO GType
c_gtk_image_get_type
    

-- | Convert 'Image' to and from 'Data.GI.Base.GValue.GValue' with 'Data.GI.Base.GValue.toGValue' and 'Data.GI.Base.GValue.fromGValue'.
instance B.GValue.IsGValue Image where
    toGValue :: Image -> IO GValue
toGValue o :: Image
o = do
        GType
gtype <- IO GType
c_gtk_image_get_type
        Image -> (Ptr Image -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Image
o (GType -> (GValue -> Ptr Image -> IO ()) -> Ptr Image -> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr Image -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
        
    fromGValue :: GValue -> IO Image
fromGValue gv :: GValue
gv = do
        Ptr Image
ptr <- GValue -> IO (Ptr Image)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr Image)
        (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
        
    

-- | Type class for types which can be safely cast to `Image`, for instance with `toImage`.
class (GObject o, O.IsDescendantOf Image o) => IsImage o
instance (GObject o, O.IsDescendantOf Image o) => IsImage o

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

-- | Cast to `Image`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.
toImage :: (MonadIO m, IsImage o) => o -> m Image
toImage :: o -> m Image
toImage = IO Image -> m Image
forall (m :: * -> *) a. MonadIO m => IO a -> m a
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, GObject o, GObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr Image -> Image
Image

-- | A convenience alias for `Nothing` :: `Maybe` `Image`.
noImage :: Maybe Image
noImage :: Maybe Image
noImage = Maybe Image
forall a. Maybe a
Nothing

#if defined(ENABLE_OVERLOADING)
type family ResolveImageMethod (t :: Symbol) (o :: *) :: * where
    ResolveImageMethod "activate" o = Gtk.Widget.WidgetActivateMethodInfo
    ResolveImageMethod "activateAction" o = Gtk.Widget.WidgetActivateActionMethodInfo
    ResolveImageMethod "activateDefault" o = Gtk.Widget.WidgetActivateDefaultMethodInfo
    ResolveImageMethod "addAccelerator" o = Gtk.Widget.WidgetAddAcceleratorMethodInfo
    ResolveImageMethod "addChild" o = Gtk.Buildable.BuildableAddChildMethodInfo
    ResolveImageMethod "addController" o = Gtk.Widget.WidgetAddControllerMethodInfo
    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 "canActivateAccel" o = Gtk.Widget.WidgetCanActivateAccelMethodInfo
    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 "constructChild" o = Gtk.Buildable.BuildableConstructChildMethodInfo
    ResolveImageMethod "contains" o = Gtk.Widget.WidgetContainsMethodInfo
    ResolveImageMethod "createPangoContext" o = Gtk.Widget.WidgetCreatePangoContextMethodInfo
    ResolveImageMethod "createPangoLayout" o = Gtk.Widget.WidgetCreatePangoLayoutMethodInfo
    ResolveImageMethod "customFinished" o = Gtk.Buildable.BuildableCustomFinishedMethodInfo
    ResolveImageMethod "customTagEnd" o = Gtk.Buildable.BuildableCustomTagEndMethodInfo
    ResolveImageMethod "customTagStart" o = Gtk.Buildable.BuildableCustomTagStartMethodInfo
    ResolveImageMethod "destroy" o = Gtk.Widget.WidgetDestroyMethodInfo
    ResolveImageMethod "destroyed" o = Gtk.Widget.WidgetDestroyedMethodInfo
    ResolveImageMethod "deviceIsShadowed" o = Gtk.Widget.WidgetDeviceIsShadowedMethodInfo
    ResolveImageMethod "dragBegin" o = Gtk.Widget.WidgetDragBeginMethodInfo
    ResolveImageMethod "dragCheckThreshold" o = Gtk.Widget.WidgetDragCheckThresholdMethodInfo
    ResolveImageMethod "dragDestAddImageTargets" o = Gtk.Widget.WidgetDragDestAddImageTargetsMethodInfo
    ResolveImageMethod "dragDestAddTextTargets" o = Gtk.Widget.WidgetDragDestAddTextTargetsMethodInfo
    ResolveImageMethod "dragDestAddUriTargets" o = Gtk.Widget.WidgetDragDestAddUriTargetsMethodInfo
    ResolveImageMethod "dragDestFindTarget" o = Gtk.Widget.WidgetDragDestFindTargetMethodInfo
    ResolveImageMethod "dragDestGetTargetList" o = Gtk.Widget.WidgetDragDestGetTargetListMethodInfo
    ResolveImageMethod "dragDestGetTrackMotion" o = Gtk.Widget.WidgetDragDestGetTrackMotionMethodInfo
    ResolveImageMethod "dragDestSet" o = Gtk.Widget.WidgetDragDestSetMethodInfo
    ResolveImageMethod "dragDestSetTargetList" o = Gtk.Widget.WidgetDragDestSetTargetListMethodInfo
    ResolveImageMethod "dragDestSetTrackMotion" o = Gtk.Widget.WidgetDragDestSetTrackMotionMethodInfo
    ResolveImageMethod "dragDestUnset" o = Gtk.Widget.WidgetDragDestUnsetMethodInfo
    ResolveImageMethod "dragGetData" o = Gtk.Widget.WidgetDragGetDataMethodInfo
    ResolveImageMethod "dragHighlight" o = Gtk.Widget.WidgetDragHighlightMethodInfo
    ResolveImageMethod "dragSourceAddImageTargets" o = Gtk.Widget.WidgetDragSourceAddImageTargetsMethodInfo
    ResolveImageMethod "dragSourceAddTextTargets" o = Gtk.Widget.WidgetDragSourceAddTextTargetsMethodInfo
    ResolveImageMethod "dragSourceAddUriTargets" o = Gtk.Widget.WidgetDragSourceAddUriTargetsMethodInfo
    ResolveImageMethod "dragSourceGetTargetList" o = Gtk.Widget.WidgetDragSourceGetTargetListMethodInfo
    ResolveImageMethod "dragSourceSet" o = Gtk.Widget.WidgetDragSourceSetMethodInfo
    ResolveImageMethod "dragSourceSetIconGicon" o = Gtk.Widget.WidgetDragSourceSetIconGiconMethodInfo
    ResolveImageMethod "dragSourceSetIconName" o = Gtk.Widget.WidgetDragSourceSetIconNameMethodInfo
    ResolveImageMethod "dragSourceSetIconPaintable" o = Gtk.Widget.WidgetDragSourceSetIconPaintableMethodInfo
    ResolveImageMethod "dragSourceSetTargetList" o = Gtk.Widget.WidgetDragSourceSetTargetListMethodInfo
    ResolveImageMethod "dragSourceUnset" o = Gtk.Widget.WidgetDragSourceUnsetMethodInfo
    ResolveImageMethod "dragUnhighlight" o = Gtk.Widget.WidgetDragUnhighlightMethodInfo
    ResolveImageMethod "errorBell" o = Gtk.Widget.WidgetErrorBellMethodInfo
    ResolveImageMethod "event" o = Gtk.Widget.WidgetEventMethodInfo
    ResolveImageMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveImageMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveImageMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveImageMethod "grabAdd" o = Gtk.Widget.WidgetGrabAddMethodInfo
    ResolveImageMethod "grabFocus" o = Gtk.Widget.WidgetGrabFocusMethodInfo
    ResolveImageMethod "grabRemove" o = Gtk.Widget.WidgetGrabRemoveMethodInfo
    ResolveImageMethod "hasDefault" o = Gtk.Widget.WidgetHasDefaultMethodInfo
    ResolveImageMethod "hasFocus" o = Gtk.Widget.WidgetHasFocusMethodInfo
    ResolveImageMethod "hasGrab" o = Gtk.Widget.WidgetHasGrabMethodInfo
    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 "inputShapeCombineRegion" o = Gtk.Widget.WidgetInputShapeCombineRegionMethodInfo
    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 "isToplevel" o = Gtk.Widget.WidgetIsToplevelMethodInfo
    ResolveImageMethod "isVisible" o = Gtk.Widget.WidgetIsVisibleMethodInfo
    ResolveImageMethod "keynavFailed" o = Gtk.Widget.WidgetKeynavFailedMethodInfo
    ResolveImageMethod "listAccelClosures" o = Gtk.Widget.WidgetListAccelClosuresMethodInfo
    ResolveImageMethod "listActionPrefixes" o = Gtk.Widget.WidgetListActionPrefixesMethodInfo
    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 "parserFinished" o = Gtk.Buildable.BuildableParserFinishedMethodInfo
    ResolveImageMethod "pick" o = Gtk.Widget.WidgetPickMethodInfo
    ResolveImageMethod "queueAllocate" o = Gtk.Widget.WidgetQueueAllocateMethodInfo
    ResolveImageMethod "queueComputeExpand" o = Gtk.Widget.WidgetQueueComputeExpandMethodInfo
    ResolveImageMethod "queueDraw" o = Gtk.Widget.WidgetQueueDrawMethodInfo
    ResolveImageMethod "queueResize" o = Gtk.Widget.WidgetQueueResizeMethodInfo
    ResolveImageMethod "queueResizeNoRedraw" o = Gtk.Widget.WidgetQueueResizeNoRedrawMethodInfo
    ResolveImageMethod "realize" o = Gtk.Widget.WidgetRealizeMethodInfo
    ResolveImageMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveImageMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveImageMethod "registerSurface" o = Gtk.Widget.WidgetRegisterSurfaceMethodInfo
    ResolveImageMethod "removeAccelerator" o = Gtk.Widget.WidgetRemoveAcceleratorMethodInfo
    ResolveImageMethod "removeController" o = Gtk.Widget.WidgetRemoveControllerMethodInfo
    ResolveImageMethod "removeMnemonicLabel" o = Gtk.Widget.WidgetRemoveMnemonicLabelMethodInfo
    ResolveImageMethod "removeTickCallback" o = Gtk.Widget.WidgetRemoveTickCallbackMethodInfo
    ResolveImageMethod "resetStyle" o = Gtk.Widget.WidgetResetStyleMethodInfo
    ResolveImageMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    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 "unregisterSurface" o = Gtk.Widget.WidgetUnregisterSurfaceMethodInfo
    ResolveImageMethod "unsetStateFlags" o = Gtk.Widget.WidgetUnsetStateFlagsMethodInfo
    ResolveImageMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveImageMethod "getAccessible" o = Gtk.Widget.WidgetGetAccessibleMethodInfo
    ResolveImageMethod "getActionGroup" o = Gtk.Widget.WidgetGetActionGroupMethodInfo
    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 "getCanFocus" o = Gtk.Widget.WidgetGetCanFocusMethodInfo
    ResolveImageMethod "getCanTarget" o = Gtk.Widget.WidgetGetCanTargetMethodInfo
    ResolveImageMethod "getChildVisible" o = Gtk.Widget.WidgetGetChildVisibleMethodInfo
    ResolveImageMethod "getClipboard" o = Gtk.Widget.WidgetGetClipboardMethodInfo
    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 "getFirstChild" o = Gtk.Widget.WidgetGetFirstChildMethodInfo
    ResolveImageMethod "getFocusChild" o = Gtk.Widget.WidgetGetFocusChildMethodInfo
    ResolveImageMethod "getFocusOnClick" o = Gtk.Widget.WidgetGetFocusOnClickMethodInfo
    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 "getHasSurface" o = Gtk.Widget.WidgetGetHasSurfaceMethodInfo
    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 "getInternalChild" o = Gtk.Buildable.BuildableGetInternalChildMethodInfo
    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 "getModifierMask" o = Gtk.Widget.WidgetGetModifierMaskMethodInfo
    ResolveImageMethod "getName" o = Gtk.Widget.WidgetGetNameMethodInfo
    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 "getPath" o = Gtk.Widget.WidgetGetPathMethodInfo
    ResolveImageMethod "getPixelSize" o = ImageGetPixelSizeMethodInfo
    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 "getSizeRequest" o = Gtk.Widget.WidgetGetSizeRequestMethodInfo
    ResolveImageMethod "getStateFlags" o = Gtk.Widget.WidgetGetStateFlagsMethodInfo
    ResolveImageMethod "getStorageType" o = ImageGetStorageTypeMethodInfo
    ResolveImageMethod "getStyleContext" o = Gtk.Widget.WidgetGetStyleContextMethodInfo
    ResolveImageMethod "getSupportMultidevice" o = Gtk.Widget.WidgetGetSupportMultideviceMethodInfo
    ResolveImageMethod "getSurface" o = Gtk.Widget.WidgetGetSurfaceMethodInfo
    ResolveImageMethod "getTemplateChild" o = Gtk.Widget.WidgetGetTemplateChildMethodInfo
    ResolveImageMethod "getTooltipMarkup" o = Gtk.Widget.WidgetGetTooltipMarkupMethodInfo
    ResolveImageMethod "getTooltipText" o = Gtk.Widget.WidgetGetTooltipTextMethodInfo
    ResolveImageMethod "getTooltipWindow" o = Gtk.Widget.WidgetGetTooltipWindowMethodInfo
    ResolveImageMethod "getToplevel" o = Gtk.Widget.WidgetGetToplevelMethodInfo
    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 "setAccelPath" o = Gtk.Widget.WidgetSetAccelPathMethodInfo
    ResolveImageMethod "setBuildableProperty" o = Gtk.Buildable.BuildableSetBuildablePropertyMethodInfo
    ResolveImageMethod "setCanFocus" o = Gtk.Widget.WidgetSetCanFocusMethodInfo
    ResolveImageMethod "setCanTarget" o = Gtk.Widget.WidgetSetCanTargetMethodInfo
    ResolveImageMethod "setChildVisible" o = Gtk.Widget.WidgetSetChildVisibleMethodInfo
    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 "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 "setHasSurface" o = Gtk.Widget.WidgetSetHasSurfaceMethodInfo
    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 "setSupportMultidevice" o = Gtk.Widget.WidgetSetSupportMultideviceMethodInfo
    ResolveImageMethod "setSurface" o = Gtk.Widget.WidgetSetSurfaceMethodInfo
    ResolveImageMethod "setTooltipMarkup" o = Gtk.Widget.WidgetSetTooltipMarkupMethodInfo
    ResolveImageMethod "setTooltipText" o = Gtk.Widget.WidgetSetTooltipTextMethodInfo
    ResolveImageMethod "setTooltipWindow" o = Gtk.Widget.WidgetSetTooltipWindowMethodInfo
    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.MethodInfo 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

#endif

-- VVV Prop "file"
   -- Type: TBasicType TUTF8
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Nothing,Nothing)

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

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

-- | Construct a `GValueConstruct` with valid value for the “@file@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructImageFile :: (IsImage o) => T.Text -> IO (GValueConstruct o)
constructImageFile :: Text -> IO (GValueConstruct o)
constructImageFile val :: Text
val = String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString "file" (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
val)

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

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

-- | Get the value of the “@gicon@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' image #gicon
-- @
getImageGicon :: (MonadIO m, IsImage o) => o -> m (Maybe Gio.Icon.Icon)
getImageGicon :: o -> m (Maybe Icon)
getImageGicon obj :: o
obj = IO (Maybe Icon) -> m (Maybe Icon)
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
$ 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 "gicon" ManagedPtr Icon -> Icon
Gio.Icon.Icon

-- | Set the value of the “@gicon@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' image [ #gicon 'Data.GI.Base.Attributes.:=' value ]
-- @
setImageGicon :: (MonadIO m, IsImage o, Gio.Icon.IsIcon a) => o -> a -> m ()
setImageGicon :: o -> a -> m ()
setImageGicon obj :: o
obj val :: a
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe a -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj "gicon" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)

-- | Construct a `GValueConstruct` with valid value for the “@gicon@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructImageGicon :: (IsImage o, Gio.Icon.IsIcon a) => a -> IO (GValueConstruct o)
constructImageGicon :: a -> IO (GValueConstruct o)
constructImageGicon val :: a
val = String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject "gicon" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)

-- | Set the value of the “@gicon@” property to `Nothing`.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.clear' #gicon
-- @
clearImageGicon :: (MonadIO m, IsImage o) => o -> m ()
clearImageGicon :: o -> m ()
clearImageGicon obj :: o
obj = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Icon -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj "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
#endif

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

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

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

-- | Construct a `GValueConstruct` with valid value for the “@icon-name@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructImageIconName :: (IsImage o) => T.Text -> IO (GValueConstruct o)
constructImageIconName :: Text -> IO (GValueConstruct o)
constructImageIconName val :: Text
val = String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString "icon-name" (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
val)

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

-- VVV Prop "icon-size"
   -- Type: TInterface (Name {namespace = "Gtk", name = "IconSize"})
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

-- | Get the value of the “@icon-size@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' image #iconSize
-- @
getImageIconSize :: (MonadIO m, IsImage o) => o -> m Gtk.Enums.IconSize
getImageIconSize :: o -> m IconSize
getImageIconSize obj :: o
obj = IO IconSize -> m IconSize
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
$ o -> String -> IO IconSize
forall a b. (GObject a, Enum b, BoxedEnum b) => a -> String -> IO b
B.Properties.getObjectPropertyEnum o
obj "icon-size"

-- | Set the value of the “@icon-size@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' image [ #iconSize 'Data.GI.Base.Attributes.:=' value ]
-- @
setImageIconSize :: (MonadIO m, IsImage o) => o -> Gtk.Enums.IconSize -> m ()
setImageIconSize :: o -> IconSize -> m ()
setImageIconSize obj :: o
obj val :: IconSize
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> IconSize -> IO ()
forall a b.
(GObject a, Enum b, BoxedEnum b) =>
a -> String -> b -> IO ()
B.Properties.setObjectPropertyEnum o
obj "icon-size" IconSize
val

-- | Construct a `GValueConstruct` with valid value for the “@icon-size@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructImageIconSize :: (IsImage o) => Gtk.Enums.IconSize -> IO (GValueConstruct o)
constructImageIconSize :: IconSize -> IO (GValueConstruct o)
constructImageIconSize val :: IconSize
val = String -> IconSize -> IO (GValueConstruct o)
forall a o.
(Enum a, BoxedEnum a) =>
String -> a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyEnum "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
#endif

-- VVV Prop "paintable"
   -- Type: TInterface (Name {namespace = "Gdk", name = "Paintable"})
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just True,Nothing)

-- | Get the value of the “@paintable@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' image #paintable
-- @
getImagePaintable :: (MonadIO m, IsImage o) => o -> m (Maybe Gdk.Paintable.Paintable)
getImagePaintable :: o -> m (Maybe Paintable)
getImagePaintable obj :: o
obj = IO (Maybe Paintable) -> m (Maybe Paintable)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Paintable) -> m (Maybe Paintable))
-> IO (Maybe Paintable) -> m (Maybe Paintable)
forall a b. (a -> b) -> a -> b
$ 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 "paintable" ManagedPtr Paintable -> Paintable
Gdk.Paintable.Paintable

-- | Set the value of the “@paintable@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' image [ #paintable 'Data.GI.Base.Attributes.:=' value ]
-- @
setImagePaintable :: (MonadIO m, IsImage o, Gdk.Paintable.IsPaintable a) => o -> a -> m ()
setImagePaintable :: o -> a -> m ()
setImagePaintable obj :: o
obj val :: a
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe a -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj "paintable" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)

-- | Construct a `GValueConstruct` with valid value for the “@paintable@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructImagePaintable :: (IsImage o, Gdk.Paintable.IsPaintable a) => a -> IO (GValueConstruct o)
constructImagePaintable :: a -> IO (GValueConstruct o)
constructImagePaintable val :: a
val = String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject "paintable" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)

-- | Set the value of the “@paintable@” property to `Nothing`.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.clear' #paintable
-- @
clearImagePaintable :: (MonadIO m, IsImage o) => o -> m ()
clearImagePaintable :: o -> m ()
clearImagePaintable obj :: o
obj = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Paintable -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj "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
#endif

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

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

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

-- | Construct a `GValueConstruct` with valid value for the “@pixel-size@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructImagePixelSize :: (IsImage o) => Int32 -> IO (GValueConstruct o)
constructImagePixelSize :: Int32 -> IO (GValueConstruct o)
constructImagePixelSize val :: Int32
val = String -> Int32 -> IO (GValueConstruct o)
forall o. String -> Int32 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyInt32 "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
#endif

-- VVV Prop "resource"
   -- Type: TBasicType TUTF8
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Nothing,Nothing)

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

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

-- | Construct a `GValueConstruct` with valid value for the “@resource@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructImageResource :: (IsImage o) => T.Text -> IO (GValueConstruct o)
constructImageResource :: Text -> IO (GValueConstruct o)
constructImageResource val :: Text
val = String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString "resource" (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
val)

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

-- VVV Prop "storage-type"
   -- Type: TInterface (Name {namespace = "Gtk", name = "ImageType"})
   -- Flags: [PropertyReadable]
   -- Nullable: (Just False,Nothing)

-- | Get the value of the “@storage-type@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' image #storageType
-- @
getImageStorageType :: (MonadIO m, IsImage o) => o -> m Gtk.Enums.ImageType
getImageStorageType :: o -> m ImageType
getImageStorageType obj :: o
obj = IO ImageType -> m ImageType
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
$ o -> String -> IO ImageType
forall a b. (GObject a, Enum b, BoxedEnum b) => a -> String -> IO b
B.Properties.getObjectPropertyEnum o
obj "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
#endif

-- VVV Prop "use-fallback"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Nothing,Nothing)

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

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

-- | Construct a `GValueConstruct` with valid value for the “@use-fallback@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructImageUseFallback :: (IsImage o) => Bool -> IO (GValueConstruct o)
constructImageUseFallback :: Bool -> IO (GValueConstruct o)
constructImageUseFallback val :: Bool
val = String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool "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
#endif

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Image
type instance O.AttributeList Image = ImageAttributeList
type ImageAttributeList = ('[ '("canFocus", Gtk.Widget.WidgetCanFocusPropertyInfo), '("canTarget", Gtk.Widget.WidgetCanTargetPropertyInfo), '("cssName", Gtk.Widget.WidgetCssNamePropertyInfo), '("cursor", Gtk.Widget.WidgetCursorPropertyInfo), '("expand", Gtk.Widget.WidgetExpandPropertyInfo), '("file", ImageFilePropertyInfo), '("focusOnClick", Gtk.Widget.WidgetFocusOnClickPropertyInfo), '("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), '("isFocus", Gtk.Widget.WidgetIsFocusPropertyInfo), '("layoutManager", Gtk.Widget.WidgetLayoutManagerPropertyInfo), '("margin", Gtk.Widget.WidgetMarginPropertyInfo), '("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), '("surface", Gtk.Widget.WidgetSurfacePropertyInfo), '("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, *)])
#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 = ('[ '("accelClosuresChanged", Gtk.Widget.WidgetAccelClosuresChangedSignalInfo), '("canActivateAccel", Gtk.Widget.WidgetCanActivateAccelSignalInfo), '("destroy", Gtk.Widget.WidgetDestroySignalInfo), '("directionChanged", Gtk.Widget.WidgetDirectionChangedSignalInfo), '("dragBegin", Gtk.Widget.WidgetDragBeginSignalInfo), '("dragDataDelete", Gtk.Widget.WidgetDragDataDeleteSignalInfo), '("dragDataGet", Gtk.Widget.WidgetDragDataGetSignalInfo), '("dragDataReceived", Gtk.Widget.WidgetDragDataReceivedSignalInfo), '("dragDrop", Gtk.Widget.WidgetDragDropSignalInfo), '("dragEnd", Gtk.Widget.WidgetDragEndSignalInfo), '("dragFailed", Gtk.Widget.WidgetDragFailedSignalInfo), '("dragLeave", Gtk.Widget.WidgetDragLeaveSignalInfo), '("dragMotion", Gtk.Widget.WidgetDragMotionSignalInfo), '("grabNotify", Gtk.Widget.WidgetGrabNotifySignalInfo), '("hide", Gtk.Widget.WidgetHideSignalInfo), '("keynavFailed", Gtk.Widget.WidgetKeynavFailedSignalInfo), '("map", Gtk.Widget.WidgetMapSignalInfo), '("mnemonicActivate", Gtk.Widget.WidgetMnemonicActivateSignalInfo), '("moveFocus", Gtk.Widget.WidgetMoveFocusSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("popupMenu", Gtk.Widget.WidgetPopupMenuSignalInfo), '("queryTooltip", Gtk.Widget.WidgetQueryTooltipSignalInfo), '("realize", Gtk.Widget.WidgetRealizeSignalInfo), '("show", Gtk.Widget.WidgetShowSignalInfo), '("sizeAllocate", Gtk.Widget.WidgetSizeAllocateSignalInfo), '("stateFlagsChanged", Gtk.Widget.WidgetStateFlagsChangedSignalInfo), '("styleUpdated", Gtk.Widget.WidgetStyleUpdatedSignalInfo), '("unmap", Gtk.Widget.WidgetUnmapSignalInfo), '("unrealize", Gtk.Widget.WidgetUnrealizeSignalInfo)] :: [(Symbol, *)])

#endif

-- method Image::new
-- method type : Constructor
-- Args: []
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gtk" , name = "Image" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_new" gtk_image_new :: 
    IO (Ptr Image)

-- | Creates a new empty t'GI.Gtk.Objects.Image.Image' widget.
imageNew ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m Image
    -- ^ __Returns:__ a newly created t'GI.Gtk.Objects.Image.Image' widget.
imageNew :: m Image
imageNew  = IO Image -> m Image
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 "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 (m :: * -> *) a. Monad m => a -> m a
return Image
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method Image::new_from_file
-- method type : Constructor
-- Args: [ Arg
--           { argCName = "filename"
--           , argType = TBasicType TFileName
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a filename" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gtk" , name = "Image" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_new_from_file" gtk_image_new_from_file :: 
    CString ->                              -- filename : TBasicType TFileName
    IO (Ptr Image)

-- | Creates a new t'GI.Gtk.Objects.Image.Image' displaying the file /@filename@/. If the file
-- isn’t found or can’t be loaded, the resulting t'GI.Gtk.Objects.Image.Image' will
-- display a “broken image” icon. This function never returns 'P.Nothing',
-- it always returns a valid t'GI.Gtk.Objects.Image.Image' widget.
-- 
-- If you need to detect failures to load the file, use
-- 'GI.Gdk.Objects.Texture.textureNewFromFile' to load the file yourself, then create
-- the t'GI.Gtk.Objects.Image.Image' from the texture.
-- 
-- The storage type ('GI.Gtk.Objects.Image.imageGetStorageType') of the returned
-- image is not defined, it will be whatever is appropriate for
-- displaying the file.
imageNewFromFile ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    [Char]
    -- ^ /@filename@/: a filename
    -> m Image
    -- ^ __Returns:__ a new t'GI.Gtk.Objects.Image.Image'
imageNewFromFile :: String -> m Image
imageNewFromFile filename :: String
filename = IO Image -> m Image
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 "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 (m :: * -> *) a. Monad m => a -> m a
return Image
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method Image::new_from_gicon
-- method type : Constructor
-- Args: [ Arg
--           { argCName = "icon"
--           , argType = TInterface Name { namespace = "Gio" , name = "Icon" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an icon" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gtk" , name = "Image" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_new_from_gicon" gtk_image_new_from_gicon :: 
    Ptr Gio.Icon.Icon ->                    -- icon : TInterface (Name {namespace = "Gio", name = "Icon"})
    IO (Ptr Image)

-- | Creates a t'GI.Gtk.Objects.Image.Image' displaying an icon from the current icon theme.
-- If the icon name isn’t known, a “broken image” icon will be
-- displayed instead.  If the current icon theme is changed, the icon
-- will be updated appropriately.
-- 
-- Note: Before 3.94, this function was taking an extra icon size
-- argument. See 'GI.Gtk.Objects.Image.imageSetIconSize' for another way to set
-- the icon size.
imageNewFromGicon ::
    (B.CallStack.HasCallStack, MonadIO m, Gio.Icon.IsIcon a) =>
    a
    -- ^ /@icon@/: an icon
    -> m Image
    -- ^ __Returns:__ a new t'GI.Gtk.Objects.Image.Image' displaying the themed icon
imageNewFromGicon :: a -> m Image
imageNewFromGicon icon :: a
icon = IO Image -> m Image
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 "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 (m :: * -> *) a. Monad m => a -> m a
return Image
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method Image::new_from_icon_name
-- method type : Constructor
-- Args: [ Arg
--           { argCName = "icon_name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an icon name or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gtk" , name = "Image" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_new_from_icon_name" gtk_image_new_from_icon_name :: 
    CString ->                              -- icon_name : TBasicType TUTF8
    IO (Ptr Image)

-- | Creates a t'GI.Gtk.Objects.Image.Image' displaying an icon from the current icon theme.
-- If the icon name isn’t known, a “broken image” icon will be
-- displayed instead.  If the current icon theme is changed, the icon
-- will be updated appropriately.
-- 
-- Note: Before 3.94, this function was taking an extra icon size
-- argument. See 'GI.Gtk.Objects.Image.imageSetIconSize' for another way to set
-- the icon size.
imageNewFromIconName ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Maybe (T.Text)
    -- ^ /@iconName@/: an icon name or 'P.Nothing'
    -> m Image
    -- ^ __Returns:__ a new t'GI.Gtk.Objects.Image.Image' displaying the themed icon
imageNewFromIconName :: Maybe Text -> m Image
imageNewFromIconName iconName :: Maybe Text
iconName = IO Image -> m Image
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
        Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
        Just jIconName :: Text
jIconName -> do
            CString
jIconName' <- Text -> IO CString
textToCString Text
jIconName
            CString -> IO CString
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 "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 (m :: * -> *) a. Monad m => a -> m a
return Image
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method Image::new_from_paintable
-- method type : Constructor
-- Args: [ Arg
--           { argCName = "paintable"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "Paintable" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkPaintable, or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gtk" , name = "Image" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_new_from_paintable" gtk_image_new_from_paintable :: 
    Ptr Gdk.Paintable.Paintable ->          -- paintable : TInterface (Name {namespace = "Gdk", name = "Paintable"})
    IO (Ptr Image)

-- | Creates a new t'GI.Gtk.Objects.Image.Image' displaying /@paintable@/.
-- The t'GI.Gtk.Objects.Image.Image' does not assume a reference to the
-- paintable; you still need to unref it if you own references.
-- t'GI.Gtk.Objects.Image.Image' will add its own reference rather than adopting yours.
-- 
-- The t'GI.Gtk.Objects.Image.Image' will track changes to the /@paintable@/ and update
-- its size and contents in response to it.
imageNewFromPaintable ::
    (B.CallStack.HasCallStack, MonadIO m, Gdk.Paintable.IsPaintable a) =>
    Maybe (a)
    -- ^ /@paintable@/: a t'GI.Gdk.Interfaces.Paintable.Paintable', or 'P.Nothing'
    -> m Image
    -- ^ __Returns:__ a new t'GI.Gtk.Objects.Image.Image'
imageNewFromPaintable :: Maybe a -> m Image
imageNewFromPaintable paintable :: Maybe a
paintable = IO Image -> m Image
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
        Nothing -> Ptr Paintable -> IO (Ptr Paintable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Paintable
forall a. Ptr a
nullPtr
        Just jPaintable :: 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 (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 "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 (m :: * -> *) a. Monad m => a -> m a
return Image
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method Image::new_from_pixbuf
-- method type : Constructor
-- Args: [ Arg
--           { argCName = "pixbuf"
--           , argType =
--               TInterface Name { namespace = "GdkPixbuf" , name = "Pixbuf" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkPixbuf, or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gtk" , name = "Image" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_new_from_pixbuf" gtk_image_new_from_pixbuf :: 
    Ptr GdkPixbuf.Pixbuf.Pixbuf ->          -- pixbuf : TInterface (Name {namespace = "GdkPixbuf", name = "Pixbuf"})
    IO (Ptr Image)

-- | Creates a new t'GI.Gtk.Objects.Image.Image' displaying /@pixbuf@/.
-- The t'GI.Gtk.Objects.Image.Image' does not assume a reference to the
-- pixbuf; you still need to unref it if you own references.
-- t'GI.Gtk.Objects.Image.Image' will add its own reference rather than adopting yours.
-- 
-- This is a helper for @/gtk_image_new_from_texture()/@, and you can\'t
-- get back the exact pixbuf once this is called, only a texture.
-- 
-- Note that this function just creates an t'GI.Gtk.Objects.Image.Image' from the pixbuf. The
-- t'GI.Gtk.Objects.Image.Image' created will not react to state changes. Should you want that,
-- you should use 'GI.Gtk.Objects.Image.imageNewFromIconName'.
imageNewFromPixbuf ::
    (B.CallStack.HasCallStack, MonadIO m, GdkPixbuf.Pixbuf.IsPixbuf a) =>
    Maybe (a)
    -- ^ /@pixbuf@/: a t'GI.GdkPixbuf.Objects.Pixbuf.Pixbuf', or 'P.Nothing'
    -> m Image
    -- ^ __Returns:__ a new t'GI.Gtk.Objects.Image.Image'
imageNewFromPixbuf :: Maybe a -> m Image
imageNewFromPixbuf pixbuf :: Maybe a
pixbuf = IO Image -> m Image
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
        Nothing -> Ptr Pixbuf -> IO (Ptr Pixbuf)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Pixbuf
forall a. Ptr a
nullPtr
        Just jPixbuf :: 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 (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 "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 (m :: * -> *) a. Monad m => a -> m a
return Image
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method Image::new_from_resource
-- method type : Constructor
-- Args: [ Arg
--           { argCName = "resource_path"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a resource path" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gtk" , name = "Image" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_new_from_resource" gtk_image_new_from_resource :: 
    CString ->                              -- resource_path : TBasicType TUTF8
    IO (Ptr Image)

-- | Creates a new t'GI.Gtk.Objects.Image.Image' displaying the resource file /@resourcePath@/. If the file
-- isn’t found or can’t be loaded, the resulting t'GI.Gtk.Objects.Image.Image' will
-- display a “broken image” icon. This function never returns 'P.Nothing',
-- it always returns a valid t'GI.Gtk.Objects.Image.Image' widget.
-- 
-- If you need to detect failures to load the file, use
-- 'GI.GdkPixbuf.Objects.Pixbuf.pixbufNewFromFile' to load the file yourself, then create
-- the t'GI.Gtk.Objects.Image.Image' from the pixbuf.
-- 
-- The storage type ('GI.Gtk.Objects.Image.imageGetStorageType') of the returned
-- image is not defined, it will be whatever is appropriate for
-- displaying the file.
imageNewFromResource ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    T.Text
    -- ^ /@resourcePath@/: a resource path
    -> m Image
    -- ^ __Returns:__ a new t'GI.Gtk.Objects.Image.Image'
imageNewFromResource :: Text -> m Image
imageNewFromResource resourcePath :: Text
resourcePath = IO Image -> m Image
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 "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 (m :: * -> *) a. Monad m => a -> m a
return Image
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method Image::clear
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkImage" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_clear" gtk_image_clear :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Gtk", name = "Image"})
    IO ()

-- | Resets the image to be empty.
imageClear ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: a t'GI.Gtk.Objects.Image.Image'
    -> m ()
imageClear :: a -> m ()
imageClear image :: a
image = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr 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 (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ImageClearMethodInfo
instance (signature ~ (m ()), MonadIO m, IsImage a) => O.MethodInfo ImageClearMethodInfo a signature where
    overloadedMethod = imageClear

#endif

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

foreign import ccall "gtk_image_get_gicon" gtk_image_get_gicon :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Gtk", name = "Image"})
    IO (Ptr Gio.Icon.Icon)

-- | Gets the t'GI.Gio.Interfaces.Icon.Icon' and size being displayed by the t'GI.Gtk.Objects.Image.Image'.
-- The storage type of the image must be 'GI.Gtk.Enums.ImageTypeEmpty' or
-- 'GI.Gtk.Enums.ImageTypeGicon' (see 'GI.Gtk.Objects.Image.imageGetStorageType').
-- The caller of this function does not own a reference to the
-- returned t'GI.Gio.Interfaces.Icon.Icon'.
-- 
-- Note: This function was changed in 3.94 not to use out parameters
-- anymore, but return the GIcon directly. See 'GI.Gtk.Objects.Image.imageGetIconSize'
-- for a way to get the icon size.
imageGetGicon ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: a t'GI.Gtk.Objects.Image.Image'
    -> m (Maybe Gio.Icon.Icon)
    -- ^ __Returns:__ a t'GI.Gio.Interfaces.Icon.Icon', or 'P.Nothing'
imageGetGicon :: a -> m (Maybe Icon)
imageGetGicon image :: a
image = IO (Maybe Icon) -> m (Maybe Icon)
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
$ \result' :: 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 (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 (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.MethodInfo ImageGetGiconMethodInfo a signature where
    overloadedMethod = imageGetGicon

#endif

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

foreign import ccall "gtk_image_get_icon_name" gtk_image_get_icon_name :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Gtk", name = "Image"})
    IO CString

-- | Gets the icon name and size being displayed by the t'GI.Gtk.Objects.Image.Image'.
-- The storage type of the image must be 'GI.Gtk.Enums.ImageTypeEmpty' or
-- 'GI.Gtk.Enums.ImageTypeIconName' (see 'GI.Gtk.Objects.Image.imageGetStorageType').
-- The returned string is owned by the t'GI.Gtk.Objects.Image.Image' and should not
-- be freed.
-- 
-- Note: This function was changed in 3.94 not to use out parameters
-- anymore, but return the icon name directly. See 'GI.Gtk.Objects.Image.imageGetIconSize'
-- for a way to get the icon size.
imageGetIconName ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: a t'GI.Gtk.Objects.Image.Image'
    -> m (Maybe T.Text)
    -- ^ __Returns:__ the icon name, or 'P.Nothing'
imageGetIconName :: a -> m (Maybe Text)
imageGetIconName image :: a
image = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ do
    Ptr 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
$ \result' :: CString
result' -> do
        Text
result'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result'
        Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    Maybe Text -> IO (Maybe Text)
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.MethodInfo ImageGetIconNameMethodInfo a signature where
    overloadedMethod = imageGetIconName

#endif

-- method Image::get_icon_size
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkImage" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gtk" , name = "IconSize" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_get_icon_size" gtk_image_get_icon_size :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Gtk", name = "Image"})
    IO CUInt

-- | Gets the icon size used by the /@image@/ when rendering icons.
imageGetIconSize ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: a t'GI.Gtk.Objects.Image.Image'
    -> m Gtk.Enums.IconSize
    -- ^ __Returns:__ the image size used by icons
imageGetIconSize :: a -> m IconSize
imageGetIconSize image :: a
image = IO IconSize -> m IconSize
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 (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.MethodInfo ImageGetIconSizeMethodInfo a signature where
    overloadedMethod = imageGetIconSize

#endif

-- method Image::get_paintable
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkImage" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gdk" , name = "Paintable" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_get_paintable" gtk_image_get_paintable :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Gtk", name = "Image"})
    IO (Ptr Gdk.Paintable.Paintable)

-- | Gets the image t'GI.Gdk.Interfaces.Paintable.Paintable' being displayed by the t'GI.Gtk.Objects.Image.Image'.
-- The storage type of the image must be 'GI.Gtk.Enums.ImageTypeEmpty' or
-- 'GI.Gtk.Enums.ImageTypePaintable' (see 'GI.Gtk.Objects.Image.imageGetStorageType').
-- The caller of this function does not own a reference to the
-- returned paintable.
imageGetPaintable ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: a t'GI.Gtk.Objects.Image.Image'
    -> m (Maybe Gdk.Paintable.Paintable)
    -- ^ __Returns:__ the displayed paintable, or 'P.Nothing' if
    --   the image is empty
imageGetPaintable :: a -> m (Maybe Paintable)
imageGetPaintable image :: a
image = IO (Maybe Paintable) -> m (Maybe Paintable)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Paintable) -> m (Maybe Paintable))
-> IO (Maybe Paintable) -> m (Maybe Paintable)
forall a b. (a -> b) -> a -> b
$ do
    Ptr 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
$ \result' :: Ptr Paintable
result' -> do
        Paintable
result'' <- ((ManagedPtr Paintable -> Paintable)
-> Ptr Paintable -> IO Paintable
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Paintable -> Paintable
Gdk.Paintable.Paintable) Ptr Paintable
result'
        Paintable -> IO Paintable
forall (m :: * -> *) a. Monad m => a -> m a
return Paintable
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    Maybe Paintable -> IO (Maybe Paintable)
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.MethodInfo ImageGetPaintableMethodInfo a signature where
    overloadedMethod = imageGetPaintable

#endif

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

foreign import ccall "gtk_image_get_pixel_size" gtk_image_get_pixel_size :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Gtk", name = "Image"})
    IO Int32

-- | Gets the pixel size used for named icons.
imageGetPixelSize ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: a t'GI.Gtk.Objects.Image.Image'
    -> m Int32
    -- ^ __Returns:__ the pixel size used for named icons.
imageGetPixelSize :: a -> m Int32
imageGetPixelSize image :: a
image = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr 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 (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.MethodInfo ImageGetPixelSizeMethodInfo a signature where
    overloadedMethod = imageGetPixelSize

#endif

-- method Image::get_storage_type
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkImage" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gtk" , name = "ImageType" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_get_storage_type" gtk_image_get_storage_type :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Gtk", name = "Image"})
    IO CUInt

-- | Gets the type of representation being used by the t'GI.Gtk.Objects.Image.Image'
-- to store image data. If the t'GI.Gtk.Objects.Image.Image' has no image data,
-- the return value will be 'GI.Gtk.Enums.ImageTypeEmpty'.
imageGetStorageType ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: a t'GI.Gtk.Objects.Image.Image'
    -> m Gtk.Enums.ImageType
    -- ^ __Returns:__ image representation being used
imageGetStorageType :: a -> m ImageType
imageGetStorageType image :: a
image = IO ImageType -> m ImageType
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 (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.MethodInfo ImageGetStorageTypeMethodInfo a signature where
    overloadedMethod = imageGetStorageType

#endif

-- method Image::set_from_file
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkImage" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "filename"
--           , argType = TBasicType TFileName
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a filename or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_set_from_file" gtk_image_set_from_file :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Gtk", name = "Image"})
    CString ->                              -- filename : TBasicType TFileName
    IO ()

-- | See 'GI.Gtk.Objects.Image.imageNewFromFile' for details.
imageSetFromFile ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: a t'GI.Gtk.Objects.Image.Image'
    -> Maybe ([Char])
    -- ^ /@filename@/: a filename or 'P.Nothing'
    -> m ()
imageSetFromFile :: a -> Maybe String -> m ()
imageSetFromFile image :: a
image filename :: Maybe String
filename = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr 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
        Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
        Just jFilename :: String
jFilename -> do
            CString
jFilename' <- String -> IO CString
stringToCString String
jFilename
            CString -> IO CString
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 (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ImageSetFromFileMethodInfo
instance (signature ~ (Maybe ([Char]) -> m ()), MonadIO m, IsImage a) => O.MethodInfo ImageSetFromFileMethodInfo a signature where
    overloadedMethod = imageSetFromFile

#endif

-- method Image::set_from_gicon
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkImage" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "icon"
--           , argType = TInterface Name { namespace = "Gio" , name = "Icon" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an icon" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_set_from_gicon" gtk_image_set_from_gicon :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Gtk", name = "Image"})
    Ptr Gio.Icon.Icon ->                    -- icon : TInterface (Name {namespace = "Gio", name = "Icon"})
    IO ()

-- | See 'GI.Gtk.Objects.Image.imageNewFromGicon' for details.
-- 
-- Note: Before 3.94, this function was taking an extra icon size
-- argument. See 'GI.Gtk.Objects.Image.imageSetIconSize' for another way to set
-- the icon size.
imageSetFromGicon ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a, Gio.Icon.IsIcon b) =>
    a
    -- ^ /@image@/: a t'GI.Gtk.Objects.Image.Image'
    -> b
    -- ^ /@icon@/: an icon
    -> m ()
imageSetFromGicon :: a -> b -> m ()
imageSetFromGicon image :: a
image icon :: b
icon = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr 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 (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.MethodInfo ImageSetFromGiconMethodInfo a signature where
    overloadedMethod = imageSetFromGicon

#endif

-- method Image::set_from_icon_name
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkImage" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "icon_name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an icon name or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_set_from_icon_name" gtk_image_set_from_icon_name :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Gtk", name = "Image"})
    CString ->                              -- icon_name : TBasicType TUTF8
    IO ()

-- | See 'GI.Gtk.Objects.Image.imageNewFromIconName' for details.
-- 
-- Note: Before 3.94, this function was taking an extra icon size
-- argument. See 'GI.Gtk.Objects.Image.imageSetIconSize' for another way to set
-- the icon size.
imageSetFromIconName ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: a t'GI.Gtk.Objects.Image.Image'
    -> Maybe (T.Text)
    -- ^ /@iconName@/: an icon name or 'P.Nothing'
    -> m ()
imageSetFromIconName :: a -> Maybe Text -> m ()
imageSetFromIconName image :: a
image iconName :: Maybe Text
iconName = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr 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
        Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
        Just jIconName :: Text
jIconName -> do
            CString
jIconName' <- Text -> IO CString
textToCString Text
jIconName
            CString -> IO CString
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 (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.MethodInfo ImageSetFromIconNameMethodInfo a signature where
    overloadedMethod = imageSetFromIconName

#endif

-- method Image::set_from_paintable
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkImage" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "paintable"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "Paintable" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkPaintable or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_set_from_paintable" gtk_image_set_from_paintable :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Gtk", name = "Image"})
    Ptr Gdk.Paintable.Paintable ->          -- paintable : TInterface (Name {namespace = "Gdk", name = "Paintable"})
    IO ()

-- | See 'GI.Gtk.Objects.Image.imageNewFromPaintable' for details.
imageSetFromPaintable ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a, Gdk.Paintable.IsPaintable b) =>
    a
    -- ^ /@image@/: a t'GI.Gtk.Objects.Image.Image'
    -> Maybe (b)
    -- ^ /@paintable@/: a t'GI.Gdk.Interfaces.Paintable.Paintable' or 'P.Nothing'
    -> m ()
imageSetFromPaintable :: a -> Maybe b -> m ()
imageSetFromPaintable image :: a
image paintable :: Maybe b
paintable = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr 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
        Nothing -> Ptr Paintable -> IO (Ptr Paintable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Paintable
forall a. Ptr a
nullPtr
        Just jPaintable :: 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 (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 (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.MethodInfo ImageSetFromPaintableMethodInfo a signature where
    overloadedMethod = imageSetFromPaintable

#endif

-- method Image::set_from_pixbuf
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkImage" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "pixbuf"
--           , argType =
--               TInterface Name { namespace = "GdkPixbuf" , name = "Pixbuf" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkPixbuf or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_set_from_pixbuf" gtk_image_set_from_pixbuf :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Gtk", name = "Image"})
    Ptr GdkPixbuf.Pixbuf.Pixbuf ->          -- pixbuf : TInterface (Name {namespace = "GdkPixbuf", name = "Pixbuf"})
    IO ()

-- | See 'GI.Gtk.Objects.Image.imageNewFromPixbuf' for details.
-- 
-- Note: This is a helper for 'GI.Gtk.Objects.Image.imageSetFromPaintable', and you can\'t
-- get back the exact pixbuf once this is called, only a paintable.
imageSetFromPixbuf ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a, GdkPixbuf.Pixbuf.IsPixbuf b) =>
    a
    -- ^ /@image@/: a t'GI.Gtk.Objects.Image.Image'
    -> Maybe (b)
    -- ^ /@pixbuf@/: a t'GI.GdkPixbuf.Objects.Pixbuf.Pixbuf' or 'P.Nothing'
    -> m ()
imageSetFromPixbuf :: a -> Maybe b -> m ()
imageSetFromPixbuf image :: a
image pixbuf :: Maybe b
pixbuf = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr 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
        Nothing -> Ptr Pixbuf -> IO (Ptr Pixbuf)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Pixbuf
forall a. Ptr a
nullPtr
        Just jPixbuf :: 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 (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 (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.MethodInfo ImageSetFromPixbufMethodInfo a signature where
    overloadedMethod = imageSetFromPixbuf

#endif

-- method Image::set_from_resource
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkImage" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "resource_path"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a resource path or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_set_from_resource" gtk_image_set_from_resource :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Gtk", name = "Image"})
    CString ->                              -- resource_path : TBasicType TUTF8
    IO ()

-- | See 'GI.Gtk.Objects.Image.imageNewFromResource' for details.
imageSetFromResource ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: a t'GI.Gtk.Objects.Image.Image'
    -> Maybe (T.Text)
    -- ^ /@resourcePath@/: a resource path or 'P.Nothing'
    -> m ()
imageSetFromResource :: a -> Maybe Text -> m ()
imageSetFromResource image :: a
image resourcePath :: Maybe Text
resourcePath = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr 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
        Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
        Just jResourcePath :: Text
jResourcePath -> do
            CString
jResourcePath' <- Text -> IO CString
textToCString Text
jResourcePath
            CString -> IO CString
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 (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.MethodInfo ImageSetFromResourceMethodInfo a signature where
    overloadedMethod = imageSetFromResource

#endif

-- method Image::set_icon_size
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkImage" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "icon_size"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "IconSize" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the new icon size" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_set_icon_size" gtk_image_set_icon_size :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Gtk", name = "Image"})
    CUInt ->                                -- icon_size : TInterface (Name {namespace = "Gtk", name = "IconSize"})
    IO ()

-- | Suggests an icon size to the theme for named icons.
imageSetIconSize ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: a t'GI.Gtk.Objects.Image.Image'
    -> Gtk.Enums.IconSize
    -- ^ /@iconSize@/: the new icon size
    -> m ()
imageSetIconSize :: a -> IconSize -> m ()
imageSetIconSize image :: a
image iconSize :: IconSize
iconSize = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr 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 (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.MethodInfo ImageSetIconSizeMethodInfo a signature where
    overloadedMethod = imageSetIconSize

#endif

-- method Image::set_pixel_size
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkImage" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "pixel_size"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the new pixel size" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_set_pixel_size" gtk_image_set_pixel_size :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Gtk", name = "Image"})
    Int32 ->                                -- pixel_size : TBasicType TInt
    IO ()

-- | Sets the pixel size to use for named icons. If the pixel size is set
-- to a value != -1, it is used instead of the icon size set by
-- 'GI.Gtk.Objects.Image.imageSetFromIconName'.
imageSetPixelSize ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: a t'GI.Gtk.Objects.Image.Image'
    -> Int32
    -- ^ /@pixelSize@/: the new pixel size
    -> m ()
imageSetPixelSize :: a -> Int32 -> m ()
imageSetPixelSize image :: a
image pixelSize :: Int32
pixelSize = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr 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 (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ImageSetPixelSizeMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m, IsImage a) => O.MethodInfo ImageSetPixelSizeMethodInfo a signature where
    overloadedMethod = imageSetPixelSize

#endif