{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.OSTree.Structs.RollsumMatches
(
RollsumMatches(..) ,
newZeroRollsumMatches ,
#if defined(ENABLE_OVERLOADING)
ResolveRollsumMatchesMethod ,
#endif
getRollsumMatchesBufmatches ,
#if defined(ENABLE_OVERLOADING)
rollsumMatches_bufmatches ,
#endif
setRollsumMatchesBufmatches ,
getRollsumMatchesCrcmatches ,
#if defined(ENABLE_OVERLOADING)
rollsumMatches_crcmatches ,
#endif
setRollsumMatchesCrcmatches ,
clearRollsumMatchesFromRollsums ,
getRollsumMatchesFromRollsums ,
#if defined(ENABLE_OVERLOADING)
rollsumMatches_fromRollsums ,
#endif
setRollsumMatchesFromRollsums ,
getRollsumMatchesMatchSize ,
#if defined(ENABLE_OVERLOADING)
rollsumMatches_matchSize ,
#endif
setRollsumMatchesMatchSize ,
clearRollsumMatchesMatches ,
getRollsumMatchesMatches ,
#if defined(ENABLE_OVERLOADING)
rollsumMatches_matches ,
#endif
setRollsumMatchesMatches ,
clearRollsumMatchesToRollsums ,
getRollsumMatchesToRollsums ,
#if defined(ENABLE_OVERLOADING)
rollsumMatches_toRollsums ,
#endif
setRollsumMatchesToRollsums ,
getRollsumMatchesTotal ,
#if defined(ENABLE_OVERLOADING)
rollsumMatches_total ,
#endif
setRollsumMatchesTotal ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.Kind as DK
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R
newtype RollsumMatches = RollsumMatches (SP.ManagedPtr RollsumMatches)
deriving (RollsumMatches -> RollsumMatches -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RollsumMatches -> RollsumMatches -> Bool
$c/= :: RollsumMatches -> RollsumMatches -> Bool
== :: RollsumMatches -> RollsumMatches -> Bool
$c== :: RollsumMatches -> RollsumMatches -> Bool
Eq)
instance SP.ManagedPtrNewtype RollsumMatches where
toManagedPtr :: RollsumMatches -> ManagedPtr RollsumMatches
toManagedPtr (RollsumMatches ManagedPtr RollsumMatches
p) = ManagedPtr RollsumMatches
p
instance BoxedPtr RollsumMatches where
boxedPtrCopy :: RollsumMatches -> IO RollsumMatches
boxedPtrCopy = \RollsumMatches
p -> forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr RollsumMatches
p (forall a. (HasCallStack, CallocPtr a) => Int -> Ptr a -> IO (Ptr a)
copyBytes Int
32 forall (m :: * -> *) a b c.
Monad m =>
(a -> m b) -> (b -> m c) -> a -> m c
>=> forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
B.ManagedPtr.wrapPtr ManagedPtr RollsumMatches -> RollsumMatches
RollsumMatches)
boxedPtrFree :: RollsumMatches -> IO ()
boxedPtrFree = \RollsumMatches
x -> forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
SP.withManagedPtr RollsumMatches
x forall a. Ptr a -> IO ()
SP.freeMem
instance CallocPtr RollsumMatches where
boxedPtrCalloc :: IO (Ptr RollsumMatches)
boxedPtrCalloc = forall a. Int -> IO (Ptr a)
callocBytes Int
32
newZeroRollsumMatches :: MonadIO m => m RollsumMatches
newZeroRollsumMatches :: forall (m :: * -> *). MonadIO m => m RollsumMatches
newZeroRollsumMatches = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a. CallocPtr a => IO (Ptr a)
boxedPtrCalloc forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapPtr ManagedPtr RollsumMatches -> RollsumMatches
RollsumMatches
instance tag ~ 'AttrSet => Constructible RollsumMatches tag where
new :: forall (m :: * -> *).
MonadIO m =>
(ManagedPtr RollsumMatches -> RollsumMatches)
-> [AttrOp RollsumMatches tag] -> m RollsumMatches
new ManagedPtr RollsumMatches -> RollsumMatches
_ [AttrOp RollsumMatches tag]
attrs = do
RollsumMatches
o <- forall (m :: * -> *). MonadIO m => m RollsumMatches
newZeroRollsumMatches
forall o (m :: * -> *).
MonadIO m =>
o -> [AttrOp o 'AttrSet] -> m ()
GI.Attributes.set RollsumMatches
o [AttrOp RollsumMatches tag]
attrs
forall (m :: * -> *) a. Monad m => a -> m a
return RollsumMatches
o
getRollsumMatchesFromRollsums :: MonadIO m => RollsumMatches -> m (Maybe (Map.Map (Ptr ()) (Ptr ())))
getRollsumMatchesFromRollsums :: forall (m :: * -> *).
MonadIO m =>
RollsumMatches -> m (Maybe (Map (Ptr ()) (Ptr ())))
getRollsumMatchesFromRollsums RollsumMatches
s = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RollsumMatches
s forall a b. (a -> b) -> a -> b
$ \Ptr RollsumMatches
ptr -> do
Ptr (GHashTable (Ptr ()) (Ptr ()))
val <- forall a. Storable a => Ptr a -> IO a
peek (Ptr RollsumMatches
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) :: IO (Ptr (GHashTable (Ptr ()) (Ptr ())))
Maybe (Map (Ptr ()) (Ptr ()))
result <- forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
SP.convertIfNonNull Ptr (GHashTable (Ptr ()) (Ptr ()))
val forall a b. (a -> b) -> a -> b
$ \Ptr (GHashTable (Ptr ()) (Ptr ()))
val' -> do
[(PtrWrapped (Ptr ()), PtrWrapped (Ptr ()))]
val'' <- forall a b.
Ptr (GHashTable a b) -> IO [(PtrWrapped a, PtrWrapped b)]
unpackGHashTable Ptr (GHashTable (Ptr ()) (Ptr ()))
val'
let val''' :: [(Ptr (), PtrWrapped (Ptr ()))]
val''' = forall a c b. (a -> c) -> [(a, b)] -> [(c, b)]
mapFirst forall a. PtrWrapped (Ptr a) -> Ptr a
B.GHT.ptrUnpackPtr [(PtrWrapped (Ptr ()), PtrWrapped (Ptr ()))]
val''
let val'''' :: [(Ptr (), Ptr ())]
val'''' = forall b c a. (b -> c) -> [(a, b)] -> [(a, c)]
mapSecond forall a. PtrWrapped (Ptr a) -> Ptr a
B.GHT.ptrUnpackPtr [(Ptr (), PtrWrapped (Ptr ()))]
val'''
let val''''' :: Map (Ptr ()) (Ptr ())
val''''' = forall k a. Ord k => [(k, a)] -> Map k a
Map.fromList [(Ptr (), Ptr ())]
val''''
forall (m :: * -> *) a. Monad m => a -> m a
return Map (Ptr ()) (Ptr ())
val'''''
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe (Map (Ptr ()) (Ptr ()))
result
setRollsumMatchesFromRollsums :: MonadIO m => RollsumMatches -> Ptr (GHashTable (Ptr ()) (Ptr ())) -> m ()
setRollsumMatchesFromRollsums :: forall (m :: * -> *).
MonadIO m =>
RollsumMatches -> Ptr (GHashTable (Ptr ()) (Ptr ())) -> m ()
setRollsumMatchesFromRollsums RollsumMatches
s Ptr (GHashTable (Ptr ()) (Ptr ()))
val = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RollsumMatches
s forall a b. (a -> b) -> a -> b
$ \Ptr RollsumMatches
ptr -> do
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr RollsumMatches
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) (Ptr (GHashTable (Ptr ()) (Ptr ()))
val :: Ptr (GHashTable (Ptr ()) (Ptr ())))
clearRollsumMatchesFromRollsums :: MonadIO m => RollsumMatches -> m ()
clearRollsumMatchesFromRollsums :: forall (m :: * -> *). MonadIO m => RollsumMatches -> m ()
clearRollsumMatchesFromRollsums RollsumMatches
s = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RollsumMatches
s forall a b. (a -> b) -> a -> b
$ \Ptr RollsumMatches
ptr -> do
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr RollsumMatches
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) (forall a. Ptr a
FP.nullPtr :: Ptr (GHashTable (Ptr ()) (Ptr ())))
#if defined(ENABLE_OVERLOADING)
data RollsumMatchesFromRollsumsFieldInfo
instance AttrInfo RollsumMatchesFromRollsumsFieldInfo where
type AttrBaseTypeConstraint RollsumMatchesFromRollsumsFieldInfo = (~) RollsumMatches
type AttrAllowedOps RollsumMatchesFromRollsumsFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint RollsumMatchesFromRollsumsFieldInfo = (~) (Ptr (GHashTable (Ptr ()) (Ptr ())))
type AttrTransferTypeConstraint RollsumMatchesFromRollsumsFieldInfo = (~)(Ptr (GHashTable (Ptr ()) (Ptr ())))
type AttrTransferType RollsumMatchesFromRollsumsFieldInfo = (Ptr (GHashTable (Ptr ()) (Ptr ())))
type AttrGetType RollsumMatchesFromRollsumsFieldInfo = Maybe (Map.Map (Ptr ()) (Ptr ()))
type AttrLabel RollsumMatchesFromRollsumsFieldInfo = "from_rollsums"
type AttrOrigin RollsumMatchesFromRollsumsFieldInfo = RollsumMatches
attrGet = getRollsumMatchesFromRollsums
attrSet = setRollsumMatchesFromRollsums
attrConstruct = undefined
attrClear = clearRollsumMatchesFromRollsums
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Structs.RollsumMatches.fromRollsums"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Structs-RollsumMatches.html#g:attr:fromRollsums"
})
rollsumMatches_fromRollsums :: AttrLabelProxy "fromRollsums"
rollsumMatches_fromRollsums = AttrLabelProxy
#endif
getRollsumMatchesToRollsums :: MonadIO m => RollsumMatches -> m (Maybe (Map.Map (Ptr ()) (Ptr ())))
getRollsumMatchesToRollsums :: forall (m :: * -> *).
MonadIO m =>
RollsumMatches -> m (Maybe (Map (Ptr ()) (Ptr ())))
getRollsumMatchesToRollsums RollsumMatches
s = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RollsumMatches
s forall a b. (a -> b) -> a -> b
$ \Ptr RollsumMatches
ptr -> do
Ptr (GHashTable (Ptr ()) (Ptr ()))
val <- forall a. Storable a => Ptr a -> IO a
peek (Ptr RollsumMatches
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4) :: IO (Ptr (GHashTable (Ptr ()) (Ptr ())))
Maybe (Map (Ptr ()) (Ptr ()))
result <- forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
SP.convertIfNonNull Ptr (GHashTable (Ptr ()) (Ptr ()))
val forall a b. (a -> b) -> a -> b
$ \Ptr (GHashTable (Ptr ()) (Ptr ()))
val' -> do
[(PtrWrapped (Ptr ()), PtrWrapped (Ptr ()))]
val'' <- forall a b.
Ptr (GHashTable a b) -> IO [(PtrWrapped a, PtrWrapped b)]
unpackGHashTable Ptr (GHashTable (Ptr ()) (Ptr ()))
val'
let val''' :: [(Ptr (), PtrWrapped (Ptr ()))]
val''' = forall a c b. (a -> c) -> [(a, b)] -> [(c, b)]
mapFirst forall a. PtrWrapped (Ptr a) -> Ptr a
B.GHT.ptrUnpackPtr [(PtrWrapped (Ptr ()), PtrWrapped (Ptr ()))]
val''
let val'''' :: [(Ptr (), Ptr ())]
val'''' = forall b c a. (b -> c) -> [(a, b)] -> [(a, c)]
mapSecond forall a. PtrWrapped (Ptr a) -> Ptr a
B.GHT.ptrUnpackPtr [(Ptr (), PtrWrapped (Ptr ()))]
val'''
let val''''' :: Map (Ptr ()) (Ptr ())
val''''' = forall k a. Ord k => [(k, a)] -> Map k a
Map.fromList [(Ptr (), Ptr ())]
val''''
forall (m :: * -> *) a. Monad m => a -> m a
return Map (Ptr ()) (Ptr ())
val'''''
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe (Map (Ptr ()) (Ptr ()))
result
setRollsumMatchesToRollsums :: MonadIO m => RollsumMatches -> Ptr (GHashTable (Ptr ()) (Ptr ())) -> m ()
setRollsumMatchesToRollsums :: forall (m :: * -> *).
MonadIO m =>
RollsumMatches -> Ptr (GHashTable (Ptr ()) (Ptr ())) -> m ()
setRollsumMatchesToRollsums RollsumMatches
s Ptr (GHashTable (Ptr ()) (Ptr ()))
val = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RollsumMatches
s forall a b. (a -> b) -> a -> b
$ \Ptr RollsumMatches
ptr -> do
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr RollsumMatches
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4) (Ptr (GHashTable (Ptr ()) (Ptr ()))
val :: Ptr (GHashTable (Ptr ()) (Ptr ())))
clearRollsumMatchesToRollsums :: MonadIO m => RollsumMatches -> m ()
clearRollsumMatchesToRollsums :: forall (m :: * -> *). MonadIO m => RollsumMatches -> m ()
clearRollsumMatchesToRollsums RollsumMatches
s = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RollsumMatches
s forall a b. (a -> b) -> a -> b
$ \Ptr RollsumMatches
ptr -> do
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr RollsumMatches
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4) (forall a. Ptr a
FP.nullPtr :: Ptr (GHashTable (Ptr ()) (Ptr ())))
#if defined(ENABLE_OVERLOADING)
data RollsumMatchesToRollsumsFieldInfo
instance AttrInfo RollsumMatchesToRollsumsFieldInfo where
type AttrBaseTypeConstraint RollsumMatchesToRollsumsFieldInfo = (~) RollsumMatches
type AttrAllowedOps RollsumMatchesToRollsumsFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint RollsumMatchesToRollsumsFieldInfo = (~) (Ptr (GHashTable (Ptr ()) (Ptr ())))
type AttrTransferTypeConstraint RollsumMatchesToRollsumsFieldInfo = (~)(Ptr (GHashTable (Ptr ()) (Ptr ())))
type AttrTransferType RollsumMatchesToRollsumsFieldInfo = (Ptr (GHashTable (Ptr ()) (Ptr ())))
type AttrGetType RollsumMatchesToRollsumsFieldInfo = Maybe (Map.Map (Ptr ()) (Ptr ()))
type AttrLabel RollsumMatchesToRollsumsFieldInfo = "to_rollsums"
type AttrOrigin RollsumMatchesToRollsumsFieldInfo = RollsumMatches
attrGet = getRollsumMatchesToRollsums
attrSet = setRollsumMatchesToRollsums
attrConstruct = undefined
attrClear = clearRollsumMatchesToRollsums
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Structs.RollsumMatches.toRollsums"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Structs-RollsumMatches.html#g:attr:toRollsums"
})
rollsumMatches_toRollsums :: AttrLabelProxy "toRollsums"
rollsumMatches_toRollsums = AttrLabelProxy
#endif
getRollsumMatchesCrcmatches :: MonadIO m => RollsumMatches -> m Word32
getRollsumMatchesCrcmatches :: forall (m :: * -> *). MonadIO m => RollsumMatches -> m Word32
getRollsumMatchesCrcmatches RollsumMatches
s = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RollsumMatches
s forall a b. (a -> b) -> a -> b
$ \Ptr RollsumMatches
ptr -> do
Word32
val <- forall a. Storable a => Ptr a -> IO a
peek (Ptr RollsumMatches
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) :: IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
val
setRollsumMatchesCrcmatches :: MonadIO m => RollsumMatches -> Word32 -> m ()
setRollsumMatchesCrcmatches :: forall (m :: * -> *). MonadIO m => RollsumMatches -> Word32 -> m ()
setRollsumMatchesCrcmatches RollsumMatches
s Word32
val = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RollsumMatches
s forall a b. (a -> b) -> a -> b
$ \Ptr RollsumMatches
ptr -> do
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr RollsumMatches
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) (Word32
val :: Word32)
#if defined(ENABLE_OVERLOADING)
data RollsumMatchesCrcmatchesFieldInfo
instance AttrInfo RollsumMatchesCrcmatchesFieldInfo where
type AttrBaseTypeConstraint RollsumMatchesCrcmatchesFieldInfo = (~) RollsumMatches
type AttrAllowedOps RollsumMatchesCrcmatchesFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint RollsumMatchesCrcmatchesFieldInfo = (~) Word32
type AttrTransferTypeConstraint RollsumMatchesCrcmatchesFieldInfo = (~)Word32
type AttrTransferType RollsumMatchesCrcmatchesFieldInfo = Word32
type AttrGetType RollsumMatchesCrcmatchesFieldInfo = Word32
type AttrLabel RollsumMatchesCrcmatchesFieldInfo = "crcmatches"
type AttrOrigin RollsumMatchesCrcmatchesFieldInfo = RollsumMatches
attrGet = getRollsumMatchesCrcmatches
attrSet = setRollsumMatchesCrcmatches
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Structs.RollsumMatches.crcmatches"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Structs-RollsumMatches.html#g:attr:crcmatches"
})
rollsumMatches_crcmatches :: AttrLabelProxy "crcmatches"
rollsumMatches_crcmatches = AttrLabelProxy
#endif
getRollsumMatchesBufmatches :: MonadIO m => RollsumMatches -> m Word32
getRollsumMatchesBufmatches :: forall (m :: * -> *). MonadIO m => RollsumMatches -> m Word32
getRollsumMatchesBufmatches RollsumMatches
s = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RollsumMatches
s forall a b. (a -> b) -> a -> b
$ \Ptr RollsumMatches
ptr -> do
Word32
val <- forall a. Storable a => Ptr a -> IO a
peek (Ptr RollsumMatches
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12) :: IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
val
setRollsumMatchesBufmatches :: MonadIO m => RollsumMatches -> Word32 -> m ()
setRollsumMatchesBufmatches :: forall (m :: * -> *). MonadIO m => RollsumMatches -> Word32 -> m ()
setRollsumMatchesBufmatches RollsumMatches
s Word32
val = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RollsumMatches
s forall a b. (a -> b) -> a -> b
$ \Ptr RollsumMatches
ptr -> do
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr RollsumMatches
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12) (Word32
val :: Word32)
#if defined(ENABLE_OVERLOADING)
data RollsumMatchesBufmatchesFieldInfo
instance AttrInfo RollsumMatchesBufmatchesFieldInfo where
type AttrBaseTypeConstraint RollsumMatchesBufmatchesFieldInfo = (~) RollsumMatches
type AttrAllowedOps RollsumMatchesBufmatchesFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint RollsumMatchesBufmatchesFieldInfo = (~) Word32
type AttrTransferTypeConstraint RollsumMatchesBufmatchesFieldInfo = (~)Word32
type AttrTransferType RollsumMatchesBufmatchesFieldInfo = Word32
type AttrGetType RollsumMatchesBufmatchesFieldInfo = Word32
type AttrLabel RollsumMatchesBufmatchesFieldInfo = "bufmatches"
type AttrOrigin RollsumMatchesBufmatchesFieldInfo = RollsumMatches
attrGet = getRollsumMatchesBufmatches
attrSet = setRollsumMatchesBufmatches
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Structs.RollsumMatches.bufmatches"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Structs-RollsumMatches.html#g:attr:bufmatches"
})
rollsumMatches_bufmatches :: AttrLabelProxy "bufmatches"
rollsumMatches_bufmatches = AttrLabelProxy
#endif
getRollsumMatchesTotal :: MonadIO m => RollsumMatches -> m Word32
getRollsumMatchesTotal :: forall (m :: * -> *). MonadIO m => RollsumMatches -> m Word32
getRollsumMatchesTotal RollsumMatches
s = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RollsumMatches
s forall a b. (a -> b) -> a -> b
$ \Ptr RollsumMatches
ptr -> do
Word32
val <- forall a. Storable a => Ptr a -> IO a
peek (Ptr RollsumMatches
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16) :: IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
val
setRollsumMatchesTotal :: MonadIO m => RollsumMatches -> Word32 -> m ()
setRollsumMatchesTotal :: forall (m :: * -> *). MonadIO m => RollsumMatches -> Word32 -> m ()
setRollsumMatchesTotal RollsumMatches
s Word32
val = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RollsumMatches
s forall a b. (a -> b) -> a -> b
$ \Ptr RollsumMatches
ptr -> do
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr RollsumMatches
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16) (Word32
val :: Word32)
#if defined(ENABLE_OVERLOADING)
data RollsumMatchesTotalFieldInfo
instance AttrInfo RollsumMatchesTotalFieldInfo where
type AttrBaseTypeConstraint RollsumMatchesTotalFieldInfo = (~) RollsumMatches
type AttrAllowedOps RollsumMatchesTotalFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint RollsumMatchesTotalFieldInfo = (~) Word32
type AttrTransferTypeConstraint RollsumMatchesTotalFieldInfo = (~)Word32
type AttrTransferType RollsumMatchesTotalFieldInfo = Word32
type AttrGetType RollsumMatchesTotalFieldInfo = Word32
type AttrLabel RollsumMatchesTotalFieldInfo = "total"
type AttrOrigin RollsumMatchesTotalFieldInfo = RollsumMatches
attrGet = getRollsumMatchesTotal
attrSet = setRollsumMatchesTotal
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Structs.RollsumMatches.total"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Structs-RollsumMatches.html#g:attr:total"
})
rollsumMatches_total :: AttrLabelProxy "total"
rollsumMatches_total = AttrLabelProxy
#endif
getRollsumMatchesMatchSize :: MonadIO m => RollsumMatches -> m Word64
getRollsumMatchesMatchSize :: forall (m :: * -> *). MonadIO m => RollsumMatches -> m Word64
getRollsumMatchesMatchSize RollsumMatches
s = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RollsumMatches
s forall a b. (a -> b) -> a -> b
$ \Ptr RollsumMatches
ptr -> do
Word64
val <- forall a. Storable a => Ptr a -> IO a
peek (Ptr RollsumMatches
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20) :: IO Word64
forall (m :: * -> *) a. Monad m => a -> m a
return Word64
val
setRollsumMatchesMatchSize :: MonadIO m => RollsumMatches -> Word64 -> m ()
setRollsumMatchesMatchSize :: forall (m :: * -> *). MonadIO m => RollsumMatches -> Word64 -> m ()
setRollsumMatchesMatchSize RollsumMatches
s Word64
val = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RollsumMatches
s forall a b. (a -> b) -> a -> b
$ \Ptr RollsumMatches
ptr -> do
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr RollsumMatches
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20) (Word64
val :: Word64)
#if defined(ENABLE_OVERLOADING)
data RollsumMatchesMatchSizeFieldInfo
instance AttrInfo RollsumMatchesMatchSizeFieldInfo where
type AttrBaseTypeConstraint RollsumMatchesMatchSizeFieldInfo = (~) RollsumMatches
type AttrAllowedOps RollsumMatchesMatchSizeFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint RollsumMatchesMatchSizeFieldInfo = (~) Word64
type AttrTransferTypeConstraint RollsumMatchesMatchSizeFieldInfo = (~)Word64
type AttrTransferType RollsumMatchesMatchSizeFieldInfo = Word64
type AttrGetType RollsumMatchesMatchSizeFieldInfo = Word64
type AttrLabel RollsumMatchesMatchSizeFieldInfo = "match_size"
type AttrOrigin RollsumMatchesMatchSizeFieldInfo = RollsumMatches
attrGet = getRollsumMatchesMatchSize
attrSet = setRollsumMatchesMatchSize
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Structs.RollsumMatches.matchSize"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Structs-RollsumMatches.html#g:attr:matchSize"
})
rollsumMatches_matchSize :: AttrLabelProxy "matchSize"
rollsumMatches_matchSize = AttrLabelProxy
#endif
getRollsumMatchesMatches :: MonadIO m => RollsumMatches -> m (Maybe ([Ptr ()]))
getRollsumMatchesMatches :: forall (m :: * -> *).
MonadIO m =>
RollsumMatches -> m (Maybe [Ptr ()])
getRollsumMatchesMatches RollsumMatches
s = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RollsumMatches
s forall a b. (a -> b) -> a -> b
$ \Ptr RollsumMatches
ptr -> do
Ptr (GPtrArray (Ptr ()))
val <- forall a. Storable a => Ptr a -> IO a
peek (Ptr RollsumMatches
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28) :: IO (Ptr (GPtrArray (Ptr ())))
Maybe [Ptr ()]
result <- forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
SP.convertIfNonNull Ptr (GPtrArray (Ptr ()))
val forall a b. (a -> b) -> a -> b
$ \Ptr (GPtrArray (Ptr ()))
val' -> do
[Ptr ()]
val'' <- forall a. Ptr (GPtrArray (Ptr a)) -> IO [Ptr a]
unpackGPtrArray Ptr (GPtrArray (Ptr ()))
val'
forall (m :: * -> *) a. Monad m => a -> m a
return [Ptr ()]
val''
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe [Ptr ()]
result
setRollsumMatchesMatches :: MonadIO m => RollsumMatches -> Ptr (GPtrArray (Ptr ())) -> m ()
setRollsumMatchesMatches :: forall (m :: * -> *).
MonadIO m =>
RollsumMatches -> Ptr (GPtrArray (Ptr ())) -> m ()
setRollsumMatchesMatches RollsumMatches
s Ptr (GPtrArray (Ptr ()))
val = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RollsumMatches
s forall a b. (a -> b) -> a -> b
$ \Ptr RollsumMatches
ptr -> do
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr RollsumMatches
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28) (Ptr (GPtrArray (Ptr ()))
val :: Ptr (GPtrArray (Ptr ())))
clearRollsumMatchesMatches :: MonadIO m => RollsumMatches -> m ()
clearRollsumMatchesMatches :: forall (m :: * -> *). MonadIO m => RollsumMatches -> m ()
clearRollsumMatchesMatches RollsumMatches
s = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RollsumMatches
s forall a b. (a -> b) -> a -> b
$ \Ptr RollsumMatches
ptr -> do
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr RollsumMatches
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28) (forall a. Ptr a
FP.nullPtr :: Ptr (GPtrArray (Ptr ())))
#if defined(ENABLE_OVERLOADING)
data RollsumMatchesMatchesFieldInfo
instance AttrInfo RollsumMatchesMatchesFieldInfo where
type AttrBaseTypeConstraint RollsumMatchesMatchesFieldInfo = (~) RollsumMatches
type AttrAllowedOps RollsumMatchesMatchesFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint RollsumMatchesMatchesFieldInfo = (~) (Ptr (GPtrArray (Ptr ())))
type AttrTransferTypeConstraint RollsumMatchesMatchesFieldInfo = (~)(Ptr (GPtrArray (Ptr ())))
type AttrTransferType RollsumMatchesMatchesFieldInfo = (Ptr (GPtrArray (Ptr ())))
type AttrGetType RollsumMatchesMatchesFieldInfo = Maybe ([Ptr ()])
type AttrLabel RollsumMatchesMatchesFieldInfo = "matches"
type AttrOrigin RollsumMatchesMatchesFieldInfo = RollsumMatches
attrGet = getRollsumMatchesMatches
attrSet = setRollsumMatchesMatches
attrConstruct = undefined
attrClear = clearRollsumMatchesMatches
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Structs.RollsumMatches.matches"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Structs-RollsumMatches.html#g:attr:matches"
})
rollsumMatches_matches :: AttrLabelProxy "matches"
rollsumMatches_matches = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList RollsumMatches
type instance O.AttributeList RollsumMatches = RollsumMatchesAttributeList
type RollsumMatchesAttributeList = ('[ '("fromRollsums", RollsumMatchesFromRollsumsFieldInfo), '("toRollsums", RollsumMatchesToRollsumsFieldInfo), '("crcmatches", RollsumMatchesCrcmatchesFieldInfo), '("bufmatches", RollsumMatchesBufmatchesFieldInfo), '("total", RollsumMatchesTotalFieldInfo), '("matchSize", RollsumMatchesMatchSizeFieldInfo), '("matches", RollsumMatchesMatchesFieldInfo)] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveRollsumMatchesMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveRollsumMatchesMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveRollsumMatchesMethod t RollsumMatches, O.OverloadedMethod info RollsumMatches p) => OL.IsLabel t (RollsumMatches -> 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 ~ ResolveRollsumMatchesMethod t RollsumMatches, O.OverloadedMethod info RollsumMatches p, R.HasField t RollsumMatches p) => R.HasField t RollsumMatches p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveRollsumMatchesMethod t RollsumMatches, O.OverloadedMethodInfo info RollsumMatches) => OL.IsLabel t (O.MethodProxy info RollsumMatches) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif