{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.Objects.Image
(
Image(..) ,
IsImage ,
toImage ,
noImage ,
#if defined(ENABLE_OVERLOADING)
ResolveImageMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
ImageClearMethodInfo ,
#endif
imageClear ,
#if defined(ENABLE_OVERLOADING)
ImageGetGiconMethodInfo ,
#endif
imageGetGicon ,
#if defined(ENABLE_OVERLOADING)
ImageGetIconNameMethodInfo ,
#endif
imageGetIconName ,
#if defined(ENABLE_OVERLOADING)
ImageGetIconSizeMethodInfo ,
#endif
imageGetIconSize ,
#if defined(ENABLE_OVERLOADING)
ImageGetPaintableMethodInfo ,
#endif
imageGetPaintable ,
#if defined(ENABLE_OVERLOADING)
ImageGetPixelSizeMethodInfo ,
#endif
imageGetPixelSize ,
#if defined(ENABLE_OVERLOADING)
ImageGetStorageTypeMethodInfo ,
#endif
imageGetStorageType ,
imageNew ,
imageNewFromFile ,
imageNewFromGicon ,
imageNewFromIconName ,
imageNewFromPaintable ,
imageNewFromPixbuf ,
imageNewFromResource ,
#if defined(ENABLE_OVERLOADING)
ImageSetFromFileMethodInfo ,
#endif
imageSetFromFile ,
#if defined(ENABLE_OVERLOADING)
ImageSetFromGiconMethodInfo ,
#endif
imageSetFromGicon ,
#if defined(ENABLE_OVERLOADING)
ImageSetFromIconNameMethodInfo ,
#endif
imageSetFromIconName ,
#if defined(ENABLE_OVERLOADING)
ImageSetFromPaintableMethodInfo ,
#endif
imageSetFromPaintable ,
#if defined(ENABLE_OVERLOADING)
ImageSetFromPixbufMethodInfo ,
#endif
imageSetFromPixbuf ,
#if defined(ENABLE_OVERLOADING)
ImageSetFromResourceMethodInfo ,
#endif
imageSetFromResource ,
#if defined(ENABLE_OVERLOADING)
ImageSetIconSizeMethodInfo ,
#endif
imageSetIconSize ,
#if defined(ENABLE_OVERLOADING)
ImageSetPixelSizeMethodInfo ,
#endif
imageSetPixelSize ,
#if defined(ENABLE_OVERLOADING)
ImageFilePropertyInfo ,
#endif
clearImageFile ,
constructImageFile ,
getImageFile ,
#if defined(ENABLE_OVERLOADING)
imageFile ,
#endif
setImageFile ,
#if defined(ENABLE_OVERLOADING)
ImageGiconPropertyInfo ,
#endif
clearImageGicon ,
constructImageGicon ,
getImageGicon ,
#if defined(ENABLE_OVERLOADING)
imageGicon ,
#endif
setImageGicon ,
#if defined(ENABLE_OVERLOADING)
ImageIconNamePropertyInfo ,
#endif
clearImageIconName ,
constructImageIconName ,
getImageIconName ,
#if defined(ENABLE_OVERLOADING)
imageIconName ,
#endif
setImageIconName ,
#if defined(ENABLE_OVERLOADING)
ImageIconSizePropertyInfo ,
#endif
constructImageIconSize ,
getImageIconSize ,
#if defined(ENABLE_OVERLOADING)
imageIconSize ,
#endif
setImageIconSize ,
#if defined(ENABLE_OVERLOADING)
ImagePaintablePropertyInfo ,
#endif
clearImagePaintable ,
constructImagePaintable ,
getImagePaintable ,
#if defined(ENABLE_OVERLOADING)
imagePaintable ,
#endif
setImagePaintable ,
#if defined(ENABLE_OVERLOADING)
ImagePixelSizePropertyInfo ,
#endif
constructImagePixelSize ,
getImagePixelSize ,
#if defined(ENABLE_OVERLOADING)
imagePixelSize ,
#endif
setImagePixelSize ,
#if defined(ENABLE_OVERLOADING)
ImageResourcePropertyInfo ,
#endif
clearImageResource ,
constructImageResource ,
getImageResource ,
#if defined(ENABLE_OVERLOADING)
imageResource ,
#endif
setImageResource ,
#if defined(ENABLE_OVERLOADING)
ImageStorageTypePropertyInfo ,
#endif
getImageStorageType ,
#if defined(ENABLE_OVERLOADING)
imageStorageType ,
#endif
#if defined(ENABLE_OVERLOADING)
ImageUseFallbackPropertyInfo ,
#endif
constructImageUseFallback ,
getImageUseFallback ,
#if defined(ENABLE_OVERLOADING)
imageUseFallback ,
#endif
setImageUseFallback ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.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
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
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
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]
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
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
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"
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)
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)
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
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
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)
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)
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
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"
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)
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)
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
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"
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
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
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
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)
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)
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
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"
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
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
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"
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)
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)
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
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
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"
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
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
foreign import ccall "gtk_image_new" gtk_image_new ::
IO (Ptr Image)
imageNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
m Image
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
foreign import ccall "gtk_image_new_from_file" gtk_image_new_from_file ::
CString ->
IO (Ptr Image)
imageNewFromFile ::
(B.CallStack.HasCallStack, MonadIO m) =>
[Char]
-> m Image
imageNewFromFile :: 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
foreign import ccall "gtk_image_new_from_gicon" gtk_image_new_from_gicon ::
Ptr Gio.Icon.Icon ->
IO (Ptr Image)
imageNewFromGicon ::
(B.CallStack.HasCallStack, MonadIO m, Gio.Icon.IsIcon a) =>
a
-> m Image
imageNewFromGicon :: 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
foreign import ccall "gtk_image_new_from_icon_name" gtk_image_new_from_icon_name ::
CString ->
IO (Ptr Image)
imageNewFromIconName ::
(B.CallStack.HasCallStack, MonadIO m) =>
Maybe (T.Text)
-> m Image
imageNewFromIconName :: 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
foreign import ccall "gtk_image_new_from_paintable" gtk_image_new_from_paintable ::
Ptr Gdk.Paintable.Paintable ->
IO (Ptr Image)
imageNewFromPaintable ::
(B.CallStack.HasCallStack, MonadIO m, Gdk.Paintable.IsPaintable a) =>
Maybe (a)
-> m Image
imageNewFromPaintable :: 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
foreign import ccall "gtk_image_new_from_pixbuf" gtk_image_new_from_pixbuf ::
Ptr GdkPixbuf.Pixbuf.Pixbuf ->
IO (Ptr Image)
imageNewFromPixbuf ::
(B.CallStack.HasCallStack, MonadIO m, GdkPixbuf.Pixbuf.IsPixbuf a) =>
Maybe (a)
-> m Image
imageNewFromPixbuf :: 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
foreign import ccall "gtk_image_new_from_resource" gtk_image_new_from_resource ::
CString ->
IO (Ptr Image)
imageNewFromResource ::
(B.CallStack.HasCallStack, MonadIO m) =>
T.Text
-> m Image
imageNewFromResource :: 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
foreign import ccall "gtk_image_clear" gtk_image_clear ::
Ptr Image ->
IO ()
imageClear ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> 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
foreign import ccall "gtk_image_get_gicon" gtk_image_get_gicon ::
Ptr Image ->
IO (Ptr Gio.Icon.Icon)
imageGetGicon ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m (Maybe Gio.Icon.Icon)
imageGetGicon :: 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
foreign import ccall "gtk_image_get_icon_name" gtk_image_get_icon_name ::
Ptr Image ->
IO CString
imageGetIconName ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m (Maybe T.Text)
imageGetIconName :: 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
foreign import ccall "gtk_image_get_icon_size" gtk_image_get_icon_size ::
Ptr Image ->
IO CUInt
imageGetIconSize ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m Gtk.Enums.IconSize
imageGetIconSize :: 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
foreign import ccall "gtk_image_get_paintable" gtk_image_get_paintable ::
Ptr Image ->
IO (Ptr Gdk.Paintable.Paintable)
imageGetPaintable ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m (Maybe Gdk.Paintable.Paintable)
imageGetPaintable :: 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
foreign import ccall "gtk_image_get_pixel_size" gtk_image_get_pixel_size ::
Ptr Image ->
IO Int32
imageGetPixelSize ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m Int32
imageGetPixelSize :: 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
foreign import ccall "gtk_image_get_storage_type" gtk_image_get_storage_type ::
Ptr Image ->
IO CUInt
imageGetStorageType ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m Gtk.Enums.ImageType
imageGetStorageType :: 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
foreign import ccall "gtk_image_set_from_file" gtk_image_set_from_file ::
Ptr Image ->
CString ->
IO ()
imageSetFromFile ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> Maybe ([Char])
-> m ()
imageSetFromFile :: 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
foreign import ccall "gtk_image_set_from_gicon" gtk_image_set_from_gicon ::
Ptr Image ->
Ptr Gio.Icon.Icon ->
IO ()
imageSetFromGicon ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a, Gio.Icon.IsIcon b) =>
a
-> b
-> m ()
imageSetFromGicon :: 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
foreign import ccall "gtk_image_set_from_icon_name" gtk_image_set_from_icon_name ::
Ptr Image ->
CString ->
IO ()
imageSetFromIconName ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> Maybe (T.Text)
-> m ()
imageSetFromIconName :: 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
foreign import ccall "gtk_image_set_from_paintable" gtk_image_set_from_paintable ::
Ptr Image ->
Ptr Gdk.Paintable.Paintable ->
IO ()
imageSetFromPaintable ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a, Gdk.Paintable.IsPaintable b) =>
a
-> Maybe (b)
-> m ()
imageSetFromPaintable :: 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
foreign import ccall "gtk_image_set_from_pixbuf" gtk_image_set_from_pixbuf ::
Ptr Image ->
Ptr GdkPixbuf.Pixbuf.Pixbuf ->
IO ()
imageSetFromPixbuf ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a, GdkPixbuf.Pixbuf.IsPixbuf b) =>
a
-> Maybe (b)
-> m ()
imageSetFromPixbuf :: 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
foreign import ccall "gtk_image_set_from_resource" gtk_image_set_from_resource ::
Ptr Image ->
CString ->
IO ()
imageSetFromResource ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> Maybe (T.Text)
-> m ()
imageSetFromResource :: 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
foreign import ccall "gtk_image_set_icon_size" gtk_image_set_icon_size ::
Ptr Image ->
CUInt ->
IO ()
imageSetIconSize ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> Gtk.Enums.IconSize
-> m ()
imageSetIconSize :: 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
foreign import ccall "gtk_image_set_pixel_size" gtk_image_set_pixel_size ::
Ptr Image ->
Int32 ->
IO ()
imageSetPixelSize ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> Int32
-> m ()
imageSetPixelSize :: 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