{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Pango.Structs.EngineInfo
(
EngineInfo(..) ,
newZeroEngineInfo ,
#if defined(ENABLE_OVERLOADING)
ResolveEngineInfoMethod ,
#endif
clearEngineInfoEngineType ,
#if defined(ENABLE_OVERLOADING)
engineInfo_engineType ,
#endif
getEngineInfoEngineType ,
setEngineInfoEngineType ,
clearEngineInfoId ,
#if defined(ENABLE_OVERLOADING)
engineInfo_id ,
#endif
getEngineInfoId ,
setEngineInfoId ,
#if defined(ENABLE_OVERLOADING)
engineInfo_nScripts ,
#endif
getEngineInfoNScripts ,
setEngineInfoNScripts ,
clearEngineInfoRenderType ,
#if defined(ENABLE_OVERLOADING)
engineInfo_renderType ,
#endif
getEngineInfoRenderType ,
setEngineInfoRenderType ,
clearEngineInfoScripts ,
#if defined(ENABLE_OVERLOADING)
engineInfo_scripts ,
#endif
getEngineInfoScripts ,
setEngineInfoScripts ,
) 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.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 {-# SOURCE #-} qualified GI.Pango.Structs.EngineScriptInfo as Pango.EngineScriptInfo
newtype EngineInfo = EngineInfo (SP.ManagedPtr EngineInfo)
deriving (EngineInfo -> EngineInfo -> Bool
(EngineInfo -> EngineInfo -> Bool)
-> (EngineInfo -> EngineInfo -> Bool) -> Eq EngineInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EngineInfo -> EngineInfo -> Bool
$c/= :: EngineInfo -> EngineInfo -> Bool
== :: EngineInfo -> EngineInfo -> Bool
$c== :: EngineInfo -> EngineInfo -> Bool
Eq)
instance SP.ManagedPtrNewtype EngineInfo where
toManagedPtr :: EngineInfo -> ManagedPtr EngineInfo
toManagedPtr (EngineInfo ManagedPtr EngineInfo
p) = ManagedPtr EngineInfo
p
instance BoxedPtr EngineInfo where
boxedPtrCopy :: EngineInfo -> IO EngineInfo
boxedPtrCopy = \EngineInfo
p -> EngineInfo -> (Ptr EngineInfo -> IO EngineInfo) -> IO EngineInfo
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr EngineInfo
p (Int -> Ptr EngineInfo -> IO (Ptr EngineInfo)
forall a. (HasCallStack, CallocPtr a) => Int -> Ptr a -> IO (Ptr a)
copyBytes Int
40 (Ptr EngineInfo -> IO (Ptr EngineInfo))
-> (Ptr EngineInfo -> IO EngineInfo)
-> Ptr EngineInfo
-> IO EngineInfo
forall (m :: * -> *) a b c.
Monad m =>
(a -> m b) -> (b -> m c) -> a -> m c
>=> (ManagedPtr EngineInfo -> EngineInfo)
-> Ptr EngineInfo -> IO EngineInfo
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
B.ManagedPtr.wrapPtr ManagedPtr EngineInfo -> EngineInfo
EngineInfo)
boxedPtrFree :: EngineInfo -> IO ()
boxedPtrFree = \EngineInfo
x -> EngineInfo -> (Ptr EngineInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
SP.withManagedPtr EngineInfo
x Ptr EngineInfo -> IO ()
forall a. Ptr a -> IO ()
SP.freeMem
instance CallocPtr EngineInfo where
boxedPtrCalloc :: IO (Ptr EngineInfo)
boxedPtrCalloc = Int -> IO (Ptr EngineInfo)
forall a. Int -> IO (Ptr a)
callocBytes Int
40
newZeroEngineInfo :: MonadIO m => m EngineInfo
newZeroEngineInfo :: m EngineInfo
newZeroEngineInfo = IO EngineInfo -> m EngineInfo
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO EngineInfo -> m EngineInfo) -> IO EngineInfo -> m EngineInfo
forall a b. (a -> b) -> a -> b
$ IO (Ptr EngineInfo)
forall a. CallocPtr a => IO (Ptr a)
boxedPtrCalloc IO (Ptr EngineInfo)
-> (Ptr EngineInfo -> IO EngineInfo) -> IO EngineInfo
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (ManagedPtr EngineInfo -> EngineInfo)
-> Ptr EngineInfo -> IO EngineInfo
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapPtr ManagedPtr EngineInfo -> EngineInfo
EngineInfo
instance tag ~ 'AttrSet => Constructible EngineInfo tag where
new :: (ManagedPtr EngineInfo -> EngineInfo)
-> [AttrOp EngineInfo tag] -> m EngineInfo
new ManagedPtr EngineInfo -> EngineInfo
_ [AttrOp EngineInfo tag]
attrs = do
EngineInfo
o <- m EngineInfo
forall (m :: * -> *). MonadIO m => m EngineInfo
newZeroEngineInfo
EngineInfo -> [AttrOp EngineInfo 'AttrSet] -> m ()
forall o (m :: * -> *).
MonadIO m =>
o -> [AttrOp o 'AttrSet] -> m ()
GI.Attributes.set EngineInfo
o [AttrOp EngineInfo tag]
[AttrOp EngineInfo 'AttrSet]
attrs
EngineInfo -> m EngineInfo
forall (m :: * -> *) a. Monad m => a -> m a
return EngineInfo
o
getEngineInfoId :: MonadIO m => EngineInfo -> m (Maybe T.Text)
getEngineInfoId :: EngineInfo -> m (Maybe Text)
getEngineInfoId EngineInfo
s = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ EngineInfo
-> (Ptr EngineInfo -> IO (Maybe Text)) -> IO (Maybe Text)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EngineInfo
s ((Ptr EngineInfo -> IO (Maybe Text)) -> IO (Maybe Text))
-> (Ptr EngineInfo -> IO (Maybe Text)) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \Ptr EngineInfo
ptr -> do
CString
val <- Ptr CString -> IO CString
forall a. Storable a => Ptr a -> IO a
peek (Ptr EngineInfo
ptr Ptr EngineInfo -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) :: IO CString
Maybe Text
result <- CString -> (CString -> IO Text) -> IO (Maybe Text)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
SP.convertIfNonNull CString
val ((CString -> IO Text) -> IO (Maybe Text))
-> (CString -> IO Text) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \CString
val' -> do
Text
val'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
val'
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
val''
Maybe Text -> IO (Maybe Text)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
result
setEngineInfoId :: MonadIO m => EngineInfo -> CString -> m ()
setEngineInfoId :: EngineInfo -> CString -> m ()
setEngineInfoId EngineInfo
s CString
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ EngineInfo -> (Ptr EngineInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EngineInfo
s ((Ptr EngineInfo -> IO ()) -> IO ())
-> (Ptr EngineInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr EngineInfo
ptr -> do
Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr EngineInfo
ptr Ptr EngineInfo -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) (CString
val :: CString)
clearEngineInfoId :: MonadIO m => EngineInfo -> m ()
clearEngineInfoId :: EngineInfo -> m ()
clearEngineInfoId EngineInfo
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ EngineInfo -> (Ptr EngineInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EngineInfo
s ((Ptr EngineInfo -> IO ()) -> IO ())
-> (Ptr EngineInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr EngineInfo
ptr -> do
Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr EngineInfo
ptr Ptr EngineInfo -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) (CString
forall a. Ptr a
FP.nullPtr :: CString)
#if defined(ENABLE_OVERLOADING)
data EngineInfoIdFieldInfo
instance AttrInfo EngineInfoIdFieldInfo where
type AttrBaseTypeConstraint EngineInfoIdFieldInfo = (~) EngineInfo
type AttrAllowedOps EngineInfoIdFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint EngineInfoIdFieldInfo = (~) CString
type AttrTransferTypeConstraint EngineInfoIdFieldInfo = (~)CString
type AttrTransferType EngineInfoIdFieldInfo = CString
type AttrGetType EngineInfoIdFieldInfo = Maybe T.Text
type AttrLabel EngineInfoIdFieldInfo = "id"
type AttrOrigin EngineInfoIdFieldInfo = EngineInfo
attrGet = getEngineInfoId
attrSet = setEngineInfoId
attrConstruct = undefined
attrClear = clearEngineInfoId
attrTransfer _ v = do
return v
engineInfo_id :: AttrLabelProxy "id"
engineInfo_id = AttrLabelProxy
#endif
getEngineInfoEngineType :: MonadIO m => EngineInfo -> m (Maybe T.Text)
getEngineInfoEngineType :: EngineInfo -> m (Maybe Text)
getEngineInfoEngineType EngineInfo
s = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ EngineInfo
-> (Ptr EngineInfo -> IO (Maybe Text)) -> IO (Maybe Text)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EngineInfo
s ((Ptr EngineInfo -> IO (Maybe Text)) -> IO (Maybe Text))
-> (Ptr EngineInfo -> IO (Maybe Text)) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \Ptr EngineInfo
ptr -> do
CString
val <- Ptr CString -> IO CString
forall a. Storable a => Ptr a -> IO a
peek (Ptr EngineInfo
ptr Ptr EngineInfo -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) :: IO CString
Maybe Text
result <- CString -> (CString -> IO Text) -> IO (Maybe Text)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
SP.convertIfNonNull CString
val ((CString -> IO Text) -> IO (Maybe Text))
-> (CString -> IO Text) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \CString
val' -> do
Text
val'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
val'
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
val''
Maybe Text -> IO (Maybe Text)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
result
setEngineInfoEngineType :: MonadIO m => EngineInfo -> CString -> m ()
setEngineInfoEngineType :: EngineInfo -> CString -> m ()
setEngineInfoEngineType EngineInfo
s CString
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ EngineInfo -> (Ptr EngineInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EngineInfo
s ((Ptr EngineInfo -> IO ()) -> IO ())
-> (Ptr EngineInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr EngineInfo
ptr -> do
Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr EngineInfo
ptr Ptr EngineInfo -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) (CString
val :: CString)
clearEngineInfoEngineType :: MonadIO m => EngineInfo -> m ()
clearEngineInfoEngineType :: EngineInfo -> m ()
clearEngineInfoEngineType EngineInfo
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ EngineInfo -> (Ptr EngineInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EngineInfo
s ((Ptr EngineInfo -> IO ()) -> IO ())
-> (Ptr EngineInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr EngineInfo
ptr -> do
Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr EngineInfo
ptr Ptr EngineInfo -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) (CString
forall a. Ptr a
FP.nullPtr :: CString)
#if defined(ENABLE_OVERLOADING)
data EngineInfoEngineTypeFieldInfo
instance AttrInfo EngineInfoEngineTypeFieldInfo where
type AttrBaseTypeConstraint EngineInfoEngineTypeFieldInfo = (~) EngineInfo
type AttrAllowedOps EngineInfoEngineTypeFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint EngineInfoEngineTypeFieldInfo = (~) CString
type AttrTransferTypeConstraint EngineInfoEngineTypeFieldInfo = (~)CString
type AttrTransferType EngineInfoEngineTypeFieldInfo = CString
type AttrGetType EngineInfoEngineTypeFieldInfo = Maybe T.Text
type AttrLabel EngineInfoEngineTypeFieldInfo = "engine_type"
type AttrOrigin EngineInfoEngineTypeFieldInfo = EngineInfo
attrGet = getEngineInfoEngineType
attrSet = setEngineInfoEngineType
attrConstruct = undefined
attrClear = clearEngineInfoEngineType
attrTransfer _ v = do
return v
engineInfo_engineType :: AttrLabelProxy "engineType"
engineInfo_engineType = AttrLabelProxy
#endif
getEngineInfoRenderType :: MonadIO m => EngineInfo -> m (Maybe T.Text)
getEngineInfoRenderType :: EngineInfo -> m (Maybe Text)
getEngineInfoRenderType EngineInfo
s = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ EngineInfo
-> (Ptr EngineInfo -> IO (Maybe Text)) -> IO (Maybe Text)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EngineInfo
s ((Ptr EngineInfo -> IO (Maybe Text)) -> IO (Maybe Text))
-> (Ptr EngineInfo -> IO (Maybe Text)) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \Ptr EngineInfo
ptr -> do
CString
val <- Ptr CString -> IO CString
forall a. Storable a => Ptr a -> IO a
peek (Ptr EngineInfo
ptr Ptr EngineInfo -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16) :: IO CString
Maybe Text
result <- CString -> (CString -> IO Text) -> IO (Maybe Text)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
SP.convertIfNonNull CString
val ((CString -> IO Text) -> IO (Maybe Text))
-> (CString -> IO Text) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \CString
val' -> do
Text
val'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
val'
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
val''
Maybe Text -> IO (Maybe Text)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
result
setEngineInfoRenderType :: MonadIO m => EngineInfo -> CString -> m ()
setEngineInfoRenderType :: EngineInfo -> CString -> m ()
setEngineInfoRenderType EngineInfo
s CString
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ EngineInfo -> (Ptr EngineInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EngineInfo
s ((Ptr EngineInfo -> IO ()) -> IO ())
-> (Ptr EngineInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr EngineInfo
ptr -> do
Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr EngineInfo
ptr Ptr EngineInfo -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16) (CString
val :: CString)
clearEngineInfoRenderType :: MonadIO m => EngineInfo -> m ()
clearEngineInfoRenderType :: EngineInfo -> m ()
clearEngineInfoRenderType EngineInfo
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ EngineInfo -> (Ptr EngineInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EngineInfo
s ((Ptr EngineInfo -> IO ()) -> IO ())
-> (Ptr EngineInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr EngineInfo
ptr -> do
Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr EngineInfo
ptr Ptr EngineInfo -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16) (CString
forall a. Ptr a
FP.nullPtr :: CString)
#if defined(ENABLE_OVERLOADING)
data EngineInfoRenderTypeFieldInfo
instance AttrInfo EngineInfoRenderTypeFieldInfo where
type AttrBaseTypeConstraint EngineInfoRenderTypeFieldInfo = (~) EngineInfo
type AttrAllowedOps EngineInfoRenderTypeFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint EngineInfoRenderTypeFieldInfo = (~) CString
type AttrTransferTypeConstraint EngineInfoRenderTypeFieldInfo = (~)CString
type AttrTransferType EngineInfoRenderTypeFieldInfo = CString
type AttrGetType EngineInfoRenderTypeFieldInfo = Maybe T.Text
type AttrLabel EngineInfoRenderTypeFieldInfo = "render_type"
type AttrOrigin EngineInfoRenderTypeFieldInfo = EngineInfo
attrGet = getEngineInfoRenderType
attrSet = setEngineInfoRenderType
attrConstruct = undefined
attrClear = clearEngineInfoRenderType
attrTransfer _ v = do
return v
engineInfo_renderType :: AttrLabelProxy "renderType"
engineInfo_renderType = AttrLabelProxy
#endif
getEngineInfoScripts :: MonadIO m => EngineInfo -> m (Maybe Pango.EngineScriptInfo.EngineScriptInfo)
getEngineInfoScripts :: EngineInfo -> m (Maybe EngineScriptInfo)
getEngineInfoScripts EngineInfo
s = IO (Maybe EngineScriptInfo) -> m (Maybe EngineScriptInfo)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe EngineScriptInfo) -> m (Maybe EngineScriptInfo))
-> IO (Maybe EngineScriptInfo) -> m (Maybe EngineScriptInfo)
forall a b. (a -> b) -> a -> b
$ EngineInfo
-> (Ptr EngineInfo -> IO (Maybe EngineScriptInfo))
-> IO (Maybe EngineScriptInfo)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EngineInfo
s ((Ptr EngineInfo -> IO (Maybe EngineScriptInfo))
-> IO (Maybe EngineScriptInfo))
-> (Ptr EngineInfo -> IO (Maybe EngineScriptInfo))
-> IO (Maybe EngineScriptInfo)
forall a b. (a -> b) -> a -> b
$ \Ptr EngineInfo
ptr -> do
Ptr EngineScriptInfo
val <- Ptr (Ptr EngineScriptInfo) -> IO (Ptr EngineScriptInfo)
forall a. Storable a => Ptr a -> IO a
peek (Ptr EngineInfo
ptr Ptr EngineInfo -> Int -> Ptr (Ptr EngineScriptInfo)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24) :: IO (Ptr Pango.EngineScriptInfo.EngineScriptInfo)
Maybe EngineScriptInfo
result <- Ptr EngineScriptInfo
-> (Ptr EngineScriptInfo -> IO EngineScriptInfo)
-> IO (Maybe EngineScriptInfo)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
SP.convertIfNonNull Ptr EngineScriptInfo
val ((Ptr EngineScriptInfo -> IO EngineScriptInfo)
-> IO (Maybe EngineScriptInfo))
-> (Ptr EngineScriptInfo -> IO EngineScriptInfo)
-> IO (Maybe EngineScriptInfo)
forall a b. (a -> b) -> a -> b
$ \Ptr EngineScriptInfo
val' -> do
EngineScriptInfo
val'' <- ((ManagedPtr EngineScriptInfo -> EngineScriptInfo)
-> Ptr EngineScriptInfo -> IO EngineScriptInfo
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr EngineScriptInfo -> EngineScriptInfo
Pango.EngineScriptInfo.EngineScriptInfo) Ptr EngineScriptInfo
val'
EngineScriptInfo -> IO EngineScriptInfo
forall (m :: * -> *) a. Monad m => a -> m a
return EngineScriptInfo
val''
Maybe EngineScriptInfo -> IO (Maybe EngineScriptInfo)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe EngineScriptInfo
result
setEngineInfoScripts :: MonadIO m => EngineInfo -> Ptr Pango.EngineScriptInfo.EngineScriptInfo -> m ()
setEngineInfoScripts :: EngineInfo -> Ptr EngineScriptInfo -> m ()
setEngineInfoScripts EngineInfo
s Ptr EngineScriptInfo
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ EngineInfo -> (Ptr EngineInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EngineInfo
s ((Ptr EngineInfo -> IO ()) -> IO ())
-> (Ptr EngineInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr EngineInfo
ptr -> do
Ptr (Ptr EngineScriptInfo) -> Ptr EngineScriptInfo -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr EngineInfo
ptr Ptr EngineInfo -> Int -> Ptr (Ptr EngineScriptInfo)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24) (Ptr EngineScriptInfo
val :: Ptr Pango.EngineScriptInfo.EngineScriptInfo)
clearEngineInfoScripts :: MonadIO m => EngineInfo -> m ()
clearEngineInfoScripts :: EngineInfo -> m ()
clearEngineInfoScripts EngineInfo
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ EngineInfo -> (Ptr EngineInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EngineInfo
s ((Ptr EngineInfo -> IO ()) -> IO ())
-> (Ptr EngineInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr EngineInfo
ptr -> do
Ptr (Ptr EngineScriptInfo) -> Ptr EngineScriptInfo -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr EngineInfo
ptr Ptr EngineInfo -> Int -> Ptr (Ptr EngineScriptInfo)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24) (Ptr EngineScriptInfo
forall a. Ptr a
FP.nullPtr :: Ptr Pango.EngineScriptInfo.EngineScriptInfo)
#if defined(ENABLE_OVERLOADING)
data EngineInfoScriptsFieldInfo
instance AttrInfo EngineInfoScriptsFieldInfo where
type AttrBaseTypeConstraint EngineInfoScriptsFieldInfo = (~) EngineInfo
type AttrAllowedOps EngineInfoScriptsFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint EngineInfoScriptsFieldInfo = (~) (Ptr Pango.EngineScriptInfo.EngineScriptInfo)
type AttrTransferTypeConstraint EngineInfoScriptsFieldInfo = (~)(Ptr Pango.EngineScriptInfo.EngineScriptInfo)
type AttrTransferType EngineInfoScriptsFieldInfo = (Ptr Pango.EngineScriptInfo.EngineScriptInfo)
type AttrGetType EngineInfoScriptsFieldInfo = Maybe Pango.EngineScriptInfo.EngineScriptInfo
type AttrLabel EngineInfoScriptsFieldInfo = "scripts"
type AttrOrigin EngineInfoScriptsFieldInfo = EngineInfo
attrGet = getEngineInfoScripts
attrSet = setEngineInfoScripts
attrConstruct = undefined
attrClear = clearEngineInfoScripts
attrTransfer _ v = do
return v
engineInfo_scripts :: AttrLabelProxy "scripts"
engineInfo_scripts = AttrLabelProxy
#endif
getEngineInfoNScripts :: MonadIO m => EngineInfo -> m Int32
getEngineInfoNScripts :: EngineInfo -> m Int32
getEngineInfoNScripts EngineInfo
s = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ EngineInfo -> (Ptr EngineInfo -> IO Int32) -> IO Int32
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EngineInfo
s ((Ptr EngineInfo -> IO Int32) -> IO Int32)
-> (Ptr EngineInfo -> IO Int32) -> IO Int32
forall a b. (a -> b) -> a -> b
$ \Ptr EngineInfo
ptr -> do
Int32
val <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek (Ptr EngineInfo
ptr Ptr EngineInfo -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32) :: IO Int32
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
val
setEngineInfoNScripts :: MonadIO m => EngineInfo -> Int32 -> m ()
setEngineInfoNScripts :: EngineInfo -> Int32 -> m ()
setEngineInfoNScripts EngineInfo
s Int32
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ EngineInfo -> (Ptr EngineInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EngineInfo
s ((Ptr EngineInfo -> IO ()) -> IO ())
-> (Ptr EngineInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr EngineInfo
ptr -> do
Ptr Int32 -> Int32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr EngineInfo
ptr Ptr EngineInfo -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32) (Int32
val :: Int32)
#if defined(ENABLE_OVERLOADING)
data EngineInfoNScriptsFieldInfo
instance AttrInfo EngineInfoNScriptsFieldInfo where
type AttrBaseTypeConstraint EngineInfoNScriptsFieldInfo = (~) EngineInfo
type AttrAllowedOps EngineInfoNScriptsFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint EngineInfoNScriptsFieldInfo = (~) Int32
type AttrTransferTypeConstraint EngineInfoNScriptsFieldInfo = (~)Int32
type AttrTransferType EngineInfoNScriptsFieldInfo = Int32
type AttrGetType EngineInfoNScriptsFieldInfo = Int32
type AttrLabel EngineInfoNScriptsFieldInfo = "n_scripts"
type AttrOrigin EngineInfoNScriptsFieldInfo = EngineInfo
attrGet = getEngineInfoNScripts
attrSet = setEngineInfoNScripts
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
engineInfo_nScripts :: AttrLabelProxy "nScripts"
engineInfo_nScripts = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList EngineInfo
type instance O.AttributeList EngineInfo = EngineInfoAttributeList
type EngineInfoAttributeList = ('[ '("id", EngineInfoIdFieldInfo), '("engineType", EngineInfoEngineTypeFieldInfo), '("renderType", EngineInfoRenderTypeFieldInfo), '("scripts", EngineInfoScriptsFieldInfo), '("nScripts", EngineInfoNScriptsFieldInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveEngineInfoMethod (t :: Symbol) (o :: *) :: * where
ResolveEngineInfoMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveEngineInfoMethod t EngineInfo, O.MethodInfo info EngineInfo p) => OL.IsLabel t (EngineInfo -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif