{-# LANGUAGE ImplicitParams, RankNTypes, TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Vips.Objects.Image
(
#if defined(ENABLE_OVERLOADING)
ImageImageMapMethodInfo ,
#endif
Image(..) ,
IsImage ,
toImage ,
#if defined(ENABLE_OVERLOADING)
ResolveImageMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
ImageAutorotRemoveAngleMethodInfo ,
#endif
imageAutorotRemoveAngle ,
#if defined(ENABLE_OVERLOADING)
ImageForeignLoadInvalidateMethodInfo ,
#endif
imageForeignLoadInvalidate ,
#if defined(ENABLE_OVERLOADING)
ImageFreeBufferMethodInfo ,
#endif
imageFreeBuffer ,
#if defined(ENABLE_OVERLOADING)
ImageIccAc2rcMethodInfo ,
#endif
imageIccAc2rc ,
#if defined(ENABLE_OVERLOADING)
ImageImageCopyMemoryMethodInfo ,
#endif
imageImageCopyMemory ,
#if defined(ENABLE_OVERLOADING)
ImageImageDecodeMethodInfo ,
#endif
imageImageDecode ,
#if defined(ENABLE_OVERLOADING)
ImageImageDecodePredictMethodInfo ,
#endif
imageImageDecodePredict ,
#if defined(ENABLE_OVERLOADING)
ImageImageEncodeMethodInfo ,
#endif
imageImageEncode ,
#if defined(ENABLE_OVERLOADING)
ImageImageGetMethodInfo ,
#endif
imageImageGet ,
#if defined(ENABLE_OVERLOADING)
ImageImageGetAreaMethodInfo ,
#endif
imageImageGetArea ,
#if defined(ENABLE_OVERLOADING)
ImageImageGetArrayDoubleMethodInfo ,
#endif
imageImageGetArrayDouble ,
#if defined(ENABLE_OVERLOADING)
ImageImageGetArrayIntMethodInfo ,
#endif
imageImageGetArrayInt ,
#if defined(ENABLE_OVERLOADING)
ImageImageGetAsStringMethodInfo ,
#endif
imageImageGetAsString ,
#if defined(ENABLE_OVERLOADING)
ImageImageGetBandsMethodInfo ,
#endif
imageImageGetBands ,
#if defined(ENABLE_OVERLOADING)
ImageImageGetBlobMethodInfo ,
#endif
imageImageGetBlob ,
#if defined(ENABLE_OVERLOADING)
ImageImageGetCodingMethodInfo ,
#endif
imageImageGetCoding ,
#if defined(ENABLE_OVERLOADING)
ImageImageGetDataMethodInfo ,
#endif
imageImageGetData ,
#if defined(ENABLE_OVERLOADING)
ImageImageGetDoubleMethodInfo ,
#endif
imageImageGetDouble ,
#if defined(ENABLE_OVERLOADING)
ImageImageGetFieldsMethodInfo ,
#endif
imageImageGetFields ,
#if defined(ENABLE_OVERLOADING)
ImageImageGetFilenameMethodInfo ,
#endif
imageImageGetFilename ,
#if defined(ENABLE_OVERLOADING)
ImageImageGetFormatMethodInfo ,
#endif
imageImageGetFormat ,
#if defined(ENABLE_OVERLOADING)
ImageImageGetHeightMethodInfo ,
#endif
imageImageGetHeight ,
#if defined(ENABLE_OVERLOADING)
ImageImageGetHistoryMethodInfo ,
#endif
imageImageGetHistory ,
#if defined(ENABLE_OVERLOADING)
ImageImageGetImageMethodInfo ,
#endif
imageImageGetImage ,
#if defined(ENABLE_OVERLOADING)
ImageImageGetIntMethodInfo ,
#endif
imageImageGetInt ,
#if defined(ENABLE_OVERLOADING)
ImageImageGetInterpretationMethodInfo ,
#endif
imageImageGetInterpretation ,
#if defined(ENABLE_OVERLOADING)
ImageImageGetModeMethodInfo ,
#endif
imageImageGetMode ,
#if defined(ENABLE_OVERLOADING)
ImageImageGetNPagesMethodInfo ,
#endif
imageImageGetNPages ,
#if defined(ENABLE_OVERLOADING)
ImageImageGetNSubifdsMethodInfo ,
#endif
imageImageGetNSubifds ,
#if defined(ENABLE_OVERLOADING)
ImageImageGetOffsetMethodInfo ,
#endif
imageImageGetOffset ,
#if defined(ENABLE_OVERLOADING)
ImageImageGetOrientationMethodInfo ,
#endif
imageImageGetOrientation ,
#if defined(ENABLE_OVERLOADING)
ImageImageGetOrientationSwapMethodInfo ,
#endif
imageImageGetOrientationSwap ,
#if defined(ENABLE_OVERLOADING)
ImageImageGetPageHeightMethodInfo ,
#endif
imageImageGetPageHeight ,
#if defined(ENABLE_OVERLOADING)
ImageImageGetScaleMethodInfo ,
#endif
imageImageGetScale ,
#if defined(ENABLE_OVERLOADING)
ImageImageGetStringMethodInfo ,
#endif
imageImageGetString ,
#if defined(ENABLE_OVERLOADING)
ImageImageGetTypeofMethodInfo ,
#endif
imageImageGetTypeof ,
#if defined(ENABLE_OVERLOADING)
ImageImageGetWidthMethodInfo ,
#endif
imageImageGetWidth ,
#if defined(ENABLE_OVERLOADING)
ImageImageGetXoffsetMethodInfo ,
#endif
imageImageGetXoffset ,
#if defined(ENABLE_OVERLOADING)
ImageImageGetXresMethodInfo ,
#endif
imageImageGetXres ,
#if defined(ENABLE_OVERLOADING)
ImageImageGetYoffsetMethodInfo ,
#endif
imageImageGetYoffset ,
#if defined(ENABLE_OVERLOADING)
ImageImageGetYresMethodInfo ,
#endif
imageImageGetYres ,
#if defined(ENABLE_OVERLOADING)
ImageImageGuessFormatMethodInfo ,
#endif
imageImageGuessFormat ,
#if defined(ENABLE_OVERLOADING)
ImageImageGuessInterpretationMethodInfo ,
#endif
imageImageGuessInterpretation ,
#if defined(ENABLE_OVERLOADING)
ImageImageHasalphaMethodInfo ,
#endif
imageImageHasalpha ,
#if defined(ENABLE_OVERLOADING)
ImageImageHistoryArgsMethodInfo ,
#endif
imageImageHistoryArgs ,
#if defined(ENABLE_OVERLOADING)
ImageImageInitFieldsMethodInfo ,
#endif
imageImageInitFields ,
#if defined(ENABLE_OVERLOADING)
ImageImageInplaceMethodInfo ,
#endif
imageImageInplace ,
#if defined(ENABLE_OVERLOADING)
ImageImageInvalidateAllMethodInfo ,
#endif
imageImageInvalidateAll ,
#if defined(ENABLE_OVERLOADING)
ImageImageIsMSBfirstMethodInfo ,
#endif
imageImageIsMSBfirst ,
#if defined(ENABLE_OVERLOADING)
ImageImageIsSequentialMethodInfo ,
#endif
imageImageIsSequential ,
#if defined(ENABLE_OVERLOADING)
ImageImageIsfileMethodInfo ,
#endif
imageImageIsfile ,
#if defined(ENABLE_OVERLOADING)
ImageImageIskilledMethodInfo ,
#endif
imageImageIskilled ,
#if defined(ENABLE_OVERLOADING)
ImageImageIspartialMethodInfo ,
#endif
imageImageIspartial ,
#if defined(ENABLE_OVERLOADING)
ImageImageMinimiseAllMethodInfo ,
#endif
imageImageMinimiseAll ,
#if defined(ENABLE_OVERLOADING)
ImageImagePioInputMethodInfo ,
#endif
imageImagePioInput ,
#if defined(ENABLE_OVERLOADING)
ImageImagePioOutputMethodInfo ,
#endif
imageImagePioOutput ,
#if defined(ENABLE_OVERLOADING)
ImageImagePrintFieldMethodInfo ,
#endif
imageImagePrintField ,
#if defined(ENABLE_OVERLOADING)
ImageImageRemoveMethodInfo ,
#endif
imageImageRemove ,
#if defined(ENABLE_OVERLOADING)
ImageImageSetMethodInfo ,
#endif
imageImageSet ,
#if defined(ENABLE_OVERLOADING)
ImageImageSetAreaMethodInfo ,
#endif
imageImageSetArea ,
#if defined(ENABLE_OVERLOADING)
ImageImageSetArrayDoubleMethodInfo ,
#endif
imageImageSetArrayDouble ,
#if defined(ENABLE_OVERLOADING)
ImageImageSetArrayIntMethodInfo ,
#endif
imageImageSetArrayInt ,
#if defined(ENABLE_OVERLOADING)
ImageImageSetBlobMethodInfo ,
#endif
imageImageSetBlob ,
#if defined(ENABLE_OVERLOADING)
ImageImageSetBlobCopyMethodInfo ,
#endif
imageImageSetBlobCopy ,
#if defined(ENABLE_OVERLOADING)
ImageImageSetDeleteOnCloseMethodInfo ,
#endif
imageImageSetDeleteOnClose ,
#if defined(ENABLE_OVERLOADING)
ImageImageSetDoubleMethodInfo ,
#endif
imageImageSetDouble ,
#if defined(ENABLE_OVERLOADING)
ImageImageSetImageMethodInfo ,
#endif
imageImageSetImage ,
#if defined(ENABLE_OVERLOADING)
ImageImageSetIntMethodInfo ,
#endif
imageImageSetInt ,
#if defined(ENABLE_OVERLOADING)
ImageImageSetKillMethodInfo ,
#endif
imageImageSetKill ,
#if defined(ENABLE_OVERLOADING)
ImageImageSetProgressMethodInfo ,
#endif
imageImageSetProgress ,
#if defined(ENABLE_OVERLOADING)
ImageImageSetStringMethodInfo ,
#endif
imageImageSetString ,
#if defined(ENABLE_OVERLOADING)
ImageImageWioInputMethodInfo ,
#endif
imageImageWioInput ,
#if defined(ENABLE_OVERLOADING)
ImageImageWriteMethodInfo ,
#endif
imageImageWrite ,
#if defined(ENABLE_OVERLOADING)
ImageImageWriteLineMethodInfo ,
#endif
imageImageWriteLine ,
#if defined(ENABLE_OVERLOADING)
ImageImageWritePrepareMethodInfo ,
#endif
imageImageWritePrepare ,
#if defined(ENABLE_OVERLOADING)
ImageImageWriteToMemoryMethodInfo ,
#endif
imageImageWriteToMemory ,
imageMatrixFromArray ,
imageMemory ,
imageNew ,
imageNewFromFileRW ,
imageNewFromFileRaw ,
imageNewFromImage ,
imageNewFromImage1 ,
imageNewFromMemory ,
imageNewFromMemoryCopy ,
imageNewMatrix ,
imageNewMatrixFromArray ,
imageNewMemory ,
imageNewTempFile ,
#if defined(ENABLE_OVERLOADING)
ImageReorderMarginHintMethodInfo ,
#endif
imageReorderMarginHint ,
#if defined(ENABLE_OVERLOADING)
ImageReorderPrepareManyMethodInfo ,
#endif
imageReorderPrepareMany ,
#if defined(ENABLE_OVERLOADING)
ImageBandsPropertyInfo ,
#endif
constructImageBands ,
getImageBands ,
#if defined(ENABLE_OVERLOADING)
imageBands ,
#endif
setImageBands ,
#if defined(ENABLE_OVERLOADING)
ImageCodingPropertyInfo ,
#endif
constructImageCoding ,
getImageCoding ,
#if defined(ENABLE_OVERLOADING)
imageCoding ,
#endif
setImageCoding ,
#if defined(ENABLE_OVERLOADING)
ImageDemandPropertyInfo ,
#endif
constructImageDemand ,
getImageDemand ,
#if defined(ENABLE_OVERLOADING)
imageDemand ,
#endif
setImageDemand ,
#if defined(ENABLE_OVERLOADING)
ImageFilenamePropertyInfo ,
#endif
clearImageFilename ,
constructImageFilename ,
getImageFilename ,
#if defined(ENABLE_OVERLOADING)
imageFilename ,
#endif
setImageFilename ,
#if defined(ENABLE_OVERLOADING)
ImageForeignBufferPropertyInfo ,
#endif
constructImageForeignBuffer ,
getImageForeignBuffer ,
#if defined(ENABLE_OVERLOADING)
imageForeignBuffer ,
#endif
setImageForeignBuffer ,
#if defined(ENABLE_OVERLOADING)
ImageFormatPropertyInfo ,
#endif
constructImageFormat ,
getImageFormat ,
#if defined(ENABLE_OVERLOADING)
imageFormat ,
#endif
setImageFormat ,
#if defined(ENABLE_OVERLOADING)
ImageHeightPropertyInfo ,
#endif
constructImageHeight ,
getImageHeight ,
#if defined(ENABLE_OVERLOADING)
imageHeight ,
#endif
setImageHeight ,
#if defined(ENABLE_OVERLOADING)
ImageInterpretationPropertyInfo ,
#endif
constructImageInterpretation ,
getImageInterpretation ,
#if defined(ENABLE_OVERLOADING)
imageInterpretation ,
#endif
setImageInterpretation ,
#if defined(ENABLE_OVERLOADING)
ImageKillPropertyInfo ,
#endif
constructImageKill ,
getImageKill ,
#if defined(ENABLE_OVERLOADING)
imageKill ,
#endif
setImageKill ,
#if defined(ENABLE_OVERLOADING)
ImageModePropertyInfo ,
#endif
clearImageMode ,
constructImageMode ,
getImageMode ,
#if defined(ENABLE_OVERLOADING)
imageMode ,
#endif
setImageMode ,
#if defined(ENABLE_OVERLOADING)
ImageSizeofHeaderPropertyInfo ,
#endif
constructImageSizeofHeader ,
getImageSizeofHeader ,
#if defined(ENABLE_OVERLOADING)
imageSizeofHeader ,
#endif
setImageSizeofHeader ,
#if defined(ENABLE_OVERLOADING)
ImageWidthPropertyInfo ,
#endif
constructImageWidth ,
getImageWidth ,
#if defined(ENABLE_OVERLOADING)
imageWidth ,
#endif
setImageWidth ,
#if defined(ENABLE_OVERLOADING)
ImageXoffsetPropertyInfo ,
#endif
constructImageXoffset ,
getImageXoffset ,
#if defined(ENABLE_OVERLOADING)
imageXoffset ,
#endif
setImageXoffset ,
#if defined(ENABLE_OVERLOADING)
ImageXresPropertyInfo ,
#endif
constructImageXres ,
getImageXres ,
#if defined(ENABLE_OVERLOADING)
imageXres ,
#endif
setImageXres ,
#if defined(ENABLE_OVERLOADING)
ImageYoffsetPropertyInfo ,
#endif
constructImageYoffset ,
getImageYoffset ,
#if defined(ENABLE_OVERLOADING)
imageYoffset ,
#endif
setImageYoffset ,
#if defined(ENABLE_OVERLOADING)
ImageYresPropertyInfo ,
#endif
constructImageYres ,
getImageYres ,
#if defined(ENABLE_OVERLOADING)
imageYres ,
#endif
setImageYres ,
ImageEvalCallback ,
#if defined(ENABLE_OVERLOADING)
ImageEvalSignalInfo ,
#endif
afterImageEval ,
onImageEval ,
ImageInvalidateCallback ,
#if defined(ENABLE_OVERLOADING)
ImageInvalidateSignalInfo ,
#endif
afterImageInvalidate ,
onImageInvalidate ,
ImageMinimiseCallback ,
#if defined(ENABLE_OVERLOADING)
ImageMinimiseSignalInfo ,
#endif
afterImageMinimise ,
onImageMinimise ,
ImagePostevalCallback ,
#if defined(ENABLE_OVERLOADING)
ImagePostevalSignalInfo ,
#endif
afterImagePosteval ,
onImagePosteval ,
ImagePreevalCallback ,
#if defined(ENABLE_OVERLOADING)
ImagePreevalSignalInfo ,
#endif
afterImagePreeval ,
onImagePreeval ,
ImageWrittenCallback ,
#if defined(ENABLE_OVERLOADING)
ImageWrittenSignalInfo ,
#endif
afterImageWritten ,
onImageWritten ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Vips.Callbacks as Vips.Callbacks
import {-# SOURCE #-} qualified GI.Vips.Enums as Vips.Enums
import {-# SOURCE #-} qualified GI.Vips.Objects.Object as Vips.Object
import {-# SOURCE #-} qualified GI.Vips.Objects.Region as Vips.Region
import {-# SOURCE #-} qualified GI.Vips.Structs.Rect as Vips.Rect
newtype Image = Image (SP.ManagedPtr Image)
deriving (Image -> Image -> Bool
(Image -> Image -> Bool) -> (Image -> Image -> Bool) -> Eq Image
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Image -> Image -> Bool
$c/= :: Image -> Image -> Bool
== :: Image -> Image -> Bool
$c== :: Image -> Image -> Bool
Eq)
instance SP.ManagedPtrNewtype Image where
toManagedPtr :: Image -> ManagedPtr Image
toManagedPtr (Image ManagedPtr Image
p) = ManagedPtr Image
p
foreign import ccall "vips_image_get_type"
c_vips_image_get_type :: IO B.Types.GType
instance B.Types.TypedObject Image where
glibType :: IO GType
glibType = IO GType
c_vips_image_get_type
instance B.Types.GObject Image
class (SP.GObject o, O.IsDescendantOf Image o) => IsImage o
instance (SP.GObject o, O.IsDescendantOf Image o) => IsImage o
instance O.HasParentTypes Image
type instance O.ParentTypes Image = '[Vips.Object.Object, GObject.Object.Object]
toImage :: (MIO.MonadIO m, IsImage o) => o -> m Image
toImage :: forall (m :: * -> *) o. (MonadIO m, IsImage o) => o -> m Image
toImage = IO Image -> m Image
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Image -> m Image) -> (o -> IO Image) -> o -> m Image
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr Image -> Image) -> o -> IO Image
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr Image -> Image
Image
instance B.GValue.IsGValue (Maybe Image) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_vips_image_get_type
gvalueSet_ :: Ptr GValue -> Maybe Image -> IO ()
gvalueSet_ Ptr GValue
gv Maybe Image
P.Nothing = Ptr GValue -> Ptr Image -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr Image
forall a. Ptr a
FP.nullPtr :: FP.Ptr Image)
gvalueSet_ Ptr GValue
gv (P.Just Image
obj) = Image -> (Ptr Image -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Image
obj (Ptr GValue -> Ptr Image -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe Image)
gvalueGet_ Ptr GValue
gv = do
Ptr Image
ptr <- Ptr GValue -> IO (Ptr Image)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr Image)
if Ptr Image
ptr Ptr Image -> Ptr Image -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr Image
forall a. Ptr a
FP.nullPtr
then Image -> Maybe Image
forall a. a -> Maybe a
P.Just (Image -> Maybe Image) -> IO Image -> IO (Maybe Image)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr Image -> Image) -> Ptr Image -> IO Image
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr Image -> Image
Image Ptr Image
ptr
else Maybe Image -> IO (Maybe Image)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Image
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveImageMethod (t :: Symbol) (o :: *) :: * where
ResolveImageMethod "argumentIsset" o = Vips.Object.ObjectArgumentIssetMethodInfo
ResolveImageMethod "argumentNeedsstring" o = Vips.Object.ObjectArgumentNeedsstringMethodInfo
ResolveImageMethod "autorotRemoveAngle" o = ImageAutorotRemoveAngleMethodInfo
ResolveImageMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveImageMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveImageMethod "build" o = Vips.Object.ObjectBuildMethodInfo
ResolveImageMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveImageMethod "foreignLoadInvalidate" o = ImageForeignLoadInvalidateMethodInfo
ResolveImageMethod "freeBuffer" o = ImageFreeBufferMethodInfo
ResolveImageMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveImageMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveImageMethod "iccAc2rc" o = ImageIccAc2rcMethodInfo
ResolveImageMethod "imageCopyMemory" o = ImageImageCopyMemoryMethodInfo
ResolveImageMethod "imageDecode" o = ImageImageDecodeMethodInfo
ResolveImageMethod "imageDecodePredict" o = ImageImageDecodePredictMethodInfo
ResolveImageMethod "imageEncode" o = ImageImageEncodeMethodInfo
ResolveImageMethod "imageGet" o = ImageImageGetMethodInfo
ResolveImageMethod "imageGetArea" o = ImageImageGetAreaMethodInfo
ResolveImageMethod "imageGetArrayDouble" o = ImageImageGetArrayDoubleMethodInfo
ResolveImageMethod "imageGetArrayInt" o = ImageImageGetArrayIntMethodInfo
ResolveImageMethod "imageGetAsString" o = ImageImageGetAsStringMethodInfo
ResolveImageMethod "imageGetBands" o = ImageImageGetBandsMethodInfo
ResolveImageMethod "imageGetBlob" o = ImageImageGetBlobMethodInfo
ResolveImageMethod "imageGetCoding" o = ImageImageGetCodingMethodInfo
ResolveImageMethod "imageGetData" o = ImageImageGetDataMethodInfo
ResolveImageMethod "imageGetDouble" o = ImageImageGetDoubleMethodInfo
ResolveImageMethod "imageGetFields" o = ImageImageGetFieldsMethodInfo
ResolveImageMethod "imageGetFilename" o = ImageImageGetFilenameMethodInfo
ResolveImageMethod "imageGetFormat" o = ImageImageGetFormatMethodInfo
ResolveImageMethod "imageGetHeight" o = ImageImageGetHeightMethodInfo
ResolveImageMethod "imageGetHistory" o = ImageImageGetHistoryMethodInfo
ResolveImageMethod "imageGetImage" o = ImageImageGetImageMethodInfo
ResolveImageMethod "imageGetInt" o = ImageImageGetIntMethodInfo
ResolveImageMethod "imageGetInterpretation" o = ImageImageGetInterpretationMethodInfo
ResolveImageMethod "imageGetMode" o = ImageImageGetModeMethodInfo
ResolveImageMethod "imageGetNPages" o = ImageImageGetNPagesMethodInfo
ResolveImageMethod "imageGetNSubifds" o = ImageImageGetNSubifdsMethodInfo
ResolveImageMethod "imageGetOffset" o = ImageImageGetOffsetMethodInfo
ResolveImageMethod "imageGetOrientation" o = ImageImageGetOrientationMethodInfo
ResolveImageMethod "imageGetOrientationSwap" o = ImageImageGetOrientationSwapMethodInfo
ResolveImageMethod "imageGetPageHeight" o = ImageImageGetPageHeightMethodInfo
ResolveImageMethod "imageGetScale" o = ImageImageGetScaleMethodInfo
ResolveImageMethod "imageGetString" o = ImageImageGetStringMethodInfo
ResolveImageMethod "imageGetTypeof" o = ImageImageGetTypeofMethodInfo
ResolveImageMethod "imageGetWidth" o = ImageImageGetWidthMethodInfo
ResolveImageMethod "imageGetXoffset" o = ImageImageGetXoffsetMethodInfo
ResolveImageMethod "imageGetXres" o = ImageImageGetXresMethodInfo
ResolveImageMethod "imageGetYoffset" o = ImageImageGetYoffsetMethodInfo
ResolveImageMethod "imageGetYres" o = ImageImageGetYresMethodInfo
ResolveImageMethod "imageGuessFormat" o = ImageImageGuessFormatMethodInfo
ResolveImageMethod "imageGuessInterpretation" o = ImageImageGuessInterpretationMethodInfo
ResolveImageMethod "imageHasalpha" o = ImageImageHasalphaMethodInfo
ResolveImageMethod "imageHistoryArgs" o = ImageImageHistoryArgsMethodInfo
ResolveImageMethod "imageInitFields" o = ImageImageInitFieldsMethodInfo
ResolveImageMethod "imageInplace" o = ImageImageInplaceMethodInfo
ResolveImageMethod "imageInvalidateAll" o = ImageImageInvalidateAllMethodInfo
ResolveImageMethod "imageIsMSBfirst" o = ImageImageIsMSBfirstMethodInfo
ResolveImageMethod "imageIsSequential" o = ImageImageIsSequentialMethodInfo
ResolveImageMethod "imageIsfile" o = ImageImageIsfileMethodInfo
ResolveImageMethod "imageIskilled" o = ImageImageIskilledMethodInfo
ResolveImageMethod "imageIspartial" o = ImageImageIspartialMethodInfo
ResolveImageMethod "imageMap" o = ImageImageMapMethodInfo
ResolveImageMethod "imageMinimiseAll" o = ImageImageMinimiseAllMethodInfo
ResolveImageMethod "imagePioInput" o = ImageImagePioInputMethodInfo
ResolveImageMethod "imagePioOutput" o = ImageImagePioOutputMethodInfo
ResolveImageMethod "imagePrintField" o = ImageImagePrintFieldMethodInfo
ResolveImageMethod "imageRemove" o = ImageImageRemoveMethodInfo
ResolveImageMethod "imageSet" o = ImageImageSetMethodInfo
ResolveImageMethod "imageSetArea" o = ImageImageSetAreaMethodInfo
ResolveImageMethod "imageSetArrayDouble" o = ImageImageSetArrayDoubleMethodInfo
ResolveImageMethod "imageSetArrayInt" o = ImageImageSetArrayIntMethodInfo
ResolveImageMethod "imageSetBlob" o = ImageImageSetBlobMethodInfo
ResolveImageMethod "imageSetBlobCopy" o = ImageImageSetBlobCopyMethodInfo
ResolveImageMethod "imageSetDeleteOnClose" o = ImageImageSetDeleteOnCloseMethodInfo
ResolveImageMethod "imageSetDouble" o = ImageImageSetDoubleMethodInfo
ResolveImageMethod "imageSetImage" o = ImageImageSetImageMethodInfo
ResolveImageMethod "imageSetInt" o = ImageImageSetIntMethodInfo
ResolveImageMethod "imageSetKill" o = ImageImageSetKillMethodInfo
ResolveImageMethod "imageSetProgress" o = ImageImageSetProgressMethodInfo
ResolveImageMethod "imageSetString" o = ImageImageSetStringMethodInfo
ResolveImageMethod "imageWioInput" o = ImageImageWioInputMethodInfo
ResolveImageMethod "imageWrite" o = ImageImageWriteMethodInfo
ResolveImageMethod "imageWriteLine" o = ImageImageWriteLineMethodInfo
ResolveImageMethod "imageWritePrepare" o = ImageImageWritePrepareMethodInfo
ResolveImageMethod "imageWriteToMemory" o = ImageImageWriteToMemoryMethodInfo
ResolveImageMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveImageMethod "localCb" o = Vips.Object.ObjectLocalCbMethodInfo
ResolveImageMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveImageMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveImageMethod "preclose" o = Vips.Object.ObjectPrecloseMethodInfo
ResolveImageMethod "printDump" o = Vips.Object.ObjectPrintDumpMethodInfo
ResolveImageMethod "printName" o = Vips.Object.ObjectPrintNameMethodInfo
ResolveImageMethod "printSummary" o = Vips.Object.ObjectPrintSummaryMethodInfo
ResolveImageMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveImageMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveImageMethod "reorderMarginHint" o = ImageReorderMarginHintMethodInfo
ResolveImageMethod "reorderPrepareMany" o = ImageReorderPrepareManyMethodInfo
ResolveImageMethod "rewind" o = Vips.Object.ObjectRewindMethodInfo
ResolveImageMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveImageMethod "sanity" o = Vips.Object.ObjectSanityMethodInfo
ResolveImageMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveImageMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveImageMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveImageMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveImageMethod "unrefOutputs" o = Vips.Object.ObjectUnrefOutputsMethodInfo
ResolveImageMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveImageMethod "getArgumentFlags" o = Vips.Object.ObjectGetArgumentFlagsMethodInfo
ResolveImageMethod "getArgumentPriority" o = Vips.Object.ObjectGetArgumentPriorityMethodInfo
ResolveImageMethod "getArgumentToString" o = Vips.Object.ObjectGetArgumentToStringMethodInfo
ResolveImageMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveImageMethod "getDescription" o = Vips.Object.ObjectGetDescriptionMethodInfo
ResolveImageMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveImageMethod "setArgumentFromString" o = Vips.Object.ObjectSetArgumentFromStringMethodInfo
ResolveImageMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveImageMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveImageMethod "setFromString" o = Vips.Object.ObjectSetFromStringMethodInfo
ResolveImageMethod "setRequired" o = Vips.Object.ObjectSetRequiredMethodInfo
ResolveImageMethod "setStatic" o = Vips.Object.ObjectSetStaticMethodInfo
ResolveImageMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveImageMethod t Image, O.OverloadedMethod info Image p) => OL.IsLabel t (Image -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveImageMethod t Image, O.OverloadedMethod info Image p, R.HasField t Image p) => R.HasField t Image p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveImageMethod t Image, O.OverloadedMethodInfo info Image) => OL.IsLabel t (O.MethodProxy info Image) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
type ImageEvalCallback =
Ptr ()
-> IO ()
type C_ImageEvalCallback =
Ptr Image ->
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_ImageEvalCallback :: C_ImageEvalCallback -> IO (FunPtr C_ImageEvalCallback)
wrap_ImageEvalCallback ::
GObject a => (a -> ImageEvalCallback) ->
C_ImageEvalCallback
wrap_ImageEvalCallback :: forall a.
GObject a =>
(a -> ImageEvalCallback) -> C_ImageEvalCallback
wrap_ImageEvalCallback a -> ImageEvalCallback
gi'cb Ptr Image
gi'selfPtr Ptr ()
progress Ptr ()
_ = do
Ptr Image -> (Image -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Image
gi'selfPtr ((Image -> IO ()) -> IO ()) -> (Image -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Image
gi'self -> a -> ImageEvalCallback
gi'cb (Image -> a
Coerce.coerce Image
gi'self) Ptr ()
progress
onImageEval :: (IsImage a, MonadIO m) => a -> ((?self :: a) => ImageEvalCallback) -> m SignalHandlerId
onImageEval :: forall a (m :: * -> *).
(IsImage a, MonadIO m) =>
a -> ((?self::a) => ImageEvalCallback) -> m SignalHandlerId
onImageEval a
obj (?self::a) => ImageEvalCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> ImageEvalCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => ImageEvalCallback
ImageEvalCallback
cb
let wrapped' :: C_ImageEvalCallback
wrapped' = (a -> ImageEvalCallback) -> C_ImageEvalCallback
forall a.
GObject a =>
(a -> ImageEvalCallback) -> C_ImageEvalCallback
wrap_ImageEvalCallback a -> ImageEvalCallback
wrapped
FunPtr C_ImageEvalCallback
wrapped'' <- C_ImageEvalCallback -> IO (FunPtr C_ImageEvalCallback)
mk_ImageEvalCallback C_ImageEvalCallback
wrapped'
a
-> Text
-> FunPtr C_ImageEvalCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"eval" FunPtr C_ImageEvalCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterImageEval :: (IsImage a, MonadIO m) => a -> ((?self :: a) => ImageEvalCallback) -> m SignalHandlerId
afterImageEval :: forall a (m :: * -> *).
(IsImage a, MonadIO m) =>
a -> ((?self::a) => ImageEvalCallback) -> m SignalHandlerId
afterImageEval a
obj (?self::a) => ImageEvalCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> ImageEvalCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => ImageEvalCallback
ImageEvalCallback
cb
let wrapped' :: C_ImageEvalCallback
wrapped' = (a -> ImageEvalCallback) -> C_ImageEvalCallback
forall a.
GObject a =>
(a -> ImageEvalCallback) -> C_ImageEvalCallback
wrap_ImageEvalCallback a -> ImageEvalCallback
wrapped
FunPtr C_ImageEvalCallback
wrapped'' <- C_ImageEvalCallback -> IO (FunPtr C_ImageEvalCallback)
mk_ImageEvalCallback C_ImageEvalCallback
wrapped'
a
-> Text
-> FunPtr C_ImageEvalCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"eval" FunPtr C_ImageEvalCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data ImageEvalSignalInfo
instance SignalInfo ImageEvalSignalInfo where
type HaskellCallbackType ImageEvalSignalInfo = ImageEvalCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_ImageEvalCallback cb
cb'' <- mk_ImageEvalCallback cb'
connectSignalFunPtr obj "eval" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image::eval"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#g:signal:eval"})
#endif
type ImageInvalidateCallback =
IO ()
type C_ImageInvalidateCallback =
Ptr Image ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_ImageInvalidateCallback :: C_ImageInvalidateCallback -> IO (FunPtr C_ImageInvalidateCallback)
wrap_ImageInvalidateCallback ::
GObject a => (a -> ImageInvalidateCallback) ->
C_ImageInvalidateCallback
wrap_ImageInvalidateCallback :: forall a. GObject a => (a -> IO ()) -> C_ImageInvalidateCallback
wrap_ImageInvalidateCallback a -> IO ()
gi'cb Ptr Image
gi'selfPtr Ptr ()
_ = do
Ptr Image -> (Image -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Image
gi'selfPtr ((Image -> IO ()) -> IO ()) -> (Image -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Image
gi'self -> a -> IO ()
gi'cb (Image -> a
Coerce.coerce Image
gi'self)
onImageInvalidate :: (IsImage a, MonadIO m) => a -> ((?self :: a) => ImageInvalidateCallback) -> m SignalHandlerId
onImageInvalidate :: forall a (m :: * -> *).
(IsImage a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
onImageInvalidate a
obj (?self::a) => IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
let wrapped' :: C_ImageInvalidateCallback
wrapped' = (a -> IO ()) -> C_ImageInvalidateCallback
forall a. GObject a => (a -> IO ()) -> C_ImageInvalidateCallback
wrap_ImageInvalidateCallback a -> IO ()
wrapped
FunPtr C_ImageInvalidateCallback
wrapped'' <- C_ImageInvalidateCallback -> IO (FunPtr C_ImageInvalidateCallback)
mk_ImageInvalidateCallback C_ImageInvalidateCallback
wrapped'
a
-> Text
-> FunPtr C_ImageInvalidateCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"invalidate" FunPtr C_ImageInvalidateCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterImageInvalidate :: (IsImage a, MonadIO m) => a -> ((?self :: a) => ImageInvalidateCallback) -> m SignalHandlerId
afterImageInvalidate :: forall a (m :: * -> *).
(IsImage a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
afterImageInvalidate a
obj (?self::a) => IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
let wrapped' :: C_ImageInvalidateCallback
wrapped' = (a -> IO ()) -> C_ImageInvalidateCallback
forall a. GObject a => (a -> IO ()) -> C_ImageInvalidateCallback
wrap_ImageInvalidateCallback a -> IO ()
wrapped
FunPtr C_ImageInvalidateCallback
wrapped'' <- C_ImageInvalidateCallback -> IO (FunPtr C_ImageInvalidateCallback)
mk_ImageInvalidateCallback C_ImageInvalidateCallback
wrapped'
a
-> Text
-> FunPtr C_ImageInvalidateCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"invalidate" FunPtr C_ImageInvalidateCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data ImageInvalidateSignalInfo
instance SignalInfo ImageInvalidateSignalInfo where
type HaskellCallbackType ImageInvalidateSignalInfo = ImageInvalidateCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_ImageInvalidateCallback cb
cb'' <- mk_ImageInvalidateCallback cb'
connectSignalFunPtr obj "invalidate" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image::invalidate"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#g:signal:invalidate"})
#endif
type ImageMinimiseCallback =
IO ()
type C_ImageMinimiseCallback =
Ptr Image ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_ImageMinimiseCallback :: C_ImageMinimiseCallback -> IO (FunPtr C_ImageMinimiseCallback)
wrap_ImageMinimiseCallback ::
GObject a => (a -> ImageMinimiseCallback) ->
C_ImageMinimiseCallback
wrap_ImageMinimiseCallback :: forall a. GObject a => (a -> IO ()) -> C_ImageInvalidateCallback
wrap_ImageMinimiseCallback a -> IO ()
gi'cb Ptr Image
gi'selfPtr Ptr ()
_ = do
Ptr Image -> (Image -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Image
gi'selfPtr ((Image -> IO ()) -> IO ()) -> (Image -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Image
gi'self -> a -> IO ()
gi'cb (Image -> a
Coerce.coerce Image
gi'self)
onImageMinimise :: (IsImage a, MonadIO m) => a -> ((?self :: a) => ImageMinimiseCallback) -> m SignalHandlerId
onImageMinimise :: forall a (m :: * -> *).
(IsImage a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
onImageMinimise a
obj (?self::a) => IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
let wrapped' :: C_ImageInvalidateCallback
wrapped' = (a -> IO ()) -> C_ImageInvalidateCallback
forall a. GObject a => (a -> IO ()) -> C_ImageInvalidateCallback
wrap_ImageMinimiseCallback a -> IO ()
wrapped
FunPtr C_ImageInvalidateCallback
wrapped'' <- C_ImageInvalidateCallback -> IO (FunPtr C_ImageInvalidateCallback)
mk_ImageMinimiseCallback C_ImageInvalidateCallback
wrapped'
a
-> Text
-> FunPtr C_ImageInvalidateCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"minimise" FunPtr C_ImageInvalidateCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterImageMinimise :: (IsImage a, MonadIO m) => a -> ((?self :: a) => ImageMinimiseCallback) -> m SignalHandlerId
afterImageMinimise :: forall a (m :: * -> *).
(IsImage a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
afterImageMinimise a
obj (?self::a) => IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
let wrapped' :: C_ImageInvalidateCallback
wrapped' = (a -> IO ()) -> C_ImageInvalidateCallback
forall a. GObject a => (a -> IO ()) -> C_ImageInvalidateCallback
wrap_ImageMinimiseCallback a -> IO ()
wrapped
FunPtr C_ImageInvalidateCallback
wrapped'' <- C_ImageInvalidateCallback -> IO (FunPtr C_ImageInvalidateCallback)
mk_ImageMinimiseCallback C_ImageInvalidateCallback
wrapped'
a
-> Text
-> FunPtr C_ImageInvalidateCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"minimise" FunPtr C_ImageInvalidateCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data ImageMinimiseSignalInfo
instance SignalInfo ImageMinimiseSignalInfo where
type HaskellCallbackType ImageMinimiseSignalInfo = ImageMinimiseCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_ImageMinimiseCallback cb
cb'' <- mk_ImageMinimiseCallback cb'
connectSignalFunPtr obj "minimise" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image::minimise"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#g:signal:minimise"})
#endif
type ImagePostevalCallback =
Ptr ()
-> IO ()
type C_ImagePostevalCallback =
Ptr Image ->
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_ImagePostevalCallback :: C_ImagePostevalCallback -> IO (FunPtr C_ImagePostevalCallback)
wrap_ImagePostevalCallback ::
GObject a => (a -> ImagePostevalCallback) ->
C_ImagePostevalCallback
wrap_ImagePostevalCallback :: forall a.
GObject a =>
(a -> ImageEvalCallback) -> C_ImageEvalCallback
wrap_ImagePostevalCallback a -> ImageEvalCallback
gi'cb Ptr Image
gi'selfPtr Ptr ()
progress Ptr ()
_ = do
Ptr Image -> (Image -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Image
gi'selfPtr ((Image -> IO ()) -> IO ()) -> (Image -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Image
gi'self -> a -> ImageEvalCallback
gi'cb (Image -> a
Coerce.coerce Image
gi'self) Ptr ()
progress
onImagePosteval :: (IsImage a, MonadIO m) => a -> ((?self :: a) => ImagePostevalCallback) -> m SignalHandlerId
onImagePosteval :: forall a (m :: * -> *).
(IsImage a, MonadIO m) =>
a -> ((?self::a) => ImageEvalCallback) -> m SignalHandlerId
onImagePosteval a
obj (?self::a) => ImageEvalCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> ImageEvalCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => ImageEvalCallback
ImageEvalCallback
cb
let wrapped' :: C_ImageEvalCallback
wrapped' = (a -> ImageEvalCallback) -> C_ImageEvalCallback
forall a.
GObject a =>
(a -> ImageEvalCallback) -> C_ImageEvalCallback
wrap_ImagePostevalCallback a -> ImageEvalCallback
wrapped
FunPtr C_ImageEvalCallback
wrapped'' <- C_ImageEvalCallback -> IO (FunPtr C_ImageEvalCallback)
mk_ImagePostevalCallback C_ImageEvalCallback
wrapped'
a
-> Text
-> FunPtr C_ImageEvalCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"posteval" FunPtr C_ImageEvalCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterImagePosteval :: (IsImage a, MonadIO m) => a -> ((?self :: a) => ImagePostevalCallback) -> m SignalHandlerId
afterImagePosteval :: forall a (m :: * -> *).
(IsImage a, MonadIO m) =>
a -> ((?self::a) => ImageEvalCallback) -> m SignalHandlerId
afterImagePosteval a
obj (?self::a) => ImageEvalCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> ImageEvalCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => ImageEvalCallback
ImageEvalCallback
cb
let wrapped' :: C_ImageEvalCallback
wrapped' = (a -> ImageEvalCallback) -> C_ImageEvalCallback
forall a.
GObject a =>
(a -> ImageEvalCallback) -> C_ImageEvalCallback
wrap_ImagePostevalCallback a -> ImageEvalCallback
wrapped
FunPtr C_ImageEvalCallback
wrapped'' <- C_ImageEvalCallback -> IO (FunPtr C_ImageEvalCallback)
mk_ImagePostevalCallback C_ImageEvalCallback
wrapped'
a
-> Text
-> FunPtr C_ImageEvalCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"posteval" FunPtr C_ImageEvalCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data ImagePostevalSignalInfo
instance SignalInfo ImagePostevalSignalInfo where
type HaskellCallbackType ImagePostevalSignalInfo = ImagePostevalCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_ImagePostevalCallback cb
cb'' <- mk_ImagePostevalCallback cb'
connectSignalFunPtr obj "posteval" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image::posteval"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#g:signal:posteval"})
#endif
type ImagePreevalCallback =
Ptr ()
-> IO ()
type C_ImagePreevalCallback =
Ptr Image ->
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_ImagePreevalCallback :: C_ImagePreevalCallback -> IO (FunPtr C_ImagePreevalCallback)
wrap_ImagePreevalCallback ::
GObject a => (a -> ImagePreevalCallback) ->
C_ImagePreevalCallback
wrap_ImagePreevalCallback :: forall a.
GObject a =>
(a -> ImageEvalCallback) -> C_ImageEvalCallback
wrap_ImagePreevalCallback a -> ImageEvalCallback
gi'cb Ptr Image
gi'selfPtr Ptr ()
progress Ptr ()
_ = do
Ptr Image -> (Image -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Image
gi'selfPtr ((Image -> IO ()) -> IO ()) -> (Image -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Image
gi'self -> a -> ImageEvalCallback
gi'cb (Image -> a
Coerce.coerce Image
gi'self) Ptr ()
progress
onImagePreeval :: (IsImage a, MonadIO m) => a -> ((?self :: a) => ImagePreevalCallback) -> m SignalHandlerId
onImagePreeval :: forall a (m :: * -> *).
(IsImage a, MonadIO m) =>
a -> ((?self::a) => ImageEvalCallback) -> m SignalHandlerId
onImagePreeval a
obj (?self::a) => ImageEvalCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> ImageEvalCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => ImageEvalCallback
ImageEvalCallback
cb
let wrapped' :: C_ImageEvalCallback
wrapped' = (a -> ImageEvalCallback) -> C_ImageEvalCallback
forall a.
GObject a =>
(a -> ImageEvalCallback) -> C_ImageEvalCallback
wrap_ImagePreevalCallback a -> ImageEvalCallback
wrapped
FunPtr C_ImageEvalCallback
wrapped'' <- C_ImageEvalCallback -> IO (FunPtr C_ImageEvalCallback)
mk_ImagePreevalCallback C_ImageEvalCallback
wrapped'
a
-> Text
-> FunPtr C_ImageEvalCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"preeval" FunPtr C_ImageEvalCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterImagePreeval :: (IsImage a, MonadIO m) => a -> ((?self :: a) => ImagePreevalCallback) -> m SignalHandlerId
afterImagePreeval :: forall a (m :: * -> *).
(IsImage a, MonadIO m) =>
a -> ((?self::a) => ImageEvalCallback) -> m SignalHandlerId
afterImagePreeval a
obj (?self::a) => ImageEvalCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> ImageEvalCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => ImageEvalCallback
ImageEvalCallback
cb
let wrapped' :: C_ImageEvalCallback
wrapped' = (a -> ImageEvalCallback) -> C_ImageEvalCallback
forall a.
GObject a =>
(a -> ImageEvalCallback) -> C_ImageEvalCallback
wrap_ImagePreevalCallback a -> ImageEvalCallback
wrapped
FunPtr C_ImageEvalCallback
wrapped'' <- C_ImageEvalCallback -> IO (FunPtr C_ImageEvalCallback)
mk_ImagePreevalCallback C_ImageEvalCallback
wrapped'
a
-> Text
-> FunPtr C_ImageEvalCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"preeval" FunPtr C_ImageEvalCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data ImagePreevalSignalInfo
instance SignalInfo ImagePreevalSignalInfo where
type HaskellCallbackType ImagePreevalSignalInfo = ImagePreevalCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_ImagePreevalCallback cb
cb'' <- mk_ImagePreevalCallback cb'
connectSignalFunPtr obj "preeval" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image::preeval"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#g:signal:preeval"})
#endif
type ImageWrittenCallback =
Ptr ()
-> IO ()
type C_ImageWrittenCallback =
Ptr Image ->
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_ImageWrittenCallback :: C_ImageWrittenCallback -> IO (FunPtr C_ImageWrittenCallback)
wrap_ImageWrittenCallback ::
GObject a => (a -> ImageWrittenCallback) ->
C_ImageWrittenCallback
wrap_ImageWrittenCallback :: forall a.
GObject a =>
(a -> ImageEvalCallback) -> C_ImageEvalCallback
wrap_ImageWrittenCallback a -> ImageEvalCallback
gi'cb Ptr Image
gi'selfPtr Ptr ()
result_ Ptr ()
_ = do
Ptr Image -> (Image -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Image
gi'selfPtr ((Image -> IO ()) -> IO ()) -> (Image -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Image
gi'self -> a -> ImageEvalCallback
gi'cb (Image -> a
Coerce.coerce Image
gi'self) Ptr ()
result_
onImageWritten :: (IsImage a, MonadIO m) => a -> ((?self :: a) => ImageWrittenCallback) -> m SignalHandlerId
onImageWritten :: forall a (m :: * -> *).
(IsImage a, MonadIO m) =>
a -> ((?self::a) => ImageEvalCallback) -> m SignalHandlerId
onImageWritten a
obj (?self::a) => ImageEvalCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> ImageEvalCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => ImageEvalCallback
ImageEvalCallback
cb
let wrapped' :: C_ImageEvalCallback
wrapped' = (a -> ImageEvalCallback) -> C_ImageEvalCallback
forall a.
GObject a =>
(a -> ImageEvalCallback) -> C_ImageEvalCallback
wrap_ImageWrittenCallback a -> ImageEvalCallback
wrapped
FunPtr C_ImageEvalCallback
wrapped'' <- C_ImageEvalCallback -> IO (FunPtr C_ImageEvalCallback)
mk_ImageWrittenCallback C_ImageEvalCallback
wrapped'
a
-> Text
-> FunPtr C_ImageEvalCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"written" FunPtr C_ImageEvalCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterImageWritten :: (IsImage a, MonadIO m) => a -> ((?self :: a) => ImageWrittenCallback) -> m SignalHandlerId
afterImageWritten :: forall a (m :: * -> *).
(IsImage a, MonadIO m) =>
a -> ((?self::a) => ImageEvalCallback) -> m SignalHandlerId
afterImageWritten a
obj (?self::a) => ImageEvalCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> ImageEvalCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => ImageEvalCallback
ImageEvalCallback
cb
let wrapped' :: C_ImageEvalCallback
wrapped' = (a -> ImageEvalCallback) -> C_ImageEvalCallback
forall a.
GObject a =>
(a -> ImageEvalCallback) -> C_ImageEvalCallback
wrap_ImageWrittenCallback a -> ImageEvalCallback
wrapped
FunPtr C_ImageEvalCallback
wrapped'' <- C_ImageEvalCallback -> IO (FunPtr C_ImageEvalCallback)
mk_ImageWrittenCallback C_ImageEvalCallback
wrapped'
a
-> Text
-> FunPtr C_ImageEvalCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"written" FunPtr C_ImageEvalCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data ImageWrittenSignalInfo
instance SignalInfo ImageWrittenSignalInfo where
type HaskellCallbackType ImageWrittenSignalInfo = ImageWrittenCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_ImageWrittenCallback cb
cb'' <- mk_ImageWrittenCallback cb'
connectSignalFunPtr obj "written" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image::written"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#g:signal:written"})
#endif
getImageBands :: (MonadIO m, IsImage o) => o -> m Int32
getImageBands :: forall (m :: * -> *) o. (MonadIO m, IsImage o) => o -> m Int32
getImageBands o
obj = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Int32
forall a. GObject a => a -> String -> IO Int32
B.Properties.getObjectPropertyInt32 o
obj String
"bands"
setImageBands :: (MonadIO m, IsImage o) => o -> Int32 -> m ()
setImageBands :: forall (m :: * -> *) o.
(MonadIO m, IsImage o) =>
o -> Int32 -> m ()
setImageBands o
obj Int32
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Int32 -> IO ()
forall a. GObject a => a -> String -> Int32 -> IO ()
B.Properties.setObjectPropertyInt32 o
obj String
"bands" Int32
val
constructImageBands :: (IsImage o, MIO.MonadIO m) => Int32 -> m (GValueConstruct o)
constructImageBands :: forall o (m :: * -> *).
(IsImage o, MonadIO m) =>
Int32 -> m (GValueConstruct o)
constructImageBands Int32
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Int32 -> IO (GValueConstruct o)
forall o. String -> Int32 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyInt32 String
"bands" Int32
val
#if defined(ENABLE_OVERLOADING)
data ImageBandsPropertyInfo
instance AttrInfo ImageBandsPropertyInfo where
type AttrAllowedOps ImageBandsPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint ImageBandsPropertyInfo = IsImage
type AttrSetTypeConstraint ImageBandsPropertyInfo = (~) Int32
type AttrTransferTypeConstraint ImageBandsPropertyInfo = (~) Int32
type AttrTransferType ImageBandsPropertyInfo = Int32
type AttrGetType ImageBandsPropertyInfo = Int32
type AttrLabel ImageBandsPropertyInfo = "bands"
type AttrOrigin ImageBandsPropertyInfo = Image
attrGet = getImageBands
attrSet = setImageBands
attrTransfer _ v = do
return v
attrConstruct = constructImageBands
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.bands"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#g:attr:bands"
})
#endif
getImageCoding :: (MonadIO m, IsImage o) => o -> m Vips.Enums.Coding
getImageCoding :: forall (m :: * -> *) o. (MonadIO m, IsImage o) => o -> m Coding
getImageCoding o
obj = IO Coding -> m Coding
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Coding -> m Coding) -> IO Coding -> m Coding
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Coding
forall a b. (GObject a, Enum b, BoxedEnum b) => a -> String -> IO b
B.Properties.getObjectPropertyEnum o
obj String
"coding"
setImageCoding :: (MonadIO m, IsImage o) => o -> Vips.Enums.Coding -> m ()
setImageCoding :: forall (m :: * -> *) o.
(MonadIO m, IsImage o) =>
o -> Coding -> m ()
setImageCoding o
obj Coding
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Coding -> IO ()
forall a b.
(GObject a, Enum b, BoxedEnum b) =>
a -> String -> b -> IO ()
B.Properties.setObjectPropertyEnum o
obj String
"coding" Coding
val
constructImageCoding :: (IsImage o, MIO.MonadIO m) => Vips.Enums.Coding -> m (GValueConstruct o)
constructImageCoding :: forall o (m :: * -> *).
(IsImage o, MonadIO m) =>
Coding -> m (GValueConstruct o)
constructImageCoding Coding
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Coding -> IO (GValueConstruct o)
forall a o.
(Enum a, BoxedEnum a) =>
String -> a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyEnum String
"coding" Coding
val
#if defined(ENABLE_OVERLOADING)
data ImageCodingPropertyInfo
instance AttrInfo ImageCodingPropertyInfo where
type AttrAllowedOps ImageCodingPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint ImageCodingPropertyInfo = IsImage
type AttrSetTypeConstraint ImageCodingPropertyInfo = (~) Vips.Enums.Coding
type AttrTransferTypeConstraint ImageCodingPropertyInfo = (~) Vips.Enums.Coding
type AttrTransferType ImageCodingPropertyInfo = Vips.Enums.Coding
type AttrGetType ImageCodingPropertyInfo = Vips.Enums.Coding
type AttrLabel ImageCodingPropertyInfo = "coding"
type AttrOrigin ImageCodingPropertyInfo = Image
attrGet = getImageCoding
attrSet = setImageCoding
attrTransfer _ v = do
return v
attrConstruct = constructImageCoding
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.coding"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#g:attr:coding"
})
#endif
getImageDemand :: (MonadIO m, IsImage o) => o -> m Vips.Enums.DemandStyle
getImageDemand :: forall (m :: * -> *) o.
(MonadIO m, IsImage o) =>
o -> m DemandStyle
getImageDemand o
obj = IO DemandStyle -> m DemandStyle
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO DemandStyle -> m DemandStyle)
-> IO DemandStyle -> m DemandStyle
forall a b. (a -> b) -> a -> b
$ o -> String -> IO DemandStyle
forall a b. (GObject a, Enum b, BoxedEnum b) => a -> String -> IO b
B.Properties.getObjectPropertyEnum o
obj String
"demand"
setImageDemand :: (MonadIO m, IsImage o) => o -> Vips.Enums.DemandStyle -> m ()
setImageDemand :: forall (m :: * -> *) o.
(MonadIO m, IsImage o) =>
o -> DemandStyle -> m ()
setImageDemand o
obj DemandStyle
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> DemandStyle -> IO ()
forall a b.
(GObject a, Enum b, BoxedEnum b) =>
a -> String -> b -> IO ()
B.Properties.setObjectPropertyEnum o
obj String
"demand" DemandStyle
val
constructImageDemand :: (IsImage o, MIO.MonadIO m) => Vips.Enums.DemandStyle -> m (GValueConstruct o)
constructImageDemand :: forall o (m :: * -> *).
(IsImage o, MonadIO m) =>
DemandStyle -> m (GValueConstruct o)
constructImageDemand DemandStyle
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> DemandStyle -> IO (GValueConstruct o)
forall a o.
(Enum a, BoxedEnum a) =>
String -> a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyEnum String
"demand" DemandStyle
val
#if defined(ENABLE_OVERLOADING)
data ImageDemandPropertyInfo
instance AttrInfo ImageDemandPropertyInfo where
type AttrAllowedOps ImageDemandPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint ImageDemandPropertyInfo = IsImage
type AttrSetTypeConstraint ImageDemandPropertyInfo = (~) Vips.Enums.DemandStyle
type AttrTransferTypeConstraint ImageDemandPropertyInfo = (~) Vips.Enums.DemandStyle
type AttrTransferType ImageDemandPropertyInfo = Vips.Enums.DemandStyle
type AttrGetType ImageDemandPropertyInfo = Vips.Enums.DemandStyle
type AttrLabel ImageDemandPropertyInfo = "demand"
type AttrOrigin ImageDemandPropertyInfo = Image
attrGet = getImageDemand
attrSet = setImageDemand
attrTransfer _ v = do
return v
attrConstruct = constructImageDemand
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.demand"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#g:attr:demand"
})
#endif
getImageFilename :: (MonadIO m, IsImage o) => o -> m (Maybe T.Text)
getImageFilename :: forall (m :: * -> *) o.
(MonadIO m, IsImage o) =>
o -> m (Maybe Text)
getImageFilename o
obj = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"filename"
setImageFilename :: (MonadIO m, IsImage o) => o -> T.Text -> m ()
setImageFilename :: forall (m :: * -> *) o. (MonadIO m, IsImage o) => o -> Text -> m ()
setImageFilename o
obj Text
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj String
"filename" (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
val)
constructImageFilename :: (IsImage o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructImageFilename :: forall o (m :: * -> *).
(IsImage o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructImageFilename Text
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"filename" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)
clearImageFilename :: (MonadIO m, IsImage o) => o -> m ()
clearImageFilename :: forall (m :: * -> *) o. (MonadIO m, IsImage o) => o -> m ()
clearImageFilename o
obj = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj String
"filename" (Maybe Text
forall a. Maybe a
Nothing :: Maybe T.Text)
#if defined(ENABLE_OVERLOADING)
data ImageFilenamePropertyInfo
instance AttrInfo ImageFilenamePropertyInfo where
type AttrAllowedOps ImageFilenamePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint ImageFilenamePropertyInfo = IsImage
type AttrSetTypeConstraint ImageFilenamePropertyInfo = (~) T.Text
type AttrTransferTypeConstraint ImageFilenamePropertyInfo = (~) T.Text
type AttrTransferType ImageFilenamePropertyInfo = T.Text
type AttrGetType ImageFilenamePropertyInfo = (Maybe T.Text)
type AttrLabel ImageFilenamePropertyInfo = "filename"
type AttrOrigin ImageFilenamePropertyInfo = Image
attrGet = getImageFilename
attrSet = setImageFilename
attrTransfer _ v = do
return v
attrConstruct = constructImageFilename
attrClear = clearImageFilename
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.filename"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#g:attr:filename"
})
#endif
getImageForeignBuffer :: (MonadIO m, IsImage o) => o -> m (Ptr ())
getImageForeignBuffer :: forall (m :: * -> *) o. (MonadIO m, IsImage o) => o -> m (Ptr ())
getImageForeignBuffer o
obj = IO (Ptr ()) -> m (Ptr ())
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Ptr ()) -> m (Ptr ())) -> IO (Ptr ()) -> m (Ptr ())
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Ptr ())
forall a b. GObject a => a -> String -> IO (Ptr b)
B.Properties.getObjectPropertyPtr o
obj String
"foreign-buffer"
setImageForeignBuffer :: (MonadIO m, IsImage o) => o -> Ptr () -> m ()
setImageForeignBuffer :: forall (m :: * -> *) o.
(MonadIO m, IsImage o) =>
o -> Ptr () -> m ()
setImageForeignBuffer o
obj Ptr ()
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> ImageEvalCallback
forall a b. GObject a => a -> String -> Ptr b -> IO ()
B.Properties.setObjectPropertyPtr o
obj String
"foreign-buffer" Ptr ()
val
constructImageForeignBuffer :: (IsImage o, MIO.MonadIO m) => Ptr () -> m (GValueConstruct o)
constructImageForeignBuffer :: forall o (m :: * -> *).
(IsImage o, MonadIO m) =>
Ptr () -> m (GValueConstruct o)
constructImageForeignBuffer Ptr ()
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Ptr () -> IO (GValueConstruct o)
forall b o. String -> Ptr b -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyPtr String
"foreign-buffer" Ptr ()
val
#if defined(ENABLE_OVERLOADING)
data ImageForeignBufferPropertyInfo
instance AttrInfo ImageForeignBufferPropertyInfo where
type AttrAllowedOps ImageForeignBufferPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint ImageForeignBufferPropertyInfo = IsImage
type AttrSetTypeConstraint ImageForeignBufferPropertyInfo = (~) (Ptr ())
type AttrTransferTypeConstraint ImageForeignBufferPropertyInfo = (~) (Ptr ())
type AttrTransferType ImageForeignBufferPropertyInfo = Ptr ()
type AttrGetType ImageForeignBufferPropertyInfo = (Ptr ())
type AttrLabel ImageForeignBufferPropertyInfo = "foreign-buffer"
type AttrOrigin ImageForeignBufferPropertyInfo = Image
attrGet = getImageForeignBuffer
attrSet = setImageForeignBuffer
attrTransfer _ v = do
return v
attrConstruct = constructImageForeignBuffer
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.foreignBuffer"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#g:attr:foreignBuffer"
})
#endif
getImageFormat :: (MonadIO m, IsImage o) => o -> m Vips.Enums.BandFormat
getImageFormat :: forall (m :: * -> *) o. (MonadIO m, IsImage o) => o -> m BandFormat
getImageFormat o
obj = IO BandFormat -> m BandFormat
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO BandFormat -> m BandFormat) -> IO BandFormat -> m BandFormat
forall a b. (a -> b) -> a -> b
$ o -> String -> IO BandFormat
forall a b. (GObject a, Enum b, BoxedEnum b) => a -> String -> IO b
B.Properties.getObjectPropertyEnum o
obj String
"format"
setImageFormat :: (MonadIO m, IsImage o) => o -> Vips.Enums.BandFormat -> m ()
setImageFormat :: forall (m :: * -> *) o.
(MonadIO m, IsImage o) =>
o -> BandFormat -> m ()
setImageFormat o
obj BandFormat
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> BandFormat -> IO ()
forall a b.
(GObject a, Enum b, BoxedEnum b) =>
a -> String -> b -> IO ()
B.Properties.setObjectPropertyEnum o
obj String
"format" BandFormat
val
constructImageFormat :: (IsImage o, MIO.MonadIO m) => Vips.Enums.BandFormat -> m (GValueConstruct o)
constructImageFormat :: forall o (m :: * -> *).
(IsImage o, MonadIO m) =>
BandFormat -> m (GValueConstruct o)
constructImageFormat BandFormat
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> BandFormat -> IO (GValueConstruct o)
forall a o.
(Enum a, BoxedEnum a) =>
String -> a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyEnum String
"format" BandFormat
val
#if defined(ENABLE_OVERLOADING)
data ImageFormatPropertyInfo
instance AttrInfo ImageFormatPropertyInfo where
type AttrAllowedOps ImageFormatPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint ImageFormatPropertyInfo = IsImage
type AttrSetTypeConstraint ImageFormatPropertyInfo = (~) Vips.Enums.BandFormat
type AttrTransferTypeConstraint ImageFormatPropertyInfo = (~) Vips.Enums.BandFormat
type AttrTransferType ImageFormatPropertyInfo = Vips.Enums.BandFormat
type AttrGetType ImageFormatPropertyInfo = Vips.Enums.BandFormat
type AttrLabel ImageFormatPropertyInfo = "format"
type AttrOrigin ImageFormatPropertyInfo = Image
attrGet = getImageFormat
attrSet = setImageFormat
attrTransfer _ v = do
return v
attrConstruct = constructImageFormat
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.format"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#g:attr:format"
})
#endif
getImageHeight :: (MonadIO m, IsImage o) => o -> m Int32
getImageHeight :: forall (m :: * -> *) o. (MonadIO m, IsImage o) => o -> m Int32
getImageHeight o
obj = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Int32
forall a. GObject a => a -> String -> IO Int32
B.Properties.getObjectPropertyInt32 o
obj String
"height"
setImageHeight :: (MonadIO m, IsImage o) => o -> Int32 -> m ()
setImageHeight :: forall (m :: * -> *) o.
(MonadIO m, IsImage o) =>
o -> Int32 -> m ()
setImageHeight o
obj Int32
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Int32 -> IO ()
forall a. GObject a => a -> String -> Int32 -> IO ()
B.Properties.setObjectPropertyInt32 o
obj String
"height" Int32
val
constructImageHeight :: (IsImage o, MIO.MonadIO m) => Int32 -> m (GValueConstruct o)
constructImageHeight :: forall o (m :: * -> *).
(IsImage o, MonadIO m) =>
Int32 -> m (GValueConstruct o)
constructImageHeight Int32
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Int32 -> IO (GValueConstruct o)
forall o. String -> Int32 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyInt32 String
"height" Int32
val
#if defined(ENABLE_OVERLOADING)
data ImageHeightPropertyInfo
instance AttrInfo ImageHeightPropertyInfo where
type AttrAllowedOps ImageHeightPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint ImageHeightPropertyInfo = IsImage
type AttrSetTypeConstraint ImageHeightPropertyInfo = (~) Int32
type AttrTransferTypeConstraint ImageHeightPropertyInfo = (~) Int32
type AttrTransferType ImageHeightPropertyInfo = Int32
type AttrGetType ImageHeightPropertyInfo = Int32
type AttrLabel ImageHeightPropertyInfo = "height"
type AttrOrigin ImageHeightPropertyInfo = Image
attrGet = getImageHeight
attrSet = setImageHeight
attrTransfer _ v = do
return v
attrConstruct = constructImageHeight
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.height"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#g:attr:height"
})
#endif
getImageInterpretation :: (MonadIO m, IsImage o) => o -> m Vips.Enums.Interpretation
getImageInterpretation :: forall (m :: * -> *) o.
(MonadIO m, IsImage o) =>
o -> m Interpretation
getImageInterpretation o
obj = IO Interpretation -> m Interpretation
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Interpretation -> m Interpretation)
-> IO Interpretation -> m Interpretation
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Interpretation
forall a b. (GObject a, Enum b, BoxedEnum b) => a -> String -> IO b
B.Properties.getObjectPropertyEnum o
obj String
"interpretation"
setImageInterpretation :: (MonadIO m, IsImage o) => o -> Vips.Enums.Interpretation -> m ()
setImageInterpretation :: forall (m :: * -> *) o.
(MonadIO m, IsImage o) =>
o -> Interpretation -> m ()
setImageInterpretation o
obj Interpretation
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Interpretation -> IO ()
forall a b.
(GObject a, Enum b, BoxedEnum b) =>
a -> String -> b -> IO ()
B.Properties.setObjectPropertyEnum o
obj String
"interpretation" Interpretation
val
constructImageInterpretation :: (IsImage o, MIO.MonadIO m) => Vips.Enums.Interpretation -> m (GValueConstruct o)
constructImageInterpretation :: forall o (m :: * -> *).
(IsImage o, MonadIO m) =>
Interpretation -> m (GValueConstruct o)
constructImageInterpretation Interpretation
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Interpretation -> IO (GValueConstruct o)
forall a o.
(Enum a, BoxedEnum a) =>
String -> a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyEnum String
"interpretation" Interpretation
val
#if defined(ENABLE_OVERLOADING)
data ImageInterpretationPropertyInfo
instance AttrInfo ImageInterpretationPropertyInfo where
type AttrAllowedOps ImageInterpretationPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint ImageInterpretationPropertyInfo = IsImage
type AttrSetTypeConstraint ImageInterpretationPropertyInfo = (~) Vips.Enums.Interpretation
type AttrTransferTypeConstraint ImageInterpretationPropertyInfo = (~) Vips.Enums.Interpretation
type AttrTransferType ImageInterpretationPropertyInfo = Vips.Enums.Interpretation
type AttrGetType ImageInterpretationPropertyInfo = Vips.Enums.Interpretation
type AttrLabel ImageInterpretationPropertyInfo = "interpretation"
type AttrOrigin ImageInterpretationPropertyInfo = Image
attrGet = getImageInterpretation
attrSet = setImageInterpretation
attrTransfer _ v = do
return v
attrConstruct = constructImageInterpretation
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.interpretation"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#g:attr:interpretation"
})
#endif
getImageKill :: (MonadIO m, IsImage o) => o -> m Bool
getImageKill :: forall (m :: * -> *) o. (MonadIO m, IsImage o) => o -> m Bool
getImageKill o
obj = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"kill"
setImageKill :: (MonadIO m, IsImage o) => o -> Bool -> m ()
setImageKill :: forall (m :: * -> *) o. (MonadIO m, IsImage o) => o -> Bool -> m ()
setImageKill o
obj Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj String
"kill" Bool
val
constructImageKill :: (IsImage o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructImageKill :: forall o (m :: * -> *).
(IsImage o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructImageKill Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"kill" Bool
val
#if defined(ENABLE_OVERLOADING)
data ImageKillPropertyInfo
instance AttrInfo ImageKillPropertyInfo where
type AttrAllowedOps ImageKillPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint ImageKillPropertyInfo = IsImage
type AttrSetTypeConstraint ImageKillPropertyInfo = (~) Bool
type AttrTransferTypeConstraint ImageKillPropertyInfo = (~) Bool
type AttrTransferType ImageKillPropertyInfo = Bool
type AttrGetType ImageKillPropertyInfo = Bool
type AttrLabel ImageKillPropertyInfo = "kill"
type AttrOrigin ImageKillPropertyInfo = Image
attrGet = getImageKill
attrSet = setImageKill
attrTransfer _ v = do
return v
attrConstruct = constructImageKill
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.kill"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#g:attr:kill"
})
#endif
getImageMode :: (MonadIO m, IsImage o) => o -> m (Maybe T.Text)
getImageMode :: forall (m :: * -> *) o.
(MonadIO m, IsImage o) =>
o -> m (Maybe Text)
getImageMode o
obj = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"mode"
setImageMode :: (MonadIO m, IsImage o) => o -> T.Text -> m ()
setImageMode :: forall (m :: * -> *) o. (MonadIO m, IsImage o) => o -> Text -> m ()
setImageMode o
obj Text
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj String
"mode" (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
val)
constructImageMode :: (IsImage o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructImageMode :: forall o (m :: * -> *).
(IsImage o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructImageMode Text
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"mode" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)
clearImageMode :: (MonadIO m, IsImage o) => o -> m ()
clearImageMode :: forall (m :: * -> *) o. (MonadIO m, IsImage o) => o -> m ()
clearImageMode o
obj = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj String
"mode" (Maybe Text
forall a. Maybe a
Nothing :: Maybe T.Text)
#if defined(ENABLE_OVERLOADING)
data ImageModePropertyInfo
instance AttrInfo ImageModePropertyInfo where
type AttrAllowedOps ImageModePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint ImageModePropertyInfo = IsImage
type AttrSetTypeConstraint ImageModePropertyInfo = (~) T.Text
type AttrTransferTypeConstraint ImageModePropertyInfo = (~) T.Text
type AttrTransferType ImageModePropertyInfo = T.Text
type AttrGetType ImageModePropertyInfo = (Maybe T.Text)
type AttrLabel ImageModePropertyInfo = "mode"
type AttrOrigin ImageModePropertyInfo = Image
attrGet = getImageMode
attrSet = setImageMode
attrTransfer _ v = do
return v
attrConstruct = constructImageMode
attrClear = clearImageMode
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.mode"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#g:attr:mode"
})
#endif
getImageSizeofHeader :: (MonadIO m, IsImage o) => o -> m Word64
o
obj = IO Word64 -> m Word64
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Word64 -> m Word64) -> IO Word64 -> m Word64
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Word64
forall a. GObject a => a -> String -> IO Word64
B.Properties.getObjectPropertyUInt64 o
obj String
"sizeof-header"
setImageSizeofHeader :: (MonadIO m, IsImage o) => o -> Word64 -> m ()
o
obj Word64
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Word64 -> IO ()
forall a. GObject a => a -> String -> Word64 -> IO ()
B.Properties.setObjectPropertyUInt64 o
obj String
"sizeof-header" Word64
val
constructImageSizeofHeader :: (IsImage o, MIO.MonadIO m) => Word64 -> m (GValueConstruct o)
Word64
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Word64 -> IO (GValueConstruct o)
forall o. String -> Word64 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyUInt64 String
"sizeof-header" Word64
val
#if defined(ENABLE_OVERLOADING)
data ImageSizeofHeaderPropertyInfo
instance AttrInfo ImageSizeofHeaderPropertyInfo where
type AttrAllowedOps ImageSizeofHeaderPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint ImageSizeofHeaderPropertyInfo = IsImage
type AttrSetTypeConstraint ImageSizeofHeaderPropertyInfo = (~) Word64
type AttrTransferTypeConstraint ImageSizeofHeaderPropertyInfo = (~) Word64
type AttrTransferType ImageSizeofHeaderPropertyInfo = Word64
type AttrGetType ImageSizeofHeaderPropertyInfo = Word64
type AttrLabel ImageSizeofHeaderPropertyInfo = "sizeof-header"
type AttrOrigin ImageSizeofHeaderPropertyInfo = Image
attrGet = getImageSizeofHeader
attrSet = setImageSizeofHeader
attrTransfer _ v = do
return v
attrConstruct = constructImageSizeofHeader
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.sizeofHeader"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#g:attr:sizeofHeader"
})
#endif
getImageWidth :: (MonadIO m, IsImage o) => o -> m Int32
getImageWidth :: forall (m :: * -> *) o. (MonadIO m, IsImage o) => o -> m Int32
getImageWidth o
obj = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Int32
forall a. GObject a => a -> String -> IO Int32
B.Properties.getObjectPropertyInt32 o
obj String
"width"
setImageWidth :: (MonadIO m, IsImage o) => o -> Int32 -> m ()
setImageWidth :: forall (m :: * -> *) o.
(MonadIO m, IsImage o) =>
o -> Int32 -> m ()
setImageWidth o
obj Int32
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Int32 -> IO ()
forall a. GObject a => a -> String -> Int32 -> IO ()
B.Properties.setObjectPropertyInt32 o
obj String
"width" Int32
val
constructImageWidth :: (IsImage o, MIO.MonadIO m) => Int32 -> m (GValueConstruct o)
constructImageWidth :: forall o (m :: * -> *).
(IsImage o, MonadIO m) =>
Int32 -> m (GValueConstruct o)
constructImageWidth Int32
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Int32 -> IO (GValueConstruct o)
forall o. String -> Int32 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyInt32 String
"width" Int32
val
#if defined(ENABLE_OVERLOADING)
data ImageWidthPropertyInfo
instance AttrInfo ImageWidthPropertyInfo where
type AttrAllowedOps ImageWidthPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint ImageWidthPropertyInfo = IsImage
type AttrSetTypeConstraint ImageWidthPropertyInfo = (~) Int32
type AttrTransferTypeConstraint ImageWidthPropertyInfo = (~) Int32
type AttrTransferType ImageWidthPropertyInfo = Int32
type AttrGetType ImageWidthPropertyInfo = Int32
type AttrLabel ImageWidthPropertyInfo = "width"
type AttrOrigin ImageWidthPropertyInfo = Image
attrGet = getImageWidth
attrSet = setImageWidth
attrTransfer _ v = do
return v
attrConstruct = constructImageWidth
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.width"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#g:attr:width"
})
#endif
getImageXoffset :: (MonadIO m, IsImage o) => o -> m Int32
getImageXoffset :: forall (m :: * -> *) o. (MonadIO m, IsImage o) => o -> m Int32
getImageXoffset o
obj = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Int32
forall a. GObject a => a -> String -> IO Int32
B.Properties.getObjectPropertyInt32 o
obj String
"xoffset"
setImageXoffset :: (MonadIO m, IsImage o) => o -> Int32 -> m ()
setImageXoffset :: forall (m :: * -> *) o.
(MonadIO m, IsImage o) =>
o -> Int32 -> m ()
setImageXoffset o
obj Int32
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Int32 -> IO ()
forall a. GObject a => a -> String -> Int32 -> IO ()
B.Properties.setObjectPropertyInt32 o
obj String
"xoffset" Int32
val
constructImageXoffset :: (IsImage o, MIO.MonadIO m) => Int32 -> m (GValueConstruct o)
constructImageXoffset :: forall o (m :: * -> *).
(IsImage o, MonadIO m) =>
Int32 -> m (GValueConstruct o)
constructImageXoffset Int32
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Int32 -> IO (GValueConstruct o)
forall o. String -> Int32 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyInt32 String
"xoffset" Int32
val
#if defined(ENABLE_OVERLOADING)
data ImageXoffsetPropertyInfo
instance AttrInfo ImageXoffsetPropertyInfo where
type AttrAllowedOps ImageXoffsetPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint ImageXoffsetPropertyInfo = IsImage
type AttrSetTypeConstraint ImageXoffsetPropertyInfo = (~) Int32
type AttrTransferTypeConstraint ImageXoffsetPropertyInfo = (~) Int32
type AttrTransferType ImageXoffsetPropertyInfo = Int32
type AttrGetType ImageXoffsetPropertyInfo = Int32
type AttrLabel ImageXoffsetPropertyInfo = "xoffset"
type AttrOrigin ImageXoffsetPropertyInfo = Image
attrGet = getImageXoffset
attrSet = setImageXoffset
attrTransfer _ v = do
return v
attrConstruct = constructImageXoffset
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.xoffset"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#g:attr:xoffset"
})
#endif
getImageXres :: (MonadIO m, IsImage o) => o -> m Double
getImageXres :: forall (m :: * -> *) o. (MonadIO m, IsImage o) => o -> m Double
getImageXres o
obj = IO Double -> m Double
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Double -> m Double) -> IO Double -> m Double
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Double
forall a. GObject a => a -> String -> IO Double
B.Properties.getObjectPropertyDouble o
obj String
"xres"
setImageXres :: (MonadIO m, IsImage o) => o -> Double -> m ()
setImageXres :: forall (m :: * -> *) o.
(MonadIO m, IsImage o) =>
o -> Double -> m ()
setImageXres o
obj Double
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Double -> IO ()
forall a. GObject a => a -> String -> Double -> IO ()
B.Properties.setObjectPropertyDouble o
obj String
"xres" Double
val
constructImageXres :: (IsImage o, MIO.MonadIO m) => Double -> m (GValueConstruct o)
constructImageXres :: forall o (m :: * -> *).
(IsImage o, MonadIO m) =>
Double -> m (GValueConstruct o)
constructImageXres Double
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Double -> IO (GValueConstruct o)
forall o. String -> Double -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyDouble String
"xres" Double
val
#if defined(ENABLE_OVERLOADING)
data ImageXresPropertyInfo
instance AttrInfo ImageXresPropertyInfo where
type AttrAllowedOps ImageXresPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint ImageXresPropertyInfo = IsImage
type AttrSetTypeConstraint ImageXresPropertyInfo = (~) Double
type AttrTransferTypeConstraint ImageXresPropertyInfo = (~) Double
type AttrTransferType ImageXresPropertyInfo = Double
type AttrGetType ImageXresPropertyInfo = Double
type AttrLabel ImageXresPropertyInfo = "xres"
type AttrOrigin ImageXresPropertyInfo = Image
attrGet = getImageXres
attrSet = setImageXres
attrTransfer _ v = do
return v
attrConstruct = constructImageXres
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.xres"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#g:attr:xres"
})
#endif
getImageYoffset :: (MonadIO m, IsImage o) => o -> m Int32
getImageYoffset :: forall (m :: * -> *) o. (MonadIO m, IsImage o) => o -> m Int32
getImageYoffset o
obj = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Int32
forall a. GObject a => a -> String -> IO Int32
B.Properties.getObjectPropertyInt32 o
obj String
"yoffset"
setImageYoffset :: (MonadIO m, IsImage o) => o -> Int32 -> m ()
setImageYoffset :: forall (m :: * -> *) o.
(MonadIO m, IsImage o) =>
o -> Int32 -> m ()
setImageYoffset o
obj Int32
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Int32 -> IO ()
forall a. GObject a => a -> String -> Int32 -> IO ()
B.Properties.setObjectPropertyInt32 o
obj String
"yoffset" Int32
val
constructImageYoffset :: (IsImage o, MIO.MonadIO m) => Int32 -> m (GValueConstruct o)
constructImageYoffset :: forall o (m :: * -> *).
(IsImage o, MonadIO m) =>
Int32 -> m (GValueConstruct o)
constructImageYoffset Int32
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Int32 -> IO (GValueConstruct o)
forall o. String -> Int32 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyInt32 String
"yoffset" Int32
val
#if defined(ENABLE_OVERLOADING)
data ImageYoffsetPropertyInfo
instance AttrInfo ImageYoffsetPropertyInfo where
type AttrAllowedOps ImageYoffsetPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint ImageYoffsetPropertyInfo = IsImage
type AttrSetTypeConstraint ImageYoffsetPropertyInfo = (~) Int32
type AttrTransferTypeConstraint ImageYoffsetPropertyInfo = (~) Int32
type AttrTransferType ImageYoffsetPropertyInfo = Int32
type AttrGetType ImageYoffsetPropertyInfo = Int32
type AttrLabel ImageYoffsetPropertyInfo = "yoffset"
type AttrOrigin ImageYoffsetPropertyInfo = Image
attrGet = getImageYoffset
attrSet = setImageYoffset
attrTransfer _ v = do
return v
attrConstruct = constructImageYoffset
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.yoffset"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#g:attr:yoffset"
})
#endif
getImageYres :: (MonadIO m, IsImage o) => o -> m Double
getImageYres :: forall (m :: * -> *) o. (MonadIO m, IsImage o) => o -> m Double
getImageYres o
obj = IO Double -> m Double
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Double -> m Double) -> IO Double -> m Double
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Double
forall a. GObject a => a -> String -> IO Double
B.Properties.getObjectPropertyDouble o
obj String
"yres"
setImageYres :: (MonadIO m, IsImage o) => o -> Double -> m ()
setImageYres :: forall (m :: * -> *) o.
(MonadIO m, IsImage o) =>
o -> Double -> m ()
setImageYres o
obj Double
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Double -> IO ()
forall a. GObject a => a -> String -> Double -> IO ()
B.Properties.setObjectPropertyDouble o
obj String
"yres" Double
val
constructImageYres :: (IsImage o, MIO.MonadIO m) => Double -> m (GValueConstruct o)
constructImageYres :: forall o (m :: * -> *).
(IsImage o, MonadIO m) =>
Double -> m (GValueConstruct o)
constructImageYres Double
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Double -> IO (GValueConstruct o)
forall o. String -> Double -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyDouble String
"yres" Double
val
#if defined(ENABLE_OVERLOADING)
data ImageYresPropertyInfo
instance AttrInfo ImageYresPropertyInfo where
type AttrAllowedOps ImageYresPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint ImageYresPropertyInfo = IsImage
type AttrSetTypeConstraint ImageYresPropertyInfo = (~) Double
type AttrTransferTypeConstraint ImageYresPropertyInfo = (~) Double
type AttrTransferType ImageYresPropertyInfo = Double
type AttrGetType ImageYresPropertyInfo = Double
type AttrLabel ImageYresPropertyInfo = "yres"
type AttrOrigin ImageYresPropertyInfo = Image
attrGet = getImageYres
attrSet = setImageYres
attrTransfer _ v = do
return v
attrConstruct = constructImageYres
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.yres"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#g:attr:yres"
})
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Image
type instance O.AttributeList Image = ImageAttributeList
type ImageAttributeList = ('[ '("bands", ImageBandsPropertyInfo), '("coding", ImageCodingPropertyInfo), '("demand", ImageDemandPropertyInfo), '("description", Vips.Object.ObjectDescriptionPropertyInfo), '("filename", ImageFilenamePropertyInfo), '("foreignBuffer", ImageForeignBufferPropertyInfo), '("format", ImageFormatPropertyInfo), '("height", ImageHeightPropertyInfo), '("interpretation", ImageInterpretationPropertyInfo), '("kill", ImageKillPropertyInfo), '("mode", ImageModePropertyInfo), '("nickname", Vips.Object.ObjectNicknamePropertyInfo), '("sizeofHeader", ImageSizeofHeaderPropertyInfo), '("width", ImageWidthPropertyInfo), '("xoffset", ImageXoffsetPropertyInfo), '("xres", ImageXresPropertyInfo), '("yoffset", ImageYoffsetPropertyInfo), '("yres", ImageYresPropertyInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
imageBands :: AttrLabelProxy "bands"
imageBands = AttrLabelProxy
imageCoding :: AttrLabelProxy "coding"
imageCoding = AttrLabelProxy
imageDemand :: AttrLabelProxy "demand"
imageDemand = AttrLabelProxy
imageFilename :: AttrLabelProxy "filename"
imageFilename = AttrLabelProxy
imageForeignBuffer :: AttrLabelProxy "foreignBuffer"
imageForeignBuffer = AttrLabelProxy
imageFormat :: AttrLabelProxy "format"
imageFormat = AttrLabelProxy
imageHeight :: AttrLabelProxy "height"
imageHeight = AttrLabelProxy
imageInterpretation :: AttrLabelProxy "interpretation"
imageInterpretation = AttrLabelProxy
imageKill :: AttrLabelProxy "kill"
imageKill = AttrLabelProxy
imageMode :: AttrLabelProxy "mode"
imageMode = AttrLabelProxy
imageSizeofHeader :: AttrLabelProxy "sizeofHeader"
imageSizeofHeader = AttrLabelProxy
imageWidth :: AttrLabelProxy "width"
imageWidth = AttrLabelProxy
imageXoffset :: AttrLabelProxy "xoffset"
imageXoffset = AttrLabelProxy
imageXres :: AttrLabelProxy "xres"
imageXres = AttrLabelProxy
imageYoffset :: AttrLabelProxy "yoffset"
imageYoffset = AttrLabelProxy
imageYres :: AttrLabelProxy "yres"
imageYres = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList Image = ImageSignalList
type ImageSignalList = ('[ '("close", Vips.Object.ObjectCloseSignalInfo), '("eval", ImageEvalSignalInfo), '("invalidate", ImageInvalidateSignalInfo), '("minimise", ImageMinimiseSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("postbuild", Vips.Object.ObjectPostbuildSignalInfo), '("postclose", Vips.Object.ObjectPostcloseSignalInfo), '("posteval", ImagePostevalSignalInfo), '("preclose", Vips.Object.ObjectPrecloseSignalInfo), '("preeval", ImagePreevalSignalInfo), '("written", ImageWrittenSignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "vips_image_matrix_from_array" vips_image_matrix_from_array ::
Int32 ->
Int32 ->
Ptr CDouble ->
Word64 ->
IO (Ptr Image)
imageMatrixFromArray ::
(B.CallStack.HasCallStack, MonadIO m) =>
Int32
-> Int32
-> [Double]
-> m Image
imageMatrixFromArray :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Int32 -> Int32 -> [Double] -> m Image
imageMatrixFromArray Int32
width Int32
height [Double]
array = 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
let size :: Word64
size = Int -> Word64
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Word64) -> Int -> Word64
forall a b. (a -> b) -> a -> b
$ [Double] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [Double]
array
Ptr CDouble
array' <- ((Double -> CDouble) -> [Double] -> IO (Ptr CDouble)
forall a b. Storable b => (a -> b) -> [a] -> IO (Ptr b)
packMapStorableArray Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac) [Double]
array
Ptr Image
result <- Int32 -> Int32 -> Ptr CDouble -> Word64 -> IO (Ptr Image)
vips_image_matrix_from_array Int32
width Int32
height Ptr CDouble
array' Word64
size
Text -> Ptr Image -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"imageMatrixFromArray" 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
wrapObject ManagedPtr Image -> Image
Image) Ptr Image
result
Ptr CDouble -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CDouble
array'
Image -> IO Image
forall (m :: * -> *) a. Monad m => a -> m a
return Image
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "vips_image_memory" vips_image_memory ::
IO (Ptr Image)
imageMemory ::
(B.CallStack.HasCallStack, MonadIO m) =>
m Image
imageMemory :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m Image
imageMemory = 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)
vips_image_memory
Text -> Ptr Image -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"imageMemory" 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
wrapObject 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 "vips_image_new" vips_image_new ::
IO (Ptr Image)
imageNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
m Image
imageNew :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m Image
imageNew = IO Image -> m Image
forall (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)
vips_image_new
Text -> Ptr Image -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"imageNew" Ptr Image
result
Image
result' <- ((ManagedPtr Image -> Image) -> Ptr Image -> IO Image
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject 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 "vips_image_new_from_file_RW" vips_image_new_from_file_RW ::
CString ->
IO (Ptr Image)
imageNewFromFileRW ::
(B.CallStack.HasCallStack, MonadIO m) =>
T.Text
-> m Image
imageNewFromFileRW :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Text -> m Image
imageNewFromFileRW Text
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' <- Text -> IO CString
textToCString Text
filename
Ptr Image
result <- CString -> IO (Ptr Image)
vips_image_new_from_file_RW CString
filename'
Text -> Ptr Image -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"imageNewFromFileRW" 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
wrapObject 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 "vips_image_new_from_file_raw" vips_image_new_from_file_raw ::
CString ->
Int32 ->
Int32 ->
Int32 ->
Word64 ->
IO (Ptr Image)
imageNewFromFileRaw ::
(B.CallStack.HasCallStack, MonadIO m) =>
T.Text
-> Int32
-> Int32
-> Int32
-> Word64
-> m Image
imageNewFromFileRaw :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Text -> Int32 -> Int32 -> Int32 -> Word64 -> m Image
imageNewFromFileRaw Text
filename Int32
xsize Int32
ysize Int32
bands Word64
offset = 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' <- Text -> IO CString
textToCString Text
filename
Ptr Image
result <- CString -> Int32 -> Int32 -> Int32 -> Word64 -> IO (Ptr Image)
vips_image_new_from_file_raw CString
filename' Int32
xsize Int32
ysize Int32
bands Word64
offset
Text -> Ptr Image -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"imageNewFromFileRaw" 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
wrapObject 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 "vips_image_new_from_image" vips_image_new_from_image ::
Ptr Image ->
Ptr CDouble ->
Int32 ->
IO (Ptr Image)
imageNewFromImage ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> [Double]
-> m Image
imageNewFromImage :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> [Double] -> m Image
imageNewFromImage a
image [Double]
c = 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
let n :: Int32
n = Int -> Int32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Int32) -> Int -> Int32
forall a b. (a -> b) -> a -> b
$ [Double] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [Double]
c
Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
Ptr CDouble
c' <- ((Double -> CDouble) -> [Double] -> IO (Ptr CDouble)
forall a b. Storable b => (a -> b) -> [a] -> IO (Ptr b)
packMapStorableArray Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac) [Double]
c
Ptr Image
result <- Ptr Image -> Ptr CDouble -> Int32 -> IO (Ptr Image)
vips_image_new_from_image Ptr Image
image' Ptr CDouble
c' Int32
n
Text -> Ptr Image -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"imageNewFromImage" 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
wrapObject ManagedPtr Image -> Image
Image) Ptr Image
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
Ptr CDouble -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CDouble
c'
Image -> IO Image
forall (m :: * -> *) a. Monad m => a -> m a
return Image
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "vips_image_new_from_image1" vips_image_new_from_image1 ::
Ptr Image ->
CDouble ->
IO (Ptr Image)
imageNewFromImage1 ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> Double
-> m Image
imageNewFromImage1 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Double -> m Image
imageNewFromImage1 a
image Double
c = 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
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
let c' :: CDouble
c' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
c
Ptr Image
result <- Ptr Image -> CDouble -> IO (Ptr Image)
vips_image_new_from_image1 Ptr Image
image' CDouble
c'
Text -> Ptr Image -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"imageNewFromImage1" 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
wrapObject ManagedPtr Image -> Image
Image) Ptr Image
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
Image -> IO Image
forall (m :: * -> *) a. Monad m => a -> m a
return Image
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "vips_image_new_from_memory" vips_image_new_from_memory ::
Ptr Word8 ->
Word64 ->
Int32 ->
Int32 ->
Int32 ->
CInt ->
IO (Ptr Image)
imageNewFromMemory ::
(B.CallStack.HasCallStack, MonadIO m) =>
ByteString
-> Int32
-> Int32
-> Int32
-> Vips.Enums.BandFormat
-> m Image
imageNewFromMemory :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
ByteString -> Int32 -> Int32 -> Int32 -> BandFormat -> m Image
imageNewFromMemory ByteString
data_ Int32
width Int32
height Int32
bands BandFormat
format = 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
let size :: Word64
size = Int -> Word64
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Word64) -> Int -> Word64
forall a b. (a -> b) -> a -> b
$ ByteString -> Int
B.length ByteString
data_
Ptr Word8
data_' <- ByteString -> IO (Ptr Word8)
packByteString ByteString
data_
let format' :: CInt
format' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (BandFormat -> Int) -> BandFormat -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BandFormat -> Int
forall a. Enum a => a -> Int
fromEnum) BandFormat
format
Ptr Image
result <- Ptr Word8
-> Word64 -> Int32 -> Int32 -> Int32 -> CInt -> IO (Ptr Image)
vips_image_new_from_memory Ptr Word8
data_' Word64
size Int32
width Int32
height Int32
bands CInt
format'
Text -> Ptr Image -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"imageNewFromMemory" 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
wrapObject ManagedPtr Image -> Image
Image) Ptr Image
result
Ptr Word8 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word8
data_'
Image -> IO Image
forall (m :: * -> *) a. Monad m => a -> m a
return Image
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "vips_image_new_from_memory_copy" vips_image_new_from_memory_copy ::
Ptr Word8 ->
Word64 ->
Int32 ->
Int32 ->
Int32 ->
CInt ->
IO (Ptr Image)
imageNewFromMemoryCopy ::
(B.CallStack.HasCallStack, MonadIO m) =>
ByteString
-> Int32
-> Int32
-> Int32
-> Vips.Enums.BandFormat
-> m Image
imageNewFromMemoryCopy :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
ByteString -> Int32 -> Int32 -> Int32 -> BandFormat -> m Image
imageNewFromMemoryCopy ByteString
data_ Int32
width Int32
height Int32
bands BandFormat
format = 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
let size :: Word64
size = Int -> Word64
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Word64) -> Int -> Word64
forall a b. (a -> b) -> a -> b
$ ByteString -> Int
B.length ByteString
data_
Ptr Word8
data_' <- ByteString -> IO (Ptr Word8)
packByteString ByteString
data_
let format' :: CInt
format' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (BandFormat -> Int) -> BandFormat -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BandFormat -> Int
forall a. Enum a => a -> Int
fromEnum) BandFormat
format
Ptr Image
result <- Ptr Word8
-> Word64 -> Int32 -> Int32 -> Int32 -> CInt -> IO (Ptr Image)
vips_image_new_from_memory_copy Ptr Word8
data_' Word64
size Int32
width Int32
height Int32
bands CInt
format'
Text -> Ptr Image -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"imageNewFromMemoryCopy" 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
wrapObject ManagedPtr Image -> Image
Image) Ptr Image
result
Ptr Word8 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word8
data_'
Image -> IO Image
forall (m :: * -> *) a. Monad m => a -> m a
return Image
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "vips_image_new_matrix" vips_image_new_matrix ::
Int32 ->
Int32 ->
IO (Ptr Image)
imageNewMatrix ::
(B.CallStack.HasCallStack, MonadIO m) =>
Int32
-> Int32
-> m Image
imageNewMatrix :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Int32 -> Int32 -> m Image
imageNewMatrix Int32
width Int32
height = 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 <- Int32 -> Int32 -> IO (Ptr Image)
vips_image_new_matrix Int32
width Int32
height
Text -> Ptr Image -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"imageNewMatrix" 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
wrapObject 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 "vips_image_new_matrix_from_array" vips_image_new_matrix_from_array ::
Int32 ->
Int32 ->
Ptr CDouble ->
Word64 ->
IO (Ptr Image)
imageNewMatrixFromArray ::
(B.CallStack.HasCallStack, MonadIO m) =>
Int32
-> Int32
-> [Double]
-> m Image
imageNewMatrixFromArray :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Int32 -> Int32 -> [Double] -> m Image
imageNewMatrixFromArray Int32
width Int32
height [Double]
array = 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
let size :: Word64
size = Int -> Word64
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Word64) -> Int -> Word64
forall a b. (a -> b) -> a -> b
$ [Double] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [Double]
array
Ptr CDouble
array' <- ((Double -> CDouble) -> [Double] -> IO (Ptr CDouble)
forall a b. Storable b => (a -> b) -> [a] -> IO (Ptr b)
packMapStorableArray Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac) [Double]
array
Ptr Image
result <- Int32 -> Int32 -> Ptr CDouble -> Word64 -> IO (Ptr Image)
vips_image_new_matrix_from_array Int32
width Int32
height Ptr CDouble
array' Word64
size
Text -> Ptr Image -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"imageNewMatrixFromArray" 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
wrapObject ManagedPtr Image -> Image
Image) Ptr Image
result
Ptr CDouble -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CDouble
array'
Image -> IO Image
forall (m :: * -> *) a. Monad m => a -> m a
return Image
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "vips_image_new_memory" vips_image_new_memory ::
IO (Ptr Image)
imageNewMemory ::
(B.CallStack.HasCallStack, MonadIO m) =>
m Image
imageNewMemory :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m Image
imageNewMemory = 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)
vips_image_new_memory
Text -> Ptr Image -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"imageNewMemory" 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
wrapObject 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 "vips_image_new_temp_file" vips_image_new_temp_file ::
CString ->
IO (Ptr Image)
imageNewTempFile ::
(B.CallStack.HasCallStack, MonadIO m) =>
T.Text
-> m Image
imageNewTempFile :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Text -> m Image
imageNewTempFile Text
format = 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
format' <- Text -> IO CString
textToCString Text
format
Ptr Image
result <- CString -> IO (Ptr Image)
vips_image_new_temp_file CString
format'
Text -> Ptr Image -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"imageNewTempFile" 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
wrapObject ManagedPtr Image -> Image
Image) Ptr Image
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
format'
Image -> IO Image
forall (m :: * -> *) a. Monad m => a -> m a
return Image
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "vips_autorot_remove_angle" vips_autorot_remove_angle ::
Ptr Image ->
IO ()
imageAutorotRemoveAngle ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m ()
imageAutorotRemoveAngle :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m ()
imageAutorotRemoveAngle 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 ()
vips_autorot_remove_angle 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 ImageAutorotRemoveAngleMethodInfo
instance (signature ~ (m ()), MonadIO m, IsImage a) => O.OverloadedMethod ImageAutorotRemoveAngleMethodInfo a signature where
overloadedMethod = imageAutorotRemoveAngle
instance O.OverloadedMethodInfo ImageAutorotRemoveAngleMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageAutorotRemoveAngle",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageAutorotRemoveAngle"
})
#endif
foreign import ccall "vips_foreign_load_invalidate" vips_foreign_load_invalidate ::
Ptr Image ->
IO ()
imageForeignLoadInvalidate ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m ()
imageForeignLoadInvalidate :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m ()
imageForeignLoadInvalidate 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 ()
vips_foreign_load_invalidate 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 ImageForeignLoadInvalidateMethodInfo
instance (signature ~ (m ()), MonadIO m, IsImage a) => O.OverloadedMethod ImageForeignLoadInvalidateMethodInfo a signature where
overloadedMethod = imageForeignLoadInvalidate
instance O.OverloadedMethodInfo ImageForeignLoadInvalidateMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageForeignLoadInvalidate",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageForeignLoadInvalidate"
})
#endif
foreign import ccall "vips_image_free_buffer" vips_image_free_buffer ::
Ptr Image ->
Ptr () ->
IO ()
imageFreeBuffer ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> Ptr ()
-> m ()
imageFreeBuffer :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Ptr () -> m ()
imageFreeBuffer a
image Ptr ()
buffer = 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
C_ImageInvalidateCallback
vips_image_free_buffer Ptr Image
image' Ptr ()
buffer
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 ImageFreeBufferMethodInfo
instance (signature ~ (Ptr () -> m ()), MonadIO m, IsImage a) => O.OverloadedMethod ImageFreeBufferMethodInfo a signature where
overloadedMethod = imageFreeBuffer
instance O.OverloadedMethodInfo ImageFreeBufferMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageFreeBuffer",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageFreeBuffer"
})
#endif
foreign import ccall "vips_icc_ac2rc" vips_icc_ac2rc ::
Ptr Image ->
Ptr (Ptr Image) ->
CString ->
IO Int32
imageIccAc2rc ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> T.Text
-> m ((Int32, Image))
imageIccAc2rc :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Text -> m (Int32, Image)
imageIccAc2rc a
in_ Text
profileFilename = IO (Int32, Image) -> m (Int32, Image)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Int32, Image) -> m (Int32, Image))
-> IO (Int32, Image) -> m (Int32, Image)
forall a b. (a -> b) -> a -> b
$ do
Ptr Image
in_' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
in_
Ptr (Ptr Image)
out <- IO (Ptr (Ptr Image))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr Image))
CString
profileFilename' <- Text -> IO CString
textToCString Text
profileFilename
Int32
result <- Ptr Image -> Ptr (Ptr Image) -> CString -> IO Int32
vips_icc_ac2rc Ptr Image
in_' Ptr (Ptr Image)
out CString
profileFilename'
Ptr Image
out' <- Ptr (Ptr Image) -> IO (Ptr Image)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr Image)
out
Image
out'' <- ((ManagedPtr Image -> Image) -> Ptr Image -> IO Image
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Image -> Image
Image) Ptr Image
out'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
in_
Ptr (Ptr Image) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Image)
out
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
profileFilename'
(Int32, Image) -> IO (Int32, Image)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
result, Image
out'')
#if defined(ENABLE_OVERLOADING)
data ImageIccAc2rcMethodInfo
instance (signature ~ (T.Text -> m ((Int32, Image))), MonadIO m, IsImage a) => O.OverloadedMethod ImageIccAc2rcMethodInfo a signature where
overloadedMethod = imageIccAc2rc
instance O.OverloadedMethodInfo ImageIccAc2rcMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageIccAc2rc",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageIccAc2rc"
})
#endif
foreign import ccall "vips_image_copy_memory" vips_image_copy_memory ::
Ptr Image ->
IO (Ptr Image)
imageImageCopyMemory ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m Image
imageImageCopyMemory :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Image
imageImageCopyMemory a
image = 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
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
Ptr Image
result <- Ptr Image -> IO (Ptr Image)
vips_image_copy_memory Ptr Image
image'
Text -> Ptr Image -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"imageImageCopyMemory" 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
wrapObject ManagedPtr Image -> Image
Image) Ptr Image
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
Image -> IO Image
forall (m :: * -> *) a. Monad m => a -> m a
return Image
result'
#if defined(ENABLE_OVERLOADING)
data ImageImageCopyMemoryMethodInfo
instance (signature ~ (m Image), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageCopyMemoryMethodInfo a signature where
overloadedMethod = imageImageCopyMemory
instance O.OverloadedMethodInfo ImageImageCopyMemoryMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageCopyMemory",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageCopyMemory"
})
#endif
foreign import ccall "vips_image_decode" vips_image_decode ::
Ptr Image ->
Ptr (Ptr Image) ->
IO Int32
imageImageDecode ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m ((Int32, Image))
imageImageDecode :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m (Int32, Image)
imageImageDecode a
in_ = IO (Int32, Image) -> m (Int32, Image)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Int32, Image) -> m (Int32, Image))
-> IO (Int32, Image) -> m (Int32, Image)
forall a b. (a -> b) -> a -> b
$ do
Ptr Image
in_' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
in_
Ptr (Ptr Image)
out <- IO (Ptr (Ptr Image))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr Image))
Int32
result <- Ptr Image -> Ptr (Ptr Image) -> IO Int32
vips_image_decode Ptr Image
in_' Ptr (Ptr Image)
out
Ptr Image
out' <- Ptr (Ptr Image) -> IO (Ptr Image)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr Image)
out
Image
out'' <- ((ManagedPtr Image -> Image) -> Ptr Image -> IO Image
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Image -> Image
Image) Ptr Image
out'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
in_
Ptr (Ptr Image) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Image)
out
(Int32, Image) -> IO (Int32, Image)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
result, Image
out'')
#if defined(ENABLE_OVERLOADING)
data ImageImageDecodeMethodInfo
instance (signature ~ (m ((Int32, Image))), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageDecodeMethodInfo a signature where
overloadedMethod = imageImageDecode
instance O.OverloadedMethodInfo ImageImageDecodeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageDecode",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageDecode"
})
#endif
foreign import ccall "vips_image_decode_predict" vips_image_decode_predict ::
Ptr Image ->
Ptr Int32 ->
Ptr CInt ->
IO Int32
imageImageDecodePredict ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m ((Int32, Int32, Vips.Enums.BandFormat))
imageImageDecodePredict :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m (Int32, Int32, BandFormat)
imageImageDecodePredict a
in_ = IO (Int32, Int32, BandFormat) -> m (Int32, Int32, BandFormat)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Int32, Int32, BandFormat) -> m (Int32, Int32, BandFormat))
-> IO (Int32, Int32, BandFormat) -> m (Int32, Int32, BandFormat)
forall a b. (a -> b) -> a -> b
$ do
Ptr Image
in_' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
in_
Ptr Int32
bands <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
Ptr CInt
format <- IO (Ptr CInt)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CInt)
Int32
result <- Ptr Image -> Ptr Int32 -> Ptr CInt -> IO Int32
vips_image_decode_predict Ptr Image
in_' Ptr Int32
bands Ptr CInt
format
Int32
bands' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
bands
CInt
format' <- Ptr CInt -> IO CInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CInt
format
let format'' :: BandFormat
format'' = (Int -> BandFormat
forall a. Enum a => Int -> a
toEnum (Int -> BandFormat) -> (CInt -> Int) -> CInt -> BandFormat
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CInt
format'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
in_
Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
bands
Ptr CInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CInt
format
(Int32, Int32, BandFormat) -> IO (Int32, Int32, BandFormat)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
result, Int32
bands', BandFormat
format'')
#if defined(ENABLE_OVERLOADING)
data ImageImageDecodePredictMethodInfo
instance (signature ~ (m ((Int32, Int32, Vips.Enums.BandFormat))), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageDecodePredictMethodInfo a signature where
overloadedMethod = imageImageDecodePredict
instance O.OverloadedMethodInfo ImageImageDecodePredictMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageDecodePredict",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageDecodePredict"
})
#endif
foreign import ccall "vips_image_encode" vips_image_encode ::
Ptr Image ->
Ptr (Ptr Image) ->
CInt ->
IO Int32
imageImageEncode ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> Vips.Enums.Coding
-> m ((Int32, Image))
imageImageEncode :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Coding -> m (Int32, Image)
imageImageEncode a
in_ Coding
coding = IO (Int32, Image) -> m (Int32, Image)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Int32, Image) -> m (Int32, Image))
-> IO (Int32, Image) -> m (Int32, Image)
forall a b. (a -> b) -> a -> b
$ do
Ptr Image
in_' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
in_
Ptr (Ptr Image)
out <- IO (Ptr (Ptr Image))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr Image))
let coding' :: CInt
coding' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Coding -> Int) -> Coding -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Coding -> Int
forall a. Enum a => a -> Int
fromEnum) Coding
coding
Int32
result <- Ptr Image -> Ptr (Ptr Image) -> CInt -> IO Int32
vips_image_encode Ptr Image
in_' Ptr (Ptr Image)
out CInt
coding'
Ptr Image
out' <- Ptr (Ptr Image) -> IO (Ptr Image)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr Image)
out
Image
out'' <- ((ManagedPtr Image -> Image) -> Ptr Image -> IO Image
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Image -> Image
Image) Ptr Image
out'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
in_
Ptr (Ptr Image) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Image)
out
(Int32, Image) -> IO (Int32, Image)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
result, Image
out'')
#if defined(ENABLE_OVERLOADING)
data ImageImageEncodeMethodInfo
instance (signature ~ (Vips.Enums.Coding -> m ((Int32, Image))), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageEncodeMethodInfo a signature where
overloadedMethod = imageImageEncode
instance O.OverloadedMethodInfo ImageImageEncodeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageEncode",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageEncode"
})
#endif
foreign import ccall "vips_image_get" vips_image_get ::
Ptr Image ->
CString ->
Ptr GValue ->
IO Int32
imageImageGet ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> T.Text
-> m (GValue)
imageImageGet :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Text -> m GValue
imageImageGet a
image Text
name = IO GValue -> m GValue
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GValue -> m GValue) -> IO GValue -> m GValue
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
name' <- Text -> IO CString
textToCString Text
name
Ptr GValue
valueCopy <- Int -> IO (Ptr GValue)
forall a. Int -> IO (Ptr a)
SP.callocBytes Int
24 :: IO (Ptr GValue)
Int32
_ <- Ptr Image -> CString -> Ptr GValue -> IO Int32
vips_image_get Ptr Image
image' CString
name' Ptr GValue
valueCopy
GValue
valueCopy' <- Ptr GValue -> IO GValue
B.GValue.wrapGValuePtr Ptr GValue
valueCopy
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
GValue -> IO GValue
forall (m :: * -> *) a. Monad m => a -> m a
return GValue
valueCopy'
#if defined(ENABLE_OVERLOADING)
data ImageImageGetMethodInfo
instance (signature ~ (T.Text -> m (GValue)), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetMethodInfo a signature where
overloadedMethod = imageImageGet
instance O.OverloadedMethodInfo ImageImageGetMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGet",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGet"
})
#endif
foreign import ccall "vips_image_get_area" vips_image_get_area ::
Ptr Image ->
CString ->
Ptr (Ptr ()) ->
IO Int32
imageImageGetArea ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> T.Text
-> m ((Int32, Ptr ()))
imageImageGetArea :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Text -> m (Int32, Ptr ())
imageImageGetArea a
image Text
name = IO (Int32, Ptr ()) -> m (Int32, Ptr ())
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Int32, Ptr ()) -> m (Int32, Ptr ()))
-> IO (Int32, Ptr ()) -> m (Int32, Ptr ())
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
name' <- Text -> IO CString
textToCString Text
name
Ptr (Ptr ())
data_ <- IO (Ptr (Ptr ()))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr ()))
Int32
result <- Ptr Image -> CString -> Ptr (Ptr ()) -> IO Int32
vips_image_get_area Ptr Image
image' CString
name' Ptr (Ptr ())
data_
Ptr ()
data_' <- Ptr (Ptr ()) -> IO (Ptr ())
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr ())
data_
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
Ptr (Ptr ()) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr ())
data_
(Int32, Ptr ()) -> IO (Int32, Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
result, Ptr ()
data_')
#if defined(ENABLE_OVERLOADING)
data ImageImageGetAreaMethodInfo
instance (signature ~ (T.Text -> m ((Int32, Ptr ()))), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetAreaMethodInfo a signature where
overloadedMethod = imageImageGetArea
instance O.OverloadedMethodInfo ImageImageGetAreaMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetArea",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetArea"
})
#endif
foreign import ccall "vips_image_get_array_double" vips_image_get_array_double ::
Ptr Image ->
CString ->
CDouble ->
Int32 ->
IO Int32
imageImageGetArrayDouble ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> T.Text
-> Double
-> Int32
-> m Int32
imageImageGetArrayDouble :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Text -> Double -> Int32 -> m Int32
imageImageGetArrayDouble a
image Text
name Double
out Int32
n = 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
CString
name' <- Text -> IO CString
textToCString Text
name
let out' :: CDouble
out' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
out
Int32
result <- Ptr Image -> CString -> CDouble -> Int32 -> IO Int32
vips_image_get_array_double Ptr Image
image' CString
name' CDouble
out' Int32
n
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data ImageImageGetArrayDoubleMethodInfo
instance (signature ~ (T.Text -> Double -> Int32 -> m Int32), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetArrayDoubleMethodInfo a signature where
overloadedMethod = imageImageGetArrayDouble
instance O.OverloadedMethodInfo ImageImageGetArrayDoubleMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetArrayDouble",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetArrayDouble"
})
#endif
foreign import ccall "vips_image_get_array_int" vips_image_get_array_int ::
Ptr Image ->
CString ->
Int32 ->
Int32 ->
IO Int32
imageImageGetArrayInt ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> T.Text
-> Int32
-> Int32
-> m Int32
imageImageGetArrayInt :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Text -> Int32 -> Int32 -> m Int32
imageImageGetArrayInt a
image Text
name Int32
out Int32
n = 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
CString
name' <- Text -> IO CString
textToCString Text
name
Int32
result <- Ptr Image -> CString -> Int32 -> Int32 -> IO Int32
vips_image_get_array_int Ptr Image
image' CString
name' Int32
out Int32
n
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data ImageImageGetArrayIntMethodInfo
instance (signature ~ (T.Text -> Int32 -> Int32 -> m Int32), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetArrayIntMethodInfo a signature where
overloadedMethod = imageImageGetArrayInt
instance O.OverloadedMethodInfo ImageImageGetArrayIntMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetArrayInt",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetArrayInt"
})
#endif
foreign import ccall "vips_image_get_as_string" vips_image_get_as_string ::
Ptr Image ->
CString ->
CString ->
IO Int32
imageImageGetAsString ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> T.Text
-> T.Text
-> m Int32
imageImageGetAsString :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Text -> Text -> m Int32
imageImageGetAsString a
image Text
name Text
out = 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
CString
name' <- Text -> IO CString
textToCString Text
name
CString
out' <- Text -> IO CString
textToCString Text
out
Int32
result <- Ptr Image -> CString -> CString -> IO Int32
vips_image_get_as_string Ptr Image
image' CString
name' CString
out'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data ImageImageGetAsStringMethodInfo
instance (signature ~ (T.Text -> T.Text -> m Int32), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetAsStringMethodInfo a signature where
overloadedMethod = imageImageGetAsString
instance O.OverloadedMethodInfo ImageImageGetAsStringMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetAsString",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetAsString"
})
#endif
foreign import ccall "vips_image_get_bands" vips_image_get_bands ::
Ptr Image ->
IO Int32
imageImageGetBands ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m Int32
imageImageGetBands :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Int32
imageImageGetBands 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
vips_image_get_bands 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 ImageImageGetBandsMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetBandsMethodInfo a signature where
overloadedMethod = imageImageGetBands
instance O.OverloadedMethodInfo ImageImageGetBandsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetBands",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetBands"
})
#endif
foreign import ccall "vips_image_get_blob" vips_image_get_blob ::
Ptr Image ->
CString ->
Ptr () ->
Word64 ->
IO Int32
imageImageGetBlob ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> T.Text
-> Ptr ()
-> Word64
-> m Int32
imageImageGetBlob :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Text -> Ptr () -> Word64 -> m Int32
imageImageGetBlob a
image Text
name Ptr ()
data_ Word64
length_ = 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
CString
name' <- Text -> IO CString
textToCString Text
name
Int32
result <- Ptr Image -> CString -> Ptr () -> Word64 -> IO Int32
vips_image_get_blob Ptr Image
image' CString
name' Ptr ()
data_ Word64
length_
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data ImageImageGetBlobMethodInfo
instance (signature ~ (T.Text -> Ptr () -> Word64 -> m Int32), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetBlobMethodInfo a signature where
overloadedMethod = imageImageGetBlob
instance O.OverloadedMethodInfo ImageImageGetBlobMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetBlob",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetBlob"
})
#endif
foreign import ccall "vips_image_get_coding" vips_image_get_coding ::
Ptr Image ->
IO CInt
imageImageGetCoding ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m Vips.Enums.Coding
imageImageGetCoding :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Coding
imageImageGetCoding a
image = IO Coding -> m Coding
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Coding -> m Coding) -> IO Coding -> m Coding
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
CInt
result <- Ptr Image -> IO CInt
vips_image_get_coding Ptr Image
image'
let result' :: Coding
result' = (Int -> Coding
forall a. Enum a => Int -> a
toEnum (Int -> Coding) -> (CInt -> Int) -> CInt -> Coding
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
Coding -> IO Coding
forall (m :: * -> *) a. Monad m => a -> m a
return Coding
result'
#if defined(ENABLE_OVERLOADING)
data ImageImageGetCodingMethodInfo
instance (signature ~ (m Vips.Enums.Coding), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetCodingMethodInfo a signature where
overloadedMethod = imageImageGetCoding
instance O.OverloadedMethodInfo ImageImageGetCodingMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetCoding",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetCoding"
})
#endif
foreign import ccall "vips_image_get_data" vips_image_get_data ::
Ptr Image ->
IO (Ptr ())
imageImageGetData ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m (Ptr ())
imageImageGetData :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m (Ptr ())
imageImageGetData a
image = IO (Ptr ()) -> m (Ptr ())
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Ptr ()) -> m (Ptr ())) -> IO (Ptr ()) -> m (Ptr ())
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 ()
result <- Ptr Image -> IO (Ptr ())
vips_image_get_data Ptr Image
image'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
Ptr () -> IO (Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result
#if defined(ENABLE_OVERLOADING)
data ImageImageGetDataMethodInfo
instance (signature ~ (m (Ptr ())), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetDataMethodInfo a signature where
overloadedMethod = imageImageGetData
instance O.OverloadedMethodInfo ImageImageGetDataMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetData",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetData"
})
#endif
foreign import ccall "vips_image_get_double" vips_image_get_double ::
Ptr Image ->
CString ->
CDouble ->
IO Int32
imageImageGetDouble ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> T.Text
-> Double
-> m Int32
imageImageGetDouble :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Text -> Double -> m Int32
imageImageGetDouble a
image Text
name Double
out = 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
CString
name' <- Text -> IO CString
textToCString Text
name
let out' :: CDouble
out' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
out
Int32
result <- Ptr Image -> CString -> CDouble -> IO Int32
vips_image_get_double Ptr Image
image' CString
name' CDouble
out'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data ImageImageGetDoubleMethodInfo
instance (signature ~ (T.Text -> Double -> m Int32), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetDoubleMethodInfo a signature where
overloadedMethod = imageImageGetDouble
instance O.OverloadedMethodInfo ImageImageGetDoubleMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetDouble",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetDouble"
})
#endif
foreign import ccall "vips_image_get_fields" vips_image_get_fields ::
Ptr Image ->
IO (Ptr CString)
imageImageGetFields ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m [T.Text]
imageImageGetFields :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m [Text]
imageImageGetFields a
image = IO [Text] -> m [Text]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Text] -> m [Text]) -> IO [Text] -> m [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
Ptr CString
result <- Ptr Image -> IO (Ptr CString)
vips_image_get_fields Ptr Image
image'
Text -> Ptr CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"imageImageGetFields" Ptr CString
result
[Text]
result' <- HasCallStack => Ptr CString -> IO [Text]
Ptr CString -> IO [Text]
unpackZeroTerminatedUTF8CArray Ptr CString
result
(CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
result
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
[Text] -> IO [Text]
forall (m :: * -> *) a. Monad m => a -> m a
return [Text]
result'
#if defined(ENABLE_OVERLOADING)
data ImageImageGetFieldsMethodInfo
instance (signature ~ (m [T.Text]), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetFieldsMethodInfo a signature where
overloadedMethod = imageImageGetFields
instance O.OverloadedMethodInfo ImageImageGetFieldsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetFields",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetFields"
})
#endif
foreign import ccall "vips_image_get_filename" vips_image_get_filename ::
Ptr Image ->
IO CString
imageImageGetFilename ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m T.Text
imageImageGetFilename :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Text
imageImageGetFilename a
image = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m 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
vips_image_get_filename Ptr Image
image'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"imageImageGetFilename" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data ImageImageGetFilenameMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetFilenameMethodInfo a signature where
overloadedMethod = imageImageGetFilename
instance O.OverloadedMethodInfo ImageImageGetFilenameMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetFilename",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetFilename"
})
#endif
foreign import ccall "vips_image_get_format" vips_image_get_format ::
Ptr Image ->
IO CInt
imageImageGetFormat ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m Vips.Enums.BandFormat
imageImageGetFormat :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m BandFormat
imageImageGetFormat a
image = IO BandFormat -> m BandFormat
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO BandFormat -> m BandFormat) -> IO BandFormat -> m BandFormat
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
CInt
result <- Ptr Image -> IO CInt
vips_image_get_format Ptr Image
image'
let result' :: BandFormat
result' = (Int -> BandFormat
forall a. Enum a => Int -> a
toEnum (Int -> BandFormat) -> (CInt -> Int) -> CInt -> BandFormat
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
BandFormat -> IO BandFormat
forall (m :: * -> *) a. Monad m => a -> m a
return BandFormat
result'
#if defined(ENABLE_OVERLOADING)
data ImageImageGetFormatMethodInfo
instance (signature ~ (m Vips.Enums.BandFormat), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetFormatMethodInfo a signature where
overloadedMethod = imageImageGetFormat
instance O.OverloadedMethodInfo ImageImageGetFormatMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetFormat",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetFormat"
})
#endif
foreign import ccall "vips_image_get_height" vips_image_get_height ::
Ptr Image ->
IO Int32
imageImageGetHeight ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m Int32
imageImageGetHeight :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Int32
imageImageGetHeight 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
vips_image_get_height 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 ImageImageGetHeightMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetHeightMethodInfo a signature where
overloadedMethod = imageImageGetHeight
instance O.OverloadedMethodInfo ImageImageGetHeightMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetHeight",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetHeight"
})
#endif
foreign import ccall "vips_image_get_history" vips_image_get_history ::
Ptr Image ->
IO CString
imageImageGetHistory ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m T.Text
imageImageGetHistory :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Text
imageImageGetHistory a
image = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m 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
vips_image_get_history Ptr Image
image'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"imageImageGetHistory" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data ImageImageGetHistoryMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetHistoryMethodInfo a signature where
overloadedMethod = imageImageGetHistory
instance O.OverloadedMethodInfo ImageImageGetHistoryMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetHistory",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetHistory"
})
#endif
foreign import ccall "vips_image_get_image" vips_image_get_image ::
Ptr Image ->
CString ->
Ptr Image ->
IO Int32
imageImageGetImage ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a, IsImage b) =>
a
-> T.Text
-> b
-> m Int32
imageImageGetImage :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsImage a, IsImage b) =>
a -> Text -> b -> m Int32
imageImageGetImage a
image Text
name b
out = 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
CString
name' <- Text -> IO CString
textToCString Text
name
Ptr Image
out' <- b -> IO (Ptr Image)
forall a b. (HasCallStack, GObject a) => a -> IO (Ptr b)
B.ManagedPtr.disownObject b
out
Int32
result <- Ptr Image -> CString -> Ptr Image -> IO Int32
vips_image_get_image Ptr Image
image' CString
name' Ptr Image
out'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
out
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data ImageImageGetImageMethodInfo
instance (signature ~ (T.Text -> b -> m Int32), MonadIO m, IsImage a, IsImage b) => O.OverloadedMethod ImageImageGetImageMethodInfo a signature where
overloadedMethod = imageImageGetImage
instance O.OverloadedMethodInfo ImageImageGetImageMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetImage",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetImage"
})
#endif
foreign import ccall "vips_image_get_int" vips_image_get_int ::
Ptr Image ->
CString ->
Ptr Int32 ->
IO Int32
imageImageGetInt ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> T.Text
-> m ((Int32, Int32))
imageImageGetInt :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Text -> m (Int32, Int32)
imageImageGetInt a
image Text
name = IO (Int32, Int32) -> m (Int32, Int32)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Int32, Int32) -> m (Int32, Int32))
-> IO (Int32, Int32) -> m (Int32, 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
CString
name' <- Text -> IO CString
textToCString Text
name
Ptr Int32
out <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
Int32
result <- Ptr Image -> CString -> Ptr Int32 -> IO Int32
vips_image_get_int Ptr Image
image' CString
name' Ptr Int32
out
Int32
out' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
out
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
out
(Int32, Int32) -> IO (Int32, Int32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
result, Int32
out')
#if defined(ENABLE_OVERLOADING)
data ImageImageGetIntMethodInfo
instance (signature ~ (T.Text -> m ((Int32, Int32))), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetIntMethodInfo a signature where
overloadedMethod = imageImageGetInt
instance O.OverloadedMethodInfo ImageImageGetIntMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetInt",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetInt"
})
#endif
foreign import ccall "vips_image_get_interpretation" vips_image_get_interpretation ::
Ptr Image ->
IO CInt
imageImageGetInterpretation ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m Vips.Enums.Interpretation
imageImageGetInterpretation :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Interpretation
imageImageGetInterpretation a
image = IO Interpretation -> m Interpretation
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Interpretation -> m Interpretation)
-> IO Interpretation -> m Interpretation
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
CInt
result <- Ptr Image -> IO CInt
vips_image_get_interpretation Ptr Image
image'
let result' :: Interpretation
result' = (Int -> Interpretation
forall a. Enum a => Int -> a
toEnum (Int -> Interpretation) -> (CInt -> Int) -> CInt -> Interpretation
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
Interpretation -> IO Interpretation
forall (m :: * -> *) a. Monad m => a -> m a
return Interpretation
result'
#if defined(ENABLE_OVERLOADING)
data ImageImageGetInterpretationMethodInfo
instance (signature ~ (m Vips.Enums.Interpretation), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetInterpretationMethodInfo a signature where
overloadedMethod = imageImageGetInterpretation
instance O.OverloadedMethodInfo ImageImageGetInterpretationMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetInterpretation",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetInterpretation"
})
#endif
foreign import ccall "vips_image_get_mode" vips_image_get_mode ::
Ptr Image ->
IO CString
imageImageGetMode ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m T.Text
imageImageGetMode :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Text
imageImageGetMode a
image = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m 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
vips_image_get_mode Ptr Image
image'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"imageImageGetMode" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data ImageImageGetModeMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetModeMethodInfo a signature where
overloadedMethod = imageImageGetMode
instance O.OverloadedMethodInfo ImageImageGetModeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetMode",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetMode"
})
#endif
foreign import ccall "vips_image_get_n_pages" vips_image_get_n_pages ::
Ptr Image ->
IO Int32
imageImageGetNPages ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m Int32
imageImageGetNPages :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Int32
imageImageGetNPages 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
vips_image_get_n_pages 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 ImageImageGetNPagesMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetNPagesMethodInfo a signature where
overloadedMethod = imageImageGetNPages
instance O.OverloadedMethodInfo ImageImageGetNPagesMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetNPages",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetNPages"
})
#endif
foreign import ccall "vips_image_get_n_subifds" vips_image_get_n_subifds ::
Ptr Image ->
IO Int32
imageImageGetNSubifds ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m Int32
imageImageGetNSubifds :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Int32
imageImageGetNSubifds 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
vips_image_get_n_subifds 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 ImageImageGetNSubifdsMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetNSubifdsMethodInfo a signature where
overloadedMethod = imageImageGetNSubifds
instance O.OverloadedMethodInfo ImageImageGetNSubifdsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetNSubifds",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetNSubifds"
})
#endif
foreign import ccall "vips_image_get_offset" vips_image_get_offset ::
Ptr Image ->
IO CDouble
imageImageGetOffset ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m Double
imageImageGetOffset :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Double
imageImageGetOffset a
image = IO Double -> m Double
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Double -> m Double) -> IO Double -> m Double
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
CDouble
result <- Ptr Image -> IO CDouble
vips_image_get_offset Ptr Image
image'
let result' :: Double
result' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
Double -> IO Double
forall (m :: * -> *) a. Monad m => a -> m a
return Double
result'
#if defined(ENABLE_OVERLOADING)
data ImageImageGetOffsetMethodInfo
instance (signature ~ (m Double), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetOffsetMethodInfo a signature where
overloadedMethod = imageImageGetOffset
instance O.OverloadedMethodInfo ImageImageGetOffsetMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetOffset",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetOffset"
})
#endif
foreign import ccall "vips_image_get_orientation" vips_image_get_orientation ::
Ptr Image ->
IO Int32
imageImageGetOrientation ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m Int32
imageImageGetOrientation :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Int32
imageImageGetOrientation 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
vips_image_get_orientation 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 ImageImageGetOrientationMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetOrientationMethodInfo a signature where
overloadedMethod = imageImageGetOrientation
instance O.OverloadedMethodInfo ImageImageGetOrientationMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetOrientation",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetOrientation"
})
#endif
foreign import ccall "vips_image_get_orientation_swap" vips_image_get_orientation_swap ::
Ptr Image ->
IO CInt
imageImageGetOrientationSwap ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m Bool
imageImageGetOrientationSwap :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Bool
imageImageGetOrientationSwap a
image = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
CInt
result <- Ptr Image -> IO CInt
vips_image_get_orientation_swap Ptr Image
image'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data ImageImageGetOrientationSwapMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetOrientationSwapMethodInfo a signature where
overloadedMethod = imageImageGetOrientationSwap
instance O.OverloadedMethodInfo ImageImageGetOrientationSwapMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetOrientationSwap",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetOrientationSwap"
})
#endif
foreign import ccall "vips_image_get_page_height" vips_image_get_page_height ::
Ptr Image ->
IO Int32
imageImageGetPageHeight ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m Int32
imageImageGetPageHeight :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Int32
imageImageGetPageHeight 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
vips_image_get_page_height 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 ImageImageGetPageHeightMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetPageHeightMethodInfo a signature where
overloadedMethod = imageImageGetPageHeight
instance O.OverloadedMethodInfo ImageImageGetPageHeightMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetPageHeight",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetPageHeight"
})
#endif
foreign import ccall "vips_image_get_scale" vips_image_get_scale ::
Ptr Image ->
IO CDouble
imageImageGetScale ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m Double
imageImageGetScale :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Double
imageImageGetScale a
image = IO Double -> m Double
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Double -> m Double) -> IO Double -> m Double
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
CDouble
result <- Ptr Image -> IO CDouble
vips_image_get_scale Ptr Image
image'
let result' :: Double
result' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
Double -> IO Double
forall (m :: * -> *) a. Monad m => a -> m a
return Double
result'
#if defined(ENABLE_OVERLOADING)
data ImageImageGetScaleMethodInfo
instance (signature ~ (m Double), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetScaleMethodInfo a signature where
overloadedMethod = imageImageGetScale
instance O.OverloadedMethodInfo ImageImageGetScaleMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetScale",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetScale"
})
#endif
foreign import ccall "vips_image_get_string" vips_image_get_string ::
Ptr Image ->
CString ->
CString ->
IO Int32
imageImageGetString ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> T.Text
-> T.Text
-> m Int32
imageImageGetString :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Text -> Text -> m Int32
imageImageGetString a
image Text
name Text
out = 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
CString
name' <- Text -> IO CString
textToCString Text
name
CString
out' <- Text -> IO CString
textToCString Text
out
Int32
result <- Ptr Image -> CString -> CString -> IO Int32
vips_image_get_string Ptr Image
image' CString
name' CString
out'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
out'
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data ImageImageGetStringMethodInfo
instance (signature ~ (T.Text -> T.Text -> m Int32), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetStringMethodInfo a signature where
overloadedMethod = imageImageGetString
instance O.OverloadedMethodInfo ImageImageGetStringMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetString",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetString"
})
#endif
foreign import ccall "vips_image_get_typeof" vips_image_get_typeof ::
Ptr Image ->
CString ->
IO CGType
imageImageGetTypeof ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> T.Text
-> m GType
imageImageGetTypeof :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Text -> m GType
imageImageGetTypeof a
image Text
name = IO GType -> m GType
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GType -> m GType) -> IO GType -> m GType
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
name' <- Text -> IO CString
textToCString Text
name
Word64
result <- Ptr Image -> CString -> IO Word64
vips_image_get_typeof Ptr Image
image' CString
name'
let result' :: GType
result' = Word64 -> GType
GType Word64
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
GType -> IO GType
forall (m :: * -> *) a. Monad m => a -> m a
return GType
result'
#if defined(ENABLE_OVERLOADING)
data ImageImageGetTypeofMethodInfo
instance (signature ~ (T.Text -> m GType), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetTypeofMethodInfo a signature where
overloadedMethod = imageImageGetTypeof
instance O.OverloadedMethodInfo ImageImageGetTypeofMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetTypeof",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetTypeof"
})
#endif
foreign import ccall "vips_image_get_width" vips_image_get_width ::
Ptr Image ->
IO Int32
imageImageGetWidth ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m Int32
imageImageGetWidth :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Int32
imageImageGetWidth 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
vips_image_get_width 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 ImageImageGetWidthMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetWidthMethodInfo a signature where
overloadedMethod = imageImageGetWidth
instance O.OverloadedMethodInfo ImageImageGetWidthMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetWidth",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetWidth"
})
#endif
foreign import ccall "vips_image_get_xoffset" vips_image_get_xoffset ::
Ptr Image ->
IO Int32
imageImageGetXoffset ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m Int32
imageImageGetXoffset :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Int32
imageImageGetXoffset 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
vips_image_get_xoffset 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 ImageImageGetXoffsetMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetXoffsetMethodInfo a signature where
overloadedMethod = imageImageGetXoffset
instance O.OverloadedMethodInfo ImageImageGetXoffsetMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetXoffset",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetXoffset"
})
#endif
foreign import ccall "vips_image_get_xres" vips_image_get_xres ::
Ptr Image ->
IO CDouble
imageImageGetXres ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m Double
imageImageGetXres :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Double
imageImageGetXres a
image = IO Double -> m Double
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Double -> m Double) -> IO Double -> m Double
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
CDouble
result <- Ptr Image -> IO CDouble
vips_image_get_xres Ptr Image
image'
let result' :: Double
result' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
Double -> IO Double
forall (m :: * -> *) a. Monad m => a -> m a
return Double
result'
#if defined(ENABLE_OVERLOADING)
data ImageImageGetXresMethodInfo
instance (signature ~ (m Double), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetXresMethodInfo a signature where
overloadedMethod = imageImageGetXres
instance O.OverloadedMethodInfo ImageImageGetXresMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetXres",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetXres"
})
#endif
foreign import ccall "vips_image_get_yoffset" vips_image_get_yoffset ::
Ptr Image ->
IO Int32
imageImageGetYoffset ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m Int32
imageImageGetYoffset :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Int32
imageImageGetYoffset 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
vips_image_get_yoffset 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 ImageImageGetYoffsetMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetYoffsetMethodInfo a signature where
overloadedMethod = imageImageGetYoffset
instance O.OverloadedMethodInfo ImageImageGetYoffsetMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetYoffset",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetYoffset"
})
#endif
foreign import ccall "vips_image_get_yres" vips_image_get_yres ::
Ptr Image ->
IO CDouble
imageImageGetYres ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m Double
imageImageGetYres :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Double
imageImageGetYres a
image = IO Double -> m Double
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Double -> m Double) -> IO Double -> m Double
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
CDouble
result <- Ptr Image -> IO CDouble
vips_image_get_yres Ptr Image
image'
let result' :: Double
result' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
Double -> IO Double
forall (m :: * -> *) a. Monad m => a -> m a
return Double
result'
#if defined(ENABLE_OVERLOADING)
data ImageImageGetYresMethodInfo
instance (signature ~ (m Double), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetYresMethodInfo a signature where
overloadedMethod = imageImageGetYres
instance O.OverloadedMethodInfo ImageImageGetYresMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetYres",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetYres"
})
#endif
foreign import ccall "vips_image_guess_format" vips_image_guess_format ::
Ptr Image ->
IO CInt
imageImageGuessFormat ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m Vips.Enums.BandFormat
imageImageGuessFormat :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m BandFormat
imageImageGuessFormat a
image = IO BandFormat -> m BandFormat
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO BandFormat -> m BandFormat) -> IO BandFormat -> m BandFormat
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
CInt
result <- Ptr Image -> IO CInt
vips_image_guess_format Ptr Image
image'
let result' :: BandFormat
result' = (Int -> BandFormat
forall a. Enum a => Int -> a
toEnum (Int -> BandFormat) -> (CInt -> Int) -> CInt -> BandFormat
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
BandFormat -> IO BandFormat
forall (m :: * -> *) a. Monad m => a -> m a
return BandFormat
result'
#if defined(ENABLE_OVERLOADING)
data ImageImageGuessFormatMethodInfo
instance (signature ~ (m Vips.Enums.BandFormat), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGuessFormatMethodInfo a signature where
overloadedMethod = imageImageGuessFormat
instance O.OverloadedMethodInfo ImageImageGuessFormatMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGuessFormat",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGuessFormat"
})
#endif
foreign import ccall "vips_image_guess_interpretation" vips_image_guess_interpretation ::
Ptr Image ->
IO CInt
imageImageGuessInterpretation ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m Vips.Enums.Interpretation
imageImageGuessInterpretation :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Interpretation
imageImageGuessInterpretation a
image = IO Interpretation -> m Interpretation
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Interpretation -> m Interpretation)
-> IO Interpretation -> m Interpretation
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
CInt
result <- Ptr Image -> IO CInt
vips_image_guess_interpretation Ptr Image
image'
let result' :: Interpretation
result' = (Int -> Interpretation
forall a. Enum a => Int -> a
toEnum (Int -> Interpretation) -> (CInt -> Int) -> CInt -> Interpretation
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
Interpretation -> IO Interpretation
forall (m :: * -> *) a. Monad m => a -> m a
return Interpretation
result'
#if defined(ENABLE_OVERLOADING)
data ImageImageGuessInterpretationMethodInfo
instance (signature ~ (m Vips.Enums.Interpretation), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGuessInterpretationMethodInfo a signature where
overloadedMethod = imageImageGuessInterpretation
instance O.OverloadedMethodInfo ImageImageGuessInterpretationMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGuessInterpretation",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGuessInterpretation"
})
#endif
foreign import ccall "vips_image_hasalpha" vips_image_hasalpha ::
Ptr Image ->
IO CInt
imageImageHasalpha ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m Bool
imageImageHasalpha :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Bool
imageImageHasalpha a
image = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
CInt
result <- Ptr Image -> IO CInt
vips_image_hasalpha Ptr Image
image'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data ImageImageHasalphaMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageHasalphaMethodInfo a signature where
overloadedMethod = imageImageHasalpha
instance O.OverloadedMethodInfo ImageImageHasalphaMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageHasalpha",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageHasalpha"
})
#endif
foreign import ccall "vips_image_history_args" vips_image_history_args ::
Ptr Image ->
CString ->
Int32 ->
Ptr CString ->
IO Int32
imageImageHistoryArgs ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> T.Text
-> [T.Text]
-> m Int32
imageImageHistoryArgs :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Text -> [Text] -> m Int32
imageImageHistoryArgs a
image Text
name [Text]
argv = 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
let argc :: Int32
argc = Int -> Int32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Int32) -> Int -> Int32
forall a b. (a -> b) -> a -> b
$ [Text] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [Text]
argv
Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
CString
name' <- Text -> IO CString
textToCString Text
name
Ptr CString
argv' <- [Text] -> IO (Ptr CString)
packUTF8CArray [Text]
argv
Int32
result <- Ptr Image -> CString -> Int32 -> Ptr CString -> IO Int32
vips_image_history_args Ptr Image
image' CString
name' Int32
argc Ptr CString
argv'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
(Int32 -> (CString -> IO ()) -> Ptr CString -> IO ()
forall a b c.
(Storable a, Integral b) =>
b -> (a -> IO c) -> Ptr a -> IO ()
mapCArrayWithLength Int32
argc) CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
argv'
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
argv'
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data ImageImageHistoryArgsMethodInfo
instance (signature ~ (T.Text -> [T.Text] -> m Int32), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageHistoryArgsMethodInfo a signature where
overloadedMethod = imageImageHistoryArgs
instance O.OverloadedMethodInfo ImageImageHistoryArgsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageHistoryArgs",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageHistoryArgs"
})
#endif
foreign import ccall "vips_image_init_fields" vips_image_init_fields ::
Ptr Image ->
Int32 ->
Int32 ->
Int32 ->
CInt ->
CInt ->
CInt ->
CDouble ->
CDouble ->
IO ()
imageImageInitFields ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> Int32
-> Int32
-> Int32
-> Vips.Enums.BandFormat
-> Vips.Enums.Coding
-> Vips.Enums.Interpretation
-> Double
-> Double
-> m ()
imageImageInitFields :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a
-> Int32
-> Int32
-> Int32
-> BandFormat
-> Coding
-> Interpretation
-> Double
-> Double
-> m ()
imageImageInitFields a
image Int32
xsize Int32
ysize Int32
bands BandFormat
format Coding
coding Interpretation
interpretation Double
xres Double
yres = 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 format' :: CInt
format' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (BandFormat -> Int) -> BandFormat -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BandFormat -> Int
forall a. Enum a => a -> Int
fromEnum) BandFormat
format
let coding' :: CInt
coding' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Coding -> Int) -> Coding -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Coding -> Int
forall a. Enum a => a -> Int
fromEnum) Coding
coding
let interpretation' :: CInt
interpretation' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Interpretation -> Int) -> Interpretation -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Interpretation -> Int
forall a. Enum a => a -> Int
fromEnum) Interpretation
interpretation
let xres' :: CDouble
xres' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
xres
let yres' :: CDouble
yres' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
yres
Ptr Image
-> Int32
-> Int32
-> Int32
-> CInt
-> CInt
-> CInt
-> CDouble
-> CDouble
-> IO ()
vips_image_init_fields Ptr Image
image' Int32
xsize Int32
ysize Int32
bands CInt
format' CInt
coding' CInt
interpretation' CDouble
xres' CDouble
yres'
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 ImageImageInitFieldsMethodInfo
instance (signature ~ (Int32 -> Int32 -> Int32 -> Vips.Enums.BandFormat -> Vips.Enums.Coding -> Vips.Enums.Interpretation -> Double -> Double -> m ()), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageInitFieldsMethodInfo a signature where
overloadedMethod = imageImageInitFields
instance O.OverloadedMethodInfo ImageImageInitFieldsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageInitFields",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageInitFields"
})
#endif
foreign import ccall "vips_image_inplace" vips_image_inplace ::
Ptr Image ->
IO Int32
imageImageInplace ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m Int32
imageImageInplace :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Int32
imageImageInplace 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
vips_image_inplace 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 ImageImageInplaceMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageInplaceMethodInfo a signature where
overloadedMethod = imageImageInplace
instance O.OverloadedMethodInfo ImageImageInplaceMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageInplace",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageInplace"
})
#endif
foreign import ccall "vips_image_invalidate_all" vips_image_invalidate_all ::
Ptr Image ->
IO ()
imageImageInvalidateAll ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m ()
imageImageInvalidateAll :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m ()
imageImageInvalidateAll 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 ()
vips_image_invalidate_all 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 ImageImageInvalidateAllMethodInfo
instance (signature ~ (m ()), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageInvalidateAllMethodInfo a signature where
overloadedMethod = imageImageInvalidateAll
instance O.OverloadedMethodInfo ImageImageInvalidateAllMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageInvalidateAll",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageInvalidateAll"
})
#endif
foreign import ccall "vips_image_isMSBfirst" vips_image_isMSBfirst ::
Ptr Image ->
IO CInt
imageImageIsMSBfirst ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m Bool
imageImageIsMSBfirst :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Bool
imageImageIsMSBfirst a
image = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
CInt
result <- Ptr Image -> IO CInt
vips_image_isMSBfirst Ptr Image
image'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data ImageImageIsMSBfirstMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageIsMSBfirstMethodInfo a signature where
overloadedMethod = imageImageIsMSBfirst
instance O.OverloadedMethodInfo ImageImageIsMSBfirstMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageIsMSBfirst",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageIsMSBfirst"
})
#endif
foreign import ccall "vips_image_is_sequential" vips_image_is_sequential ::
Ptr Image ->
IO CInt
imageImageIsSequential ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m Bool
imageImageIsSequential :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Bool
imageImageIsSequential a
image = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
CInt
result <- Ptr Image -> IO CInt
vips_image_is_sequential Ptr Image
image'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data ImageImageIsSequentialMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageIsSequentialMethodInfo a signature where
overloadedMethod = imageImageIsSequential
instance O.OverloadedMethodInfo ImageImageIsSequentialMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageIsSequential",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageIsSequential"
})
#endif
foreign import ccall "vips_image_isfile" vips_image_isfile ::
Ptr Image ->
IO CInt
imageImageIsfile ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m Bool
imageImageIsfile :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Bool
imageImageIsfile a
image = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
CInt
result <- Ptr Image -> IO CInt
vips_image_isfile Ptr Image
image'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data ImageImageIsfileMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageIsfileMethodInfo a signature where
overloadedMethod = imageImageIsfile
instance O.OverloadedMethodInfo ImageImageIsfileMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageIsfile",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageIsfile"
})
#endif
foreign import ccall "vips_image_iskilled" vips_image_iskilled ::
Ptr Image ->
IO CInt
imageImageIskilled ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m Bool
imageImageIskilled :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Bool
imageImageIskilled a
image = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
CInt
result <- Ptr Image -> IO CInt
vips_image_iskilled Ptr Image
image'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data ImageImageIskilledMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageIskilledMethodInfo a signature where
overloadedMethod = imageImageIskilled
instance O.OverloadedMethodInfo ImageImageIskilledMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageIskilled",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageIskilled"
})
#endif
foreign import ccall "vips_image_ispartial" vips_image_ispartial ::
Ptr Image ->
IO CInt
imageImageIspartial ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m Bool
imageImageIspartial :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Bool
imageImageIspartial a
image = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
CInt
result <- Ptr Image -> IO CInt
vips_image_ispartial Ptr Image
image'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data ImageImageIspartialMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageIspartialMethodInfo a signature where
overloadedMethod = imageImageIspartial
instance O.OverloadedMethodInfo ImageImageIspartialMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageIspartial",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageIspartial"
})
#endif
#if defined(ENABLE_OVERLOADING)
data ImageImageMapMethodInfo
instance (p ~ (), o ~ O.UnsupportedMethodError "imageMap" Image) => O.OverloadedMethod ImageImageMapMethodInfo o p where
overloadedMethod = undefined
instance (o ~ O.UnsupportedMethodError "imageMap" Image) => O.OverloadedMethodInfo ImageImageMapMethodInfo o where
overloadedMethodInfo = undefined
#endif
foreign import ccall "vips_image_minimise_all" vips_image_minimise_all ::
Ptr Image ->
IO ()
imageImageMinimiseAll ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m ()
imageImageMinimiseAll :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m ()
imageImageMinimiseAll 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 ()
vips_image_minimise_all 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 ImageImageMinimiseAllMethodInfo
instance (signature ~ (m ()), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageMinimiseAllMethodInfo a signature where
overloadedMethod = imageImageMinimiseAll
instance O.OverloadedMethodInfo ImageImageMinimiseAllMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageMinimiseAll",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageMinimiseAll"
})
#endif
foreign import ccall "vips_image_pio_input" vips_image_pio_input ::
Ptr Image ->
IO Int32
imageImagePioInput ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m Int32
imageImagePioInput :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Int32
imageImagePioInput 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
vips_image_pio_input 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 ImageImagePioInputMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsImage a) => O.OverloadedMethod ImageImagePioInputMethodInfo a signature where
overloadedMethod = imageImagePioInput
instance O.OverloadedMethodInfo ImageImagePioInputMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImagePioInput",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImagePioInput"
})
#endif
foreign import ccall "vips_image_pio_output" vips_image_pio_output ::
Ptr Image ->
IO Int32
imageImagePioOutput ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m Int32
imageImagePioOutput :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Int32
imageImagePioOutput 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
vips_image_pio_output 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 ImageImagePioOutputMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsImage a) => O.OverloadedMethod ImageImagePioOutputMethodInfo a signature where
overloadedMethod = imageImagePioOutput
instance O.OverloadedMethodInfo ImageImagePioOutputMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImagePioOutput",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImagePioOutput"
})
#endif
foreign import ccall "vips_image_print_field" vips_image_print_field ::
Ptr Image ->
CString ->
IO ()
imageImagePrintField ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> T.Text
-> m ()
imageImagePrintField :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Text -> m ()
imageImagePrintField a
image Text
field = 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
field' <- Text -> IO CString
textToCString Text
field
Ptr Image -> CString -> IO ()
vips_image_print_field Ptr Image
image' CString
field'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
field'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ImageImagePrintFieldMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsImage a) => O.OverloadedMethod ImageImagePrintFieldMethodInfo a signature where
overloadedMethod = imageImagePrintField
instance O.OverloadedMethodInfo ImageImagePrintFieldMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImagePrintField",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImagePrintField"
})
#endif
foreign import ccall "vips_image_remove" vips_image_remove ::
Ptr Image ->
CString ->
IO CInt
imageImageRemove ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> T.Text
-> m Bool
imageImageRemove :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Text -> m Bool
imageImageRemove a
image Text
name = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
CString
name' <- Text -> IO CString
textToCString Text
name
CInt
result <- Ptr Image -> CString -> IO CInt
vips_image_remove Ptr Image
image' CString
name'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data ImageImageRemoveMethodInfo
instance (signature ~ (T.Text -> m Bool), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageRemoveMethodInfo a signature where
overloadedMethod = imageImageRemove
instance O.OverloadedMethodInfo ImageImageRemoveMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageRemove",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageRemove"
})
#endif
foreign import ccall "vips_image_set" vips_image_set ::
Ptr Image ->
CString ->
Ptr GValue ->
IO ()
imageImageSet ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> T.Text
-> GValue
-> m ()
imageImageSet :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Text -> GValue -> m ()
imageImageSet a
image Text
name GValue
value = 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
name' <- Text -> IO CString
textToCString Text
name
Ptr GValue
value' <- GValue -> IO (Ptr GValue)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GValue
value
Ptr Image -> CString -> Ptr GValue -> IO ()
vips_image_set Ptr Image
image' CString
name' Ptr GValue
value'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
GValue -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GValue
value
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ImageImageSetMethodInfo
instance (signature ~ (T.Text -> GValue -> m ()), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageSetMethodInfo a signature where
overloadedMethod = imageImageSet
instance O.OverloadedMethodInfo ImageImageSetMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageSet",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageSet"
})
#endif
foreign import ccall "vips_image_set_area" vips_image_set_area ::
Ptr Image ->
CString ->
FunPtr Vips.Callbacks.C_CallbackFn ->
Ptr () ->
IO ()
imageImageSetArea ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> T.Text
-> Vips.Callbacks.CallbackFn
-> m ()
imageImageSetArea :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Text -> CallbackFn -> m ()
imageImageSetArea a
image Text
name CallbackFn
freeFn = 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
name' <- Text -> IO CString
textToCString Text
name
Ptr (FunPtr CallbackFn)
ptrfreeFn <- IO (Ptr (FunPtr CallbackFn))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (FunPtr Vips.Callbacks.C_CallbackFn))
FunPtr CallbackFn
freeFn' <- CallbackFn -> IO (FunPtr CallbackFn)
Vips.Callbacks.mk_CallbackFn (Maybe (Ptr (FunPtr CallbackFn)) -> CallbackFn -> CallbackFn
Vips.Callbacks.wrap_CallbackFn (Ptr (FunPtr CallbackFn) -> Maybe (Ptr (FunPtr CallbackFn))
forall a. a -> Maybe a
Just Ptr (FunPtr CallbackFn)
ptrfreeFn) CallbackFn
freeFn)
Ptr (FunPtr CallbackFn) -> FunPtr CallbackFn -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr (FunPtr CallbackFn)
ptrfreeFn FunPtr CallbackFn
freeFn'
let data_ :: Ptr a
data_ = Ptr a
forall a. Ptr a
nullPtr
Ptr Image -> CString -> FunPtr CallbackFn -> ImageEvalCallback
vips_image_set_area Ptr Image
image' CString
name' FunPtr CallbackFn
freeFn' Ptr ()
forall a. Ptr a
data_
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ImageImageSetAreaMethodInfo
instance (signature ~ (T.Text -> Vips.Callbacks.CallbackFn -> m ()), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageSetAreaMethodInfo a signature where
overloadedMethod = imageImageSetArea
instance O.OverloadedMethodInfo ImageImageSetAreaMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageSetArea",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageSetArea"
})
#endif
foreign import ccall "vips_image_set_array_double" vips_image_set_array_double ::
Ptr Image ->
CString ->
Ptr CDouble ->
Int32 ->
IO ()
imageImageSetArrayDouble ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> T.Text
-> Maybe ([Double])
-> m ()
imageImageSetArrayDouble :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Text -> Maybe [Double] -> m ()
imageImageSetArrayDouble a
image Text
name Maybe [Double]
array = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
let n :: Int32
n = case Maybe [Double]
array of
Maybe [Double]
Nothing -> Int32
0
Just [Double]
jArray -> Int -> Int32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Int32) -> Int -> Int32
forall a b. (a -> b) -> a -> b
$ [Double] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [Double]
jArray
Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
CString
name' <- Text -> IO CString
textToCString Text
name
Ptr CDouble
maybeArray <- case Maybe [Double]
array of
Maybe [Double]
Nothing -> Ptr CDouble -> IO (Ptr CDouble)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CDouble
forall a. Ptr a
nullPtr
Just [Double]
jArray -> do
Ptr CDouble
jArray' <- ((Double -> CDouble) -> [Double] -> IO (Ptr CDouble)
forall a b. Storable b => (a -> b) -> [a] -> IO (Ptr b)
packMapStorableArray Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac) [Double]
jArray
Ptr CDouble -> IO (Ptr CDouble)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CDouble
jArray'
Ptr Image -> CString -> Ptr CDouble -> Int32 -> IO ()
vips_image_set_array_double Ptr Image
image' CString
name' Ptr CDouble
maybeArray Int32
n
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
Ptr CDouble -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CDouble
maybeArray
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ImageImageSetArrayDoubleMethodInfo
instance (signature ~ (T.Text -> Maybe ([Double]) -> m ()), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageSetArrayDoubleMethodInfo a signature where
overloadedMethod = imageImageSetArrayDouble
instance O.OverloadedMethodInfo ImageImageSetArrayDoubleMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageSetArrayDouble",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageSetArrayDouble"
})
#endif
foreign import ccall "vips_image_set_array_int" vips_image_set_array_int ::
Ptr Image ->
CString ->
Ptr Int32 ->
Int32 ->
IO ()
imageImageSetArrayInt ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> T.Text
-> Maybe ([Int32])
-> m ()
imageImageSetArrayInt :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Text -> Maybe [Int32] -> m ()
imageImageSetArrayInt a
image Text
name Maybe [Int32]
array = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
let n :: Int32
n = case Maybe [Int32]
array of
Maybe [Int32]
Nothing -> Int32
0
Just [Int32]
jArray -> Int -> Int32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Int32) -> Int -> Int32
forall a b. (a -> b) -> a -> b
$ [Int32] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [Int32]
jArray
Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
CString
name' <- Text -> IO CString
textToCString Text
name
Ptr Int32
maybeArray <- case Maybe [Int32]
array of
Maybe [Int32]
Nothing -> Ptr Int32 -> IO (Ptr Int32)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Int32
forall a. Ptr a
nullPtr
Just [Int32]
jArray -> do
Ptr Int32
jArray' <- [Int32] -> IO (Ptr Int32)
forall a. Storable a => [a] -> IO (Ptr a)
packStorableArray [Int32]
jArray
Ptr Int32 -> IO (Ptr Int32)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Int32
jArray'
Ptr Image -> CString -> Ptr Int32 -> Int32 -> IO ()
vips_image_set_array_int Ptr Image
image' CString
name' Ptr Int32
maybeArray Int32
n
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
maybeArray
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ImageImageSetArrayIntMethodInfo
instance (signature ~ (T.Text -> Maybe ([Int32]) -> m ()), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageSetArrayIntMethodInfo a signature where
overloadedMethod = imageImageSetArrayInt
instance O.OverloadedMethodInfo ImageImageSetArrayIntMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageSetArrayInt",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageSetArrayInt"
})
#endif
foreign import ccall "vips_image_set_blob" vips_image_set_blob ::
Ptr Image ->
CString ->
FunPtr Vips.Callbacks.C_CallbackFn ->
Ptr () ->
Word64 ->
IO ()
imageImageSetBlob ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> T.Text
-> Vips.Callbacks.CallbackFn
-> Word64
-> m ()
imageImageSetBlob :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Text -> CallbackFn -> Word64 -> m ()
imageImageSetBlob a
image Text
name CallbackFn
freeFn Word64
length_ = 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
name' <- Text -> IO CString
textToCString Text
name
Ptr (FunPtr CallbackFn)
ptrfreeFn <- IO (Ptr (FunPtr CallbackFn))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (FunPtr Vips.Callbacks.C_CallbackFn))
FunPtr CallbackFn
freeFn' <- CallbackFn -> IO (FunPtr CallbackFn)
Vips.Callbacks.mk_CallbackFn (Maybe (Ptr (FunPtr CallbackFn)) -> CallbackFn -> CallbackFn
Vips.Callbacks.wrap_CallbackFn (Ptr (FunPtr CallbackFn) -> Maybe (Ptr (FunPtr CallbackFn))
forall a. a -> Maybe a
Just Ptr (FunPtr CallbackFn)
ptrfreeFn) CallbackFn
freeFn)
Ptr (FunPtr CallbackFn) -> FunPtr CallbackFn -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr (FunPtr CallbackFn)
ptrfreeFn FunPtr CallbackFn
freeFn'
let data_ :: Ptr a
data_ = Ptr a
forall a. Ptr a
nullPtr
Ptr Image
-> CString -> FunPtr CallbackFn -> Ptr () -> Word64 -> IO ()
vips_image_set_blob Ptr Image
image' CString
name' FunPtr CallbackFn
freeFn' Ptr ()
forall a. Ptr a
data_ Word64
length_
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ImageImageSetBlobMethodInfo
instance (signature ~ (T.Text -> Vips.Callbacks.CallbackFn -> Word64 -> m ()), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageSetBlobMethodInfo a signature where
overloadedMethod = imageImageSetBlob
instance O.OverloadedMethodInfo ImageImageSetBlobMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageSetBlob",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageSetBlob"
})
#endif
foreign import ccall "vips_image_set_blob_copy" vips_image_set_blob_copy ::
Ptr Image ->
CString ->
Ptr () ->
Word64 ->
IO ()
imageImageSetBlobCopy ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> T.Text
-> Ptr ()
-> Word64
-> m ()
imageImageSetBlobCopy :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Text -> Ptr () -> Word64 -> m ()
imageImageSetBlobCopy a
image Text
name Ptr ()
data_ Word64
length_ = 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
name' <- Text -> IO CString
textToCString Text
name
Ptr Image -> CString -> Ptr () -> Word64 -> IO ()
vips_image_set_blob_copy Ptr Image
image' CString
name' Ptr ()
data_ Word64
length_
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ImageImageSetBlobCopyMethodInfo
instance (signature ~ (T.Text -> Ptr () -> Word64 -> m ()), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageSetBlobCopyMethodInfo a signature where
overloadedMethod = imageImageSetBlobCopy
instance O.OverloadedMethodInfo ImageImageSetBlobCopyMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageSetBlobCopy",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageSetBlobCopy"
})
#endif
foreign import ccall "vips_image_set_delete_on_close" vips_image_set_delete_on_close ::
Ptr Image ->
CInt ->
IO ()
imageImageSetDeleteOnClose ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> Bool
-> m ()
imageImageSetDeleteOnClose :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Bool -> m ()
imageImageSetDeleteOnClose a
image Bool
deleteOnClose = 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 deleteOnClose' :: CInt
deleteOnClose' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
deleteOnClose
Ptr Image -> CInt -> IO ()
vips_image_set_delete_on_close Ptr Image
image' CInt
deleteOnClose'
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 ImageImageSetDeleteOnCloseMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageSetDeleteOnCloseMethodInfo a signature where
overloadedMethod = imageImageSetDeleteOnClose
instance O.OverloadedMethodInfo ImageImageSetDeleteOnCloseMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageSetDeleteOnClose",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageSetDeleteOnClose"
})
#endif
foreign import ccall "vips_image_set_double" vips_image_set_double ::
Ptr Image ->
CString ->
CDouble ->
IO ()
imageImageSetDouble ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> T.Text
-> Double
-> m ()
imageImageSetDouble :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Text -> Double -> m ()
imageImageSetDouble a
image Text
name Double
d = 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
name' <- Text -> IO CString
textToCString Text
name
let d' :: CDouble
d' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
d
Ptr Image -> CString -> CDouble -> IO ()
vips_image_set_double Ptr Image
image' CString
name' CDouble
d'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ImageImageSetDoubleMethodInfo
instance (signature ~ (T.Text -> Double -> m ()), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageSetDoubleMethodInfo a signature where
overloadedMethod = imageImageSetDouble
instance O.OverloadedMethodInfo ImageImageSetDoubleMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageSetDouble",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageSetDouble"
})
#endif
foreign import ccall "vips_image_set_image" vips_image_set_image ::
Ptr Image ->
CString ->
Ptr Image ->
IO ()
imageImageSetImage ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a, IsImage b) =>
a
-> T.Text
-> b
-> m ()
imageImageSetImage :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsImage a, IsImage b) =>
a -> Text -> b -> m ()
imageImageSetImage a
image Text
name b
im = 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
name' <- Text -> IO CString
textToCString Text
name
Ptr Image
im' <- b -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
im
Ptr Image -> CString -> Ptr Image -> IO ()
vips_image_set_image Ptr Image
image' CString
name' Ptr Image
im'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
im
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ImageImageSetImageMethodInfo
instance (signature ~ (T.Text -> b -> m ()), MonadIO m, IsImage a, IsImage b) => O.OverloadedMethod ImageImageSetImageMethodInfo a signature where
overloadedMethod = imageImageSetImage
instance O.OverloadedMethodInfo ImageImageSetImageMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageSetImage",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageSetImage"
})
#endif
foreign import ccall "vips_image_set_int" vips_image_set_int ::
Ptr Image ->
CString ->
Int32 ->
IO ()
imageImageSetInt ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> T.Text
-> Int32
-> m ()
imageImageSetInt :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Text -> Int32 -> m ()
imageImageSetInt a
image Text
name Int32
i = 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
name' <- Text -> IO CString
textToCString Text
name
Ptr Image -> CString -> Int32 -> IO ()
vips_image_set_int Ptr Image
image' CString
name' Int32
i
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ImageImageSetIntMethodInfo
instance (signature ~ (T.Text -> Int32 -> m ()), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageSetIntMethodInfo a signature where
overloadedMethod = imageImageSetInt
instance O.OverloadedMethodInfo ImageImageSetIntMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageSetInt",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageSetInt"
})
#endif
foreign import ccall "vips_image_set_kill" vips_image_set_kill ::
Ptr Image ->
CInt ->
IO ()
imageImageSetKill ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> Bool
-> m ()
imageImageSetKill :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Bool -> m ()
imageImageSetKill a
image Bool
kill = 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 kill' :: CInt
kill' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
kill
Ptr Image -> CInt -> IO ()
vips_image_set_kill Ptr Image
image' CInt
kill'
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 ImageImageSetKillMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageSetKillMethodInfo a signature where
overloadedMethod = imageImageSetKill
instance O.OverloadedMethodInfo ImageImageSetKillMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageSetKill",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageSetKill"
})
#endif
foreign import ccall "vips_image_set_progress" vips_image_set_progress ::
Ptr Image ->
CInt ->
IO ()
imageImageSetProgress ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> Bool
-> m ()
imageImageSetProgress :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Bool -> m ()
imageImageSetProgress a
image Bool
progress = 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 progress' :: CInt
progress' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
progress
Ptr Image -> CInt -> IO ()
vips_image_set_progress Ptr Image
image' CInt
progress'
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 ImageImageSetProgressMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageSetProgressMethodInfo a signature where
overloadedMethod = imageImageSetProgress
instance O.OverloadedMethodInfo ImageImageSetProgressMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageSetProgress",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageSetProgress"
})
#endif
foreign import ccall "vips_image_set_string" vips_image_set_string ::
Ptr Image ->
CString ->
CString ->
IO ()
imageImageSetString ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> T.Text
-> T.Text
-> m ()
imageImageSetString :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Text -> Text -> m ()
imageImageSetString a
image Text
name Text
str = 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
name' <- Text -> IO CString
textToCString Text
name
CString
str' <- Text -> IO CString
textToCString Text
str
Ptr Image -> CString -> CString -> IO ()
vips_image_set_string Ptr Image
image' CString
name' CString
str'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
str'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ImageImageSetStringMethodInfo
instance (signature ~ (T.Text -> T.Text -> m ()), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageSetStringMethodInfo a signature where
overloadedMethod = imageImageSetString
instance O.OverloadedMethodInfo ImageImageSetStringMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageSetString",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageSetString"
})
#endif
foreign import ccall "vips_image_wio_input" vips_image_wio_input ::
Ptr Image ->
IO Int32
imageImageWioInput ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m Int32
imageImageWioInput :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Int32
imageImageWioInput 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
vips_image_wio_input 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 ImageImageWioInputMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageWioInputMethodInfo a signature where
overloadedMethod = imageImageWioInput
instance O.OverloadedMethodInfo ImageImageWioInputMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageWioInput",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageWioInput"
})
#endif
foreign import ccall "vips_image_write" vips_image_write ::
Ptr Image ->
Ptr (Ptr Image) ->
IO Int32
imageImageWrite ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m ((Int32, Image))
imageImageWrite :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m (Int32, Image)
imageImageWrite a
image = IO (Int32, Image) -> m (Int32, Image)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Int32, Image) -> m (Int32, Image))
-> IO (Int32, Image) -> m (Int32, Image)
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 (Ptr Image)
out <- IO (Ptr (Ptr Image))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr Image))
Int32
result <- Ptr Image -> Ptr (Ptr Image) -> IO Int32
vips_image_write Ptr Image
image' Ptr (Ptr Image)
out
Ptr Image
out' <- Ptr (Ptr Image) -> IO (Ptr Image)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr Image)
out
Image
out'' <- ((ManagedPtr Image -> Image) -> Ptr Image -> IO Image
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Image -> Image
Image) Ptr Image
out'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
Ptr (Ptr Image) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Image)
out
(Int32, Image) -> IO (Int32, Image)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
result, Image
out'')
#if defined(ENABLE_OVERLOADING)
data ImageImageWriteMethodInfo
instance (signature ~ (m ((Int32, Image))), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageWriteMethodInfo a signature where
overloadedMethod = imageImageWrite
instance O.OverloadedMethodInfo ImageImageWriteMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageWrite",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageWrite"
})
#endif
foreign import ccall "vips_image_write_line" vips_image_write_line ::
Ptr Image ->
Int32 ->
Word8 ->
IO Int32
imageImageWriteLine ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> Int32
-> Word8
-> m Int32
imageImageWriteLine :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Int32 -> Word8 -> m Int32
imageImageWriteLine a
image Int32
ypos Word8
linebuffer = 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 -> Int32 -> Word8 -> IO Int32
vips_image_write_line Ptr Image
image' Int32
ypos Word8
linebuffer
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 ImageImageWriteLineMethodInfo
instance (signature ~ (Int32 -> Word8 -> m Int32), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageWriteLineMethodInfo a signature where
overloadedMethod = imageImageWriteLine
instance O.OverloadedMethodInfo ImageImageWriteLineMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageWriteLine",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageWriteLine"
})
#endif
foreign import ccall "vips_image_write_prepare" vips_image_write_prepare ::
Ptr Image ->
IO Int32
imageImageWritePrepare ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m Int32
imageImageWritePrepare :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Int32
imageImageWritePrepare 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
vips_image_write_prepare 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 ImageImageWritePrepareMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageWritePrepareMethodInfo a signature where
overloadedMethod = imageImageWritePrepare
instance O.OverloadedMethodInfo ImageImageWritePrepareMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageWritePrepare",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageWritePrepare"
})
#endif
foreign import ccall "vips_image_write_to_memory" vips_image_write_to_memory ::
Ptr Image ->
Ptr Word64 ->
IO (Ptr Word8)
imageImageWriteToMemory ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> m ByteString
imageImageWriteToMemory :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m ByteString
imageImageWriteToMemory a
in_ = IO ByteString -> m ByteString
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ByteString -> m ByteString) -> IO ByteString -> m ByteString
forall a b. (a -> b) -> a -> b
$ do
Ptr Image
in_' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
in_
Ptr Word64
size <- IO (Ptr Word64)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word64)
Ptr Word8
result <- Ptr Image -> Ptr Word64 -> IO (Ptr Word8)
vips_image_write_to_memory Ptr Image
in_' Ptr Word64
size
Word64
size' <- Ptr Word64 -> IO Word64
forall a. Storable a => Ptr a -> IO a
peek Ptr Word64
size
Text -> Ptr Word8 -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"imageImageWriteToMemory" Ptr Word8
result
ByteString
result' <- (Word64 -> Ptr Word8 -> IO ByteString
forall a. Integral a => a -> Ptr Word8 -> IO ByteString
unpackByteStringWithLength Word64
size') Ptr Word8
result
Ptr Word8 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word8
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
in_
Ptr Word64 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word64
size
ByteString -> IO ByteString
forall (m :: * -> *) a. Monad m => a -> m a
return ByteString
result'
#if defined(ENABLE_OVERLOADING)
data ImageImageWriteToMemoryMethodInfo
instance (signature ~ (m ByteString), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageWriteToMemoryMethodInfo a signature where
overloadedMethod = imageImageWriteToMemory
instance O.OverloadedMethodInfo ImageImageWriteToMemoryMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageWriteToMemory",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageWriteToMemory"
})
#endif
foreign import ccall "vips_reorder_margin_hint" vips_reorder_margin_hint ::
Ptr Image ->
Int32 ->
IO ()
imageReorderMarginHint ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> Int32
-> m ()
imageReorderMarginHint :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Int32 -> m ()
imageReorderMarginHint a
image Int32
margin = 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 ()
vips_reorder_margin_hint Ptr Image
image' Int32
margin
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 ImageReorderMarginHintMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m, IsImage a) => O.OverloadedMethod ImageReorderMarginHintMethodInfo a signature where
overloadedMethod = imageReorderMarginHint
instance O.OverloadedMethodInfo ImageReorderMarginHintMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageReorderMarginHint",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageReorderMarginHint"
})
#endif
foreign import ccall "vips_reorder_prepare_many" vips_reorder_prepare_many ::
Ptr Image ->
Ptr (Ptr Vips.Region.Region) ->
Ptr Vips.Rect.Rect ->
IO Int32
imageReorderPrepareMany ::
(B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
a
-> [Vips.Region.Region]
-> Vips.Rect.Rect
-> m Int32
imageReorderPrepareMany :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> [Region] -> Rect -> m Int32
imageReorderPrepareMany a
image [Region]
regions Rect
r = 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
[Ptr Region]
regions' <- (Region -> IO (Ptr Region)) -> [Region] -> IO [Ptr Region]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM Region -> IO (Ptr Region)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr [Region]
regions
Ptr (Ptr Region)
regions'' <- [Ptr Region] -> IO (Ptr (Ptr Region))
forall a. [Ptr a] -> IO (Ptr (Ptr a))
packPtrArray [Ptr Region]
regions'
Ptr Rect
r' <- Rect -> IO (Ptr Rect)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Rect
r
Int32
result <- Ptr Image -> Ptr (Ptr Region) -> Ptr Rect -> IO Int32
vips_reorder_prepare_many Ptr Image
image' Ptr (Ptr Region)
regions'' Ptr Rect
r'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
(Region -> IO ()) -> [Region] -> IO ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ Region -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr [Region]
regions
Rect -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Rect
r
Ptr (Ptr Region) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Region)
regions''
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data ImageReorderPrepareManyMethodInfo
instance (signature ~ ([Vips.Region.Region] -> Vips.Rect.Rect -> m Int32), MonadIO m, IsImage a) => O.OverloadedMethod ImageReorderPrepareManyMethodInfo a signature where
overloadedMethod = imageReorderPrepareMany
instance O.OverloadedMethodInfo ImageReorderPrepareManyMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Vips.Objects.Image.imageReorderPrepareMany",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageReorderPrepareMany"
})
#endif