{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.GObject.Structs.InterfaceInfo
(
InterfaceInfo(..) ,
newZeroInterfaceInfo ,
#if defined(ENABLE_OVERLOADING)
ResolveInterfaceInfoMethod ,
#endif
clearInterfaceInfoInterfaceData ,
getInterfaceInfoInterfaceData ,
#if defined(ENABLE_OVERLOADING)
interfaceInfo_interfaceData ,
#endif
setInterfaceInfoInterfaceData ,
clearInterfaceInfoInterfaceFinalize ,
getInterfaceInfoInterfaceFinalize ,
#if defined(ENABLE_OVERLOADING)
interfaceInfo_interfaceFinalize ,
#endif
setInterfaceInfoInterfaceFinalize ,
clearInterfaceInfoInterfaceInit ,
getInterfaceInfoInterfaceInit ,
#if defined(ENABLE_OVERLOADING)
interfaceInfo_interfaceInit ,
#endif
setInterfaceInfoInterfaceInit ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R
import qualified GI.GObject.Callbacks as GObject.Callbacks
newtype InterfaceInfo = InterfaceInfo (SP.ManagedPtr InterfaceInfo)
deriving (InterfaceInfo -> InterfaceInfo -> Bool
(InterfaceInfo -> InterfaceInfo -> Bool)
-> (InterfaceInfo -> InterfaceInfo -> Bool) -> Eq InterfaceInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InterfaceInfo -> InterfaceInfo -> Bool
$c/= :: InterfaceInfo -> InterfaceInfo -> Bool
== :: InterfaceInfo -> InterfaceInfo -> Bool
$c== :: InterfaceInfo -> InterfaceInfo -> Bool
Eq)
instance SP.ManagedPtrNewtype InterfaceInfo where
toManagedPtr :: InterfaceInfo -> ManagedPtr InterfaceInfo
toManagedPtr (InterfaceInfo ManagedPtr InterfaceInfo
p) = ManagedPtr InterfaceInfo
p
instance BoxedPtr InterfaceInfo where
boxedPtrCopy :: InterfaceInfo -> IO InterfaceInfo
boxedPtrCopy = \InterfaceInfo
p -> InterfaceInfo
-> (Ptr InterfaceInfo -> IO InterfaceInfo) -> IO InterfaceInfo
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr InterfaceInfo
p (Int -> Ptr InterfaceInfo -> IO (Ptr InterfaceInfo)
forall a. (HasCallStack, CallocPtr a) => Int -> Ptr a -> IO (Ptr a)
copyBytes Int
24 (Ptr InterfaceInfo -> IO (Ptr InterfaceInfo))
-> (Ptr InterfaceInfo -> IO InterfaceInfo)
-> Ptr InterfaceInfo
-> IO InterfaceInfo
forall (m :: * -> *) a b c.
Monad m =>
(a -> m b) -> (b -> m c) -> a -> m c
>=> (ManagedPtr InterfaceInfo -> InterfaceInfo)
-> Ptr InterfaceInfo -> IO InterfaceInfo
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
B.ManagedPtr.wrapPtr ManagedPtr InterfaceInfo -> InterfaceInfo
InterfaceInfo)
boxedPtrFree :: InterfaceInfo -> IO ()
boxedPtrFree = \InterfaceInfo
x -> InterfaceInfo -> (Ptr InterfaceInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
SP.withManagedPtr InterfaceInfo
x Ptr InterfaceInfo -> IO ()
forall a. Ptr a -> IO ()
SP.freeMem
instance CallocPtr InterfaceInfo where
boxedPtrCalloc :: IO (Ptr InterfaceInfo)
boxedPtrCalloc = Int -> IO (Ptr InterfaceInfo)
forall a. Int -> IO (Ptr a)
callocBytes Int
24
newZeroInterfaceInfo :: MonadIO m => m InterfaceInfo
newZeroInterfaceInfo :: forall (m :: * -> *). MonadIO m => m InterfaceInfo
newZeroInterfaceInfo = IO InterfaceInfo -> m InterfaceInfo
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO InterfaceInfo -> m InterfaceInfo)
-> IO InterfaceInfo -> m InterfaceInfo
forall a b. (a -> b) -> a -> b
$ IO (Ptr InterfaceInfo)
forall a. CallocPtr a => IO (Ptr a)
boxedPtrCalloc IO (Ptr InterfaceInfo)
-> (Ptr InterfaceInfo -> IO InterfaceInfo) -> IO InterfaceInfo
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (ManagedPtr InterfaceInfo -> InterfaceInfo)
-> Ptr InterfaceInfo -> IO InterfaceInfo
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapPtr ManagedPtr InterfaceInfo -> InterfaceInfo
InterfaceInfo
instance tag ~ 'AttrSet => Constructible InterfaceInfo tag where
new :: forall (m :: * -> *).
MonadIO m =>
(ManagedPtr InterfaceInfo -> InterfaceInfo)
-> [AttrOp InterfaceInfo tag] -> m InterfaceInfo
new ManagedPtr InterfaceInfo -> InterfaceInfo
_ [AttrOp InterfaceInfo tag]
attrs = do
InterfaceInfo
o <- m InterfaceInfo
forall (m :: * -> *). MonadIO m => m InterfaceInfo
newZeroInterfaceInfo
InterfaceInfo -> [AttrOp InterfaceInfo 'AttrSet] -> m ()
forall o (m :: * -> *).
MonadIO m =>
o -> [AttrOp o 'AttrSet] -> m ()
GI.Attributes.set InterfaceInfo
o [AttrOp InterfaceInfo tag]
[AttrOp InterfaceInfo 'AttrSet]
attrs
InterfaceInfo -> m InterfaceInfo
forall (m :: * -> *) a. Monad m => a -> m a
return InterfaceInfo
o
getInterfaceInfoInterfaceInit :: MonadIO m => InterfaceInfo -> m (Maybe GObject.Callbacks.InterfaceInitFunc)
getInterfaceInfoInterfaceInit :: forall (m :: * -> *).
MonadIO m =>
InterfaceInfo -> m (Maybe InterfaceInitFunc)
getInterfaceInfoInterfaceInit InterfaceInfo
s = IO (Maybe InterfaceInitFunc) -> m (Maybe InterfaceInitFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe InterfaceInitFunc) -> m (Maybe InterfaceInitFunc))
-> IO (Maybe InterfaceInitFunc) -> m (Maybe InterfaceInitFunc)
forall a b. (a -> b) -> a -> b
$ InterfaceInfo
-> (Ptr InterfaceInfo -> IO (Maybe InterfaceInitFunc))
-> IO (Maybe InterfaceInitFunc)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr InterfaceInfo
s ((Ptr InterfaceInfo -> IO (Maybe InterfaceInitFunc))
-> IO (Maybe InterfaceInitFunc))
-> (Ptr InterfaceInfo -> IO (Maybe InterfaceInitFunc))
-> IO (Maybe InterfaceInitFunc)
forall a b. (a -> b) -> a -> b
$ \Ptr InterfaceInfo
ptr -> do
FunPtr C_InterfaceInitFunc
val <- Ptr (FunPtr C_InterfaceInitFunc) -> IO (FunPtr C_InterfaceInitFunc)
forall a. Storable a => Ptr a -> IO a
peek (Ptr InterfaceInfo
ptr Ptr InterfaceInfo -> Int -> Ptr (FunPtr C_InterfaceInitFunc)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) :: IO (FunPtr GObject.Callbacks.C_InterfaceInitFunc)
Maybe InterfaceInitFunc
result <- FunPtr C_InterfaceInitFunc
-> (FunPtr C_InterfaceInitFunc -> IO InterfaceInitFunc)
-> IO (Maybe InterfaceInitFunc)
forall a b. FunPtr a -> (FunPtr a -> IO b) -> IO (Maybe b)
SP.convertFunPtrIfNonNull FunPtr C_InterfaceInitFunc
val ((FunPtr C_InterfaceInitFunc -> IO InterfaceInitFunc)
-> IO (Maybe InterfaceInitFunc))
-> (FunPtr C_InterfaceInitFunc -> IO InterfaceInitFunc)
-> IO (Maybe InterfaceInitFunc)
forall a b. (a -> b) -> a -> b
$ \FunPtr C_InterfaceInitFunc
val' -> do
let val'' :: InterfaceInitFunc
val'' = FunPtr C_InterfaceInitFunc -> InterfaceInitFunc
forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_InterfaceInitFunc -> TypeInterface -> Ptr () -> m ()
GObject.Callbacks.dynamic_InterfaceInitFunc FunPtr C_InterfaceInitFunc
val'
InterfaceInitFunc -> IO InterfaceInitFunc
forall (m :: * -> *) a. Monad m => a -> m a
return InterfaceInitFunc
val''
Maybe InterfaceInitFunc -> IO (Maybe InterfaceInitFunc)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe InterfaceInitFunc
result
setInterfaceInfoInterfaceInit :: MonadIO m => InterfaceInfo -> FunPtr GObject.Callbacks.C_InterfaceInitFunc -> m ()
setInterfaceInfoInterfaceInit :: forall (m :: * -> *).
MonadIO m =>
InterfaceInfo -> FunPtr C_InterfaceInitFunc -> m ()
setInterfaceInfoInterfaceInit InterfaceInfo
s FunPtr C_InterfaceInitFunc
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ InterfaceInfo -> (Ptr InterfaceInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr InterfaceInfo
s ((Ptr InterfaceInfo -> IO ()) -> IO ())
-> (Ptr InterfaceInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr InterfaceInfo
ptr -> do
Ptr (FunPtr C_InterfaceInitFunc)
-> FunPtr C_InterfaceInitFunc -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr InterfaceInfo
ptr Ptr InterfaceInfo -> Int -> Ptr (FunPtr C_InterfaceInitFunc)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) (FunPtr C_InterfaceInitFunc
val :: FunPtr GObject.Callbacks.C_InterfaceInitFunc)
clearInterfaceInfoInterfaceInit :: MonadIO m => InterfaceInfo -> m ()
clearInterfaceInfoInterfaceInit :: forall (m :: * -> *). MonadIO m => InterfaceInfo -> m ()
clearInterfaceInfoInterfaceInit InterfaceInfo
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ InterfaceInfo -> (Ptr InterfaceInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr InterfaceInfo
s ((Ptr InterfaceInfo -> IO ()) -> IO ())
-> (Ptr InterfaceInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr InterfaceInfo
ptr -> do
Ptr (FunPtr C_InterfaceInitFunc)
-> FunPtr C_InterfaceInitFunc -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr InterfaceInfo
ptr Ptr InterfaceInfo -> Int -> Ptr (FunPtr C_InterfaceInitFunc)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) (FunPtr C_InterfaceInitFunc
forall a. FunPtr a
FP.nullFunPtr :: FunPtr GObject.Callbacks.C_InterfaceInitFunc)
#if defined(ENABLE_OVERLOADING)
data InterfaceInfoInterfaceInitFieldInfo
instance AttrInfo InterfaceInfoInterfaceInitFieldInfo where
type AttrBaseTypeConstraint InterfaceInfoInterfaceInitFieldInfo = (~) InterfaceInfo
type AttrAllowedOps InterfaceInfoInterfaceInitFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint InterfaceInfoInterfaceInitFieldInfo = (~) (FunPtr GObject.Callbacks.C_InterfaceInitFunc)
type AttrTransferTypeConstraint InterfaceInfoInterfaceInitFieldInfo = (~)GObject.Callbacks.InterfaceInitFunc
type AttrTransferType InterfaceInfoInterfaceInitFieldInfo = (FunPtr GObject.Callbacks.C_InterfaceInitFunc)
type AttrGetType InterfaceInfoInterfaceInitFieldInfo = Maybe GObject.Callbacks.InterfaceInitFunc
type AttrLabel InterfaceInfoInterfaceInitFieldInfo = "interface_init"
type AttrOrigin InterfaceInfoInterfaceInitFieldInfo = InterfaceInfo
attrGet = getInterfaceInfoInterfaceInit
attrSet = setInterfaceInfoInterfaceInit
attrConstruct = undefined
attrClear = clearInterfaceInfoInterfaceInit
attrTransfer _ v = do
GObject.Callbacks.mk_InterfaceInitFunc (GObject.Callbacks.wrap_InterfaceInitFunc Nothing v)
interfaceInfo_interfaceInit :: AttrLabelProxy "interfaceInit"
interfaceInfo_interfaceInit = AttrLabelProxy
#endif
getInterfaceInfoInterfaceFinalize :: MonadIO m => InterfaceInfo -> m (Maybe GObject.Callbacks.InterfaceFinalizeFunc)
getInterfaceInfoInterfaceFinalize :: forall (m :: * -> *).
MonadIO m =>
InterfaceInfo -> m (Maybe InterfaceInitFunc)
getInterfaceInfoInterfaceFinalize InterfaceInfo
s = IO (Maybe InterfaceInitFunc) -> m (Maybe InterfaceInitFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe InterfaceInitFunc) -> m (Maybe InterfaceInitFunc))
-> IO (Maybe InterfaceInitFunc) -> m (Maybe InterfaceInitFunc)
forall a b. (a -> b) -> a -> b
$ InterfaceInfo
-> (Ptr InterfaceInfo -> IO (Maybe InterfaceInitFunc))
-> IO (Maybe InterfaceInitFunc)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr InterfaceInfo
s ((Ptr InterfaceInfo -> IO (Maybe InterfaceInitFunc))
-> IO (Maybe InterfaceInitFunc))
-> (Ptr InterfaceInfo -> IO (Maybe InterfaceInitFunc))
-> IO (Maybe InterfaceInitFunc)
forall a b. (a -> b) -> a -> b
$ \Ptr InterfaceInfo
ptr -> do
FunPtr C_InterfaceInitFunc
val <- Ptr (FunPtr C_InterfaceInitFunc) -> IO (FunPtr C_InterfaceInitFunc)
forall a. Storable a => Ptr a -> IO a
peek (Ptr InterfaceInfo
ptr Ptr InterfaceInfo -> Int -> Ptr (FunPtr C_InterfaceInitFunc)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) :: IO (FunPtr GObject.Callbacks.C_InterfaceFinalizeFunc)
Maybe InterfaceInitFunc
result <- FunPtr C_InterfaceInitFunc
-> (FunPtr C_InterfaceInitFunc -> IO InterfaceInitFunc)
-> IO (Maybe InterfaceInitFunc)
forall a b. FunPtr a -> (FunPtr a -> IO b) -> IO (Maybe b)
SP.convertFunPtrIfNonNull FunPtr C_InterfaceInitFunc
val ((FunPtr C_InterfaceInitFunc -> IO InterfaceInitFunc)
-> IO (Maybe InterfaceInitFunc))
-> (FunPtr C_InterfaceInitFunc -> IO InterfaceInitFunc)
-> IO (Maybe InterfaceInitFunc)
forall a b. (a -> b) -> a -> b
$ \FunPtr C_InterfaceInitFunc
val' -> do
let val'' :: InterfaceInitFunc
val'' = FunPtr C_InterfaceInitFunc -> InterfaceInitFunc
forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_InterfaceInitFunc -> TypeInterface -> Ptr () -> m ()
GObject.Callbacks.dynamic_InterfaceFinalizeFunc FunPtr C_InterfaceInitFunc
val'
InterfaceInitFunc -> IO InterfaceInitFunc
forall (m :: * -> *) a. Monad m => a -> m a
return InterfaceInitFunc
val''
Maybe InterfaceInitFunc -> IO (Maybe InterfaceInitFunc)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe InterfaceInitFunc
result
setInterfaceInfoInterfaceFinalize :: MonadIO m => InterfaceInfo -> FunPtr GObject.Callbacks.C_InterfaceFinalizeFunc -> m ()
setInterfaceInfoInterfaceFinalize :: forall (m :: * -> *).
MonadIO m =>
InterfaceInfo -> FunPtr C_InterfaceInitFunc -> m ()
setInterfaceInfoInterfaceFinalize InterfaceInfo
s FunPtr C_InterfaceInitFunc
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ InterfaceInfo -> (Ptr InterfaceInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr InterfaceInfo
s ((Ptr InterfaceInfo -> IO ()) -> IO ())
-> (Ptr InterfaceInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr InterfaceInfo
ptr -> do
Ptr (FunPtr C_InterfaceInitFunc)
-> FunPtr C_InterfaceInitFunc -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr InterfaceInfo
ptr Ptr InterfaceInfo -> Int -> Ptr (FunPtr C_InterfaceInitFunc)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) (FunPtr C_InterfaceInitFunc
val :: FunPtr GObject.Callbacks.C_InterfaceFinalizeFunc)
clearInterfaceInfoInterfaceFinalize :: MonadIO m => InterfaceInfo -> m ()
clearInterfaceInfoInterfaceFinalize :: forall (m :: * -> *). MonadIO m => InterfaceInfo -> m ()
clearInterfaceInfoInterfaceFinalize InterfaceInfo
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ InterfaceInfo -> (Ptr InterfaceInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr InterfaceInfo
s ((Ptr InterfaceInfo -> IO ()) -> IO ())
-> (Ptr InterfaceInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr InterfaceInfo
ptr -> do
Ptr (FunPtr C_InterfaceInitFunc)
-> FunPtr C_InterfaceInitFunc -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr InterfaceInfo
ptr Ptr InterfaceInfo -> Int -> Ptr (FunPtr C_InterfaceInitFunc)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) (FunPtr C_InterfaceInitFunc
forall a. FunPtr a
FP.nullFunPtr :: FunPtr GObject.Callbacks.C_InterfaceFinalizeFunc)
#if defined(ENABLE_OVERLOADING)
data InterfaceInfoInterfaceFinalizeFieldInfo
instance AttrInfo InterfaceInfoInterfaceFinalizeFieldInfo where
type AttrBaseTypeConstraint InterfaceInfoInterfaceFinalizeFieldInfo = (~) InterfaceInfo
type AttrAllowedOps InterfaceInfoInterfaceFinalizeFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint InterfaceInfoInterfaceFinalizeFieldInfo = (~) (FunPtr GObject.Callbacks.C_InterfaceFinalizeFunc)
type AttrTransferTypeConstraint InterfaceInfoInterfaceFinalizeFieldInfo = (~)GObject.Callbacks.InterfaceFinalizeFunc
type AttrTransferType InterfaceInfoInterfaceFinalizeFieldInfo = (FunPtr GObject.Callbacks.C_InterfaceFinalizeFunc)
type AttrGetType InterfaceInfoInterfaceFinalizeFieldInfo = Maybe GObject.Callbacks.InterfaceFinalizeFunc
type AttrLabel InterfaceInfoInterfaceFinalizeFieldInfo = "interface_finalize"
type AttrOrigin InterfaceInfoInterfaceFinalizeFieldInfo = InterfaceInfo
attrGet = getInterfaceInfoInterfaceFinalize
attrSet = setInterfaceInfoInterfaceFinalize
attrConstruct = undefined
attrClear = clearInterfaceInfoInterfaceFinalize
attrTransfer _ v = do
GObject.Callbacks.mk_InterfaceFinalizeFunc (GObject.Callbacks.wrap_InterfaceFinalizeFunc Nothing v)
interfaceInfo_interfaceFinalize :: AttrLabelProxy "interfaceFinalize"
interfaceInfo_interfaceFinalize = AttrLabelProxy
#endif
getInterfaceInfoInterfaceData :: MonadIO m => InterfaceInfo -> m (Ptr ())
getInterfaceInfoInterfaceData :: forall (m :: * -> *). MonadIO m => InterfaceInfo -> m (Ptr ())
getInterfaceInfoInterfaceData InterfaceInfo
s = IO (Ptr ()) -> m (Ptr ())
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Ptr ()) -> m (Ptr ())) -> IO (Ptr ()) -> m (Ptr ())
forall a b. (a -> b) -> a -> b
$ InterfaceInfo -> (Ptr InterfaceInfo -> IO (Ptr ())) -> IO (Ptr ())
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr InterfaceInfo
s ((Ptr InterfaceInfo -> IO (Ptr ())) -> IO (Ptr ()))
-> (Ptr InterfaceInfo -> IO (Ptr ())) -> IO (Ptr ())
forall a b. (a -> b) -> a -> b
$ \Ptr InterfaceInfo
ptr -> do
Ptr ()
val <- Ptr (Ptr ()) -> IO (Ptr ())
forall a. Storable a => Ptr a -> IO a
peek (Ptr InterfaceInfo
ptr Ptr InterfaceInfo -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16) :: IO (Ptr ())
Ptr () -> IO (Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
val
setInterfaceInfoInterfaceData :: MonadIO m => InterfaceInfo -> Ptr () -> m ()
setInterfaceInfoInterfaceData :: forall (m :: * -> *). MonadIO m => InterfaceInfo -> Ptr () -> m ()
setInterfaceInfoInterfaceData InterfaceInfo
s Ptr ()
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ InterfaceInfo -> (Ptr InterfaceInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr InterfaceInfo
s ((Ptr InterfaceInfo -> IO ()) -> IO ())
-> (Ptr InterfaceInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr InterfaceInfo
ptr -> do
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr InterfaceInfo
ptr Ptr InterfaceInfo -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16) (Ptr ()
val :: Ptr ())
clearInterfaceInfoInterfaceData :: MonadIO m => InterfaceInfo -> m ()
clearInterfaceInfoInterfaceData :: forall (m :: * -> *). MonadIO m => InterfaceInfo -> m ()
clearInterfaceInfoInterfaceData InterfaceInfo
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ InterfaceInfo -> (Ptr InterfaceInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr InterfaceInfo
s ((Ptr InterfaceInfo -> IO ()) -> IO ())
-> (Ptr InterfaceInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr InterfaceInfo
ptr -> do
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr InterfaceInfo
ptr Ptr InterfaceInfo -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16) (Ptr ()
forall a. Ptr a
FP.nullPtr :: Ptr ())
#if defined(ENABLE_OVERLOADING)
data InterfaceInfoInterfaceDataFieldInfo
instance AttrInfo InterfaceInfoInterfaceDataFieldInfo where
type AttrBaseTypeConstraint InterfaceInfoInterfaceDataFieldInfo = (~) InterfaceInfo
type AttrAllowedOps InterfaceInfoInterfaceDataFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint InterfaceInfoInterfaceDataFieldInfo = (~) (Ptr ())
type AttrTransferTypeConstraint InterfaceInfoInterfaceDataFieldInfo = (~)(Ptr ())
type AttrTransferType InterfaceInfoInterfaceDataFieldInfo = (Ptr ())
type AttrGetType InterfaceInfoInterfaceDataFieldInfo = Ptr ()
type AttrLabel InterfaceInfoInterfaceDataFieldInfo = "interface_data"
type AttrOrigin InterfaceInfoInterfaceDataFieldInfo = InterfaceInfo
attrGet = getInterfaceInfoInterfaceData
attrSet = setInterfaceInfoInterfaceData
attrConstruct = undefined
attrClear = clearInterfaceInfoInterfaceData
attrTransfer _ v = do
return v
interfaceInfo_interfaceData :: AttrLabelProxy "interfaceData"
interfaceInfo_interfaceData = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList InterfaceInfo
type instance O.AttributeList InterfaceInfo = InterfaceInfoAttributeList
type InterfaceInfoAttributeList = ('[ '("interfaceInit", InterfaceInfoInterfaceInitFieldInfo), '("interfaceFinalize", InterfaceInfoInterfaceFinalizeFieldInfo), '("interfaceData", InterfaceInfoInterfaceDataFieldInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveInterfaceInfoMethod (t :: Symbol) (o :: *) :: * where
ResolveInterfaceInfoMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveInterfaceInfoMethod t InterfaceInfo, O.OverloadedMethod info InterfaceInfo p) => OL.IsLabel t (InterfaceInfo -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveInterfaceInfoMethod t InterfaceInfo, O.OverloadedMethod info InterfaceInfo p, R.HasField t InterfaceInfo p) => R.HasField t InterfaceInfo p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveInterfaceInfoMethod t InterfaceInfo, O.OverloadedMethodInfo info InterfaceInfo) => OL.IsLabel t (O.MethodProxy info InterfaceInfo) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif