{-# LANGUAGE TypeApplications #-}
#if !defined(__HADDOCK_VERSION__)
#define ENABLE_OVERLOADING
#endif
module GI.HarfBuzz.Structs.OtMathGlyphPartT
(
OtMathGlyphPartT(..) ,
newZeroOtMathGlyphPartT ,
#if defined(ENABLE_OVERLOADING)
ResolveOtMathGlyphPartTMethod ,
#endif
getOtMathGlyphPartTEndConnectorLength ,
#if defined(ENABLE_OVERLOADING)
otMathGlyphPartT_endConnectorLength ,
#endif
setOtMathGlyphPartTEndConnectorLength ,
getOtMathGlyphPartTFlags ,
#if defined(ENABLE_OVERLOADING)
otMathGlyphPartT_flags ,
#endif
setOtMathGlyphPartTFlags ,
getOtMathGlyphPartTFullAdvance ,
#if defined(ENABLE_OVERLOADING)
otMathGlyphPartT_fullAdvance ,
#endif
setOtMathGlyphPartTFullAdvance ,
getOtMathGlyphPartTGlyph ,
#if defined(ENABLE_OVERLOADING)
otMathGlyphPartT_glyph ,
#endif
setOtMathGlyphPartTGlyph ,
getOtMathGlyphPartTStartConnectorLength ,
#if defined(ENABLE_OVERLOADING)
otMathGlyphPartT_startConnectorLength ,
#endif
setOtMathGlyphPartTStartConnectorLength ,
) 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.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 {-# SOURCE #-} qualified GI.HarfBuzz.Flags as HarfBuzz.Flags
newtype OtMathGlyphPartT = OtMathGlyphPartT (SP.ManagedPtr OtMathGlyphPartT)
deriving (OtMathGlyphPartT -> OtMathGlyphPartT -> Bool
(OtMathGlyphPartT -> OtMathGlyphPartT -> Bool)
-> (OtMathGlyphPartT -> OtMathGlyphPartT -> Bool)
-> Eq OtMathGlyphPartT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OtMathGlyphPartT -> OtMathGlyphPartT -> Bool
$c/= :: OtMathGlyphPartT -> OtMathGlyphPartT -> Bool
== :: OtMathGlyphPartT -> OtMathGlyphPartT -> Bool
$c== :: OtMathGlyphPartT -> OtMathGlyphPartT -> Bool
Eq)
instance SP.ManagedPtrNewtype OtMathGlyphPartT where
toManagedPtr :: OtMathGlyphPartT -> ManagedPtr OtMathGlyphPartT
toManagedPtr (OtMathGlyphPartT ManagedPtr OtMathGlyphPartT
p) = ManagedPtr OtMathGlyphPartT
p
foreign import ccall "hb_gobject_ot_math_glyph_part_get_type" c_hb_gobject_ot_math_glyph_part_get_type ::
IO GType
type instance O.ParentTypes OtMathGlyphPartT = '[]
instance O.HasParentTypes OtMathGlyphPartT
instance B.Types.TypedObject OtMathGlyphPartT where
glibType :: IO GType
glibType = IO GType
c_hb_gobject_ot_math_glyph_part_get_type
instance B.Types.GBoxed OtMathGlyphPartT
instance B.GValue.IsGValue (Maybe OtMathGlyphPartT) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_hb_gobject_ot_math_glyph_part_get_type
gvalueSet_ :: Ptr GValue -> Maybe OtMathGlyphPartT -> IO ()
gvalueSet_ Ptr GValue
gv Maybe OtMathGlyphPartT
P.Nothing = Ptr GValue -> Ptr OtMathGlyphPartT -> IO ()
forall a. Ptr GValue -> Ptr a -> IO ()
B.GValue.set_boxed Ptr GValue
gv (Ptr OtMathGlyphPartT
forall a. Ptr a
FP.nullPtr :: FP.Ptr OtMathGlyphPartT)
gvalueSet_ Ptr GValue
gv (P.Just OtMathGlyphPartT
obj) = OtMathGlyphPartT -> (Ptr OtMathGlyphPartT -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr OtMathGlyphPartT
obj (Ptr GValue -> Ptr OtMathGlyphPartT -> IO ()
forall a. Ptr GValue -> Ptr a -> IO ()
B.GValue.set_boxed Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe OtMathGlyphPartT)
gvalueGet_ Ptr GValue
gv = do
Ptr OtMathGlyphPartT
ptr <- Ptr GValue -> IO (Ptr OtMathGlyphPartT)
forall b. Ptr GValue -> IO (Ptr b)
B.GValue.get_boxed Ptr GValue
gv :: IO (Ptr OtMathGlyphPartT)
if Ptr OtMathGlyphPartT
ptr Ptr OtMathGlyphPartT -> Ptr OtMathGlyphPartT -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr OtMathGlyphPartT
forall a. Ptr a
FP.nullPtr
then OtMathGlyphPartT -> Maybe OtMathGlyphPartT
forall a. a -> Maybe a
P.Just (OtMathGlyphPartT -> Maybe OtMathGlyphPartT)
-> IO OtMathGlyphPartT -> IO (Maybe OtMathGlyphPartT)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr OtMathGlyphPartT -> OtMathGlyphPartT)
-> Ptr OtMathGlyphPartT -> IO OtMathGlyphPartT
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
B.ManagedPtr.newBoxed ManagedPtr OtMathGlyphPartT -> OtMathGlyphPartT
OtMathGlyphPartT Ptr OtMathGlyphPartT
ptr
else Maybe OtMathGlyphPartT -> IO (Maybe OtMathGlyphPartT)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe OtMathGlyphPartT
forall a. Maybe a
P.Nothing
newZeroOtMathGlyphPartT :: MonadIO m => m OtMathGlyphPartT
newZeroOtMathGlyphPartT :: forall (m :: * -> *). MonadIO m => m OtMathGlyphPartT
newZeroOtMathGlyphPartT = IO OtMathGlyphPartT -> m OtMathGlyphPartT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO OtMathGlyphPartT -> m OtMathGlyphPartT)
-> IO OtMathGlyphPartT -> m OtMathGlyphPartT
forall a b. (a -> b) -> a -> b
$ Int -> IO (Ptr OtMathGlyphPartT)
forall a. GBoxed a => Int -> IO (Ptr a)
callocBoxedBytes Int
20 IO (Ptr OtMathGlyphPartT)
-> (Ptr OtMathGlyphPartT -> IO OtMathGlyphPartT)
-> IO OtMathGlyphPartT
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (ManagedPtr OtMathGlyphPartT -> OtMathGlyphPartT)
-> Ptr OtMathGlyphPartT -> IO OtMathGlyphPartT
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr OtMathGlyphPartT -> OtMathGlyphPartT
OtMathGlyphPartT
instance tag ~ 'AttrSet => Constructible OtMathGlyphPartT tag where
new :: forall (m :: * -> *).
MonadIO m =>
(ManagedPtr OtMathGlyphPartT -> OtMathGlyphPartT)
-> [AttrOp OtMathGlyphPartT tag] -> m OtMathGlyphPartT
new ManagedPtr OtMathGlyphPartT -> OtMathGlyphPartT
_ [AttrOp OtMathGlyphPartT tag]
attrs = do
OtMathGlyphPartT
o <- m OtMathGlyphPartT
forall (m :: * -> *). MonadIO m => m OtMathGlyphPartT
newZeroOtMathGlyphPartT
OtMathGlyphPartT -> [AttrOp OtMathGlyphPartT 'AttrSet] -> m ()
forall o (m :: * -> *).
MonadIO m =>
o -> [AttrOp o 'AttrSet] -> m ()
GI.Attributes.set OtMathGlyphPartT
o [AttrOp OtMathGlyphPartT tag]
[AttrOp OtMathGlyphPartT 'AttrSet]
attrs
OtMathGlyphPartT -> m OtMathGlyphPartT
forall (m :: * -> *) a. Monad m => a -> m a
return OtMathGlyphPartT
o
getOtMathGlyphPartTGlyph