{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.HarfBuzz.Structs.OtMathKernEntryT
(
OtMathKernEntryT(..) ,
newZeroOtMathKernEntryT ,
#if defined(ENABLE_OVERLOADING)
ResolveOtMathKernEntryTMethod ,
#endif
getOtMathKernEntryTKernValue ,
#if defined(ENABLE_OVERLOADING)
otMathKernEntryT_kernValue ,
#endif
setOtMathKernEntryTKernValue ,
getOtMathKernEntryTMaxCorrectionHeight ,
#if defined(ENABLE_OVERLOADING)
otMathKernEntryT_maxCorrectionHeight ,
#endif
setOtMathKernEntryTMaxCorrectionHeight ,
) 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 OtMathKernEntryT = OtMathKernEntryT (SP.ManagedPtr OtMathKernEntryT)
deriving (OtMathKernEntryT -> OtMathKernEntryT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OtMathKernEntryT -> OtMathKernEntryT -> Bool
$c/= :: OtMathKernEntryT -> OtMathKernEntryT -> Bool
== :: OtMathKernEntryT -> OtMathKernEntryT -> Bool
$c== :: OtMathKernEntryT -> OtMathKernEntryT -> Bool
Eq)
instance SP.ManagedPtrNewtype OtMathKernEntryT where
toManagedPtr :: OtMathKernEntryT -> ManagedPtr OtMathKernEntryT
toManagedPtr (OtMathKernEntryT ManagedPtr OtMathKernEntryT
p) = ManagedPtr OtMathKernEntryT
p
instance BoxedPtr OtMathKernEntryT where
boxedPtrCopy :: OtMathKernEntryT -> IO OtMathKernEntryT
boxedPtrCopy = \OtMathKernEntryT
p -> forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr OtMathKernEntryT
p (forall a. (HasCallStack, CallocPtr a) => Int -> Ptr a -> IO (Ptr a)
copyBytes Int
8 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 OtMathKernEntryT -> OtMathKernEntryT
OtMathKernEntryT)
boxedPtrFree :: OtMathKernEntryT -> IO ()
boxedPtrFree = \OtMathKernEntryT
x -> forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
SP.withManagedPtr OtMathKernEntryT
x forall a. Ptr a -> IO ()
SP.freeMem
instance CallocPtr OtMathKernEntryT where
boxedPtrCalloc :: IO (Ptr OtMathKernEntryT)
boxedPtrCalloc = forall a. Int -> IO (Ptr a)
callocBytes Int
8
newZeroOtMathKernEntryT :: MonadIO m => m OtMathKernEntryT
newZeroOtMathKernEntryT :: forall (m :: * -> *). MonadIO m => m OtMathKernEntryT
newZeroOtMathKernEntryT = 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 OtMathKernEntryT -> OtMathKernEntryT
OtMathKernEntryT
instance tag ~ 'AttrSet => Constructible OtMathKernEntryT tag where
new :: forall (m :: * -> *).
MonadIO m =>
(ManagedPtr OtMathKernEntryT -> OtMathKernEntryT)
-> [AttrOp OtMathKernEntryT tag] -> m OtMathKernEntryT
new ManagedPtr OtMathKernEntryT -> OtMathKernEntryT
_ [AttrOp OtMathKernEntryT tag]
attrs = do
OtMathKernEntryT
o <- forall (m :: * -> *). MonadIO m => m OtMathKernEntryT
newZeroOtMathKernEntryT
forall o (m :: * -> *).
MonadIO m =>
o -> [AttrOp o 'AttrSet] -> m ()
GI.Attributes.set OtMathKernEntryT
o [AttrOp OtMathKernEntryT tag]
attrs
forall (m :: * -> *) a. Monad m => a -> m a
return OtMathKernEntryT
o
getOtMathKernEntryTMaxCorrectionHeight :: MonadIO m => OtMathKernEntryT -> m Int32
getOtMathKernEntryTMaxCorrectionHeight :: forall (m :: * -> *). MonadIO m => OtMathKernEntryT -> m Int32
getOtMathKernEntryTMaxCorrectionHeight OtMathKernEntryT
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 OtMathKernEntryT
s forall a b. (a -> b) -> a -> b
$ \Ptr OtMathKernEntryT
ptr -> do
Int32
val <- forall a. Storable a => Ptr a -> IO a
peek (Ptr OtMathKernEntryT
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) :: IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
val
setOtMathKernEntryTMaxCorrectionHeight :: MonadIO m => OtMathKernEntryT -> Int32 -> m ()
setOtMathKernEntryTMaxCorrectionHeight :: forall (m :: * -> *).
MonadIO m =>
OtMathKernEntryT -> Int32 -> m ()
setOtMathKernEntryTMaxCorrectionHeight OtMathKernEntryT
s Int32
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 OtMathKernEntryT
s forall a b. (a -> b) -> a -> b
$ \Ptr OtMathKernEntryT
ptr -> do
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr OtMathKernEntryT
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) (Int32
val :: Int32)
#if defined(ENABLE_OVERLOADING)
data OtMathKernEntryTMaxCorrectionHeightFieldInfo
instance AttrInfo OtMathKernEntryTMaxCorrectionHeightFieldInfo where
type AttrBaseTypeConstraint OtMathKernEntryTMaxCorrectionHeightFieldInfo = (~) OtMathKernEntryT
type AttrAllowedOps OtMathKernEntryTMaxCorrectionHeightFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint OtMathKernEntryTMaxCorrectionHeightFieldInfo = (~) Int32
type AttrTransferTypeConstraint OtMathKernEntryTMaxCorrectionHeightFieldInfo = (~)Int32
type AttrTransferType OtMathKernEntryTMaxCorrectionHeightFieldInfo = Int32
type AttrGetType OtMathKernEntryTMaxCorrectionHeightFieldInfo = Int32
type AttrLabel OtMathKernEntryTMaxCorrectionHeightFieldInfo = "max_correction_height"
type AttrOrigin OtMathKernEntryTMaxCorrectionHeightFieldInfo = OtMathKernEntryT
attrGet = getOtMathKernEntryTMaxCorrectionHeight
attrSet = setOtMathKernEntryTMaxCorrectionHeight
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.HarfBuzz.Structs.OtMathKernEntryT.maxCorrectionHeight"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-harfbuzz-0.0.7/docs/GI-HarfBuzz-Structs-OtMathKernEntryT.html#g:attr:maxCorrectionHeight"
})
otMathKernEntryT_maxCorrectionHeight :: AttrLabelProxy "maxCorrectionHeight"
otMathKernEntryT_maxCorrectionHeight = AttrLabelProxy
#endif
getOtMathKernEntryTKernValue :: MonadIO m => OtMathKernEntryT -> m Int32
getOtMathKernEntryTKernValue :: forall (m :: * -> *). MonadIO m => OtMathKernEntryT -> m Int32
getOtMathKernEntryTKernValue OtMathKernEntryT
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 OtMathKernEntryT
s forall a b. (a -> b) -> a -> b
$ \Ptr OtMathKernEntryT
ptr -> do
Int32
val <- forall a. Storable a => Ptr a -> IO a
peek (Ptr OtMathKernEntryT
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4) :: IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
val
setOtMathKernEntryTKernValue :: MonadIO m => OtMathKernEntryT -> Int32 -> m ()
setOtMathKernEntryTKernValue :: forall (m :: * -> *).
MonadIO m =>
OtMathKernEntryT -> Int32 -> m ()
setOtMathKernEntryTKernValue OtMathKernEntryT
s Int32
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 OtMathKernEntryT
s forall a b. (a -> b) -> a -> b
$ \Ptr OtMathKernEntryT
ptr -> do
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr OtMathKernEntryT
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4) (Int32
val :: Int32)
#if defined(ENABLE_OVERLOADING)
data OtMathKernEntryTKernValueFieldInfo
instance AttrInfo OtMathKernEntryTKernValueFieldInfo where
type AttrBaseTypeConstraint OtMathKernEntryTKernValueFieldInfo = (~) OtMathKernEntryT
type AttrAllowedOps OtMathKernEntryTKernValueFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint OtMathKernEntryTKernValueFieldInfo = (~) Int32
type AttrTransferTypeConstraint OtMathKernEntryTKernValueFieldInfo = (~)Int32
type AttrTransferType OtMathKernEntryTKernValueFieldInfo = Int32
type AttrGetType OtMathKernEntryTKernValueFieldInfo = Int32
type AttrLabel OtMathKernEntryTKernValueFieldInfo = "kern_value"
type AttrOrigin OtMathKernEntryTKernValueFieldInfo = OtMathKernEntryT
attrGet = getOtMathKernEntryTKernValue
attrSet = setOtMathKernEntryTKernValue
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.HarfBuzz.Structs.OtMathKernEntryT.kernValue"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-harfbuzz-0.0.7/docs/GI-HarfBuzz-Structs-OtMathKernEntryT.html#g:attr:kernValue"
})
otMathKernEntryT_kernValue :: AttrLabelProxy "kernValue"
otMathKernEntryT_kernValue = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList OtMathKernEntryT
type instance O.AttributeList OtMathKernEntryT = OtMathKernEntryTAttributeList
type OtMathKernEntryTAttributeList = ('[ '("maxCorrectionHeight", OtMathKernEntryTMaxCorrectionHeightFieldInfo), '("kernValue", OtMathKernEntryTKernValueFieldInfo)] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveOtMathKernEntryTMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveOtMathKernEntryTMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveOtMathKernEntryTMethod t OtMathKernEntryT, O.OverloadedMethod info OtMathKernEntryT p) => OL.IsLabel t (OtMathKernEntryT -> 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 ~ ResolveOtMathKernEntryTMethod t OtMathKernEntryT, O.OverloadedMethod info OtMathKernEntryT p, R.HasField t OtMathKernEntryT p) => R.HasField t OtMathKernEntryT p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveOtMathKernEntryTMethod t OtMathKernEntryT, O.OverloadedMethodInfo info OtMathKernEntryT) => OL.IsLabel t (O.MethodProxy info OtMathKernEntryT) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif