{-# LANGUAGE ImplicitParams, RankNTypes, TypeApplications #-}


-- | Copyright  : Will Thompson and Iñaki García Etxebarria
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- /No description available in the introspection data./

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

module GI.Vips.Objects.Object
    ( 
#if defined(ENABLE_OVERLOADING)
    ObjectSetRequiredMethodInfo             ,
#endif

-- * Exported types
    Object(..)                              ,
    IsObject                                ,
    toObject                                ,


 -- * Methods
-- | 
-- 
--  === __Click to display all available methods, including inherited ones__
-- ==== Methods
-- [argumentIsset]("GI.Vips.Objects.Object#g:method:argumentIsset"), [argumentNeedsstring]("GI.Vips.Objects.Object#g:method:argumentNeedsstring"), [bindProperty]("GI.GObject.Objects.Object#g:method:bindProperty"), [bindPropertyFull]("GI.GObject.Objects.Object#g:method:bindPropertyFull"), [build]("GI.Vips.Objects.Object#g:method:build"), [forceFloating]("GI.GObject.Objects.Object#g:method:forceFloating"), [freezeNotify]("GI.GObject.Objects.Object#g:method:freezeNotify"), [getv]("GI.GObject.Objects.Object#g:method:getv"), [isFloating]("GI.GObject.Objects.Object#g:method:isFloating"), [localCb]("GI.Vips.Objects.Object#g:method:localCb"), [notify]("GI.GObject.Objects.Object#g:method:notify"), [notifyByPspec]("GI.GObject.Objects.Object#g:method:notifyByPspec"), [preclose]("GI.Vips.Objects.Object#g:method:preclose"), [printDump]("GI.Vips.Objects.Object#g:method:printDump"), [printName]("GI.Vips.Objects.Object#g:method:printName"), [printSummary]("GI.Vips.Objects.Object#g:method:printSummary"), [ref]("GI.GObject.Objects.Object#g:method:ref"), [refSink]("GI.GObject.Objects.Object#g:method:refSink"), [rewind]("GI.Vips.Objects.Object#g:method:rewind"), [runDispose]("GI.GObject.Objects.Object#g:method:runDispose"), [sanity]("GI.Vips.Objects.Object#g:method:sanity"), [stealData]("GI.GObject.Objects.Object#g:method:stealData"), [stealQdata]("GI.GObject.Objects.Object#g:method:stealQdata"), [thawNotify]("GI.GObject.Objects.Object#g:method:thawNotify"), [toString]("GI.Vips.Objects.Object#g:method:toString"), [unref]("GI.GObject.Objects.Object#g:method:unref"), [unrefOutputs]("GI.Vips.Objects.Object#g:method:unrefOutputs"), [watchClosure]("GI.GObject.Objects.Object#g:method:watchClosure").
-- 
-- ==== Getters
-- [getArgumentFlags]("GI.Vips.Objects.Object#g:method:getArgumentFlags"), [getArgumentPriority]("GI.Vips.Objects.Object#g:method:getArgumentPriority"), [getArgumentToString]("GI.Vips.Objects.Object#g:method:getArgumentToString"), [getData]("GI.GObject.Objects.Object#g:method:getData"), [getDescription]("GI.Vips.Objects.Object#g:method:getDescription"), [getQdata]("GI.GObject.Objects.Object#g:method:getQdata").
-- 
-- ==== Setters
-- [setArgumentFromString]("GI.Vips.Objects.Object#g:method:setArgumentFromString"), [setData]("GI.GObject.Objects.Object#g:method:setData"), [setDataFull]("GI.GObject.Objects.Object#g:method:setDataFull"), [setFromString]("GI.Vips.Objects.Object#g:method:setFromString"), [setRequired]("GI.Vips.Objects.Object#g:method:setRequired"), [setStatic]("GI.Vips.Objects.Object#g:method:setStatic").

#if defined(ENABLE_OVERLOADING)
    ResolveObjectMethod                     ,
#endif

-- ** argumentIsset #method:argumentIsset#

#if defined(ENABLE_OVERLOADING)
    ObjectArgumentIssetMethodInfo           ,
#endif
    objectArgumentIsset                     ,


-- ** argumentNeedsstring #method:argumentNeedsstring#

#if defined(ENABLE_OVERLOADING)
    ObjectArgumentNeedsstringMethodInfo     ,
#endif
    objectArgumentNeedsstring               ,


-- ** build #method:build#

#if defined(ENABLE_OVERLOADING)
    ObjectBuildMethodInfo                   ,
#endif
    objectBuild                             ,


-- ** getArgumentFlags #method:getArgumentFlags#

#if defined(ENABLE_OVERLOADING)
    ObjectGetArgumentFlagsMethodInfo        ,
#endif
    objectGetArgumentFlags                  ,


-- ** getArgumentPriority #method:getArgumentPriority#

#if defined(ENABLE_OVERLOADING)
    ObjectGetArgumentPriorityMethodInfo     ,
#endif
    objectGetArgumentPriority               ,


-- ** getArgumentToString #method:getArgumentToString#

#if defined(ENABLE_OVERLOADING)
    ObjectGetArgumentToStringMethodInfo     ,
#endif
    objectGetArgumentToString               ,


-- ** getDescription #method:getDescription#

#if defined(ENABLE_OVERLOADING)
    ObjectGetDescriptionMethodInfo          ,
#endif
    objectGetDescription                    ,


-- ** getProperty #method:getProperty#

    objectGetProperty                       ,


-- ** localCb #method:localCb#

#if defined(ENABLE_OVERLOADING)
    ObjectLocalCbMethodInfo                 ,
#endif
    objectLocalCb                           ,


-- ** newFromString #method:newFromString#

    objectNewFromString                     ,


-- ** preclose #method:preclose#

#if defined(ENABLE_OVERLOADING)
    ObjectPrecloseMethodInfo                ,
#endif
    objectPreclose                          ,


-- ** printAll #method:printAll#

    objectPrintAll                          ,


-- ** printDump #method:printDump#

#if defined(ENABLE_OVERLOADING)
    ObjectPrintDumpMethodInfo               ,
#endif
    objectPrintDump                         ,


-- ** printName #method:printName#

#if defined(ENABLE_OVERLOADING)
    ObjectPrintNameMethodInfo               ,
#endif
    objectPrintName                         ,


-- ** printSummary #method:printSummary#

#if defined(ENABLE_OVERLOADING)
    ObjectPrintSummaryMethodInfo            ,
#endif
    objectPrintSummary                      ,


-- ** printSummaryClass #method:printSummaryClass#

    objectPrintSummaryClass                 ,


-- ** rewind #method:rewind#

#if defined(ENABLE_OVERLOADING)
    ObjectRewindMethodInfo                  ,
#endif
    objectRewind                            ,


-- ** sanity #method:sanity#

#if defined(ENABLE_OVERLOADING)
    ObjectSanityMethodInfo                  ,
#endif
    objectSanity                            ,


-- ** sanityAll #method:sanityAll#

    objectSanityAll                         ,


-- ** setArgumentFromString #method:setArgumentFromString#

#if defined(ENABLE_OVERLOADING)
    ObjectSetArgumentFromStringMethodInfo   ,
#endif
    objectSetArgumentFromString             ,


-- ** setFromString #method:setFromString#

#if defined(ENABLE_OVERLOADING)
    ObjectSetFromStringMethodInfo           ,
#endif
    objectSetFromString                     ,


-- ** setProperty #method:setProperty#

    objectSetProperty                       ,


-- ** setStatic #method:setStatic#

#if defined(ENABLE_OVERLOADING)
    ObjectSetStaticMethodInfo               ,
#endif
    objectSetStatic                         ,


-- ** toString #method:toString#

#if defined(ENABLE_OVERLOADING)
    ObjectToStringMethodInfo                ,
#endif
    objectToString                          ,


-- ** unrefOutputs #method:unrefOutputs#

#if defined(ENABLE_OVERLOADING)
    ObjectUnrefOutputsMethodInfo            ,
#endif
    objectUnrefOutputs                      ,




 -- * Properties


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

#if defined(ENABLE_OVERLOADING)
    ObjectDescriptionPropertyInfo           ,
#endif
    clearObjectDescription                  ,
    constructObjectDescription              ,
    getObjectDescription                    ,
#if defined(ENABLE_OVERLOADING)
    objectDescription                       ,
#endif
    setObjectDescription                    ,


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

#if defined(ENABLE_OVERLOADING)
    ObjectNicknamePropertyInfo              ,
#endif
    clearObjectNickname                     ,
    constructObjectNickname                 ,
    getObjectNickname                       ,
#if defined(ENABLE_OVERLOADING)
    objectNickname                          ,
#endif
    setObjectNickname                       ,




 -- * Signals


-- ** close #signal:close#

    ObjectCloseCallback                     ,
#if defined(ENABLE_OVERLOADING)
    ObjectCloseSignalInfo                   ,
#endif
    afterObjectClose                        ,
    onObjectClose                           ,


-- ** postbuild #signal:postbuild#

    ObjectPostbuildCallback                 ,
#if defined(ENABLE_OVERLOADING)
    ObjectPostbuildSignalInfo               ,
#endif
    afterObjectPostbuild                    ,
    onObjectPostbuild                       ,


-- ** postclose #signal:postclose#

    ObjectPostcloseCallback                 ,
#if defined(ENABLE_OVERLOADING)
    ObjectPostcloseSignalInfo               ,
#endif
    afterObjectPostclose                    ,
    onObjectPostclose                       ,


-- ** preclose #signal:preclose#

    ObjectPrecloseCallback                  ,
#if defined(ENABLE_OVERLOADING)
    ObjectPrecloseSignalInfo                ,
#endif
    afterObjectPreclose                     ,
    onObjectPreclose                        ,




    ) where

import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P

import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.Kind as DK
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R

import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Vips.Flags as Vips.Flags
import {-# SOURCE #-} qualified GI.Vips.Structs.Buf as Vips.Buf
import {-# SOURCE #-} qualified GI.Vips.Structs.ObjectClass as Vips.ObjectClass

-- | Memory-managed wrapper type.
newtype Object = Object (SP.ManagedPtr Object)
    deriving (Object -> Object -> Bool
(Object -> Object -> Bool)
-> (Object -> Object -> Bool) -> Eq Object
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Object -> Object -> Bool
== :: Object -> Object -> Bool
$c/= :: Object -> Object -> Bool
/= :: Object -> Object -> Bool
Eq)

instance SP.ManagedPtrNewtype Object where
    toManagedPtr :: Object -> ManagedPtr Object
toManagedPtr (Object ManagedPtr Object
p) = ManagedPtr Object
p

foreign import ccall "vips_object_get_type"
    c_vips_object_get_type :: IO B.Types.GType

instance B.Types.TypedObject Object where
    glibType :: IO GType
glibType = IO GType
c_vips_object_get_type

instance B.Types.GObject Object

-- | Type class for types which can be safely cast to `Object`, for instance with `toObject`.
class (SP.GObject o, O.IsDescendantOf Object o) => IsObject o
instance (SP.GObject o, O.IsDescendantOf Object o) => IsObject o

instance O.HasParentTypes Object
type instance O.ParentTypes Object = '[GObject.Object.Object]

-- | Cast to `Object`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.
toObject :: (MIO.MonadIO m, IsObject o) => o -> m Object
toObject :: forall (m :: * -> *) o. (MonadIO m, IsObject o) => o -> m Object
toObject = IO Object -> m Object
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Object -> m Object) -> (o -> IO Object) -> o -> m Object
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr Object -> Object) -> o -> IO Object
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
 ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr Object -> Object
Object

-- | Convert 'Object' to and from 'Data.GI.Base.GValue.GValue'. See 'Data.GI.Base.GValue.toGValue' and 'Data.GI.Base.GValue.fromGValue'.
instance B.GValue.IsGValue (Maybe Object) where
    gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_vips_object_get_type
    gvalueSet_ :: Ptr GValue -> Maybe Object -> IO ()
gvalueSet_ Ptr GValue
gv Maybe Object
P.Nothing = Ptr GValue -> Ptr Object -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr Object
forall a. Ptr a
FP.nullPtr :: FP.Ptr Object)
    gvalueSet_ Ptr GValue
gv (P.Just Object
obj) = Object -> (Ptr Object -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Object
obj (Ptr GValue -> Ptr Object -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
    gvalueGet_ :: Ptr GValue -> IO (Maybe Object)
gvalueGet_ Ptr GValue
gv = do
        Ptr Object
ptr <- Ptr GValue -> IO (Ptr Object)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr Object)
        if Ptr Object
ptr Ptr Object -> Ptr Object -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr Object
forall a. Ptr a
FP.nullPtr
        then Object -> Maybe Object
forall a. a -> Maybe a
P.Just (Object -> Maybe Object) -> IO Object -> IO (Maybe Object)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr Object -> Object) -> Ptr Object -> IO Object
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr Object -> Object
Object Ptr Object
ptr
        else Maybe Object -> IO (Maybe Object)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Object
forall a. Maybe a
P.Nothing
        
    

#if defined(ENABLE_OVERLOADING)
type family ResolveObjectMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
    ResolveObjectMethod "argumentIsset" o = ObjectArgumentIssetMethodInfo
    ResolveObjectMethod "argumentNeedsstring" o = ObjectArgumentNeedsstringMethodInfo
    ResolveObjectMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveObjectMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveObjectMethod "build" o = ObjectBuildMethodInfo
    ResolveObjectMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveObjectMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveObjectMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveObjectMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveObjectMethod "localCb" o = ObjectLocalCbMethodInfo
    ResolveObjectMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveObjectMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveObjectMethod "preclose" o = ObjectPrecloseMethodInfo
    ResolveObjectMethod "printDump" o = ObjectPrintDumpMethodInfo
    ResolveObjectMethod "printName" o = ObjectPrintNameMethodInfo
    ResolveObjectMethod "printSummary" o = ObjectPrintSummaryMethodInfo
    ResolveObjectMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveObjectMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveObjectMethod "rewind" o = ObjectRewindMethodInfo
    ResolveObjectMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveObjectMethod "sanity" o = ObjectSanityMethodInfo
    ResolveObjectMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveObjectMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveObjectMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveObjectMethod "toString" o = ObjectToStringMethodInfo
    ResolveObjectMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveObjectMethod "unrefOutputs" o = ObjectUnrefOutputsMethodInfo
    ResolveObjectMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveObjectMethod "getArgumentFlags" o = ObjectGetArgumentFlagsMethodInfo
    ResolveObjectMethod "getArgumentPriority" o = ObjectGetArgumentPriorityMethodInfo
    ResolveObjectMethod "getArgumentToString" o = ObjectGetArgumentToStringMethodInfo
    ResolveObjectMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveObjectMethod "getDescription" o = ObjectGetDescriptionMethodInfo
    ResolveObjectMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveObjectMethod "setArgumentFromString" o = ObjectSetArgumentFromStringMethodInfo
    ResolveObjectMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveObjectMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    ResolveObjectMethod "setFromString" o = ObjectSetFromStringMethodInfo
    ResolveObjectMethod "setRequired" o = ObjectSetRequiredMethodInfo
    ResolveObjectMethod "setStatic" o = ObjectSetStaticMethodInfo
    ResolveObjectMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveObjectMethod t Object, O.OverloadedMethod info Object p) => OL.IsLabel t (Object -> p) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.overloadedMethod @info
#else
    fromLabel _ = O.overloadedMethod @info
#endif

#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveObjectMethod t Object, O.OverloadedMethod info Object p, R.HasField t Object p) => R.HasField t Object p where
    getField = O.overloadedMethod @info

#endif

instance (info ~ ResolveObjectMethod t Object, O.OverloadedMethodInfo info Object) => OL.IsLabel t (O.MethodProxy info Object) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.MethodProxy
#else
    fromLabel _ = O.MethodProxy
#endif

#endif

-- signal Object::close
-- | The [close](#g:signal:close) signal is emitted once during object close. The object
-- is dying and may not work.
type ObjectCloseCallback =
    IO ()

type C_ObjectCloseCallback =
    Ptr Object ->                           -- object
    Ptr () ->                               -- user_data
    IO ()

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

wrap_ObjectCloseCallback :: 
    GObject a => (a -> ObjectCloseCallback) ->
    C_ObjectCloseCallback
wrap_ObjectCloseCallback :: forall a. GObject a => (a -> IO ()) -> C_ObjectCloseCallback
wrap_ObjectCloseCallback a -> IO ()
gi'cb Ptr Object
gi'selfPtr Ptr ()
_ = do
    Ptr Object -> (Object -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Object
gi'selfPtr ((Object -> IO ()) -> IO ()) -> (Object -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Object
gi'self -> a -> IO ()
gi'cb (Object -> a
forall a b. Coercible a b => a -> b
Coerce.coerce Object
gi'self) 


-- | Connect a signal handler for the [close](#signal:close) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' object #close callback
-- @
-- 
-- 
onObjectClose :: (IsObject a, MonadIO m) => a -> ((?self :: a) => ObjectCloseCallback) -> m SignalHandlerId
onObjectClose :: forall a (m :: * -> *).
(IsObject a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
onObjectClose a
obj (?self::a) => IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
    let wrapped' :: C_ObjectCloseCallback
wrapped' = (a -> IO ()) -> C_ObjectCloseCallback
forall a. GObject a => (a -> IO ()) -> C_ObjectCloseCallback
wrap_ObjectCloseCallback a -> IO ()
wrapped
    FunPtr C_ObjectCloseCallback
wrapped'' <- C_ObjectCloseCallback -> IO (FunPtr C_ObjectCloseCallback)
mk_ObjectCloseCallback C_ObjectCloseCallback
wrapped'
    a
-> Text
-> FunPtr C_ObjectCloseCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"close" FunPtr C_ObjectCloseCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [close](#signal:close) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' object #close callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterObjectClose :: (IsObject a, MonadIO m) => a -> ((?self :: a) => ObjectCloseCallback) -> m SignalHandlerId
afterObjectClose :: forall a (m :: * -> *).
(IsObject a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
afterObjectClose a
obj (?self::a) => IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
    let wrapped' :: C_ObjectCloseCallback
wrapped' = (a -> IO ()) -> C_ObjectCloseCallback
forall a. GObject a => (a -> IO ()) -> C_ObjectCloseCallback
wrap_ObjectCloseCallback a -> IO ()
wrapped
    FunPtr C_ObjectCloseCallback
wrapped'' <- C_ObjectCloseCallback -> IO (FunPtr C_ObjectCloseCallback)
mk_ObjectCloseCallback C_ObjectCloseCallback
wrapped'
    a
-> Text
-> FunPtr C_ObjectCloseCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"close" FunPtr C_ObjectCloseCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data ObjectCloseSignalInfo
instance SignalInfo ObjectCloseSignalInfo where
    type HaskellCallbackType ObjectCloseSignalInfo = ObjectCloseCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_ObjectCloseCallback cb
        cb'' <- mk_ObjectCloseCallback cb'
        connectSignalFunPtr obj "close" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Object::close"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.4/docs/GI-Vips-Objects-Object.html#g:signal:close"})

#endif

-- signal Object::postbuild
-- | The [postbuild](#g:signal:postbuild) signal is emitted once just after successful object
-- construction. Return non-zero to cause object construction to fail.
type ObjectPostbuildCallback =
    IO Int32

type C_ObjectPostbuildCallback =
    Ptr Object ->                           -- object
    Ptr () ->                               -- user_data
    IO Int32

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

wrap_ObjectPostbuildCallback :: 
    GObject a => (a -> ObjectPostbuildCallback) ->
    C_ObjectPostbuildCallback
wrap_ObjectPostbuildCallback :: forall a.
GObject a =>
(a -> ObjectPostbuildCallback) -> C_ObjectPostbuildCallback
wrap_ObjectPostbuildCallback a -> ObjectPostbuildCallback
gi'cb Ptr Object
gi'selfPtr Ptr ()
_ = do
    Int32
result <- Ptr Object
-> (Object -> ObjectPostbuildCallback) -> ObjectPostbuildCallback
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Object
gi'selfPtr ((Object -> ObjectPostbuildCallback) -> ObjectPostbuildCallback)
-> (Object -> ObjectPostbuildCallback) -> ObjectPostbuildCallback
forall a b. (a -> b) -> a -> b
$ \Object
gi'self -> a -> ObjectPostbuildCallback
gi'cb (Object -> a
forall a b. Coercible a b => a -> b
Coerce.coerce Object
gi'self) 
    Int32 -> ObjectPostbuildCallback
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- | Connect a signal handler for the [postbuild](#signal:postbuild) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' object #postbuild callback
-- @
-- 
-- 
onObjectPostbuild :: (IsObject a, MonadIO m) => a -> ((?self :: a) => ObjectPostbuildCallback) -> m SignalHandlerId
onObjectPostbuild :: forall a (m :: * -> *).
(IsObject a, MonadIO m) =>
a -> ((?self::a) => ObjectPostbuildCallback) -> m SignalHandlerId
onObjectPostbuild a
obj (?self::a) => ObjectPostbuildCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> ObjectPostbuildCallback
wrapped a
self = let ?self = a
?self::a
self in ObjectPostbuildCallback
(?self::a) => ObjectPostbuildCallback
cb
    let wrapped' :: C_ObjectPostbuildCallback
wrapped' = (a -> ObjectPostbuildCallback) -> C_ObjectPostbuildCallback
forall a.
GObject a =>
(a -> ObjectPostbuildCallback) -> C_ObjectPostbuildCallback
wrap_ObjectPostbuildCallback a -> ObjectPostbuildCallback
wrapped
    FunPtr C_ObjectPostbuildCallback
wrapped'' <- C_ObjectPostbuildCallback -> IO (FunPtr C_ObjectPostbuildCallback)
mk_ObjectPostbuildCallback C_ObjectPostbuildCallback
wrapped'
    a
-> Text
-> FunPtr C_ObjectPostbuildCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"postbuild" FunPtr C_ObjectPostbuildCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [postbuild](#signal:postbuild) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' object #postbuild callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterObjectPostbuild :: (IsObject a, MonadIO m) => a -> ((?self :: a) => ObjectPostbuildCallback) -> m SignalHandlerId
afterObjectPostbuild :: forall a (m :: * -> *).
(IsObject a, MonadIO m) =>
a -> ((?self::a) => ObjectPostbuildCallback) -> m SignalHandlerId
afterObjectPostbuild a
obj (?self::a) => ObjectPostbuildCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> ObjectPostbuildCallback
wrapped a
self = let ?self = a
?self::a
self in ObjectPostbuildCallback
(?self::a) => ObjectPostbuildCallback
cb
    let wrapped' :: C_ObjectPostbuildCallback
wrapped' = (a -> ObjectPostbuildCallback) -> C_ObjectPostbuildCallback
forall a.
GObject a =>
(a -> ObjectPostbuildCallback) -> C_ObjectPostbuildCallback
wrap_ObjectPostbuildCallback a -> ObjectPostbuildCallback
wrapped
    FunPtr C_ObjectPostbuildCallback
wrapped'' <- C_ObjectPostbuildCallback -> IO (FunPtr C_ObjectPostbuildCallback)
mk_ObjectPostbuildCallback C_ObjectPostbuildCallback
wrapped'
    a
-> Text
-> FunPtr C_ObjectPostbuildCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"postbuild" FunPtr C_ObjectPostbuildCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data ObjectPostbuildSignalInfo
instance SignalInfo ObjectPostbuildSignalInfo where
    type HaskellCallbackType ObjectPostbuildSignalInfo = ObjectPostbuildCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_ObjectPostbuildCallback cb
        cb'' <- mk_ObjectPostbuildCallback cb'
        connectSignalFunPtr obj "postbuild" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Object::postbuild"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.4/docs/GI-Vips-Objects-Object.html#g:signal:postbuild"})

#endif

-- signal Object::postclose
-- | The [postclose](#g:signal:postclose) signal is emitted once after object close. The
-- object pointer is still valid, but nothing else.
type ObjectPostcloseCallback =
    IO ()

type C_ObjectPostcloseCallback =
    Ptr Object ->                           -- object
    Ptr () ->                               -- user_data
    IO ()

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

wrap_ObjectPostcloseCallback :: 
    GObject a => (a -> ObjectPostcloseCallback) ->
    C_ObjectPostcloseCallback
wrap_ObjectPostcloseCallback :: forall a. GObject a => (a -> IO ()) -> C_ObjectCloseCallback
wrap_ObjectPostcloseCallback a -> IO ()
gi'cb Ptr Object
gi'selfPtr Ptr ()
_ = do
    Ptr Object -> (Object -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Object
gi'selfPtr ((Object -> IO ()) -> IO ()) -> (Object -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Object
gi'self -> a -> IO ()
gi'cb (Object -> a
forall a b. Coercible a b => a -> b
Coerce.coerce Object
gi'self) 


-- | Connect a signal handler for the [postclose](#signal:postclose) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' object #postclose callback
-- @
-- 
-- 
onObjectPostclose :: (IsObject a, MonadIO m) => a -> ((?self :: a) => ObjectPostcloseCallback) -> m SignalHandlerId
onObjectPostclose :: forall a (m :: * -> *).
(IsObject a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
onObjectPostclose a
obj (?self::a) => IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
    let wrapped' :: C_ObjectCloseCallback
wrapped' = (a -> IO ()) -> C_ObjectCloseCallback
forall a. GObject a => (a -> IO ()) -> C_ObjectCloseCallback
wrap_ObjectPostcloseCallback a -> IO ()
wrapped
    FunPtr C_ObjectCloseCallback
wrapped'' <- C_ObjectCloseCallback -> IO (FunPtr C_ObjectCloseCallback)
mk_ObjectPostcloseCallback C_ObjectCloseCallback
wrapped'
    a
-> Text
-> FunPtr C_ObjectCloseCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"postclose" FunPtr C_ObjectCloseCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [postclose](#signal:postclose) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' object #postclose callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterObjectPostclose :: (IsObject a, MonadIO m) => a -> ((?self :: a) => ObjectPostcloseCallback) -> m SignalHandlerId
afterObjectPostclose :: forall a (m :: * -> *).
(IsObject a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
afterObjectPostclose a
obj (?self::a) => IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
    let wrapped' :: C_ObjectCloseCallback
wrapped' = (a -> IO ()) -> C_ObjectCloseCallback
forall a. GObject a => (a -> IO ()) -> C_ObjectCloseCallback
wrap_ObjectPostcloseCallback a -> IO ()
wrapped
    FunPtr C_ObjectCloseCallback
wrapped'' <- C_ObjectCloseCallback -> IO (FunPtr C_ObjectCloseCallback)
mk_ObjectPostcloseCallback C_ObjectCloseCallback
wrapped'
    a
-> Text
-> FunPtr C_ObjectCloseCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"postclose" FunPtr C_ObjectCloseCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data ObjectPostcloseSignalInfo
instance SignalInfo ObjectPostcloseSignalInfo where
    type HaskellCallbackType ObjectPostcloseSignalInfo = ObjectPostcloseCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_ObjectPostcloseCallback cb
        cb'' <- mk_ObjectPostcloseCallback cb'
        connectSignalFunPtr obj "postclose" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Object::postclose"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.4/docs/GI-Vips-Objects-Object.html#g:signal:postclose"})

#endif

-- signal Object::preclose
-- | The [preclose](#g:signal:preclose) signal is emitted once just before object close
-- starts. The oject is still alive.
type ObjectPrecloseCallback =
    IO ()

type C_ObjectPrecloseCallback =
    Ptr Object ->                           -- object
    Ptr () ->                               -- user_data
    IO ()

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

wrap_ObjectPrecloseCallback :: 
    GObject a => (a -> ObjectPrecloseCallback) ->
    C_ObjectPrecloseCallback
wrap_ObjectPrecloseCallback :: forall a. GObject a => (a -> IO ()) -> C_ObjectCloseCallback
wrap_ObjectPrecloseCallback a -> IO ()
gi'cb Ptr Object
gi'selfPtr Ptr ()
_ = do
    Ptr Object -> (Object -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Object
gi'selfPtr ((Object -> IO ()) -> IO ()) -> (Object -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Object
gi'self -> a -> IO ()
gi'cb (Object -> a
forall a b. Coercible a b => a -> b
Coerce.coerce Object
gi'self) 


-- | Connect a signal handler for the [preclose](#signal:preclose) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' object #preclose callback
-- @
-- 
-- 
onObjectPreclose :: (IsObject a, MonadIO m) => a -> ((?self :: a) => ObjectPrecloseCallback) -> m SignalHandlerId
onObjectPreclose :: forall a (m :: * -> *).
(IsObject a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
onObjectPreclose a
obj (?self::a) => IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
    let wrapped' :: C_ObjectCloseCallback
wrapped' = (a -> IO ()) -> C_ObjectCloseCallback
forall a. GObject a => (a -> IO ()) -> C_ObjectCloseCallback
wrap_ObjectPrecloseCallback a -> IO ()
wrapped
    FunPtr C_ObjectCloseCallback
wrapped'' <- C_ObjectCloseCallback -> IO (FunPtr C_ObjectCloseCallback)
mk_ObjectPrecloseCallback C_ObjectCloseCallback
wrapped'
    a
-> Text
-> FunPtr C_ObjectCloseCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"preclose" FunPtr C_ObjectCloseCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [preclose](#signal:preclose) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' object #preclose callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterObjectPreclose :: (IsObject a, MonadIO m) => a -> ((?self :: a) => ObjectPrecloseCallback) -> m SignalHandlerId
afterObjectPreclose :: forall a (m :: * -> *).
(IsObject a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
afterObjectPreclose a
obj (?self::a) => IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
    let wrapped' :: C_ObjectCloseCallback
wrapped' = (a -> IO ()) -> C_ObjectCloseCallback
forall a. GObject a => (a -> IO ()) -> C_ObjectCloseCallback
wrap_ObjectPrecloseCallback a -> IO ()
wrapped
    FunPtr C_ObjectCloseCallback
wrapped'' <- C_ObjectCloseCallback -> IO (FunPtr C_ObjectCloseCallback)
mk_ObjectPrecloseCallback C_ObjectCloseCallback
wrapped'
    a
-> Text
-> FunPtr C_ObjectCloseCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"preclose" FunPtr C_ObjectCloseCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data ObjectPrecloseSignalInfo
instance SignalInfo ObjectPrecloseSignalInfo where
    type HaskellCallbackType ObjectPrecloseSignalInfo = ObjectPrecloseCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_ObjectPrecloseCallback cb
        cb'' <- mk_ObjectPrecloseCallback cb'
        connectSignalFunPtr obj "preclose" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Object::preclose"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.4/docs/GI-Vips-Objects-Object.html#g:signal:preclose"})

#endif

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

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

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

-- | Construct a `GValueConstruct` with valid value for the “@description@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructObjectDescription :: (IsObject o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructObjectDescription :: forall o (m :: * -> *).
(IsObject o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructObjectDescription Text
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"description" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)

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

#if defined(ENABLE_OVERLOADING)
data ObjectDescriptionPropertyInfo
instance AttrInfo ObjectDescriptionPropertyInfo where
    type AttrAllowedOps ObjectDescriptionPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint ObjectDescriptionPropertyInfo = IsObject
    type AttrSetTypeConstraint ObjectDescriptionPropertyInfo = (~) T.Text
    type AttrTransferTypeConstraint ObjectDescriptionPropertyInfo = (~) T.Text
    type AttrTransferType ObjectDescriptionPropertyInfo = T.Text
    type AttrGetType ObjectDescriptionPropertyInfo = T.Text
    type AttrLabel ObjectDescriptionPropertyInfo = "description"
    type AttrOrigin ObjectDescriptionPropertyInfo = Object
    attrGet = getObjectDescription
    attrSet = setObjectDescription
    attrTransfer _ v = do
        return v
    attrConstruct = constructObjectDescription
    attrClear = clearObjectDescription
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Object.description"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.4/docs/GI-Vips-Objects-Object.html#g:attr:description"
        })
#endif

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

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

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

-- | Construct a `GValueConstruct` with valid value for the “@nickname@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructObjectNickname :: (IsObject o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructObjectNickname :: forall o (m :: * -> *).
(IsObject o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructObjectNickname Text
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"nickname" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)

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

#if defined(ENABLE_OVERLOADING)
data ObjectNicknamePropertyInfo
instance AttrInfo ObjectNicknamePropertyInfo where
    type AttrAllowedOps ObjectNicknamePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint ObjectNicknamePropertyInfo = IsObject
    type AttrSetTypeConstraint ObjectNicknamePropertyInfo = (~) T.Text
    type AttrTransferTypeConstraint ObjectNicknamePropertyInfo = (~) T.Text
    type AttrTransferType ObjectNicknamePropertyInfo = T.Text
    type AttrGetType ObjectNicknamePropertyInfo = (Maybe T.Text)
    type AttrLabel ObjectNicknamePropertyInfo = "nickname"
    type AttrOrigin ObjectNicknamePropertyInfo = Object
    attrGet = getObjectNickname
    attrSet = setObjectNickname
    attrTransfer _ v = do
        return v
    attrConstruct = constructObjectNickname
    attrClear = clearObjectNickname
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Object.nickname"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.4/docs/GI-Vips-Objects-Object.html#g:attr:nickname"
        })
#endif

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Object
type instance O.AttributeList Object = ObjectAttributeList
type ObjectAttributeList = ('[ '("description", ObjectDescriptionPropertyInfo), '("nickname", ObjectNicknamePropertyInfo)] :: [(Symbol, DK.Type)])
#endif

#if defined(ENABLE_OVERLOADING)
objectDescription :: AttrLabelProxy "description"
objectDescription = AttrLabelProxy

objectNickname :: AttrLabelProxy "nickname"
objectNickname = AttrLabelProxy

#endif

#if defined(ENABLE_OVERLOADING)
type instance O.SignalList Object = ObjectSignalList
type ObjectSignalList = ('[ '("close", ObjectCloseSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("postbuild", ObjectPostbuildSignalInfo), '("postclose", ObjectPostcloseSignalInfo), '("preclose", ObjectPrecloseSignalInfo)] :: [(Symbol, DK.Type)])

#endif

-- method Object::new_from_string
-- method type : Constructor
-- 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 = "p"
--           , 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 (TInterface Name { namespace = "Vips" , name = "Object" })
-- throws : False
-- Skip return : False

foreign import ccall "vips_object_new_from_string" vips_object_new_from_string :: 
    Ptr Vips.ObjectClass.ObjectClass ->     -- object_class : TInterface (Name {namespace = "Vips", name = "ObjectClass"})
    CString ->                              -- p : TBasicType TUTF8
    IO (Ptr Object)

-- | /No description available in the introspection data./
objectNewFromString ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Vips.ObjectClass.ObjectClass
    -> T.Text
    -> m Object
objectNewFromString :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
ObjectClass -> Text -> m Object
objectNewFromString ObjectClass
objectClass Text
p = IO Object -> m Object
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Object -> m Object) -> IO Object -> m Object
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
    CString
p' <- Text -> IO CString
textToCString Text
p
    Ptr Object
result <- Ptr ObjectClass -> CString -> IO (Ptr Object)
vips_object_new_from_string Ptr ObjectClass
objectClass' CString
p'
    Text -> Ptr Object -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"objectNewFromString" Ptr Object
result
    Object
result' <- ((ManagedPtr Object -> Object) -> Ptr Object -> IO Object
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Object -> Object
Object) Ptr Object
result
    ObjectClass -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr ObjectClass
objectClass
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
p'
    Object -> IO Object
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Object
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method Object::argument_isset
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "object"
--           , argType =
--               TInterface Name { namespace = "Vips" , name = "Object" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the object to fetch the args from"
--                 , 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 = Just "arg to fetch" , 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 "vips_object_argument_isset" vips_object_argument_isset :: 
    Ptr Object ->                           -- object : TInterface (Name {namespace = "Vips", name = "Object"})
    CString ->                              -- name : TBasicType TUTF8
    IO CInt

-- | Convenience: has an argument been assigned. Useful for bindings.
objectArgumentIsset ::
    (B.CallStack.HasCallStack, MonadIO m, IsObject a) =>
    a
    -- ^ /@object@/: the object to fetch the args from
    -> T.Text
    -- ^ /@name@/: arg to fetch
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the argument has been assigned.
objectArgumentIsset :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsObject a) =>
a -> Text -> m Bool
objectArgumentIsset a
object Text
name = IO Bool -> m Bool
forall a. IO a -> m a
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
    CString
name' <- Text -> IO CString
textToCString Text
name
    CInt
result <- Ptr Object -> CString -> IO CInt
vips_object_argument_isset Ptr Object
object' CString
name'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
object
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
    Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data ObjectArgumentIssetMethodInfo
instance (signature ~ (T.Text -> m Bool), MonadIO m, IsObject a) => O.OverloadedMethod ObjectArgumentIssetMethodInfo a signature where
    overloadedMethod = objectArgumentIsset

instance O.OverloadedMethodInfo ObjectArgumentIssetMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Object.objectArgumentIsset",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.4/docs/GI-Vips-Objects-Object.html#v:objectArgumentIsset"
        })


#endif

-- method Object::argument_needsstring
-- method type : OrdinaryMethod
-- 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 = "name"
--           , 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 TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "vips_object_argument_needsstring" vips_object_argument_needsstring :: 
    Ptr Object ->                           -- object : TInterface (Name {namespace = "Vips", name = "Object"})
    CString ->                              -- name : TBasicType TUTF8
    IO CInt

-- | /No description available in the introspection data./
objectArgumentNeedsstring ::
    (B.CallStack.HasCallStack, MonadIO m, IsObject a) =>
    a
    -> T.Text
    -> m Bool
objectArgumentNeedsstring :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsObject a) =>
a -> Text -> m Bool
objectArgumentNeedsstring a
object Text
name = IO Bool -> m Bool
forall a. IO a -> m a
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
    CString
name' <- Text -> IO CString
textToCString Text
name
    CInt
result <- Ptr Object -> CString -> IO CInt
vips_object_argument_needsstring Ptr Object
object' CString
name'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
object
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
    Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data ObjectArgumentNeedsstringMethodInfo
instance (signature ~ (T.Text -> m Bool), MonadIO m, IsObject a) => O.OverloadedMethod ObjectArgumentNeedsstringMethodInfo a signature where
    overloadedMethod = objectArgumentNeedsstring

instance O.OverloadedMethodInfo ObjectArgumentNeedsstringMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Object.objectArgumentNeedsstring",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.4/docs/GI-Vips-Objects-Object.html#v:objectArgumentNeedsstring"
        })


#endif

-- method Object::build
-- method type : OrdinaryMethod
-- 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 "vips_object_build" vips_object_build :: 
    Ptr Object ->                           -- object : TInterface (Name {namespace = "Vips", name = "Object"})
    IO Int32

-- | /No description available in the introspection data./
objectBuild ::
    (B.CallStack.HasCallStack, MonadIO m, IsObject a) =>
    a
    -> m Int32
objectBuild :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsObject a) =>
a -> m Int32
objectBuild a
object = ObjectPostbuildCallback -> m Int32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (ObjectPostbuildCallback -> m Int32)
-> ObjectPostbuildCallback -> 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 <- Ptr Object -> ObjectPostbuildCallback
vips_object_build Ptr Object
object'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
object
    Int32 -> ObjectPostbuildCallback
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

#if defined(ENABLE_OVERLOADING)
data ObjectBuildMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsObject a) => O.OverloadedMethod ObjectBuildMethodInfo a signature where
    overloadedMethod = objectBuild

instance O.OverloadedMethodInfo ObjectBuildMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Object.objectBuild",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.4/docs/GI-Vips-Objects-Object.html#v:objectBuild"
        })


#endif

-- method Object::get_argument_flags
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "object"
--           , argType =
--               TInterface Name { namespace = "Vips" , name = "Object" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the object to fetch the args from"
--                 , 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 = Just "arg to fetch" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "Vips" , name = "ArgumentFlags" })
-- throws : False
-- Skip return : False

foreign import ccall "vips_object_get_argument_flags" vips_object_get_argument_flags :: 
    Ptr Object ->                           -- object : TInterface (Name {namespace = "Vips", name = "Object"})
    CString ->                              -- name : TBasicType TUTF8
    IO CUInt

-- | Convenience: get the flags for an argument. Useful for bindings.
objectGetArgumentFlags ::
    (B.CallStack.HasCallStack, MonadIO m, IsObject a) =>
    a
    -- ^ /@object@/: the object to fetch the args from
    -> T.Text
    -- ^ /@name@/: arg to fetch
    -> m [Vips.Flags.ArgumentFlags]
    -- ^ __Returns:__ The t'GI.Vips.Flags.ArgumentFlags' for this argument.
objectGetArgumentFlags :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsObject a) =>
a -> Text -> m [ArgumentFlags]
objectGetArgumentFlags a
object Text
name = IO [ArgumentFlags] -> m [ArgumentFlags]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [ArgumentFlags] -> m [ArgumentFlags])
-> IO [ArgumentFlags] -> m [ArgumentFlags]
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
name' <- Text -> IO CString
textToCString Text
name
    CUInt
result <- Ptr Object -> CString -> IO CUInt
vips_object_get_argument_flags Ptr Object
object' CString
name'
    let result' :: [ArgumentFlags]
result' = CUInt -> [ArgumentFlags]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
object
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
    [ArgumentFlags] -> IO [ArgumentFlags]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [ArgumentFlags]
result'

#if defined(ENABLE_OVERLOADING)
data ObjectGetArgumentFlagsMethodInfo
instance (signature ~ (T.Text -> m [Vips.Flags.ArgumentFlags]), MonadIO m, IsObject a) => O.OverloadedMethod ObjectGetArgumentFlagsMethodInfo a signature where
    overloadedMethod = objectGetArgumentFlags

instance O.OverloadedMethodInfo ObjectGetArgumentFlagsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Object.objectGetArgumentFlags",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.4/docs/GI-Vips-Objects-Object.html#v:objectGetArgumentFlags"
        })


#endif

-- method Object::get_argument_priority
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "object"
--           , argType =
--               TInterface Name { namespace = "Vips" , name = "Object" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the object to fetch the args from"
--                 , 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 = Just "arg to fetch" , 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 "vips_object_get_argument_priority" vips_object_get_argument_priority :: 
    Ptr Object ->                           -- object : TInterface (Name {namespace = "Vips", name = "Object"})
    CString ->                              -- name : TBasicType TUTF8
    IO Int32

-- | Convenience: get the priority for an argument. Useful for bindings.
objectGetArgumentPriority ::
    (B.CallStack.HasCallStack, MonadIO m, IsObject a) =>
    a
    -- ^ /@object@/: the object to fetch the args from
    -> T.Text
    -- ^ /@name@/: arg to fetch
    -> m Int32
    -- ^ __Returns:__ The priority of this argument.
objectGetArgumentPriority :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsObject a) =>
a -> Text -> m Int32
objectGetArgumentPriority a
object Text
name = ObjectPostbuildCallback -> m Int32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (ObjectPostbuildCallback -> m Int32)
-> ObjectPostbuildCallback -> 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
name' <- Text -> IO CString
textToCString Text
name
    Int32
result <- Ptr Object -> CString -> ObjectPostbuildCallback
vips_object_get_argument_priority Ptr Object
object' CString
name'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
object
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
    Int32 -> ObjectPostbuildCallback
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

#if defined(ENABLE_OVERLOADING)
data ObjectGetArgumentPriorityMethodInfo
instance (signature ~ (T.Text -> m Int32), MonadIO m, IsObject a) => O.OverloadedMethod ObjectGetArgumentPriorityMethodInfo a signature where
    overloadedMethod = objectGetArgumentPriority

instance O.OverloadedMethodInfo ObjectGetArgumentPriorityMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Object.objectGetArgumentPriority",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.4/docs/GI-Vips-Objects-Object.html#v:objectGetArgumentPriority"
        })


#endif

-- method Object::get_argument_to_string
-- method type : OrdinaryMethod
-- 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 = "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 = "arg"
--           , 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 "vips_object_get_argument_to_string" vips_object_get_argument_to_string :: 
    Ptr Object ->                           -- object : TInterface (Name {namespace = "Vips", name = "Object"})
    CString ->                              -- name : TBasicType TUTF8
    CString ->                              -- arg : TBasicType TUTF8
    IO Int32

-- | /No description available in the introspection data./
objectGetArgumentToString ::
    (B.CallStack.HasCallStack, MonadIO m, IsObject a) =>
    a
    -> T.Text
    -> T.Text
    -> m Int32
objectGetArgumentToString :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsObject a) =>
a -> Text -> Text -> m Int32
objectGetArgumentToString a
object Text
name Text
arg = ObjectPostbuildCallback -> m Int32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (ObjectPostbuildCallback -> m Int32)
-> ObjectPostbuildCallback -> 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
name' <- Text -> IO CString
textToCString Text
name
    CString
arg' <- Text -> IO CString
textToCString Text
arg
    Int32
result <- Ptr Object -> CString -> CString -> ObjectPostbuildCallback
vips_object_get_argument_to_string Ptr Object
object' CString
name' CString
arg'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
object
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
arg'
    Int32 -> ObjectPostbuildCallback
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

#if defined(ENABLE_OVERLOADING)
data ObjectGetArgumentToStringMethodInfo
instance (signature ~ (T.Text -> T.Text -> m Int32), MonadIO m, IsObject a) => O.OverloadedMethod ObjectGetArgumentToStringMethodInfo a signature where
    overloadedMethod = objectGetArgumentToString

instance O.OverloadedMethodInfo ObjectGetArgumentToStringMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Object.objectGetArgumentToString",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.4/docs/GI-Vips-Objects-Object.html#v:objectGetArgumentToString"
        })


#endif

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

foreign import ccall "vips_object_get_description" vips_object_get_description :: 
    Ptr Object ->                           -- object : TInterface (Name {namespace = "Vips", name = "Object"})
    IO CString

-- | Fetch the object description. Useful for language bindings.
-- 
-- /@object@/.description is only avaliable after @/_build()/@, which can be too
-- late. This function fetches from the instance, if possible, but falls back
-- to the class description if we are too early.
objectGetDescription ::
    (B.CallStack.HasCallStack, MonadIO m, IsObject a) =>
    a
    -- ^ /@object@/: object to fetch description from
    -> m T.Text
    -- ^ __Returns:__ the object description
objectGetDescription :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsObject a) =>
a -> m Text
objectGetDescription a
object = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
    Ptr Object
object' <- a -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
object
    CString
result <- Ptr Object -> IO CString
vips_object_get_description Ptr Object
object'
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"objectGetDescription" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
object
    Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'

#if defined(ENABLE_OVERLOADING)
data ObjectGetDescriptionMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsObject a) => O.OverloadedMethod ObjectGetDescriptionMethodInfo a signature where
    overloadedMethod = objectGetDescription

instance O.OverloadedMethodInfo ObjectGetDescriptionMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Object.objectGetDescription",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.4/docs/GI-Vips-Objects-Object.html#v:objectGetDescription"
        })


#endif

-- method Object::local_cb
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "vobject"
--           , 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 = "gobject"
--           , argType =
--               TInterface Name { namespace = "GObject" , 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 "vips_object_local_cb" vips_object_local_cb :: 
    Ptr Object ->                           -- vobject : TInterface (Name {namespace = "Vips", name = "Object"})
    Ptr GObject.Object.Object ->            -- gobject : TInterface (Name {namespace = "GObject", name = "Object"})
    IO ()

-- | /No description available in the introspection data./
objectLocalCb ::
    (B.CallStack.HasCallStack, MonadIO m, IsObject a, GObject.Object.IsObject b) =>
    a
    -> b
    -> m ()
objectLocalCb :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsObject a, IsObject b) =>
a -> b -> m ()
objectLocalCb a
vobject b
gobject = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Object
vobject' <- a -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
vobject
    Ptr Object
gobject' <- b -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
gobject
    Ptr Object -> Ptr Object -> IO ()
vips_object_local_cb Ptr Object
vobject' Ptr Object
gobject'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
vobject
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
gobject
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ObjectLocalCbMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsObject a, GObject.Object.IsObject b) => O.OverloadedMethod ObjectLocalCbMethodInfo a signature where
    overloadedMethod = objectLocalCb

instance O.OverloadedMethodInfo ObjectLocalCbMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Object.objectLocalCb",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.4/docs/GI-Vips-Objects-Object.html#v:objectLocalCb"
        })


#endif

-- method Object::preclose
-- method type : OrdinaryMethod
-- 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 "vips_object_preclose" vips_object_preclose :: 
    Ptr Object ->                           -- object : TInterface (Name {namespace = "Vips", name = "Object"})
    IO ()

-- | /No description available in the introspection data./
objectPreclose ::
    (B.CallStack.HasCallStack, MonadIO m, IsObject a) =>
    a
    -> m ()
objectPreclose :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsObject a) =>
a -> m ()
objectPreclose a
object = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Object
object' <- a -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
object
    Ptr Object -> IO ()
vips_object_preclose Ptr Object
object'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
object
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ObjectPrecloseMethodInfo
instance (signature ~ (m ()), MonadIO m, IsObject a) => O.OverloadedMethod ObjectPrecloseMethodInfo a signature where
    overloadedMethod = objectPreclose

instance O.OverloadedMethodInfo ObjectPrecloseMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Object.objectPreclose",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.4/docs/GI-Vips-Objects-Object.html#v:objectPreclose"
        })


#endif

-- method Object::print_dump
-- method type : OrdinaryMethod
-- 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 "vips_object_print_dump" vips_object_print_dump :: 
    Ptr Object ->                           -- object : TInterface (Name {namespace = "Vips", name = "Object"})
    IO ()

-- | /No description available in the introspection data./
objectPrintDump ::
    (B.CallStack.HasCallStack, MonadIO m, IsObject a) =>
    a
    -> m ()
objectPrintDump :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsObject a) =>
a -> m ()
objectPrintDump a
object = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Object
object' <- a -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
object
    Ptr Object -> IO ()
vips_object_print_dump Ptr Object
object'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
object
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ObjectPrintDumpMethodInfo
instance (signature ~ (m ()), MonadIO m, IsObject a) => O.OverloadedMethod ObjectPrintDumpMethodInfo a signature where
    overloadedMethod = objectPrintDump

instance O.OverloadedMethodInfo ObjectPrintDumpMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Object.objectPrintDump",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.4/docs/GI-Vips-Objects-Object.html#v:objectPrintDump"
        })


#endif

-- method Object::print_name
-- method type : OrdinaryMethod
-- 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 "vips_object_print_name" vips_object_print_name :: 
    Ptr Object ->                           -- object : TInterface (Name {namespace = "Vips", name = "Object"})
    IO ()

-- | /No description available in the introspection data./
objectPrintName ::
    (B.CallStack.HasCallStack, MonadIO m, IsObject a) =>
    a
    -> m ()
objectPrintName :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsObject a) =>
a -> m ()
objectPrintName a
object = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Object
object' <- a -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
object
    Ptr Object -> IO ()
vips_object_print_name Ptr Object
object'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
object
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ObjectPrintNameMethodInfo
instance (signature ~ (m ()), MonadIO m, IsObject a) => O.OverloadedMethod ObjectPrintNameMethodInfo a signature where
    overloadedMethod = objectPrintName

instance O.OverloadedMethodInfo ObjectPrintNameMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Object.objectPrintName",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.4/docs/GI-Vips-Objects-Object.html#v:objectPrintName"
        })


#endif

-- method Object::print_summary
-- method type : OrdinaryMethod
-- 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 "vips_object_print_summary" vips_object_print_summary :: 
    Ptr Object ->                           -- object : TInterface (Name {namespace = "Vips", name = "Object"})
    IO ()

-- | /No description available in the introspection data./
objectPrintSummary ::
    (B.CallStack.HasCallStack, MonadIO m, IsObject a) =>
    a
    -> m ()
objectPrintSummary :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsObject a) =>
a -> m ()
objectPrintSummary a
object = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Object
object' <- a -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
object
    Ptr Object -> IO ()
vips_object_print_summary Ptr Object
object'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
object
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ObjectPrintSummaryMethodInfo
instance (signature ~ (m ()), MonadIO m, IsObject a) => O.OverloadedMethod ObjectPrintSummaryMethodInfo a signature where
    overloadedMethod = objectPrintSummary

instance O.OverloadedMethodInfo ObjectPrintSummaryMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Object.objectPrintSummary",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.4/docs/GI-Vips-Objects-Object.html#v:objectPrintSummary"
        })


#endif

-- method Object::rewind
-- method type : OrdinaryMethod
-- 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 "vips_object_rewind" vips_object_rewind :: 
    Ptr Object ->                           -- object : TInterface (Name {namespace = "Vips", name = "Object"})
    IO ()

-- | /No description available in the introspection data./
objectRewind ::
    (B.CallStack.HasCallStack, MonadIO m, IsObject a) =>
    a
    -> m ()
objectRewind :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsObject a) =>
a -> m ()
objectRewind a
object = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Object
object' <- a -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
object
    Ptr Object -> IO ()
vips_object_rewind Ptr Object
object'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
object
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ObjectRewindMethodInfo
instance (signature ~ (m ()), MonadIO m, IsObject a) => O.OverloadedMethod ObjectRewindMethodInfo a signature where
    overloadedMethod = objectRewind

instance O.OverloadedMethodInfo ObjectRewindMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Object.objectRewind",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.4/docs/GI-Vips-Objects-Object.html#v:objectRewind"
        })


#endif

-- method Object::sanity
-- method type : OrdinaryMethod
-- 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 "vips_object_sanity" vips_object_sanity :: 
    Ptr Object ->                           -- object : TInterface (Name {namespace = "Vips", name = "Object"})
    IO CInt

-- | /No description available in the introspection data./
objectSanity ::
    (B.CallStack.HasCallStack, MonadIO m, IsObject a) =>
    a
    -> m Bool
objectSanity :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsObject a) =>
a -> m Bool
objectSanity a
object = IO Bool -> m Bool
forall a. IO a -> m a
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 <- Ptr Object -> IO CInt
vips_object_sanity 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 a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data ObjectSanityMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsObject a) => O.OverloadedMethod ObjectSanityMethodInfo a signature where
    overloadedMethod = objectSanity

instance O.OverloadedMethodInfo ObjectSanityMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Object.objectSanity",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.4/docs/GI-Vips-Objects-Object.html#v:objectSanity"
        })


#endif

-- method Object::set_argument_from_string
-- method type : OrdinaryMethod
-- 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 = "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 = 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 "vips_object_set_argument_from_string" vips_object_set_argument_from_string :: 
    Ptr Object ->                           -- object : TInterface (Name {namespace = "Vips", name = "Object"})
    CString ->                              -- name : TBasicType TUTF8
    CString ->                              -- value : TBasicType TUTF8
    IO Int32

-- | /No description available in the introspection data./
objectSetArgumentFromString ::
    (B.CallStack.HasCallStack, MonadIO m, IsObject a) =>
    a
    -> T.Text
    -> T.Text
    -> m Int32
objectSetArgumentFromString :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsObject a) =>
a -> Text -> Text -> m Int32
objectSetArgumentFromString a
object Text
name Text
value = ObjectPostbuildCallback -> m Int32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (ObjectPostbuildCallback -> m Int32)
-> ObjectPostbuildCallback -> 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
name' <- Text -> IO CString
textToCString Text
name
    CString
value' <- Text -> IO CString
textToCString Text
value
    Int32
result <- Ptr Object -> CString -> CString -> ObjectPostbuildCallback
vips_object_set_argument_from_string Ptr Object
object' CString
name' CString
value'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
object
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
value'
    Int32 -> ObjectPostbuildCallback
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

#if defined(ENABLE_OVERLOADING)
data ObjectSetArgumentFromStringMethodInfo
instance (signature ~ (T.Text -> T.Text -> m Int32), MonadIO m, IsObject a) => O.OverloadedMethod ObjectSetArgumentFromStringMethodInfo a signature where
    overloadedMethod = objectSetArgumentFromString

instance O.OverloadedMethodInfo ObjectSetArgumentFromStringMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Object.objectSetArgumentFromString",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.4/docs/GI-Vips-Objects-Object.html#v:objectSetArgumentFromString"
        })


#endif

-- method Object::set_from_string
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "object"
--           , argType =
--               TInterface Name { namespace = "Vips" , name = "Object" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "object to set arguments on"
--                 , 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 = Just "arguments as a string"
--                 , 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 "vips_object_set_from_string" vips_object_set_from_string :: 
    Ptr Object ->                           -- object : TInterface (Name {namespace = "Vips", name = "Object"})
    CString ->                              -- string : TBasicType TUTF8
    IO Int32

-- | Set object arguments from a string. The string can be something like
-- \"a=12\", or \"a = 12, b = 13\", or \"fred\". The string can optionally be
-- enclosed in brackets.
-- 
-- You\'d typically use this between creating the object and building it.
-- 
-- See also: @/vips_object_set()/@, 'GI.Vips.Objects.Object.objectBuild',
-- @/vips_cache_operation_buildp()/@.
objectSetFromString ::
    (B.CallStack.HasCallStack, MonadIO m, IsObject a) =>
    a
    -- ^ /@object@/: object to set arguments on
    -> T.Text
    -- ^ /@string@/: arguments as a string
    -> m Int32
    -- ^ __Returns:__ 0 on success, -1 on error
objectSetFromString :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsObject a) =>
a -> Text -> m Int32
objectSetFromString a
object Text
string = ObjectPostbuildCallback -> m Int32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (ObjectPostbuildCallback -> m Int32)
-> ObjectPostbuildCallback -> 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 <- Ptr Object -> CString -> ObjectPostbuildCallback
vips_object_set_from_string 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 -> ObjectPostbuildCallback
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

#if defined(ENABLE_OVERLOADING)
data ObjectSetFromStringMethodInfo
instance (signature ~ (T.Text -> m Int32), MonadIO m, IsObject a) => O.OverloadedMethod ObjectSetFromStringMethodInfo a signature where
    overloadedMethod = objectSetFromString

instance O.OverloadedMethodInfo ObjectSetFromStringMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Object.objectSetFromString",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.4/docs/GI-Vips-Objects-Object.html#v:objectSetFromString"
        })


#endif

-- XXX Could not generate method Object::set_required
-- Bad introspection data: Could not resolve the symbol “vips_object_set_required” in the “Vips” namespace, ignoring.
#if defined(ENABLE_OVERLOADING)
-- XXX: Dummy instance, since code generation failed.
-- Please file a bug at http://github.com/haskell-gi/haskell-gi.
data ObjectSetRequiredMethodInfo
instance (p ~ (), o ~ O.UnsupportedMethodError "setRequired" Object) => O.OverloadedMethod ObjectSetRequiredMethodInfo o p where
    overloadedMethod = undefined

instance (o ~ O.UnsupportedMethodError "setRequired" Object) => O.OverloadedMethodInfo ObjectSetRequiredMethodInfo o where
    overloadedMethodInfo = undefined

#endif

-- method Object::set_static
-- method type : OrdinaryMethod
-- 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 = "static_object"
--           , argType = TBasicType TBoolean
--           , 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 "vips_object_set_static" vips_object_set_static :: 
    Ptr Object ->                           -- object : TInterface (Name {namespace = "Vips", name = "Object"})
    CInt ->                                 -- static_object : TBasicType TBoolean
    IO ()

-- | /No description available in the introspection data./
objectSetStatic ::
    (B.CallStack.HasCallStack, MonadIO m, IsObject a) =>
    a
    -> Bool
    -> m ()
objectSetStatic :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsObject a) =>
a -> Bool -> m ()
objectSetStatic a
object Bool
staticObject = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Object
object' <- a -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
object
    let staticObject' :: CInt
staticObject' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.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
P.fromEnum) Bool
staticObject
    Ptr Object -> CInt -> IO ()
vips_object_set_static Ptr Object
object' CInt
staticObject'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
object
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ObjectSetStaticMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsObject a) => O.OverloadedMethod ObjectSetStaticMethodInfo a signature where
    overloadedMethod = objectSetStatic

instance O.OverloadedMethodInfo ObjectSetStaticMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Object.objectSetStatic",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.4/docs/GI-Vips-Objects-Object.html#v:objectSetStatic"
        })


#endif

-- method Object::to_string
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "object"
--           , argType =
--               TInterface Name { namespace = "Vips" , name = "Object" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "object to stringify"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "buf"
--           , argType = TInterface Name { namespace = "Vips" , name = "Buf" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "write string here" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "vips_object_to_string" vips_object_to_string :: 
    Ptr Object ->                           -- object : TInterface (Name {namespace = "Vips", name = "Object"})
    Ptr Vips.Buf.Buf ->                     -- buf : TInterface (Name {namespace = "Vips", name = "Buf"})
    IO ()

-- | The inverse of 'GI.Vips.Objects.Object.objectNewFromString': turn /@object@/ into eg.
-- \"VipsInterpolateSnohalo1(blur=.333333)\".
objectToString ::
    (B.CallStack.HasCallStack, MonadIO m, IsObject a) =>
    a
    -- ^ /@object@/: object to stringify
    -> Vips.Buf.Buf
    -- ^ /@buf@/: write string here
    -> m ()
objectToString :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsObject a) =>
a -> Buf -> m ()
objectToString a
object Buf
buf = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Object
object' <- a -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
object
    Ptr Buf
buf' <- Buf -> IO (Ptr Buf)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Buf
buf
    Ptr Object -> Ptr Buf -> IO ()
vips_object_to_string Ptr Object
object' Ptr Buf
buf'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
object
    Buf -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Buf
buf
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ObjectToStringMethodInfo
instance (signature ~ (Vips.Buf.Buf -> m ()), MonadIO m, IsObject a) => O.OverloadedMethod ObjectToStringMethodInfo a signature where
    overloadedMethod = objectToString

instance O.OverloadedMethodInfo ObjectToStringMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Object.objectToString",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.4/docs/GI-Vips-Objects-Object.html#v:objectToString"
        })


#endif

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

foreign import ccall "vips_object_unref_outputs" vips_object_unref_outputs :: 
    Ptr Object ->                           -- object : TInterface (Name {namespace = "Vips", name = "Object"})
    IO ()

-- | Unref all assigned output objects. Useful for language bindings.
-- 
-- After an object is built, all output args are owned by the caller. If
-- something goes wrong before then, we have to unref the outputs that have
-- been made so far. This function can also be useful for callers when
-- they\'ve finished processing outputs themselves.
-- 
-- See also: 'GI.Vips.Functions.cacheOperationBuild'.
objectUnrefOutputs ::
    (B.CallStack.HasCallStack, MonadIO m, IsObject a) =>
    a
    -- ^ /@object@/: object to drop output refs from
    -> m ()
objectUnrefOutputs :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsObject a) =>
a -> m ()
objectUnrefOutputs a
object = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Object
object' <- a -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
object
    Ptr Object -> IO ()
vips_object_unref_outputs Ptr Object
object'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
object
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ObjectUnrefOutputsMethodInfo
instance (signature ~ (m ()), MonadIO m, IsObject a) => O.OverloadedMethod ObjectUnrefOutputsMethodInfo a signature where
    overloadedMethod = objectUnrefOutputs

instance O.OverloadedMethodInfo ObjectUnrefOutputsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Object.objectUnrefOutputs",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.4/docs/GI-Vips-Objects-Object.html#v:objectUnrefOutputs"
        })


#endif

-- method Object::get_property
-- method type : MemberFunction
-- Args: [ Arg
--           { argCName = "gobject"
--           , argType =
--               TInterface Name { namespace = "GObject" , name = "Object" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "property_id"
--           , argType = TBasicType TUInt
--           , 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 = "pspec"
--           , argType = TParamSpec
--           , 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 "vips_object_get_property" vips_object_get_property :: 
    Ptr GObject.Object.Object ->            -- gobject : TInterface (Name {namespace = "GObject", name = "Object"})
    Word32 ->                               -- property_id : TBasicType TUInt
    Ptr GValue ->                           -- value : TGValue
    Ptr GParamSpec ->                       -- pspec : TParamSpec
    IO ()

-- | /No description available in the introspection data./
objectGetProperty ::
    (B.CallStack.HasCallStack, MonadIO m, GObject.Object.IsObject a) =>
    a
    -> Word32
    -> GValue
    -> GParamSpec
    -> m ()
objectGetProperty :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsObject a) =>
a -> Word32 -> GValue -> GParamSpec -> m ()
objectGetProperty a
gobject Word32
propertyId GValue
value GParamSpec
pspec = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Object
gobject' <- a -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
gobject
    Ptr GValue
value' <- GValue -> IO (Ptr GValue)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GValue
value
    Ptr GParamSpec
pspec' <- GParamSpec -> IO (Ptr GParamSpec)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GParamSpec
pspec
    Ptr Object -> Word32 -> Ptr GValue -> Ptr GParamSpec -> IO ()
vips_object_get_property Ptr Object
gobject' Word32
propertyId Ptr GValue
value' Ptr GParamSpec
pspec'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
gobject
    GValue -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GValue
value
    GParamSpec -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GParamSpec
pspec
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
#endif

-- method Object::print_all
-- method type : MemberFunction
-- Args: []
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "vips_object_print_all" vips_object_print_all :: 
    IO ()

-- | /No description available in the introspection data./
objectPrintAll ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m ()
objectPrintAll :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m ()
objectPrintAll  = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    IO ()
vips_object_print_all
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
#endif

-- method Object::print_summary_class
-- method type : MemberFunction
-- Args: [ Arg
--           { argCName = "klass"
--           , 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
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "vips_object_print_summary_class" vips_object_print_summary_class :: 
    Ptr Vips.ObjectClass.ObjectClass ->     -- klass : TInterface (Name {namespace = "Vips", name = "ObjectClass"})
    IO ()

-- | /No description available in the introspection data./
objectPrintSummaryClass ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Vips.ObjectClass.ObjectClass
    -> m ()
objectPrintSummaryClass :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
ObjectClass -> m ()
objectPrintSummaryClass ObjectClass
klass = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr ObjectClass
klass' <- ObjectClass -> IO (Ptr ObjectClass)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr ObjectClass
klass
    Ptr ObjectClass -> IO ()
vips_object_print_summary_class Ptr ObjectClass
klass'
    ObjectClass -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr ObjectClass
klass
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
#endif

-- method Object::sanity_all
-- method type : MemberFunction
-- Args: []
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "vips_object_sanity_all" vips_object_sanity_all :: 
    IO ()

-- | /No description available in the introspection data./
objectSanityAll ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m ()
objectSanityAll :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m ()
objectSanityAll  = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    IO ()
vips_object_sanity_all
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
#endif

-- method Object::set_property
-- method type : MemberFunction
-- Args: [ Arg
--           { argCName = "gobject"
--           , argType =
--               TInterface Name { namespace = "GObject" , name = "Object" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "property_id"
--           , argType = TBasicType TUInt
--           , 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 = "pspec"
--           , argType = TParamSpec
--           , 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 "vips_object_set_property" vips_object_set_property :: 
    Ptr GObject.Object.Object ->            -- gobject : TInterface (Name {namespace = "GObject", name = "Object"})
    Word32 ->                               -- property_id : TBasicType TUInt
    Ptr GValue ->                           -- value : TGValue
    Ptr GParamSpec ->                       -- pspec : TParamSpec
    IO ()

-- | /No description available in the introspection data./
objectSetProperty ::
    (B.CallStack.HasCallStack, MonadIO m, GObject.Object.IsObject a) =>
    a
    -> Word32
    -> GValue
    -> GParamSpec
    -> m ()
objectSetProperty :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsObject a) =>
a -> Word32 -> GValue -> GParamSpec -> m ()
objectSetProperty a
gobject Word32
propertyId GValue
value GParamSpec
pspec = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Object
gobject' <- a -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
gobject
    Ptr GValue
value' <- GValue -> IO (Ptr GValue)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GValue
value
    Ptr GParamSpec
pspec' <- GParamSpec -> IO (Ptr GParamSpec)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GParamSpec
pspec
    Ptr Object -> Word32 -> Ptr GValue -> Ptr GParamSpec -> IO ()
vips_object_set_property Ptr Object
gobject' Word32
propertyId Ptr GValue
value' Ptr GParamSpec
pspec'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
gobject
    GValue -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GValue
value
    GParamSpec -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GParamSpec
pspec
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
#endif