-- | Copyright  : Will Thompson and Iñaki García Etxebarria
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria

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

module GI.Vips.Callbacks
    ( 

 -- * Signals


-- ** ArgumentClassMapFn #signal:ArgumentClassMapFn#

    ArgumentClassMapFn                      ,
    C_ArgumentClassMapFn                    ,
    dynamic_ArgumentClassMapFn              ,
    genClosure_ArgumentClassMapFn           ,
    mk_ArgumentClassMapFn                   ,
    noArgumentClassMapFn                    ,
    wrap_ArgumentClassMapFn                 ,


-- ** ArgumentMapFn #signal:ArgumentMapFn#

    ArgumentMapFn                           ,
    C_ArgumentMapFn                         ,
    dynamic_ArgumentMapFn                   ,
    genClosure_ArgumentMapFn                ,
    mk_ArgumentMapFn                        ,
    noArgumentMapFn                         ,
    wrap_ArgumentMapFn                      ,


-- ** CallbackFn #signal:CallbackFn#

    C_CallbackFn                            ,
    CallbackFn                              ,
    dynamic_CallbackFn                      ,
    genClosure_CallbackFn                   ,
    mk_CallbackFn                           ,
    noCallbackFn                            ,
    wrap_CallbackFn                         ,


-- ** ClassMapFn #signal:ClassMapFn#

    C_ClassMapFn                            ,
    ClassMapFn                              ,
    dynamic_ClassMapFn                      ,
    genClosure_ClassMapFn                   ,
    mk_ClassMapFn                           ,
    noClassMapFn                            ,
    wrap_ClassMapFn                         ,


-- ** GenerateFn #signal:GenerateFn#

    C_GenerateFn                            ,
    GenerateFn                              ,
    dynamic_GenerateFn                      ,
    genClosure_GenerateFn                   ,
    mk_GenerateFn                           ,
    noGenerateFn                            ,
    wrap_GenerateFn                         ,


-- ** ImageMapFn #signal:ImageMapFn#

    C_ImageMapFn                            ,
    ImageMapFn                              ,
    dynamic_ImageMapFn                      ,
    genClosure_ImageMapFn                   ,
    mk_ImageMapFn                           ,
    noImageMapFn                            ,
    wrap_ImageMapFn                         ,


-- ** InterpolateMethod #signal:InterpolateMethod#

    C_InterpolateMethod                     ,
    InterpolateMethod                       ,
    dynamic_InterpolateMethod               ,
    genClosure_InterpolateMethod            ,
    mk_InterpolateMethod                    ,
    noInterpolateMethod                     ,
    wrap_InterpolateMethod                  ,


-- ** ObjectClassBuildFieldCallback #signal:ObjectClassBuildFieldCallback#

    C_ObjectClassBuildFieldCallback         ,
    ObjectClassBuildFieldCallback           ,
    dynamic_ObjectClassBuildFieldCallback   ,
    genClosure_ObjectClassBuildFieldCallback,
    mk_ObjectClassBuildFieldCallback        ,
    noObjectClassBuildFieldCallback         ,
    wrap_ObjectClassBuildFieldCallback      ,


-- ** ObjectClassCloseFieldCallback #signal:ObjectClassCloseFieldCallback#

    C_ObjectClassCloseFieldCallback         ,
    ObjectClassCloseFieldCallback           ,
    dynamic_ObjectClassCloseFieldCallback   ,
    genClosure_ObjectClassCloseFieldCallback,
    mk_ObjectClassCloseFieldCallback        ,
    noObjectClassCloseFieldCallback         ,
    wrap_ObjectClassCloseFieldCallback      ,


-- ** ObjectClassOutputToArgFieldCallback #signal:ObjectClassOutputToArgFieldCallback#

    C_ObjectClassOutputToArgFieldCallback   ,
    ObjectClassOutputToArgFieldCallback     ,
    dynamic_ObjectClassOutputToArgFieldCallback,
    genClosure_ObjectClassOutputToArgFieldCallback,
    mk_ObjectClassOutputToArgFieldCallback  ,
    noObjectClassOutputToArgFieldCallback   ,
    wrap_ObjectClassOutputToArgFieldCallback,


-- ** ObjectClassPostbuildFieldCallback #signal:ObjectClassPostbuildFieldCallback#

    C_ObjectClassPostbuildFieldCallback     ,
    ObjectClassPostbuildFieldCallback       ,
    dynamic_ObjectClassPostbuildFieldCallback,
    genClosure_ObjectClassPostbuildFieldCallback,
    mk_ObjectClassPostbuildFieldCallback    ,
    noObjectClassPostbuildFieldCallback     ,
    wrap_ObjectClassPostbuildFieldCallback  ,


-- ** ObjectClassPostcloseFieldCallback #signal:ObjectClassPostcloseFieldCallback#

    C_ObjectClassPostcloseFieldCallback     ,
    ObjectClassPostcloseFieldCallback       ,
    dynamic_ObjectClassPostcloseFieldCallback,
    genClosure_ObjectClassPostcloseFieldCallback,
    mk_ObjectClassPostcloseFieldCallback    ,
    noObjectClassPostcloseFieldCallback     ,
    wrap_ObjectClassPostcloseFieldCallback  ,


-- ** ObjectClassPrecloseFieldCallback #signal:ObjectClassPrecloseFieldCallback#

    C_ObjectClassPrecloseFieldCallback      ,
    ObjectClassPrecloseFieldCallback        ,
    dynamic_ObjectClassPrecloseFieldCallback,
    genClosure_ObjectClassPrecloseFieldCallback,
    mk_ObjectClassPrecloseFieldCallback     ,
    noObjectClassPrecloseFieldCallback      ,
    wrap_ObjectClassPrecloseFieldCallback   ,


-- ** ObjectClassRewindFieldCallback #signal:ObjectClassRewindFieldCallback#

    C_ObjectClassRewindFieldCallback        ,
    ObjectClassRewindFieldCallback          ,
    dynamic_ObjectClassRewindFieldCallback  ,
    genClosure_ObjectClassRewindFieldCallback,
    mk_ObjectClassRewindFieldCallback       ,
    noObjectClassRewindFieldCallback        ,
    wrap_ObjectClassRewindFieldCallback     ,


-- ** ObjectSetArguments #signal:ObjectSetArguments#

    C_ObjectSetArguments                    ,
    ObjectSetArguments                      ,
    dynamic_ObjectSetArguments              ,
    genClosure_ObjectSetArguments           ,
    mk_ObjectSetArguments                   ,
    noObjectSetArguments                    ,
    wrap_ObjectSetArguments                 ,


-- ** OperationBuildFn #signal:OperationBuildFn#

    C_OperationBuildFn                      ,
    OperationBuildFn                        ,
    dynamic_OperationBuildFn                ,
    genClosure_OperationBuildFn             ,
    mk_OperationBuildFn                     ,
    noOperationBuildFn                      ,
    wrap_OperationBuildFn                   ,


-- ** SListFold2Fn #signal:SListFold2Fn#

    C_SListFold2Fn                          ,
    SListFold2Fn                            ,
    dynamic_SListFold2Fn                    ,
    genClosure_SListFold2Fn                 ,
    mk_SListFold2Fn                         ,
    noSListFold2Fn                          ,
    wrap_SListFold2Fn                       ,


-- ** SListMap2Fn #signal:SListMap2Fn#

    C_SListMap2Fn                           ,
    SListMap2Fn                             ,
    dynamic_SListMap2Fn                     ,
    genClosure_SListMap2Fn                  ,
    mk_SListMap2Fn                          ,
    noSListMap2Fn                           ,
    wrap_SListMap2Fn                        ,


-- ** SListMap4Fn #signal:SListMap4Fn#

    C_SListMap4Fn                           ,
    SListMap4Fn                             ,
    dynamic_SListMap4Fn                     ,
    genClosure_SListMap4Fn                  ,
    mk_SListMap4Fn                          ,
    noSListMap4Fn                           ,
    wrap_SListMap4Fn                        ,


-- ** StartFn #signal:StartFn#

    C_StartFn                               ,
    StartFn                                 ,
    dynamic_StartFn                         ,
    genClosure_StartFn                      ,
    mk_StartFn                              ,
    noStartFn                               ,
    wrap_StartFn                            ,


-- ** StopFn #signal:StopFn#

    C_StopFn                                ,
    StopFn                                  ,
    dynamic_StopFn                          ,
    genClosure_StopFn                       ,
    mk_StopFn                               ,
    noStopFn                                ,
    wrap_StopFn                             ,


-- ** TypeMap2Fn #signal:TypeMap2Fn#

    C_TypeMap2Fn                            ,
    TypeMap2Fn                              ,
    dynamic_TypeMap2Fn                      ,
    genClosure_TypeMap2Fn                   ,
    mk_TypeMap2Fn                           ,
    noTypeMap2Fn                            ,
    wrap_TypeMap2Fn                         ,


-- ** TypeMapFn #signal:TypeMapFn#

    C_TypeMapFn                             ,
    TypeMapFn                               ,
    dynamic_TypeMapFn                       ,
    genClosure_TypeMapFn                    ,
    mk_TypeMapFn                            ,
    noTypeMapFn                             ,
    wrap_TypeMapFn                          ,




    ) 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.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 {-# SOURCE #-} qualified GI.Vips.Objects.Image as Vips.Image
import {-# SOURCE #-} qualified GI.Vips.Objects.Interpolate as Vips.Interpolate
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.ArgumentClass as Vips.ArgumentClass
import {-# SOURCE #-} qualified GI.Vips.Structs.ArgumentInstance as Vips.ArgumentInstance
import {-# SOURCE #-} qualified GI.Vips.Structs.ObjectClass as Vips.ObjectClass

-- callback TypeMapFn
{- Callable
  { returnType = Just (TBasicType TPtr)
  , returnMayBeNull = True
  , returnTransfer = TransferNothing
  , returnDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , args =
      [ Arg
          { argCName = "type"
          , argType = TBasicType TGType
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "a"
          , argType = TBasicType TPtr
          , direction = DirectionIn
          , mayBeNull = True
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      ]
  , skipReturn = False
  , callableThrows = False
  , callableDeprecated = Nothing
  , callableDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , callableResolvable = Nothing
  }
-}
-- | Type for the callback on the (unwrapped) C side.
type C_TypeMapFn =
    CGType ->
    Ptr () ->
    IO (Ptr ())

-- Args: [ Arg
--           { argCName = "type"
--           , argType = TBasicType TGType
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "a"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TPtr)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_TypeMapFn :: FunPtr C_TypeMapFn -> C_TypeMapFn

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_TypeMapFn ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    FunPtr C_TypeMapFn
    -> GType
    -> Ptr ()
    -> m (Ptr ())
dynamic_TypeMapFn :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_TypeMapFn -> GType -> Ptr () -> m (Ptr ())
dynamic_TypeMapFn FunPtr C_TypeMapFn
__funPtr GType
type_ Ptr ()
a = 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
    let type_' :: CGType
type_' = GType -> CGType
gtypeToCGType GType
type_
    Ptr ()
result <- (FunPtr C_TypeMapFn -> C_TypeMapFn
__dynamic_C_TypeMapFn FunPtr C_TypeMapFn
__funPtr) CGType
type_' Ptr ()
a
    Ptr () -> IO (Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result

-- | Generate a function pointer callable from C code, from a `C_TypeMapFn`.
foreign import ccall "wrapper"
    mk_TypeMapFn :: C_TypeMapFn -> IO (FunPtr C_TypeMapFn)

-- | /No description available in the introspection data./
type TypeMapFn =
    GType
    -> Ptr ()
    -> IO (Ptr ())

-- | A convenience synonym for @`Nothing` :: `Maybe` `TypeMapFn`@.
noTypeMapFn :: Maybe TypeMapFn
noTypeMapFn :: Maybe TypeMapFn
noTypeMapFn = Maybe TypeMapFn
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_TypeMapFn :: MonadIO m => TypeMapFn -> m (GClosure C_TypeMapFn)
genClosure_TypeMapFn :: forall (m :: * -> *).
MonadIO m =>
TypeMapFn -> m (GClosure C_TypeMapFn)
genClosure_TypeMapFn TypeMapFn
cb = IO (GClosure C_TypeMapFn) -> m (GClosure C_TypeMapFn)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_TypeMapFn) -> m (GClosure C_TypeMapFn))
-> IO (GClosure C_TypeMapFn) -> m (GClosure C_TypeMapFn)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_TypeMapFn
cb' = Maybe (Ptr (FunPtr C_TypeMapFn)) -> TypeMapFn -> C_TypeMapFn
wrap_TypeMapFn Maybe (Ptr (FunPtr C_TypeMapFn))
forall a. Maybe a
Nothing TypeMapFn
cb
    C_TypeMapFn -> IO (FunPtr C_TypeMapFn)
mk_TypeMapFn C_TypeMapFn
cb' IO (FunPtr C_TypeMapFn)
-> (FunPtr C_TypeMapFn -> IO (GClosure C_TypeMapFn))
-> IO (GClosure C_TypeMapFn)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_TypeMapFn -> IO (GClosure C_TypeMapFn)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `TypeMapFn` into a `C_TypeMapFn`.
wrap_TypeMapFn ::
    Maybe (Ptr (FunPtr C_TypeMapFn)) ->
    TypeMapFn ->
    C_TypeMapFn
wrap_TypeMapFn :: Maybe (Ptr (FunPtr C_TypeMapFn)) -> TypeMapFn -> C_TypeMapFn
wrap_TypeMapFn Maybe (Ptr (FunPtr C_TypeMapFn))
funptrptr TypeMapFn
_cb CGType
type_ Ptr ()
a = do
    let type_' :: GType
type_' = CGType -> GType
GType CGType
type_
    Ptr ()
result <- TypeMapFn
_cb  GType
type_' Ptr ()
a
    Maybe (Ptr (FunPtr C_TypeMapFn)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_TypeMapFn))
funptrptr
    Ptr () -> IO (Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result


-- callback TypeMap2Fn
{- Callable
  { returnType = Just (TBasicType TPtr)
  , returnMayBeNull = True
  , returnTransfer = TransferNothing
  , returnDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , args =
      [ Arg
          { argCName = "type"
          , argType = TBasicType TGType
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "a"
          , argType = TBasicType TPtr
          , direction = DirectionIn
          , mayBeNull = True
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "b"
          , argType = TBasicType TPtr
          , direction = DirectionIn
          , mayBeNull = True
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      ]
  , skipReturn = False
  , callableThrows = False
  , callableDeprecated = Nothing
  , callableDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , callableResolvable = Nothing
  }
-}
-- | Type for the callback on the (unwrapped) C side.
type C_TypeMap2Fn =
    CGType ->
    Ptr () ->
    Ptr () ->
    IO (Ptr ())

-- Args: [ Arg
--           { argCName = "type"
--           , argType = TBasicType TGType
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "a"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "b"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TPtr)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_TypeMap2Fn :: FunPtr C_TypeMap2Fn -> C_TypeMap2Fn

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_TypeMap2Fn ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    FunPtr C_TypeMap2Fn
    -> GType
    -> Ptr ()
    -> Ptr ()
    -> m (Ptr ())
dynamic_TypeMap2Fn :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_TypeMap2Fn -> GType -> Ptr () -> Ptr () -> m (Ptr ())
dynamic_TypeMap2Fn FunPtr C_TypeMap2Fn
__funPtr GType
type_ Ptr ()
a Ptr ()
b = 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
    let type_' :: CGType
type_' = GType -> CGType
gtypeToCGType GType
type_
    Ptr ()
result <- (FunPtr C_TypeMap2Fn -> C_TypeMap2Fn
__dynamic_C_TypeMap2Fn FunPtr C_TypeMap2Fn
__funPtr) CGType
type_' Ptr ()
a Ptr ()
b
    Ptr () -> IO (Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result

-- | Generate a function pointer callable from C code, from a `C_TypeMap2Fn`.
foreign import ccall "wrapper"
    mk_TypeMap2Fn :: C_TypeMap2Fn -> IO (FunPtr C_TypeMap2Fn)

-- | /No description available in the introspection data./
type TypeMap2Fn =
    GType
    -> Ptr ()
    -> Ptr ()
    -> IO (Ptr ())

-- | A convenience synonym for @`Nothing` :: `Maybe` `TypeMap2Fn`@.
noTypeMap2Fn :: Maybe TypeMap2Fn
noTypeMap2Fn :: Maybe TypeMap2Fn
noTypeMap2Fn = Maybe TypeMap2Fn
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_TypeMap2Fn :: MonadIO m => TypeMap2Fn -> m (GClosure C_TypeMap2Fn)
genClosure_TypeMap2Fn :: forall (m :: * -> *).
MonadIO m =>
TypeMap2Fn -> m (GClosure C_TypeMap2Fn)
genClosure_TypeMap2Fn TypeMap2Fn
cb = IO (GClosure C_TypeMap2Fn) -> m (GClosure C_TypeMap2Fn)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_TypeMap2Fn) -> m (GClosure C_TypeMap2Fn))
-> IO (GClosure C_TypeMap2Fn) -> m (GClosure C_TypeMap2Fn)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_TypeMap2Fn
cb' = Maybe (Ptr (FunPtr C_TypeMap2Fn)) -> TypeMap2Fn -> C_TypeMap2Fn
wrap_TypeMap2Fn Maybe (Ptr (FunPtr C_TypeMap2Fn))
forall a. Maybe a
Nothing TypeMap2Fn
cb
    C_TypeMap2Fn -> IO (FunPtr C_TypeMap2Fn)
mk_TypeMap2Fn C_TypeMap2Fn
cb' IO (FunPtr C_TypeMap2Fn)
-> (FunPtr C_TypeMap2Fn -> IO (GClosure C_TypeMap2Fn))
-> IO (GClosure C_TypeMap2Fn)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_TypeMap2Fn -> IO (GClosure C_TypeMap2Fn)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `TypeMap2Fn` into a `C_TypeMap2Fn`.
wrap_TypeMap2Fn ::
    Maybe (Ptr (FunPtr C_TypeMap2Fn)) ->
    TypeMap2Fn ->
    C_TypeMap2Fn
wrap_TypeMap2Fn :: Maybe (Ptr (FunPtr C_TypeMap2Fn)) -> TypeMap2Fn -> C_TypeMap2Fn
wrap_TypeMap2Fn Maybe (Ptr (FunPtr C_TypeMap2Fn))
funptrptr TypeMap2Fn
_cb CGType
type_ Ptr ()
a Ptr ()
b = do
    let type_' :: GType
type_' = CGType -> GType
GType CGType
type_
    Ptr ()
result <- TypeMap2Fn
_cb  GType
type_' Ptr ()
a Ptr ()
b
    Maybe (Ptr (FunPtr C_TypeMap2Fn)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_TypeMap2Fn))
funptrptr
    Ptr () -> IO (Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result


-- callback StopFn
{- Callable
  { returnType = Just (TBasicType TInt)
  , returnMayBeNull = False
  , returnTransfer = TransferNothing
  , returnDocumentation =
      Documentation
        { rawDocText = Just "0 on success, -1 on error."
        , sinceVersion = Nothing
        }
  , args =
      [ Arg
          { argCName = "seq"
          , argType = TBasicType TPtr
          , direction = DirectionIn
          , mayBeNull = True
          , argDoc =
              Documentation
                { rawDocText = Just "sequence value" , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "a"
          , argType = TBasicType TPtr
          , direction = DirectionIn
          , mayBeNull = True
          , argDoc =
              Documentation
                { rawDocText = Just "user data" , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "b"
          , argType = TBasicType TPtr
          , direction = DirectionIn
          , mayBeNull = True
          , argDoc =
              Documentation
                { rawDocText = Just "user data" , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      ]
  , skipReturn = False
  , callableThrows = False
  , callableDeprecated = Nothing
  , callableDocumentation =
      Documentation
        { rawDocText =
            Just
              "Stop a processing sequence. This frees\nper-thread state, such as an input region.\n\nSee also: vips_stop_one(), vips_stop_many()."
        , sinceVersion = Nothing
        }
  , callableResolvable = Nothing
  }
-}
-- | Type for the callback on the (unwrapped) C side.
type C_StopFn =
    Ptr () ->
    Ptr () ->
    Ptr () ->
    IO Int32

-- Args: [ Arg
--           { argCName = "seq"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "sequence value" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "a"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "user data" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "b"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "user data" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_StopFn :: FunPtr C_StopFn -> C_StopFn

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_StopFn ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    FunPtr C_StopFn
    -> Ptr ()
    -- ^ /@seq@/: sequence value
    -> Ptr ()
    -- ^ /@a@/: user data
    -> Ptr ()
    -- ^ /@b@/: user data
    -> m Int32
    -- ^ __Returns:__ 0 on success, -1 on error.
dynamic_StopFn :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_StopFn -> Ptr () -> Ptr () -> Ptr () -> m Int32
dynamic_StopFn FunPtr C_StopFn
__funPtr Ptr ()
seq Ptr ()
a Ptr ()
b = 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
    Int32
result <- (FunPtr C_StopFn -> C_StopFn
__dynamic_C_StopFn FunPtr C_StopFn
__funPtr) Ptr ()
seq Ptr ()
a Ptr ()
b
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

-- | Generate a function pointer callable from C code, from a `C_StopFn`.
foreign import ccall "wrapper"
    mk_StopFn :: C_StopFn -> IO (FunPtr C_StopFn)

-- | Stop a processing sequence. This frees
-- per-thread state, such as an input region.
-- 
-- See also: @/vips_stop_one()/@, @/vips_stop_many()/@.
type StopFn =
    Ptr ()
    -- ^ /@seq@/: sequence value
    -> Ptr ()
    -- ^ /@a@/: user data
    -> Ptr ()
    -- ^ /@b@/: user data
    -> IO Int32
    -- ^ __Returns:__ 0 on success, -1 on error.

-- | A convenience synonym for @`Nothing` :: `Maybe` `StopFn`@.
noStopFn :: Maybe StopFn
noStopFn :: Maybe C_StopFn
noStopFn = Maybe C_StopFn
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_StopFn :: MonadIO m => StopFn -> m (GClosure C_StopFn)
genClosure_StopFn :: forall (m :: * -> *).
MonadIO m =>
C_StopFn -> m (GClosure C_StopFn)
genClosure_StopFn C_StopFn
cb = IO (GClosure C_StopFn) -> m (GClosure C_StopFn)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_StopFn) -> m (GClosure C_StopFn))
-> IO (GClosure C_StopFn) -> m (GClosure C_StopFn)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_StopFn
cb' = Maybe (Ptr (FunPtr C_StopFn)) -> C_StopFn -> C_StopFn
wrap_StopFn Maybe (Ptr (FunPtr C_StopFn))
forall a. Maybe a
Nothing C_StopFn
cb
    C_StopFn -> IO (FunPtr C_StopFn)
mk_StopFn C_StopFn
cb' IO (FunPtr C_StopFn)
-> (FunPtr C_StopFn -> IO (GClosure C_StopFn))
-> IO (GClosure C_StopFn)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_StopFn -> IO (GClosure C_StopFn)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `StopFn` into a `C_StopFn`.
wrap_StopFn ::
    Maybe (Ptr (FunPtr C_StopFn)) ->
    StopFn ->
    C_StopFn
wrap_StopFn :: Maybe (Ptr (FunPtr C_StopFn)) -> C_StopFn -> C_StopFn
wrap_StopFn Maybe (Ptr (FunPtr C_StopFn))
funptrptr C_StopFn
_cb Ptr ()
seq Ptr ()
a Ptr ()
b = do
    Int32
result <- C_StopFn
_cb  Ptr ()
seq Ptr ()
a Ptr ()
b
    Maybe (Ptr (FunPtr C_StopFn)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_StopFn))
funptrptr
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- callback StartFn
{- Callable
  { returnType = Just (TBasicType TPtr)
  , returnMayBeNull = True
  , returnTransfer = TransferNothing
  , returnDocumentation =
      Documentation
        { rawDocText = Just "a new sequence value"
        , sinceVersion = Nothing
        }
  , args =
      [ Arg
          { argCName = "out"
          , argType = TBasicType TPtr
          , direction = DirectionIn
          , mayBeNull = True
          , argDoc =
              Documentation
                { rawDocText = Just "image being calculated"
                , sinceVersion = Nothing
                }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "a"
          , argType = TBasicType TPtr
          , direction = DirectionIn
          , mayBeNull = True
          , argDoc =
              Documentation
                { rawDocText = Just "user data" , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "b"
          , argType = TBasicType TPtr
          , direction = DirectionIn
          , mayBeNull = True
          , argDoc =
              Documentation
                { rawDocText = Just "user data" , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      ]
  , skipReturn = False
  , callableThrows = False
  , callableDeprecated = Nothing
  , callableDocumentation =
      Documentation
        { rawDocText =
            Just
              "Start a new processing sequence for this generate function. This allocates\nper-thread state, such as an input region.\n\nSee also: vips_start_one(), vips_start_many()."
        , sinceVersion = Nothing
        }
  , callableResolvable = Nothing
  }
-}
-- | Type for the callback on the (unwrapped) C side.
type C_StartFn =
    Ptr () ->
    Ptr () ->
    Ptr () ->
    IO (Ptr ())

-- Args: [ Arg
--           { argCName = "out"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image being calculated"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "a"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "user data" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "b"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "user data" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TPtr)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_StartFn :: FunPtr C_StartFn -> C_StartFn

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_StartFn ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    FunPtr C_StartFn
    -> Ptr ()
    -- ^ /@out@/: image being calculated
    -> Ptr ()
    -- ^ /@a@/: user data
    -> Ptr ()
    -- ^ /@b@/: user data
    -> m (Ptr ())
    -- ^ __Returns:__ a new sequence value
dynamic_StartFn :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_StartFn -> Ptr () -> Ptr () -> Ptr () -> m (Ptr ())
dynamic_StartFn FunPtr C_StartFn
__funPtr Ptr ()
out Ptr ()
a Ptr ()
b = 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 ()
result <- (FunPtr C_StartFn -> C_StartFn
__dynamic_C_StartFn FunPtr C_StartFn
__funPtr) Ptr ()
out Ptr ()
a Ptr ()
b
    Ptr () -> IO (Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result

-- | Generate a function pointer callable from C code, from a `C_StartFn`.
foreign import ccall "wrapper"
    mk_StartFn :: C_StartFn -> IO (FunPtr C_StartFn)

-- | Start a new processing sequence for this generate function. This allocates
-- per-thread state, such as an input region.
-- 
-- See also: @/vips_start_one()/@, @/vips_start_many()/@.
type StartFn =
    Ptr ()
    -- ^ /@out@/: image being calculated
    -> Ptr ()
    -- ^ /@a@/: user data
    -> Ptr ()
    -- ^ /@b@/: user data
    -> IO (Ptr ())
    -- ^ __Returns:__ a new sequence value

-- | A convenience synonym for @`Nothing` :: `Maybe` `StartFn`@.
noStartFn :: Maybe StartFn
noStartFn :: Maybe C_StartFn
noStartFn = Maybe C_StartFn
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_StartFn :: MonadIO m => StartFn -> m (GClosure C_StartFn)
genClosure_StartFn :: forall (m :: * -> *).
MonadIO m =>
C_StartFn -> m (GClosure C_StartFn)
genClosure_StartFn C_StartFn
cb = IO (GClosure C_StartFn) -> m (GClosure C_StartFn)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_StartFn) -> m (GClosure C_StartFn))
-> IO (GClosure C_StartFn) -> m (GClosure C_StartFn)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_StartFn
cb' = Maybe (Ptr (FunPtr C_StartFn)) -> C_StartFn -> C_StartFn
wrap_StartFn Maybe (Ptr (FunPtr C_StartFn))
forall a. Maybe a
Nothing C_StartFn
cb
    C_StartFn -> IO (FunPtr C_StartFn)
mk_StartFn C_StartFn
cb' IO (FunPtr C_StartFn)
-> (FunPtr C_StartFn -> IO (GClosure C_StartFn))
-> IO (GClosure C_StartFn)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_StartFn -> IO (GClosure C_StartFn)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `StartFn` into a `C_StartFn`.
wrap_StartFn ::
    Maybe (Ptr (FunPtr C_StartFn)) ->
    StartFn ->
    C_StartFn
wrap_StartFn :: Maybe (Ptr (FunPtr C_StartFn)) -> C_StartFn -> C_StartFn
wrap_StartFn Maybe (Ptr (FunPtr C_StartFn))
funptrptr C_StartFn
_cb Ptr ()
out Ptr ()
a Ptr ()
b = do
    Ptr ()
result <- C_StartFn
_cb  Ptr ()
out Ptr ()
a Ptr ()
b
    Maybe (Ptr (FunPtr C_StartFn)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_StartFn))
funptrptr
    Ptr () -> IO (Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result


-- callback SListMap4Fn
{- Callable
  { returnType = Just (TBasicType TPtr)
  , returnMayBeNull = True
  , returnTransfer = TransferNothing
  , returnDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , args =
      [ Arg
          { argCName = "item"
          , argType = TBasicType TPtr
          , direction = DirectionIn
          , mayBeNull = True
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "a"
          , argType = TBasicType TPtr
          , direction = DirectionIn
          , mayBeNull = True
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "b"
          , argType = TBasicType TPtr
          , direction = DirectionIn
          , mayBeNull = True
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "c"
          , argType = TBasicType TPtr
          , direction = DirectionIn
          , mayBeNull = True
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "d"
          , argType = TBasicType TPtr
          , direction = DirectionIn
          , mayBeNull = True
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      ]
  , skipReturn = False
  , callableThrows = False
  , callableDeprecated = Nothing
  , callableDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , callableResolvable = Nothing
  }
-}
-- | Type for the callback on the (unwrapped) C side.
type C_SListMap4Fn =
    Ptr () ->
    Ptr () ->
    Ptr () ->
    Ptr () ->
    Ptr () ->
    IO (Ptr ())

-- Args: [ Arg
--           { argCName = "item"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "a"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "b"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "c"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "d"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TPtr)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_SListMap4Fn :: FunPtr C_SListMap4Fn -> C_SListMap4Fn

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_SListMap4Fn ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    FunPtr C_SListMap4Fn
    -> Ptr ()
    -> Ptr ()
    -> Ptr ()
    -> Ptr ()
    -> Ptr ()
    -> m (Ptr ())
dynamic_SListMap4Fn :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_SListMap4Fn
-> Ptr () -> Ptr () -> Ptr () -> Ptr () -> Ptr () -> m (Ptr ())
dynamic_SListMap4Fn FunPtr C_SListMap4Fn
__funPtr Ptr ()
item Ptr ()
a Ptr ()
b Ptr ()
c Ptr ()
d = 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 ()
result <- (FunPtr C_SListMap4Fn -> C_SListMap4Fn
__dynamic_C_SListMap4Fn FunPtr C_SListMap4Fn
__funPtr) Ptr ()
item Ptr ()
a Ptr ()
b Ptr ()
c Ptr ()
d
    Ptr () -> IO (Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result

-- | Generate a function pointer callable from C code, from a `C_SListMap4Fn`.
foreign import ccall "wrapper"
    mk_SListMap4Fn :: C_SListMap4Fn -> IO (FunPtr C_SListMap4Fn)

-- | /No description available in the introspection data./
type SListMap4Fn =
    Ptr ()
    -> Ptr ()
    -> Ptr ()
    -> Ptr ()
    -> Ptr ()
    -> IO (Ptr ())

-- | A convenience synonym for @`Nothing` :: `Maybe` `SListMap4Fn`@.
noSListMap4Fn :: Maybe SListMap4Fn
noSListMap4Fn :: Maybe C_SListMap4Fn
noSListMap4Fn = Maybe C_SListMap4Fn
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_SListMap4Fn :: MonadIO m => SListMap4Fn -> m (GClosure C_SListMap4Fn)
genClosure_SListMap4Fn :: forall (m :: * -> *).
MonadIO m =>
C_SListMap4Fn -> m (GClosure C_SListMap4Fn)
genClosure_SListMap4Fn C_SListMap4Fn
cb = IO (GClosure C_SListMap4Fn) -> m (GClosure C_SListMap4Fn)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_SListMap4Fn) -> m (GClosure C_SListMap4Fn))
-> IO (GClosure C_SListMap4Fn) -> m (GClosure C_SListMap4Fn)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_SListMap4Fn
cb' = Maybe (Ptr (FunPtr C_SListMap4Fn))
-> C_SListMap4Fn -> C_SListMap4Fn
wrap_SListMap4Fn Maybe (Ptr (FunPtr C_SListMap4Fn))
forall a. Maybe a
Nothing C_SListMap4Fn
cb
    C_SListMap4Fn -> IO (FunPtr C_SListMap4Fn)
mk_SListMap4Fn C_SListMap4Fn
cb' IO (FunPtr C_SListMap4Fn)
-> (FunPtr C_SListMap4Fn -> IO (GClosure C_SListMap4Fn))
-> IO (GClosure C_SListMap4Fn)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_SListMap4Fn -> IO (GClosure C_SListMap4Fn)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `SListMap4Fn` into a `C_SListMap4Fn`.
wrap_SListMap4Fn ::
    Maybe (Ptr (FunPtr C_SListMap4Fn)) ->
    SListMap4Fn ->
    C_SListMap4Fn
wrap_SListMap4Fn :: Maybe (Ptr (FunPtr C_SListMap4Fn))
-> C_SListMap4Fn -> C_SListMap4Fn
wrap_SListMap4Fn Maybe (Ptr (FunPtr C_SListMap4Fn))
funptrptr C_SListMap4Fn
_cb Ptr ()
item Ptr ()
a Ptr ()
b Ptr ()
c Ptr ()
d = do
    Ptr ()
result <- C_SListMap4Fn
_cb  Ptr ()
item Ptr ()
a Ptr ()
b Ptr ()
c Ptr ()
d
    Maybe (Ptr (FunPtr C_SListMap4Fn)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_SListMap4Fn))
funptrptr
    Ptr () -> IO (Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result


-- callback SListMap2Fn
{- Callable
  { returnType = Just (TBasicType TPtr)
  , returnMayBeNull = True
  , returnTransfer = TransferNothing
  , returnDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , args =
      [ Arg
          { argCName = "item"
          , argType = TBasicType TPtr
          , direction = DirectionIn
          , mayBeNull = True
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "a"
          , argType = TBasicType TPtr
          , direction = DirectionIn
          , mayBeNull = True
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "b"
          , argType = TBasicType TPtr
          , direction = DirectionIn
          , mayBeNull = True
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      ]
  , skipReturn = False
  , callableThrows = False
  , callableDeprecated = Nothing
  , callableDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , callableResolvable = Nothing
  }
-}
-- | Type for the callback on the (unwrapped) C side.
type C_SListMap2Fn =
    Ptr () ->
    Ptr () ->
    Ptr () ->
    IO (Ptr ())

-- Args: [ Arg
--           { argCName = "item"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "a"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "b"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TPtr)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_SListMap2Fn :: FunPtr C_SListMap2Fn -> C_SListMap2Fn

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_SListMap2Fn ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    FunPtr C_SListMap2Fn
    -> Ptr ()
    -> Ptr ()
    -> Ptr ()
    -> m (Ptr ())
dynamic_SListMap2Fn :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_StartFn -> Ptr () -> Ptr () -> Ptr () -> m (Ptr ())
dynamic_SListMap2Fn FunPtr C_StartFn
__funPtr Ptr ()
item Ptr ()
a Ptr ()
b = 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 ()
result <- (FunPtr C_StartFn -> C_StartFn
__dynamic_C_SListMap2Fn FunPtr C_StartFn
__funPtr) Ptr ()
item Ptr ()
a Ptr ()
b
    Ptr () -> IO (Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result

-- | Generate a function pointer callable from C code, from a `C_SListMap2Fn`.
foreign import ccall "wrapper"
    mk_SListMap2Fn :: C_SListMap2Fn -> IO (FunPtr C_SListMap2Fn)

-- | /No description available in the introspection data./
type SListMap2Fn =
    Ptr ()
    -> Ptr ()
    -> Ptr ()
    -> IO (Ptr ())

-- | A convenience synonym for @`Nothing` :: `Maybe` `SListMap2Fn`@.
noSListMap2Fn :: Maybe SListMap2Fn
noSListMap2Fn :: Maybe C_StartFn
noSListMap2Fn = Maybe C_StartFn
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_SListMap2Fn :: MonadIO m => SListMap2Fn -> m (GClosure C_SListMap2Fn)
genClosure_SListMap2Fn :: forall (m :: * -> *).
MonadIO m =>
C_StartFn -> m (GClosure C_StartFn)
genClosure_SListMap2Fn C_StartFn
cb = IO (GClosure C_StartFn) -> m (GClosure C_StartFn)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_StartFn) -> m (GClosure C_StartFn))
-> IO (GClosure C_StartFn) -> m (GClosure C_StartFn)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_StartFn
cb' = Maybe (Ptr (FunPtr C_StartFn)) -> C_StartFn -> C_StartFn
wrap_SListMap2Fn Maybe (Ptr (FunPtr C_StartFn))
forall a. Maybe a
Nothing C_StartFn
cb
    C_StartFn -> IO (FunPtr C_StartFn)
mk_SListMap2Fn C_StartFn
cb' IO (FunPtr C_StartFn)
-> (FunPtr C_StartFn -> IO (GClosure C_StartFn))
-> IO (GClosure C_StartFn)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_StartFn -> IO (GClosure C_StartFn)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `SListMap2Fn` into a `C_SListMap2Fn`.
wrap_SListMap2Fn ::
    Maybe (Ptr (FunPtr C_SListMap2Fn)) ->
    SListMap2Fn ->
    C_SListMap2Fn
wrap_SListMap2Fn :: Maybe (Ptr (FunPtr C_StartFn)) -> C_StartFn -> C_StartFn
wrap_SListMap2Fn Maybe (Ptr (FunPtr C_StartFn))
funptrptr C_StartFn
_cb Ptr ()
item Ptr ()
a Ptr ()
b = do
    Ptr ()
result <- C_StartFn
_cb  Ptr ()
item Ptr ()
a Ptr ()
b
    Maybe (Ptr (FunPtr C_StartFn)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_StartFn))
funptrptr
    Ptr () -> IO (Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result


-- callback SListFold2Fn
{- Callable
  { returnType = Just (TBasicType TPtr)
  , returnMayBeNull = True
  , returnTransfer = TransferNothing
  , returnDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , args =
      [ Arg
          { argCName = "item"
          , argType = TBasicType TPtr
          , direction = DirectionIn
          , mayBeNull = True
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "a"
          , argType = TBasicType TPtr
          , direction = DirectionIn
          , mayBeNull = True
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "b"
          , argType = TBasicType TPtr
          , direction = DirectionIn
          , mayBeNull = True
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "c"
          , argType = TBasicType TPtr
          , direction = DirectionIn
          , mayBeNull = True
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      ]
  , skipReturn = False
  , callableThrows = False
  , callableDeprecated = Nothing
  , callableDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , callableResolvable = Nothing
  }
-}
-- | Type for the callback on the (unwrapped) C side.
type C_SListFold2Fn =
    Ptr () ->
    Ptr () ->
    Ptr () ->
    Ptr () ->
    IO (Ptr ())

-- Args: [ Arg
--           { argCName = "item"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "a"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "b"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "c"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TPtr)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_SListFold2Fn :: FunPtr C_SListFold2Fn -> C_SListFold2Fn

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_SListFold2Fn ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    FunPtr C_SListFold2Fn
    -> Ptr ()
    -> Ptr ()
    -> Ptr ()
    -> Ptr ()
    -> m (Ptr ())
dynamic_SListFold2Fn :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_SListFold2Fn
-> Ptr () -> Ptr () -> Ptr () -> Ptr () -> m (Ptr ())
dynamic_SListFold2Fn FunPtr C_SListFold2Fn
__funPtr Ptr ()
item Ptr ()
a Ptr ()
b Ptr ()
c = 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 ()
result <- (FunPtr C_SListFold2Fn -> C_SListFold2Fn
__dynamic_C_SListFold2Fn FunPtr C_SListFold2Fn
__funPtr) Ptr ()
item Ptr ()
a Ptr ()
b Ptr ()
c
    Ptr () -> IO (Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result

-- | Generate a function pointer callable from C code, from a `C_SListFold2Fn`.
foreign import ccall "wrapper"
    mk_SListFold2Fn :: C_SListFold2Fn -> IO (FunPtr C_SListFold2Fn)

-- | /No description available in the introspection data./
type SListFold2Fn =
    Ptr ()
    -> Ptr ()
    -> Ptr ()
    -> Ptr ()
    -> IO (Ptr ())

-- | A convenience synonym for @`Nothing` :: `Maybe` `SListFold2Fn`@.
noSListFold2Fn :: Maybe SListFold2Fn
noSListFold2Fn :: Maybe C_SListFold2Fn
noSListFold2Fn = Maybe C_SListFold2Fn
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_SListFold2Fn :: MonadIO m => SListFold2Fn -> m (GClosure C_SListFold2Fn)
genClosure_SListFold2Fn :: forall (m :: * -> *).
MonadIO m =>
C_SListFold2Fn -> m (GClosure C_SListFold2Fn)
genClosure_SListFold2Fn C_SListFold2Fn
cb = IO (GClosure C_SListFold2Fn) -> m (GClosure C_SListFold2Fn)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_SListFold2Fn) -> m (GClosure C_SListFold2Fn))
-> IO (GClosure C_SListFold2Fn) -> m (GClosure C_SListFold2Fn)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_SListFold2Fn
cb' = Maybe (Ptr (FunPtr C_SListFold2Fn))
-> C_SListFold2Fn -> C_SListFold2Fn
wrap_SListFold2Fn Maybe (Ptr (FunPtr C_SListFold2Fn))
forall a. Maybe a
Nothing C_SListFold2Fn
cb
    C_SListFold2Fn -> IO (FunPtr C_SListFold2Fn)
mk_SListFold2Fn C_SListFold2Fn
cb' IO (FunPtr C_SListFold2Fn)
-> (FunPtr C_SListFold2Fn -> IO (GClosure C_SListFold2Fn))
-> IO (GClosure C_SListFold2Fn)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_SListFold2Fn -> IO (GClosure C_SListFold2Fn)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `SListFold2Fn` into a `C_SListFold2Fn`.
wrap_SListFold2Fn ::
    Maybe (Ptr (FunPtr C_SListFold2Fn)) ->
    SListFold2Fn ->
    C_SListFold2Fn
wrap_SListFold2Fn :: Maybe (Ptr (FunPtr C_SListFold2Fn))
-> C_SListFold2Fn -> C_SListFold2Fn
wrap_SListFold2Fn Maybe (Ptr (FunPtr C_SListFold2Fn))
funptrptr C_SListFold2Fn
_cb Ptr ()
item Ptr ()
a Ptr ()
b Ptr ()
c = do
    Ptr ()
result <- C_SListFold2Fn
_cb  Ptr ()
item Ptr ()
a Ptr ()
b Ptr ()
c
    Maybe (Ptr (FunPtr C_SListFold2Fn)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_SListFold2Fn))
funptrptr
    Ptr () -> IO (Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result


-- callback OperationBuildFn
{- Callable
  { returnType = Just (TBasicType TBoolean)
  , returnMayBeNull = False
  , returnTransfer = TransferNothing
  , returnDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , args =
      [ Arg
          { argCName = "object"
          , argType =
              TInterface Name { namespace = "Vips" , name = "Object" }
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      ]
  , skipReturn = False
  , callableThrows = False
  , callableDeprecated = Nothing
  , callableDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , callableResolvable = Nothing
  }
-}
-- | Type for the callback on the (unwrapped) C side.
type C_OperationBuildFn =
    Ptr Vips.Object.Object ->
    IO CInt

-- Args: [ Arg
--           { argCName = "object"
--           , argType =
--               TInterface Name { namespace = "Vips" , name = "Object" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_OperationBuildFn :: FunPtr C_OperationBuildFn -> C_OperationBuildFn

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_OperationBuildFn ::
    (B.CallStack.HasCallStack, MonadIO m, Vips.Object.IsObject a) =>
    FunPtr C_OperationBuildFn
    -> a
    -> m Bool
dynamic_OperationBuildFn :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsObject a) =>
FunPtr C_OperationBuildFn -> a -> m Bool
dynamic_OperationBuildFn FunPtr C_OperationBuildFn
__funPtr a
object = 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 Object
object' <- a -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
object
    CInt
result <- (FunPtr C_OperationBuildFn -> C_OperationBuildFn
__dynamic_C_OperationBuildFn FunPtr C_OperationBuildFn
__funPtr) Ptr Object
object'
    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
object
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

-- | Generate a function pointer callable from C code, from a `C_OperationBuildFn`.
foreign import ccall "wrapper"
    mk_OperationBuildFn :: C_OperationBuildFn -> IO (FunPtr C_OperationBuildFn)

-- | /No description available in the introspection data./
type OperationBuildFn =
    Vips.Object.Object
    -> IO Bool

-- | A convenience synonym for @`Nothing` :: `Maybe` `OperationBuildFn`@.
noOperationBuildFn :: Maybe OperationBuildFn
noOperationBuildFn :: Maybe OperationBuildFn
noOperationBuildFn = Maybe OperationBuildFn
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_OperationBuildFn :: MonadIO m => OperationBuildFn -> m (GClosure C_OperationBuildFn)
genClosure_OperationBuildFn :: forall (m :: * -> *).
MonadIO m =>
OperationBuildFn -> m (GClosure C_OperationBuildFn)
genClosure_OperationBuildFn OperationBuildFn
cb = IO (GClosure C_OperationBuildFn) -> m (GClosure C_OperationBuildFn)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_OperationBuildFn)
 -> m (GClosure C_OperationBuildFn))
-> IO (GClosure C_OperationBuildFn)
-> m (GClosure C_OperationBuildFn)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_OperationBuildFn
cb' = Maybe (Ptr (FunPtr C_OperationBuildFn))
-> OperationBuildFn -> C_OperationBuildFn
wrap_OperationBuildFn Maybe (Ptr (FunPtr C_OperationBuildFn))
forall a. Maybe a
Nothing OperationBuildFn
cb
    C_OperationBuildFn -> IO (FunPtr C_OperationBuildFn)
mk_OperationBuildFn C_OperationBuildFn
cb' IO (FunPtr C_OperationBuildFn)
-> (FunPtr C_OperationBuildFn -> IO (GClosure C_OperationBuildFn))
-> IO (GClosure C_OperationBuildFn)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_OperationBuildFn -> IO (GClosure C_OperationBuildFn)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `OperationBuildFn` into a `C_OperationBuildFn`.
wrap_OperationBuildFn ::
    Maybe (Ptr (FunPtr C_OperationBuildFn)) ->
    OperationBuildFn ->
    C_OperationBuildFn
wrap_OperationBuildFn :: Maybe (Ptr (FunPtr C_OperationBuildFn))
-> OperationBuildFn -> C_OperationBuildFn
wrap_OperationBuildFn Maybe (Ptr (FunPtr C_OperationBuildFn))
funptrptr OperationBuildFn
_cb Ptr Object
object = do
    Object
object' <- ((ManagedPtr Object -> Object) -> Ptr Object -> IO Object
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Object -> Object
Vips.Object.Object) Ptr Object
object
    Bool
result <- OperationBuildFn
_cb  Object
object'
    Maybe (Ptr (FunPtr C_OperationBuildFn)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_OperationBuildFn))
funptrptr
    let result' :: CInt
result' = (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
result
    CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


-- callback ObjectSetArguments
{- Callable
  { returnType = Just (TBasicType TPtr)
  , returnMayBeNull = True
  , returnTransfer = TransferNothing
  , returnDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , args =
      [ Arg
          { argCName = "object"
          , argType =
              TInterface Name { namespace = "Vips" , name = "Object" }
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "a"
          , argType = TBasicType TPtr
          , direction = DirectionIn
          , mayBeNull = True
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "b"
          , argType = TBasicType TPtr
          , direction = DirectionIn
          , mayBeNull = True
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      ]
  , skipReturn = False
  , callableThrows = False
  , callableDeprecated = Nothing
  , callableDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , callableResolvable = Nothing
  }
-}
-- | Type for the callback on the (unwrapped) C side.
type C_ObjectSetArguments =
    Ptr Vips.Object.Object ->
    Ptr () ->
    Ptr () ->
    IO (Ptr ())

-- Args: [ Arg
--           { argCName = "object"
--           , argType =
--               TInterface Name { namespace = "Vips" , name = "Object" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "a"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "b"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TPtr)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_ObjectSetArguments :: FunPtr C_ObjectSetArguments -> C_ObjectSetArguments

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_ObjectSetArguments ::
    (B.CallStack.HasCallStack, MonadIO m, Vips.Object.IsObject a) =>
    FunPtr C_ObjectSetArguments
    -> a
    -> Ptr ()
    -> Ptr ()
    -> m (Ptr ())
dynamic_ObjectSetArguments :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsObject a) =>
FunPtr C_ObjectSetArguments -> a -> Ptr () -> Ptr () -> m (Ptr ())
dynamic_ObjectSetArguments FunPtr C_ObjectSetArguments
__funPtr a
object Ptr ()
a Ptr ()
b = 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 Object
object' <- a -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
object
    Ptr ()
result <- (FunPtr C_ObjectSetArguments -> C_ObjectSetArguments
__dynamic_C_ObjectSetArguments FunPtr C_ObjectSetArguments
__funPtr) Ptr Object
object' Ptr ()
a Ptr ()
b
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
object
    Ptr () -> IO (Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result

-- | Generate a function pointer callable from C code, from a `C_ObjectSetArguments`.
foreign import ccall "wrapper"
    mk_ObjectSetArguments :: C_ObjectSetArguments -> IO (FunPtr C_ObjectSetArguments)

-- | /No description available in the introspection data./
type ObjectSetArguments =
    Vips.Object.Object
    -> Ptr ()
    -> Ptr ()
    -> IO (Ptr ())

-- | A convenience synonym for @`Nothing` :: `Maybe` `ObjectSetArguments`@.
noObjectSetArguments :: Maybe ObjectSetArguments
noObjectSetArguments :: Maybe ObjectSetArguments
noObjectSetArguments = Maybe ObjectSetArguments
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_ObjectSetArguments :: MonadIO m => ObjectSetArguments -> m (GClosure C_ObjectSetArguments)
genClosure_ObjectSetArguments :: forall (m :: * -> *).
MonadIO m =>
ObjectSetArguments -> m (GClosure C_ObjectSetArguments)
genClosure_ObjectSetArguments ObjectSetArguments
cb = IO (GClosure C_ObjectSetArguments)
-> m (GClosure C_ObjectSetArguments)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_ObjectSetArguments)
 -> m (GClosure C_ObjectSetArguments))
-> IO (GClosure C_ObjectSetArguments)
-> m (GClosure C_ObjectSetArguments)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_ObjectSetArguments
cb' = Maybe (Ptr (FunPtr C_ObjectSetArguments))
-> ObjectSetArguments -> C_ObjectSetArguments
wrap_ObjectSetArguments Maybe (Ptr (FunPtr C_ObjectSetArguments))
forall a. Maybe a
Nothing ObjectSetArguments
cb
    C_ObjectSetArguments -> IO (FunPtr C_ObjectSetArguments)
mk_ObjectSetArguments C_ObjectSetArguments
cb' IO (FunPtr C_ObjectSetArguments)
-> (FunPtr C_ObjectSetArguments
    -> IO (GClosure C_ObjectSetArguments))
-> IO (GClosure C_ObjectSetArguments)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ObjectSetArguments -> IO (GClosure C_ObjectSetArguments)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `ObjectSetArguments` into a `C_ObjectSetArguments`.
wrap_ObjectSetArguments ::
    Maybe (Ptr (FunPtr C_ObjectSetArguments)) ->
    ObjectSetArguments ->
    C_ObjectSetArguments
wrap_ObjectSetArguments :: Maybe (Ptr (FunPtr C_ObjectSetArguments))
-> ObjectSetArguments -> C_ObjectSetArguments
wrap_ObjectSetArguments Maybe (Ptr (FunPtr C_ObjectSetArguments))
funptrptr ObjectSetArguments
_cb Ptr Object
object Ptr ()
a Ptr ()
b = do
    Object
object' <- ((ManagedPtr Object -> Object) -> Ptr Object -> IO Object
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Object -> Object
Vips.Object.Object) Ptr Object
object
    Ptr ()
result <- ObjectSetArguments
_cb  Object
object' Ptr ()
a Ptr ()
b
    Maybe (Ptr (FunPtr C_ObjectSetArguments)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_ObjectSetArguments))
funptrptr
    Ptr () -> IO (Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result


-- callback ObjectClassRewindFieldCallback
{- Callable
  { returnType = Nothing
  , returnMayBeNull = False
  , returnTransfer = TransferNothing
  , returnDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , args =
      [ Arg
          { argCName = "object"
          , argType =
              TInterface Name { namespace = "Vips" , name = "Object" }
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      ]
  , skipReturn = False
  , callableThrows = False
  , callableDeprecated = Nothing
  , callableDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , callableResolvable = Nothing
  }
-}
-- | Type for the callback on the (unwrapped) C side.
type C_ObjectClassRewindFieldCallback =
    Ptr Vips.Object.Object ->
    IO ()

-- Args: [ Arg
--           { argCName = "object"
--           , argType =
--               TInterface Name { namespace = "Vips" , name = "Object" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_ObjectClassRewindFieldCallback :: FunPtr C_ObjectClassRewindFieldCallback -> C_ObjectClassRewindFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_ObjectClassRewindFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, Vips.Object.IsObject a) =>
    FunPtr C_ObjectClassRewindFieldCallback
    -> a
    -> m ()
dynamic_ObjectClassRewindFieldCallback :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsObject a) =>
FunPtr C_ObjectClassRewindFieldCallback -> a -> m ()
dynamic_ObjectClassRewindFieldCallback FunPtr C_ObjectClassRewindFieldCallback
__funPtr a
object = 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 Object
object' <- a -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
object
    (FunPtr C_ObjectClassRewindFieldCallback
-> C_ObjectClassRewindFieldCallback
__dynamic_C_ObjectClassRewindFieldCallback FunPtr C_ObjectClassRewindFieldCallback
__funPtr) Ptr Object
object'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
object
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

-- | Generate a function pointer callable from C code, from a `C_ObjectClassRewindFieldCallback`.
foreign import ccall "wrapper"
    mk_ObjectClassRewindFieldCallback :: C_ObjectClassRewindFieldCallback -> IO (FunPtr C_ObjectClassRewindFieldCallback)

-- | /No description available in the introspection data./
type ObjectClassRewindFieldCallback =
    Vips.Object.Object
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `ObjectClassRewindFieldCallback`@.
noObjectClassRewindFieldCallback :: Maybe ObjectClassRewindFieldCallback
noObjectClassRewindFieldCallback :: Maybe ObjectClassRewindFieldCallback
noObjectClassRewindFieldCallback = Maybe ObjectClassRewindFieldCallback
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_ObjectClassRewindFieldCallback :: MonadIO m => ObjectClassRewindFieldCallback -> m (GClosure C_ObjectClassRewindFieldCallback)
genClosure_ObjectClassRewindFieldCallback :: forall (m :: * -> *).
MonadIO m =>
ObjectClassRewindFieldCallback
-> m (GClosure C_ObjectClassRewindFieldCallback)
genClosure_ObjectClassRewindFieldCallback ObjectClassRewindFieldCallback
cb = IO (GClosure C_ObjectClassRewindFieldCallback)
-> m (GClosure C_ObjectClassRewindFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_ObjectClassRewindFieldCallback)
 -> m (GClosure C_ObjectClassRewindFieldCallback))
-> IO (GClosure C_ObjectClassRewindFieldCallback)
-> m (GClosure C_ObjectClassRewindFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_ObjectClassRewindFieldCallback
cb' = Maybe (Ptr (FunPtr C_ObjectClassRewindFieldCallback))
-> ObjectClassRewindFieldCallback
-> C_ObjectClassRewindFieldCallback
wrap_ObjectClassRewindFieldCallback Maybe (Ptr (FunPtr C_ObjectClassRewindFieldCallback))
forall a. Maybe a
Nothing ObjectClassRewindFieldCallback
cb
    C_ObjectClassRewindFieldCallback
-> IO (FunPtr C_ObjectClassRewindFieldCallback)
mk_ObjectClassRewindFieldCallback C_ObjectClassRewindFieldCallback
cb' IO (FunPtr C_ObjectClassRewindFieldCallback)
-> (FunPtr C_ObjectClassRewindFieldCallback
    -> IO (GClosure C_ObjectClassRewindFieldCallback))
-> IO (GClosure C_ObjectClassRewindFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ObjectClassRewindFieldCallback
-> IO (GClosure C_ObjectClassRewindFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `ObjectClassRewindFieldCallback` into a `C_ObjectClassRewindFieldCallback`.
wrap_ObjectClassRewindFieldCallback ::
    Maybe (Ptr (FunPtr C_ObjectClassRewindFieldCallback)) ->
    ObjectClassRewindFieldCallback ->
    C_ObjectClassRewindFieldCallback
wrap_ObjectClassRewindFieldCallback :: Maybe (Ptr (FunPtr C_ObjectClassRewindFieldCallback))
-> ObjectClassRewindFieldCallback
-> C_ObjectClassRewindFieldCallback
wrap_ObjectClassRewindFieldCallback Maybe (Ptr (FunPtr C_ObjectClassRewindFieldCallback))
funptrptr ObjectClassRewindFieldCallback
_cb Ptr Object
object = do
    Object
object' <- ((ManagedPtr Object -> Object) -> Ptr Object -> IO Object
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Object -> Object
Vips.Object.Object) Ptr Object
object
    ObjectClassRewindFieldCallback
_cb  Object
object'
    Maybe (Ptr (FunPtr C_ObjectClassRewindFieldCallback)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_ObjectClassRewindFieldCallback))
funptrptr


-- callback ObjectClassPrecloseFieldCallback
{- Callable
  { returnType = Nothing
  , returnMayBeNull = False
  , returnTransfer = TransferNothing
  , returnDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , args =
      [ Arg
          { argCName = "object"
          , argType =
              TInterface Name { namespace = "Vips" , name = "Object" }
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      ]
  , skipReturn = False
  , callableThrows = False
  , callableDeprecated = Nothing
  , callableDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , callableResolvable = Nothing
  }
-}
-- | Type for the callback on the (unwrapped) C side.
type C_ObjectClassPrecloseFieldCallback =
    Ptr Vips.Object.Object ->
    IO ()

-- Args: [ Arg
--           { argCName = "object"
--           , argType =
--               TInterface Name { namespace = "Vips" , name = "Object" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_ObjectClassPrecloseFieldCallback :: FunPtr C_ObjectClassPrecloseFieldCallback -> C_ObjectClassPrecloseFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_ObjectClassPrecloseFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, Vips.Object.IsObject a) =>
    FunPtr C_ObjectClassPrecloseFieldCallback
    -> a
    -> m ()
dynamic_ObjectClassPrecloseFieldCallback :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsObject a) =>
FunPtr C_ObjectClassRewindFieldCallback -> a -> m ()
dynamic_ObjectClassPrecloseFieldCallback FunPtr C_ObjectClassRewindFieldCallback
__funPtr a
object = 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 Object
object' <- a -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
object
    (FunPtr C_ObjectClassRewindFieldCallback
-> C_ObjectClassRewindFieldCallback
__dynamic_C_ObjectClassPrecloseFieldCallback FunPtr C_ObjectClassRewindFieldCallback
__funPtr) Ptr Object
object'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
object
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

-- | Generate a function pointer callable from C code, from a `C_ObjectClassPrecloseFieldCallback`.
foreign import ccall "wrapper"
    mk_ObjectClassPrecloseFieldCallback :: C_ObjectClassPrecloseFieldCallback -> IO (FunPtr C_ObjectClassPrecloseFieldCallback)

-- | /No description available in the introspection data./
type ObjectClassPrecloseFieldCallback =
    Vips.Object.Object
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `ObjectClassPrecloseFieldCallback`@.
noObjectClassPrecloseFieldCallback :: Maybe ObjectClassPrecloseFieldCallback
noObjectClassPrecloseFieldCallback :: Maybe ObjectClassRewindFieldCallback
noObjectClassPrecloseFieldCallback = Maybe ObjectClassRewindFieldCallback
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_ObjectClassPrecloseFieldCallback :: MonadIO m => ObjectClassPrecloseFieldCallback -> m (GClosure C_ObjectClassPrecloseFieldCallback)
genClosure_ObjectClassPrecloseFieldCallback :: forall (m :: * -> *).
MonadIO m =>
ObjectClassRewindFieldCallback
-> m (GClosure C_ObjectClassRewindFieldCallback)
genClosure_ObjectClassPrecloseFieldCallback ObjectClassRewindFieldCallback
cb = IO (GClosure C_ObjectClassRewindFieldCallback)
-> m (GClosure C_ObjectClassRewindFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_ObjectClassRewindFieldCallback)
 -> m (GClosure C_ObjectClassRewindFieldCallback))
-> IO (GClosure C_ObjectClassRewindFieldCallback)
-> m (GClosure C_ObjectClassRewindFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_ObjectClassRewindFieldCallback
cb' = Maybe (Ptr (FunPtr C_ObjectClassRewindFieldCallback))
-> ObjectClassRewindFieldCallback
-> C_ObjectClassRewindFieldCallback
wrap_ObjectClassPrecloseFieldCallback Maybe (Ptr (FunPtr C_ObjectClassRewindFieldCallback))
forall a. Maybe a
Nothing ObjectClassRewindFieldCallback
cb
    C_ObjectClassRewindFieldCallback
-> IO (FunPtr C_ObjectClassRewindFieldCallback)
mk_ObjectClassPrecloseFieldCallback C_ObjectClassRewindFieldCallback
cb' IO (FunPtr C_ObjectClassRewindFieldCallback)
-> (FunPtr C_ObjectClassRewindFieldCallback
    -> IO (GClosure C_ObjectClassRewindFieldCallback))
-> IO (GClosure C_ObjectClassRewindFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ObjectClassRewindFieldCallback
-> IO (GClosure C_ObjectClassRewindFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `ObjectClassPrecloseFieldCallback` into a `C_ObjectClassPrecloseFieldCallback`.
wrap_ObjectClassPrecloseFieldCallback ::
    Maybe (Ptr (FunPtr C_ObjectClassPrecloseFieldCallback)) ->
    ObjectClassPrecloseFieldCallback ->
    C_ObjectClassPrecloseFieldCallback
wrap_ObjectClassPrecloseFieldCallback :: Maybe (Ptr (FunPtr C_ObjectClassRewindFieldCallback))
-> ObjectClassRewindFieldCallback
-> C_ObjectClassRewindFieldCallback
wrap_ObjectClassPrecloseFieldCallback Maybe (Ptr (FunPtr C_ObjectClassRewindFieldCallback))
funptrptr ObjectClassRewindFieldCallback
_cb Ptr Object
object = do
    Object
object' <- ((ManagedPtr Object -> Object) -> Ptr Object -> IO Object
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Object -> Object
Vips.Object.Object) Ptr Object
object
    ObjectClassRewindFieldCallback
_cb  Object
object'
    Maybe (Ptr (FunPtr C_ObjectClassRewindFieldCallback)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_ObjectClassRewindFieldCallback))
funptrptr


-- callback ObjectClassPostcloseFieldCallback
{- Callable
  { returnType = Nothing
  , returnMayBeNull = False
  , returnTransfer = TransferNothing
  , returnDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , args =
      [ Arg
          { argCName = "object"
          , argType =
              TInterface Name { namespace = "Vips" , name = "Object" }
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      ]
  , skipReturn = False
  , callableThrows = False
  , callableDeprecated = Nothing
  , callableDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , callableResolvable = Nothing
  }
-}
-- | Type for the callback on the (unwrapped) C side.
type C_ObjectClassPostcloseFieldCallback =
    Ptr Vips.Object.Object ->
    IO ()

-- Args: [ Arg
--           { argCName = "object"
--           , argType =
--               TInterface Name { namespace = "Vips" , name = "Object" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_ObjectClassPostcloseFieldCallback :: FunPtr C_ObjectClassPostcloseFieldCallback -> C_ObjectClassPostcloseFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_ObjectClassPostcloseFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, Vips.Object.IsObject a) =>
    FunPtr C_ObjectClassPostcloseFieldCallback
    -> a
    -> m ()
dynamic_ObjectClassPostcloseFieldCallback :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsObject a) =>
FunPtr C_ObjectClassRewindFieldCallback -> a -> m ()
dynamic_ObjectClassPostcloseFieldCallback FunPtr C_ObjectClassRewindFieldCallback
__funPtr a
object = 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 Object
object' <- a -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
object
    (FunPtr C_ObjectClassRewindFieldCallback
-> C_ObjectClassRewindFieldCallback
__dynamic_C_ObjectClassPostcloseFieldCallback FunPtr C_ObjectClassRewindFieldCallback
__funPtr) Ptr Object
object'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
object
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

-- | Generate a function pointer callable from C code, from a `C_ObjectClassPostcloseFieldCallback`.
foreign import ccall "wrapper"
    mk_ObjectClassPostcloseFieldCallback :: C_ObjectClassPostcloseFieldCallback -> IO (FunPtr C_ObjectClassPostcloseFieldCallback)

-- | /No description available in the introspection data./
type ObjectClassPostcloseFieldCallback =
    Vips.Object.Object
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `ObjectClassPostcloseFieldCallback`@.
noObjectClassPostcloseFieldCallback :: Maybe ObjectClassPostcloseFieldCallback
noObjectClassPostcloseFieldCallback :: Maybe ObjectClassRewindFieldCallback
noObjectClassPostcloseFieldCallback = Maybe ObjectClassRewindFieldCallback
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_ObjectClassPostcloseFieldCallback :: MonadIO m => ObjectClassPostcloseFieldCallback -> m (GClosure C_ObjectClassPostcloseFieldCallback)
genClosure_ObjectClassPostcloseFieldCallback :: forall (m :: * -> *).
MonadIO m =>
ObjectClassRewindFieldCallback
-> m (GClosure C_ObjectClassRewindFieldCallback)
genClosure_ObjectClassPostcloseFieldCallback ObjectClassRewindFieldCallback
cb = IO (GClosure C_ObjectClassRewindFieldCallback)
-> m (GClosure C_ObjectClassRewindFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_ObjectClassRewindFieldCallback)
 -> m (GClosure C_ObjectClassRewindFieldCallback))
-> IO (GClosure C_ObjectClassRewindFieldCallback)
-> m (GClosure C_ObjectClassRewindFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_ObjectClassRewindFieldCallback
cb' = Maybe (Ptr (FunPtr C_ObjectClassRewindFieldCallback))
-> ObjectClassRewindFieldCallback
-> C_ObjectClassRewindFieldCallback
wrap_ObjectClassPostcloseFieldCallback Maybe (Ptr (FunPtr C_ObjectClassRewindFieldCallback))
forall a. Maybe a
Nothing ObjectClassRewindFieldCallback
cb
    C_ObjectClassRewindFieldCallback
-> IO (FunPtr C_ObjectClassRewindFieldCallback)
mk_ObjectClassPostcloseFieldCallback C_ObjectClassRewindFieldCallback
cb' IO (FunPtr C_ObjectClassRewindFieldCallback)
-> (FunPtr C_ObjectClassRewindFieldCallback
    -> IO (GClosure C_ObjectClassRewindFieldCallback))
-> IO (GClosure C_ObjectClassRewindFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ObjectClassRewindFieldCallback
-> IO (GClosure C_ObjectClassRewindFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `ObjectClassPostcloseFieldCallback` into a `C_ObjectClassPostcloseFieldCallback`.
wrap_ObjectClassPostcloseFieldCallback ::
    Maybe (Ptr (FunPtr C_ObjectClassPostcloseFieldCallback)) ->
    ObjectClassPostcloseFieldCallback ->
    C_ObjectClassPostcloseFieldCallback
wrap_ObjectClassPostcloseFieldCallback :: Maybe (Ptr (FunPtr C_ObjectClassRewindFieldCallback))
-> ObjectClassRewindFieldCallback
-> C_ObjectClassRewindFieldCallback
wrap_ObjectClassPostcloseFieldCallback Maybe (Ptr (FunPtr C_ObjectClassRewindFieldCallback))
funptrptr ObjectClassRewindFieldCallback
_cb Ptr Object
object = do
    Object
object' <- ((ManagedPtr Object -> Object) -> Ptr Object -> IO Object
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Object -> Object
Vips.Object.Object) Ptr Object
object
    ObjectClassRewindFieldCallback
_cb  Object
object'
    Maybe (Ptr (FunPtr C_ObjectClassRewindFieldCallback)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_ObjectClassRewindFieldCallback))
funptrptr


-- callback ObjectClassPostbuildFieldCallback
{- Callable
  { returnType = Just (TBasicType TInt)
  , returnMayBeNull = False
  , returnTransfer = TransferNothing
  , returnDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , args =
      [ Arg
          { argCName = "object"
          , argType =
              TInterface Name { namespace = "Vips" , name = "Object" }
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      ]
  , skipReturn = False
  , callableThrows = False
  , callableDeprecated = Nothing
  , callableDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , callableResolvable = Nothing
  }
-}
-- | Type for the callback on the (unwrapped) C side.
type C_ObjectClassPostbuildFieldCallback =
    Ptr Vips.Object.Object ->
    IO Int32

-- Args: [ Arg
--           { argCName = "object"
--           , argType =
--               TInterface Name { namespace = "Vips" , name = "Object" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_ObjectClassPostbuildFieldCallback :: FunPtr C_ObjectClassPostbuildFieldCallback -> C_ObjectClassPostbuildFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_ObjectClassPostbuildFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, Vips.Object.IsObject a) =>
    FunPtr C_ObjectClassPostbuildFieldCallback
    -> a
    -> m Int32
dynamic_ObjectClassPostbuildFieldCallback :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsObject a) =>
FunPtr C_ObjectClassPostbuildFieldCallback -> a -> m Int32
dynamic_ObjectClassPostbuildFieldCallback FunPtr C_ObjectClassPostbuildFieldCallback
__funPtr a
object = 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 Object
object' <- a -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
object
    Int32
result <- (FunPtr C_ObjectClassPostbuildFieldCallback
-> C_ObjectClassPostbuildFieldCallback
__dynamic_C_ObjectClassPostbuildFieldCallback FunPtr C_ObjectClassPostbuildFieldCallback
__funPtr) Ptr Object
object'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
object
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

-- | Generate a function pointer callable from C code, from a `C_ObjectClassPostbuildFieldCallback`.
foreign import ccall "wrapper"
    mk_ObjectClassPostbuildFieldCallback :: C_ObjectClassPostbuildFieldCallback -> IO (FunPtr C_ObjectClassPostbuildFieldCallback)

-- | /No description available in the introspection data./
type ObjectClassPostbuildFieldCallback =
    Vips.Object.Object
    -> IO Int32

-- | A convenience synonym for @`Nothing` :: `Maybe` `ObjectClassPostbuildFieldCallback`@.
noObjectClassPostbuildFieldCallback :: Maybe ObjectClassPostbuildFieldCallback
noObjectClassPostbuildFieldCallback :: Maybe ObjectClassPostbuildFieldCallback
noObjectClassPostbuildFieldCallback = Maybe ObjectClassPostbuildFieldCallback
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_ObjectClassPostbuildFieldCallback :: MonadIO m => ObjectClassPostbuildFieldCallback -> m (GClosure C_ObjectClassPostbuildFieldCallback)
genClosure_ObjectClassPostbuildFieldCallback :: forall (m :: * -> *).
MonadIO m =>
ObjectClassPostbuildFieldCallback
-> m (GClosure C_ObjectClassPostbuildFieldCallback)
genClosure_ObjectClassPostbuildFieldCallback ObjectClassPostbuildFieldCallback
cb = IO (GClosure C_ObjectClassPostbuildFieldCallback)
-> m (GClosure C_ObjectClassPostbuildFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_ObjectClassPostbuildFieldCallback)
 -> m (GClosure C_ObjectClassPostbuildFieldCallback))
-> IO (GClosure C_ObjectClassPostbuildFieldCallback)
-> m (GClosure C_ObjectClassPostbuildFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_ObjectClassPostbuildFieldCallback
cb' = Maybe (Ptr (FunPtr C_ObjectClassPostbuildFieldCallback))
-> ObjectClassPostbuildFieldCallback
-> C_ObjectClassPostbuildFieldCallback
wrap_ObjectClassPostbuildFieldCallback Maybe (Ptr (FunPtr C_ObjectClassPostbuildFieldCallback))
forall a. Maybe a
Nothing ObjectClassPostbuildFieldCallback
cb
    C_ObjectClassPostbuildFieldCallback
-> IO (FunPtr C_ObjectClassPostbuildFieldCallback)
mk_ObjectClassPostbuildFieldCallback C_ObjectClassPostbuildFieldCallback
cb' IO (FunPtr C_ObjectClassPostbuildFieldCallback)
-> (FunPtr C_ObjectClassPostbuildFieldCallback
    -> IO (GClosure C_ObjectClassPostbuildFieldCallback))
-> IO (GClosure C_ObjectClassPostbuildFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ObjectClassPostbuildFieldCallback
-> IO (GClosure C_ObjectClassPostbuildFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `ObjectClassPostbuildFieldCallback` into a `C_ObjectClassPostbuildFieldCallback`.
wrap_ObjectClassPostbuildFieldCallback ::
    Maybe (Ptr (FunPtr C_ObjectClassPostbuildFieldCallback)) ->
    ObjectClassPostbuildFieldCallback ->
    C_ObjectClassPostbuildFieldCallback
wrap_ObjectClassPostbuildFieldCallback :: Maybe (Ptr (FunPtr C_ObjectClassPostbuildFieldCallback))
-> ObjectClassPostbuildFieldCallback
-> C_ObjectClassPostbuildFieldCallback
wrap_ObjectClassPostbuildFieldCallback Maybe (Ptr (FunPtr C_ObjectClassPostbuildFieldCallback))
funptrptr ObjectClassPostbuildFieldCallback
_cb Ptr Object
object = do
    Object
object' <- ((ManagedPtr Object -> Object) -> Ptr Object -> IO Object
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Object -> Object
Vips.Object.Object) Ptr Object
object
    Int32
result <- ObjectClassPostbuildFieldCallback
_cb  Object
object'
    Maybe (Ptr (FunPtr C_ObjectClassPostbuildFieldCallback)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_ObjectClassPostbuildFieldCallback))
funptrptr
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- callback ObjectClassOutputToArgFieldCallback
{- Callable
  { returnType = Just (TBasicType TInt)
  , returnMayBeNull = False
  , returnTransfer = TransferNothing
  , returnDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , args =
      [ Arg
          { argCName = "object"
          , argType =
              TInterface Name { namespace = "Vips" , name = "Object" }
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "string"
          , argType = TBasicType TUTF8
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      ]
  , skipReturn = False
  , callableThrows = False
  , callableDeprecated = Nothing
  , callableDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , callableResolvable = Nothing
  }
-}
-- | Type for the callback on the (unwrapped) C side.
type C_ObjectClassOutputToArgFieldCallback =
    Ptr Vips.Object.Object ->
    CString ->
    IO Int32

-- Args: [ Arg
--           { argCName = "object"
--           , argType =
--               TInterface Name { namespace = "Vips" , name = "Object" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "string"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_ObjectClassOutputToArgFieldCallback :: FunPtr C_ObjectClassOutputToArgFieldCallback -> C_ObjectClassOutputToArgFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_ObjectClassOutputToArgFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, Vips.Object.IsObject a) =>
    FunPtr C_ObjectClassOutputToArgFieldCallback
    -> a
    -> T.Text
    -> m Int32
dynamic_ObjectClassOutputToArgFieldCallback :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsObject a) =>
FunPtr C_ObjectClassOutputToArgFieldCallback
-> a -> Text -> m Int32
dynamic_ObjectClassOutputToArgFieldCallback FunPtr C_ObjectClassOutputToArgFieldCallback
__funPtr a
object Text
string = 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 Object
object' <- a -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
object
    CString
string' <- Text -> IO CString
textToCString Text
string
    Int32
result <- (FunPtr C_ObjectClassOutputToArgFieldCallback
-> C_ObjectClassOutputToArgFieldCallback
__dynamic_C_ObjectClassOutputToArgFieldCallback FunPtr C_ObjectClassOutputToArgFieldCallback
__funPtr) Ptr Object
object' CString
string'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
object
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
string'
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

-- | Generate a function pointer callable from C code, from a `C_ObjectClassOutputToArgFieldCallback`.
foreign import ccall "wrapper"
    mk_ObjectClassOutputToArgFieldCallback :: C_ObjectClassOutputToArgFieldCallback -> IO (FunPtr C_ObjectClassOutputToArgFieldCallback)

-- | /No description available in the introspection data./
type ObjectClassOutputToArgFieldCallback =
    Vips.Object.Object
    -> T.Text
    -> IO Int32

-- | A convenience synonym for @`Nothing` :: `Maybe` `ObjectClassOutputToArgFieldCallback`@.
noObjectClassOutputToArgFieldCallback :: Maybe ObjectClassOutputToArgFieldCallback
noObjectClassOutputToArgFieldCallback :: Maybe ObjectClassOutputToArgFieldCallback
noObjectClassOutputToArgFieldCallback = Maybe ObjectClassOutputToArgFieldCallback
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_ObjectClassOutputToArgFieldCallback :: MonadIO m => ObjectClassOutputToArgFieldCallback -> m (GClosure C_ObjectClassOutputToArgFieldCallback)
genClosure_ObjectClassOutputToArgFieldCallback :: forall (m :: * -> *).
MonadIO m =>
ObjectClassOutputToArgFieldCallback
-> m (GClosure C_ObjectClassOutputToArgFieldCallback)
genClosure_ObjectClassOutputToArgFieldCallback ObjectClassOutputToArgFieldCallback
cb = IO (GClosure C_ObjectClassOutputToArgFieldCallback)
-> m (GClosure C_ObjectClassOutputToArgFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_ObjectClassOutputToArgFieldCallback)
 -> m (GClosure C_ObjectClassOutputToArgFieldCallback))
-> IO (GClosure C_ObjectClassOutputToArgFieldCallback)
-> m (GClosure C_ObjectClassOutputToArgFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_ObjectClassOutputToArgFieldCallback
cb' = Maybe (Ptr (FunPtr C_ObjectClassOutputToArgFieldCallback))
-> ObjectClassOutputToArgFieldCallback
-> C_ObjectClassOutputToArgFieldCallback
wrap_ObjectClassOutputToArgFieldCallback Maybe (Ptr (FunPtr C_ObjectClassOutputToArgFieldCallback))
forall a. Maybe a
Nothing ObjectClassOutputToArgFieldCallback
cb
    C_ObjectClassOutputToArgFieldCallback
-> IO (FunPtr C_ObjectClassOutputToArgFieldCallback)
mk_ObjectClassOutputToArgFieldCallback C_ObjectClassOutputToArgFieldCallback
cb' IO (FunPtr C_ObjectClassOutputToArgFieldCallback)
-> (FunPtr C_ObjectClassOutputToArgFieldCallback
    -> IO (GClosure C_ObjectClassOutputToArgFieldCallback))
-> IO (GClosure C_ObjectClassOutputToArgFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ObjectClassOutputToArgFieldCallback
-> IO (GClosure C_ObjectClassOutputToArgFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `ObjectClassOutputToArgFieldCallback` into a `C_ObjectClassOutputToArgFieldCallback`.
wrap_ObjectClassOutputToArgFieldCallback ::
    Maybe (Ptr (FunPtr C_ObjectClassOutputToArgFieldCallback)) ->
    ObjectClassOutputToArgFieldCallback ->
    C_ObjectClassOutputToArgFieldCallback
wrap_ObjectClassOutputToArgFieldCallback :: Maybe (Ptr (FunPtr C_ObjectClassOutputToArgFieldCallback))
-> ObjectClassOutputToArgFieldCallback
-> C_ObjectClassOutputToArgFieldCallback
wrap_ObjectClassOutputToArgFieldCallback Maybe (Ptr (FunPtr C_ObjectClassOutputToArgFieldCallback))
funptrptr ObjectClassOutputToArgFieldCallback
_cb Ptr Object
object CString
string = do
    Object
object' <- ((ManagedPtr Object -> Object) -> Ptr Object -> IO Object
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Object -> Object
Vips.Object.Object) Ptr Object
object
    Text
string' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
string
    Int32
result <- ObjectClassOutputToArgFieldCallback
_cb  Object
object' Text
string'
    Maybe (Ptr (FunPtr C_ObjectClassOutputToArgFieldCallback)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_ObjectClassOutputToArgFieldCallback))
funptrptr
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- callback ObjectClassCloseFieldCallback
{- Callable
  { returnType = Nothing
  , returnMayBeNull = False
  , returnTransfer = TransferNothing
  , returnDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , args =
      [ Arg
          { argCName = "object"
          , argType =
              TInterface Name { namespace = "Vips" , name = "Object" }
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      ]
  , skipReturn = False
  , callableThrows = False
  , callableDeprecated = Nothing
  , callableDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , callableResolvable = Nothing
  }
-}
-- | Type for the callback on the (unwrapped) C side.
type C_ObjectClassCloseFieldCallback =
    Ptr Vips.Object.Object ->
    IO ()

-- Args: [ Arg
--           { argCName = "object"
--           , argType =
--               TInterface Name { namespace = "Vips" , name = "Object" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_ObjectClassCloseFieldCallback :: FunPtr C_ObjectClassCloseFieldCallback -> C_ObjectClassCloseFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_ObjectClassCloseFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, Vips.Object.IsObject a) =>
    FunPtr C_ObjectClassCloseFieldCallback
    -> a
    -> m ()
dynamic_ObjectClassCloseFieldCallback :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsObject a) =>
FunPtr C_ObjectClassRewindFieldCallback -> a -> m ()
dynamic_ObjectClassCloseFieldCallback FunPtr C_ObjectClassRewindFieldCallback
__funPtr a
object = 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 Object
object' <- a -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
object
    (FunPtr C_ObjectClassRewindFieldCallback
-> C_ObjectClassRewindFieldCallback
__dynamic_C_ObjectClassCloseFieldCallback FunPtr C_ObjectClassRewindFieldCallback
__funPtr) Ptr Object
object'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
object
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

-- | Generate a function pointer callable from C code, from a `C_ObjectClassCloseFieldCallback`.
foreign import ccall "wrapper"
    mk_ObjectClassCloseFieldCallback :: C_ObjectClassCloseFieldCallback -> IO (FunPtr C_ObjectClassCloseFieldCallback)

-- | /No description available in the introspection data./
type ObjectClassCloseFieldCallback =
    Vips.Object.Object
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `ObjectClassCloseFieldCallback`@.
noObjectClassCloseFieldCallback :: Maybe ObjectClassCloseFieldCallback
noObjectClassCloseFieldCallback :: Maybe ObjectClassRewindFieldCallback
noObjectClassCloseFieldCallback = Maybe ObjectClassRewindFieldCallback
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_ObjectClassCloseFieldCallback :: MonadIO m => ObjectClassCloseFieldCallback -> m (GClosure C_ObjectClassCloseFieldCallback)
genClosure_ObjectClassCloseFieldCallback :: forall (m :: * -> *).
MonadIO m =>
ObjectClassRewindFieldCallback
-> m (GClosure C_ObjectClassRewindFieldCallback)
genClosure_ObjectClassCloseFieldCallback ObjectClassRewindFieldCallback
cb = IO (GClosure C_ObjectClassRewindFieldCallback)
-> m (GClosure C_ObjectClassRewindFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_ObjectClassRewindFieldCallback)
 -> m (GClosure C_ObjectClassRewindFieldCallback))
-> IO (GClosure C_ObjectClassRewindFieldCallback)
-> m (GClosure C_ObjectClassRewindFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_ObjectClassRewindFieldCallback
cb' = Maybe (Ptr (FunPtr C_ObjectClassRewindFieldCallback))
-> ObjectClassRewindFieldCallback
-> C_ObjectClassRewindFieldCallback
wrap_ObjectClassCloseFieldCallback Maybe (Ptr (FunPtr C_ObjectClassRewindFieldCallback))
forall a. Maybe a
Nothing ObjectClassRewindFieldCallback
cb
    C_ObjectClassRewindFieldCallback
-> IO (FunPtr C_ObjectClassRewindFieldCallback)
mk_ObjectClassCloseFieldCallback C_ObjectClassRewindFieldCallback
cb' IO (FunPtr C_ObjectClassRewindFieldCallback)
-> (FunPtr C_ObjectClassRewindFieldCallback
    -> IO (GClosure C_ObjectClassRewindFieldCallback))
-> IO (GClosure C_ObjectClassRewindFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ObjectClassRewindFieldCallback
-> IO (GClosure C_ObjectClassRewindFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `ObjectClassCloseFieldCallback` into a `C_ObjectClassCloseFieldCallback`.
wrap_ObjectClassCloseFieldCallback ::
    Maybe (Ptr (FunPtr C_ObjectClassCloseFieldCallback)) ->
    ObjectClassCloseFieldCallback ->
    C_ObjectClassCloseFieldCallback
wrap_ObjectClassCloseFieldCallback :: Maybe (Ptr (FunPtr C_ObjectClassRewindFieldCallback))
-> ObjectClassRewindFieldCallback
-> C_ObjectClassRewindFieldCallback
wrap_ObjectClassCloseFieldCallback Maybe (Ptr (FunPtr C_ObjectClassRewindFieldCallback))
funptrptr ObjectClassRewindFieldCallback
_cb Ptr Object
object = do
    Object
object' <- ((ManagedPtr Object -> Object) -> Ptr Object -> IO Object
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Object -> Object
Vips.Object.Object) Ptr Object
object
    ObjectClassRewindFieldCallback
_cb  Object
object'
    Maybe (Ptr (FunPtr C_ObjectClassRewindFieldCallback)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_ObjectClassRewindFieldCallback))
funptrptr


-- callback ObjectClassBuildFieldCallback
{- Callable
  { returnType = Just (TBasicType TInt)
  , returnMayBeNull = False
  , returnTransfer = TransferNothing
  , returnDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , args =
      [ Arg
          { argCName = "object"
          , argType =
              TInterface Name { namespace = "Vips" , name = "Object" }
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      ]
  , skipReturn = False
  , callableThrows = False
  , callableDeprecated = Nothing
  , callableDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , callableResolvable = Nothing
  }
-}
-- | Type for the callback on the (unwrapped) C side.
type C_ObjectClassBuildFieldCallback =
    Ptr Vips.Object.Object ->
    IO Int32

-- Args: [ Arg
--           { argCName = "object"
--           , argType =
--               TInterface Name { namespace = "Vips" , name = "Object" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_ObjectClassBuildFieldCallback :: FunPtr C_ObjectClassBuildFieldCallback -> C_ObjectClassBuildFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_ObjectClassBuildFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, Vips.Object.IsObject a) =>
    FunPtr C_ObjectClassBuildFieldCallback
    -> a
    -> m Int32
dynamic_ObjectClassBuildFieldCallback :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsObject a) =>
FunPtr C_ObjectClassPostbuildFieldCallback -> a -> m Int32
dynamic_ObjectClassBuildFieldCallback FunPtr C_ObjectClassPostbuildFieldCallback
__funPtr a
object = 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 Object
object' <- a -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
object
    Int32
result <- (FunPtr C_ObjectClassPostbuildFieldCallback
-> C_ObjectClassPostbuildFieldCallback
__dynamic_C_ObjectClassBuildFieldCallback FunPtr C_ObjectClassPostbuildFieldCallback
__funPtr) Ptr Object
object'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
object
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

-- | Generate a function pointer callable from C code, from a `C_ObjectClassBuildFieldCallback`.
foreign import ccall "wrapper"
    mk_ObjectClassBuildFieldCallback :: C_ObjectClassBuildFieldCallback -> IO (FunPtr C_ObjectClassBuildFieldCallback)

-- | /No description available in the introspection data./
type ObjectClassBuildFieldCallback =
    Vips.Object.Object
    -> IO Int32

-- | A convenience synonym for @`Nothing` :: `Maybe` `ObjectClassBuildFieldCallback`@.
noObjectClassBuildFieldCallback :: Maybe ObjectClassBuildFieldCallback
noObjectClassBuildFieldCallback :: Maybe ObjectClassPostbuildFieldCallback
noObjectClassBuildFieldCallback = Maybe ObjectClassPostbuildFieldCallback
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_ObjectClassBuildFieldCallback :: MonadIO m => ObjectClassBuildFieldCallback -> m (GClosure C_ObjectClassBuildFieldCallback)
genClosure_ObjectClassBuildFieldCallback :: forall (m :: * -> *).
MonadIO m =>
ObjectClassPostbuildFieldCallback
-> m (GClosure C_ObjectClassPostbuildFieldCallback)
genClosure_ObjectClassBuildFieldCallback ObjectClassPostbuildFieldCallback
cb = IO (GClosure C_ObjectClassPostbuildFieldCallback)
-> m (GClosure C_ObjectClassPostbuildFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_ObjectClassPostbuildFieldCallback)
 -> m (GClosure C_ObjectClassPostbuildFieldCallback))
-> IO (GClosure C_ObjectClassPostbuildFieldCallback)
-> m (GClosure C_ObjectClassPostbuildFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_ObjectClassPostbuildFieldCallback
cb' = Maybe (Ptr (FunPtr C_ObjectClassPostbuildFieldCallback))
-> ObjectClassPostbuildFieldCallback
-> C_ObjectClassPostbuildFieldCallback
wrap_ObjectClassBuildFieldCallback Maybe (Ptr (FunPtr C_ObjectClassPostbuildFieldCallback))
forall a. Maybe a
Nothing ObjectClassPostbuildFieldCallback
cb
    C_ObjectClassPostbuildFieldCallback
-> IO (FunPtr C_ObjectClassPostbuildFieldCallback)
mk_ObjectClassBuildFieldCallback C_ObjectClassPostbuildFieldCallback
cb' IO (FunPtr C_ObjectClassPostbuildFieldCallback)
-> (FunPtr C_ObjectClassPostbuildFieldCallback
    -> IO (GClosure C_ObjectClassPostbuildFieldCallback))
-> IO (GClosure C_ObjectClassPostbuildFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ObjectClassPostbuildFieldCallback
-> IO (GClosure C_ObjectClassPostbuildFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `ObjectClassBuildFieldCallback` into a `C_ObjectClassBuildFieldCallback`.
wrap_ObjectClassBuildFieldCallback ::
    Maybe (Ptr (FunPtr C_ObjectClassBuildFieldCallback)) ->
    ObjectClassBuildFieldCallback ->
    C_ObjectClassBuildFieldCallback
wrap_ObjectClassBuildFieldCallback :: Maybe (Ptr (FunPtr C_ObjectClassPostbuildFieldCallback))
-> ObjectClassPostbuildFieldCallback
-> C_ObjectClassPostbuildFieldCallback
wrap_ObjectClassBuildFieldCallback Maybe (Ptr (FunPtr C_ObjectClassPostbuildFieldCallback))
funptrptr ObjectClassPostbuildFieldCallback
_cb Ptr Object
object = do
    Object
object' <- ((ManagedPtr Object -> Object) -> Ptr Object -> IO Object
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Object -> Object
Vips.Object.Object) Ptr Object
object
    Int32
result <- ObjectClassPostbuildFieldCallback
_cb  Object
object'
    Maybe (Ptr (FunPtr C_ObjectClassPostbuildFieldCallback)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_ObjectClassPostbuildFieldCallback))
funptrptr
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- callback InterpolateMethod
{- Callable
  { returnType = Nothing
  , returnMayBeNull = False
  , returnTransfer = TransferNothing
  , returnDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , args =
      [ Arg
          { argCName = "interpolate"
          , argType =
              TInterface Name { namespace = "Vips" , name = "Interpolate" }
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation
                { rawDocText = Just "the interpolator" , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "out"
          , argType = TBasicType TPtr
          , direction = DirectionIn
          , mayBeNull = True
          , argDoc =
              Documentation
                { rawDocText = Just "write the interpolated pixel here"
                , sinceVersion = Nothing
                }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "in"
          , argType =
              TInterface Name { namespace = "Vips" , name = "Region" }
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation
                { rawDocText = Just "read source pixels from here"
                , sinceVersion = Nothing
                }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "x"
          , argType = TBasicType TDouble
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation
                { rawDocText = Just "interpolate value at this position"
                , sinceVersion = Nothing
                }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "y"
          , argType = TBasicType TDouble
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation
                { rawDocText = Just "interpolate value at this position"
                , sinceVersion = Nothing
                }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      ]
  , skipReturn = False
  , callableThrows = False
  , callableDeprecated = Nothing
  , callableDocumentation =
      Documentation
        { rawDocText =
            Just
              "An interpolation function. It should read source pixels from @in with\nVIPS_REGION_ADDR(), it can look left and up from (x, y) by @window_offset\npixels and it can access pixels in a window of size @window_size.\n\nThe interpolated value should be written to the pixel pointed to by @out.\n\nSee also: #VipsInterpolateClass."
        , sinceVersion = Nothing
        }
  , callableResolvable = Nothing
  }
-}
-- | Type for the callback on the (unwrapped) C side.
type C_InterpolateMethod =
    Ptr Vips.Interpolate.Interpolate ->
    Ptr () ->
    Ptr Vips.Region.Region ->
    CDouble ->
    CDouble ->
    IO ()

-- Args: [ Arg
--           { argCName = "interpolate"
--           , argType =
--               TInterface Name { namespace = "Vips" , name = "Interpolate" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the interpolator" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "out"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "write the interpolated pixel here"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "in"
--           , argType =
--               TInterface Name { namespace = "Vips" , name = "Region" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "read source pixels from here"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "x"
--           , argType = TBasicType TDouble
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "interpolate value at this position"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "y"
--           , argType = TBasicType TDouble
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "interpolate value at this position"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_InterpolateMethod :: FunPtr C_InterpolateMethod -> C_InterpolateMethod

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_InterpolateMethod ::
    (B.CallStack.HasCallStack, MonadIO m, Vips.Interpolate.IsInterpolate a, Vips.Region.IsRegion b) =>
    FunPtr C_InterpolateMethod
    -> a
    -- ^ /@interpolate@/: the interpolator
    -> Ptr ()
    -- ^ /@out@/: write the interpolated pixel here
    -> b
    -- ^ /@in@/: read source pixels from here
    -> Double
    -- ^ /@x@/: interpolate value at this position
    -> Double
    -- ^ /@y@/: interpolate value at this position
    -> m ()
dynamic_InterpolateMethod :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsInterpolate a, IsRegion b) =>
FunPtr C_InterpolateMethod
-> a -> Ptr () -> b -> Double -> Double -> m ()
dynamic_InterpolateMethod FunPtr C_InterpolateMethod
__funPtr a
interpolate Ptr ()
out b
in_ Double
x Double
y = 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 Interpolate
interpolate' <- a -> IO (Ptr Interpolate)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
interpolate
    Ptr Region
in_' <- b -> IO (Ptr Region)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
in_
    let x' :: CDouble
x' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
x
    let y' :: CDouble
y' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
y
    (FunPtr C_InterpolateMethod -> C_InterpolateMethod
__dynamic_C_InterpolateMethod FunPtr C_InterpolateMethod
__funPtr) Ptr Interpolate
interpolate' Ptr ()
out Ptr Region
in_' CDouble
x' CDouble
y'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
interpolate
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
in_
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

-- | Generate a function pointer callable from C code, from a `C_InterpolateMethod`.
foreign import ccall "wrapper"
    mk_InterpolateMethod :: C_InterpolateMethod -> IO (FunPtr C_InterpolateMethod)

-- | An interpolation function. It should read source pixels from /@in@/ with
-- @/VIPS_REGION_ADDR()/@, it can look left and up from (x, y) by /@windowOffset@/
-- pixels and it can access pixels in a window of size /@windowSize@/.
-- 
-- The interpolated value should be written to the pixel pointed to by /@out@/.
-- 
-- See also: t'GI.Vips.Structs.InterpolateClass.InterpolateClass'.
type InterpolateMethod =
    Vips.Interpolate.Interpolate
    -- ^ /@interpolate@/: the interpolator
    -> Ptr ()
    -- ^ /@out@/: write the interpolated pixel here
    -> Vips.Region.Region
    -- ^ /@in@/: read source pixels from here
    -> Double
    -- ^ /@x@/: interpolate value at this position
    -> Double
    -- ^ /@y@/: interpolate value at this position
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `InterpolateMethod`@.
noInterpolateMethod :: Maybe InterpolateMethod
noInterpolateMethod :: Maybe InterpolateMethod
noInterpolateMethod = Maybe InterpolateMethod
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_InterpolateMethod :: MonadIO m => InterpolateMethod -> m (GClosure C_InterpolateMethod)
genClosure_InterpolateMethod :: forall (m :: * -> *).
MonadIO m =>
InterpolateMethod -> m (GClosure C_InterpolateMethod)
genClosure_InterpolateMethod InterpolateMethod
cb = IO (GClosure C_InterpolateMethod)
-> m (GClosure C_InterpolateMethod)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_InterpolateMethod)
 -> m (GClosure C_InterpolateMethod))
-> IO (GClosure C_InterpolateMethod)
-> m (GClosure C_InterpolateMethod)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_InterpolateMethod
cb' = Maybe (Ptr (FunPtr C_InterpolateMethod))
-> InterpolateMethod -> C_InterpolateMethod
wrap_InterpolateMethod Maybe (Ptr (FunPtr C_InterpolateMethod))
forall a. Maybe a
Nothing InterpolateMethod
cb
    C_InterpolateMethod -> IO (FunPtr C_InterpolateMethod)
mk_InterpolateMethod C_InterpolateMethod
cb' IO (FunPtr C_InterpolateMethod)
-> (FunPtr C_InterpolateMethod
    -> IO (GClosure C_InterpolateMethod))
-> IO (GClosure C_InterpolateMethod)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_InterpolateMethod -> IO (GClosure C_InterpolateMethod)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `InterpolateMethod` into a `C_InterpolateMethod`.
wrap_InterpolateMethod ::
    Maybe (Ptr (FunPtr C_InterpolateMethod)) ->
    InterpolateMethod ->
    C_InterpolateMethod
wrap_InterpolateMethod :: Maybe (Ptr (FunPtr C_InterpolateMethod))
-> InterpolateMethod -> C_InterpolateMethod
wrap_InterpolateMethod Maybe (Ptr (FunPtr C_InterpolateMethod))
funptrptr InterpolateMethod
_cb Ptr Interpolate
interpolate Ptr ()
out Ptr Region
in_ CDouble
x CDouble
y = do
    Interpolate
interpolate' <- ((ManagedPtr Interpolate -> Interpolate)
-> Ptr Interpolate -> IO Interpolate
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Interpolate -> Interpolate
Vips.Interpolate.Interpolate) Ptr Interpolate
interpolate
    Region
in_' <- ((ManagedPtr Region -> Region) -> Ptr Region -> IO Region
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Region -> Region
Vips.Region.Region) Ptr Region
in_
    let x' :: Double
x' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
x
    let y' :: Double
y' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
y
    InterpolateMethod
_cb  Interpolate
interpolate' Ptr ()
out Region
in_' Double
x' Double
y'
    Maybe (Ptr (FunPtr C_InterpolateMethod)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_InterpolateMethod))
funptrptr


-- callback ImageMapFn
{- Callable
  { returnType = Just (TBasicType TPtr)
  , returnMayBeNull = True
  , returnTransfer = TransferNothing
  , returnDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , args =
      [ Arg
          { argCName = "image"
          , argType = TInterface Name { namespace = "Vips" , name = "Image" }
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "name"
          , argType = TBasicType TUTF8
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "value"
          , argType = TGValue
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "a"
          , argType = TBasicType TPtr
          , direction = DirectionIn
          , mayBeNull = True
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      ]
  , skipReturn = False
  , callableThrows = False
  , callableDeprecated = Nothing
  , callableDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , callableResolvable = Nothing
  }
-}
-- | Type for the callback on the (unwrapped) C side.
type C_ImageMapFn =
    Ptr Vips.Image.Image ->
    CString ->
    Ptr GValue ->
    Ptr () ->
    IO (Ptr ())

-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "value"
--           , argType = TGValue
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "a"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TPtr)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_ImageMapFn :: FunPtr C_ImageMapFn -> C_ImageMapFn

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_ImageMapFn ::
    (B.CallStack.HasCallStack, MonadIO m, Vips.Image.IsImage a) =>
    FunPtr C_ImageMapFn
    -> a
    -> T.Text
    -> GValue
    -> Ptr ()
    -> m (Ptr ())
dynamic_ImageMapFn :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
FunPtr C_ImageMapFn -> a -> Text -> GValue -> Ptr () -> m (Ptr ())
dynamic_ImageMapFn FunPtr C_ImageMapFn
__funPtr a
image Text
name GValue
value Ptr ()
a = 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
    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 ()
result <- (FunPtr C_ImageMapFn -> C_ImageMapFn
__dynamic_C_ImageMapFn FunPtr C_ImageMapFn
__funPtr) Ptr Image
image' CString
name' Ptr GValue
value' Ptr ()
a
    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'
    Ptr () -> IO (Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result

-- | Generate a function pointer callable from C code, from a `C_ImageMapFn`.
foreign import ccall "wrapper"
    mk_ImageMapFn :: C_ImageMapFn -> IO (FunPtr C_ImageMapFn)

-- | /No description available in the introspection data./
type ImageMapFn =
    Vips.Image.Image
    -> T.Text
    -> GValue
    -> Ptr ()
    -> IO (Ptr ())

-- | A convenience synonym for @`Nothing` :: `Maybe` `ImageMapFn`@.
noImageMapFn :: Maybe ImageMapFn
noImageMapFn :: Maybe ImageMapFn
noImageMapFn = Maybe ImageMapFn
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_ImageMapFn :: MonadIO m => ImageMapFn -> m (GClosure C_ImageMapFn)
genClosure_ImageMapFn :: forall (m :: * -> *).
MonadIO m =>
ImageMapFn -> m (GClosure C_ImageMapFn)
genClosure_ImageMapFn ImageMapFn
cb = IO (GClosure C_ImageMapFn) -> m (GClosure C_ImageMapFn)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_ImageMapFn) -> m (GClosure C_ImageMapFn))
-> IO (GClosure C_ImageMapFn) -> m (GClosure C_ImageMapFn)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_ImageMapFn
cb' = Maybe (Ptr (FunPtr C_ImageMapFn)) -> ImageMapFn -> C_ImageMapFn
wrap_ImageMapFn Maybe (Ptr (FunPtr C_ImageMapFn))
forall a. Maybe a
Nothing ImageMapFn
cb
    C_ImageMapFn -> IO (FunPtr C_ImageMapFn)
mk_ImageMapFn C_ImageMapFn
cb' IO (FunPtr C_ImageMapFn)
-> (FunPtr C_ImageMapFn -> IO (GClosure C_ImageMapFn))
-> IO (GClosure C_ImageMapFn)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ImageMapFn -> IO (GClosure C_ImageMapFn)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `ImageMapFn` into a `C_ImageMapFn`.
wrap_ImageMapFn ::
    Maybe (Ptr (FunPtr C_ImageMapFn)) ->
    ImageMapFn ->
    C_ImageMapFn
wrap_ImageMapFn :: Maybe (Ptr (FunPtr C_ImageMapFn)) -> ImageMapFn -> C_ImageMapFn
wrap_ImageMapFn Maybe (Ptr (FunPtr C_ImageMapFn))
funptrptr ImageMapFn
_cb Ptr Image
image CString
name Ptr GValue
value Ptr ()
a = do
    Image
image' <- ((ManagedPtr Image -> Image) -> Ptr Image -> IO Image
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Image -> Image
Vips.Image.Image) Ptr Image
image
    Text
name' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
name
    GValue
value' <- Ptr GValue -> IO GValue
B.GValue.newGValueFromPtr Ptr GValue
value
    Ptr ()
result <- ImageMapFn
_cb  Image
image' Text
name' GValue
value' Ptr ()
a
    Maybe (Ptr (FunPtr C_ImageMapFn)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_ImageMapFn))
funptrptr
    Ptr () -> IO (Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result


-- callback GenerateFn
{- Callable
  { returnType = Just (TBasicType TInt)
  , returnMayBeNull = False
  , returnTransfer = TransferNothing
  , returnDocumentation =
      Documentation
        { rawDocText = Just "0 on success, -1 on error."
        , sinceVersion = Nothing
        }
  , args =
      [ Arg
          { argCName = "out"
          , argType = TBasicType TPtr
          , direction = DirectionIn
          , mayBeNull = True
          , argDoc =
              Documentation
                { rawDocText = Just "#VipsRegion to fill"
                , sinceVersion = Nothing
                }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "seq"
          , argType = TBasicType TPtr
          , direction = DirectionIn
          , mayBeNull = True
          , argDoc =
              Documentation
                { rawDocText = Just "sequence value" , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "a"
          , argType = TBasicType TPtr
          , direction = DirectionIn
          , mayBeNull = True
          , argDoc =
              Documentation
                { rawDocText = Just "user data" , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "b"
          , argType = TBasicType TPtr
          , direction = DirectionIn
          , mayBeNull = True
          , argDoc =
              Documentation
                { rawDocText = Just "user data" , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "stop"
          , argType = TBasicType TBoolean
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation
                { rawDocText = Just "set this to stop processing"
                , sinceVersion = Nothing
                }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      ]
  , skipReturn = False
  , callableThrows = False
  , callableDeprecated = Nothing
  , callableDocumentation =
      Documentation
        { rawDocText =
            Just
              "Fill @out->valid with pixels. @seq contains per-thread state, such as the\ninput regions. Set @stop to %TRUE to stop processing.\n\nSee also: vips_image_generate(), vips_stop_many()."
        , sinceVersion = Nothing
        }
  , callableResolvable = Nothing
  }
-}
-- | Type for the callback on the (unwrapped) C side.
type C_GenerateFn =
    Ptr () ->
    Ptr () ->
    Ptr () ->
    Ptr () ->
    CInt ->
    IO Int32

-- Args: [ Arg
--           { argCName = "out"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#VipsRegion to fill"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "seq"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "sequence value" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "a"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "user data" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "b"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "user data" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "stop"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "set this to stop processing"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_GenerateFn :: FunPtr C_GenerateFn -> C_GenerateFn

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_GenerateFn ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    FunPtr C_GenerateFn
    -> Ptr ()
    -- ^ /@out@/: t'GI.Vips.Objects.Region.Region' to fill
    -> Ptr ()
    -- ^ /@seq@/: sequence value
    -> Ptr ()
    -- ^ /@a@/: user data
    -> Ptr ()
    -- ^ /@b@/: user data
    -> Bool
    -- ^ /@stop@/: set this to stop processing
    -> m Int32
    -- ^ __Returns:__ 0 on success, -1 on error.
dynamic_GenerateFn :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_GenerateFn
-> Ptr () -> Ptr () -> Ptr () -> Ptr () -> Bool -> m Int32
dynamic_GenerateFn FunPtr C_GenerateFn
__funPtr Ptr ()
out Ptr ()
seq Ptr ()
a Ptr ()
b Bool
stop = 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 stop' :: CInt
stop' = (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
stop
    Int32
result <- (FunPtr C_GenerateFn -> C_GenerateFn
__dynamic_C_GenerateFn FunPtr C_GenerateFn
__funPtr) Ptr ()
out Ptr ()
seq Ptr ()
a Ptr ()
b CInt
stop'
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

-- | Generate a function pointer callable from C code, from a `C_GenerateFn`.
foreign import ccall "wrapper"
    mk_GenerateFn :: C_GenerateFn -> IO (FunPtr C_GenerateFn)

-- | Fill /@out@/->valid with pixels. /@seq@/ contains per-thread state, such as the
-- input regions. Set /@stop@/ to 'P.True' to stop processing.
-- 
-- See also: @/vips_image_generate()/@, @/vips_stop_many()/@.
type GenerateFn =
    Ptr ()
    -- ^ /@out@/: t'GI.Vips.Objects.Region.Region' to fill
    -> Ptr ()
    -- ^ /@seq@/: sequence value
    -> Ptr ()
    -- ^ /@a@/: user data
    -> Ptr ()
    -- ^ /@b@/: user data
    -> Bool
    -- ^ /@stop@/: set this to stop processing
    -> IO Int32
    -- ^ __Returns:__ 0 on success, -1 on error.

-- | A convenience synonym for @`Nothing` :: `Maybe` `GenerateFn`@.
noGenerateFn :: Maybe GenerateFn
noGenerateFn :: Maybe GenerateFn
noGenerateFn = Maybe GenerateFn
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_GenerateFn :: MonadIO m => GenerateFn -> m (GClosure C_GenerateFn)
genClosure_GenerateFn :: forall (m :: * -> *).
MonadIO m =>
GenerateFn -> m (GClosure C_GenerateFn)
genClosure_GenerateFn GenerateFn
cb = IO (GClosure C_GenerateFn) -> m (GClosure C_GenerateFn)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_GenerateFn) -> m (GClosure C_GenerateFn))
-> IO (GClosure C_GenerateFn) -> m (GClosure C_GenerateFn)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_GenerateFn
cb' = Maybe (Ptr (FunPtr C_GenerateFn)) -> GenerateFn -> C_GenerateFn
wrap_GenerateFn Maybe (Ptr (FunPtr C_GenerateFn))
forall a. Maybe a
Nothing GenerateFn
cb
    C_GenerateFn -> IO (FunPtr C_GenerateFn)
mk_GenerateFn C_GenerateFn
cb' IO (FunPtr C_GenerateFn)
-> (FunPtr C_GenerateFn -> IO (GClosure C_GenerateFn))
-> IO (GClosure C_GenerateFn)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_GenerateFn -> IO (GClosure C_GenerateFn)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `GenerateFn` into a `C_GenerateFn`.
wrap_GenerateFn ::
    Maybe (Ptr (FunPtr C_GenerateFn)) ->
    GenerateFn ->
    C_GenerateFn
wrap_GenerateFn :: Maybe (Ptr (FunPtr C_GenerateFn)) -> GenerateFn -> C_GenerateFn
wrap_GenerateFn Maybe (Ptr (FunPtr C_GenerateFn))
funptrptr GenerateFn
_cb Ptr ()
out Ptr ()
seq Ptr ()
a Ptr ()
b CInt
stop = do
    let stop' :: Bool
stop' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
stop
    Int32
result <- GenerateFn
_cb  Ptr ()
out Ptr ()
seq Ptr ()
a Ptr ()
b Bool
stop'
    Maybe (Ptr (FunPtr C_GenerateFn)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_GenerateFn))
funptrptr
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- callback ClassMapFn
{- Callable
  { returnType = Just (TBasicType TPtr)
  , returnMayBeNull = True
  , returnTransfer = TransferNothing
  , returnDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , args =
      [ Arg
          { argCName = "cls"
          , argType =
              TInterface Name { namespace = "Vips" , name = "ObjectClass" }
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "a"
          , argType = TBasicType TPtr
          , direction = DirectionIn
          , mayBeNull = True
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      ]
  , skipReturn = False
  , callableThrows = False
  , callableDeprecated = Nothing
  , callableDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , callableResolvable = Nothing
  }
-}
-- | Type for the callback on the (unwrapped) C side.
type C_ClassMapFn =
    Ptr Vips.ObjectClass.ObjectClass ->
    Ptr () ->
    IO (Ptr ())

-- Args: [ Arg
--           { argCName = "cls"
--           , argType =
--               TInterface Name { namespace = "Vips" , name = "ObjectClass" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "a"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TPtr)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_ClassMapFn :: FunPtr C_ClassMapFn -> C_ClassMapFn

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_ClassMapFn ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    FunPtr C_ClassMapFn
    -> Vips.ObjectClass.ObjectClass
    -> Ptr ()
    -> m (Ptr ())
dynamic_ClassMapFn :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_ClassMapFn -> ObjectClass -> Ptr () -> m (Ptr ())
dynamic_ClassMapFn FunPtr C_ClassMapFn
__funPtr ObjectClass
cls Ptr ()
a = 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 ObjectClass
cls' <- ObjectClass -> IO (Ptr ObjectClass)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr ObjectClass
cls
    Ptr ()
result <- (FunPtr C_ClassMapFn -> C_ClassMapFn
__dynamic_C_ClassMapFn FunPtr C_ClassMapFn
__funPtr) Ptr ObjectClass
cls' Ptr ()
a
    ObjectClass -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr ObjectClass
cls
    Ptr () -> IO (Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result

-- | Generate a function pointer callable from C code, from a `C_ClassMapFn`.
foreign import ccall "wrapper"
    mk_ClassMapFn :: C_ClassMapFn -> IO (FunPtr C_ClassMapFn)

-- | /No description available in the introspection data./
type ClassMapFn =
    Vips.ObjectClass.ObjectClass
    -> Ptr ()
    -> IO (Ptr ())

-- | A convenience synonym for @`Nothing` :: `Maybe` `ClassMapFn`@.
noClassMapFn :: Maybe ClassMapFn
noClassMapFn :: Maybe ClassMapFn
noClassMapFn = Maybe ClassMapFn
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_ClassMapFn :: MonadIO m => ClassMapFn -> m (GClosure C_ClassMapFn)
genClosure_ClassMapFn :: forall (m :: * -> *).
MonadIO m =>
ClassMapFn -> m (GClosure C_ClassMapFn)
genClosure_ClassMapFn ClassMapFn
cb = IO (GClosure C_ClassMapFn) -> m (GClosure C_ClassMapFn)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_ClassMapFn) -> m (GClosure C_ClassMapFn))
-> IO (GClosure C_ClassMapFn) -> m (GClosure C_ClassMapFn)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_ClassMapFn
cb' = Maybe (Ptr (FunPtr C_ClassMapFn)) -> ClassMapFn -> C_ClassMapFn
wrap_ClassMapFn Maybe (Ptr (FunPtr C_ClassMapFn))
forall a. Maybe a
Nothing ClassMapFn
cb
    C_ClassMapFn -> IO (FunPtr C_ClassMapFn)
mk_ClassMapFn C_ClassMapFn
cb' IO (FunPtr C_ClassMapFn)
-> (FunPtr C_ClassMapFn -> IO (GClosure C_ClassMapFn))
-> IO (GClosure C_ClassMapFn)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ClassMapFn -> IO (GClosure C_ClassMapFn)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `ClassMapFn` into a `C_ClassMapFn`.
wrap_ClassMapFn ::
    Maybe (Ptr (FunPtr C_ClassMapFn)) ->
    ClassMapFn ->
    C_ClassMapFn
wrap_ClassMapFn :: Maybe (Ptr (FunPtr C_ClassMapFn)) -> ClassMapFn -> C_ClassMapFn
wrap_ClassMapFn Maybe (Ptr (FunPtr C_ClassMapFn))
funptrptr ClassMapFn
_cb Ptr ObjectClass
cls Ptr ()
a = do
    ObjectClass
cls' <- ((ManagedPtr ObjectClass -> ObjectClass)
-> Ptr ObjectClass -> IO ObjectClass
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr ObjectClass -> ObjectClass
Vips.ObjectClass.ObjectClass) Ptr ObjectClass
cls
    Ptr ()
result <- ClassMapFn
_cb  ObjectClass
cls' Ptr ()
a
    Maybe (Ptr (FunPtr C_ClassMapFn)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_ClassMapFn))
funptrptr
    Ptr () -> IO (Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result


-- callback CallbackFn
{- Callable
  { returnType = Just (TBasicType TInt)
  , returnMayBeNull = False
  , returnTransfer = TransferNothing
  , returnDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , args =
      [ Arg
          { argCName = "a"
          , argType = TBasicType TPtr
          , direction = DirectionIn
          , mayBeNull = True
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "b"
          , argType = TBasicType TPtr
          , direction = DirectionIn
          , mayBeNull = True
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      ]
  , skipReturn = False
  , callableThrows = False
  , callableDeprecated = Nothing
  , callableDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , callableResolvable = Nothing
  }
-}
-- | Type for the callback on the (unwrapped) C side.
type C_CallbackFn =
    Ptr () ->
    Ptr () ->
    IO Int32

-- Args: [ Arg
--           { argCName = "a"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "b"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_CallbackFn :: FunPtr C_CallbackFn -> C_CallbackFn

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_CallbackFn ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    FunPtr C_CallbackFn
    -> Ptr ()
    -> Ptr ()
    -> m Int32
dynamic_CallbackFn :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_CallbackFn -> Ptr () -> Ptr () -> m Int32
dynamic_CallbackFn FunPtr C_CallbackFn
__funPtr Ptr ()
a Ptr ()
b = 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
    Int32
result <- (FunPtr C_CallbackFn -> C_CallbackFn
__dynamic_C_CallbackFn FunPtr C_CallbackFn
__funPtr) Ptr ()
a Ptr ()
b
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

-- | Generate a function pointer callable from C code, from a `C_CallbackFn`.
foreign import ccall "wrapper"
    mk_CallbackFn :: C_CallbackFn -> IO (FunPtr C_CallbackFn)

-- | /No description available in the introspection data./
type CallbackFn =
    Ptr ()
    -> Ptr ()
    -> IO Int32

-- | A convenience synonym for @`Nothing` :: `Maybe` `CallbackFn`@.
noCallbackFn :: Maybe CallbackFn
noCallbackFn :: Maybe C_CallbackFn
noCallbackFn = Maybe C_CallbackFn
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_CallbackFn :: MonadIO m => CallbackFn -> m (GClosure C_CallbackFn)
genClosure_CallbackFn :: forall (m :: * -> *).
MonadIO m =>
C_CallbackFn -> m (GClosure C_CallbackFn)
genClosure_CallbackFn C_CallbackFn
cb = IO (GClosure C_CallbackFn) -> m (GClosure C_CallbackFn)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_CallbackFn) -> m (GClosure C_CallbackFn))
-> IO (GClosure C_CallbackFn) -> m (GClosure C_CallbackFn)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_CallbackFn
cb' = Maybe (Ptr (FunPtr C_CallbackFn)) -> C_CallbackFn -> C_CallbackFn
wrap_CallbackFn Maybe (Ptr (FunPtr C_CallbackFn))
forall a. Maybe a
Nothing C_CallbackFn
cb
    C_CallbackFn -> IO (FunPtr C_CallbackFn)
mk_CallbackFn C_CallbackFn
cb' IO (FunPtr C_CallbackFn)
-> (FunPtr C_CallbackFn -> IO (GClosure C_CallbackFn))
-> IO (GClosure C_CallbackFn)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_CallbackFn -> IO (GClosure C_CallbackFn)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `CallbackFn` into a `C_CallbackFn`.
wrap_CallbackFn ::
    Maybe (Ptr (FunPtr C_CallbackFn)) ->
    CallbackFn ->
    C_CallbackFn
wrap_CallbackFn :: Maybe (Ptr (FunPtr C_CallbackFn)) -> C_CallbackFn -> C_CallbackFn
wrap_CallbackFn Maybe (Ptr (FunPtr C_CallbackFn))
funptrptr C_CallbackFn
_cb Ptr ()
a Ptr ()
b = do
    Int32
result <- C_CallbackFn
_cb  Ptr ()
a Ptr ()
b
    Maybe (Ptr (FunPtr C_CallbackFn)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_CallbackFn))
funptrptr
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- callback ArgumentMapFn
{- Callable
  { returnType = Just (TBasicType TPtr)
  , returnMayBeNull = True
  , returnTransfer = TransferNothing
  , returnDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , args =
      [ Arg
          { argCName = "object"
          , argType =
              TInterface Name { namespace = "Vips" , name = "Object" }
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "pspec"
          , argType = TParamSpec
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "argument_class"
          , argType =
              TInterface Name { namespace = "Vips" , name = "ArgumentClass" }
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "argument_instance"
          , argType =
              TInterface Name { namespace = "Vips" , name = "ArgumentInstance" }
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "a"
          , argType = TBasicType TPtr
          , direction = DirectionIn
          , mayBeNull = True
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "b"
          , argType = TBasicType TPtr
          , direction = DirectionIn
          , mayBeNull = True
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      ]
  , skipReturn = False
  , callableThrows = False
  , callableDeprecated = Nothing
  , callableDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , callableResolvable = Nothing
  }
-}
-- | Type for the callback on the (unwrapped) C side.
type C_ArgumentMapFn =
    Ptr Vips.Object.Object ->
    Ptr GParamSpec ->
    Ptr Vips.ArgumentClass.ArgumentClass ->
    Ptr Vips.ArgumentInstance.ArgumentInstance ->
    Ptr () ->
    Ptr () ->
    IO (Ptr ())

-- Args: [ Arg
--           { argCName = "object"
--           , argType =
--               TInterface Name { namespace = "Vips" , name = "Object" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "pspec"
--           , argType = TParamSpec
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "argument_class"
--           , argType =
--               TInterface Name { namespace = "Vips" , name = "ArgumentClass" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "argument_instance"
--           , argType =
--               TInterface Name { namespace = "Vips" , name = "ArgumentInstance" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "a"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "b"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TPtr)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_ArgumentMapFn :: FunPtr C_ArgumentMapFn -> C_ArgumentMapFn

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_ArgumentMapFn ::
    (B.CallStack.HasCallStack, MonadIO m, Vips.Object.IsObject a) =>
    FunPtr C_ArgumentMapFn
    -> a
    -> GParamSpec
    -> Vips.ArgumentClass.ArgumentClass
    -> Vips.ArgumentInstance.ArgumentInstance
    -> Ptr ()
    -> Ptr ()
    -> m (Ptr ())
dynamic_ArgumentMapFn :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsObject a) =>
FunPtr C_ArgumentMapFn
-> a
-> GParamSpec
-> ArgumentClass
-> ArgumentInstance
-> Ptr ()
-> Ptr ()
-> m (Ptr ())
dynamic_ArgumentMapFn FunPtr C_ArgumentMapFn
__funPtr a
object GParamSpec
pspec ArgumentClass
argumentClass ArgumentInstance
argumentInstance Ptr ()
a Ptr ()
b = 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 Object
object' <- a -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
object
    Ptr GParamSpec
pspec' <- GParamSpec -> IO (Ptr GParamSpec)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GParamSpec
pspec
    Ptr ArgumentClass
argumentClass' <- ArgumentClass -> IO (Ptr ArgumentClass)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr ArgumentClass
argumentClass
    Ptr ArgumentInstance
argumentInstance' <- ArgumentInstance -> IO (Ptr ArgumentInstance)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr ArgumentInstance
argumentInstance
    Ptr ()
result <- (FunPtr C_ArgumentMapFn -> C_ArgumentMapFn
__dynamic_C_ArgumentMapFn FunPtr C_ArgumentMapFn
__funPtr) Ptr Object
object' Ptr GParamSpec
pspec' Ptr ArgumentClass
argumentClass' Ptr ArgumentInstance
argumentInstance' Ptr ()
a Ptr ()
b
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
object
    GParamSpec -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GParamSpec
pspec
    ArgumentClass -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr ArgumentClass
argumentClass
    ArgumentInstance -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr ArgumentInstance
argumentInstance
    Ptr () -> IO (Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result

-- | Generate a function pointer callable from C code, from a `C_ArgumentMapFn`.
foreign import ccall "wrapper"
    mk_ArgumentMapFn :: C_ArgumentMapFn -> IO (FunPtr C_ArgumentMapFn)

-- | /No description available in the introspection data./
type ArgumentMapFn =
    Vips.Object.Object
    -> GParamSpec
    -> Vips.ArgumentClass.ArgumentClass
    -> Vips.ArgumentInstance.ArgumentInstance
    -> Ptr ()
    -> Ptr ()
    -> IO (Ptr ())

-- | A convenience synonym for @`Nothing` :: `Maybe` `ArgumentMapFn`@.
noArgumentMapFn :: Maybe ArgumentMapFn
noArgumentMapFn :: Maybe ArgumentMapFn
noArgumentMapFn = Maybe ArgumentMapFn
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_ArgumentMapFn :: MonadIO m => ArgumentMapFn -> m (GClosure C_ArgumentMapFn)
genClosure_ArgumentMapFn :: forall (m :: * -> *).
MonadIO m =>
ArgumentMapFn -> m (GClosure C_ArgumentMapFn)
genClosure_ArgumentMapFn ArgumentMapFn
cb = IO (GClosure C_ArgumentMapFn) -> m (GClosure C_ArgumentMapFn)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_ArgumentMapFn) -> m (GClosure C_ArgumentMapFn))
-> IO (GClosure C_ArgumentMapFn) -> m (GClosure C_ArgumentMapFn)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_ArgumentMapFn
cb' = Maybe (Ptr (FunPtr C_ArgumentMapFn))
-> ArgumentMapFn -> C_ArgumentMapFn
wrap_ArgumentMapFn Maybe (Ptr (FunPtr C_ArgumentMapFn))
forall a. Maybe a
Nothing ArgumentMapFn
cb
    C_ArgumentMapFn -> IO (FunPtr C_ArgumentMapFn)
mk_ArgumentMapFn C_ArgumentMapFn
cb' IO (FunPtr C_ArgumentMapFn)
-> (FunPtr C_ArgumentMapFn -> IO (GClosure C_ArgumentMapFn))
-> IO (GClosure C_ArgumentMapFn)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ArgumentMapFn -> IO (GClosure C_ArgumentMapFn)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `ArgumentMapFn` into a `C_ArgumentMapFn`.
wrap_ArgumentMapFn ::
    Maybe (Ptr (FunPtr C_ArgumentMapFn)) ->
    ArgumentMapFn ->
    C_ArgumentMapFn
wrap_ArgumentMapFn :: Maybe (Ptr (FunPtr C_ArgumentMapFn))
-> ArgumentMapFn -> C_ArgumentMapFn
wrap_ArgumentMapFn Maybe (Ptr (FunPtr C_ArgumentMapFn))
funptrptr ArgumentMapFn
_cb Ptr Object
object Ptr GParamSpec
pspec Ptr ArgumentClass
argumentClass Ptr ArgumentInstance
argumentInstance Ptr ()
a Ptr ()
b = do
    Object
object' <- ((ManagedPtr Object -> Object) -> Ptr Object -> IO Object
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Object -> Object
Vips.Object.Object) Ptr Object
object
    GParamSpec
pspec' <- Ptr GParamSpec -> IO GParamSpec
B.GParamSpec.newGParamSpecFromPtr Ptr GParamSpec
pspec
    ArgumentClass
argumentClass' <- ((ManagedPtr ArgumentClass -> ArgumentClass)
-> Ptr ArgumentClass -> IO ArgumentClass
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr ArgumentClass -> ArgumentClass
Vips.ArgumentClass.ArgumentClass) Ptr ArgumentClass
argumentClass
    ArgumentInstance
argumentInstance' <- ((ManagedPtr ArgumentInstance -> ArgumentInstance)
-> Ptr ArgumentInstance -> IO ArgumentInstance
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr ArgumentInstance -> ArgumentInstance
Vips.ArgumentInstance.ArgumentInstance) Ptr ArgumentInstance
argumentInstance
    Ptr ()
result <- ArgumentMapFn
_cb  Object
object' GParamSpec
pspec' ArgumentClass
argumentClass' ArgumentInstance
argumentInstance' Ptr ()
a Ptr ()
b
    Maybe (Ptr (FunPtr C_ArgumentMapFn)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_ArgumentMapFn))
funptrptr
    Ptr () -> IO (Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result


-- callback ArgumentClassMapFn
{- Callable
  { returnType = Just (TBasicType TPtr)
  , returnMayBeNull = True
  , returnTransfer = TransferNothing
  , returnDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , args =
      [ Arg
          { argCName = "object_class"
          , argType =
              TInterface Name { namespace = "Vips" , name = "ObjectClass" }
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "pspec"
          , argType = TParamSpec
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "argument_class"
          , argType =
              TInterface Name { namespace = "Vips" , name = "ArgumentClass" }
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "a"
          , argType = TBasicType TPtr
          , direction = DirectionIn
          , mayBeNull = True
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "b"
          , argType = TBasicType TPtr
          , direction = DirectionIn
          , mayBeNull = True
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      ]
  , skipReturn = False
  , callableThrows = False
  , callableDeprecated = Nothing
  , callableDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , callableResolvable = Nothing
  }
-}
-- | Type for the callback on the (unwrapped) C side.
type C_ArgumentClassMapFn =
    Ptr Vips.ObjectClass.ObjectClass ->
    Ptr GParamSpec ->
    Ptr Vips.ArgumentClass.ArgumentClass ->
    Ptr () ->
    Ptr () ->
    IO (Ptr ())

-- Args: [ Arg
--           { argCName = "object_class"
--           , argType =
--               TInterface Name { namespace = "Vips" , name = "ObjectClass" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "pspec"
--           , argType = TParamSpec
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "argument_class"
--           , argType =
--               TInterface Name { namespace = "Vips" , name = "ArgumentClass" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "a"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "b"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TPtr)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_ArgumentClassMapFn :: FunPtr C_ArgumentClassMapFn -> C_ArgumentClassMapFn

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_ArgumentClassMapFn ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    FunPtr C_ArgumentClassMapFn
    -> Vips.ObjectClass.ObjectClass
    -> GParamSpec
    -> Vips.ArgumentClass.ArgumentClass
    -> Ptr ()
    -> Ptr ()
    -> m (Ptr ())
dynamic_ArgumentClassMapFn :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_ArgumentClassMapFn
-> ObjectClass
-> GParamSpec
-> ArgumentClass
-> Ptr ()
-> Ptr ()
-> m (Ptr ())
dynamic_ArgumentClassMapFn FunPtr C_ArgumentClassMapFn
__funPtr ObjectClass
objectClass GParamSpec
pspec ArgumentClass
argumentClass Ptr ()
a Ptr ()
b = 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 ObjectClass
objectClass' <- ObjectClass -> IO (Ptr ObjectClass)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr ObjectClass
objectClass
    Ptr GParamSpec
pspec' <- GParamSpec -> IO (Ptr GParamSpec)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GParamSpec
pspec
    Ptr ArgumentClass
argumentClass' <- ArgumentClass -> IO (Ptr ArgumentClass)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr ArgumentClass
argumentClass
    Ptr ()
result <- (FunPtr C_ArgumentClassMapFn -> C_ArgumentClassMapFn
__dynamic_C_ArgumentClassMapFn FunPtr C_ArgumentClassMapFn
__funPtr) Ptr ObjectClass
objectClass' Ptr GParamSpec
pspec' Ptr ArgumentClass
argumentClass' Ptr ()
a Ptr ()
b
    ObjectClass -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr ObjectClass
objectClass
    GParamSpec -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GParamSpec
pspec
    ArgumentClass -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr ArgumentClass
argumentClass
    Ptr () -> IO (Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result

-- | Generate a function pointer callable from C code, from a `C_ArgumentClassMapFn`.
foreign import ccall "wrapper"
    mk_ArgumentClassMapFn :: C_ArgumentClassMapFn -> IO (FunPtr C_ArgumentClassMapFn)

-- | /No description available in the introspection data./
type ArgumentClassMapFn =
    Vips.ObjectClass.ObjectClass
    -> GParamSpec
    -> Vips.ArgumentClass.ArgumentClass
    -> Ptr ()
    -> Ptr ()
    -> IO (Ptr ())

-- | A convenience synonym for @`Nothing` :: `Maybe` `ArgumentClassMapFn`@.
noArgumentClassMapFn :: Maybe ArgumentClassMapFn
noArgumentClassMapFn :: Maybe ArgumentClassMapFn
noArgumentClassMapFn = Maybe ArgumentClassMapFn
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_ArgumentClassMapFn :: MonadIO m => ArgumentClassMapFn -> m (GClosure C_ArgumentClassMapFn)
genClosure_ArgumentClassMapFn :: forall (m :: * -> *).
MonadIO m =>
ArgumentClassMapFn -> m (GClosure C_ArgumentClassMapFn)
genClosure_ArgumentClassMapFn ArgumentClassMapFn
cb = IO (GClosure C_ArgumentClassMapFn)
-> m (GClosure C_ArgumentClassMapFn)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_ArgumentClassMapFn)
 -> m (GClosure C_ArgumentClassMapFn))
-> IO (GClosure C_ArgumentClassMapFn)
-> m (GClosure C_ArgumentClassMapFn)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_ArgumentClassMapFn
cb' = Maybe (Ptr (FunPtr C_ArgumentClassMapFn))
-> ArgumentClassMapFn -> C_ArgumentClassMapFn
wrap_ArgumentClassMapFn Maybe (Ptr (FunPtr C_ArgumentClassMapFn))
forall a. Maybe a
Nothing ArgumentClassMapFn
cb
    C_ArgumentClassMapFn -> IO (FunPtr C_ArgumentClassMapFn)
mk_ArgumentClassMapFn C_ArgumentClassMapFn
cb' IO (FunPtr C_ArgumentClassMapFn)
-> (FunPtr C_ArgumentClassMapFn
    -> IO (GClosure C_ArgumentClassMapFn))
-> IO (GClosure C_ArgumentClassMapFn)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ArgumentClassMapFn -> IO (GClosure C_ArgumentClassMapFn)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `ArgumentClassMapFn` into a `C_ArgumentClassMapFn`.
wrap_ArgumentClassMapFn ::
    Maybe (Ptr (FunPtr C_ArgumentClassMapFn)) ->
    ArgumentClassMapFn ->
    C_ArgumentClassMapFn
wrap_ArgumentClassMapFn :: Maybe (Ptr (FunPtr C_ArgumentClassMapFn))
-> ArgumentClassMapFn -> C_ArgumentClassMapFn
wrap_ArgumentClassMapFn Maybe (Ptr (FunPtr C_ArgumentClassMapFn))
funptrptr ArgumentClassMapFn
_cb Ptr ObjectClass
objectClass Ptr GParamSpec
pspec Ptr ArgumentClass
argumentClass Ptr ()
a Ptr ()
b = do
    ObjectClass
objectClass' <- ((ManagedPtr ObjectClass -> ObjectClass)
-> Ptr ObjectClass -> IO ObjectClass
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr ObjectClass -> ObjectClass
Vips.ObjectClass.ObjectClass) Ptr ObjectClass
objectClass
    GParamSpec
pspec' <- Ptr GParamSpec -> IO GParamSpec
B.GParamSpec.newGParamSpecFromPtr Ptr GParamSpec
pspec
    ArgumentClass
argumentClass' <- ((ManagedPtr ArgumentClass -> ArgumentClass)
-> Ptr ArgumentClass -> IO ArgumentClass
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr ArgumentClass -> ArgumentClass
Vips.ArgumentClass.ArgumentClass) Ptr ArgumentClass
argumentClass
    Ptr ()
result <- ArgumentClassMapFn
_cb  ObjectClass
objectClass' GParamSpec
pspec' ArgumentClass
argumentClass' Ptr ()
a Ptr ()
b
    Maybe (Ptr (FunPtr C_ArgumentClassMapFn)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_ArgumentClassMapFn))
funptrptr
    Ptr () -> IO (Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result