{- |
Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License    : LGPL-2.1
Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)
-}

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

module GI.GIRepository.Functions
    (

 -- * Methods
-- ** argInfoGetClosure #method:argInfoGetClosure#

    argInfoGetClosure                       ,


-- ** argInfoGetDestroy #method:argInfoGetDestroy#

    argInfoGetDestroy                       ,


-- ** argInfoGetDirection #method:argInfoGetDirection#

    argInfoGetDirection                     ,


-- ** argInfoGetOwnershipTransfer #method:argInfoGetOwnershipTransfer#

    argInfoGetOwnershipTransfer             ,


-- ** argInfoGetScope #method:argInfoGetScope#

    argInfoGetScope                         ,


-- ** argInfoGetType #method:argInfoGetType#

    argInfoGetType                          ,


-- ** argInfoIsCallerAllocates #method:argInfoIsCallerAllocates#

    argInfoIsCallerAllocates                ,


-- ** argInfoIsOptional #method:argInfoIsOptional#

    argInfoIsOptional                       ,


-- ** argInfoIsReturnValue #method:argInfoIsReturnValue#

    argInfoIsReturnValue                    ,


-- ** argInfoIsSkip #method:argInfoIsSkip#

    argInfoIsSkip                           ,


-- ** argInfoLoadType #method:argInfoLoadType#

    argInfoLoadType                         ,


-- ** argInfoMayBeNull #method:argInfoMayBeNull#

    argInfoMayBeNull                        ,


-- ** callableInfoCanThrowGerror #method:callableInfoCanThrowGerror#

    callableInfoCanThrowGerror              ,


-- ** callableInfoGetArg #method:callableInfoGetArg#

    callableInfoGetArg                      ,


-- ** callableInfoGetCallerOwns #method:callableInfoGetCallerOwns#

    callableInfoGetCallerOwns               ,


-- ** callableInfoGetInstanceOwnershipTransfer #method:callableInfoGetInstanceOwnershipTransfer#

    callableInfoGetInstanceOwnershipTransfer,


-- ** callableInfoGetNArgs #method:callableInfoGetNArgs#

    callableInfoGetNArgs                    ,


-- ** callableInfoGetReturnAttribute #method:callableInfoGetReturnAttribute#

    callableInfoGetReturnAttribute          ,


-- ** callableInfoGetReturnType #method:callableInfoGetReturnType#

    callableInfoGetReturnType               ,


-- ** callableInfoInvoke #method:callableInfoInvoke#

    callableInfoInvoke                      ,


-- ** callableInfoIsMethod #method:callableInfoIsMethod#

    callableInfoIsMethod                    ,


-- ** callableInfoIterateReturnAttributes #method:callableInfoIterateReturnAttributes#

    callableInfoIterateReturnAttributes     ,


-- ** callableInfoLoadArg #method:callableInfoLoadArg#

    callableInfoLoadArg                     ,


-- ** callableInfoLoadReturnType #method:callableInfoLoadReturnType#

    callableInfoLoadReturnType              ,


-- ** callableInfoMayReturnNull #method:callableInfoMayReturnNull#

    callableInfoMayReturnNull               ,


-- ** callableInfoSkipReturn #method:callableInfoSkipReturn#

    callableInfoSkipReturn                  ,


-- ** cclosureMarshalGeneric #method:cclosureMarshalGeneric#

    cclosureMarshalGeneric                  ,


-- ** constantInfoGetType #method:constantInfoGetType#

    constantInfoGetType                     ,


-- ** enumInfoGetErrorDomain #method:enumInfoGetErrorDomain#

    enumInfoGetErrorDomain                  ,


-- ** enumInfoGetMethod #method:enumInfoGetMethod#

    enumInfoGetMethod                       ,


-- ** enumInfoGetNMethods #method:enumInfoGetNMethods#

    enumInfoGetNMethods                     ,


-- ** enumInfoGetNValues #method:enumInfoGetNValues#

    enumInfoGetNValues                      ,


-- ** enumInfoGetStorageType #method:enumInfoGetStorageType#

    enumInfoGetStorageType                  ,


-- ** enumInfoGetValue #method:enumInfoGetValue#

    enumInfoGetValue                        ,


-- ** fieldInfoGetFlags #method:fieldInfoGetFlags#

    fieldInfoGetFlags                       ,


-- ** fieldInfoGetOffset #method:fieldInfoGetOffset#

    fieldInfoGetOffset                      ,


-- ** fieldInfoGetSize #method:fieldInfoGetSize#

    fieldInfoGetSize                        ,


-- ** fieldInfoGetType #method:fieldInfoGetType#

    fieldInfoGetType                        ,


-- ** functionInfoGetFlags #method:functionInfoGetFlags#

    functionInfoGetFlags                    ,


-- ** functionInfoGetProperty #method:functionInfoGetProperty#

    functionInfoGetProperty                 ,


-- ** functionInfoGetSymbol #method:functionInfoGetSymbol#

    functionInfoGetSymbol                   ,


-- ** functionInfoGetVfunc #method:functionInfoGetVfunc#

    functionInfoGetVfunc                    ,


-- ** infoNew #method:infoNew#

    infoNew                                 ,


-- ** infoTypeToString #method:infoTypeToString#

    infoTypeToString                        ,


-- ** interfaceInfoFindMethod #method:interfaceInfoFindMethod#

    interfaceInfoFindMethod                 ,


-- ** interfaceInfoFindSignal #method:interfaceInfoFindSignal#

    interfaceInfoFindSignal                 ,


-- ** interfaceInfoFindVfunc #method:interfaceInfoFindVfunc#

    interfaceInfoFindVfunc                  ,


-- ** interfaceInfoGetConstant #method:interfaceInfoGetConstant#

    interfaceInfoGetConstant                ,


-- ** interfaceInfoGetIfaceStruct #method:interfaceInfoGetIfaceStruct#

    interfaceInfoGetIfaceStruct             ,


-- ** interfaceInfoGetMethod #method:interfaceInfoGetMethod#

    interfaceInfoGetMethod                  ,


-- ** interfaceInfoGetNConstants #method:interfaceInfoGetNConstants#

    interfaceInfoGetNConstants              ,


-- ** interfaceInfoGetNMethods #method:interfaceInfoGetNMethods#

    interfaceInfoGetNMethods                ,


-- ** interfaceInfoGetNPrerequisites #method:interfaceInfoGetNPrerequisites#

    interfaceInfoGetNPrerequisites          ,


-- ** interfaceInfoGetNProperties #method:interfaceInfoGetNProperties#

    interfaceInfoGetNProperties             ,


-- ** interfaceInfoGetNSignals #method:interfaceInfoGetNSignals#

    interfaceInfoGetNSignals                ,


-- ** interfaceInfoGetNVfuncs #method:interfaceInfoGetNVfuncs#

    interfaceInfoGetNVfuncs                 ,


-- ** interfaceInfoGetPrerequisite #method:interfaceInfoGetPrerequisite#

    interfaceInfoGetPrerequisite            ,


-- ** interfaceInfoGetProperty #method:interfaceInfoGetProperty#

    interfaceInfoGetProperty                ,


-- ** interfaceInfoGetSignal #method:interfaceInfoGetSignal#

    interfaceInfoGetSignal                  ,


-- ** interfaceInfoGetVfunc #method:interfaceInfoGetVfunc#

    interfaceInfoGetVfunc                   ,


-- ** invokeErrorQuark #method:invokeErrorQuark#

    invokeErrorQuark                        ,


-- ** objectInfoFindMethod #method:objectInfoFindMethod#

    objectInfoFindMethod                    ,


-- ** objectInfoFindMethodUsingInterfaces #method:objectInfoFindMethodUsingInterfaces#

    objectInfoFindMethodUsingInterfaces     ,


-- ** objectInfoFindSignal #method:objectInfoFindSignal#

    objectInfoFindSignal                    ,


-- ** objectInfoFindVfunc #method:objectInfoFindVfunc#

    objectInfoFindVfunc                     ,


-- ** objectInfoFindVfuncUsingInterfaces #method:objectInfoFindVfuncUsingInterfaces#

    objectInfoFindVfuncUsingInterfaces      ,


-- ** objectInfoGetAbstract #method:objectInfoGetAbstract#

    objectInfoGetAbstract                   ,


-- ** objectInfoGetClassStruct #method:objectInfoGetClassStruct#

    objectInfoGetClassStruct                ,


-- ** objectInfoGetConstant #method:objectInfoGetConstant#

    objectInfoGetConstant                   ,


-- ** objectInfoGetField #method:objectInfoGetField#

    objectInfoGetField                      ,


-- ** objectInfoGetFundamental #method:objectInfoGetFundamental#

    objectInfoGetFundamental                ,


-- ** objectInfoGetGetValueFunction #method:objectInfoGetGetValueFunction#

    objectInfoGetGetValueFunction           ,


-- ** objectInfoGetInterface #method:objectInfoGetInterface#

    objectInfoGetInterface                  ,


-- ** objectInfoGetMethod #method:objectInfoGetMethod#

    objectInfoGetMethod                     ,


-- ** objectInfoGetNConstants #method:objectInfoGetNConstants#

    objectInfoGetNConstants                 ,


-- ** objectInfoGetNFields #method:objectInfoGetNFields#

    objectInfoGetNFields                    ,


-- ** objectInfoGetNInterfaces #method:objectInfoGetNInterfaces#

    objectInfoGetNInterfaces                ,


-- ** objectInfoGetNMethods #method:objectInfoGetNMethods#

    objectInfoGetNMethods                   ,


-- ** objectInfoGetNProperties #method:objectInfoGetNProperties#

    objectInfoGetNProperties                ,


-- ** objectInfoGetNSignals #method:objectInfoGetNSignals#

    objectInfoGetNSignals                   ,


-- ** objectInfoGetNVfuncs #method:objectInfoGetNVfuncs#

    objectInfoGetNVfuncs                    ,


-- ** objectInfoGetParent #method:objectInfoGetParent#

    objectInfoGetParent                     ,


-- ** objectInfoGetProperty #method:objectInfoGetProperty#

    objectInfoGetProperty                   ,


-- ** objectInfoGetRefFunction #method:objectInfoGetRefFunction#

    objectInfoGetRefFunction                ,


-- ** objectInfoGetSetValueFunction #method:objectInfoGetSetValueFunction#

    objectInfoGetSetValueFunction           ,


-- ** objectInfoGetSignal #method:objectInfoGetSignal#

    objectInfoGetSignal                     ,


-- ** objectInfoGetTypeInit #method:objectInfoGetTypeInit#

    objectInfoGetTypeInit                   ,


-- ** objectInfoGetTypeName #method:objectInfoGetTypeName#

    objectInfoGetTypeName                   ,


-- ** objectInfoGetUnrefFunction #method:objectInfoGetUnrefFunction#

    objectInfoGetUnrefFunction              ,


-- ** objectInfoGetVfunc #method:objectInfoGetVfunc#

    objectInfoGetVfunc                      ,


-- ** propertyInfoGetFlags #method:propertyInfoGetFlags#

    propertyInfoGetFlags                    ,


-- ** propertyInfoGetOwnershipTransfer #method:propertyInfoGetOwnershipTransfer#

    propertyInfoGetOwnershipTransfer        ,


-- ** propertyInfoGetType #method:propertyInfoGetType#

    propertyInfoGetType                     ,


-- ** registeredTypeInfoGetGType #method:registeredTypeInfoGetGType#

    registeredTypeInfoGetGType              ,


-- ** registeredTypeInfoGetTypeInit #method:registeredTypeInfoGetTypeInit#

    registeredTypeInfoGetTypeInit           ,


-- ** registeredTypeInfoGetTypeName #method:registeredTypeInfoGetTypeName#

    registeredTypeInfoGetTypeName           ,


-- ** signalInfoGetClassClosure #method:signalInfoGetClassClosure#

    signalInfoGetClassClosure               ,


-- ** signalInfoGetFlags #method:signalInfoGetFlags#

    signalInfoGetFlags                      ,


-- ** signalInfoTrueStopsEmit #method:signalInfoTrueStopsEmit#

    signalInfoTrueStopsEmit                 ,


-- ** structInfoFindField #method:structInfoFindField#

    structInfoFindField                     ,


-- ** structInfoFindMethod #method:structInfoFindMethod#

    structInfoFindMethod                    ,


-- ** structInfoGetAlignment #method:structInfoGetAlignment#

    structInfoGetAlignment                  ,


-- ** structInfoGetField #method:structInfoGetField#

    structInfoGetField                      ,


-- ** structInfoGetMethod #method:structInfoGetMethod#

    structInfoGetMethod                     ,


-- ** structInfoGetNFields #method:structInfoGetNFields#

    structInfoGetNFields                    ,


-- ** structInfoGetNMethods #method:structInfoGetNMethods#

    structInfoGetNMethods                   ,


-- ** structInfoGetSize #method:structInfoGetSize#

    structInfoGetSize                       ,


-- ** structInfoIsForeign #method:structInfoIsForeign#

    structInfoIsForeign                     ,


-- ** structInfoIsGtypeStruct #method:structInfoIsGtypeStruct#

    structInfoIsGtypeStruct                 ,


-- ** typeInfoGetArrayFixedSize #method:typeInfoGetArrayFixedSize#

    typeInfoGetArrayFixedSize               ,


-- ** typeInfoGetArrayLength #method:typeInfoGetArrayLength#

    typeInfoGetArrayLength                  ,


-- ** typeInfoGetArrayType #method:typeInfoGetArrayType#

    typeInfoGetArrayType                    ,


-- ** typeInfoGetInterface #method:typeInfoGetInterface#

    typeInfoGetInterface                    ,


-- ** typeInfoGetParamType #method:typeInfoGetParamType#

    typeInfoGetParamType                    ,


-- ** typeInfoGetTag #method:typeInfoGetTag#

    typeInfoGetTag                          ,


-- ** typeInfoIsPointer #method:typeInfoIsPointer#

    typeInfoIsPointer                       ,


-- ** typeInfoIsZeroTerminated #method:typeInfoIsZeroTerminated#

    typeInfoIsZeroTerminated                ,


-- ** typeTagToString #method:typeTagToString#

    typeTagToString                         ,


-- ** unionInfoFindMethod #method:unionInfoFindMethod#

    unionInfoFindMethod                     ,


-- ** unionInfoGetAlignment #method:unionInfoGetAlignment#

    unionInfoGetAlignment                   ,


-- ** unionInfoGetDiscriminator #method:unionInfoGetDiscriminator#

    unionInfoGetDiscriminator               ,


-- ** unionInfoGetDiscriminatorOffset #method:unionInfoGetDiscriminatorOffset#

    unionInfoGetDiscriminatorOffset         ,


-- ** unionInfoGetDiscriminatorType #method:unionInfoGetDiscriminatorType#

    unionInfoGetDiscriminatorType           ,


-- ** unionInfoGetField #method:unionInfoGetField#

    unionInfoGetField                       ,


-- ** unionInfoGetMethod #method:unionInfoGetMethod#

    unionInfoGetMethod                      ,


-- ** unionInfoGetNFields #method:unionInfoGetNFields#

    unionInfoGetNFields                     ,


-- ** unionInfoGetNMethods #method:unionInfoGetNMethods#

    unionInfoGetNMethods                    ,


-- ** unionInfoGetSize #method:unionInfoGetSize#

    unionInfoGetSize                        ,


-- ** unionInfoIsDiscriminated #method:unionInfoIsDiscriminated#

    unionInfoIsDiscriminated                ,


-- ** valueInfoGetValue #method:valueInfoGetValue#

    valueInfoGetValue                       ,


-- ** vfuncInfoGetAddress #method:vfuncInfoGetAddress#

    vfuncInfoGetAddress                     ,


-- ** vfuncInfoGetFlags #method:vfuncInfoGetFlags#

    vfuncInfoGetFlags                       ,


-- ** vfuncInfoGetInvoker #method:vfuncInfoGetInvoker#

    vfuncInfoGetInvoker                     ,


-- ** vfuncInfoGetOffset #method:vfuncInfoGetOffset#

    vfuncInfoGetOffset                      ,


-- ** vfuncInfoGetSignal #method:vfuncInfoGetSignal#

    vfuncInfoGetSignal                      ,




    ) where

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

import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL

import {-# SOURCE #-} qualified GI.GIRepository.Enums as GIRepository.Enums
import {-# SOURCE #-} qualified GI.GIRepository.Flags as GIRepository.Flags
import {-# SOURCE #-} qualified GI.GIRepository.Structs.AttributeIter as GIRepository.AttributeIter
import {-# SOURCE #-} qualified GI.GIRepository.Structs.BaseInfo as GIRepository.BaseInfo
import {-# SOURCE #-} qualified GI.GIRepository.Structs.Typelib as GIRepository.Typelib
import {-# SOURCE #-} qualified GI.GIRepository.Unions.Argument as GIRepository.Argument
import qualified GI.GObject.Flags as GObject.Flags

-- function g_vfunc_info_get_signal
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIVFuncInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_vfunc_info_get_signal" g_vfunc_info_get_signal ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO (Ptr GIRepository.BaseInfo.BaseInfo)

{- |
Obtain the signal for the virtual function if one is set.
The signal comes from the object or interface to which
this virtual function belongs.
-}
vfuncInfoGetSignal ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIVFuncInfo/@ -}
    -> m GIRepository.BaseInfo.BaseInfo
    {- ^ __Returns:__ the signal or 'Nothing' if none set -}
vfuncInfoGetSignal info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_vfunc_info_get_signal info'
    checkUnexpectedReturnNULL "vfuncInfoGetSignal" result
    result' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) result
    touchManagedPtr info
    return result'


-- function g_vfunc_info_get_offset
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIVFuncInfo", 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 "g_vfunc_info_get_offset" g_vfunc_info_get_offset ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO Int32

{- |
Obtain the offset of the function pointer in the class struct. The value
0xFFFF indicates that the struct offset is unknown.
-}
vfuncInfoGetOffset ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIVFuncInfo/@ -}
    -> m Int32
    {- ^ __Returns:__ the struct offset or 0xFFFF if it\'s unknown -}
vfuncInfoGetOffset info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_vfunc_info_get_offset info'
    touchManagedPtr info
    return result


-- function g_vfunc_info_get_invoker
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIVFuncInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_vfunc_info_get_invoker" g_vfunc_info_get_invoker ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO (Ptr GIRepository.BaseInfo.BaseInfo)

{- |
If this virtual function has an associated invoker method, this
method will return it.  An invoker method is a C entry point.

Not all virtuals will have invokers.
-}
vfuncInfoGetInvoker ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIVFuncInfo/@ -}
    -> m GIRepository.BaseInfo.BaseInfo
    {- ^ __Returns:__ the @/GIVFuncInfo/@ or 'Nothing'. Free it with
@/g_base_info_unref()/@ when done. -}
vfuncInfoGetInvoker info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_vfunc_info_get_invoker info'
    checkUnexpectedReturnNULL "vfuncInfoGetInvoker" result
    result' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) result
    touchManagedPtr info
    return result'


-- function g_vfunc_info_get_flags
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIVFuncInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "VFuncInfoFlags"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_vfunc_info_get_flags" g_vfunc_info_get_flags ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO CUInt

{- |
Obtain the flags for this virtual function info. See 'GI.GIRepository.Flags.VFuncInfoFlags' for
more information about possible flag values.
-}
vfuncInfoGetFlags ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIVFuncInfo/@ -}
    -> m [GIRepository.Flags.VFuncInfoFlags]
    {- ^ __Returns:__ the flags -}
vfuncInfoGetFlags info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_vfunc_info_get_flags info'
    let result' = wordToGFlags result
    touchManagedPtr info
    return result'


-- function g_vfunc_info_get_address
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIVFuncInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "implementor_gtype", argType = TBasicType TGType, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "#GType implementing this virtual function", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TPtr)
-- throws : True
-- Skip return : False

foreign import ccall "g_vfunc_info_get_address" g_vfunc_info_get_address ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    CGType ->                               -- implementor_gtype : TBasicType TGType
    Ptr (Ptr GError) ->                     -- error
    IO (Ptr ())

{- |
This method will look up where inside the type struct of /@implementorGtype@/
is the implementation for /@info@/.
-}
vfuncInfoGetAddress ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIVFuncInfo/@ -}
    -> GType
    {- ^ /@implementorGtype@/: 'GType' implementing this virtual function -}
    -> m (Ptr ())
    {- ^ __Returns:__ address to a function or 'Nothing' if an error happened /(Can throw 'Data.GI.Base.GError.GError')/ -}
vfuncInfoGetAddress info implementorGtype = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    let implementorGtype' = gtypeToCGType implementorGtype
    onException (do
        result <- propagateGError $ g_vfunc_info_get_address info' implementorGtype'
        touchManagedPtr info
        return result
     ) (do
        return ()
     )


-- function g_value_info_get_value
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIValueInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TInt64)
-- throws : False
-- Skip return : False

foreign import ccall "g_value_info_get_value" g_value_info_get_value ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO Int64

{- |
Obtain the enumeration value of the @/GIValueInfo/@.
-}
valueInfoGetValue ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIValueInfo/@ -}
    -> m Int64
    {- ^ __Returns:__ the enumeration value. This will always be representable
  as a 32-bit signed or unsigned value. The use of gint64 as the
  return type is to allow both. -}
valueInfoGetValue info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_value_info_get_value info'
    touchManagedPtr info
    return result


-- function g_union_info_is_discriminated
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIUnionInfo", 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 "g_union_info_is_discriminated" g_union_info_is_discriminated ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO CInt

{- |
Return true if this union contains discriminator field.
-}
unionInfoIsDiscriminated ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIUnionInfo/@ -}
    -> m Bool
    {- ^ __Returns:__ 'True' if this is a discriminated union, 'False' otherwise -}
unionInfoIsDiscriminated info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_union_info_is_discriminated info'
    let result' = (/= 0) result
    touchManagedPtr info
    return result'


-- function g_union_info_get_size
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIUnionInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TUInt64)
-- throws : False
-- Skip return : False

foreign import ccall "g_union_info_get_size" g_union_info_get_size ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO Word64

{- |
Obtain the total size of the union.
-}
unionInfoGetSize ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIUnionInfo/@ -}
    -> m Word64
    {- ^ __Returns:__ size of the union in bytes -}
unionInfoGetSize info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_union_info_get_size info'
    touchManagedPtr info
    return result


-- function g_union_info_get_n_methods
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIUnionInfo", 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 "g_union_info_get_n_methods" g_union_info_get_n_methods ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO Int32

{- |
Obtain the number of methods this union has.
-}
unionInfoGetNMethods ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIUnionInfo/@ -}
    -> m Int32
    {- ^ __Returns:__ number of methods -}
unionInfoGetNMethods info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_union_info_get_n_methods info'
    touchManagedPtr info
    return result


-- function g_union_info_get_n_fields
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIUnionInfo", 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 "g_union_info_get_n_fields" g_union_info_get_n_fields ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO Int32

{- |
Obtain the number of fields this union has.
-}
unionInfoGetNFields ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIUnionInfo/@ -}
    -> m Int32
    {- ^ __Returns:__ number of fields -}
unionInfoGetNFields info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_union_info_get_n_fields info'
    touchManagedPtr info
    return result


-- function g_union_info_get_method
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIUnionInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a method index", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_union_info_get_method" g_union_info_get_method ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    Int32 ->                                -- n : TBasicType TInt
    IO (Ptr GIRepository.BaseInfo.BaseInfo)

{- |
Obtain the type information for method with specified index.
-}
unionInfoGetMethod ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIUnionInfo/@ -}
    -> Int32
    {- ^ /@n@/: a method index -}
    -> m GIRepository.BaseInfo.BaseInfo
    {- ^ __Returns:__ the @/GIFunctionInfo/@, free it with @/g_base_info_unref()/@
when done. -}
unionInfoGetMethod info n = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_union_info_get_method info' n
    checkUnexpectedReturnNULL "unionInfoGetMethod" result
    result' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) result
    touchManagedPtr info
    return result'


-- function g_union_info_get_field
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIUnionInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a field index", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_union_info_get_field" g_union_info_get_field ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    Int32 ->                                -- n : TBasicType TInt
    IO (Ptr GIRepository.BaseInfo.BaseInfo)

{- |
Obtain the type information for field with specified index.
-}
unionInfoGetField ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIUnionInfo/@ -}
    -> Int32
    {- ^ /@n@/: a field index -}
    -> m GIRepository.BaseInfo.BaseInfo
    {- ^ __Returns:__ the @/GIFieldInfo/@, free it with @/g_base_info_unref()/@
when done. -}
unionInfoGetField info n = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_union_info_get_field info' n
    checkUnexpectedReturnNULL "unionInfoGetField" result
    result' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) result
    touchManagedPtr info
    return result'


-- function g_union_info_get_discriminator_type
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIUnionInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_union_info_get_discriminator_type" g_union_info_get_discriminator_type ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO (Ptr GIRepository.BaseInfo.BaseInfo)

{- |
Obtain the type information of the union discriminator.
-}
unionInfoGetDiscriminatorType ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIUnionInfo/@ -}
    -> m GIRepository.BaseInfo.BaseInfo
    {- ^ __Returns:__ the @/GITypeInfo/@, free it with @/g_base_info_unref()/@
when done. -}
unionInfoGetDiscriminatorType info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_union_info_get_discriminator_type info'
    checkUnexpectedReturnNULL "unionInfoGetDiscriminatorType" result
    result' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) result
    touchManagedPtr info
    return result'


-- function g_union_info_get_discriminator_offset
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIUnionInfo", 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 "g_union_info_get_discriminator_offset" g_union_info_get_discriminator_offset ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO Int32

{- |
Returns offset of the discriminator field in the structure.
-}
unionInfoGetDiscriminatorOffset ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIUnionInfo/@ -}
    -> m Int32
    {- ^ __Returns:__ offset in bytes of the discriminator -}
unionInfoGetDiscriminatorOffset info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_union_info_get_discriminator_offset info'
    touchManagedPtr info
    return result


-- function g_union_info_get_discriminator
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIUnionInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a union field index", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_union_info_get_discriminator" g_union_info_get_discriminator ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    Int32 ->                                -- n : TBasicType TInt
    IO (Ptr GIRepository.BaseInfo.BaseInfo)

{- |
Obtain discriminator value assigned for n-th union field, i.e. n-th
union field is the active one if discriminator contains this
constant.
-}
unionInfoGetDiscriminator ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIUnionInfo/@ -}
    -> Int32
    {- ^ /@n@/: a union field index -}
    -> m GIRepository.BaseInfo.BaseInfo
    {- ^ __Returns:__ the @/GIConstantInfo/@, free it with @/g_base_info_unref()/@
when done. -}
unionInfoGetDiscriminator info n = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_union_info_get_discriminator info' n
    checkUnexpectedReturnNULL "unionInfoGetDiscriminator" result
    result' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) result
    touchManagedPtr info
    return result'


-- function g_union_info_get_alignment
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIUnionInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TUInt64)
-- throws : False
-- Skip return : False

foreign import ccall "g_union_info_get_alignment" g_union_info_get_alignment ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO Word64

{- |
Obtain the required alignment of the union.
-}
unionInfoGetAlignment ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIUnionInfo/@ -}
    -> m Word64
    {- ^ __Returns:__ required alignment in bytes -}
unionInfoGetAlignment info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_union_info_get_alignment info'
    touchManagedPtr info
    return result


-- function g_union_info_find_method
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIUnionInfo", 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 "a method name", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_union_info_find_method" g_union_info_find_method ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    CString ->                              -- name : TBasicType TUTF8
    IO (Ptr GIRepository.BaseInfo.BaseInfo)

{- |
Obtain the type information for method named /@name@/.
-}
unionInfoFindMethod ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIUnionInfo/@ -}
    -> T.Text
    {- ^ /@name@/: a method name -}
    -> m GIRepository.BaseInfo.BaseInfo
    {- ^ __Returns:__ the @/GIFunctionInfo/@, free it with @/g_base_info_unref()/@
when done. -}
unionInfoFindMethod info name = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    name' <- textToCString name
    result <- g_union_info_find_method info' name'
    checkUnexpectedReturnNULL "unionInfoFindMethod" result
    result' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) result
    touchManagedPtr info
    freeMem name'
    return result'


-- function g_type_tag_to_string
-- Args : [Arg {argCName = "type", argType = TInterface (Name {namespace = "GIRepository", name = "TypeTag"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the type_tag", 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 "g_type_tag_to_string" g_type_tag_to_string ::
    CUInt ->                                -- type : TInterface (Name {namespace = "GIRepository", name = "TypeTag"})
    IO CString

{- |
Obtain a string representation of /@type@/
-}
typeTagToString ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.Enums.TypeTag
    {- ^ /@type@/: the type_tag -}
    -> m T.Text
    {- ^ __Returns:__ the string -}
typeTagToString type_ = liftIO $ do
    let type_' = (fromIntegral . fromEnum) type_
    result <- g_type_tag_to_string type_'
    checkUnexpectedReturnNULL "typeTagToString" result
    result' <- cstringToText result
    return result'


-- function g_type_info_is_zero_terminated
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GITypeInfo", 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 "g_type_info_is_zero_terminated" g_type_info_is_zero_terminated ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO CInt

{- |
Obtain if the last element of the array is 'Nothing'. The type tag must be a
@/GI_TYPE_TAG_ARRAY/@ or 'False' will returned.
-}
typeInfoIsZeroTerminated ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GITypeInfo/@ -}
    -> m Bool
    {- ^ __Returns:__ 'True' if zero terminated -}
typeInfoIsZeroTerminated info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_type_info_is_zero_terminated info'
    let result' = (/= 0) result
    touchManagedPtr info
    return result'


-- function g_type_info_is_pointer
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GITypeInfo", 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 "g_type_info_is_pointer" g_type_info_is_pointer ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO CInt

{- |
Obtain if the type is passed as a reference.

Note that the types of 'GI.GIRepository.Enums.DirectionOut' and 'GI.GIRepository.Enums.DirectionInout' parameters
will only be pointers if the underlying type being transferred is a pointer
(i.e. only if the type of the C function’s formal parameter is a pointer to a
pointer).
-}
typeInfoIsPointer ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GITypeInfo/@ -}
    -> m Bool
    {- ^ __Returns:__ 'True' if it is a pointer -}
typeInfoIsPointer info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_type_info_is_pointer info'
    let result' = (/= 0) result
    touchManagedPtr info
    return result'


-- function g_type_info_get_tag
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GITypeInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "TypeTag"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_type_info_get_tag" g_type_info_get_tag ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO CUInt

{- |
Obtain the type tag for the type. See 'GI.GIRepository.Enums.TypeTag' for a list
of type tags.
-}
typeInfoGetTag ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GITypeInfo/@ -}
    -> m GIRepository.Enums.TypeTag
    {- ^ __Returns:__ the type tag -}
typeInfoGetTag info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_type_info_get_tag info'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr info
    return result'


-- function g_type_info_get_param_type
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GITypeInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "index of the parameter", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_type_info_get_param_type" g_type_info_get_param_type ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    Int32 ->                                -- n : TBasicType TInt
    IO (Ptr GIRepository.BaseInfo.BaseInfo)

{- |
Obtain the parameter type /@n@/.
-}
typeInfoGetParamType ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GITypeInfo/@ -}
    -> Int32
    {- ^ /@n@/: index of the parameter -}
    -> m GIRepository.BaseInfo.BaseInfo
    {- ^ __Returns:__ the param type info -}
typeInfoGetParamType info n = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_type_info_get_param_type info' n
    checkUnexpectedReturnNULL "typeInfoGetParamType" result
    result' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) result
    touchManagedPtr info
    return result'


-- function g_type_info_get_interface
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GITypeInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_type_info_get_interface" g_type_info_get_interface ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO (Ptr GIRepository.BaseInfo.BaseInfo)

{- |
For types which have @/GI_TYPE_TAG_INTERFACE/@ such as GObjects and boxed values,
this function returns full information about the referenced type.  You can then
inspect the type of the returned 'GI.GIRepository.Structs.BaseInfo.BaseInfo' to further query whether it is
a concrete GObject, a GInterface, a structure, etc. using 'GI.GIRepository.Structs.BaseInfo.baseInfoGetType'.
-}
typeInfoGetInterface ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GITypeInfo/@ -}
    -> m GIRepository.BaseInfo.BaseInfo
    {- ^ __Returns:__ the 'GI.GIRepository.Structs.BaseInfo.BaseInfo', or 'Nothing'. Free it with
@/g_base_info_unref()/@ when done. -}
typeInfoGetInterface info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_type_info_get_interface info'
    checkUnexpectedReturnNULL "typeInfoGetInterface" result
    result' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) result
    touchManagedPtr info
    return result'


-- function g_type_info_get_array_type
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GITypeInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "ArrayType"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_type_info_get_array_type" g_type_info_get_array_type ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO CUInt

{- |
Obtain the array type for this type. See 'GI.GIRepository.Enums.ArrayType' for a list of
possible values. If the type tag of this type is not array, -1 will be
returned.
-}
typeInfoGetArrayType ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GITypeInfo/@ -}
    -> m GIRepository.Enums.ArrayType
    {- ^ __Returns:__ the array type or -1 -}
typeInfoGetArrayType info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_type_info_get_array_type info'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr info
    return result'


-- function g_type_info_get_array_length
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GITypeInfo", 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 "g_type_info_get_array_length" g_type_info_get_array_length ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO Int32

{- |
Obtain the array length of the type. The type tag must be a
@/GI_TYPE_TAG_ARRAY/@ or -1 will returned.
-}
typeInfoGetArrayLength ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GITypeInfo/@ -}
    -> m Int32
    {- ^ __Returns:__ the array length, or -1 if the type is not an array -}
typeInfoGetArrayLength info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_type_info_get_array_length info'
    touchManagedPtr info
    return result


-- function g_type_info_get_array_fixed_size
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GITypeInfo", 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 "g_type_info_get_array_fixed_size" g_type_info_get_array_fixed_size ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO Int32

{- |
Obtain the fixed array size of the type. The type tag must be a
@/GI_TYPE_TAG_ARRAY/@ or -1 will returned.
-}
typeInfoGetArrayFixedSize ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GITypeInfo/@ -}
    -> m Int32
    {- ^ __Returns:__ the size or -1 if it\'s not an array -}
typeInfoGetArrayFixedSize info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_type_info_get_array_fixed_size info'
    touchManagedPtr info
    return result


-- function g_struct_info_is_gtype_struct
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIStructInfo", 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 "g_struct_info_is_gtype_struct" g_struct_info_is_gtype_struct ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO CInt

{- |
Return true if this structure represents the \"class structure\" for some
'GI.GObject.Objects.Object.Object' or @/GInterface/@.  This function is mainly useful to hide this kind of structure
from generated public APIs.
-}
structInfoIsGtypeStruct ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIStructInfo/@ -}
    -> m Bool
    {- ^ __Returns:__ 'True' if this is a class struct, 'False' otherwise -}
structInfoIsGtypeStruct info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_struct_info_is_gtype_struct info'
    let result' = (/= 0) result
    touchManagedPtr info
    return result'


-- function g_struct_info_is_foreign
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "TODO", 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 "g_struct_info_is_foreign" g_struct_info_is_foreign ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO CInt

{- |
TODO
-}
structInfoIsForeign ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: TODO -}
    -> m Bool
    {- ^ __Returns:__ TODO -}
structInfoIsForeign info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_struct_info_is_foreign info'
    let result' = (/= 0) result
    touchManagedPtr info
    return result'


-- function g_struct_info_get_size
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIStructInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TUInt64)
-- throws : False
-- Skip return : False

foreign import ccall "g_struct_info_get_size" g_struct_info_get_size ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO Word64

{- |
Obtain the total size of the structure.
-}
structInfoGetSize ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIStructInfo/@ -}
    -> m Word64
    {- ^ __Returns:__ size of the structure in bytes -}
structInfoGetSize info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_struct_info_get_size info'
    touchManagedPtr info
    return result


-- function g_struct_info_get_n_methods
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIStructInfo", 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 "g_struct_info_get_n_methods" g_struct_info_get_n_methods ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO Int32

{- |
Obtain the number of methods this structure has.
-}
structInfoGetNMethods ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIStructInfo/@ -}
    -> m Int32
    {- ^ __Returns:__ number of methods -}
structInfoGetNMethods info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_struct_info_get_n_methods info'
    touchManagedPtr info
    return result


-- function g_struct_info_get_n_fields
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIStructInfo", 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 "g_struct_info_get_n_fields" g_struct_info_get_n_fields ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO Int32

{- |
Obtain the number of fields this structure has.
-}
structInfoGetNFields ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIStructInfo/@ -}
    -> m Int32
    {- ^ __Returns:__ number of fields -}
structInfoGetNFields info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_struct_info_get_n_fields info'
    touchManagedPtr info
    return result


-- function g_struct_info_get_method
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIStructInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a method index", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_struct_info_get_method" g_struct_info_get_method ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    Int32 ->                                -- n : TBasicType TInt
    IO (Ptr GIRepository.BaseInfo.BaseInfo)

{- |
Obtain the type information for method with specified index.
-}
structInfoGetMethod ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIStructInfo/@ -}
    -> Int32
    {- ^ /@n@/: a method index -}
    -> m GIRepository.BaseInfo.BaseInfo
    {- ^ __Returns:__ the @/GIFunctionInfo/@, free it with @/g_base_info_unref()/@
when done. -}
structInfoGetMethod info n = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_struct_info_get_method info' n
    checkUnexpectedReturnNULL "structInfoGetMethod" result
    result' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) result
    touchManagedPtr info
    return result'


-- function g_struct_info_get_field
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIStructInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a field index", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_struct_info_get_field" g_struct_info_get_field ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    Int32 ->                                -- n : TBasicType TInt
    IO (Ptr GIRepository.BaseInfo.BaseInfo)

{- |
Obtain the type information for field with specified index.
-}
structInfoGetField ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIStructInfo/@ -}
    -> Int32
    {- ^ /@n@/: a field index -}
    -> m GIRepository.BaseInfo.BaseInfo
    {- ^ __Returns:__ the @/GIFieldInfo/@, free it with @/g_base_info_unref()/@
when done. -}
structInfoGetField info n = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_struct_info_get_field info' n
    checkUnexpectedReturnNULL "structInfoGetField" result
    result' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) result
    touchManagedPtr info
    return result'


-- function g_struct_info_get_alignment
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIStructInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TUInt64)
-- throws : False
-- Skip return : False

foreign import ccall "g_struct_info_get_alignment" g_struct_info_get_alignment ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO Word64

{- |
Obtain the required alignment of the structure.
-}
structInfoGetAlignment ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIStructInfo/@ -}
    -> m Word64
    {- ^ __Returns:__ required alignment in bytes -}
structInfoGetAlignment info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_struct_info_get_alignment info'
    touchManagedPtr info
    return result


-- function g_struct_info_find_method
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIStructInfo", 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 "a method name", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_struct_info_find_method" g_struct_info_find_method ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    CString ->                              -- name : TBasicType TUTF8
    IO (Ptr GIRepository.BaseInfo.BaseInfo)

{- |
Obtain the type information for method named /@name@/.
-}
structInfoFindMethod ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIStructInfo/@ -}
    -> T.Text
    {- ^ /@name@/: a method name -}
    -> m GIRepository.BaseInfo.BaseInfo
    {- ^ __Returns:__ the @/GIFunctionInfo/@, free it with @/g_base_info_unref()/@
when done. -}
structInfoFindMethod info name = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    name' <- textToCString name
    result <- g_struct_info_find_method info' name'
    checkUnexpectedReturnNULL "structInfoFindMethod" result
    result' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) result
    touchManagedPtr info
    freeMem name'
    return result'


-- function g_struct_info_find_field
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIStructInfo", 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 "a field name", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_struct_info_find_field" g_struct_info_find_field ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    CString ->                              -- name : TBasicType TUTF8
    IO (Ptr GIRepository.BaseInfo.BaseInfo)

{- |
Obtain the type information for field named /@name@/.

/Since: 1.46/
-}
structInfoFindField ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIStructInfo/@ -}
    -> T.Text
    {- ^ /@name@/: a field name -}
    -> m GIRepository.BaseInfo.BaseInfo
    {- ^ __Returns:__ the @/GIFieldInfo/@ or 'Nothing' if not found,
free it with @/g_base_info_unref()/@ when done. -}
structInfoFindField info name = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    name' <- textToCString name
    result <- g_struct_info_find_field info' name'
    checkUnexpectedReturnNULL "structInfoFindField" result
    result' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) result
    touchManagedPtr info
    freeMem name'
    return result'


-- function g_signal_info_true_stops_emit
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GISignalInfo", 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 "g_signal_info_true_stops_emit" g_signal_info_true_stops_emit ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO CInt

{- |
Obtain if the returning true in the signal handler will
stop the emission of the signal.
-}
signalInfoTrueStopsEmit ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GISignalInfo/@ -}
    -> m Bool
    {- ^ __Returns:__ 'True' if returning true stops the signal emission -}
signalInfoTrueStopsEmit info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_signal_info_true_stops_emit info'
    let result' = (/= 0) result
    touchManagedPtr info
    return result'


-- function g_signal_info_get_flags
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GISignalInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GObject", name = "SignalFlags"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_signal_info_get_flags" g_signal_info_get_flags ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO CUInt

{- |
Obtain the flags for this signal info. See 'GI.GObject.Flags.SignalFlags' for
more information about possible flag values.
-}
signalInfoGetFlags ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GISignalInfo/@ -}
    -> m [GObject.Flags.SignalFlags]
    {- ^ __Returns:__ the flags -}
signalInfoGetFlags info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_signal_info_get_flags info'
    let result' = wordToGFlags result
    touchManagedPtr info
    return result'


-- function g_signal_info_get_class_closure
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GISignalInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_signal_info_get_class_closure" g_signal_info_get_class_closure ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO (Ptr GIRepository.BaseInfo.BaseInfo)

{- |
Obtain the class closure for this signal if one is set. The class
closure is a virtual function on the type that the signal belongs to.
If the signal lacks a closure 'Nothing' will be returned.
-}
signalInfoGetClassClosure ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GISignalInfo/@ -}
    -> m GIRepository.BaseInfo.BaseInfo
    {- ^ __Returns:__ the class closure or 'Nothing' -}
signalInfoGetClassClosure info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_signal_info_get_class_closure info'
    checkUnexpectedReturnNULL "signalInfoGetClassClosure" result
    result' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) result
    touchManagedPtr info
    return result'


-- function g_registered_type_info_get_type_name
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIRegisteredTypeInfo", 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 "g_registered_type_info_get_type_name" g_registered_type_info_get_type_name ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO CString

{- |
Obtain the type name of the struct within the GObject type system.
This type can be passed to 'GI.GObject.Functions.typeName' to get a 'GType'.
-}
registeredTypeInfoGetTypeName ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIRegisteredTypeInfo/@ -}
    -> m T.Text
    {- ^ __Returns:__ the type name -}
registeredTypeInfoGetTypeName info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_registered_type_info_get_type_name info'
    checkUnexpectedReturnNULL "registeredTypeInfoGetTypeName" result
    result' <- cstringToText result
    touchManagedPtr info
    return result'


-- function g_registered_type_info_get_type_init
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIRegisteredTypeInfo", 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 "g_registered_type_info_get_type_init" g_registered_type_info_get_type_init ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO CString

{- |
Obtain the type init function for /@info@/. The type init function is the
function which will register the GType within the GObject type system.
Usually this is not called by langauge bindings or applications, use
'GI.GIRepository.Functions.registeredTypeInfoGetGType' directly instead.
-}
registeredTypeInfoGetTypeInit ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIRegisteredTypeInfo/@ -}
    -> m T.Text
    {- ^ __Returns:__ the symbol name of the type init function, suitable for
passing into @/g_module_symbol()/@. -}
registeredTypeInfoGetTypeInit info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_registered_type_info_get_type_init info'
    checkUnexpectedReturnNULL "registeredTypeInfoGetTypeInit" result
    result' <- cstringToText result
    touchManagedPtr info
    return result'


-- function g_registered_type_info_get_g_type
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIRegisteredTypeInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TGType)
-- throws : False
-- Skip return : False

foreign import ccall "g_registered_type_info_get_g_type" g_registered_type_info_get_g_type ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO CGType

{- |
Obtain the 'GType' for this registered type or G_TYPE_NONE which a special meaning.
It means that either there is no type information associated with this /@info@/ or
that the shared library which provides the type_init function for this
/@info@/ cannot be called.
-}
registeredTypeInfoGetGType ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIRegisteredTypeInfo/@ -}
    -> m GType
    {- ^ __Returns:__ the 'GType'. -}
registeredTypeInfoGetGType info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_registered_type_info_get_g_type info'
    let result' = GType result
    touchManagedPtr info
    return result'


-- function g_property_info_get_type
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIPropertyInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_property_info_get_type" g_property_info_get_type ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO (Ptr GIRepository.BaseInfo.BaseInfo)

{- |
Obtain the type information for the property /@info@/.
-}
propertyInfoGetType ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIPropertyInfo/@ -}
    -> m GIRepository.BaseInfo.BaseInfo
    {- ^ __Returns:__ the @/GITypeInfo/@, free it with
@/g_base_info_unref()/@ when done. -}
propertyInfoGetType info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_property_info_get_type info'
    checkUnexpectedReturnNULL "propertyInfoGetType" result
    result' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) result
    touchManagedPtr info
    return result'


-- function g_property_info_get_ownership_transfer
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIPropertyInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "Transfer"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_property_info_get_ownership_transfer" g_property_info_get_ownership_transfer ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO CUInt

{- |
Obtain the ownership transfer for this property. See 'GI.GIRepository.Enums.Transfer' for more
information about transfer values.
-}
propertyInfoGetOwnershipTransfer ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIPropertyInfo/@ -}
    -> m GIRepository.Enums.Transfer
    {- ^ __Returns:__ the transfer -}
propertyInfoGetOwnershipTransfer info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_property_info_get_ownership_transfer info'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr info
    return result'


-- function g_property_info_get_flags
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIPropertyInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GObject", name = "ParamFlags"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_property_info_get_flags" g_property_info_get_flags ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO CUInt

{- |
Obtain the flags for this property info. See 'GI.GObject.Flags.ParamFlags' for
more information about possible flag values.
-}
propertyInfoGetFlags ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIPropertyInfo/@ -}
    -> m [GObject.Flags.ParamFlags]
    {- ^ __Returns:__ the flags -}
propertyInfoGetFlags info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_property_info_get_flags info'
    let result' = wordToGFlags result
    touchManagedPtr info
    return result'


-- function g_object_info_get_vfunc
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIObjectInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "index of virtual function to get", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_object_info_get_vfunc" g_object_info_get_vfunc ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    Int32 ->                                -- n : TBasicType TInt
    IO (Ptr GIRepository.BaseInfo.BaseInfo)

{- |
Obtain an object type virtual function at index /@n@/.
-}
objectInfoGetVfunc ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIObjectInfo/@ -}
    -> Int32
    {- ^ /@n@/: index of virtual function to get -}
    -> m GIRepository.BaseInfo.BaseInfo
    {- ^ __Returns:__ the @/GIVFuncInfo/@. Free the struct by calling
@/g_base_info_unref()/@ when done. -}
objectInfoGetVfunc info n = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_object_info_get_vfunc info' n
    checkUnexpectedReturnNULL "objectInfoGetVfunc" result
    result' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) result
    touchManagedPtr info
    return result'


-- function g_object_info_get_unref_function
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIObjectInfo", 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 "g_object_info_get_unref_function" g_object_info_get_unref_function ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO CString

{- |
Obtain the symbol name of the function that should be called to unref this
object type. It\'s mainly used fundamental types. The type signature for
the symbol is @/GIObjectInfoUnrefFunction/@, to fetch the function pointer
see 'GI.GIRepository.Functions.objectInfoGetUnrefFunction'.
-}
objectInfoGetUnrefFunction ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIObjectInfo/@ -}
    -> m T.Text
    {- ^ __Returns:__ the symbol or 'Nothing' -}
objectInfoGetUnrefFunction info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_object_info_get_unref_function info'
    checkUnexpectedReturnNULL "objectInfoGetUnrefFunction" result
    result' <- cstringToText result
    touchManagedPtr info
    return result'


-- function g_object_info_get_type_name
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIObjectInfo", 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 "g_object_info_get_type_name" g_object_info_get_type_name ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO CString

{- |
Obtain the name of the objects class\/type.
-}
objectInfoGetTypeName ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIObjectInfo/@ -}
    -> m T.Text
    {- ^ __Returns:__ name of the objects type -}
objectInfoGetTypeName info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_object_info_get_type_name info'
    checkUnexpectedReturnNULL "objectInfoGetTypeName" result
    result' <- cstringToText result
    touchManagedPtr info
    return result'


-- function g_object_info_get_type_init
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIObjectInfo", 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 "g_object_info_get_type_init" g_object_info_get_type_init ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO CString

{- |
Obtain the function which when called will return the GType
function for which this object type is registered.
-}
objectInfoGetTypeInit ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIObjectInfo/@ -}
    -> m T.Text
    {- ^ __Returns:__ the type init function -}
objectInfoGetTypeInit info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_object_info_get_type_init info'
    checkUnexpectedReturnNULL "objectInfoGetTypeInit" result
    result' <- cstringToText result
    touchManagedPtr info
    return result'


-- function g_object_info_get_signal
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIObjectInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "index of signal to get", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_object_info_get_signal" g_object_info_get_signal ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    Int32 ->                                -- n : TBasicType TInt
    IO (Ptr GIRepository.BaseInfo.BaseInfo)

{- |
Obtain an object type signal at index /@n@/.
-}
objectInfoGetSignal ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIObjectInfo/@ -}
    -> Int32
    {- ^ /@n@/: index of signal to get -}
    -> m GIRepository.BaseInfo.BaseInfo
    {- ^ __Returns:__ the @/GISignalInfo/@. Free the struct by calling
@/g_base_info_unref()/@ when done. -}
objectInfoGetSignal info n = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_object_info_get_signal info' n
    checkUnexpectedReturnNULL "objectInfoGetSignal" result
    result' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) result
    touchManagedPtr info
    return result'


-- function g_object_info_get_set_value_function
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIObjectInfo", 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 "g_object_info_get_set_value_function" g_object_info_get_set_value_function ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO CString

{- |
Obtain the symbol name of the function that should be called to convert
set a GValue giving an object instance pointer of this object type.
I\'s mainly used fundamental types. The type signature for the symbol
is @/GIObjectInfoSetValueFunction/@, to fetch the function pointer
see 'GI.GIRepository.Functions.objectInfoGetSetValueFunction'.
-}
objectInfoGetSetValueFunction ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIObjectInfo/@ -}
    -> m T.Text
    {- ^ __Returns:__ the symbol or 'Nothing' -}
objectInfoGetSetValueFunction info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_object_info_get_set_value_function info'
    checkUnexpectedReturnNULL "objectInfoGetSetValueFunction" result
    result' <- cstringToText result
    touchManagedPtr info
    return result'


-- function g_object_info_get_ref_function
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIObjectInfo", 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 "g_object_info_get_ref_function" g_object_info_get_ref_function ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO CString

{- |
Obtain the symbol name of the function that should be called to ref this
object type. It\'s mainly used fundamental types. The type signature for
the symbol is @/GIObjectInfoRefFunction/@, to fetch the function pointer
see 'GI.GIRepository.Functions.objectInfoGetRefFunction'.
-}
objectInfoGetRefFunction ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIObjectInfo/@ -}
    -> m T.Text
    {- ^ __Returns:__ the symbol or 'Nothing' -}
objectInfoGetRefFunction info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_object_info_get_ref_function info'
    checkUnexpectedReturnNULL "objectInfoGetRefFunction" result
    result' <- cstringToText result
    touchManagedPtr info
    return result'


-- function g_object_info_get_property
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIObjectInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "index of property to get", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_object_info_get_property" g_object_info_get_property ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    Int32 ->                                -- n : TBasicType TInt
    IO (Ptr GIRepository.BaseInfo.BaseInfo)

{- |
Obtain an object type property at index /@n@/.
-}
objectInfoGetProperty ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIObjectInfo/@ -}
    -> Int32
    {- ^ /@n@/: index of property to get -}
    -> m GIRepository.BaseInfo.BaseInfo
    {- ^ __Returns:__ the @/GIPropertyInfo/@. Free the struct by calling
@/g_base_info_unref()/@ when done. -}
objectInfoGetProperty info n = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_object_info_get_property info' n
    checkUnexpectedReturnNULL "objectInfoGetProperty" result
    result' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) result
    touchManagedPtr info
    return result'


-- function g_object_info_get_parent
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIObjectInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_object_info_get_parent" g_object_info_get_parent ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO (Ptr GIRepository.BaseInfo.BaseInfo)

{- |
Obtain the parent of the object type.
-}
objectInfoGetParent ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIObjectInfo/@ -}
    -> m GIRepository.BaseInfo.BaseInfo
    {- ^ __Returns:__ the @/GIObjectInfo/@. Free the struct by calling
@/g_base_info_unref()/@ when done. -}
objectInfoGetParent info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_object_info_get_parent info'
    checkUnexpectedReturnNULL "objectInfoGetParent" result
    result' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) result
    touchManagedPtr info
    return result'


-- function g_object_info_get_n_vfuncs
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIObjectInfo", 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 "g_object_info_get_n_vfuncs" g_object_info_get_n_vfuncs ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO Int32

{- |
Obtain the number of virtual functions that this object type has.
-}
objectInfoGetNVfuncs ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIObjectInfo/@ -}
    -> m Int32
    {- ^ __Returns:__ number of virtual functions -}
objectInfoGetNVfuncs info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_object_info_get_n_vfuncs info'
    touchManagedPtr info
    return result


-- function g_object_info_get_n_signals
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIObjectInfo", 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 "g_object_info_get_n_signals" g_object_info_get_n_signals ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO Int32

{- |
Obtain the number of signals that this object type has.
-}
objectInfoGetNSignals ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIObjectInfo/@ -}
    -> m Int32
    {- ^ __Returns:__ number of signals -}
objectInfoGetNSignals info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_object_info_get_n_signals info'
    touchManagedPtr info
    return result


-- function g_object_info_get_n_properties
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIObjectInfo", 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 "g_object_info_get_n_properties" g_object_info_get_n_properties ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO Int32

{- |
Obtain the number of properties that this object type has.
-}
objectInfoGetNProperties ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIObjectInfo/@ -}
    -> m Int32
    {- ^ __Returns:__ number of properties -}
objectInfoGetNProperties info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_object_info_get_n_properties info'
    touchManagedPtr info
    return result


-- function g_object_info_get_n_methods
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIObjectInfo", 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 "g_object_info_get_n_methods" g_object_info_get_n_methods ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO Int32

{- |
Obtain the number of methods that this object type has.
-}
objectInfoGetNMethods ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIObjectInfo/@ -}
    -> m Int32
    {- ^ __Returns:__ number of methods -}
objectInfoGetNMethods info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_object_info_get_n_methods info'
    touchManagedPtr info
    return result


-- function g_object_info_get_n_interfaces
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIObjectInfo", 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 "g_object_info_get_n_interfaces" g_object_info_get_n_interfaces ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO Int32

{- |
Obtain the number of interfaces that this object type has.
-}
objectInfoGetNInterfaces ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIObjectInfo/@ -}
    -> m Int32
    {- ^ __Returns:__ number of interfaces -}
objectInfoGetNInterfaces info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_object_info_get_n_interfaces info'
    touchManagedPtr info
    return result


-- function g_object_info_get_n_fields
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIObjectInfo", 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 "g_object_info_get_n_fields" g_object_info_get_n_fields ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO Int32

{- |
Obtain the number of fields that this object type has.
-}
objectInfoGetNFields ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIObjectInfo/@ -}
    -> m Int32
    {- ^ __Returns:__ number of fields -}
objectInfoGetNFields info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_object_info_get_n_fields info'
    touchManagedPtr info
    return result


-- function g_object_info_get_n_constants
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIObjectInfo", 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 "g_object_info_get_n_constants" g_object_info_get_n_constants ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO Int32

{- |
Obtain the number of constants that this object type has.
-}
objectInfoGetNConstants ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIObjectInfo/@ -}
    -> m Int32
    {- ^ __Returns:__ number of constants -}
objectInfoGetNConstants info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_object_info_get_n_constants info'
    touchManagedPtr info
    return result


-- function g_object_info_get_method
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIObjectInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "index of method to get", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_object_info_get_method" g_object_info_get_method ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    Int32 ->                                -- n : TBasicType TInt
    IO (Ptr GIRepository.BaseInfo.BaseInfo)

{- |
Obtain an object type method at index /@n@/.
-}
objectInfoGetMethod ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIObjectInfo/@ -}
    -> Int32
    {- ^ /@n@/: index of method to get -}
    -> m GIRepository.BaseInfo.BaseInfo
    {- ^ __Returns:__ the @/GIFunctionInfo/@. Free the struct by calling
@/g_base_info_unref()/@ when done. -}
objectInfoGetMethod info n = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_object_info_get_method info' n
    checkUnexpectedReturnNULL "objectInfoGetMethod" result
    result' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) result
    touchManagedPtr info
    return result'


-- function g_object_info_get_interface
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIObjectInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "index of interface to get", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_object_info_get_interface" g_object_info_get_interface ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    Int32 ->                                -- n : TBasicType TInt
    IO (Ptr GIRepository.BaseInfo.BaseInfo)

{- |
Obtain an object type interface at index /@n@/.
-}
objectInfoGetInterface ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIObjectInfo/@ -}
    -> Int32
    {- ^ /@n@/: index of interface to get -}
    -> m GIRepository.BaseInfo.BaseInfo
    {- ^ __Returns:__ the @/GIInterfaceInfo/@. Free the struct by calling
@/g_base_info_unref()/@ when done. -}
objectInfoGetInterface info n = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_object_info_get_interface info' n
    checkUnexpectedReturnNULL "objectInfoGetInterface" result
    result' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) result
    touchManagedPtr info
    return result'


-- function g_object_info_get_get_value_function
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIObjectInfo", 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 "g_object_info_get_get_value_function" g_object_info_get_get_value_function ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO CString

{- |
Obtain the symbol name of the function that should be called to convert
an object instance pointer of this object type to a GValue.
I\'s mainly used fundamental types. The type signature for the symbol
is @/GIObjectInfoGetValueFunction/@, to fetch the function pointer
see 'GI.GIRepository.Functions.objectInfoGetGetValueFunction'.
-}
objectInfoGetGetValueFunction ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIObjectInfo/@ -}
    -> m T.Text
    {- ^ __Returns:__ the symbol or 'Nothing' -}
objectInfoGetGetValueFunction info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_object_info_get_get_value_function info'
    checkUnexpectedReturnNULL "objectInfoGetGetValueFunction" result
    result' <- cstringToText result
    touchManagedPtr info
    return result'


-- function g_object_info_get_fundamental
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIObjectInfo", 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 "g_object_info_get_fundamental" g_object_info_get_fundamental ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO CInt

{- |
Obtain if the object type is of a fundamental type which is not
G_TYPE_OBJECT. This is mostly for supporting GstMiniObject.
-}
objectInfoGetFundamental ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIObjectInfo/@ -}
    -> m Bool
    {- ^ __Returns:__ 'True' if the object type is a fundamental type -}
objectInfoGetFundamental info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_object_info_get_fundamental info'
    let result' = (/= 0) result
    touchManagedPtr info
    return result'


-- function g_object_info_get_field
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIObjectInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "index of field to get", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_object_info_get_field" g_object_info_get_field ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    Int32 ->                                -- n : TBasicType TInt
    IO (Ptr GIRepository.BaseInfo.BaseInfo)

{- |
Obtain an object type field at index /@n@/.
-}
objectInfoGetField ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIObjectInfo/@ -}
    -> Int32
    {- ^ /@n@/: index of field to get -}
    -> m GIRepository.BaseInfo.BaseInfo
    {- ^ __Returns:__ the @/GIFieldInfo/@. Free the struct by calling
@/g_base_info_unref()/@ when done. -}
objectInfoGetField info n = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_object_info_get_field info' n
    checkUnexpectedReturnNULL "objectInfoGetField" result
    result' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) result
    touchManagedPtr info
    return result'


-- function g_object_info_get_constant
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIObjectInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "index of constant to get", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_object_info_get_constant" g_object_info_get_constant ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    Int32 ->                                -- n : TBasicType TInt
    IO (Ptr GIRepository.BaseInfo.BaseInfo)

{- |
Obtain an object type constant at index /@n@/.
-}
objectInfoGetConstant ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIObjectInfo/@ -}
    -> Int32
    {- ^ /@n@/: index of constant to get -}
    -> m GIRepository.BaseInfo.BaseInfo
    {- ^ __Returns:__ the @/GIConstantInfo/@. Free the struct by calling
@/g_base_info_unref()/@ when done. -}
objectInfoGetConstant info n = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_object_info_get_constant info' n
    checkUnexpectedReturnNULL "objectInfoGetConstant" result
    result' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) result
    touchManagedPtr info
    return result'


-- function g_object_info_get_class_struct
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIObjectInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_object_info_get_class_struct" g_object_info_get_class_struct ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO (Ptr GIRepository.BaseInfo.BaseInfo)

{- |
Every 'GI.GObject.Objects.Object.Object' has two structures; an instance structure and a class
structure.  This function returns the metadata for the class structure.
-}
objectInfoGetClassStruct ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIObjectInfo/@ -}
    -> m GIRepository.BaseInfo.BaseInfo
    {- ^ __Returns:__ the @/GIStructInfo/@ or 'Nothing'. Free with
@/g_base_info_unref()/@ when done. -}
objectInfoGetClassStruct info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_object_info_get_class_struct info'
    checkUnexpectedReturnNULL "objectInfoGetClassStruct" result
    result' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) result
    touchManagedPtr info
    return result'


-- function g_object_info_get_abstract
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIObjectInfo", 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 "g_object_info_get_abstract" g_object_info_get_abstract ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO CInt

{- |
Obtain if the object type is an abstract type, eg if it cannot be
instantiated
-}
objectInfoGetAbstract ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIObjectInfo/@ -}
    -> m Bool
    {- ^ __Returns:__ 'True' if the object type is abstract -}
objectInfoGetAbstract info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_object_info_get_abstract info'
    let result' = (/= 0) result
    touchManagedPtr info
    return result'


-- function g_object_info_find_vfunc_using_interfaces
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIObjectInfo", 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 "name of vfunc to obtain", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "implementor", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The implementor of the interface", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_object_info_find_vfunc_using_interfaces" g_object_info_find_vfunc_using_interfaces ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    CString ->                              -- name : TBasicType TUTF8
    Ptr (Ptr GIRepository.BaseInfo.BaseInfo) -> -- implementor : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO (Ptr GIRepository.BaseInfo.BaseInfo)

{- |
Locate a virtual function slot with name /@name@/, searching both the object
/@info@/ and any interfaces it implements.  Note that the namespace for
virtuals is distinct from that of methods; there may or may not be a
concrete method associated for a virtual. If there is one, it may be
retrieved using 'GI.GIRepository.Functions.vfuncInfoGetInvoker', otherwise 'Nothing' will be
returned.

Note that this function does *not* search parent classes; you will have
to chain up if that\'s desired.
-}
objectInfoFindVfuncUsingInterfaces ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIObjectInfo/@ -}
    -> T.Text
    {- ^ /@name@/: name of vfunc to obtain -}
    -> m ((GIRepository.BaseInfo.BaseInfo, GIRepository.BaseInfo.BaseInfo))
    {- ^ __Returns:__ the @/GIVFuncInfo/@. Free the struct by calling
@/g_base_info_unref()/@ when done. -}
objectInfoFindVfuncUsingInterfaces info name = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    name' <- textToCString name
    implementor <- allocMem :: IO (Ptr (Ptr GIRepository.BaseInfo.BaseInfo))
    result <- g_object_info_find_vfunc_using_interfaces info' name' implementor
    checkUnexpectedReturnNULL "objectInfoFindVfuncUsingInterfaces" result
    result' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) result
    implementor' <- peek implementor
    implementor'' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) implementor'
    touchManagedPtr info
    freeMem name'
    freeMem implementor
    return (result', implementor'')


-- function g_object_info_find_vfunc
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIObjectInfo", 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 "The name of a virtual function to find.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_object_info_find_vfunc" g_object_info_find_vfunc ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    CString ->                              -- name : TBasicType TUTF8
    IO (Ptr GIRepository.BaseInfo.BaseInfo)

{- |
Locate a virtual function slot with name /@name@/. Note that the namespace
for virtuals is distinct from that of methods; there may or may not be
a concrete method associated for a virtual. If there is one, it may
be retrieved using 'GI.GIRepository.Functions.vfuncInfoGetInvoker', otherwise 'Nothing' will be
returned.
See the documentation for 'GI.GIRepository.Functions.vfuncInfoGetInvoker' for more
information on invoking virtuals.
-}
objectInfoFindVfunc ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIObjectInfo/@ -}
    -> T.Text
    {- ^ /@name@/: The name of a virtual function to find. -}
    -> m GIRepository.BaseInfo.BaseInfo
    {- ^ __Returns:__ the @/GIVFuncInfo/@, or 'Nothing'. Free it with
@/g_base_info_unref()/@ when done. -}
objectInfoFindVfunc info name = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    name' <- textToCString name
    result <- g_object_info_find_vfunc info' name'
    checkUnexpectedReturnNULL "objectInfoFindVfunc" result
    result' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) result
    touchManagedPtr info
    freeMem name'
    return result'


-- function g_object_info_find_signal
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIObjectInfo", 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 "Name of signal", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_object_info_find_signal" g_object_info_find_signal ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    CString ->                              -- name : TBasicType TUTF8
    IO (Ptr GIRepository.BaseInfo.BaseInfo)

{- |
TODO
-}
objectInfoFindSignal ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIObjectInfo/@ -}
    -> T.Text
    {- ^ /@name@/: Name of signal -}
    -> m GIRepository.BaseInfo.BaseInfo
    {- ^ __Returns:__ Info for the signal with name /@name@/ in /@info@/, or 'Nothing' on failure. -}
objectInfoFindSignal info name = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    name' <- textToCString name
    result <- g_object_info_find_signal info' name'
    checkUnexpectedReturnNULL "objectInfoFindSignal" result
    result' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) result
    touchManagedPtr info
    freeMem name'
    return result'


-- function g_object_info_find_method_using_interfaces
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIObjectInfo", 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 "name of method to obtain", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "implementor", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The implementor of the interface", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_object_info_find_method_using_interfaces" g_object_info_find_method_using_interfaces ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    CString ->                              -- name : TBasicType TUTF8
    Ptr (Ptr GIRepository.BaseInfo.BaseInfo) -> -- implementor : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO (Ptr GIRepository.BaseInfo.BaseInfo)

{- |
Obtain a method of the object given a /@name@/, searching both the
object /@info@/ and any interfaces it implements.  'Nothing' will be
returned if there\'s no method available with that name.

Note that this function does *not* search parent classes; you will have
to chain up if that\'s desired.
-}
objectInfoFindMethodUsingInterfaces ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIObjectInfo/@ -}
    -> T.Text
    {- ^ /@name@/: name of method to obtain -}
    -> m ((GIRepository.BaseInfo.BaseInfo, GIRepository.BaseInfo.BaseInfo))
    {- ^ __Returns:__ the @/GIFunctionInfo/@. Free the struct by calling
@/g_base_info_unref()/@ when done. -}
objectInfoFindMethodUsingInterfaces info name = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    name' <- textToCString name
    implementor <- allocMem :: IO (Ptr (Ptr GIRepository.BaseInfo.BaseInfo))
    result <- g_object_info_find_method_using_interfaces info' name' implementor
    checkUnexpectedReturnNULL "objectInfoFindMethodUsingInterfaces" result
    result' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) result
    implementor' <- peek implementor
    implementor'' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) implementor'
    touchManagedPtr info
    freeMem name'
    freeMem implementor
    return (result', implementor'')


-- function g_object_info_find_method
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIObjectInfo", 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 "name of method to obtain", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_object_info_find_method" g_object_info_find_method ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    CString ->                              -- name : TBasicType TUTF8
    IO (Ptr GIRepository.BaseInfo.BaseInfo)

{- |
Obtain a method of the object type given a /@name@/. 'Nothing' will be
returned if there\'s no method available with that name.
-}
objectInfoFindMethod ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIObjectInfo/@ -}
    -> T.Text
    {- ^ /@name@/: name of method to obtain -}
    -> m GIRepository.BaseInfo.BaseInfo
    {- ^ __Returns:__ the @/GIFunctionInfo/@. Free the struct by calling
@/g_base_info_unref()/@ when done. -}
objectInfoFindMethod info name = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    name' <- textToCString name
    result <- g_object_info_find_method info' name'
    checkUnexpectedReturnNULL "objectInfoFindMethod" result
    result' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) result
    touchManagedPtr info
    freeMem name'
    return result'


-- function g_invoke_error_quark
-- Args : []
-- Lengths : []
-- returnType : Just (TBasicType TUInt32)
-- throws : False
-- Skip return : False

foreign import ccall "g_invoke_error_quark" g_invoke_error_quark ::
    IO Word32

{- |
TODO
-}
invokeErrorQuark ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m Word32
    {- ^ __Returns:__ TODO -}
invokeErrorQuark  = liftIO $ do
    result <- g_invoke_error_quark
    return result


-- function g_interface_info_get_vfunc
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIInterfaceInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "index of virtual function to get", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_interface_info_get_vfunc" g_interface_info_get_vfunc ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    Int32 ->                                -- n : TBasicType TInt
    IO (Ptr GIRepository.BaseInfo.BaseInfo)

{- |
Obtain an interface type virtual function at index /@n@/.
-}
interfaceInfoGetVfunc ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIInterfaceInfo/@ -}
    -> Int32
    {- ^ /@n@/: index of virtual function to get -}
    -> m GIRepository.BaseInfo.BaseInfo
    {- ^ __Returns:__ the @/GIVFuncInfo/@. Free the struct by calling
@/g_base_info_unref()/@ when done. -}
interfaceInfoGetVfunc info n = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_interface_info_get_vfunc info' n
    checkUnexpectedReturnNULL "interfaceInfoGetVfunc" result
    result' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) result
    touchManagedPtr info
    return result'


-- function g_interface_info_get_signal
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIInterfaceInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "index of signal to get", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_interface_info_get_signal" g_interface_info_get_signal ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    Int32 ->                                -- n : TBasicType TInt
    IO (Ptr GIRepository.BaseInfo.BaseInfo)

{- |
Obtain an interface type signal at index /@n@/.
-}
interfaceInfoGetSignal ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIInterfaceInfo/@ -}
    -> Int32
    {- ^ /@n@/: index of signal to get -}
    -> m GIRepository.BaseInfo.BaseInfo
    {- ^ __Returns:__ the @/GISignalInfo/@. Free the struct by calling
@/g_base_info_unref()/@ when done. -}
interfaceInfoGetSignal info n = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_interface_info_get_signal info' n
    checkUnexpectedReturnNULL "interfaceInfoGetSignal" result
    result' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) result
    touchManagedPtr info
    return result'


-- function g_interface_info_get_property
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIInterfaceInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "index of property to get", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_interface_info_get_property" g_interface_info_get_property ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    Int32 ->                                -- n : TBasicType TInt
    IO (Ptr GIRepository.BaseInfo.BaseInfo)

{- |
Obtain an interface type property at index /@n@/.
-}
interfaceInfoGetProperty ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIInterfaceInfo/@ -}
    -> Int32
    {- ^ /@n@/: index of property to get -}
    -> m GIRepository.BaseInfo.BaseInfo
    {- ^ __Returns:__ the @/GIPropertyInfo/@. Free the struct by calling
@/g_base_info_unref()/@ when done. -}
interfaceInfoGetProperty info n = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_interface_info_get_property info' n
    checkUnexpectedReturnNULL "interfaceInfoGetProperty" result
    result' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) result
    touchManagedPtr info
    return result'


-- function g_interface_info_get_prerequisite
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIInterfaceInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "index of prerequisites to get", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_interface_info_get_prerequisite" g_interface_info_get_prerequisite ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    Int32 ->                                -- n : TBasicType TInt
    IO (Ptr GIRepository.BaseInfo.BaseInfo)

{- |
Obtain an interface type prerequisites index /@n@/.
-}
interfaceInfoGetPrerequisite ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIInterfaceInfo/@ -}
    -> Int32
    {- ^ /@n@/: index of prerequisites to get -}
    -> m GIRepository.BaseInfo.BaseInfo
    {- ^ __Returns:__ the prerequisites as a 'GI.GIRepository.Structs.BaseInfo.BaseInfo'. Free the struct by calling
@/g_base_info_unref()/@ when done. -}
interfaceInfoGetPrerequisite info n = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_interface_info_get_prerequisite info' n
    checkUnexpectedReturnNULL "interfaceInfoGetPrerequisite" result
    result' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) result
    touchManagedPtr info
    return result'


-- function g_interface_info_get_n_vfuncs
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIInterfaceInfo", 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 "g_interface_info_get_n_vfuncs" g_interface_info_get_n_vfuncs ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO Int32

{- |
Obtain the number of virtual functions that this interface type has.
-}
interfaceInfoGetNVfuncs ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIInterfaceInfo/@ -}
    -> m Int32
    {- ^ __Returns:__ number of virtual functions -}
interfaceInfoGetNVfuncs info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_interface_info_get_n_vfuncs info'
    touchManagedPtr info
    return result


-- function g_interface_info_get_n_signals
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIInterfaceInfo", 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 "g_interface_info_get_n_signals" g_interface_info_get_n_signals ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO Int32

{- |
Obtain the number of signals that this interface type has.
-}
interfaceInfoGetNSignals ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIInterfaceInfo/@ -}
    -> m Int32
    {- ^ __Returns:__ number of signals -}
interfaceInfoGetNSignals info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_interface_info_get_n_signals info'
    touchManagedPtr info
    return result


-- function g_interface_info_get_n_properties
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIInterfaceInfo", 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 "g_interface_info_get_n_properties" g_interface_info_get_n_properties ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO Int32

{- |
Obtain the number of properties that this interface type has.
-}
interfaceInfoGetNProperties ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIInterfaceInfo/@ -}
    -> m Int32
    {- ^ __Returns:__ number of properties -}
interfaceInfoGetNProperties info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_interface_info_get_n_properties info'
    touchManagedPtr info
    return result


-- function g_interface_info_get_n_prerequisites
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIInterfaceInfo", 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 "g_interface_info_get_n_prerequisites" g_interface_info_get_n_prerequisites ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO Int32

{- |
Obtain the number of prerequisites for this interface type.
A prerequisites is another interface that needs to be implemented for
interface, similar to an base class for GObjects.
-}
interfaceInfoGetNPrerequisites ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIInterfaceInfo/@ -}
    -> m Int32
    {- ^ __Returns:__ number of prerequisites -}
interfaceInfoGetNPrerequisites info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_interface_info_get_n_prerequisites info'
    touchManagedPtr info
    return result


-- function g_interface_info_get_n_methods
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIInterfaceInfo", 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 "g_interface_info_get_n_methods" g_interface_info_get_n_methods ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO Int32

{- |
Obtain the number of methods that this interface type has.
-}
interfaceInfoGetNMethods ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIInterfaceInfo/@ -}
    -> m Int32
    {- ^ __Returns:__ number of methods -}
interfaceInfoGetNMethods info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_interface_info_get_n_methods info'
    touchManagedPtr info
    return result


-- function g_interface_info_get_n_constants
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIInterfaceInfo", 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 "g_interface_info_get_n_constants" g_interface_info_get_n_constants ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO Int32

{- |
Obtain the number of constants that this interface type has.
-}
interfaceInfoGetNConstants ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIInterfaceInfo/@ -}
    -> m Int32
    {- ^ __Returns:__ number of constants -}
interfaceInfoGetNConstants info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_interface_info_get_n_constants info'
    touchManagedPtr info
    return result


-- function g_interface_info_get_method
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIInterfaceInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "index of method to get", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_interface_info_get_method" g_interface_info_get_method ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    Int32 ->                                -- n : TBasicType TInt
    IO (Ptr GIRepository.BaseInfo.BaseInfo)

{- |
Obtain an interface type method at index /@n@/.
-}
interfaceInfoGetMethod ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIInterfaceInfo/@ -}
    -> Int32
    {- ^ /@n@/: index of method to get -}
    -> m GIRepository.BaseInfo.BaseInfo
    {- ^ __Returns:__ the @/GIFunctionInfo/@. Free the struct by calling
@/g_base_info_unref()/@ when done. -}
interfaceInfoGetMethod info n = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_interface_info_get_method info' n
    checkUnexpectedReturnNULL "interfaceInfoGetMethod" result
    result' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) result
    touchManagedPtr info
    return result'


-- function g_interface_info_get_iface_struct
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIInterfaceInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_interface_info_get_iface_struct" g_interface_info_get_iface_struct ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO (Ptr GIRepository.BaseInfo.BaseInfo)

{- |
Returns the layout C structure associated with this @/GInterface/@.
-}
interfaceInfoGetIfaceStruct ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIInterfaceInfo/@ -}
    -> m GIRepository.BaseInfo.BaseInfo
    {- ^ __Returns:__ the @/GIStructInfo/@ or 'Nothing'. Free it with
@/g_base_info_unref()/@ when done. -}
interfaceInfoGetIfaceStruct info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_interface_info_get_iface_struct info'
    checkUnexpectedReturnNULL "interfaceInfoGetIfaceStruct" result
    result' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) result
    touchManagedPtr info
    return result'


-- function g_interface_info_get_constant
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIInterfaceInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "index of constant to get", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_interface_info_get_constant" g_interface_info_get_constant ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    Int32 ->                                -- n : TBasicType TInt
    IO (Ptr GIRepository.BaseInfo.BaseInfo)

{- |
Obtain an interface type constant at index /@n@/.
-}
interfaceInfoGetConstant ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIInterfaceInfo/@ -}
    -> Int32
    {- ^ /@n@/: index of constant to get -}
    -> m GIRepository.BaseInfo.BaseInfo
    {- ^ __Returns:__ the @/GIConstantInfo/@. Free the struct by calling
@/g_base_info_unref()/@ when done. -}
interfaceInfoGetConstant info n = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_interface_info_get_constant info' n
    checkUnexpectedReturnNULL "interfaceInfoGetConstant" result
    result' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) result
    touchManagedPtr info
    return result'


-- function g_interface_info_find_vfunc
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIInterfaceInfo", 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 "The name of a virtual function to find.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_interface_info_find_vfunc" g_interface_info_find_vfunc ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    CString ->                              -- name : TBasicType TUTF8
    IO (Ptr GIRepository.BaseInfo.BaseInfo)

{- |
Locate a virtual function slot with name /@name@/. See the documentation
for 'GI.GIRepository.Functions.objectInfoFindVfunc' for more information on virtuals.
-}
interfaceInfoFindVfunc ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIInterfaceInfo/@ -}
    -> T.Text
    {- ^ /@name@/: The name of a virtual function to find. -}
    -> m GIRepository.BaseInfo.BaseInfo
    {- ^ __Returns:__ the @/GIVFuncInfo/@, or 'Nothing'. Free it with
@/g_base_info_unref()/@ when done. -}
interfaceInfoFindVfunc info name = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    name' <- textToCString name
    result <- g_interface_info_find_vfunc info' name'
    checkUnexpectedReturnNULL "interfaceInfoFindVfunc" result
    result' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) result
    touchManagedPtr info
    freeMem name'
    return result'


-- function g_interface_info_find_signal
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIInterfaceInfo", 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 "Name of signal", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_interface_info_find_signal" g_interface_info_find_signal ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    CString ->                              -- name : TBasicType TUTF8
    IO (Ptr GIRepository.BaseInfo.BaseInfo)

{- |
TODO

/Since: 1.34/
-}
interfaceInfoFindSignal ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIInterfaceInfo/@ -}
    -> T.Text
    {- ^ /@name@/: Name of signal -}
    -> m GIRepository.BaseInfo.BaseInfo
    {- ^ __Returns:__ Info for the signal with name /@name@/ in /@info@/, or
'Nothing' on failure. -}
interfaceInfoFindSignal info name = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    name' <- textToCString name
    result <- g_interface_info_find_signal info' name'
    checkUnexpectedReturnNULL "interfaceInfoFindSignal" result
    result' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) result
    touchManagedPtr info
    freeMem name'
    return result'


-- function g_interface_info_find_method
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIInterfaceInfo", 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 "name of method to obtain", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_interface_info_find_method" g_interface_info_find_method ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    CString ->                              -- name : TBasicType TUTF8
    IO (Ptr GIRepository.BaseInfo.BaseInfo)

{- |
Obtain a method of the interface type given a /@name@/. 'Nothing' will be
returned if there\'s no method available with that name.
-}
interfaceInfoFindMethod ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIInterfaceInfo/@ -}
    -> T.Text
    {- ^ /@name@/: name of method to obtain -}
    -> m GIRepository.BaseInfo.BaseInfo
    {- ^ __Returns:__ the @/GIFunctionInfo/@ or 'Nothing' if none found.
Free the struct by calling @/g_base_info_unref()/@ when done. -}
interfaceInfoFindMethod info name = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    name' <- textToCString name
    result <- g_interface_info_find_method info' name'
    checkUnexpectedReturnNULL "interfaceInfoFindMethod" result
    result' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) result
    touchManagedPtr info
    freeMem name'
    return result'


-- function g_info_type_to_string
-- Args : [Arg {argCName = "type", argType = TInterface (Name {namespace = "GIRepository", name = "InfoType"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the info type", 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 "g_info_type_to_string" g_info_type_to_string ::
    CUInt ->                                -- type : TInterface (Name {namespace = "GIRepository", name = "InfoType"})
    IO CString

{- |
Obtain a string representation of /@type@/
-}
infoTypeToString ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.Enums.InfoType
    {- ^ /@type@/: the info type -}
    -> m T.Text
    {- ^ __Returns:__ the string -}
infoTypeToString type_ = liftIO $ do
    let type_' = (fromIntegral . fromEnum) type_
    result <- g_info_type_to_string type_'
    checkUnexpectedReturnNULL "infoTypeToString" result
    result' <- cstringToText result
    return result'


-- function g_info_new
-- Args : [Arg {argCName = "type", argType = TInterface (Name {namespace = "GIRepository", name = "InfoType"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "TODO", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "container", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "TODO", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "typelib", argType = TInterface (Name {namespace = "GIRepository", name = "Typelib"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "TODO", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "offset", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "TODO", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_info_new" g_info_new ::
    CUInt ->                                -- type : TInterface (Name {namespace = "GIRepository", name = "InfoType"})
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- container : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    Ptr GIRepository.Typelib.Typelib ->     -- typelib : TInterface (Name {namespace = "GIRepository", name = "Typelib"})
    Word32 ->                               -- offset : TBasicType TUInt32
    IO (Ptr GIRepository.BaseInfo.BaseInfo)

{- |
TODO
-}
infoNew ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.Enums.InfoType
    {- ^ /@type@/: TODO -}
    -> GIRepository.BaseInfo.BaseInfo
    {- ^ /@container@/: TODO -}
    -> GIRepository.Typelib.Typelib
    {- ^ /@typelib@/: TODO -}
    -> Word32
    {- ^ /@offset@/: TODO -}
    -> m GIRepository.BaseInfo.BaseInfo
    {- ^ __Returns:__ TODO -}
infoNew type_ container typelib offset = liftIO $ do
    let type_' = (fromIntegral . fromEnum) type_
    container' <- unsafeManagedPtrGetPtr container
    typelib' <- unsafeManagedPtrGetPtr typelib
    result <- g_info_new type_' container' typelib' offset
    checkUnexpectedReturnNULL "infoNew" result
    result' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) result
    touchManagedPtr container
    touchManagedPtr typelib
    return result'


-- function g_function_info_get_vfunc
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIFunctionInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_function_info_get_vfunc" g_function_info_get_vfunc ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO (Ptr GIRepository.BaseInfo.BaseInfo)

{- |
Obtain the virtual function associated with this @/GIFunctionInfo/@.
Only @/GIFunctionInfo/@ with the flag 'GI.GIRepository.Flags.FunctionInfoFlagsWrapsVfunc' has
a virtual function set. For other cases, 'Nothing' will be returned.
-}
functionInfoGetVfunc ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIFunctionInfo/@ -}
    -> m GIRepository.BaseInfo.BaseInfo
    {- ^ __Returns:__ the virtual function or 'Nothing' if not set.
Free it by calling @/g_base_info_unref()/@ when done. -}
functionInfoGetVfunc info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_function_info_get_vfunc info'
    checkUnexpectedReturnNULL "functionInfoGetVfunc" result
    result' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) result
    touchManagedPtr info
    return result'


-- function g_function_info_get_symbol
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIFunctionInfo", 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 "g_function_info_get_symbol" g_function_info_get_symbol ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO CString

{- |
Obtain the symbol of the function. The symbol is the name of the
exported function, suitable to be used as an argument to
@/g_module_symbol()/@.
-}
functionInfoGetSymbol ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIFunctionInfo/@ -}
    -> m T.Text
    {- ^ __Returns:__ the symbol -}
functionInfoGetSymbol info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_function_info_get_symbol info'
    checkUnexpectedReturnNULL "functionInfoGetSymbol" result
    result' <- cstringToText result
    touchManagedPtr info
    return result'


-- function g_function_info_get_property
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIFunctionInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_function_info_get_property" g_function_info_get_property ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO (Ptr GIRepository.BaseInfo.BaseInfo)

{- |
Obtain the property associated with this @/GIFunctionInfo/@.
Only @/GIFunctionInfo/@ with the flag 'GI.GIRepository.Flags.FunctionInfoFlagsIsGetter' or
'GI.GIRepository.Flags.FunctionInfoFlagsIsSetter' have a property set. For other cases,
'Nothing' will be returned.
-}
functionInfoGetProperty ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIFunctionInfo/@ -}
    -> m GIRepository.BaseInfo.BaseInfo
    {- ^ __Returns:__ the property or 'Nothing' if not set. Free it with
@/g_base_info_unref()/@ when done. -}
functionInfoGetProperty info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_function_info_get_property info'
    checkUnexpectedReturnNULL "functionInfoGetProperty" result
    result' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) result
    touchManagedPtr info
    return result'


-- function g_function_info_get_flags
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIFunctionInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "FunctionInfoFlags"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_function_info_get_flags" g_function_info_get_flags ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO CUInt

{- |
Obtain the 'GI.GIRepository.Flags.FunctionInfoFlags' for the /@info@/.
-}
functionInfoGetFlags ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIFunctionInfo/@ -}
    -> m [GIRepository.Flags.FunctionInfoFlags]
    {- ^ __Returns:__ the flags -}
functionInfoGetFlags info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_function_info_get_flags info'
    let result' = wordToGFlags result
    touchManagedPtr info
    return result'


-- function g_field_info_get_type
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIFieldInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_field_info_get_type" g_field_info_get_type ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO (Ptr GIRepository.BaseInfo.BaseInfo)

{- |
Obtain the type of a field as a @/GITypeInfo/@.
-}
fieldInfoGetType ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIFieldInfo/@ -}
    -> m GIRepository.BaseInfo.BaseInfo
    {- ^ __Returns:__ the @/GITypeInfo/@. Free the struct by calling
@/g_base_info_unref()/@ when done. -}
fieldInfoGetType info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_field_info_get_type info'
    checkUnexpectedReturnNULL "fieldInfoGetType" result
    result' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) result
    touchManagedPtr info
    return result'


-- function g_field_info_get_size
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIFieldInfo", 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 "g_field_info_get_size" g_field_info_get_size ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO Int32

{- |
Obtain the size in bits of the field member, this is how
much space you need to allocate to store the field.
-}
fieldInfoGetSize ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIFieldInfo/@ -}
    -> m Int32
    {- ^ __Returns:__ the field size -}
fieldInfoGetSize info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_field_info_get_size info'
    touchManagedPtr info
    return result


-- function g_field_info_get_offset
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIFieldInfo", 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 "g_field_info_get_offset" g_field_info_get_offset ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO Int32

{- |
Obtain the offset in bytes of the field member, this is relative
to the beginning of the struct or union.
-}
fieldInfoGetOffset ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIFieldInfo/@ -}
    -> m Int32
    {- ^ __Returns:__ the field offset -}
fieldInfoGetOffset info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_field_info_get_offset info'
    touchManagedPtr info
    return result


-- function g_field_info_get_flags
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIFieldInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "FieldInfoFlags"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_field_info_get_flags" g_field_info_get_flags ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO CUInt

{- |
Obtain the flags for this @/GIFieldInfo/@. See 'GI.GIRepository.Flags.FieldInfoFlags' for possible
flag values.
-}
fieldInfoGetFlags ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIFieldInfo/@ -}
    -> m [GIRepository.Flags.FieldInfoFlags]
    {- ^ __Returns:__ the flags -}
fieldInfoGetFlags info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_field_info_get_flags info'
    let result' = wordToGFlags result
    touchManagedPtr info
    return result'


-- function g_enum_info_get_value
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIEnumInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "index of value to fetch", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_enum_info_get_value" g_enum_info_get_value ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    Int32 ->                                -- n : TBasicType TInt
    IO (Ptr GIRepository.BaseInfo.BaseInfo)

{- |
Obtain a value for this enumeration.
-}
enumInfoGetValue ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIEnumInfo/@ -}
    -> Int32
    {- ^ /@n@/: index of value to fetch -}
    -> m GIRepository.BaseInfo.BaseInfo
    {- ^ __Returns:__ the enumeration value or 'Nothing' if type tag is wrong,
free the struct with @/g_base_info_unref()/@ when done. -}
enumInfoGetValue info n = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_enum_info_get_value info' n
    checkUnexpectedReturnNULL "enumInfoGetValue" result
    result' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) result
    touchManagedPtr info
    return result'


-- function g_enum_info_get_storage_type
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIEnumInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "TypeTag"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_enum_info_get_storage_type" g_enum_info_get_storage_type ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO CUInt

{- |
Obtain the tag of the type used for the enum in the C ABI. This will
will be a signed or unsigned integral type.

Note that in the current implementation the width of the type is
computed correctly, but the signed or unsigned nature of the type
may not match the sign of the type used by the C compiler.
-}
enumInfoGetStorageType ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIEnumInfo/@ -}
    -> m GIRepository.Enums.TypeTag
    {- ^ __Returns:__ the storage type for the enumeration -}
enumInfoGetStorageType info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_enum_info_get_storage_type info'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr info
    return result'


-- function g_enum_info_get_n_values
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIEnumInfo", 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 "g_enum_info_get_n_values" g_enum_info_get_n_values ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO Int32

{- |
Obtain the number of values this enumeration contains.
-}
enumInfoGetNValues ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIEnumInfo/@ -}
    -> m Int32
    {- ^ __Returns:__ the number of enumeration values -}
enumInfoGetNValues info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_enum_info_get_n_values info'
    touchManagedPtr info
    return result


-- function g_enum_info_get_n_methods
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIEnumInfo", 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 "g_enum_info_get_n_methods" g_enum_info_get_n_methods ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO Int32

{- |
Obtain the number of methods that this enum type has.

/Since: 1.30/
-}
enumInfoGetNMethods ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIEnumInfo/@ -}
    -> m Int32
    {- ^ __Returns:__ number of methods -}
enumInfoGetNMethods info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_enum_info_get_n_methods info'
    touchManagedPtr info
    return result


-- function g_enum_info_get_method
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIEnumInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "index of method to get", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_enum_info_get_method" g_enum_info_get_method ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    Int32 ->                                -- n : TBasicType TInt
    IO (Ptr GIRepository.BaseInfo.BaseInfo)

{- |
Obtain an enum type method at index /@n@/.

/Since: 1.30/
-}
enumInfoGetMethod ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIEnumInfo/@ -}
    -> Int32
    {- ^ /@n@/: index of method to get -}
    -> m GIRepository.BaseInfo.BaseInfo
    {- ^ __Returns:__ the @/GIFunctionInfo/@. Free the struct by calling
@/g_base_info_unref()/@ when done. -}
enumInfoGetMethod info n = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_enum_info_get_method info' n
    checkUnexpectedReturnNULL "enumInfoGetMethod" result
    result' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) result
    touchManagedPtr info
    return result'


-- function g_enum_info_get_error_domain
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIEnumInfo", 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 "g_enum_info_get_error_domain" g_enum_info_get_error_domain ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO CString

{- |
Obtain the string form of the quark for the error domain associated with
this enum, if any.

/Since: 1.30/
-}
enumInfoGetErrorDomain ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIEnumInfo/@ -}
    -> m T.Text
    {- ^ __Returns:__ the string form of the error domain associated
with this enum, or 'Nothing'. -}
enumInfoGetErrorDomain info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_enum_info_get_error_domain info'
    checkUnexpectedReturnNULL "enumInfoGetErrorDomain" result
    result' <- cstringToText result
    touchManagedPtr info
    return result'


-- function g_constant_info_get_type
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIConstantInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_constant_info_get_type" g_constant_info_get_type ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO (Ptr GIRepository.BaseInfo.BaseInfo)

{- |
Obtain the type of the constant as a @/GITypeInfo/@.
-}
constantInfoGetType ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIConstantInfo/@ -}
    -> m GIRepository.BaseInfo.BaseInfo
    {- ^ __Returns:__ the @/GITypeInfo/@. Free the struct by calling
@/g_base_info_unref()/@ when done. -}
constantInfoGetType info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_constant_info_get_type info'
    checkUnexpectedReturnNULL "constantInfoGetType" result
    result' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) result
    touchManagedPtr info
    return result'


-- function gi_cclosure_marshal_generic
-- Args : [Arg {argCName = "closure", argType = TGClosure Nothing, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "return_gvalue", argType = TInterface (Name {namespace = "GObject", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n_param_values", 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 = "param_values", argType = TInterface (Name {namespace = "GObject", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "invocation_hint", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "marshal_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gi_cclosure_marshal_generic" gi_cclosure_marshal_generic ::
    Ptr (GClosure ()) ->                    -- closure : TGClosure Nothing
    Ptr GValue ->                           -- return_gvalue : TInterface (Name {namespace = "GObject", name = "Value"})
    Word32 ->                               -- n_param_values : TBasicType TUInt
    Ptr GValue ->                           -- param_values : TInterface (Name {namespace = "GObject", name = "Value"})
    Ptr () ->                               -- invocation_hint : TBasicType TPtr
    Ptr () ->                               -- marshal_data : TBasicType TPtr
    IO ()

{- |
/No description available in the introspection data./
-}
cclosureMarshalGeneric ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GClosure a
    -> GValue
    -> Word32
    -> GValue
    -> Ptr ()
    -> Ptr ()
    -> m ()
cclosureMarshalGeneric closure returnGvalue nParamValues paramValues invocationHint marshalData = liftIO $ do
    closure' <- unsafeManagedPtrCastPtr closure
    returnGvalue' <- unsafeManagedPtrGetPtr returnGvalue
    paramValues' <- unsafeManagedPtrGetPtr paramValues
    gi_cclosure_marshal_generic closure' returnGvalue' nParamValues paramValues' invocationHint marshalData
    touchManagedPtr closure
    touchManagedPtr returnGvalue
    touchManagedPtr paramValues
    return ()


-- function g_callable_info_skip_return
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GICallableInfo", 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 "g_callable_info_skip_return" g_callable_info_skip_return ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO CInt

{- |
See if a callable\'s return value is only useful in C.
-}
callableInfoSkipReturn ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GICallableInfo/@ -}
    -> m Bool
    {- ^ __Returns:__ 'True' if return value is only useful in C. -}
callableInfoSkipReturn info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_callable_info_skip_return info'
    let result' = (/= 0) result
    touchManagedPtr info
    return result'


-- function g_callable_info_may_return_null
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GICallableInfo", 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 "g_callable_info_may_return_null" g_callable_info_may_return_null ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO CInt

{- |
See if a callable could return 'Nothing'.
-}
callableInfoMayReturnNull ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GICallableInfo/@ -}
    -> m Bool
    {- ^ __Returns:__ 'True' if callable could return 'Nothing' -}
callableInfoMayReturnNull info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_callable_info_may_return_null info'
    let result' = (/= 0) result
    touchManagedPtr info
    return result'


-- function g_callable_info_load_return_type
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GICallableInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "type", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Initialized with return type of @info", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = True, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "g_callable_info_load_return_type" g_callable_info_load_return_type ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- type : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO ()

{- |
Obtain information about a return value of callable; this
function is a variant of 'GI.GIRepository.Functions.callableInfoGetReturnType' designed for stack
allocation.

The initialized /@type@/ must not be referenced after /@info@/ is deallocated.
-}
callableInfoLoadReturnType ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GICallableInfo/@ -}
    -> m (GIRepository.BaseInfo.BaseInfo)
callableInfoLoadReturnType info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    type_ <- callocBoxedBytes 72 :: IO (Ptr GIRepository.BaseInfo.BaseInfo)
    g_callable_info_load_return_type info' type_
    type_' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) type_
    touchManagedPtr info
    return type_'


-- function g_callable_info_load_arg
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GICallableInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the argument index to fetch", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "arg", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Initialize with argument number @n", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = True, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "g_callable_info_load_arg" g_callable_info_load_arg ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    Int32 ->                                -- n : TBasicType TInt
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- arg : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO ()

{- |
Obtain information about a particular argument of this callable; this
function is a variant of 'GI.GIRepository.Functions.callableInfoGetArg' designed for stack
allocation.

The initialized /@arg@/ must not be referenced after /@info@/ is deallocated.
-}
callableInfoLoadArg ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GICallableInfo/@ -}
    -> Int32
    {- ^ /@n@/: the argument index to fetch -}
    -> m (GIRepository.BaseInfo.BaseInfo)
callableInfoLoadArg info n = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    arg <- callocBoxedBytes 72 :: IO (Ptr GIRepository.BaseInfo.BaseInfo)
    g_callable_info_load_arg info' n arg
    arg' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) arg
    touchManagedPtr info
    return arg'


-- function g_callable_info_iterate_return_attributes
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GICallableInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "iterator", argType = TInterface (Name {namespace = "GIRepository", name = "AttributeIter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIAttributeIter structure, must be initialized; see below", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "name", argType = TBasicType TUTF8, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Returned name, must not be freed", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TBasicType TUTF8, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Returned name, must not be freed", 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 "g_callable_info_iterate_return_attributes" g_callable_info_iterate_return_attributes ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    Ptr GIRepository.AttributeIter.AttributeIter -> -- iterator : TInterface (Name {namespace = "GIRepository", name = "AttributeIter"})
    Ptr CString ->                          -- name : TBasicType TUTF8
    Ptr CString ->                          -- value : TBasicType TUTF8
    IO CInt

{- |
Iterate over all attributes associated with the return value.  The
iterator structure is typically stack allocated, and must have its
first member initialized to 'Nothing'.

Both the /@name@/ and /@value@/ should be treated as constants
and must not be freed.

See 'GI.GIRepository.Structs.BaseInfo.baseInfoIterateAttributes' for an example of how to use a
similar API.
-}
callableInfoIterateReturnAttributes ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GICallableInfo/@ -}
    -> GIRepository.AttributeIter.AttributeIter
    {- ^ /@iterator@/: a 'GI.GIRepository.Structs.AttributeIter.AttributeIter' structure, must be initialized; see below -}
    -> m ((Bool, T.Text, T.Text))
    {- ^ __Returns:__ 'True' if there are more attributes -}
callableInfoIterateReturnAttributes info iterator = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    iterator' <- unsafeManagedPtrGetPtr iterator
    name <- allocMem :: IO (Ptr CString)
    value <- allocMem :: IO (Ptr CString)
    result <- g_callable_info_iterate_return_attributes info' iterator' name value
    let result' = (/= 0) result
    name' <- peek name
    name'' <- cstringToText name'
    value' <- peek value
    value'' <- cstringToText value'
    touchManagedPtr info
    touchManagedPtr iterator
    freeMem name
    freeMem value
    return (result', name'', value'')


-- function g_callable_info_is_method
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GICallableInfo", 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 "g_callable_info_is_method" g_callable_info_is_method ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO CInt

{- |
Determines if the callable info is a method. For @/GIVFuncInfo/@\<!-- -->s,
@/GICallbackInfo/@\<!-- -->s, and @/GISignalInfo/@\<!-- -->s,
this is always true. Otherwise, this looks at the 'GI.GIRepository.Flags.FunctionInfoFlagsIsMethod'
flag on the @/GIFunctionInfo/@.

Concretely, this function returns whether 'GI.GIRepository.Functions.callableInfoGetNArgs'
matches the number of arguments in the raw C method. For methods, there
is one more C argument than is exposed by introspection: the \"self\"
or \"this\" object.

/Since: 1.34/
-}
callableInfoIsMethod ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GICallableInfo/@ -}
    -> m Bool
    {- ^ __Returns:__ 'True' if /@info@/ is a method, 'False' otherwise -}
callableInfoIsMethod info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_callable_info_is_method info'
    let result' = (/= 0) result
    touchManagedPtr info
    return result'


-- function g_callable_info_invoke
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "TODO", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "function", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "TODO", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "in_args", argType = TCArray False (-1) 3 (TInterface (Name {namespace = "GIRepository", name = "Argument"})), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "TODO", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n_in_args", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "TODO", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "out_args", argType = TCArray False (-1) 5 (TInterface (Name {namespace = "GIRepository", name = "Argument"})), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "TODO", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n_out_args", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "TODO", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "return_value", argType = TInterface (Name {namespace = "GIRepository", name = "Argument"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "TODO", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "is_method", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "TODO", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "throws", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "TODO", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : [Arg {argCName = "n_out_args", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "TODO", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n_in_args", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "TODO", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- returnType : Just (TBasicType TBoolean)
-- throws : True
-- Skip return : False

foreign import ccall "g_callable_info_invoke" g_callable_info_invoke ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    Ptr () ->                               -- function : TBasicType TPtr
    Ptr GIRepository.Argument.Argument ->   -- in_args : TCArray False (-1) 3 (TInterface (Name {namespace = "GIRepository", name = "Argument"}))
    Int32 ->                                -- n_in_args : TBasicType TInt
    Ptr GIRepository.Argument.Argument ->   -- out_args : TCArray False (-1) 5 (TInterface (Name {namespace = "GIRepository", name = "Argument"}))
    Int32 ->                                -- n_out_args : TBasicType TInt
    Ptr GIRepository.Argument.Argument ->   -- return_value : TInterface (Name {namespace = "GIRepository", name = "Argument"})
    CInt ->                                 -- is_method : TBasicType TBoolean
    CInt ->                                 -- throws : TBasicType TBoolean
    Ptr (Ptr GError) ->                     -- error
    IO CInt

{- |
TODO
-}
callableInfoInvoke ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: TODO -}
    -> Ptr ()
    {- ^ /@function@/: TODO -}
    -> [GIRepository.Argument.Argument]
    {- ^ /@inArgs@/: TODO -}
    -> [GIRepository.Argument.Argument]
    {- ^ /@outArgs@/: TODO -}
    -> GIRepository.Argument.Argument
    {- ^ /@returnValue@/: TODO -}
    -> Bool
    {- ^ /@isMethod@/: TODO -}
    -> Bool
    {- ^ /@throws@/: TODO -}
    -> m ()
    {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}
callableInfoInvoke info function inArgs outArgs returnValue isMethod throws = liftIO $ do
    let nOutArgs = fromIntegral $ length outArgs
    let nInArgs = fromIntegral $ length inArgs
    info' <- unsafeManagedPtrGetPtr info
    inArgs' <- mapM unsafeManagedPtrGetPtr inArgs
    inArgs'' <- packBlockArray 8 inArgs'
    outArgs' <- mapM unsafeManagedPtrGetPtr outArgs
    outArgs'' <- packBlockArray 8 outArgs'
    returnValue' <- unsafeManagedPtrGetPtr returnValue
    let isMethod' = (fromIntegral . fromEnum) isMethod
    let throws' = (fromIntegral . fromEnum) throws
    onException (do
        _ <- propagateGError $ g_callable_info_invoke info' function inArgs'' nInArgs outArgs'' nOutArgs returnValue' isMethod' throws'
        touchManagedPtr info
        mapM_ touchManagedPtr inArgs
        mapM_ touchManagedPtr outArgs
        touchManagedPtr returnValue
        freeMem inArgs''
        freeMem outArgs''
        return ()
     ) (do
        freeMem inArgs''
        freeMem outArgs''
     )


-- function g_callable_info_get_return_type
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GICallableInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_callable_info_get_return_type" g_callable_info_get_return_type ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO (Ptr GIRepository.BaseInfo.BaseInfo)

{- |
Obtain the return type of a callable item as a @/GITypeInfo/@.
-}
callableInfoGetReturnType ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GICallableInfo/@ -}
    -> m GIRepository.BaseInfo.BaseInfo
    {- ^ __Returns:__ the @/GITypeInfo/@. Free the struct by calling
@/g_base_info_unref()/@ when done. -}
callableInfoGetReturnType info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_callable_info_get_return_type info'
    checkUnexpectedReturnNULL "callableInfoGetReturnType" result
    result' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) result
    touchManagedPtr info
    return result'


-- function g_callable_info_get_return_attribute
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GICallableInfo", 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 "a freeform string naming an attribute", 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 "g_callable_info_get_return_attribute" g_callable_info_get_return_attribute ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    CString ->                              -- name : TBasicType TUTF8
    IO CString

{- |
Retrieve an arbitrary attribute associated with the return value.
-}
callableInfoGetReturnAttribute ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GICallableInfo/@ -}
    -> T.Text
    {- ^ /@name@/: a freeform string naming an attribute -}
    -> m T.Text
    {- ^ __Returns:__ The value of the attribute, or 'Nothing' if no such attribute exists -}
callableInfoGetReturnAttribute info name = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    name' <- textToCString name
    result <- g_callable_info_get_return_attribute info' name'
    checkUnexpectedReturnNULL "callableInfoGetReturnAttribute" result
    result' <- cstringToText result
    touchManagedPtr info
    freeMem name'
    return result'


-- function g_callable_info_get_n_args
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GICallableInfo", 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 "g_callable_info_get_n_args" g_callable_info_get_n_args ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO Int32

{- |
Obtain the number of arguments (both IN and OUT) for this callable.
-}
callableInfoGetNArgs ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GICallableInfo/@ -}
    -> m Int32
    {- ^ __Returns:__ The number of arguments this callable expects. -}
callableInfoGetNArgs info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_callable_info_get_n_args info'
    touchManagedPtr info
    return result


-- function g_callable_info_get_instance_ownership_transfer
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GICallableInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "Transfer"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_callable_info_get_instance_ownership_transfer" g_callable_info_get_instance_ownership_transfer ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO CUInt

{- |
Obtains the ownership transfer for the instance argument.
'GI.GIRepository.Enums.Transfer' contains a list of possible transfer values.

/Since: 1.42/
-}
callableInfoGetInstanceOwnershipTransfer ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GICallableInfo/@ -}
    -> m GIRepository.Enums.Transfer
    {- ^ __Returns:__ the transfer mode of the instance argument -}
callableInfoGetInstanceOwnershipTransfer info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_callable_info_get_instance_ownership_transfer info'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr info
    return result'


-- function g_callable_info_get_caller_owns
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GICallableInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "Transfer"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_callable_info_get_caller_owns" g_callable_info_get_caller_owns ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO CUInt

{- |
See whether the caller owns the return value of this callable.
'GI.GIRepository.Enums.Transfer' contains a list of possible transfer values.
-}
callableInfoGetCallerOwns ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GICallableInfo/@ -}
    -> m GIRepository.Enums.Transfer
    {- ^ __Returns:__ the transfer mode for the return value of the callable -}
callableInfoGetCallerOwns info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_callable_info_get_caller_owns info'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr info
    return result'


-- function g_callable_info_get_arg
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GICallableInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the argument index to fetch", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_callable_info_get_arg" g_callable_info_get_arg ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    Int32 ->                                -- n : TBasicType TInt
    IO (Ptr GIRepository.BaseInfo.BaseInfo)

{- |
Obtain information about a particular argument of this callable.
-}
callableInfoGetArg ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GICallableInfo/@ -}
    -> Int32
    {- ^ /@n@/: the argument index to fetch -}
    -> m GIRepository.BaseInfo.BaseInfo
    {- ^ __Returns:__ the @/GIArgInfo/@. Free it with
@/g_base_info_unref()/@ when done. -}
callableInfoGetArg info n = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_callable_info_get_arg info' n
    checkUnexpectedReturnNULL "callableInfoGetArg" result
    result' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) result
    touchManagedPtr info
    return result'


-- function g_callable_info_can_throw_gerror
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GICallableInfo", 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 "g_callable_info_can_throw_gerror" g_callable_info_can_throw_gerror ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO CInt

{- |
TODO

/Since: 1.34/
-}
callableInfoCanThrowGerror ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GICallableInfo/@ -}
    -> m Bool
    {- ^ __Returns:__ 'True' if this @/GICallableInfo/@ can throw a 'GError' -}
callableInfoCanThrowGerror info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_callable_info_can_throw_gerror info'
    let result' = (/= 0) result
    touchManagedPtr info
    return result'


-- function g_arg_info_may_be_null
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIArgInfo", 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 "g_arg_info_may_be_null" g_arg_info_may_be_null ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO CInt

{- |
Obtain if the type of the argument includes the possibility of 'Nothing'.
For \'in\' values this means that 'Nothing' is a valid value.  For \'out\'
values, this means that 'Nothing' may be returned.

See also 'GI.GIRepository.Functions.argInfoIsOptional'.
-}
argInfoMayBeNull ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIArgInfo/@ -}
    -> m Bool
    {- ^ __Returns:__ 'True' if the value may be 'Nothing' -}
argInfoMayBeNull info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_arg_info_may_be_null info'
    let result' = (/= 0) result
    touchManagedPtr info
    return result'


-- function g_arg_info_load_type
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIArgInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "type", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Initialized with information about type of @info", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = True, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "g_arg_info_load_type" g_arg_info_load_type ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- type : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO ()

{- |
Obtain information about a the type of given argument /@info@/; this
function is a variant of 'GI.GIRepository.Functions.argInfoGetType' designed for stack
allocation.

The initialized /@type@/ must not be referenced after /@info@/ is deallocated.
-}
argInfoLoadType ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIArgInfo/@ -}
    -> m (GIRepository.BaseInfo.BaseInfo)
argInfoLoadType info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    type_ <- callocBoxedBytes 72 :: IO (Ptr GIRepository.BaseInfo.BaseInfo)
    g_arg_info_load_type info' type_
    type_' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) type_
    touchManagedPtr info
    return type_'


-- function g_arg_info_is_skip
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIArgInfo", 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 "g_arg_info_is_skip" g_arg_info_is_skip ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO CInt

{- |
Obtain if an argument is only useful in C.

/Since: 1.30/
-}
argInfoIsSkip ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIArgInfo/@ -}
    -> m Bool
    {- ^ __Returns:__ 'True' if argument is only useful in C. -}
argInfoIsSkip info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_arg_info_is_skip info'
    let result' = (/= 0) result
    touchManagedPtr info
    return result'


-- function g_arg_info_is_return_value
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIArgInfo", 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 "g_arg_info_is_return_value" g_arg_info_is_return_value ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO CInt

{- |
Obtain if the argument is a return value. It can either be a
parameter or a return value.
-}
argInfoIsReturnValue ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIArgInfo/@ -}
    -> m Bool
    {- ^ __Returns:__ 'True' if it is a return value -}
argInfoIsReturnValue info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_arg_info_is_return_value info'
    let result' = (/= 0) result
    touchManagedPtr info
    return result'


-- function g_arg_info_is_optional
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIArgInfo", 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 "g_arg_info_is_optional" g_arg_info_is_optional ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO CInt

{- |
Obtain if the argument is optional.  For \'out\' arguments this means
that you can pass 'Nothing' in order to ignore the result.
-}
argInfoIsOptional ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIArgInfo/@ -}
    -> m Bool
    {- ^ __Returns:__ 'True' if it is an optional argument -}
argInfoIsOptional info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_arg_info_is_optional info'
    let result' = (/= 0) result
    touchManagedPtr info
    return result'


-- function g_arg_info_is_caller_allocates
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIArgInfo", 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 "g_arg_info_is_caller_allocates" g_arg_info_is_caller_allocates ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO CInt

{- |
Obtain if the argument is a pointer to a struct or object that will
receive an output of a function.  The default assumption for
'GI.GIRepository.Enums.DirectionOut' arguments which have allocation is that the
callee allocates; if this is 'True', then the caller must allocate.
-}
argInfoIsCallerAllocates ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIArgInfo/@ -}
    -> m Bool
    {- ^ __Returns:__ 'True' if caller is required to have allocated the argument -}
argInfoIsCallerAllocates info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_arg_info_is_caller_allocates info'
    let result' = (/= 0) result
    touchManagedPtr info
    return result'


-- function g_arg_info_get_type
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIArgInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_arg_info_get_type" g_arg_info_get_type ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO (Ptr GIRepository.BaseInfo.BaseInfo)

{- |
Obtain the type information for /@info@/.
-}
argInfoGetType ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIArgInfo/@ -}
    -> m GIRepository.BaseInfo.BaseInfo
    {- ^ __Returns:__ the @/GITypeInfo/@ holding the type
  information for /@info@/, free it with @/g_base_info_unref()/@
  when done. -}
argInfoGetType info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_arg_info_get_type info'
    checkUnexpectedReturnNULL "argInfoGetType" result
    result' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) result
    touchManagedPtr info
    return result'


-- function g_arg_info_get_scope
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIArgInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "ScopeType"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_arg_info_get_scope" g_arg_info_get_scope ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO CUInt

{- |
Obtain the scope type for this argument. The scope type explains
how a callback is going to be invoked, most importantly when
the resources required to invoke it can be freed.
'GI.GIRepository.Enums.ScopeType' contains a list of possible values.
-}
argInfoGetScope ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIArgInfo/@ -}
    -> m GIRepository.Enums.ScopeType
    {- ^ __Returns:__ the scope type -}
argInfoGetScope info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_arg_info_get_scope info'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr info
    return result'


-- function g_arg_info_get_ownership_transfer
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIArgInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "Transfer"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_arg_info_get_ownership_transfer" g_arg_info_get_ownership_transfer ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO CUInt

{- |
Obtain the ownership transfer for this argument.
'GI.GIRepository.Enums.Transfer' contains a list of possible values.
-}
argInfoGetOwnershipTransfer ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIArgInfo/@ -}
    -> m GIRepository.Enums.Transfer
    {- ^ __Returns:__ the transfer -}
argInfoGetOwnershipTransfer info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_arg_info_get_ownership_transfer info'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr info
    return result'


-- function g_arg_info_get_direction
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIArgInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "Direction"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_arg_info_get_direction" g_arg_info_get_direction ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO CUInt

{- |
Obtain the direction of the argument. Check 'GI.GIRepository.Enums.Direction' for possible
direction values.
-}
argInfoGetDirection ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIArgInfo/@ -}
    -> m GIRepository.Enums.Direction
    {- ^ __Returns:__ the direction -}
argInfoGetDirection info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_arg_info_get_direction info'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr info
    return result'


-- function g_arg_info_get_destroy
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIArgInfo", 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 "g_arg_info_get_destroy" g_arg_info_get_destroy ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO Int32

{- |
Obtains the index of the 'GI.GLib.Callbacks.DestroyNotify' argument. This is only valid
for arguments which are callbacks.
-}
argInfoGetDestroy ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIArgInfo/@ -}
    -> m Int32
    {- ^ __Returns:__ index of the 'GI.GLib.Callbacks.DestroyNotify' argument or -1 if there is none -}
argInfoGetDestroy info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_arg_info_get_destroy info'
    touchManagedPtr info
    return result


-- function g_arg_info_get_closure
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GIRepository", name = "BaseInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIArgInfo", 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 "g_arg_info_get_closure" g_arg_info_get_closure ::
    Ptr GIRepository.BaseInfo.BaseInfo ->   -- info : TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})
    IO Int32

{- |
Obtain the index of the user data argument. This is only valid
for arguments which are callbacks.
-}
argInfoGetClosure ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GIRepository.BaseInfo.BaseInfo
    {- ^ /@info@/: a @/GIArgInfo/@ -}
    -> m Int32
    {- ^ __Returns:__ index of the user data argument or -1 if there is none -}
argInfoGetClosure info = liftIO $ do
    info' <- unsafeManagedPtrGetPtr info
    result <- g_arg_info_get_closure info'
    touchManagedPtr info
    return result