#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.HarfBuzz.Callbacks
(
BufferMessageFuncT ,
BufferMessageFuncT_WithClosures ,
C_BufferMessageFuncT ,
drop_closures_BufferMessageFuncT ,
dynamic_BufferMessageFuncT ,
genClosure_BufferMessageFuncT ,
mk_BufferMessageFuncT ,
noBufferMessageFuncT ,
noBufferMessageFuncT_WithClosures ,
wrap_BufferMessageFuncT ,
C_DestroyFuncT ,
DestroyFuncT ,
DestroyFuncT_WithClosures ,
drop_closures_DestroyFuncT ,
dynamic_DestroyFuncT ,
genClosure_DestroyFuncT ,
mk_DestroyFuncT ,
noDestroyFuncT ,
noDestroyFuncT_WithClosures ,
wrap_DestroyFuncT ,
C_FontGetFontExtentsFuncT ,
FontGetFontExtentsFuncT ,
FontGetFontExtentsFuncT_WithClosures ,
drop_closures_FontGetFontExtentsFuncT ,
dynamic_FontGetFontExtentsFuncT ,
genClosure_FontGetFontExtentsFuncT ,
mk_FontGetFontExtentsFuncT ,
noFontGetFontExtentsFuncT ,
noFontGetFontExtentsFuncT_WithClosures ,
wrap_FontGetFontExtentsFuncT ,
C_FontGetGlyphAdvanceFuncT ,
FontGetGlyphAdvanceFuncT ,
FontGetGlyphAdvanceFuncT_WithClosures ,
drop_closures_FontGetGlyphAdvanceFuncT ,
dynamic_FontGetGlyphAdvanceFuncT ,
genClosure_FontGetGlyphAdvanceFuncT ,
mk_FontGetGlyphAdvanceFuncT ,
noFontGetGlyphAdvanceFuncT ,
noFontGetGlyphAdvanceFuncT_WithClosures ,
wrap_FontGetGlyphAdvanceFuncT ,
C_FontGetGlyphAdvancesFuncT ,
FontGetGlyphAdvancesFuncT ,
FontGetGlyphAdvancesFuncT_WithClosures ,
drop_closures_FontGetGlyphAdvancesFuncT ,
dynamic_FontGetGlyphAdvancesFuncT ,
genClosure_FontGetGlyphAdvancesFuncT ,
mk_FontGetGlyphAdvancesFuncT ,
noFontGetGlyphAdvancesFuncT ,
noFontGetGlyphAdvancesFuncT_WithClosures,
wrap_FontGetGlyphAdvancesFuncT ,
C_FontGetGlyphContourPointFuncT ,
FontGetGlyphContourPointFuncT ,
FontGetGlyphContourPointFuncT_WithClosures,
drop_closures_FontGetGlyphContourPointFuncT,
dynamic_FontGetGlyphContourPointFuncT ,
genClosure_FontGetGlyphContourPointFuncT,
mk_FontGetGlyphContourPointFuncT ,
noFontGetGlyphContourPointFuncT ,
noFontGetGlyphContourPointFuncT_WithClosures,
wrap_FontGetGlyphContourPointFuncT ,
C_FontGetGlyphExtentsFuncT ,
FontGetGlyphExtentsFuncT ,
FontGetGlyphExtentsFuncT_WithClosures ,
drop_closures_FontGetGlyphExtentsFuncT ,
dynamic_FontGetGlyphExtentsFuncT ,
genClosure_FontGetGlyphExtentsFuncT ,
mk_FontGetGlyphExtentsFuncT ,
noFontGetGlyphExtentsFuncT ,
noFontGetGlyphExtentsFuncT_WithClosures ,
wrap_FontGetGlyphExtentsFuncT ,
C_FontGetGlyphFromNameFuncT ,
FontGetGlyphFromNameFuncT ,
FontGetGlyphFromNameFuncT_WithClosures ,
drop_closures_FontGetGlyphFromNameFuncT ,
dynamic_FontGetGlyphFromNameFuncT ,
genClosure_FontGetGlyphFromNameFuncT ,
mk_FontGetGlyphFromNameFuncT ,
noFontGetGlyphFromNameFuncT ,
noFontGetGlyphFromNameFuncT_WithClosures,
wrap_FontGetGlyphFromNameFuncT ,
C_FontGetGlyphFuncT ,
FontGetGlyphFuncT ,
FontGetGlyphFuncT_WithClosures ,
drop_closures_FontGetGlyphFuncT ,
dynamic_FontGetGlyphFuncT ,
genClosure_FontGetGlyphFuncT ,
mk_FontGetGlyphFuncT ,
noFontGetGlyphFuncT ,
noFontGetGlyphFuncT_WithClosures ,
wrap_FontGetGlyphFuncT ,
C_FontGetGlyphKerningFuncT ,
FontGetGlyphKerningFuncT ,
FontGetGlyphKerningFuncT_WithClosures ,
drop_closures_FontGetGlyphKerningFuncT ,
dynamic_FontGetGlyphKerningFuncT ,
genClosure_FontGetGlyphKerningFuncT ,
mk_FontGetGlyphKerningFuncT ,
noFontGetGlyphKerningFuncT ,
noFontGetGlyphKerningFuncT_WithClosures ,
wrap_FontGetGlyphKerningFuncT ,
C_FontGetGlyphNameFuncT ,
FontGetGlyphNameFuncT ,
FontGetGlyphNameFuncT_WithClosures ,
drop_closures_FontGetGlyphNameFuncT ,
dynamic_FontGetGlyphNameFuncT ,
genClosure_FontGetGlyphNameFuncT ,
mk_FontGetGlyphNameFuncT ,
noFontGetGlyphNameFuncT ,
noFontGetGlyphNameFuncT_WithClosures ,
wrap_FontGetGlyphNameFuncT ,
C_FontGetGlyphOriginFuncT ,
FontGetGlyphOriginFuncT ,
FontGetGlyphOriginFuncT_WithClosures ,
drop_closures_FontGetGlyphOriginFuncT ,
dynamic_FontGetGlyphOriginFuncT ,
genClosure_FontGetGlyphOriginFuncT ,
mk_FontGetGlyphOriginFuncT ,
noFontGetGlyphOriginFuncT ,
noFontGetGlyphOriginFuncT_WithClosures ,
wrap_FontGetGlyphOriginFuncT ,
C_FontGetNominalGlyphFuncT ,
FontGetNominalGlyphFuncT ,
FontGetNominalGlyphFuncT_WithClosures ,
drop_closures_FontGetNominalGlyphFuncT ,
dynamic_FontGetNominalGlyphFuncT ,
genClosure_FontGetNominalGlyphFuncT ,
mk_FontGetNominalGlyphFuncT ,
noFontGetNominalGlyphFuncT ,
noFontGetNominalGlyphFuncT_WithClosures ,
wrap_FontGetNominalGlyphFuncT ,
C_FontGetNominalGlyphsFuncT ,
FontGetNominalGlyphsFuncT ,
FontGetNominalGlyphsFuncT_WithClosures ,
drop_closures_FontGetNominalGlyphsFuncT ,
dynamic_FontGetNominalGlyphsFuncT ,
genClosure_FontGetNominalGlyphsFuncT ,
mk_FontGetNominalGlyphsFuncT ,
noFontGetNominalGlyphsFuncT ,
noFontGetNominalGlyphsFuncT_WithClosures,
wrap_FontGetNominalGlyphsFuncT ,
C_FontGetVariationGlyphFuncT ,
FontGetVariationGlyphFuncT ,
FontGetVariationGlyphFuncT_WithClosures ,
drop_closures_FontGetVariationGlyphFuncT,
dynamic_FontGetVariationGlyphFuncT ,
genClosure_FontGetVariationGlyphFuncT ,
mk_FontGetVariationGlyphFuncT ,
noFontGetVariationGlyphFuncT ,
noFontGetVariationGlyphFuncT_WithClosures,
wrap_FontGetVariationGlyphFuncT ,
C_ReferenceTableFuncT ,
ReferenceTableFuncT ,
ReferenceTableFuncT_WithClosures ,
drop_closures_ReferenceTableFuncT ,
dynamic_ReferenceTableFuncT ,
genClosure_ReferenceTableFuncT ,
mk_ReferenceTableFuncT ,
noReferenceTableFuncT ,
noReferenceTableFuncT_WithClosures ,
wrap_ReferenceTableFuncT ,
C_UnicodeCombiningClassFuncT ,
UnicodeCombiningClassFuncT ,
UnicodeCombiningClassFuncT_WithClosures ,
drop_closures_UnicodeCombiningClassFuncT,
dynamic_UnicodeCombiningClassFuncT ,
genClosure_UnicodeCombiningClassFuncT ,
mk_UnicodeCombiningClassFuncT ,
noUnicodeCombiningClassFuncT ,
noUnicodeCombiningClassFuncT_WithClosures,
wrap_UnicodeCombiningClassFuncT ,
C_UnicodeComposeFuncT ,
UnicodeComposeFuncT ,
UnicodeComposeFuncT_WithClosures ,
drop_closures_UnicodeComposeFuncT ,
dynamic_UnicodeComposeFuncT ,
genClosure_UnicodeComposeFuncT ,
mk_UnicodeComposeFuncT ,
noUnicodeComposeFuncT ,
noUnicodeComposeFuncT_WithClosures ,
wrap_UnicodeComposeFuncT ,
C_UnicodeDecomposeCompatibilityFuncT ,
UnicodeDecomposeCompatibilityFuncT ,
UnicodeDecomposeCompatibilityFuncT_WithClosures,
drop_closures_UnicodeDecomposeCompatibilityFuncT,
dynamic_UnicodeDecomposeCompatibilityFuncT,
genClosure_UnicodeDecomposeCompatibilityFuncT,
mk_UnicodeDecomposeCompatibilityFuncT ,
noUnicodeDecomposeCompatibilityFuncT ,
noUnicodeDecomposeCompatibilityFuncT_WithClosures,
wrap_UnicodeDecomposeCompatibilityFuncT ,
C_UnicodeDecomposeFuncT ,
UnicodeDecomposeFuncT ,
UnicodeDecomposeFuncT_WithClosures ,
drop_closures_UnicodeDecomposeFuncT ,
dynamic_UnicodeDecomposeFuncT ,
genClosure_UnicodeDecomposeFuncT ,
mk_UnicodeDecomposeFuncT ,
noUnicodeDecomposeFuncT ,
noUnicodeDecomposeFuncT_WithClosures ,
wrap_UnicodeDecomposeFuncT ,
C_UnicodeEastasianWidthFuncT ,
UnicodeEastasianWidthFuncT ,
UnicodeEastasianWidthFuncT_WithClosures ,
drop_closures_UnicodeEastasianWidthFuncT,
dynamic_UnicodeEastasianWidthFuncT ,
genClosure_UnicodeEastasianWidthFuncT ,
mk_UnicodeEastasianWidthFuncT ,
noUnicodeEastasianWidthFuncT ,
noUnicodeEastasianWidthFuncT_WithClosures,
wrap_UnicodeEastasianWidthFuncT ,
C_UnicodeGeneralCategoryFuncT ,
UnicodeGeneralCategoryFuncT ,
UnicodeGeneralCategoryFuncT_WithClosures,
drop_closures_UnicodeGeneralCategoryFuncT,
dynamic_UnicodeGeneralCategoryFuncT ,
genClosure_UnicodeGeneralCategoryFuncT ,
mk_UnicodeGeneralCategoryFuncT ,
noUnicodeGeneralCategoryFuncT ,
noUnicodeGeneralCategoryFuncT_WithClosures,
wrap_UnicodeGeneralCategoryFuncT ,
C_UnicodeMirroringFuncT ,
UnicodeMirroringFuncT ,
UnicodeMirroringFuncT_WithClosures ,
drop_closures_UnicodeMirroringFuncT ,
dynamic_UnicodeMirroringFuncT ,
genClosure_UnicodeMirroringFuncT ,
mk_UnicodeMirroringFuncT ,
noUnicodeMirroringFuncT ,
noUnicodeMirroringFuncT_WithClosures ,
wrap_UnicodeMirroringFuncT ,
C_UnicodeScriptFuncT ,
UnicodeScriptFuncT ,
UnicodeScriptFuncT_WithClosures ,
drop_closures_UnicodeScriptFuncT ,
dynamic_UnicodeScriptFuncT ,
genClosure_UnicodeScriptFuncT ,
mk_UnicodeScriptFuncT ,
noUnicodeScriptFuncT ,
noUnicodeScriptFuncT_WithClosures ,
wrap_UnicodeScriptFuncT ,
) 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 {-# SOURCE #-} qualified GI.HarfBuzz.Enums as HarfBuzz.Enums
import {-# SOURCE #-} qualified GI.HarfBuzz.Structs.BlobT as HarfBuzz.BlobT
import {-# SOURCE #-} qualified GI.HarfBuzz.Structs.BufferT as HarfBuzz.BufferT
import {-# SOURCE #-} qualified GI.HarfBuzz.Structs.FaceT as HarfBuzz.FaceT
import {-# SOURCE #-} qualified GI.HarfBuzz.Structs.FontExtentsT as HarfBuzz.FontExtentsT
import {-# SOURCE #-} qualified GI.HarfBuzz.Structs.FontT as HarfBuzz.FontT
import {-# SOURCE #-} qualified GI.HarfBuzz.Structs.GlyphExtentsT as HarfBuzz.GlyphExtentsT
import {-# SOURCE #-} qualified GI.HarfBuzz.Structs.UnicodeFuncsT as HarfBuzz.UnicodeFuncsT
type C_UnicodeScriptFuncT =
Ptr HarfBuzz.UnicodeFuncsT.UnicodeFuncsT ->
Word32 ->
Ptr () ->
IO CUInt
foreign import ccall "dynamic" __dynamic_C_UnicodeScriptFuncT :: FunPtr C_UnicodeScriptFuncT -> C_UnicodeScriptFuncT
dynamic_UnicodeScriptFuncT ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_UnicodeScriptFuncT
-> HarfBuzz.UnicodeFuncsT.UnicodeFuncsT
-> Word32
-> Ptr ()
-> m HarfBuzz.Enums.ScriptT
dynamic_UnicodeScriptFuncT :: FunPtr C_UnicodeScriptFuncT
-> UnicodeFuncsT -> Word32 -> Ptr () -> m ScriptT
dynamic_UnicodeScriptFuncT __funPtr :: FunPtr C_UnicodeScriptFuncT
__funPtr ufuncs :: UnicodeFuncsT
ufuncs unicode :: Word32
unicode userData :: Ptr ()
userData = IO ScriptT -> m ScriptT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ScriptT -> m ScriptT) -> IO ScriptT -> m ScriptT
forall a b. (a -> b) -> a -> b
$ do
Ptr UnicodeFuncsT
ufuncs' <- UnicodeFuncsT -> IO (Ptr UnicodeFuncsT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr UnicodeFuncsT
ufuncs
CUInt
result <- (FunPtr C_UnicodeScriptFuncT -> C_UnicodeScriptFuncT
__dynamic_C_UnicodeScriptFuncT FunPtr C_UnicodeScriptFuncT
__funPtr) Ptr UnicodeFuncsT
ufuncs' Word32
unicode Ptr ()
userData
let result' :: ScriptT
result' = (Int -> ScriptT
forall a. Enum a => Int -> a
toEnum (Int -> ScriptT) -> (CUInt -> Int) -> CUInt -> ScriptT
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
UnicodeFuncsT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr UnicodeFuncsT
ufuncs
ScriptT -> IO ScriptT
forall (m :: * -> *) a. Monad m => a -> m a
return ScriptT
result'
foreign import ccall "wrapper"
mk_UnicodeScriptFuncT :: C_UnicodeScriptFuncT -> IO (FunPtr C_UnicodeScriptFuncT)
type UnicodeScriptFuncT =
HarfBuzz.UnicodeFuncsT.UnicodeFuncsT
-> Word32
-> IO HarfBuzz.Enums.ScriptT
noUnicodeScriptFuncT :: Maybe UnicodeScriptFuncT
noUnicodeScriptFuncT :: Maybe UnicodeScriptFuncT
noUnicodeScriptFuncT = Maybe UnicodeScriptFuncT
forall a. Maybe a
Nothing
type UnicodeScriptFuncT_WithClosures =
HarfBuzz.UnicodeFuncsT.UnicodeFuncsT
-> Word32
-> Ptr ()
-> IO HarfBuzz.Enums.ScriptT
noUnicodeScriptFuncT_WithClosures :: Maybe UnicodeScriptFuncT_WithClosures
noUnicodeScriptFuncT_WithClosures :: Maybe UnicodeScriptFuncT_WithClosures
noUnicodeScriptFuncT_WithClosures = Maybe UnicodeScriptFuncT_WithClosures
forall a. Maybe a
Nothing
drop_closures_UnicodeScriptFuncT :: UnicodeScriptFuncT -> UnicodeScriptFuncT_WithClosures
drop_closures_UnicodeScriptFuncT :: UnicodeScriptFuncT -> UnicodeScriptFuncT_WithClosures
drop_closures_UnicodeScriptFuncT _f :: UnicodeScriptFuncT
_f ufuncs :: UnicodeFuncsT
ufuncs unicode :: Word32
unicode _ = UnicodeScriptFuncT
_f UnicodeFuncsT
ufuncs Word32
unicode
genClosure_UnicodeScriptFuncT :: MonadIO m => UnicodeScriptFuncT -> m (GClosure C_UnicodeScriptFuncT)
genClosure_UnicodeScriptFuncT :: UnicodeScriptFuncT -> m (GClosure C_UnicodeScriptFuncT)
genClosure_UnicodeScriptFuncT cb :: UnicodeScriptFuncT
cb = IO (GClosure C_UnicodeScriptFuncT)
-> m (GClosure C_UnicodeScriptFuncT)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_UnicodeScriptFuncT)
-> m (GClosure C_UnicodeScriptFuncT))
-> IO (GClosure C_UnicodeScriptFuncT)
-> m (GClosure C_UnicodeScriptFuncT)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: UnicodeScriptFuncT_WithClosures
cb' = UnicodeScriptFuncT -> UnicodeScriptFuncT_WithClosures
drop_closures_UnicodeScriptFuncT UnicodeScriptFuncT
cb
let cb'' :: C_UnicodeScriptFuncT
cb'' = Maybe (Ptr (FunPtr C_UnicodeScriptFuncT))
-> UnicodeScriptFuncT_WithClosures -> C_UnicodeScriptFuncT
wrap_UnicodeScriptFuncT Maybe (Ptr (FunPtr C_UnicodeScriptFuncT))
forall a. Maybe a
Nothing UnicodeScriptFuncT_WithClosures
cb'
C_UnicodeScriptFuncT -> IO (FunPtr C_UnicodeScriptFuncT)
mk_UnicodeScriptFuncT C_UnicodeScriptFuncT
cb'' IO (FunPtr C_UnicodeScriptFuncT)
-> (FunPtr C_UnicodeScriptFuncT
-> IO (GClosure C_UnicodeScriptFuncT))
-> IO (GClosure C_UnicodeScriptFuncT)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_UnicodeScriptFuncT -> IO (GClosure C_UnicodeScriptFuncT)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_UnicodeScriptFuncT ::
Maybe (Ptr (FunPtr C_UnicodeScriptFuncT)) ->
UnicodeScriptFuncT_WithClosures ->
C_UnicodeScriptFuncT
wrap_UnicodeScriptFuncT :: Maybe (Ptr (FunPtr C_UnicodeScriptFuncT))
-> UnicodeScriptFuncT_WithClosures -> C_UnicodeScriptFuncT
wrap_UnicodeScriptFuncT funptrptr :: Maybe (Ptr (FunPtr C_UnicodeScriptFuncT))
funptrptr _cb :: UnicodeScriptFuncT_WithClosures
_cb ufuncs :: Ptr UnicodeFuncsT
ufuncs unicode :: Word32
unicode userData :: Ptr ()
userData = do
(ManagedPtr UnicodeFuncsT -> UnicodeFuncsT)
-> Ptr UnicodeFuncsT -> (UnicodeFuncsT -> IO CUInt) -> IO CUInt
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr UnicodeFuncsT -> UnicodeFuncsT
HarfBuzz.UnicodeFuncsT.UnicodeFuncsT Ptr UnicodeFuncsT
ufuncs ((UnicodeFuncsT -> IO CUInt) -> IO CUInt)
-> (UnicodeFuncsT -> IO CUInt) -> IO CUInt
forall a b. (a -> b) -> a -> b
$ \ufuncs' :: UnicodeFuncsT
ufuncs' -> do
ScriptT
result <- UnicodeScriptFuncT_WithClosures
_cb UnicodeFuncsT
ufuncs' Word32
unicode Ptr ()
userData
Maybe (Ptr (FunPtr C_UnicodeScriptFuncT)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_UnicodeScriptFuncT))
funptrptr
let result' :: CUInt
result' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (ScriptT -> Int) -> ScriptT -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ScriptT -> Int
forall a. Enum a => a -> Int
fromEnum) ScriptT
result
CUInt -> IO CUInt
forall (m :: * -> *) a. Monad m => a -> m a
return CUInt
result'
type C_UnicodeMirroringFuncT =
Ptr HarfBuzz.UnicodeFuncsT.UnicodeFuncsT ->
Word32 ->
Ptr () ->
IO Word32
foreign import ccall "dynamic" __dynamic_C_UnicodeMirroringFuncT :: FunPtr C_UnicodeMirroringFuncT -> C_UnicodeMirroringFuncT
dynamic_UnicodeMirroringFuncT ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_UnicodeMirroringFuncT
-> HarfBuzz.UnicodeFuncsT.UnicodeFuncsT
-> Word32
-> Ptr ()
-> m Word32
dynamic_UnicodeMirroringFuncT :: FunPtr C_UnicodeMirroringFuncT
-> UnicodeFuncsT -> Word32 -> Ptr () -> m Word32
dynamic_UnicodeMirroringFuncT __funPtr :: FunPtr C_UnicodeMirroringFuncT
__funPtr ufuncs :: UnicodeFuncsT
ufuncs unicode :: Word32
unicode userData :: Ptr ()
userData = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
Ptr UnicodeFuncsT
ufuncs' <- UnicodeFuncsT -> IO (Ptr UnicodeFuncsT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr UnicodeFuncsT
ufuncs
Word32
result <- (FunPtr C_UnicodeMirroringFuncT -> C_UnicodeMirroringFuncT
__dynamic_C_UnicodeMirroringFuncT FunPtr C_UnicodeMirroringFuncT
__funPtr) Ptr UnicodeFuncsT
ufuncs' Word32
unicode Ptr ()
userData
UnicodeFuncsT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr UnicodeFuncsT
ufuncs
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
foreign import ccall "wrapper"
mk_UnicodeMirroringFuncT :: C_UnicodeMirroringFuncT -> IO (FunPtr C_UnicodeMirroringFuncT)
type UnicodeMirroringFuncT =
HarfBuzz.UnicodeFuncsT.UnicodeFuncsT
-> Word32
-> IO Word32
noUnicodeMirroringFuncT :: Maybe UnicodeMirroringFuncT
noUnicodeMirroringFuncT :: Maybe UnicodeMirroringFuncT
noUnicodeMirroringFuncT = Maybe UnicodeMirroringFuncT
forall a. Maybe a
Nothing
type UnicodeMirroringFuncT_WithClosures =
HarfBuzz.UnicodeFuncsT.UnicodeFuncsT
-> Word32
-> Ptr ()
-> IO Word32
noUnicodeMirroringFuncT_WithClosures :: Maybe UnicodeMirroringFuncT_WithClosures
noUnicodeMirroringFuncT_WithClosures :: Maybe UnicodeMirroringFuncT_WithClosures
noUnicodeMirroringFuncT_WithClosures = Maybe UnicodeMirroringFuncT_WithClosures
forall a. Maybe a
Nothing
drop_closures_UnicodeMirroringFuncT :: UnicodeMirroringFuncT -> UnicodeMirroringFuncT_WithClosures
drop_closures_UnicodeMirroringFuncT :: UnicodeMirroringFuncT -> UnicodeMirroringFuncT_WithClosures
drop_closures_UnicodeMirroringFuncT _f :: UnicodeMirroringFuncT
_f ufuncs :: UnicodeFuncsT
ufuncs unicode :: Word32
unicode _ = UnicodeMirroringFuncT
_f UnicodeFuncsT
ufuncs Word32
unicode
genClosure_UnicodeMirroringFuncT :: MonadIO m => UnicodeMirroringFuncT -> m (GClosure C_UnicodeMirroringFuncT)
genClosure_UnicodeMirroringFuncT :: UnicodeMirroringFuncT -> m (GClosure C_UnicodeMirroringFuncT)
genClosure_UnicodeMirroringFuncT cb :: UnicodeMirroringFuncT
cb = IO (GClosure C_UnicodeMirroringFuncT)
-> m (GClosure C_UnicodeMirroringFuncT)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_UnicodeMirroringFuncT)
-> m (GClosure C_UnicodeMirroringFuncT))
-> IO (GClosure C_UnicodeMirroringFuncT)
-> m (GClosure C_UnicodeMirroringFuncT)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: UnicodeMirroringFuncT_WithClosures
cb' = UnicodeMirroringFuncT -> UnicodeMirroringFuncT_WithClosures
drop_closures_UnicodeMirroringFuncT UnicodeMirroringFuncT
cb
let cb'' :: C_UnicodeMirroringFuncT
cb'' = Maybe (Ptr (FunPtr C_UnicodeMirroringFuncT))
-> UnicodeMirroringFuncT_WithClosures -> C_UnicodeMirroringFuncT
wrap_UnicodeMirroringFuncT Maybe (Ptr (FunPtr C_UnicodeMirroringFuncT))
forall a. Maybe a
Nothing UnicodeMirroringFuncT_WithClosures
cb'
C_UnicodeMirroringFuncT -> IO (FunPtr C_UnicodeMirroringFuncT)
mk_UnicodeMirroringFuncT C_UnicodeMirroringFuncT
cb'' IO (FunPtr C_UnicodeMirroringFuncT)
-> (FunPtr C_UnicodeMirroringFuncT
-> IO (GClosure C_UnicodeMirroringFuncT))
-> IO (GClosure C_UnicodeMirroringFuncT)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_UnicodeMirroringFuncT
-> IO (GClosure C_UnicodeMirroringFuncT)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_UnicodeMirroringFuncT ::
Maybe (Ptr (FunPtr C_UnicodeMirroringFuncT)) ->
UnicodeMirroringFuncT_WithClosures ->
C_UnicodeMirroringFuncT
wrap_UnicodeMirroringFuncT :: Maybe (Ptr (FunPtr C_UnicodeMirroringFuncT))
-> UnicodeMirroringFuncT_WithClosures -> C_UnicodeMirroringFuncT
wrap_UnicodeMirroringFuncT funptrptr :: Maybe (Ptr (FunPtr C_UnicodeMirroringFuncT))
funptrptr _cb :: UnicodeMirroringFuncT_WithClosures
_cb ufuncs :: Ptr UnicodeFuncsT
ufuncs unicode :: Word32
unicode userData :: Ptr ()
userData = do
(ManagedPtr UnicodeFuncsT -> UnicodeFuncsT)
-> Ptr UnicodeFuncsT -> (UnicodeFuncsT -> IO Word32) -> IO Word32
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr UnicodeFuncsT -> UnicodeFuncsT
HarfBuzz.UnicodeFuncsT.UnicodeFuncsT Ptr UnicodeFuncsT
ufuncs ((UnicodeFuncsT -> IO Word32) -> IO Word32)
-> (UnicodeFuncsT -> IO Word32) -> IO Word32
forall a b. (a -> b) -> a -> b
$ \ufuncs' :: UnicodeFuncsT
ufuncs' -> do
Word32
result <- UnicodeMirroringFuncT_WithClosures
_cb UnicodeFuncsT
ufuncs' Word32
unicode Ptr ()
userData
Maybe (Ptr (FunPtr C_UnicodeMirroringFuncT)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_UnicodeMirroringFuncT))
funptrptr
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
type C_UnicodeGeneralCategoryFuncT =
Ptr HarfBuzz.UnicodeFuncsT.UnicodeFuncsT ->
Word32 ->
Ptr () ->
IO CUInt
foreign import ccall "dynamic" __dynamic_C_UnicodeGeneralCategoryFuncT :: FunPtr C_UnicodeGeneralCategoryFuncT -> C_UnicodeGeneralCategoryFuncT
dynamic_UnicodeGeneralCategoryFuncT ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_UnicodeGeneralCategoryFuncT
-> HarfBuzz.UnicodeFuncsT.UnicodeFuncsT
-> Word32
-> Ptr ()
-> m HarfBuzz.Enums.UnicodeGeneralCategoryT
dynamic_UnicodeGeneralCategoryFuncT :: FunPtr C_UnicodeScriptFuncT
-> UnicodeFuncsT -> Word32 -> Ptr () -> m UnicodeGeneralCategoryT
dynamic_UnicodeGeneralCategoryFuncT __funPtr :: FunPtr C_UnicodeScriptFuncT
__funPtr ufuncs :: UnicodeFuncsT
ufuncs unicode :: Word32
unicode userData :: Ptr ()
userData = IO UnicodeGeneralCategoryT -> m UnicodeGeneralCategoryT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO UnicodeGeneralCategoryT -> m UnicodeGeneralCategoryT)
-> IO UnicodeGeneralCategoryT -> m UnicodeGeneralCategoryT
forall a b. (a -> b) -> a -> b
$ do
Ptr UnicodeFuncsT
ufuncs' <- UnicodeFuncsT -> IO (Ptr UnicodeFuncsT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr UnicodeFuncsT
ufuncs
CUInt
result <- (FunPtr C_UnicodeScriptFuncT -> C_UnicodeScriptFuncT
__dynamic_C_UnicodeGeneralCategoryFuncT FunPtr C_UnicodeScriptFuncT
__funPtr) Ptr UnicodeFuncsT
ufuncs' Word32
unicode Ptr ()
userData
let result' :: UnicodeGeneralCategoryT
result' = (Int -> UnicodeGeneralCategoryT
forall a. Enum a => Int -> a
toEnum (Int -> UnicodeGeneralCategoryT)
-> (CUInt -> Int) -> CUInt -> UnicodeGeneralCategoryT
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
UnicodeFuncsT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr UnicodeFuncsT
ufuncs
UnicodeGeneralCategoryT -> IO UnicodeGeneralCategoryT
forall (m :: * -> *) a. Monad m => a -> m a
return UnicodeGeneralCategoryT
result'
foreign import ccall "wrapper"
mk_UnicodeGeneralCategoryFuncT :: C_UnicodeGeneralCategoryFuncT -> IO (FunPtr C_UnicodeGeneralCategoryFuncT)
type UnicodeGeneralCategoryFuncT =
HarfBuzz.UnicodeFuncsT.UnicodeFuncsT
-> Word32
-> IO HarfBuzz.Enums.UnicodeGeneralCategoryT
noUnicodeGeneralCategoryFuncT :: Maybe UnicodeGeneralCategoryFuncT
noUnicodeGeneralCategoryFuncT :: Maybe UnicodeGeneralCategoryFuncT
noUnicodeGeneralCategoryFuncT = Maybe UnicodeGeneralCategoryFuncT
forall a. Maybe a
Nothing
type UnicodeGeneralCategoryFuncT_WithClosures =
HarfBuzz.UnicodeFuncsT.UnicodeFuncsT
-> Word32
-> Ptr ()
-> IO HarfBuzz.Enums.UnicodeGeneralCategoryT
noUnicodeGeneralCategoryFuncT_WithClosures :: Maybe UnicodeGeneralCategoryFuncT_WithClosures
noUnicodeGeneralCategoryFuncT_WithClosures :: Maybe UnicodeGeneralCategoryFuncT_WithClosures
noUnicodeGeneralCategoryFuncT_WithClosures = Maybe UnicodeGeneralCategoryFuncT_WithClosures
forall a. Maybe a
Nothing
drop_closures_UnicodeGeneralCategoryFuncT :: UnicodeGeneralCategoryFuncT -> UnicodeGeneralCategoryFuncT_WithClosures
drop_closures_UnicodeGeneralCategoryFuncT :: UnicodeGeneralCategoryFuncT
-> UnicodeGeneralCategoryFuncT_WithClosures
drop_closures_UnicodeGeneralCategoryFuncT _f :: UnicodeGeneralCategoryFuncT
_f ufuncs :: UnicodeFuncsT
ufuncs unicode :: Word32
unicode _ = UnicodeGeneralCategoryFuncT
_f UnicodeFuncsT
ufuncs Word32
unicode
genClosure_UnicodeGeneralCategoryFuncT :: MonadIO m => UnicodeGeneralCategoryFuncT -> m (GClosure C_UnicodeGeneralCategoryFuncT)
genClosure_UnicodeGeneralCategoryFuncT :: UnicodeGeneralCategoryFuncT -> m (GClosure C_UnicodeScriptFuncT)
genClosure_UnicodeGeneralCategoryFuncT cb :: UnicodeGeneralCategoryFuncT
cb = IO (GClosure C_UnicodeScriptFuncT)
-> m (GClosure C_UnicodeScriptFuncT)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_UnicodeScriptFuncT)
-> m (GClosure C_UnicodeScriptFuncT))
-> IO (GClosure C_UnicodeScriptFuncT)
-> m (GClosure C_UnicodeScriptFuncT)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: UnicodeGeneralCategoryFuncT_WithClosures
cb' = UnicodeGeneralCategoryFuncT
-> UnicodeGeneralCategoryFuncT_WithClosures
drop_closures_UnicodeGeneralCategoryFuncT UnicodeGeneralCategoryFuncT
cb
let cb'' :: C_UnicodeScriptFuncT
cb'' = Maybe (Ptr (FunPtr C_UnicodeScriptFuncT))
-> UnicodeGeneralCategoryFuncT_WithClosures -> C_UnicodeScriptFuncT
wrap_UnicodeGeneralCategoryFuncT Maybe (Ptr (FunPtr C_UnicodeScriptFuncT))
forall a. Maybe a
Nothing UnicodeGeneralCategoryFuncT_WithClosures
cb'
C_UnicodeScriptFuncT -> IO (FunPtr C_UnicodeScriptFuncT)
mk_UnicodeGeneralCategoryFuncT C_UnicodeScriptFuncT
cb'' IO (FunPtr C_UnicodeScriptFuncT)
-> (FunPtr C_UnicodeScriptFuncT
-> IO (GClosure C_UnicodeScriptFuncT))
-> IO (GClosure C_UnicodeScriptFuncT)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_UnicodeScriptFuncT -> IO (GClosure C_UnicodeScriptFuncT)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_UnicodeGeneralCategoryFuncT ::
Maybe (Ptr (FunPtr C_UnicodeGeneralCategoryFuncT)) ->
UnicodeGeneralCategoryFuncT_WithClosures ->
C_UnicodeGeneralCategoryFuncT
wrap_UnicodeGeneralCategoryFuncT :: Maybe (Ptr (FunPtr C_UnicodeScriptFuncT))
-> UnicodeGeneralCategoryFuncT_WithClosures -> C_UnicodeScriptFuncT
wrap_UnicodeGeneralCategoryFuncT funptrptr :: Maybe (Ptr (FunPtr C_UnicodeScriptFuncT))
funptrptr _cb :: UnicodeGeneralCategoryFuncT_WithClosures
_cb ufuncs :: Ptr UnicodeFuncsT
ufuncs unicode :: Word32
unicode userData :: Ptr ()
userData = do
(ManagedPtr UnicodeFuncsT -> UnicodeFuncsT)
-> Ptr UnicodeFuncsT -> (UnicodeFuncsT -> IO CUInt) -> IO CUInt
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr UnicodeFuncsT -> UnicodeFuncsT
HarfBuzz.UnicodeFuncsT.UnicodeFuncsT Ptr UnicodeFuncsT
ufuncs ((UnicodeFuncsT -> IO CUInt) -> IO CUInt)
-> (UnicodeFuncsT -> IO CUInt) -> IO CUInt
forall a b. (a -> b) -> a -> b
$ \ufuncs' :: UnicodeFuncsT
ufuncs' -> do
UnicodeGeneralCategoryT
result <- UnicodeGeneralCategoryFuncT_WithClosures
_cb UnicodeFuncsT
ufuncs' Word32
unicode Ptr ()
userData
Maybe (Ptr (FunPtr C_UnicodeScriptFuncT)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_UnicodeScriptFuncT))
funptrptr
let result' :: CUInt
result' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (UnicodeGeneralCategoryT -> Int)
-> UnicodeGeneralCategoryT
-> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. UnicodeGeneralCategoryT -> Int
forall a. Enum a => a -> Int
fromEnum) UnicodeGeneralCategoryT
result
CUInt -> IO CUInt
forall (m :: * -> *) a. Monad m => a -> m a
return CUInt
result'
type C_UnicodeEastasianWidthFuncT =
Ptr HarfBuzz.UnicodeFuncsT.UnicodeFuncsT ->
Word32 ->
Ptr () ->
IO Word32
foreign import ccall "dynamic" __dynamic_C_UnicodeEastasianWidthFuncT :: FunPtr C_UnicodeEastasianWidthFuncT -> C_UnicodeEastasianWidthFuncT
dynamic_UnicodeEastasianWidthFuncT ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_UnicodeEastasianWidthFuncT
-> HarfBuzz.UnicodeFuncsT.UnicodeFuncsT
-> Word32
-> Ptr ()
-> m Word32
dynamic_UnicodeEastasianWidthFuncT :: FunPtr C_UnicodeMirroringFuncT
-> UnicodeFuncsT -> Word32 -> Ptr () -> m Word32
dynamic_UnicodeEastasianWidthFuncT __funPtr :: FunPtr C_UnicodeMirroringFuncT
__funPtr ufuncs :: UnicodeFuncsT
ufuncs unicode :: Word32
unicode userData :: Ptr ()
userData = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
Ptr UnicodeFuncsT
ufuncs' <- UnicodeFuncsT -> IO (Ptr UnicodeFuncsT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr UnicodeFuncsT
ufuncs
Word32
result <- (FunPtr C_UnicodeMirroringFuncT -> C_UnicodeMirroringFuncT
__dynamic_C_UnicodeEastasianWidthFuncT FunPtr C_UnicodeMirroringFuncT
__funPtr) Ptr UnicodeFuncsT
ufuncs' Word32
unicode Ptr ()
userData
UnicodeFuncsT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr UnicodeFuncsT
ufuncs
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
foreign import ccall "wrapper"
mk_UnicodeEastasianWidthFuncT :: C_UnicodeEastasianWidthFuncT -> IO (FunPtr C_UnicodeEastasianWidthFuncT)
{-# DEPRECATED UnicodeEastasianWidthFuncT ["(Since version 2.0.0)"] #-}
type UnicodeEastasianWidthFuncT =
HarfBuzz.UnicodeFuncsT.UnicodeFuncsT
-> Word32
-> IO Word32
noUnicodeEastasianWidthFuncT :: Maybe UnicodeEastasianWidthFuncT
noUnicodeEastasianWidthFuncT :: Maybe UnicodeMirroringFuncT
noUnicodeEastasianWidthFuncT = Maybe UnicodeMirroringFuncT
forall a. Maybe a
Nothing
type UnicodeEastasianWidthFuncT_WithClosures =
HarfBuzz.UnicodeFuncsT.UnicodeFuncsT
-> Word32
-> Ptr ()
-> IO Word32
noUnicodeEastasianWidthFuncT_WithClosures :: Maybe UnicodeEastasianWidthFuncT_WithClosures
noUnicodeEastasianWidthFuncT_WithClosures :: Maybe UnicodeMirroringFuncT_WithClosures
noUnicodeEastasianWidthFuncT_WithClosures = Maybe UnicodeMirroringFuncT_WithClosures
forall a. Maybe a
Nothing
drop_closures_UnicodeEastasianWidthFuncT :: UnicodeEastasianWidthFuncT -> UnicodeEastasianWidthFuncT_WithClosures
drop_closures_UnicodeEastasianWidthFuncT :: UnicodeMirroringFuncT -> UnicodeMirroringFuncT_WithClosures
drop_closures_UnicodeEastasianWidthFuncT _f :: UnicodeMirroringFuncT
_f ufuncs :: UnicodeFuncsT
ufuncs unicode :: Word32
unicode _ = UnicodeMirroringFuncT
_f UnicodeFuncsT
ufuncs Word32
unicode
genClosure_UnicodeEastasianWidthFuncT :: MonadIO m => UnicodeEastasianWidthFuncT -> m (GClosure C_UnicodeEastasianWidthFuncT)
genClosure_UnicodeEastasianWidthFuncT :: UnicodeMirroringFuncT -> m (GClosure C_UnicodeMirroringFuncT)
genClosure_UnicodeEastasianWidthFuncT cb :: UnicodeMirroringFuncT
cb = IO (GClosure C_UnicodeMirroringFuncT)
-> m (GClosure C_UnicodeMirroringFuncT)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_UnicodeMirroringFuncT)
-> m (GClosure C_UnicodeMirroringFuncT))
-> IO (GClosure C_UnicodeMirroringFuncT)
-> m (GClosure C_UnicodeMirroringFuncT)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: UnicodeMirroringFuncT_WithClosures
cb' = UnicodeMirroringFuncT -> UnicodeMirroringFuncT_WithClosures
drop_closures_UnicodeEastasianWidthFuncT UnicodeMirroringFuncT
cb
let cb'' :: C_UnicodeMirroringFuncT
cb'' = Maybe (Ptr (FunPtr C_UnicodeMirroringFuncT))
-> UnicodeMirroringFuncT_WithClosures -> C_UnicodeMirroringFuncT
wrap_UnicodeEastasianWidthFuncT Maybe (Ptr (FunPtr C_UnicodeMirroringFuncT))
forall a. Maybe a
Nothing UnicodeMirroringFuncT_WithClosures
cb'
C_UnicodeMirroringFuncT -> IO (FunPtr C_UnicodeMirroringFuncT)
mk_UnicodeEastasianWidthFuncT C_UnicodeMirroringFuncT
cb'' IO (FunPtr C_UnicodeMirroringFuncT)
-> (FunPtr C_UnicodeMirroringFuncT
-> IO (GClosure C_UnicodeMirroringFuncT))
-> IO (GClosure C_UnicodeMirroringFuncT)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_UnicodeMirroringFuncT
-> IO (GClosure C_UnicodeMirroringFuncT)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_UnicodeEastasianWidthFuncT ::
Maybe (Ptr (FunPtr C_UnicodeEastasianWidthFuncT)) ->
UnicodeEastasianWidthFuncT_WithClosures ->
C_UnicodeEastasianWidthFuncT
wrap_UnicodeEastasianWidthFuncT :: Maybe (Ptr (FunPtr C_UnicodeMirroringFuncT))
-> UnicodeMirroringFuncT_WithClosures -> C_UnicodeMirroringFuncT
wrap_UnicodeEastasianWidthFuncT funptrptr :: Maybe (Ptr (FunPtr C_UnicodeMirroringFuncT))
funptrptr _cb :: UnicodeMirroringFuncT_WithClosures
_cb ufuncs :: Ptr UnicodeFuncsT
ufuncs unicode :: Word32
unicode userData :: Ptr ()
userData = do
(ManagedPtr UnicodeFuncsT -> UnicodeFuncsT)
-> Ptr UnicodeFuncsT -> (UnicodeFuncsT -> IO Word32) -> IO Word32
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr UnicodeFuncsT -> UnicodeFuncsT
HarfBuzz.UnicodeFuncsT.UnicodeFuncsT Ptr UnicodeFuncsT
ufuncs ((UnicodeFuncsT -> IO Word32) -> IO Word32)
-> (UnicodeFuncsT -> IO Word32) -> IO Word32
forall a b. (a -> b) -> a -> b
$ \ufuncs' :: UnicodeFuncsT
ufuncs' -> do
Word32
result <- UnicodeMirroringFuncT_WithClosures
_cb UnicodeFuncsT
ufuncs' Word32
unicode Ptr ()
userData
Maybe (Ptr (FunPtr C_UnicodeMirroringFuncT)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_UnicodeMirroringFuncT))
funptrptr
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
type C_UnicodeDecomposeFuncT =
Ptr HarfBuzz.UnicodeFuncsT.UnicodeFuncsT ->
Word32 ->
Word32 ->
Word32 ->
Ptr () ->
IO Int32
foreign import ccall "dynamic" __dynamic_C_UnicodeDecomposeFuncT :: FunPtr C_UnicodeDecomposeFuncT -> C_UnicodeDecomposeFuncT
dynamic_UnicodeDecomposeFuncT ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_UnicodeDecomposeFuncT
-> HarfBuzz.UnicodeFuncsT.UnicodeFuncsT
-> Word32
-> Word32
-> Word32
-> Ptr ()
-> m Int32
dynamic_UnicodeDecomposeFuncT :: FunPtr C_UnicodeDecomposeFuncT
-> UnicodeFuncsT -> Word32 -> Word32 -> Word32 -> Ptr () -> m Int32
dynamic_UnicodeDecomposeFuncT __funPtr :: FunPtr C_UnicodeDecomposeFuncT
__funPtr ufuncs :: UnicodeFuncsT
ufuncs ab :: Word32
ab a :: Word32
a b :: Word32
b userData :: Ptr ()
userData = 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
$ do
Ptr UnicodeFuncsT
ufuncs' <- UnicodeFuncsT -> IO (Ptr UnicodeFuncsT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr UnicodeFuncsT
ufuncs
Int32
result <- (FunPtr C_UnicodeDecomposeFuncT -> C_UnicodeDecomposeFuncT
__dynamic_C_UnicodeDecomposeFuncT FunPtr C_UnicodeDecomposeFuncT
__funPtr) Ptr UnicodeFuncsT
ufuncs' Word32
ab Word32
a Word32
b Ptr ()
userData
UnicodeFuncsT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr UnicodeFuncsT
ufuncs
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
foreign import ccall "wrapper"
mk_UnicodeDecomposeFuncT :: C_UnicodeDecomposeFuncT -> IO (FunPtr C_UnicodeDecomposeFuncT)
type UnicodeDecomposeFuncT =
HarfBuzz.UnicodeFuncsT.UnicodeFuncsT
-> Word32
-> Word32
-> Word32
-> IO Int32
noUnicodeDecomposeFuncT :: Maybe UnicodeDecomposeFuncT
noUnicodeDecomposeFuncT :: Maybe UnicodeDecomposeFuncT
noUnicodeDecomposeFuncT = Maybe UnicodeDecomposeFuncT
forall a. Maybe a
Nothing
type UnicodeDecomposeFuncT_WithClosures =
HarfBuzz.UnicodeFuncsT.UnicodeFuncsT
-> Word32
-> Word32
-> Word32
-> Ptr ()
-> IO Int32
noUnicodeDecomposeFuncT_WithClosures :: Maybe UnicodeDecomposeFuncT_WithClosures
noUnicodeDecomposeFuncT_WithClosures :: Maybe UnicodeDecomposeFuncT_WithClosures
noUnicodeDecomposeFuncT_WithClosures = Maybe UnicodeDecomposeFuncT_WithClosures
forall a. Maybe a
Nothing
drop_closures_UnicodeDecomposeFuncT :: UnicodeDecomposeFuncT -> UnicodeDecomposeFuncT_WithClosures
drop_closures_UnicodeDecomposeFuncT :: UnicodeDecomposeFuncT -> UnicodeDecomposeFuncT_WithClosures
drop_closures_UnicodeDecomposeFuncT _f :: UnicodeDecomposeFuncT
_f ufuncs :: UnicodeFuncsT
ufuncs ab :: Word32
ab a :: Word32
a b :: Word32
b _ = UnicodeDecomposeFuncT
_f UnicodeFuncsT
ufuncs Word32
ab Word32
a Word32
b
genClosure_UnicodeDecomposeFuncT :: MonadIO m => UnicodeDecomposeFuncT -> m (GClosure C_UnicodeDecomposeFuncT)
genClosure_UnicodeDecomposeFuncT :: UnicodeDecomposeFuncT -> m (GClosure C_UnicodeDecomposeFuncT)
genClosure_UnicodeDecomposeFuncT cb :: UnicodeDecomposeFuncT
cb = IO (GClosure C_UnicodeDecomposeFuncT)
-> m (GClosure C_UnicodeDecomposeFuncT)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_UnicodeDecomposeFuncT)
-> m (GClosure C_UnicodeDecomposeFuncT))
-> IO (GClosure C_UnicodeDecomposeFuncT)
-> m (GClosure C_UnicodeDecomposeFuncT)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: UnicodeDecomposeFuncT_WithClosures
cb' = UnicodeDecomposeFuncT -> UnicodeDecomposeFuncT_WithClosures
drop_closures_UnicodeDecomposeFuncT UnicodeDecomposeFuncT
cb
let cb'' :: C_UnicodeDecomposeFuncT
cb'' = Maybe (Ptr (FunPtr C_UnicodeDecomposeFuncT))
-> UnicodeDecomposeFuncT_WithClosures -> C_UnicodeDecomposeFuncT
wrap_UnicodeDecomposeFuncT Maybe (Ptr (FunPtr C_UnicodeDecomposeFuncT))
forall a. Maybe a
Nothing UnicodeDecomposeFuncT_WithClosures
cb'
C_UnicodeDecomposeFuncT -> IO (FunPtr C_UnicodeDecomposeFuncT)
mk_UnicodeDecomposeFuncT C_UnicodeDecomposeFuncT
cb'' IO (FunPtr C_UnicodeDecomposeFuncT)
-> (FunPtr C_UnicodeDecomposeFuncT
-> IO (GClosure C_UnicodeDecomposeFuncT))
-> IO (GClosure C_UnicodeDecomposeFuncT)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_UnicodeDecomposeFuncT
-> IO (GClosure C_UnicodeDecomposeFuncT)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_UnicodeDecomposeFuncT ::
Maybe (Ptr (FunPtr C_UnicodeDecomposeFuncT)) ->
UnicodeDecomposeFuncT_WithClosures ->
C_UnicodeDecomposeFuncT
wrap_UnicodeDecomposeFuncT :: Maybe (Ptr (FunPtr C_UnicodeDecomposeFuncT))
-> UnicodeDecomposeFuncT_WithClosures -> C_UnicodeDecomposeFuncT
wrap_UnicodeDecomposeFuncT funptrptr :: Maybe (Ptr (FunPtr C_UnicodeDecomposeFuncT))
funptrptr _cb :: UnicodeDecomposeFuncT_WithClosures
_cb ufuncs :: Ptr UnicodeFuncsT
ufuncs ab :: Word32
ab a :: Word32
a b :: Word32
b userData :: Ptr ()
userData = do
(ManagedPtr UnicodeFuncsT -> UnicodeFuncsT)
-> Ptr UnicodeFuncsT -> (UnicodeFuncsT -> IO Int32) -> IO Int32
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr UnicodeFuncsT -> UnicodeFuncsT
HarfBuzz.UnicodeFuncsT.UnicodeFuncsT Ptr UnicodeFuncsT
ufuncs ((UnicodeFuncsT -> IO Int32) -> IO Int32)
-> (UnicodeFuncsT -> IO Int32) -> IO Int32
forall a b. (a -> b) -> a -> b
$ \ufuncs' :: UnicodeFuncsT
ufuncs' -> do
Int32
result <- UnicodeDecomposeFuncT_WithClosures
_cb UnicodeFuncsT
ufuncs' Word32
ab Word32
a Word32
b Ptr ()
userData
Maybe (Ptr (FunPtr C_UnicodeDecomposeFuncT)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_UnicodeDecomposeFuncT))
funptrptr
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
type C_UnicodeDecomposeCompatibilityFuncT =
Ptr HarfBuzz.UnicodeFuncsT.UnicodeFuncsT ->
Word32 ->
Word32 ->
Ptr () ->
IO Word32
foreign import ccall "dynamic" __dynamic_C_UnicodeDecomposeCompatibilityFuncT :: FunPtr C_UnicodeDecomposeCompatibilityFuncT -> C_UnicodeDecomposeCompatibilityFuncT
dynamic_UnicodeDecomposeCompatibilityFuncT ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_UnicodeDecomposeCompatibilityFuncT
-> HarfBuzz.UnicodeFuncsT.UnicodeFuncsT
-> Word32
-> Word32
-> Ptr ()
-> m Word32
dynamic_UnicodeDecomposeCompatibilityFuncT :: FunPtr C_UnicodeDecomposeCompatibilityFuncT
-> UnicodeFuncsT -> Word32 -> Word32 -> Ptr () -> m Word32
dynamic_UnicodeDecomposeCompatibilityFuncT __funPtr :: FunPtr C_UnicodeDecomposeCompatibilityFuncT
__funPtr ufuncs :: UnicodeFuncsT
ufuncs u :: Word32
u decomposed :: Word32
decomposed userData :: Ptr ()
userData = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
Ptr UnicodeFuncsT
ufuncs' <- UnicodeFuncsT -> IO (Ptr UnicodeFuncsT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr UnicodeFuncsT
ufuncs
Word32
result <- (FunPtr C_UnicodeDecomposeCompatibilityFuncT
-> C_UnicodeDecomposeCompatibilityFuncT
__dynamic_C_UnicodeDecomposeCompatibilityFuncT FunPtr C_UnicodeDecomposeCompatibilityFuncT
__funPtr) Ptr UnicodeFuncsT
ufuncs' Word32
u Word32
decomposed Ptr ()
userData
UnicodeFuncsT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr UnicodeFuncsT
ufuncs
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
foreign import ccall "wrapper"
mk_UnicodeDecomposeCompatibilityFuncT :: C_UnicodeDecomposeCompatibilityFuncT -> IO (FunPtr C_UnicodeDecomposeCompatibilityFuncT)
{-# DEPRECATED UnicodeDecomposeCompatibilityFuncT ["(Since version 2.0.0)"] #-}
type UnicodeDecomposeCompatibilityFuncT =
HarfBuzz.UnicodeFuncsT.UnicodeFuncsT
-> Word32
-> Word32
-> IO Word32
noUnicodeDecomposeCompatibilityFuncT :: Maybe UnicodeDecomposeCompatibilityFuncT
noUnicodeDecomposeCompatibilityFuncT :: Maybe UnicodeDecomposeCompatibilityFuncT
noUnicodeDecomposeCompatibilityFuncT = Maybe UnicodeDecomposeCompatibilityFuncT
forall a. Maybe a
Nothing
type UnicodeDecomposeCompatibilityFuncT_WithClosures =
HarfBuzz.UnicodeFuncsT.UnicodeFuncsT
-> Word32
-> Word32
-> Ptr ()
-> IO Word32
noUnicodeDecomposeCompatibilityFuncT_WithClosures :: Maybe UnicodeDecomposeCompatibilityFuncT_WithClosures
noUnicodeDecomposeCompatibilityFuncT_WithClosures :: Maybe UnicodeDecomposeCompatibilityFuncT_WithClosures
noUnicodeDecomposeCompatibilityFuncT_WithClosures = Maybe UnicodeDecomposeCompatibilityFuncT_WithClosures
forall a. Maybe a
Nothing
drop_closures_UnicodeDecomposeCompatibilityFuncT :: UnicodeDecomposeCompatibilityFuncT -> UnicodeDecomposeCompatibilityFuncT_WithClosures
drop_closures_UnicodeDecomposeCompatibilityFuncT :: UnicodeDecomposeCompatibilityFuncT
-> UnicodeDecomposeCompatibilityFuncT_WithClosures
drop_closures_UnicodeDecomposeCompatibilityFuncT _f :: UnicodeDecomposeCompatibilityFuncT
_f ufuncs :: UnicodeFuncsT
ufuncs u :: Word32
u decomposed :: Word32
decomposed _ = UnicodeDecomposeCompatibilityFuncT
_f UnicodeFuncsT
ufuncs Word32
u Word32
decomposed
genClosure_UnicodeDecomposeCompatibilityFuncT :: MonadIO m => UnicodeDecomposeCompatibilityFuncT -> m (GClosure C_UnicodeDecomposeCompatibilityFuncT)
genClosure_UnicodeDecomposeCompatibilityFuncT :: UnicodeDecomposeCompatibilityFuncT
-> m (GClosure C_UnicodeDecomposeCompatibilityFuncT)
genClosure_UnicodeDecomposeCompatibilityFuncT cb :: UnicodeDecomposeCompatibilityFuncT
cb = IO (GClosure C_UnicodeDecomposeCompatibilityFuncT)
-> m (GClosure C_UnicodeDecomposeCompatibilityFuncT)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_UnicodeDecomposeCompatibilityFuncT)
-> m (GClosure C_UnicodeDecomposeCompatibilityFuncT))
-> IO (GClosure C_UnicodeDecomposeCompatibilityFuncT)
-> m (GClosure C_UnicodeDecomposeCompatibilityFuncT)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: UnicodeDecomposeCompatibilityFuncT_WithClosures
cb' = UnicodeDecomposeCompatibilityFuncT
-> UnicodeDecomposeCompatibilityFuncT_WithClosures
drop_closures_UnicodeDecomposeCompatibilityFuncT UnicodeDecomposeCompatibilityFuncT
cb
let cb'' :: C_UnicodeDecomposeCompatibilityFuncT
cb'' = Maybe (Ptr (FunPtr C_UnicodeDecomposeCompatibilityFuncT))
-> UnicodeDecomposeCompatibilityFuncT_WithClosures
-> C_UnicodeDecomposeCompatibilityFuncT
wrap_UnicodeDecomposeCompatibilityFuncT Maybe (Ptr (FunPtr C_UnicodeDecomposeCompatibilityFuncT))
forall a. Maybe a
Nothing UnicodeDecomposeCompatibilityFuncT_WithClosures
cb'
C_UnicodeDecomposeCompatibilityFuncT
-> IO (FunPtr C_UnicodeDecomposeCompatibilityFuncT)
mk_UnicodeDecomposeCompatibilityFuncT C_UnicodeDecomposeCompatibilityFuncT
cb'' IO (FunPtr C_UnicodeDecomposeCompatibilityFuncT)
-> (FunPtr C_UnicodeDecomposeCompatibilityFuncT
-> IO (GClosure C_UnicodeDecomposeCompatibilityFuncT))
-> IO (GClosure C_UnicodeDecomposeCompatibilityFuncT)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_UnicodeDecomposeCompatibilityFuncT
-> IO (GClosure C_UnicodeDecomposeCompatibilityFuncT)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_UnicodeDecomposeCompatibilityFuncT ::
Maybe (Ptr (FunPtr C_UnicodeDecomposeCompatibilityFuncT)) ->
UnicodeDecomposeCompatibilityFuncT_WithClosures ->
C_UnicodeDecomposeCompatibilityFuncT
wrap_UnicodeDecomposeCompatibilityFuncT :: Maybe (Ptr (FunPtr C_UnicodeDecomposeCompatibilityFuncT))
-> UnicodeDecomposeCompatibilityFuncT_WithClosures
-> C_UnicodeDecomposeCompatibilityFuncT
wrap_UnicodeDecomposeCompatibilityFuncT funptrptr :: Maybe (Ptr (FunPtr C_UnicodeDecomposeCompatibilityFuncT))
funptrptr _cb :: UnicodeDecomposeCompatibilityFuncT_WithClosures
_cb ufuncs :: Ptr UnicodeFuncsT
ufuncs u :: Word32
u decomposed :: Word32
decomposed userData :: Ptr ()
userData = do
(ManagedPtr UnicodeFuncsT -> UnicodeFuncsT)
-> Ptr UnicodeFuncsT -> (UnicodeFuncsT -> IO Word32) -> IO Word32
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr UnicodeFuncsT -> UnicodeFuncsT
HarfBuzz.UnicodeFuncsT.UnicodeFuncsT Ptr UnicodeFuncsT
ufuncs ((UnicodeFuncsT -> IO Word32) -> IO Word32)
-> (UnicodeFuncsT -> IO Word32) -> IO Word32
forall a b. (a -> b) -> a -> b
$ \ufuncs' :: UnicodeFuncsT
ufuncs' -> do
Word32
result <- UnicodeDecomposeCompatibilityFuncT_WithClosures
_cb UnicodeFuncsT
ufuncs' Word32
u Word32
decomposed Ptr ()
userData
Maybe (Ptr (FunPtr C_UnicodeDecomposeCompatibilityFuncT)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_UnicodeDecomposeCompatibilityFuncT))
funptrptr
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
type C_UnicodeComposeFuncT =
Ptr HarfBuzz.UnicodeFuncsT.UnicodeFuncsT ->
Word32 ->
Word32 ->
Word32 ->
Ptr () ->
IO Int32
foreign import ccall "dynamic" __dynamic_C_UnicodeComposeFuncT :: FunPtr C_UnicodeComposeFuncT -> C_UnicodeComposeFuncT
dynamic_UnicodeComposeFuncT ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_UnicodeComposeFuncT
-> HarfBuzz.UnicodeFuncsT.UnicodeFuncsT
-> Word32
-> Word32
-> Word32
-> Ptr ()
-> m Int32
dynamic_UnicodeComposeFuncT :: FunPtr C_UnicodeDecomposeFuncT
-> UnicodeFuncsT -> Word32 -> Word32 -> Word32 -> Ptr () -> m Int32
dynamic_UnicodeComposeFuncT __funPtr :: FunPtr C_UnicodeDecomposeFuncT
__funPtr ufuncs :: UnicodeFuncsT
ufuncs a :: Word32
a b :: Word32
b ab :: Word32
ab userData :: Ptr ()
userData = 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
$ do
Ptr UnicodeFuncsT
ufuncs' <- UnicodeFuncsT -> IO (Ptr UnicodeFuncsT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr UnicodeFuncsT
ufuncs
Int32
result <- (FunPtr C_UnicodeDecomposeFuncT -> C_UnicodeDecomposeFuncT
__dynamic_C_UnicodeComposeFuncT FunPtr C_UnicodeDecomposeFuncT
__funPtr) Ptr UnicodeFuncsT
ufuncs' Word32
a Word32
b Word32
ab Ptr ()
userData
UnicodeFuncsT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr UnicodeFuncsT
ufuncs
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
foreign import ccall "wrapper"
mk_UnicodeComposeFuncT :: C_UnicodeComposeFuncT -> IO (FunPtr C_UnicodeComposeFuncT)
type UnicodeComposeFuncT =
HarfBuzz.UnicodeFuncsT.UnicodeFuncsT
-> Word32
-> Word32
-> Word32
-> IO Int32
noUnicodeComposeFuncT :: Maybe UnicodeComposeFuncT
noUnicodeComposeFuncT :: Maybe UnicodeDecomposeFuncT
noUnicodeComposeFuncT = Maybe UnicodeDecomposeFuncT
forall a. Maybe a
Nothing
type UnicodeComposeFuncT_WithClosures =
HarfBuzz.UnicodeFuncsT.UnicodeFuncsT
-> Word32
-> Word32
-> Word32
-> Ptr ()
-> IO Int32
noUnicodeComposeFuncT_WithClosures :: Maybe UnicodeComposeFuncT_WithClosures
noUnicodeComposeFuncT_WithClosures :: Maybe UnicodeDecomposeFuncT_WithClosures
noUnicodeComposeFuncT_WithClosures = Maybe UnicodeDecomposeFuncT_WithClosures
forall a. Maybe a
Nothing
drop_closures_UnicodeComposeFuncT :: UnicodeComposeFuncT -> UnicodeComposeFuncT_WithClosures
drop_closures_UnicodeComposeFuncT :: UnicodeDecomposeFuncT -> UnicodeDecomposeFuncT_WithClosures
drop_closures_UnicodeComposeFuncT _f :: UnicodeDecomposeFuncT
_f ufuncs :: UnicodeFuncsT
ufuncs a :: Word32
a b :: Word32
b ab :: Word32
ab _ = UnicodeDecomposeFuncT
_f UnicodeFuncsT
ufuncs Word32
a Word32
b Word32
ab
genClosure_UnicodeComposeFuncT :: MonadIO m => UnicodeComposeFuncT -> m (GClosure C_UnicodeComposeFuncT)
genClosure_UnicodeComposeFuncT :: UnicodeDecomposeFuncT -> m (GClosure C_UnicodeDecomposeFuncT)
genClosure_UnicodeComposeFuncT cb :: UnicodeDecomposeFuncT
cb = IO (GClosure C_UnicodeDecomposeFuncT)
-> m (GClosure C_UnicodeDecomposeFuncT)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_UnicodeDecomposeFuncT)
-> m (GClosure C_UnicodeDecomposeFuncT))
-> IO (GClosure C_UnicodeDecomposeFuncT)
-> m (GClosure C_UnicodeDecomposeFuncT)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: UnicodeDecomposeFuncT_WithClosures
cb' = UnicodeDecomposeFuncT -> UnicodeDecomposeFuncT_WithClosures
drop_closures_UnicodeComposeFuncT UnicodeDecomposeFuncT
cb
let cb'' :: C_UnicodeDecomposeFuncT
cb'' = Maybe (Ptr (FunPtr C_UnicodeDecomposeFuncT))
-> UnicodeDecomposeFuncT_WithClosures -> C_UnicodeDecomposeFuncT
wrap_UnicodeComposeFuncT Maybe (Ptr (FunPtr C_UnicodeDecomposeFuncT))
forall a. Maybe a
Nothing UnicodeDecomposeFuncT_WithClosures
cb'
C_UnicodeDecomposeFuncT -> IO (FunPtr C_UnicodeDecomposeFuncT)
mk_UnicodeComposeFuncT C_UnicodeDecomposeFuncT
cb'' IO (FunPtr C_UnicodeDecomposeFuncT)
-> (FunPtr C_UnicodeDecomposeFuncT
-> IO (GClosure C_UnicodeDecomposeFuncT))
-> IO (GClosure C_UnicodeDecomposeFuncT)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_UnicodeDecomposeFuncT
-> IO (GClosure C_UnicodeDecomposeFuncT)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_UnicodeComposeFuncT ::
Maybe (Ptr (FunPtr C_UnicodeComposeFuncT)) ->
UnicodeComposeFuncT_WithClosures ->
C_UnicodeComposeFuncT
wrap_UnicodeComposeFuncT :: Maybe (Ptr (FunPtr C_UnicodeDecomposeFuncT))
-> UnicodeDecomposeFuncT_WithClosures -> C_UnicodeDecomposeFuncT
wrap_UnicodeComposeFuncT funptrptr :: Maybe (Ptr (FunPtr C_UnicodeDecomposeFuncT))
funptrptr _cb :: UnicodeDecomposeFuncT_WithClosures
_cb ufuncs :: Ptr UnicodeFuncsT
ufuncs a :: Word32
a b :: Word32
b ab :: Word32
ab userData :: Ptr ()
userData = do
(ManagedPtr UnicodeFuncsT -> UnicodeFuncsT)
-> Ptr UnicodeFuncsT -> (UnicodeFuncsT -> IO Int32) -> IO Int32
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr UnicodeFuncsT -> UnicodeFuncsT
HarfBuzz.UnicodeFuncsT.UnicodeFuncsT Ptr UnicodeFuncsT
ufuncs ((UnicodeFuncsT -> IO Int32) -> IO Int32)
-> (UnicodeFuncsT -> IO Int32) -> IO Int32
forall a b. (a -> b) -> a -> b
$ \ufuncs' :: UnicodeFuncsT
ufuncs' -> do
Int32
result <- UnicodeDecomposeFuncT_WithClosures
_cb UnicodeFuncsT
ufuncs' Word32
a Word32
b Word32
ab Ptr ()
userData
Maybe (Ptr (FunPtr C_UnicodeDecomposeFuncT)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_UnicodeDecomposeFuncT))
funptrptr
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
type C_UnicodeCombiningClassFuncT =
Ptr HarfBuzz.UnicodeFuncsT.UnicodeFuncsT ->
Word32 ->
Ptr () ->
IO CUInt
foreign import ccall "dynamic" __dynamic_C_UnicodeCombiningClassFuncT :: FunPtr C_UnicodeCombiningClassFuncT -> C_UnicodeCombiningClassFuncT
dynamic_UnicodeCombiningClassFuncT ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_UnicodeCombiningClassFuncT
-> HarfBuzz.UnicodeFuncsT.UnicodeFuncsT
-> Word32
-> Ptr ()
-> m HarfBuzz.Enums.UnicodeCombiningClassT
dynamic_UnicodeCombiningClassFuncT :: FunPtr C_UnicodeScriptFuncT
-> UnicodeFuncsT -> Word32 -> Ptr () -> m UnicodeCombiningClassT
dynamic_UnicodeCombiningClassFuncT __funPtr :: FunPtr C_UnicodeScriptFuncT
__funPtr ufuncs :: UnicodeFuncsT
ufuncs unicode :: Word32
unicode userData :: Ptr ()
userData = IO UnicodeCombiningClassT -> m UnicodeCombiningClassT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO UnicodeCombiningClassT -> m UnicodeCombiningClassT)
-> IO UnicodeCombiningClassT -> m UnicodeCombiningClassT
forall a b. (a -> b) -> a -> b
$ do
Ptr UnicodeFuncsT
ufuncs' <- UnicodeFuncsT -> IO (Ptr UnicodeFuncsT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr UnicodeFuncsT
ufuncs
CUInt
result <- (FunPtr C_UnicodeScriptFuncT -> C_UnicodeScriptFuncT
__dynamic_C_UnicodeCombiningClassFuncT FunPtr C_UnicodeScriptFuncT
__funPtr) Ptr UnicodeFuncsT
ufuncs' Word32
unicode Ptr ()
userData
let result' :: UnicodeCombiningClassT
result' = (Int -> UnicodeCombiningClassT
forall a. Enum a => Int -> a
toEnum (Int -> UnicodeCombiningClassT)
-> (CUInt -> Int) -> CUInt -> UnicodeCombiningClassT
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
UnicodeFuncsT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr UnicodeFuncsT
ufuncs
UnicodeCombiningClassT -> IO UnicodeCombiningClassT
forall (m :: * -> *) a. Monad m => a -> m a
return UnicodeCombiningClassT
result'
foreign import ccall "wrapper"
mk_UnicodeCombiningClassFuncT :: C_UnicodeCombiningClassFuncT -> IO (FunPtr C_UnicodeCombiningClassFuncT)
type UnicodeCombiningClassFuncT =
HarfBuzz.UnicodeFuncsT.UnicodeFuncsT
-> Word32
-> IO HarfBuzz.Enums.UnicodeCombiningClassT
noUnicodeCombiningClassFuncT :: Maybe UnicodeCombiningClassFuncT
noUnicodeCombiningClassFuncT :: Maybe UnicodeCombiningClassFuncT
noUnicodeCombiningClassFuncT = Maybe UnicodeCombiningClassFuncT
forall a. Maybe a
Nothing
type UnicodeCombiningClassFuncT_WithClosures =
HarfBuzz.UnicodeFuncsT.UnicodeFuncsT
-> Word32
-> Ptr ()
-> IO HarfBuzz.Enums.UnicodeCombiningClassT
noUnicodeCombiningClassFuncT_WithClosures :: Maybe UnicodeCombiningClassFuncT_WithClosures
noUnicodeCombiningClassFuncT_WithClosures :: Maybe UnicodeCombiningClassFuncT_WithClosures
noUnicodeCombiningClassFuncT_WithClosures = Maybe UnicodeCombiningClassFuncT_WithClosures
forall a. Maybe a
Nothing
drop_closures_UnicodeCombiningClassFuncT :: UnicodeCombiningClassFuncT -> UnicodeCombiningClassFuncT_WithClosures
drop_closures_UnicodeCombiningClassFuncT :: UnicodeCombiningClassFuncT
-> UnicodeCombiningClassFuncT_WithClosures
drop_closures_UnicodeCombiningClassFuncT _f :: UnicodeCombiningClassFuncT
_f ufuncs :: UnicodeFuncsT
ufuncs unicode :: Word32
unicode _ = UnicodeCombiningClassFuncT
_f UnicodeFuncsT
ufuncs Word32
unicode
genClosure_UnicodeCombiningClassFuncT :: MonadIO m => UnicodeCombiningClassFuncT -> m (GClosure C_UnicodeCombiningClassFuncT)
genClosure_UnicodeCombiningClassFuncT :: UnicodeCombiningClassFuncT -> m (GClosure C_UnicodeScriptFuncT)
genClosure_UnicodeCombiningClassFuncT cb :: UnicodeCombiningClassFuncT
cb = IO (GClosure C_UnicodeScriptFuncT)
-> m (GClosure C_UnicodeScriptFuncT)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_UnicodeScriptFuncT)
-> m (GClosure C_UnicodeScriptFuncT))
-> IO (GClosure C_UnicodeScriptFuncT)
-> m (GClosure C_UnicodeScriptFuncT)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: UnicodeCombiningClassFuncT_WithClosures
cb' = UnicodeCombiningClassFuncT
-> UnicodeCombiningClassFuncT_WithClosures
drop_closures_UnicodeCombiningClassFuncT UnicodeCombiningClassFuncT
cb
let cb'' :: C_UnicodeScriptFuncT
cb'' = Maybe (Ptr (FunPtr C_UnicodeScriptFuncT))
-> UnicodeCombiningClassFuncT_WithClosures -> C_UnicodeScriptFuncT
wrap_UnicodeCombiningClassFuncT Maybe (Ptr (FunPtr C_UnicodeScriptFuncT))
forall a. Maybe a
Nothing UnicodeCombiningClassFuncT_WithClosures
cb'
C_UnicodeScriptFuncT -> IO (FunPtr C_UnicodeScriptFuncT)
mk_UnicodeCombiningClassFuncT C_UnicodeScriptFuncT
cb'' IO (FunPtr C_UnicodeScriptFuncT)
-> (FunPtr C_UnicodeScriptFuncT
-> IO (GClosure C_UnicodeScriptFuncT))
-> IO (GClosure C_UnicodeScriptFuncT)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_UnicodeScriptFuncT -> IO (GClosure C_UnicodeScriptFuncT)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_UnicodeCombiningClassFuncT ::
Maybe (Ptr (FunPtr C_UnicodeCombiningClassFuncT)) ->
UnicodeCombiningClassFuncT_WithClosures ->
C_UnicodeCombiningClassFuncT
wrap_UnicodeCombiningClassFuncT :: Maybe (Ptr (FunPtr C_UnicodeScriptFuncT))
-> UnicodeCombiningClassFuncT_WithClosures -> C_UnicodeScriptFuncT
wrap_UnicodeCombiningClassFuncT funptrptr :: Maybe (Ptr (FunPtr C_UnicodeScriptFuncT))
funptrptr _cb :: UnicodeCombiningClassFuncT_WithClosures
_cb ufuncs :: Ptr UnicodeFuncsT
ufuncs unicode :: Word32
unicode userData :: Ptr ()
userData = do
(ManagedPtr UnicodeFuncsT -> UnicodeFuncsT)
-> Ptr UnicodeFuncsT -> (UnicodeFuncsT -> IO CUInt) -> IO CUInt
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr UnicodeFuncsT -> UnicodeFuncsT
HarfBuzz.UnicodeFuncsT.UnicodeFuncsT Ptr UnicodeFuncsT
ufuncs ((UnicodeFuncsT -> IO CUInt) -> IO CUInt)
-> (UnicodeFuncsT -> IO CUInt) -> IO CUInt
forall a b. (a -> b) -> a -> b
$ \ufuncs' :: UnicodeFuncsT
ufuncs' -> do
UnicodeCombiningClassT
result <- UnicodeCombiningClassFuncT_WithClosures
_cb UnicodeFuncsT
ufuncs' Word32
unicode Ptr ()
userData
Maybe (Ptr (FunPtr C_UnicodeScriptFuncT)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_UnicodeScriptFuncT))
funptrptr
let result' :: CUInt
result' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (UnicodeCombiningClassT -> Int)
-> UnicodeCombiningClassT
-> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. UnicodeCombiningClassT -> Int
forall a. Enum a => a -> Int
fromEnum) UnicodeCombiningClassT
result
CUInt -> IO CUInt
forall (m :: * -> *) a. Monad m => a -> m a
return CUInt
result'
type C_ReferenceTableFuncT =
Ptr HarfBuzz.FaceT.FaceT ->
Word32 ->
Ptr () ->
IO (Ptr HarfBuzz.BlobT.BlobT)
foreign import ccall "dynamic" __dynamic_C_ReferenceTableFuncT :: FunPtr C_ReferenceTableFuncT -> C_ReferenceTableFuncT
dynamic_ReferenceTableFuncT ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_ReferenceTableFuncT
-> HarfBuzz.FaceT.FaceT
-> Word32
-> Ptr ()
-> m HarfBuzz.BlobT.BlobT
dynamic_ReferenceTableFuncT :: FunPtr C_ReferenceTableFuncT
-> FaceT -> Word32 -> Ptr () -> m BlobT
dynamic_ReferenceTableFuncT __funPtr :: FunPtr C_ReferenceTableFuncT
__funPtr face :: FaceT
face tag :: Word32
tag userData :: Ptr ()
userData = IO BlobT -> m BlobT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO BlobT -> m BlobT) -> IO BlobT -> m BlobT
forall a b. (a -> b) -> a -> b
$ do
Ptr FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
Ptr BlobT
result <- (FunPtr C_ReferenceTableFuncT -> C_ReferenceTableFuncT
__dynamic_C_ReferenceTableFuncT FunPtr C_ReferenceTableFuncT
__funPtr) Ptr FaceT
face' Word32
tag Ptr ()
userData
Text -> Ptr BlobT -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "referenceTableFuncT" Ptr BlobT
result
BlobT
result' <- ((ManagedPtr BlobT -> BlobT) -> Ptr BlobT -> IO BlobT
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr BlobT -> BlobT
HarfBuzz.BlobT.BlobT) Ptr BlobT
result
FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
BlobT -> IO BlobT
forall (m :: * -> *) a. Monad m => a -> m a
return BlobT
result'
foreign import ccall "wrapper"
mk_ReferenceTableFuncT :: C_ReferenceTableFuncT -> IO (FunPtr C_ReferenceTableFuncT)
type ReferenceTableFuncT =
HarfBuzz.FaceT.FaceT
-> Word32
-> IO HarfBuzz.BlobT.BlobT
noReferenceTableFuncT :: Maybe ReferenceTableFuncT
noReferenceTableFuncT :: Maybe ReferenceTableFuncT
noReferenceTableFuncT = Maybe ReferenceTableFuncT
forall a. Maybe a
Nothing
type ReferenceTableFuncT_WithClosures =
HarfBuzz.FaceT.FaceT
-> Word32
-> Ptr ()
-> IO HarfBuzz.BlobT.BlobT
noReferenceTableFuncT_WithClosures :: Maybe ReferenceTableFuncT_WithClosures
noReferenceTableFuncT_WithClosures :: Maybe ReferenceTableFuncT_WithClosures
noReferenceTableFuncT_WithClosures = Maybe ReferenceTableFuncT_WithClosures
forall a. Maybe a
Nothing
drop_closures_ReferenceTableFuncT :: ReferenceTableFuncT -> ReferenceTableFuncT_WithClosures
drop_closures_ReferenceTableFuncT :: ReferenceTableFuncT -> ReferenceTableFuncT_WithClosures
drop_closures_ReferenceTableFuncT _f :: ReferenceTableFuncT
_f face :: FaceT
face tag :: Word32
tag _ = ReferenceTableFuncT
_f FaceT
face Word32
tag
genClosure_ReferenceTableFuncT :: MonadIO m => ReferenceTableFuncT -> m (GClosure C_ReferenceTableFuncT)
genClosure_ReferenceTableFuncT :: ReferenceTableFuncT -> m (GClosure C_ReferenceTableFuncT)
genClosure_ReferenceTableFuncT cb :: ReferenceTableFuncT
cb = IO (GClosure C_ReferenceTableFuncT)
-> m (GClosure C_ReferenceTableFuncT)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_ReferenceTableFuncT)
-> m (GClosure C_ReferenceTableFuncT))
-> IO (GClosure C_ReferenceTableFuncT)
-> m (GClosure C_ReferenceTableFuncT)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: ReferenceTableFuncT_WithClosures
cb' = ReferenceTableFuncT -> ReferenceTableFuncT_WithClosures
drop_closures_ReferenceTableFuncT ReferenceTableFuncT
cb
let cb'' :: C_ReferenceTableFuncT
cb'' = Maybe (Ptr (FunPtr C_ReferenceTableFuncT))
-> ReferenceTableFuncT_WithClosures -> C_ReferenceTableFuncT
wrap_ReferenceTableFuncT Maybe (Ptr (FunPtr C_ReferenceTableFuncT))
forall a. Maybe a
Nothing ReferenceTableFuncT_WithClosures
cb'
C_ReferenceTableFuncT -> IO (FunPtr C_ReferenceTableFuncT)
mk_ReferenceTableFuncT C_ReferenceTableFuncT
cb'' IO (FunPtr C_ReferenceTableFuncT)
-> (FunPtr C_ReferenceTableFuncT
-> IO (GClosure C_ReferenceTableFuncT))
-> IO (GClosure C_ReferenceTableFuncT)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ReferenceTableFuncT -> IO (GClosure C_ReferenceTableFuncT)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_ReferenceTableFuncT ::
Maybe (Ptr (FunPtr C_ReferenceTableFuncT)) ->
ReferenceTableFuncT_WithClosures ->
C_ReferenceTableFuncT
wrap_ReferenceTableFuncT :: Maybe (Ptr (FunPtr C_ReferenceTableFuncT))
-> ReferenceTableFuncT_WithClosures -> C_ReferenceTableFuncT
wrap_ReferenceTableFuncT funptrptr :: Maybe (Ptr (FunPtr C_ReferenceTableFuncT))
funptrptr _cb :: ReferenceTableFuncT_WithClosures
_cb face :: Ptr FaceT
face tag :: Word32
tag userData :: Ptr ()
userData = do
(ManagedPtr FaceT -> FaceT)
-> Ptr FaceT -> (FaceT -> IO (Ptr BlobT)) -> IO (Ptr BlobT)
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr FaceT -> FaceT
HarfBuzz.FaceT.FaceT Ptr FaceT
face ((FaceT -> IO (Ptr BlobT)) -> IO (Ptr BlobT))
-> (FaceT -> IO (Ptr BlobT)) -> IO (Ptr BlobT)
forall a b. (a -> b) -> a -> b
$ \face' :: FaceT
face' -> do
BlobT
result <- ReferenceTableFuncT_WithClosures
_cb FaceT
face' Word32
tag Ptr ()
userData
Maybe (Ptr (FunPtr C_ReferenceTableFuncT)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_ReferenceTableFuncT))
funptrptr
Ptr BlobT
result' <- BlobT -> IO (Ptr BlobT)
forall a. (HasCallStack, GBoxed a) => a -> IO (Ptr a)
B.ManagedPtr.disownBoxed BlobT
result
Ptr BlobT -> IO (Ptr BlobT)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr BlobT
result'
type C_FontGetVariationGlyphFuncT =
Ptr HarfBuzz.FontT.FontT ->
Ptr () ->
Word32 ->
Word32 ->
Word32 ->
Ptr () ->
IO Int32
foreign import ccall "dynamic" __dynamic_C_FontGetVariationGlyphFuncT :: FunPtr C_FontGetVariationGlyphFuncT -> C_FontGetVariationGlyphFuncT
dynamic_FontGetVariationGlyphFuncT ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_FontGetVariationGlyphFuncT
-> HarfBuzz.FontT.FontT
-> Ptr ()
-> Word32
-> Word32
-> Word32
-> Ptr ()
-> m Int32
dynamic_FontGetVariationGlyphFuncT :: FunPtr C_FontGetVariationGlyphFuncT
-> FontT
-> Ptr ()
-> Word32
-> Word32
-> Word32
-> Ptr ()
-> m Int32
dynamic_FontGetVariationGlyphFuncT __funPtr :: FunPtr C_FontGetVariationGlyphFuncT
__funPtr font :: FontT
font fontData :: Ptr ()
fontData unicode :: Word32
unicode variationSelector :: Word32
variationSelector glyph :: Word32
glyph userData :: Ptr ()
userData = 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
$ do
Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
Int32
result <- (FunPtr C_FontGetVariationGlyphFuncT -> C_FontGetVariationGlyphFuncT
__dynamic_C_FontGetVariationGlyphFuncT FunPtr C_FontGetVariationGlyphFuncT
__funPtr) Ptr FontT
font' Ptr ()
fontData Word32
unicode Word32
variationSelector Word32
glyph Ptr ()
userData
FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
foreign import ccall "wrapper"
mk_FontGetVariationGlyphFuncT :: C_FontGetVariationGlyphFuncT -> IO (FunPtr C_FontGetVariationGlyphFuncT)
type FontGetVariationGlyphFuncT =
HarfBuzz.FontT.FontT
-> Ptr ()
-> Word32
-> Word32
-> Word32
-> IO Int32
noFontGetVariationGlyphFuncT :: Maybe FontGetVariationGlyphFuncT
noFontGetVariationGlyphFuncT :: Maybe FontGetVariationGlyphFuncT
noFontGetVariationGlyphFuncT = Maybe FontGetVariationGlyphFuncT
forall a. Maybe a
Nothing
type FontGetVariationGlyphFuncT_WithClosures =
HarfBuzz.FontT.FontT
-> Ptr ()
-> Word32
-> Word32
-> Word32
-> Ptr ()
-> IO Int32
noFontGetVariationGlyphFuncT_WithClosures :: Maybe FontGetVariationGlyphFuncT_WithClosures
noFontGetVariationGlyphFuncT_WithClosures :: Maybe FontGetVariationGlyphFuncT_WithClosures
noFontGetVariationGlyphFuncT_WithClosures = Maybe FontGetVariationGlyphFuncT_WithClosures
forall a. Maybe a
Nothing
drop_closures_FontGetVariationGlyphFuncT :: FontGetVariationGlyphFuncT -> FontGetVariationGlyphFuncT_WithClosures
drop_closures_FontGetVariationGlyphFuncT :: FontGetVariationGlyphFuncT
-> FontGetVariationGlyphFuncT_WithClosures
drop_closures_FontGetVariationGlyphFuncT _f :: FontGetVariationGlyphFuncT
_f font :: FontT
font fontData :: Ptr ()
fontData unicode :: Word32
unicode variationSelector :: Word32
variationSelector glyph :: Word32
glyph _ = FontGetVariationGlyphFuncT
_f FontT
font Ptr ()
fontData Word32
unicode Word32
variationSelector Word32
glyph
genClosure_FontGetVariationGlyphFuncT :: MonadIO m => FontGetVariationGlyphFuncT -> m (GClosure C_FontGetVariationGlyphFuncT)
genClosure_FontGetVariationGlyphFuncT :: FontGetVariationGlyphFuncT
-> m (GClosure C_FontGetVariationGlyphFuncT)
genClosure_FontGetVariationGlyphFuncT cb :: FontGetVariationGlyphFuncT
cb = IO (GClosure C_FontGetVariationGlyphFuncT)
-> m (GClosure C_FontGetVariationGlyphFuncT)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_FontGetVariationGlyphFuncT)
-> m (GClosure C_FontGetVariationGlyphFuncT))
-> IO (GClosure C_FontGetVariationGlyphFuncT)
-> m (GClosure C_FontGetVariationGlyphFuncT)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: FontGetVariationGlyphFuncT_WithClosures
cb' = FontGetVariationGlyphFuncT
-> FontGetVariationGlyphFuncT_WithClosures
drop_closures_FontGetVariationGlyphFuncT FontGetVariationGlyphFuncT
cb
let cb'' :: C_FontGetVariationGlyphFuncT
cb'' = Maybe (Ptr (FunPtr C_FontGetVariationGlyphFuncT))
-> FontGetVariationGlyphFuncT_WithClosures
-> C_FontGetVariationGlyphFuncT
wrap_FontGetVariationGlyphFuncT Maybe (Ptr (FunPtr C_FontGetVariationGlyphFuncT))
forall a. Maybe a
Nothing FontGetVariationGlyphFuncT_WithClosures
cb'
C_FontGetVariationGlyphFuncT
-> IO (FunPtr C_FontGetVariationGlyphFuncT)
mk_FontGetVariationGlyphFuncT C_FontGetVariationGlyphFuncT
cb'' IO (FunPtr C_FontGetVariationGlyphFuncT)
-> (FunPtr C_FontGetVariationGlyphFuncT
-> IO (GClosure C_FontGetVariationGlyphFuncT))
-> IO (GClosure C_FontGetVariationGlyphFuncT)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_FontGetVariationGlyphFuncT
-> IO (GClosure C_FontGetVariationGlyphFuncT)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_FontGetVariationGlyphFuncT ::
Maybe (Ptr (FunPtr C_FontGetVariationGlyphFuncT)) ->
FontGetVariationGlyphFuncT_WithClosures ->
C_FontGetVariationGlyphFuncT
wrap_FontGetVariationGlyphFuncT :: Maybe (Ptr (FunPtr C_FontGetVariationGlyphFuncT))
-> FontGetVariationGlyphFuncT_WithClosures
-> C_FontGetVariationGlyphFuncT
wrap_FontGetVariationGlyphFuncT funptrptr :: Maybe (Ptr (FunPtr C_FontGetVariationGlyphFuncT))
funptrptr _cb :: FontGetVariationGlyphFuncT_WithClosures
_cb font :: Ptr FontT
font fontData :: Ptr ()
fontData unicode :: Word32
unicode variationSelector :: Word32
variationSelector glyph :: Word32
glyph userData :: Ptr ()
userData = do
(ManagedPtr FontT -> FontT)
-> Ptr FontT -> (FontT -> IO Int32) -> IO Int32
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr FontT -> FontT
HarfBuzz.FontT.FontT Ptr FontT
font ((FontT -> IO Int32) -> IO Int32)
-> (FontT -> IO Int32) -> IO Int32
forall a b. (a -> b) -> a -> b
$ \font' :: FontT
font' -> do
Int32
result <- FontGetVariationGlyphFuncT_WithClosures
_cb FontT
font' Ptr ()
fontData Word32
unicode Word32
variationSelector Word32
glyph Ptr ()
userData
Maybe (Ptr (FunPtr C_FontGetVariationGlyphFuncT)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_FontGetVariationGlyphFuncT))
funptrptr
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
type C_FontGetNominalGlyphsFuncT =
Ptr HarfBuzz.FontT.FontT ->
Ptr () ->
Word32 ->
Word32 ->
Word32 ->
Word32 ->
Word32 ->
Ptr () ->
IO Word32
foreign import ccall "dynamic" __dynamic_C_FontGetNominalGlyphsFuncT :: FunPtr C_FontGetNominalGlyphsFuncT -> C_FontGetNominalGlyphsFuncT
dynamic_FontGetNominalGlyphsFuncT ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_FontGetNominalGlyphsFuncT
-> HarfBuzz.FontT.FontT
-> Ptr ()
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Ptr ()
-> m Word32
dynamic_FontGetNominalGlyphsFuncT :: FunPtr C_FontGetNominalGlyphsFuncT
-> FontT
-> Ptr ()
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Ptr ()
-> m Word32
dynamic_FontGetNominalGlyphsFuncT __funPtr :: FunPtr C_FontGetNominalGlyphsFuncT
__funPtr font :: FontT
font fontData :: Ptr ()
fontData count :: Word32
count firstUnicode :: Word32
firstUnicode unicodeStride :: Word32
unicodeStride firstGlyph :: Word32
firstGlyph glyphStride :: Word32
glyphStride userData :: Ptr ()
userData = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
Word32
result <- (FunPtr C_FontGetNominalGlyphsFuncT -> C_FontGetNominalGlyphsFuncT
__dynamic_C_FontGetNominalGlyphsFuncT FunPtr C_FontGetNominalGlyphsFuncT
__funPtr) Ptr FontT
font' Ptr ()
fontData Word32
count Word32
firstUnicode Word32
unicodeStride Word32
firstGlyph Word32
glyphStride Ptr ()
userData
FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
foreign import ccall "wrapper"
mk_FontGetNominalGlyphsFuncT :: C_FontGetNominalGlyphsFuncT -> IO (FunPtr C_FontGetNominalGlyphsFuncT)
type FontGetNominalGlyphsFuncT =
HarfBuzz.FontT.FontT
-> Ptr ()
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> IO Word32
noFontGetNominalGlyphsFuncT :: Maybe FontGetNominalGlyphsFuncT
noFontGetNominalGlyphsFuncT :: Maybe FontGetNominalGlyphsFuncT
noFontGetNominalGlyphsFuncT = Maybe FontGetNominalGlyphsFuncT
forall a. Maybe a
Nothing
type FontGetNominalGlyphsFuncT_WithClosures =
HarfBuzz.FontT.FontT
-> Ptr ()
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Ptr ()
-> IO Word32
noFontGetNominalGlyphsFuncT_WithClosures :: Maybe FontGetNominalGlyphsFuncT_WithClosures
noFontGetNominalGlyphsFuncT_WithClosures :: Maybe FontGetNominalGlyphsFuncT_WithClosures
noFontGetNominalGlyphsFuncT_WithClosures = Maybe FontGetNominalGlyphsFuncT_WithClosures
forall a. Maybe a
Nothing
drop_closures_FontGetNominalGlyphsFuncT :: FontGetNominalGlyphsFuncT -> FontGetNominalGlyphsFuncT_WithClosures
drop_closures_FontGetNominalGlyphsFuncT :: FontGetNominalGlyphsFuncT -> FontGetNominalGlyphsFuncT_WithClosures
drop_closures_FontGetNominalGlyphsFuncT _f :: FontGetNominalGlyphsFuncT
_f font :: FontT
font fontData :: Ptr ()
fontData count :: Word32
count firstUnicode :: Word32
firstUnicode unicodeStride :: Word32
unicodeStride firstGlyph :: Word32
firstGlyph glyphStride :: Word32
glyphStride _ = FontGetNominalGlyphsFuncT
_f FontT
font Ptr ()
fontData Word32
count Word32
firstUnicode Word32
unicodeStride Word32
firstGlyph Word32
glyphStride
genClosure_FontGetNominalGlyphsFuncT :: MonadIO m => FontGetNominalGlyphsFuncT -> m (GClosure C_FontGetNominalGlyphsFuncT)
genClosure_FontGetNominalGlyphsFuncT :: FontGetNominalGlyphsFuncT
-> m (GClosure C_FontGetNominalGlyphsFuncT)
genClosure_FontGetNominalGlyphsFuncT cb :: FontGetNominalGlyphsFuncT
cb = IO (GClosure C_FontGetNominalGlyphsFuncT)
-> m (GClosure C_FontGetNominalGlyphsFuncT)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_FontGetNominalGlyphsFuncT)
-> m (GClosure C_FontGetNominalGlyphsFuncT))
-> IO (GClosure C_FontGetNominalGlyphsFuncT)
-> m (GClosure C_FontGetNominalGlyphsFuncT)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: FontGetNominalGlyphsFuncT_WithClosures
cb' = FontGetNominalGlyphsFuncT -> FontGetNominalGlyphsFuncT_WithClosures
drop_closures_FontGetNominalGlyphsFuncT FontGetNominalGlyphsFuncT
cb
let cb'' :: C_FontGetNominalGlyphsFuncT
cb'' = Maybe (Ptr (FunPtr C_FontGetNominalGlyphsFuncT))
-> FontGetNominalGlyphsFuncT_WithClosures
-> C_FontGetNominalGlyphsFuncT
wrap_FontGetNominalGlyphsFuncT Maybe (Ptr (FunPtr C_FontGetNominalGlyphsFuncT))
forall a. Maybe a
Nothing FontGetNominalGlyphsFuncT_WithClosures
cb'
C_FontGetNominalGlyphsFuncT
-> IO (FunPtr C_FontGetNominalGlyphsFuncT)
mk_FontGetNominalGlyphsFuncT C_FontGetNominalGlyphsFuncT
cb'' IO (FunPtr C_FontGetNominalGlyphsFuncT)
-> (FunPtr C_FontGetNominalGlyphsFuncT
-> IO (GClosure C_FontGetNominalGlyphsFuncT))
-> IO (GClosure C_FontGetNominalGlyphsFuncT)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_FontGetNominalGlyphsFuncT
-> IO (GClosure C_FontGetNominalGlyphsFuncT)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_FontGetNominalGlyphsFuncT ::
Maybe (Ptr (FunPtr C_FontGetNominalGlyphsFuncT)) ->
FontGetNominalGlyphsFuncT_WithClosures ->
C_FontGetNominalGlyphsFuncT
wrap_FontGetNominalGlyphsFuncT :: Maybe (Ptr (FunPtr C_FontGetNominalGlyphsFuncT))
-> FontGetNominalGlyphsFuncT_WithClosures
-> C_FontGetNominalGlyphsFuncT
wrap_FontGetNominalGlyphsFuncT funptrptr :: Maybe (Ptr (FunPtr C_FontGetNominalGlyphsFuncT))
funptrptr _cb :: FontGetNominalGlyphsFuncT_WithClosures
_cb font :: Ptr FontT
font fontData :: Ptr ()
fontData count :: Word32
count firstUnicode :: Word32
firstUnicode unicodeStride :: Word32
unicodeStride firstGlyph :: Word32
firstGlyph glyphStride :: Word32
glyphStride userData :: Ptr ()
userData = do
(ManagedPtr FontT -> FontT)
-> Ptr FontT -> (FontT -> IO Word32) -> IO Word32
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr FontT -> FontT
HarfBuzz.FontT.FontT Ptr FontT
font ((FontT -> IO Word32) -> IO Word32)
-> (FontT -> IO Word32) -> IO Word32
forall a b. (a -> b) -> a -> b
$ \font' :: FontT
font' -> do
Word32
result <- FontGetNominalGlyphsFuncT_WithClosures
_cb FontT
font' Ptr ()
fontData Word32
count Word32
firstUnicode Word32
unicodeStride Word32
firstGlyph Word32
glyphStride Ptr ()
userData
Maybe (Ptr (FunPtr C_FontGetNominalGlyphsFuncT)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_FontGetNominalGlyphsFuncT))
funptrptr
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
type C_FontGetNominalGlyphFuncT =
Ptr HarfBuzz.FontT.FontT ->
Ptr () ->
Word32 ->
Word32 ->
Ptr () ->
IO Int32
foreign import ccall "dynamic" __dynamic_C_FontGetNominalGlyphFuncT :: FunPtr C_FontGetNominalGlyphFuncT -> C_FontGetNominalGlyphFuncT
dynamic_FontGetNominalGlyphFuncT ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_FontGetNominalGlyphFuncT
-> HarfBuzz.FontT.FontT
-> Ptr ()
-> Word32
-> Word32
-> Ptr ()
-> m Int32
dynamic_FontGetNominalGlyphFuncT :: FunPtr C_FontGetNominalGlyphFuncT
-> FontT -> Ptr () -> Word32 -> Word32 -> Ptr () -> m Int32
dynamic_FontGetNominalGlyphFuncT __funPtr :: FunPtr C_FontGetNominalGlyphFuncT
__funPtr font :: FontT
font fontData :: Ptr ()
fontData unicode :: Word32
unicode glyph :: Word32
glyph userData :: Ptr ()
userData = 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
$ do
Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
Int32
result <- (FunPtr C_FontGetNominalGlyphFuncT -> C_FontGetNominalGlyphFuncT
__dynamic_C_FontGetNominalGlyphFuncT FunPtr C_FontGetNominalGlyphFuncT
__funPtr) Ptr FontT
font' Ptr ()
fontData Word32
unicode Word32
glyph Ptr ()
userData
FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
foreign import ccall "wrapper"
mk_FontGetNominalGlyphFuncT :: C_FontGetNominalGlyphFuncT -> IO (FunPtr C_FontGetNominalGlyphFuncT)
type FontGetNominalGlyphFuncT =
HarfBuzz.FontT.FontT
-> Ptr ()
-> Word32
-> Word32
-> IO Int32
noFontGetNominalGlyphFuncT :: Maybe FontGetNominalGlyphFuncT
noFontGetNominalGlyphFuncT :: Maybe FontGetNominalGlyphFuncT
noFontGetNominalGlyphFuncT = Maybe FontGetNominalGlyphFuncT
forall a. Maybe a
Nothing
type FontGetNominalGlyphFuncT_WithClosures =
HarfBuzz.FontT.FontT
-> Ptr ()
-> Word32
-> Word32
-> Ptr ()
-> IO Int32
noFontGetNominalGlyphFuncT_WithClosures :: Maybe FontGetNominalGlyphFuncT_WithClosures
noFontGetNominalGlyphFuncT_WithClosures :: Maybe FontGetNominalGlyphFuncT_WithClosures
noFontGetNominalGlyphFuncT_WithClosures = Maybe FontGetNominalGlyphFuncT_WithClosures
forall a. Maybe a
Nothing
drop_closures_FontGetNominalGlyphFuncT :: FontGetNominalGlyphFuncT -> FontGetNominalGlyphFuncT_WithClosures
drop_closures_FontGetNominalGlyphFuncT :: FontGetNominalGlyphFuncT -> FontGetNominalGlyphFuncT_WithClosures
drop_closures_FontGetNominalGlyphFuncT _f :: FontGetNominalGlyphFuncT
_f font :: FontT
font fontData :: Ptr ()
fontData unicode :: Word32
unicode glyph :: Word32
glyph _ = FontGetNominalGlyphFuncT
_f FontT
font Ptr ()
fontData Word32
unicode Word32
glyph
genClosure_FontGetNominalGlyphFuncT :: MonadIO m => FontGetNominalGlyphFuncT -> m (GClosure C_FontGetNominalGlyphFuncT)
genClosure_FontGetNominalGlyphFuncT :: FontGetNominalGlyphFuncT -> m (GClosure C_FontGetNominalGlyphFuncT)
genClosure_FontGetNominalGlyphFuncT cb :: FontGetNominalGlyphFuncT
cb = IO (GClosure C_FontGetNominalGlyphFuncT)
-> m (GClosure C_FontGetNominalGlyphFuncT)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_FontGetNominalGlyphFuncT)
-> m (GClosure C_FontGetNominalGlyphFuncT))
-> IO (GClosure C_FontGetNominalGlyphFuncT)
-> m (GClosure C_FontGetNominalGlyphFuncT)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: FontGetNominalGlyphFuncT_WithClosures
cb' = FontGetNominalGlyphFuncT -> FontGetNominalGlyphFuncT_WithClosures
drop_closures_FontGetNominalGlyphFuncT FontGetNominalGlyphFuncT
cb
let cb'' :: C_FontGetNominalGlyphFuncT
cb'' = Maybe (Ptr (FunPtr C_FontGetNominalGlyphFuncT))
-> FontGetNominalGlyphFuncT_WithClosures
-> C_FontGetNominalGlyphFuncT
wrap_FontGetNominalGlyphFuncT Maybe (Ptr (FunPtr C_FontGetNominalGlyphFuncT))
forall a. Maybe a
Nothing FontGetNominalGlyphFuncT_WithClosures
cb'
C_FontGetNominalGlyphFuncT
-> IO (FunPtr C_FontGetNominalGlyphFuncT)
mk_FontGetNominalGlyphFuncT C_FontGetNominalGlyphFuncT
cb'' IO (FunPtr C_FontGetNominalGlyphFuncT)
-> (FunPtr C_FontGetNominalGlyphFuncT
-> IO (GClosure C_FontGetNominalGlyphFuncT))
-> IO (GClosure C_FontGetNominalGlyphFuncT)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_FontGetNominalGlyphFuncT
-> IO (GClosure C_FontGetNominalGlyphFuncT)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_FontGetNominalGlyphFuncT ::
Maybe (Ptr (FunPtr C_FontGetNominalGlyphFuncT)) ->
FontGetNominalGlyphFuncT_WithClosures ->
C_FontGetNominalGlyphFuncT
wrap_FontGetNominalGlyphFuncT :: Maybe (Ptr (FunPtr C_FontGetNominalGlyphFuncT))
-> FontGetNominalGlyphFuncT_WithClosures
-> C_FontGetNominalGlyphFuncT
wrap_FontGetNominalGlyphFuncT funptrptr :: Maybe (Ptr (FunPtr C_FontGetNominalGlyphFuncT))
funptrptr _cb :: FontGetNominalGlyphFuncT_WithClosures
_cb font :: Ptr FontT
font fontData :: Ptr ()
fontData unicode :: Word32
unicode glyph :: Word32
glyph userData :: Ptr ()
userData = do
(ManagedPtr FontT -> FontT)
-> Ptr FontT -> (FontT -> IO Int32) -> IO Int32
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr FontT -> FontT
HarfBuzz.FontT.FontT Ptr FontT
font ((FontT -> IO Int32) -> IO Int32)
-> (FontT -> IO Int32) -> IO Int32
forall a b. (a -> b) -> a -> b
$ \font' :: FontT
font' -> do
Int32
result <- FontGetNominalGlyphFuncT_WithClosures
_cb FontT
font' Ptr ()
fontData Word32
unicode Word32
glyph Ptr ()
userData
Maybe (Ptr (FunPtr C_FontGetNominalGlyphFuncT)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_FontGetNominalGlyphFuncT))
funptrptr
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
type C_FontGetGlyphOriginFuncT =
Ptr HarfBuzz.FontT.FontT ->
Ptr () ->
Word32 ->
Int32 ->
Int32 ->
Ptr () ->
IO Int32
foreign import ccall "dynamic" __dynamic_C_FontGetGlyphOriginFuncT :: FunPtr C_FontGetGlyphOriginFuncT -> C_FontGetGlyphOriginFuncT
dynamic_FontGetGlyphOriginFuncT ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_FontGetGlyphOriginFuncT
-> HarfBuzz.FontT.FontT
-> Ptr ()
-> Word32
-> Int32
-> Int32
-> Ptr ()
-> m Int32
dynamic_FontGetGlyphOriginFuncT :: FunPtr C_FontGetGlyphOriginFuncT
-> FontT -> Ptr () -> Word32 -> Int32 -> Int32 -> Ptr () -> m Int32
dynamic_FontGetGlyphOriginFuncT __funPtr :: FunPtr C_FontGetGlyphOriginFuncT
__funPtr font :: FontT
font fontData :: Ptr ()
fontData glyph :: Word32
glyph x :: Int32
x y :: Int32
y userData :: Ptr ()
userData = 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
$ do
Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
Int32
result <- (FunPtr C_FontGetGlyphOriginFuncT -> C_FontGetGlyphOriginFuncT
__dynamic_C_FontGetGlyphOriginFuncT FunPtr C_FontGetGlyphOriginFuncT
__funPtr) Ptr FontT
font' Ptr ()
fontData Word32
glyph Int32
x Int32
y Ptr ()
userData
FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
foreign import ccall "wrapper"
mk_FontGetGlyphOriginFuncT :: C_FontGetGlyphOriginFuncT -> IO (FunPtr C_FontGetGlyphOriginFuncT)
type FontGetGlyphOriginFuncT =
HarfBuzz.FontT.FontT
-> Ptr ()
-> Word32
-> Int32
-> Int32
-> IO Int32
noFontGetGlyphOriginFuncT :: Maybe FontGetGlyphOriginFuncT
noFontGetGlyphOriginFuncT :: Maybe FontGetGlyphOriginFuncT
noFontGetGlyphOriginFuncT = Maybe FontGetGlyphOriginFuncT
forall a. Maybe a
Nothing
type FontGetGlyphOriginFuncT_WithClosures =
HarfBuzz.FontT.FontT
-> Ptr ()
-> Word32
-> Int32
-> Int32
-> Ptr ()
-> IO Int32
noFontGetGlyphOriginFuncT_WithClosures :: Maybe FontGetGlyphOriginFuncT_WithClosures
noFontGetGlyphOriginFuncT_WithClosures :: Maybe FontGetGlyphOriginFuncT_WithClosures
noFontGetGlyphOriginFuncT_WithClosures = Maybe FontGetGlyphOriginFuncT_WithClosures
forall a. Maybe a
Nothing
drop_closures_FontGetGlyphOriginFuncT :: FontGetGlyphOriginFuncT -> FontGetGlyphOriginFuncT_WithClosures
drop_closures_FontGetGlyphOriginFuncT :: FontGetGlyphOriginFuncT -> FontGetGlyphOriginFuncT_WithClosures
drop_closures_FontGetGlyphOriginFuncT _f :: FontGetGlyphOriginFuncT
_f font :: FontT
font fontData :: Ptr ()
fontData glyph :: Word32
glyph x :: Int32
x y :: Int32
y _ = FontGetGlyphOriginFuncT
_f FontT
font Ptr ()
fontData Word32
glyph Int32
x Int32
y
genClosure_FontGetGlyphOriginFuncT :: MonadIO m => FontGetGlyphOriginFuncT -> m (GClosure C_FontGetGlyphOriginFuncT)
genClosure_FontGetGlyphOriginFuncT :: FontGetGlyphOriginFuncT -> m (GClosure C_FontGetGlyphOriginFuncT)
genClosure_FontGetGlyphOriginFuncT cb :: FontGetGlyphOriginFuncT
cb = IO (GClosure C_FontGetGlyphOriginFuncT)
-> m (GClosure C_FontGetGlyphOriginFuncT)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_FontGetGlyphOriginFuncT)
-> m (GClosure C_FontGetGlyphOriginFuncT))
-> IO (GClosure C_FontGetGlyphOriginFuncT)
-> m (GClosure C_FontGetGlyphOriginFuncT)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: FontGetGlyphOriginFuncT_WithClosures
cb' = FontGetGlyphOriginFuncT -> FontGetGlyphOriginFuncT_WithClosures
drop_closures_FontGetGlyphOriginFuncT FontGetGlyphOriginFuncT
cb
let cb'' :: C_FontGetGlyphOriginFuncT
cb'' = Maybe (Ptr (FunPtr C_FontGetGlyphOriginFuncT))
-> FontGetGlyphOriginFuncT_WithClosures
-> C_FontGetGlyphOriginFuncT
wrap_FontGetGlyphOriginFuncT Maybe (Ptr (FunPtr C_FontGetGlyphOriginFuncT))
forall a. Maybe a
Nothing FontGetGlyphOriginFuncT_WithClosures
cb'
C_FontGetGlyphOriginFuncT -> IO (FunPtr C_FontGetGlyphOriginFuncT)
mk_FontGetGlyphOriginFuncT C_FontGetGlyphOriginFuncT
cb'' IO (FunPtr C_FontGetGlyphOriginFuncT)
-> (FunPtr C_FontGetGlyphOriginFuncT
-> IO (GClosure C_FontGetGlyphOriginFuncT))
-> IO (GClosure C_FontGetGlyphOriginFuncT)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_FontGetGlyphOriginFuncT
-> IO (GClosure C_FontGetGlyphOriginFuncT)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_FontGetGlyphOriginFuncT ::
Maybe (Ptr (FunPtr C_FontGetGlyphOriginFuncT)) ->
FontGetGlyphOriginFuncT_WithClosures ->
C_FontGetGlyphOriginFuncT
wrap_FontGetGlyphOriginFuncT :: Maybe (Ptr (FunPtr C_FontGetGlyphOriginFuncT))
-> FontGetGlyphOriginFuncT_WithClosures
-> C_FontGetGlyphOriginFuncT
wrap_FontGetGlyphOriginFuncT funptrptr :: Maybe (Ptr (FunPtr C_FontGetGlyphOriginFuncT))
funptrptr _cb :: FontGetGlyphOriginFuncT_WithClosures
_cb font :: Ptr FontT
font fontData :: Ptr ()
fontData glyph :: Word32
glyph x :: Int32
x y :: Int32
y userData :: Ptr ()
userData = do
(ManagedPtr FontT -> FontT)
-> Ptr FontT -> (FontT -> IO Int32) -> IO Int32
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr FontT -> FontT
HarfBuzz.FontT.FontT Ptr FontT
font ((FontT -> IO Int32) -> IO Int32)
-> (FontT -> IO Int32) -> IO Int32
forall a b. (a -> b) -> a -> b
$ \font' :: FontT
font' -> do
Int32
result <- FontGetGlyphOriginFuncT_WithClosures
_cb FontT
font' Ptr ()
fontData Word32
glyph Int32
x Int32
y Ptr ()
userData
Maybe (Ptr (FunPtr C_FontGetGlyphOriginFuncT)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_FontGetGlyphOriginFuncT))
funptrptr
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
type C_FontGetGlyphNameFuncT =
Ptr HarfBuzz.FontT.FontT ->
Ptr () ->
Word32 ->
CString ->
Word32 ->
Ptr () ->
IO Int32
foreign import ccall "dynamic" __dynamic_C_FontGetGlyphNameFuncT :: FunPtr C_FontGetGlyphNameFuncT -> C_FontGetGlyphNameFuncT
dynamic_FontGetGlyphNameFuncT ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_FontGetGlyphNameFuncT
-> HarfBuzz.FontT.FontT
-> Ptr ()
-> Word32
-> T.Text
-> Word32
-> Ptr ()
-> m Int32
dynamic_FontGetGlyphNameFuncT :: FunPtr C_FontGetGlyphNameFuncT
-> FontT -> Ptr () -> Word32 -> Text -> Word32 -> Ptr () -> m Int32
dynamic_FontGetGlyphNameFuncT __funPtr :: FunPtr C_FontGetGlyphNameFuncT
__funPtr font :: FontT
font fontData :: Ptr ()
fontData glyph :: Word32
glyph name :: Text
name size :: Word32
size userData :: Ptr ()
userData = 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
$ do
Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
CString
name' <- Text -> IO CString
textToCString Text
name
Int32
result <- (FunPtr C_FontGetGlyphNameFuncT -> C_FontGetGlyphNameFuncT
__dynamic_C_FontGetGlyphNameFuncT FunPtr C_FontGetGlyphNameFuncT
__funPtr) Ptr FontT
font' Ptr ()
fontData Word32
glyph CString
name' Word32
size Ptr ()
userData
FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
foreign import ccall "wrapper"
mk_FontGetGlyphNameFuncT :: C_FontGetGlyphNameFuncT -> IO (FunPtr C_FontGetGlyphNameFuncT)
type FontGetGlyphNameFuncT =
HarfBuzz.FontT.FontT
-> Ptr ()
-> Word32
-> T.Text
-> Word32
-> IO Int32
noFontGetGlyphNameFuncT :: Maybe FontGetGlyphNameFuncT
noFontGetGlyphNameFuncT :: Maybe FontGetGlyphNameFuncT
noFontGetGlyphNameFuncT = Maybe FontGetGlyphNameFuncT
forall a. Maybe a
Nothing
type FontGetGlyphNameFuncT_WithClosures =
HarfBuzz.FontT.FontT
-> Ptr ()
-> Word32
-> T.Text
-> Word32
-> Ptr ()
-> IO Int32
noFontGetGlyphNameFuncT_WithClosures :: Maybe FontGetGlyphNameFuncT_WithClosures
noFontGetGlyphNameFuncT_WithClosures :: Maybe FontGetGlyphNameFuncT_WithClosures
noFontGetGlyphNameFuncT_WithClosures = Maybe FontGetGlyphNameFuncT_WithClosures
forall a. Maybe a
Nothing
drop_closures_FontGetGlyphNameFuncT :: FontGetGlyphNameFuncT -> FontGetGlyphNameFuncT_WithClosures
drop_closures_FontGetGlyphNameFuncT :: FontGetGlyphNameFuncT -> FontGetGlyphNameFuncT_WithClosures
drop_closures_FontGetGlyphNameFuncT _f :: FontGetGlyphNameFuncT
_f font :: FontT
font fontData :: Ptr ()
fontData glyph :: Word32
glyph name :: Text
name size :: Word32
size _ = FontGetGlyphNameFuncT
_f FontT
font Ptr ()
fontData Word32
glyph Text
name Word32
size
genClosure_FontGetGlyphNameFuncT :: MonadIO m => FontGetGlyphNameFuncT -> m (GClosure C_FontGetGlyphNameFuncT)
genClosure_FontGetGlyphNameFuncT :: FontGetGlyphNameFuncT -> m (GClosure C_FontGetGlyphNameFuncT)
genClosure_FontGetGlyphNameFuncT cb :: FontGetGlyphNameFuncT
cb = IO (GClosure C_FontGetGlyphNameFuncT)
-> m (GClosure C_FontGetGlyphNameFuncT)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_FontGetGlyphNameFuncT)
-> m (GClosure C_FontGetGlyphNameFuncT))
-> IO (GClosure C_FontGetGlyphNameFuncT)
-> m (GClosure C_FontGetGlyphNameFuncT)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: FontGetGlyphNameFuncT_WithClosures
cb' = FontGetGlyphNameFuncT -> FontGetGlyphNameFuncT_WithClosures
drop_closures_FontGetGlyphNameFuncT FontGetGlyphNameFuncT
cb
let cb'' :: C_FontGetGlyphNameFuncT
cb'' = Maybe (Ptr (FunPtr C_FontGetGlyphNameFuncT))
-> FontGetGlyphNameFuncT_WithClosures -> C_FontGetGlyphNameFuncT
wrap_FontGetGlyphNameFuncT Maybe (Ptr (FunPtr C_FontGetGlyphNameFuncT))
forall a. Maybe a
Nothing FontGetGlyphNameFuncT_WithClosures
cb'
C_FontGetGlyphNameFuncT -> IO (FunPtr C_FontGetGlyphNameFuncT)
mk_FontGetGlyphNameFuncT C_FontGetGlyphNameFuncT
cb'' IO (FunPtr C_FontGetGlyphNameFuncT)
-> (FunPtr C_FontGetGlyphNameFuncT
-> IO (GClosure C_FontGetGlyphNameFuncT))
-> IO (GClosure C_FontGetGlyphNameFuncT)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_FontGetGlyphNameFuncT
-> IO (GClosure C_FontGetGlyphNameFuncT)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_FontGetGlyphNameFuncT ::
Maybe (Ptr (FunPtr C_FontGetGlyphNameFuncT)) ->
FontGetGlyphNameFuncT_WithClosures ->
C_FontGetGlyphNameFuncT
wrap_FontGetGlyphNameFuncT :: Maybe (Ptr (FunPtr C_FontGetGlyphNameFuncT))
-> FontGetGlyphNameFuncT_WithClosures -> C_FontGetGlyphNameFuncT
wrap_FontGetGlyphNameFuncT funptrptr :: Maybe (Ptr (FunPtr C_FontGetGlyphNameFuncT))
funptrptr _cb :: FontGetGlyphNameFuncT_WithClosures
_cb font :: Ptr FontT
font fontData :: Ptr ()
fontData glyph :: Word32
glyph name :: CString
name size :: Word32
size userData :: Ptr ()
userData = do
(ManagedPtr FontT -> FontT)
-> Ptr FontT -> (FontT -> IO Int32) -> IO Int32
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr FontT -> FontT
HarfBuzz.FontT.FontT Ptr FontT
font ((FontT -> IO Int32) -> IO Int32)
-> (FontT -> IO Int32) -> IO Int32
forall a b. (a -> b) -> a -> b
$ \font' :: FontT
font' -> do
Text
name' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
name
Int32
result <- FontGetGlyphNameFuncT_WithClosures
_cb FontT
font' Ptr ()
fontData Word32
glyph Text
name' Word32
size Ptr ()
userData
Maybe (Ptr (FunPtr C_FontGetGlyphNameFuncT)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_FontGetGlyphNameFuncT))
funptrptr
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
type C_FontGetGlyphKerningFuncT =
Ptr HarfBuzz.FontT.FontT ->
Ptr () ->
Word32 ->
Word32 ->
Ptr () ->
IO Int32
foreign import ccall "dynamic" __dynamic_C_FontGetGlyphKerningFuncT :: FunPtr C_FontGetGlyphKerningFuncT -> C_FontGetGlyphKerningFuncT
dynamic_FontGetGlyphKerningFuncT ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_FontGetGlyphKerningFuncT
-> HarfBuzz.FontT.FontT
-> Ptr ()
-> Word32
-> Word32
-> Ptr ()
-> m Int32
dynamic_FontGetGlyphKerningFuncT :: FunPtr C_FontGetNominalGlyphFuncT
-> FontT -> Ptr () -> Word32 -> Word32 -> Ptr () -> m Int32
dynamic_FontGetGlyphKerningFuncT __funPtr :: FunPtr C_FontGetNominalGlyphFuncT
__funPtr font :: FontT
font fontData :: Ptr ()
fontData firstGlyph :: Word32
firstGlyph secondGlyph :: Word32
secondGlyph userData :: Ptr ()
userData = 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
$ do
Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
Int32
result <- (FunPtr C_FontGetNominalGlyphFuncT -> C_FontGetNominalGlyphFuncT
__dynamic_C_FontGetGlyphKerningFuncT FunPtr C_FontGetNominalGlyphFuncT
__funPtr) Ptr FontT
font' Ptr ()
fontData Word32
firstGlyph Word32
secondGlyph Ptr ()
userData
FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
foreign import ccall "wrapper"
mk_FontGetGlyphKerningFuncT :: C_FontGetGlyphKerningFuncT -> IO (FunPtr C_FontGetGlyphKerningFuncT)
type FontGetGlyphKerningFuncT =
HarfBuzz.FontT.FontT
-> Ptr ()
-> Word32
-> Word32
-> IO Int32
noFontGetGlyphKerningFuncT :: Maybe FontGetGlyphKerningFuncT
noFontGetGlyphKerningFuncT :: Maybe FontGetNominalGlyphFuncT
noFontGetGlyphKerningFuncT = Maybe FontGetNominalGlyphFuncT
forall a. Maybe a
Nothing
type FontGetGlyphKerningFuncT_WithClosures =
HarfBuzz.FontT.FontT
-> Ptr ()
-> Word32
-> Word32
-> Ptr ()
-> IO Int32
noFontGetGlyphKerningFuncT_WithClosures :: Maybe FontGetGlyphKerningFuncT_WithClosures
noFontGetGlyphKerningFuncT_WithClosures :: Maybe FontGetNominalGlyphFuncT_WithClosures
noFontGetGlyphKerningFuncT_WithClosures = Maybe FontGetNominalGlyphFuncT_WithClosures
forall a. Maybe a
Nothing
drop_closures_FontGetGlyphKerningFuncT :: FontGetGlyphKerningFuncT -> FontGetGlyphKerningFuncT_WithClosures
drop_closures_FontGetGlyphKerningFuncT :: FontGetNominalGlyphFuncT -> FontGetNominalGlyphFuncT_WithClosures
drop_closures_FontGetGlyphKerningFuncT _f :: FontGetNominalGlyphFuncT
_f font :: FontT
font fontData :: Ptr ()
fontData firstGlyph :: Word32
firstGlyph secondGlyph :: Word32
secondGlyph _ = FontGetNominalGlyphFuncT
_f FontT
font Ptr ()
fontData Word32
firstGlyph Word32
secondGlyph
genClosure_FontGetGlyphKerningFuncT :: MonadIO m => FontGetGlyphKerningFuncT -> m (GClosure C_FontGetGlyphKerningFuncT)
genClosure_FontGetGlyphKerningFuncT :: FontGetNominalGlyphFuncT -> m (GClosure C_FontGetNominalGlyphFuncT)
genClosure_FontGetGlyphKerningFuncT cb :: FontGetNominalGlyphFuncT
cb = IO (GClosure C_FontGetNominalGlyphFuncT)
-> m (GClosure C_FontGetNominalGlyphFuncT)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_FontGetNominalGlyphFuncT)
-> m (GClosure C_FontGetNominalGlyphFuncT))
-> IO (GClosure C_FontGetNominalGlyphFuncT)
-> m (GClosure C_FontGetNominalGlyphFuncT)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: FontGetNominalGlyphFuncT_WithClosures
cb' = FontGetNominalGlyphFuncT -> FontGetNominalGlyphFuncT_WithClosures
drop_closures_FontGetGlyphKerningFuncT FontGetNominalGlyphFuncT
cb
let cb'' :: C_FontGetNominalGlyphFuncT
cb'' = Maybe (Ptr (FunPtr C_FontGetNominalGlyphFuncT))
-> FontGetNominalGlyphFuncT_WithClosures
-> C_FontGetNominalGlyphFuncT
wrap_FontGetGlyphKerningFuncT Maybe (Ptr (FunPtr C_FontGetNominalGlyphFuncT))
forall a. Maybe a
Nothing FontGetNominalGlyphFuncT_WithClosures
cb'
C_FontGetNominalGlyphFuncT
-> IO (FunPtr C_FontGetNominalGlyphFuncT)
mk_FontGetGlyphKerningFuncT C_FontGetNominalGlyphFuncT
cb'' IO (FunPtr C_FontGetNominalGlyphFuncT)
-> (FunPtr C_FontGetNominalGlyphFuncT
-> IO (GClosure C_FontGetNominalGlyphFuncT))
-> IO (GClosure C_FontGetNominalGlyphFuncT)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_FontGetNominalGlyphFuncT
-> IO (GClosure C_FontGetNominalGlyphFuncT)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_FontGetGlyphKerningFuncT ::
Maybe (Ptr (FunPtr C_FontGetGlyphKerningFuncT)) ->
FontGetGlyphKerningFuncT_WithClosures ->
C_FontGetGlyphKerningFuncT
wrap_FontGetGlyphKerningFuncT :: Maybe (Ptr (FunPtr C_FontGetNominalGlyphFuncT))
-> FontGetNominalGlyphFuncT_WithClosures
-> C_FontGetNominalGlyphFuncT
wrap_FontGetGlyphKerningFuncT funptrptr :: Maybe (Ptr (FunPtr C_FontGetNominalGlyphFuncT))
funptrptr _cb :: FontGetNominalGlyphFuncT_WithClosures
_cb font :: Ptr FontT
font fontData :: Ptr ()
fontData firstGlyph :: Word32
firstGlyph secondGlyph :: Word32
secondGlyph userData :: Ptr ()
userData = do
(ManagedPtr FontT -> FontT)
-> Ptr FontT -> (FontT -> IO Int32) -> IO Int32
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr FontT -> FontT
HarfBuzz.FontT.FontT Ptr FontT
font ((FontT -> IO Int32) -> IO Int32)
-> (FontT -> IO Int32) -> IO Int32
forall a b. (a -> b) -> a -> b
$ \font' :: FontT
font' -> do
Int32
result <- FontGetNominalGlyphFuncT_WithClosures
_cb FontT
font' Ptr ()
fontData Word32
firstGlyph Word32
secondGlyph Ptr ()
userData
Maybe (Ptr (FunPtr C_FontGetNominalGlyphFuncT)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_FontGetNominalGlyphFuncT))
funptrptr
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
type C_FontGetGlyphFuncT =
Ptr HarfBuzz.FontT.FontT ->
Ptr () ->
Word32 ->
Word32 ->
Word32 ->
Ptr () ->
IO Int32
foreign import ccall "dynamic" __dynamic_C_FontGetGlyphFuncT :: FunPtr C_FontGetGlyphFuncT -> C_FontGetGlyphFuncT
dynamic_FontGetGlyphFuncT ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_FontGetGlyphFuncT
-> HarfBuzz.FontT.FontT
-> Ptr ()
-> Word32
-> Word32
-> Word32
-> Ptr ()
-> m Int32
dynamic_FontGetGlyphFuncT :: FunPtr C_FontGetVariationGlyphFuncT
-> FontT
-> Ptr ()
-> Word32
-> Word32
-> Word32
-> Ptr ()
-> m Int32
dynamic_FontGetGlyphFuncT __funPtr :: FunPtr C_FontGetVariationGlyphFuncT
__funPtr font :: FontT
font fontData :: Ptr ()
fontData unicode :: Word32
unicode variationSelector :: Word32
variationSelector glyph :: Word32
glyph userData :: Ptr ()
userData = 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
$ do
Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
Int32
result <- (FunPtr C_FontGetVariationGlyphFuncT -> C_FontGetVariationGlyphFuncT
__dynamic_C_FontGetGlyphFuncT FunPtr C_FontGetVariationGlyphFuncT
__funPtr) Ptr FontT
font' Ptr ()
fontData Word32
unicode Word32
variationSelector Word32
glyph Ptr ()
userData
FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
foreign import ccall "wrapper"
mk_FontGetGlyphFuncT :: C_FontGetGlyphFuncT -> IO (FunPtr C_FontGetGlyphFuncT)
type FontGetGlyphFuncT =
HarfBuzz.FontT.FontT
-> Ptr ()
-> Word32
-> Word32
-> Word32
-> IO Int32
noFontGetGlyphFuncT :: Maybe FontGetGlyphFuncT
noFontGetGlyphFuncT :: Maybe FontGetVariationGlyphFuncT
noFontGetGlyphFuncT = Maybe FontGetVariationGlyphFuncT
forall a. Maybe a
Nothing
type FontGetGlyphFuncT_WithClosures =
HarfBuzz.FontT.FontT
-> Ptr ()
-> Word32
-> Word32
-> Word32
-> Ptr ()
-> IO Int32
noFontGetGlyphFuncT_WithClosures :: Maybe FontGetGlyphFuncT_WithClosures
noFontGetGlyphFuncT_WithClosures :: Maybe FontGetVariationGlyphFuncT_WithClosures
noFontGetGlyphFuncT_WithClosures = Maybe FontGetVariationGlyphFuncT_WithClosures
forall a. Maybe a
Nothing
drop_closures_FontGetGlyphFuncT :: FontGetGlyphFuncT -> FontGetGlyphFuncT_WithClosures
drop_closures_FontGetGlyphFuncT :: FontGetVariationGlyphFuncT
-> FontGetVariationGlyphFuncT_WithClosures
drop_closures_FontGetGlyphFuncT _f :: FontGetVariationGlyphFuncT
_f font :: FontT
font fontData :: Ptr ()
fontData unicode :: Word32
unicode variationSelector :: Word32
variationSelector glyph :: Word32
glyph _ = FontGetVariationGlyphFuncT
_f FontT
font Ptr ()
fontData Word32
unicode Word32
variationSelector Word32
glyph
genClosure_FontGetGlyphFuncT :: MonadIO m => FontGetGlyphFuncT -> m (GClosure C_FontGetGlyphFuncT)
genClosure_FontGetGlyphFuncT :: FontGetVariationGlyphFuncT
-> m (GClosure C_FontGetVariationGlyphFuncT)
genClosure_FontGetGlyphFuncT cb :: FontGetVariationGlyphFuncT
cb = IO (GClosure C_FontGetVariationGlyphFuncT)
-> m (GClosure C_FontGetVariationGlyphFuncT)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_FontGetVariationGlyphFuncT)
-> m (GClosure C_FontGetVariationGlyphFuncT))
-> IO (GClosure C_FontGetVariationGlyphFuncT)
-> m (GClosure C_FontGetVariationGlyphFuncT)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: FontGetVariationGlyphFuncT_WithClosures
cb' = FontGetVariationGlyphFuncT
-> FontGetVariationGlyphFuncT_WithClosures
drop_closures_FontGetGlyphFuncT FontGetVariationGlyphFuncT
cb
let cb'' :: C_FontGetVariationGlyphFuncT
cb'' = Maybe (Ptr (FunPtr C_FontGetVariationGlyphFuncT))
-> FontGetVariationGlyphFuncT_WithClosures
-> C_FontGetVariationGlyphFuncT
wrap_FontGetGlyphFuncT Maybe (Ptr (FunPtr C_FontGetVariationGlyphFuncT))
forall a. Maybe a
Nothing FontGetVariationGlyphFuncT_WithClosures
cb'
C_FontGetVariationGlyphFuncT
-> IO (FunPtr C_FontGetVariationGlyphFuncT)
mk_FontGetGlyphFuncT C_FontGetVariationGlyphFuncT
cb'' IO (FunPtr C_FontGetVariationGlyphFuncT)
-> (FunPtr C_FontGetVariationGlyphFuncT
-> IO (GClosure C_FontGetVariationGlyphFuncT))
-> IO (GClosure C_FontGetVariationGlyphFuncT)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_FontGetVariationGlyphFuncT
-> IO (GClosure C_FontGetVariationGlyphFuncT)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_FontGetGlyphFuncT ::
Maybe (Ptr (FunPtr C_FontGetGlyphFuncT)) ->
FontGetGlyphFuncT_WithClosures ->
C_FontGetGlyphFuncT
wrap_FontGetGlyphFuncT :: Maybe (Ptr (FunPtr C_FontGetVariationGlyphFuncT))
-> FontGetVariationGlyphFuncT_WithClosures
-> C_FontGetVariationGlyphFuncT
wrap_FontGetGlyphFuncT funptrptr :: Maybe (Ptr (FunPtr C_FontGetVariationGlyphFuncT))
funptrptr _cb :: FontGetVariationGlyphFuncT_WithClosures
_cb font :: Ptr FontT
font fontData :: Ptr ()
fontData unicode :: Word32
unicode variationSelector :: Word32
variationSelector glyph :: Word32
glyph userData :: Ptr ()
userData = do
(ManagedPtr FontT -> FontT)
-> Ptr FontT -> (FontT -> IO Int32) -> IO Int32
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr FontT -> FontT
HarfBuzz.FontT.FontT Ptr FontT
font ((FontT -> IO Int32) -> IO Int32)
-> (FontT -> IO Int32) -> IO Int32
forall a b. (a -> b) -> a -> b
$ \font' :: FontT
font' -> do
Int32
result <- FontGetVariationGlyphFuncT_WithClosures
_cb FontT
font' Ptr ()
fontData Word32
unicode Word32
variationSelector Word32
glyph Ptr ()
userData
Maybe (Ptr (FunPtr C_FontGetVariationGlyphFuncT)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_FontGetVariationGlyphFuncT))
funptrptr
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
type C_FontGetGlyphFromNameFuncT =
Ptr HarfBuzz.FontT.FontT ->
Ptr () ->
CString ->
Int32 ->
Word32 ->
Ptr () ->
IO Int32
foreign import ccall "dynamic" __dynamic_C_FontGetGlyphFromNameFuncT :: FunPtr C_FontGetGlyphFromNameFuncT -> C_FontGetGlyphFromNameFuncT
dynamic_FontGetGlyphFromNameFuncT ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_FontGetGlyphFromNameFuncT
-> HarfBuzz.FontT.FontT
-> Ptr ()
-> T.Text
-> Int32
-> Word32
-> Ptr ()
-> m Int32
dynamic_FontGetGlyphFromNameFuncT :: FunPtr C_FontGetGlyphFromNameFuncT
-> FontT -> Ptr () -> Text -> Int32 -> Word32 -> Ptr () -> m Int32
dynamic_FontGetGlyphFromNameFuncT __funPtr :: FunPtr C_FontGetGlyphFromNameFuncT
__funPtr font :: FontT
font fontData :: Ptr ()
fontData name :: Text
name len :: Int32
len glyph :: Word32
glyph userData :: Ptr ()
userData = 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
$ do
Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
CString
name' <- Text -> IO CString
textToCString Text
name
Int32
result <- (FunPtr C_FontGetGlyphFromNameFuncT -> C_FontGetGlyphFromNameFuncT
__dynamic_C_FontGetGlyphFromNameFuncT FunPtr C_FontGetGlyphFromNameFuncT
__funPtr) Ptr FontT
font' Ptr ()
fontData CString
name' Int32
len Word32
glyph Ptr ()
userData
FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
foreign import ccall "wrapper"
mk_FontGetGlyphFromNameFuncT :: C_FontGetGlyphFromNameFuncT -> IO (FunPtr C_FontGetGlyphFromNameFuncT)
type FontGetGlyphFromNameFuncT =
HarfBuzz.FontT.FontT
-> Ptr ()
-> T.Text
-> Int32
-> Word32
-> IO Int32
noFontGetGlyphFromNameFuncT :: Maybe FontGetGlyphFromNameFuncT
noFontGetGlyphFromNameFuncT :: Maybe FontGetGlyphFromNameFuncT
noFontGetGlyphFromNameFuncT = Maybe FontGetGlyphFromNameFuncT
forall a. Maybe a
Nothing
type FontGetGlyphFromNameFuncT_WithClosures =
HarfBuzz.FontT.FontT
-> Ptr ()
-> T.Text
-> Int32
-> Word32
-> Ptr ()
-> IO Int32
noFontGetGlyphFromNameFuncT_WithClosures :: Maybe FontGetGlyphFromNameFuncT_WithClosures
noFontGetGlyphFromNameFuncT_WithClosures :: Maybe FontGetGlyphFromNameFuncT_WithClosures
noFontGetGlyphFromNameFuncT_WithClosures = Maybe FontGetGlyphFromNameFuncT_WithClosures
forall a. Maybe a
Nothing
drop_closures_FontGetGlyphFromNameFuncT :: FontGetGlyphFromNameFuncT -> FontGetGlyphFromNameFuncT_WithClosures
drop_closures_FontGetGlyphFromNameFuncT :: FontGetGlyphFromNameFuncT -> FontGetGlyphFromNameFuncT_WithClosures
drop_closures_FontGetGlyphFromNameFuncT _f :: FontGetGlyphFromNameFuncT
_f font :: FontT
font fontData :: Ptr ()
fontData name :: Text
name len :: Int32
len glyph :: Word32
glyph _ = FontGetGlyphFromNameFuncT
_f FontT
font Ptr ()
fontData Text
name Int32
len Word32
glyph
genClosure_FontGetGlyphFromNameFuncT :: MonadIO m => FontGetGlyphFromNameFuncT -> m (GClosure C_FontGetGlyphFromNameFuncT)
genClosure_FontGetGlyphFromNameFuncT :: FontGetGlyphFromNameFuncT
-> m (GClosure C_FontGetGlyphFromNameFuncT)
genClosure_FontGetGlyphFromNameFuncT cb :: FontGetGlyphFromNameFuncT
cb = IO (GClosure C_FontGetGlyphFromNameFuncT)
-> m (GClosure C_FontGetGlyphFromNameFuncT)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_FontGetGlyphFromNameFuncT)
-> m (GClosure C_FontGetGlyphFromNameFuncT))
-> IO (GClosure C_FontGetGlyphFromNameFuncT)
-> m (GClosure C_FontGetGlyphFromNameFuncT)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: FontGetGlyphFromNameFuncT_WithClosures
cb' = FontGetGlyphFromNameFuncT -> FontGetGlyphFromNameFuncT_WithClosures
drop_closures_FontGetGlyphFromNameFuncT FontGetGlyphFromNameFuncT
cb
let cb'' :: C_FontGetGlyphFromNameFuncT
cb'' = Maybe (Ptr (FunPtr C_FontGetGlyphFromNameFuncT))
-> FontGetGlyphFromNameFuncT_WithClosures
-> C_FontGetGlyphFromNameFuncT
wrap_FontGetGlyphFromNameFuncT Maybe (Ptr (FunPtr C_FontGetGlyphFromNameFuncT))
forall a. Maybe a
Nothing FontGetGlyphFromNameFuncT_WithClosures
cb'
C_FontGetGlyphFromNameFuncT
-> IO (FunPtr C_FontGetGlyphFromNameFuncT)
mk_FontGetGlyphFromNameFuncT C_FontGetGlyphFromNameFuncT
cb'' IO (FunPtr C_FontGetGlyphFromNameFuncT)
-> (FunPtr C_FontGetGlyphFromNameFuncT
-> IO (GClosure C_FontGetGlyphFromNameFuncT))
-> IO (GClosure C_FontGetGlyphFromNameFuncT)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_FontGetGlyphFromNameFuncT
-> IO (GClosure C_FontGetGlyphFromNameFuncT)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_FontGetGlyphFromNameFuncT ::
Maybe (Ptr (FunPtr C_FontGetGlyphFromNameFuncT)) ->
FontGetGlyphFromNameFuncT_WithClosures ->
C_FontGetGlyphFromNameFuncT
wrap_FontGetGlyphFromNameFuncT :: Maybe (Ptr (FunPtr C_FontGetGlyphFromNameFuncT))
-> FontGetGlyphFromNameFuncT_WithClosures
-> C_FontGetGlyphFromNameFuncT
wrap_FontGetGlyphFromNameFuncT funptrptr :: Maybe (Ptr (FunPtr C_FontGetGlyphFromNameFuncT))
funptrptr _cb :: FontGetGlyphFromNameFuncT_WithClosures
_cb font :: Ptr FontT
font fontData :: Ptr ()
fontData name :: CString
name len :: Int32
len glyph :: Word32
glyph userData :: Ptr ()
userData = do
(ManagedPtr FontT -> FontT)
-> Ptr FontT -> (FontT -> IO Int32) -> IO Int32
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr FontT -> FontT
HarfBuzz.FontT.FontT Ptr FontT
font ((FontT -> IO Int32) -> IO Int32)
-> (FontT -> IO Int32) -> IO Int32
forall a b. (a -> b) -> a -> b
$ \font' :: FontT
font' -> do
Text
name' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
name
Int32
result <- FontGetGlyphFromNameFuncT_WithClosures
_cb FontT
font' Ptr ()
fontData Text
name' Int32
len Word32
glyph Ptr ()
userData
Maybe (Ptr (FunPtr C_FontGetGlyphFromNameFuncT)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_FontGetGlyphFromNameFuncT))
funptrptr
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
type C_FontGetGlyphExtentsFuncT =
Ptr HarfBuzz.FontT.FontT ->
Ptr () ->
Word32 ->
Ptr HarfBuzz.GlyphExtentsT.GlyphExtentsT ->
Ptr () ->
IO Int32
foreign import ccall "dynamic" __dynamic_C_FontGetGlyphExtentsFuncT :: FunPtr C_FontGetGlyphExtentsFuncT -> C_FontGetGlyphExtentsFuncT
dynamic_FontGetGlyphExtentsFuncT ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_FontGetGlyphExtentsFuncT
-> HarfBuzz.FontT.FontT
-> Ptr ()
-> Word32
-> HarfBuzz.GlyphExtentsT.GlyphExtentsT
-> Ptr ()
-> m Int32
dynamic_FontGetGlyphExtentsFuncT :: FunPtr C_FontGetGlyphExtentsFuncT
-> FontT -> Ptr () -> Word32 -> GlyphExtentsT -> Ptr () -> m Int32
dynamic_FontGetGlyphExtentsFuncT __funPtr :: FunPtr C_FontGetGlyphExtentsFuncT
__funPtr font :: FontT
font fontData :: Ptr ()
fontData glyph :: Word32
glyph extents :: GlyphExtentsT
extents userData :: Ptr ()
userData = 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
$ do
Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
Ptr GlyphExtentsT
extents' <- GlyphExtentsT -> IO (Ptr GlyphExtentsT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GlyphExtentsT
extents
Int32
result <- (FunPtr C_FontGetGlyphExtentsFuncT -> C_FontGetGlyphExtentsFuncT
__dynamic_C_FontGetGlyphExtentsFuncT FunPtr C_FontGetGlyphExtentsFuncT
__funPtr) Ptr FontT
font' Ptr ()
fontData Word32
glyph Ptr GlyphExtentsT
extents' Ptr ()
userData
FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
GlyphExtentsT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GlyphExtentsT
extents
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
foreign import ccall "wrapper"
mk_FontGetGlyphExtentsFuncT :: C_FontGetGlyphExtentsFuncT -> IO (FunPtr C_FontGetGlyphExtentsFuncT)
type FontGetGlyphExtentsFuncT =
HarfBuzz.FontT.FontT
-> Ptr ()
-> Word32
-> HarfBuzz.GlyphExtentsT.GlyphExtentsT
-> IO Int32
noFontGetGlyphExtentsFuncT :: Maybe FontGetGlyphExtentsFuncT
noFontGetGlyphExtentsFuncT :: Maybe FontGetGlyphExtentsFuncT
noFontGetGlyphExtentsFuncT = Maybe FontGetGlyphExtentsFuncT
forall a. Maybe a
Nothing
type FontGetGlyphExtentsFuncT_WithClosures =
HarfBuzz.FontT.FontT
-> Ptr ()
-> Word32
-> HarfBuzz.GlyphExtentsT.GlyphExtentsT
-> Ptr ()
-> IO Int32
noFontGetGlyphExtentsFuncT_WithClosures :: Maybe FontGetGlyphExtentsFuncT_WithClosures
noFontGetGlyphExtentsFuncT_WithClosures :: Maybe FontGetGlyphExtentsFuncT_WithClosures
noFontGetGlyphExtentsFuncT_WithClosures = Maybe FontGetGlyphExtentsFuncT_WithClosures
forall a. Maybe a
Nothing
drop_closures_FontGetGlyphExtentsFuncT :: FontGetGlyphExtentsFuncT -> FontGetGlyphExtentsFuncT_WithClosures
drop_closures_FontGetGlyphExtentsFuncT :: FontGetGlyphExtentsFuncT -> FontGetGlyphExtentsFuncT_WithClosures
drop_closures_FontGetGlyphExtentsFuncT _f :: FontGetGlyphExtentsFuncT
_f font :: FontT
font fontData :: Ptr ()
fontData glyph :: Word32
glyph extents :: GlyphExtentsT
extents _ = FontGetGlyphExtentsFuncT
_f FontT
font Ptr ()
fontData Word32
glyph GlyphExtentsT
extents
genClosure_FontGetGlyphExtentsFuncT :: MonadIO m => FontGetGlyphExtentsFuncT -> m (GClosure C_FontGetGlyphExtentsFuncT)
genClosure_FontGetGlyphExtentsFuncT :: FontGetGlyphExtentsFuncT -> m (GClosure C_FontGetGlyphExtentsFuncT)
genClosure_FontGetGlyphExtentsFuncT cb :: FontGetGlyphExtentsFuncT
cb = IO (GClosure C_FontGetGlyphExtentsFuncT)
-> m (GClosure C_FontGetGlyphExtentsFuncT)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_FontGetGlyphExtentsFuncT)
-> m (GClosure C_FontGetGlyphExtentsFuncT))
-> IO (GClosure C_FontGetGlyphExtentsFuncT)
-> m (GClosure C_FontGetGlyphExtentsFuncT)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: FontGetGlyphExtentsFuncT_WithClosures
cb' = FontGetGlyphExtentsFuncT -> FontGetGlyphExtentsFuncT_WithClosures
drop_closures_FontGetGlyphExtentsFuncT FontGetGlyphExtentsFuncT
cb
let cb'' :: C_FontGetGlyphExtentsFuncT
cb'' = Maybe (Ptr (FunPtr C_FontGetGlyphExtentsFuncT))
-> FontGetGlyphExtentsFuncT_WithClosures
-> C_FontGetGlyphExtentsFuncT
wrap_FontGetGlyphExtentsFuncT Maybe (Ptr (FunPtr C_FontGetGlyphExtentsFuncT))
forall a. Maybe a
Nothing FontGetGlyphExtentsFuncT_WithClosures
cb'
C_FontGetGlyphExtentsFuncT
-> IO (FunPtr C_FontGetGlyphExtentsFuncT)
mk_FontGetGlyphExtentsFuncT C_FontGetGlyphExtentsFuncT
cb'' IO (FunPtr C_FontGetGlyphExtentsFuncT)
-> (FunPtr C_FontGetGlyphExtentsFuncT
-> IO (GClosure C_FontGetGlyphExtentsFuncT))
-> IO (GClosure C_FontGetGlyphExtentsFuncT)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_FontGetGlyphExtentsFuncT
-> IO (GClosure C_FontGetGlyphExtentsFuncT)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_FontGetGlyphExtentsFuncT ::
Maybe (Ptr (FunPtr C_FontGetGlyphExtentsFuncT)) ->
FontGetGlyphExtentsFuncT_WithClosures ->
C_FontGetGlyphExtentsFuncT
wrap_FontGetGlyphExtentsFuncT :: Maybe (Ptr (FunPtr C_FontGetGlyphExtentsFuncT))
-> FontGetGlyphExtentsFuncT_WithClosures
-> C_FontGetGlyphExtentsFuncT
wrap_FontGetGlyphExtentsFuncT funptrptr :: Maybe (Ptr (FunPtr C_FontGetGlyphExtentsFuncT))
funptrptr _cb :: FontGetGlyphExtentsFuncT_WithClosures
_cb font :: Ptr FontT
font fontData :: Ptr ()
fontData glyph :: Word32
glyph extents :: Ptr GlyphExtentsT
extents userData :: Ptr ()
userData = do
(ManagedPtr FontT -> FontT)
-> Ptr FontT -> (FontT -> IO Int32) -> IO Int32
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr FontT -> FontT
HarfBuzz.FontT.FontT Ptr FontT
font ((FontT -> IO Int32) -> IO Int32)
-> (FontT -> IO Int32) -> IO Int32
forall a b. (a -> b) -> a -> b
$ \font' :: FontT
font' -> do
GlyphExtentsT
extents' <- ((ManagedPtr GlyphExtentsT -> GlyphExtentsT)
-> Ptr GlyphExtentsT -> IO GlyphExtentsT
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr GlyphExtentsT -> GlyphExtentsT
HarfBuzz.GlyphExtentsT.GlyphExtentsT) Ptr GlyphExtentsT
extents
Int32
result <- FontGetGlyphExtentsFuncT_WithClosures
_cb FontT
font' Ptr ()
fontData Word32
glyph GlyphExtentsT
extents' Ptr ()
userData
Maybe (Ptr (FunPtr C_FontGetGlyphExtentsFuncT)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_FontGetGlyphExtentsFuncT))
funptrptr
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
type C_FontGetGlyphContourPointFuncT =
Ptr HarfBuzz.FontT.FontT ->
Ptr () ->
Word32 ->
Word32 ->
Int32 ->
Int32 ->
Ptr () ->
IO Int32
foreign import ccall "dynamic" __dynamic_C_FontGetGlyphContourPointFuncT :: FunPtr C_FontGetGlyphContourPointFuncT -> C_FontGetGlyphContourPointFuncT
dynamic_FontGetGlyphContourPointFuncT ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_FontGetGlyphContourPointFuncT
-> HarfBuzz.FontT.FontT
-> Ptr ()
-> Word32
-> Word32
-> Int32
-> Int32
-> Ptr ()
-> m Int32
dynamic_FontGetGlyphContourPointFuncT :: FunPtr C_FontGetGlyphContourPointFuncT
-> FontT
-> Ptr ()
-> Word32
-> Word32
-> Int32
-> Int32
-> Ptr ()
-> m Int32
dynamic_FontGetGlyphContourPointFuncT __funPtr :: FunPtr C_FontGetGlyphContourPointFuncT
__funPtr font :: FontT
font fontData :: Ptr ()
fontData glyph :: Word32
glyph pointIndex :: Word32
pointIndex x :: Int32
x y :: Int32
y userData :: Ptr ()
userData = 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
$ do
Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
Int32
result <- (FunPtr C_FontGetGlyphContourPointFuncT
-> C_FontGetGlyphContourPointFuncT
__dynamic_C_FontGetGlyphContourPointFuncT FunPtr C_FontGetGlyphContourPointFuncT
__funPtr) Ptr FontT
font' Ptr ()
fontData Word32
glyph Word32
pointIndex Int32
x Int32
y Ptr ()
userData
FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
foreign import ccall "wrapper"
mk_FontGetGlyphContourPointFuncT :: C_FontGetGlyphContourPointFuncT -> IO (FunPtr C_FontGetGlyphContourPointFuncT)
type FontGetGlyphContourPointFuncT =
HarfBuzz.FontT.FontT
-> Ptr ()
-> Word32
-> Word32
-> Int32
-> Int32
-> IO Int32
noFontGetGlyphContourPointFuncT :: Maybe FontGetGlyphContourPointFuncT
noFontGetGlyphContourPointFuncT :: Maybe FontGetGlyphContourPointFuncT
noFontGetGlyphContourPointFuncT = Maybe FontGetGlyphContourPointFuncT
forall a. Maybe a
Nothing
type FontGetGlyphContourPointFuncT_WithClosures =
HarfBuzz.FontT.FontT
-> Ptr ()
-> Word32
-> Word32
-> Int32
-> Int32
-> Ptr ()
-> IO Int32
noFontGetGlyphContourPointFuncT_WithClosures :: Maybe FontGetGlyphContourPointFuncT_WithClosures
noFontGetGlyphContourPointFuncT_WithClosures :: Maybe FontGetGlyphContourPointFuncT_WithClosures
noFontGetGlyphContourPointFuncT_WithClosures = Maybe FontGetGlyphContourPointFuncT_WithClosures
forall a. Maybe a
Nothing
drop_closures_FontGetGlyphContourPointFuncT :: FontGetGlyphContourPointFuncT -> FontGetGlyphContourPointFuncT_WithClosures
drop_closures_FontGetGlyphContourPointFuncT :: FontGetGlyphContourPointFuncT
-> FontGetGlyphContourPointFuncT_WithClosures
drop_closures_FontGetGlyphContourPointFuncT _f :: FontGetGlyphContourPointFuncT
_f font :: FontT
font fontData :: Ptr ()
fontData glyph :: Word32
glyph pointIndex :: Word32
pointIndex x :: Int32
x y :: Int32
y _ = FontGetGlyphContourPointFuncT
_f FontT
font Ptr ()
fontData Word32
glyph Word32
pointIndex Int32
x Int32
y
genClosure_FontGetGlyphContourPointFuncT :: MonadIO m => FontGetGlyphContourPointFuncT -> m (GClosure C_FontGetGlyphContourPointFuncT)
genClosure_FontGetGlyphContourPointFuncT :: FontGetGlyphContourPointFuncT
-> m (GClosure C_FontGetGlyphContourPointFuncT)
genClosure_FontGetGlyphContourPointFuncT cb :: FontGetGlyphContourPointFuncT
cb = IO (GClosure C_FontGetGlyphContourPointFuncT)
-> m (GClosure C_FontGetGlyphContourPointFuncT)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_FontGetGlyphContourPointFuncT)
-> m (GClosure C_FontGetGlyphContourPointFuncT))
-> IO (GClosure C_FontGetGlyphContourPointFuncT)
-> m (GClosure C_FontGetGlyphContourPointFuncT)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: FontGetGlyphContourPointFuncT_WithClosures
cb' = FontGetGlyphContourPointFuncT
-> FontGetGlyphContourPointFuncT_WithClosures
drop_closures_FontGetGlyphContourPointFuncT FontGetGlyphContourPointFuncT
cb
let cb'' :: C_FontGetGlyphContourPointFuncT
cb'' = Maybe (Ptr (FunPtr C_FontGetGlyphContourPointFuncT))
-> FontGetGlyphContourPointFuncT_WithClosures
-> C_FontGetGlyphContourPointFuncT
wrap_FontGetGlyphContourPointFuncT Maybe (Ptr (FunPtr C_FontGetGlyphContourPointFuncT))
forall a. Maybe a
Nothing FontGetGlyphContourPointFuncT_WithClosures
cb'
C_FontGetGlyphContourPointFuncT
-> IO (FunPtr C_FontGetGlyphContourPointFuncT)
mk_FontGetGlyphContourPointFuncT C_FontGetGlyphContourPointFuncT
cb'' IO (FunPtr C_FontGetGlyphContourPointFuncT)
-> (FunPtr C_FontGetGlyphContourPointFuncT
-> IO (GClosure C_FontGetGlyphContourPointFuncT))
-> IO (GClosure C_FontGetGlyphContourPointFuncT)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_FontGetGlyphContourPointFuncT
-> IO (GClosure C_FontGetGlyphContourPointFuncT)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_FontGetGlyphContourPointFuncT ::
Maybe (Ptr (FunPtr C_FontGetGlyphContourPointFuncT)) ->
FontGetGlyphContourPointFuncT_WithClosures ->
C_FontGetGlyphContourPointFuncT
wrap_FontGetGlyphContourPointFuncT :: Maybe (Ptr (FunPtr C_FontGetGlyphContourPointFuncT))
-> FontGetGlyphContourPointFuncT_WithClosures
-> C_FontGetGlyphContourPointFuncT
wrap_FontGetGlyphContourPointFuncT funptrptr :: Maybe (Ptr (FunPtr C_FontGetGlyphContourPointFuncT))
funptrptr _cb :: FontGetGlyphContourPointFuncT_WithClosures
_cb font :: Ptr FontT
font fontData :: Ptr ()
fontData glyph :: Word32
glyph pointIndex :: Word32
pointIndex x :: Int32
x y :: Int32
y userData :: Ptr ()
userData = do
(ManagedPtr FontT -> FontT)
-> Ptr FontT -> (FontT -> IO Int32) -> IO Int32
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr FontT -> FontT
HarfBuzz.FontT.FontT Ptr FontT
font ((FontT -> IO Int32) -> IO Int32)
-> (FontT -> IO Int32) -> IO Int32
forall a b. (a -> b) -> a -> b
$ \font' :: FontT
font' -> do
Int32
result <- FontGetGlyphContourPointFuncT_WithClosures
_cb FontT
font' Ptr ()
fontData Word32
glyph Word32
pointIndex Int32
x Int32
y Ptr ()
userData
Maybe (Ptr (FunPtr C_FontGetGlyphContourPointFuncT)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_FontGetGlyphContourPointFuncT))
funptrptr
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
type C_FontGetGlyphAdvancesFuncT =
Ptr HarfBuzz.FontT.FontT ->
Ptr () ->
Word32 ->
Word32 ->
Word32 ->
Int32 ->
Word32 ->
Ptr () ->
IO ()
foreign import ccall "dynamic" __dynamic_C_FontGetGlyphAdvancesFuncT :: FunPtr C_FontGetGlyphAdvancesFuncT -> C_FontGetGlyphAdvancesFuncT
dynamic_FontGetGlyphAdvancesFuncT ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_FontGetGlyphAdvancesFuncT
-> HarfBuzz.FontT.FontT
-> Ptr ()
-> Word32
-> Word32
-> Word32
-> Int32
-> Word32
-> Ptr ()
-> m ()
dynamic_FontGetGlyphAdvancesFuncT :: FunPtr C_FontGetGlyphAdvancesFuncT
-> FontT
-> Ptr ()
-> Word32
-> Word32
-> Word32
-> Int32
-> Word32
-> Ptr ()
-> m ()
dynamic_FontGetGlyphAdvancesFuncT __funPtr :: FunPtr C_FontGetGlyphAdvancesFuncT
__funPtr font :: FontT
font fontData :: Ptr ()
fontData count :: Word32
count firstGlyph :: Word32
firstGlyph glyphStride :: Word32
glyphStride firstAdvance :: Int32
firstAdvance advanceStride :: Word32
advanceStride userData :: Ptr ()
userData = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
(FunPtr C_FontGetGlyphAdvancesFuncT -> C_FontGetGlyphAdvancesFuncT
__dynamic_C_FontGetGlyphAdvancesFuncT FunPtr C_FontGetGlyphAdvancesFuncT
__funPtr) Ptr FontT
font' Ptr ()
fontData Word32
count Word32
firstGlyph Word32
glyphStride Int32
firstAdvance Word32
advanceStride Ptr ()
userData
FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_FontGetGlyphAdvancesFuncT :: C_FontGetGlyphAdvancesFuncT -> IO (FunPtr C_FontGetGlyphAdvancesFuncT)
type FontGetGlyphAdvancesFuncT =
HarfBuzz.FontT.FontT
-> Ptr ()
-> Word32
-> Word32
-> Word32
-> Int32
-> Word32
-> IO ()
noFontGetGlyphAdvancesFuncT :: Maybe FontGetGlyphAdvancesFuncT
noFontGetGlyphAdvancesFuncT :: Maybe FontGetGlyphAdvancesFuncT
noFontGetGlyphAdvancesFuncT = Maybe FontGetGlyphAdvancesFuncT
forall a. Maybe a
Nothing
type FontGetGlyphAdvancesFuncT_WithClosures =
HarfBuzz.FontT.FontT
-> Ptr ()
-> Word32
-> Word32
-> Word32
-> Int32
-> Word32
-> Ptr ()
-> IO ()
noFontGetGlyphAdvancesFuncT_WithClosures :: Maybe FontGetGlyphAdvancesFuncT_WithClosures
noFontGetGlyphAdvancesFuncT_WithClosures :: Maybe FontGetGlyphAdvancesFuncT_WithClosures
noFontGetGlyphAdvancesFuncT_WithClosures = Maybe FontGetGlyphAdvancesFuncT_WithClosures
forall a. Maybe a
Nothing
drop_closures_FontGetGlyphAdvancesFuncT :: FontGetGlyphAdvancesFuncT -> FontGetGlyphAdvancesFuncT_WithClosures
drop_closures_FontGetGlyphAdvancesFuncT :: FontGetGlyphAdvancesFuncT -> FontGetGlyphAdvancesFuncT_WithClosures
drop_closures_FontGetGlyphAdvancesFuncT _f :: FontGetGlyphAdvancesFuncT
_f font :: FontT
font fontData :: Ptr ()
fontData count :: Word32
count firstGlyph :: Word32
firstGlyph glyphStride :: Word32
glyphStride firstAdvance :: Int32
firstAdvance advanceStride :: Word32
advanceStride _ = FontGetGlyphAdvancesFuncT
_f FontT
font Ptr ()
fontData Word32
count Word32
firstGlyph Word32
glyphStride Int32
firstAdvance Word32
advanceStride
genClosure_FontGetGlyphAdvancesFuncT :: MonadIO m => FontGetGlyphAdvancesFuncT -> m (GClosure C_FontGetGlyphAdvancesFuncT)
genClosure_FontGetGlyphAdvancesFuncT :: FontGetGlyphAdvancesFuncT
-> m (GClosure C_FontGetGlyphAdvancesFuncT)
genClosure_FontGetGlyphAdvancesFuncT cb :: FontGetGlyphAdvancesFuncT
cb = IO (GClosure C_FontGetGlyphAdvancesFuncT)
-> m (GClosure C_FontGetGlyphAdvancesFuncT)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_FontGetGlyphAdvancesFuncT)
-> m (GClosure C_FontGetGlyphAdvancesFuncT))
-> IO (GClosure C_FontGetGlyphAdvancesFuncT)
-> m (GClosure C_FontGetGlyphAdvancesFuncT)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: FontGetGlyphAdvancesFuncT_WithClosures
cb' = FontGetGlyphAdvancesFuncT -> FontGetGlyphAdvancesFuncT_WithClosures
drop_closures_FontGetGlyphAdvancesFuncT FontGetGlyphAdvancesFuncT
cb
let cb'' :: C_FontGetGlyphAdvancesFuncT
cb'' = Maybe (Ptr (FunPtr C_FontGetGlyphAdvancesFuncT))
-> FontGetGlyphAdvancesFuncT_WithClosures
-> C_FontGetGlyphAdvancesFuncT
wrap_FontGetGlyphAdvancesFuncT Maybe (Ptr (FunPtr C_FontGetGlyphAdvancesFuncT))
forall a. Maybe a
Nothing FontGetGlyphAdvancesFuncT_WithClosures
cb'
C_FontGetGlyphAdvancesFuncT
-> IO (FunPtr C_FontGetGlyphAdvancesFuncT)
mk_FontGetGlyphAdvancesFuncT C_FontGetGlyphAdvancesFuncT
cb'' IO (FunPtr C_FontGetGlyphAdvancesFuncT)
-> (FunPtr C_FontGetGlyphAdvancesFuncT
-> IO (GClosure C_FontGetGlyphAdvancesFuncT))
-> IO (GClosure C_FontGetGlyphAdvancesFuncT)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_FontGetGlyphAdvancesFuncT
-> IO (GClosure C_FontGetGlyphAdvancesFuncT)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_FontGetGlyphAdvancesFuncT ::
Maybe (Ptr (FunPtr C_FontGetGlyphAdvancesFuncT)) ->
FontGetGlyphAdvancesFuncT_WithClosures ->
C_FontGetGlyphAdvancesFuncT
wrap_FontGetGlyphAdvancesFuncT :: Maybe (Ptr (FunPtr C_FontGetGlyphAdvancesFuncT))
-> FontGetGlyphAdvancesFuncT_WithClosures
-> C_FontGetGlyphAdvancesFuncT
wrap_FontGetGlyphAdvancesFuncT funptrptr :: Maybe (Ptr (FunPtr C_FontGetGlyphAdvancesFuncT))
funptrptr _cb :: FontGetGlyphAdvancesFuncT_WithClosures
_cb font :: Ptr FontT
font fontData :: Ptr ()
fontData count :: Word32
count firstGlyph :: Word32
firstGlyph glyphStride :: Word32
glyphStride firstAdvance :: Int32
firstAdvance advanceStride :: Word32
advanceStride userData :: Ptr ()
userData = do
(ManagedPtr FontT -> FontT)
-> Ptr FontT -> (FontT -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr FontT -> FontT
HarfBuzz.FontT.FontT Ptr FontT
font ((FontT -> IO ()) -> IO ()) -> (FontT -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \font' :: FontT
font' -> do
FontGetGlyphAdvancesFuncT_WithClosures
_cb FontT
font' Ptr ()
fontData Word32
count Word32
firstGlyph Word32
glyphStride Int32
firstAdvance Word32
advanceStride Ptr ()
userData
Maybe (Ptr (FunPtr C_FontGetGlyphAdvancesFuncT)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_FontGetGlyphAdvancesFuncT))
funptrptr
type C_FontGetGlyphAdvanceFuncT =
Ptr HarfBuzz.FontT.FontT ->
Ptr () ->
Word32 ->
Ptr () ->
IO Int32
foreign import ccall "dynamic" __dynamic_C_FontGetGlyphAdvanceFuncT :: FunPtr C_FontGetGlyphAdvanceFuncT -> C_FontGetGlyphAdvanceFuncT
dynamic_FontGetGlyphAdvanceFuncT ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_FontGetGlyphAdvanceFuncT
-> HarfBuzz.FontT.FontT
-> Ptr ()
-> Word32
-> Ptr ()
-> m Int32
dynamic_FontGetGlyphAdvanceFuncT :: FunPtr C_FontGetGlyphAdvanceFuncT
-> FontT -> Ptr () -> Word32 -> Ptr () -> m Int32
dynamic_FontGetGlyphAdvanceFuncT __funPtr :: FunPtr C_FontGetGlyphAdvanceFuncT
__funPtr font :: FontT
font fontData :: Ptr ()
fontData glyph :: Word32
glyph userData :: Ptr ()
userData = 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
$ do
Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
Int32
result <- (FunPtr C_FontGetGlyphAdvanceFuncT -> C_FontGetGlyphAdvanceFuncT
__dynamic_C_FontGetGlyphAdvanceFuncT FunPtr C_FontGetGlyphAdvanceFuncT
__funPtr) Ptr FontT
font' Ptr ()
fontData Word32
glyph Ptr ()
userData
FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
foreign import ccall "wrapper"
mk_FontGetGlyphAdvanceFuncT :: C_FontGetGlyphAdvanceFuncT -> IO (FunPtr C_FontGetGlyphAdvanceFuncT)
type FontGetGlyphAdvanceFuncT =
HarfBuzz.FontT.FontT
-> Ptr ()
-> Word32
-> IO Int32
noFontGetGlyphAdvanceFuncT :: Maybe FontGetGlyphAdvanceFuncT
noFontGetGlyphAdvanceFuncT :: Maybe FontGetGlyphAdvanceFuncT
noFontGetGlyphAdvanceFuncT = Maybe FontGetGlyphAdvanceFuncT
forall a. Maybe a
Nothing
type FontGetGlyphAdvanceFuncT_WithClosures =
HarfBuzz.FontT.FontT
-> Ptr ()
-> Word32
-> Ptr ()
-> IO Int32
noFontGetGlyphAdvanceFuncT_WithClosures :: Maybe FontGetGlyphAdvanceFuncT_WithClosures
noFontGetGlyphAdvanceFuncT_WithClosures :: Maybe FontGetGlyphAdvanceFuncT_WithClosures
noFontGetGlyphAdvanceFuncT_WithClosures = Maybe FontGetGlyphAdvanceFuncT_WithClosures
forall a. Maybe a
Nothing
drop_closures_FontGetGlyphAdvanceFuncT :: FontGetGlyphAdvanceFuncT -> FontGetGlyphAdvanceFuncT_WithClosures
drop_closures_FontGetGlyphAdvanceFuncT :: FontGetGlyphAdvanceFuncT -> FontGetGlyphAdvanceFuncT_WithClosures
drop_closures_FontGetGlyphAdvanceFuncT _f :: FontGetGlyphAdvanceFuncT
_f font :: FontT
font fontData :: Ptr ()
fontData glyph :: Word32
glyph _ = FontGetGlyphAdvanceFuncT
_f FontT
font Ptr ()
fontData Word32
glyph
genClosure_FontGetGlyphAdvanceFuncT :: MonadIO m => FontGetGlyphAdvanceFuncT -> m (GClosure C_FontGetGlyphAdvanceFuncT)
genClosure_FontGetGlyphAdvanceFuncT :: FontGetGlyphAdvanceFuncT -> m (GClosure C_FontGetGlyphAdvanceFuncT)
genClosure_FontGetGlyphAdvanceFuncT cb :: FontGetGlyphAdvanceFuncT
cb = IO (GClosure C_FontGetGlyphAdvanceFuncT)
-> m (GClosure C_FontGetGlyphAdvanceFuncT)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_FontGetGlyphAdvanceFuncT)
-> m (GClosure C_FontGetGlyphAdvanceFuncT))
-> IO (GClosure C_FontGetGlyphAdvanceFuncT)
-> m (GClosure C_FontGetGlyphAdvanceFuncT)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: FontGetGlyphAdvanceFuncT_WithClosures
cb' = FontGetGlyphAdvanceFuncT -> FontGetGlyphAdvanceFuncT_WithClosures
drop_closures_FontGetGlyphAdvanceFuncT FontGetGlyphAdvanceFuncT
cb
let cb'' :: C_FontGetGlyphAdvanceFuncT
cb'' = Maybe (Ptr (FunPtr C_FontGetGlyphAdvanceFuncT))
-> FontGetGlyphAdvanceFuncT_WithClosures
-> C_FontGetGlyphAdvanceFuncT
wrap_FontGetGlyphAdvanceFuncT Maybe (Ptr (FunPtr C_FontGetGlyphAdvanceFuncT))
forall a. Maybe a
Nothing FontGetGlyphAdvanceFuncT_WithClosures
cb'
C_FontGetGlyphAdvanceFuncT
-> IO (FunPtr C_FontGetGlyphAdvanceFuncT)
mk_FontGetGlyphAdvanceFuncT C_FontGetGlyphAdvanceFuncT
cb'' IO (FunPtr C_FontGetGlyphAdvanceFuncT)
-> (FunPtr C_FontGetGlyphAdvanceFuncT
-> IO (GClosure C_FontGetGlyphAdvanceFuncT))
-> IO (GClosure C_FontGetGlyphAdvanceFuncT)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_FontGetGlyphAdvanceFuncT
-> IO (GClosure C_FontGetGlyphAdvanceFuncT)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_FontGetGlyphAdvanceFuncT ::
Maybe (Ptr (FunPtr C_FontGetGlyphAdvanceFuncT)) ->
FontGetGlyphAdvanceFuncT_WithClosures ->
C_FontGetGlyphAdvanceFuncT
wrap_FontGetGlyphAdvanceFuncT :: Maybe (Ptr (FunPtr C_FontGetGlyphAdvanceFuncT))
-> FontGetGlyphAdvanceFuncT_WithClosures
-> C_FontGetGlyphAdvanceFuncT
wrap_FontGetGlyphAdvanceFuncT funptrptr :: Maybe (Ptr (FunPtr C_FontGetGlyphAdvanceFuncT))
funptrptr _cb :: FontGetGlyphAdvanceFuncT_WithClosures
_cb font :: Ptr FontT
font fontData :: Ptr ()
fontData glyph :: Word32
glyph userData :: Ptr ()
userData = do
(ManagedPtr FontT -> FontT)
-> Ptr FontT -> (FontT -> IO Int32) -> IO Int32
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr FontT -> FontT
HarfBuzz.FontT.FontT Ptr FontT
font ((FontT -> IO Int32) -> IO Int32)
-> (FontT -> IO Int32) -> IO Int32
forall a b. (a -> b) -> a -> b
$ \font' :: FontT
font' -> do
Int32
result <- FontGetGlyphAdvanceFuncT_WithClosures
_cb FontT
font' Ptr ()
fontData Word32
glyph Ptr ()
userData
Maybe (Ptr (FunPtr C_FontGetGlyphAdvanceFuncT)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_FontGetGlyphAdvanceFuncT))
funptrptr
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
type C_FontGetFontExtentsFuncT =
Ptr HarfBuzz.FontT.FontT ->
Ptr () ->
Ptr HarfBuzz.FontExtentsT.FontExtentsT ->
Ptr () ->
IO Int32
foreign import ccall "dynamic" __dynamic_C_FontGetFontExtentsFuncT :: FunPtr C_FontGetFontExtentsFuncT -> C_FontGetFontExtentsFuncT
dynamic_FontGetFontExtentsFuncT ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_FontGetFontExtentsFuncT
-> HarfBuzz.FontT.FontT
-> Ptr ()
-> HarfBuzz.FontExtentsT.FontExtentsT
-> Ptr ()
-> m Int32
dynamic_FontGetFontExtentsFuncT :: FunPtr C_FontGetFontExtentsFuncT
-> FontT -> Ptr () -> FontExtentsT -> Ptr () -> m Int32
dynamic_FontGetFontExtentsFuncT __funPtr :: FunPtr C_FontGetFontExtentsFuncT
__funPtr font :: FontT
font fontData :: Ptr ()
fontData extents :: FontExtentsT
extents userData :: Ptr ()
userData = 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
$ do
Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
Ptr FontExtentsT
extents' <- FontExtentsT -> IO (Ptr FontExtentsT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontExtentsT
extents
Int32
result <- (FunPtr C_FontGetFontExtentsFuncT -> C_FontGetFontExtentsFuncT
__dynamic_C_FontGetFontExtentsFuncT FunPtr C_FontGetFontExtentsFuncT
__funPtr) Ptr FontT
font' Ptr ()
fontData Ptr FontExtentsT
extents' Ptr ()
userData
FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
FontExtentsT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontExtentsT
extents
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
foreign import ccall "wrapper"
mk_FontGetFontExtentsFuncT :: C_FontGetFontExtentsFuncT -> IO (FunPtr C_FontGetFontExtentsFuncT)
type FontGetFontExtentsFuncT =
HarfBuzz.FontT.FontT
-> Ptr ()
-> HarfBuzz.FontExtentsT.FontExtentsT
-> IO Int32
noFontGetFontExtentsFuncT :: Maybe FontGetFontExtentsFuncT
noFontGetFontExtentsFuncT :: Maybe FontGetFontExtentsFuncT
noFontGetFontExtentsFuncT = Maybe FontGetFontExtentsFuncT
forall a. Maybe a
Nothing
type FontGetFontExtentsFuncT_WithClosures =
HarfBuzz.FontT.FontT
-> Ptr ()
-> HarfBuzz.FontExtentsT.FontExtentsT
-> Ptr ()
-> IO Int32
noFontGetFontExtentsFuncT_WithClosures :: Maybe FontGetFontExtentsFuncT_WithClosures
noFontGetFontExtentsFuncT_WithClosures :: Maybe FontGetFontExtentsFuncT_WithClosures
noFontGetFontExtentsFuncT_WithClosures = Maybe FontGetFontExtentsFuncT_WithClosures
forall a. Maybe a
Nothing
drop_closures_FontGetFontExtentsFuncT :: FontGetFontExtentsFuncT -> FontGetFontExtentsFuncT_WithClosures
drop_closures_FontGetFontExtentsFuncT :: FontGetFontExtentsFuncT -> FontGetFontExtentsFuncT_WithClosures
drop_closures_FontGetFontExtentsFuncT _f :: FontGetFontExtentsFuncT
_f font :: FontT
font fontData :: Ptr ()
fontData extents :: FontExtentsT
extents _ = FontGetFontExtentsFuncT
_f FontT
font Ptr ()
fontData FontExtentsT
extents
genClosure_FontGetFontExtentsFuncT :: MonadIO m => FontGetFontExtentsFuncT -> m (GClosure C_FontGetFontExtentsFuncT)
genClosure_FontGetFontExtentsFuncT :: FontGetFontExtentsFuncT -> m (GClosure C_FontGetFontExtentsFuncT)
genClosure_FontGetFontExtentsFuncT cb :: FontGetFontExtentsFuncT
cb = IO (GClosure C_FontGetFontExtentsFuncT)
-> m (GClosure C_FontGetFontExtentsFuncT)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_FontGetFontExtentsFuncT)
-> m (GClosure C_FontGetFontExtentsFuncT))
-> IO (GClosure C_FontGetFontExtentsFuncT)
-> m (GClosure C_FontGetFontExtentsFuncT)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: FontGetFontExtentsFuncT_WithClosures
cb' = FontGetFontExtentsFuncT -> FontGetFontExtentsFuncT_WithClosures
drop_closures_FontGetFontExtentsFuncT FontGetFontExtentsFuncT
cb
let cb'' :: C_FontGetFontExtentsFuncT
cb'' = Maybe (Ptr (FunPtr C_FontGetFontExtentsFuncT))
-> FontGetFontExtentsFuncT_WithClosures
-> C_FontGetFontExtentsFuncT
wrap_FontGetFontExtentsFuncT Maybe (Ptr (FunPtr C_FontGetFontExtentsFuncT))
forall a. Maybe a
Nothing FontGetFontExtentsFuncT_WithClosures
cb'
C_FontGetFontExtentsFuncT -> IO (FunPtr C_FontGetFontExtentsFuncT)
mk_FontGetFontExtentsFuncT C_FontGetFontExtentsFuncT
cb'' IO (FunPtr C_FontGetFontExtentsFuncT)
-> (FunPtr C_FontGetFontExtentsFuncT
-> IO (GClosure C_FontGetFontExtentsFuncT))
-> IO (GClosure C_FontGetFontExtentsFuncT)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_FontGetFontExtentsFuncT
-> IO (GClosure C_FontGetFontExtentsFuncT)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_FontGetFontExtentsFuncT ::
Maybe (Ptr (FunPtr C_FontGetFontExtentsFuncT)) ->
FontGetFontExtentsFuncT_WithClosures ->
C_FontGetFontExtentsFuncT
wrap_FontGetFontExtentsFuncT :: Maybe (Ptr (FunPtr C_FontGetFontExtentsFuncT))
-> FontGetFontExtentsFuncT_WithClosures
-> C_FontGetFontExtentsFuncT
wrap_FontGetFontExtentsFuncT funptrptr :: Maybe (Ptr (FunPtr C_FontGetFontExtentsFuncT))
funptrptr _cb :: FontGetFontExtentsFuncT_WithClosures
_cb font :: Ptr FontT
font fontData :: Ptr ()
fontData extents :: Ptr FontExtentsT
extents userData :: Ptr ()
userData = do
(ManagedPtr FontT -> FontT)
-> Ptr FontT -> (FontT -> IO Int32) -> IO Int32
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr FontT -> FontT
HarfBuzz.FontT.FontT Ptr FontT
font ((FontT -> IO Int32) -> IO Int32)
-> (FontT -> IO Int32) -> IO Int32
forall a b. (a -> b) -> a -> b
$ \font' :: FontT
font' -> do
FontExtentsT
extents' <- ((ManagedPtr FontExtentsT -> FontExtentsT)
-> Ptr FontExtentsT -> IO FontExtentsT
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr FontExtentsT -> FontExtentsT
HarfBuzz.FontExtentsT.FontExtentsT) Ptr FontExtentsT
extents
Int32
result <- FontGetFontExtentsFuncT_WithClosures
_cb FontT
font' Ptr ()
fontData FontExtentsT
extents' Ptr ()
userData
Maybe (Ptr (FunPtr C_FontGetFontExtentsFuncT)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_FontGetFontExtentsFuncT))
funptrptr
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
type C_DestroyFuncT =
Ptr () ->
IO ()
foreign import ccall "dynamic" __dynamic_C_DestroyFuncT :: FunPtr C_DestroyFuncT -> C_DestroyFuncT
dynamic_DestroyFuncT ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_DestroyFuncT
-> Ptr ()
-> m ()
dynamic_DestroyFuncT :: FunPtr C_DestroyFuncT -> Ptr () -> m ()
dynamic_DestroyFuncT __funPtr :: FunPtr C_DestroyFuncT
__funPtr userData :: Ptr ()
userData = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
(FunPtr C_DestroyFuncT -> C_DestroyFuncT
__dynamic_C_DestroyFuncT FunPtr C_DestroyFuncT
__funPtr) Ptr ()
userData
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_DestroyFuncT :: C_DestroyFuncT -> IO (FunPtr C_DestroyFuncT)
type DestroyFuncT =
IO ()
noDestroyFuncT :: Maybe DestroyFuncT
noDestroyFuncT :: Maybe (IO ())
noDestroyFuncT = Maybe (IO ())
forall a. Maybe a
Nothing
type DestroyFuncT_WithClosures =
Ptr ()
-> IO ()
noDestroyFuncT_WithClosures :: Maybe DestroyFuncT_WithClosures
noDestroyFuncT_WithClosures :: Maybe C_DestroyFuncT
noDestroyFuncT_WithClosures = Maybe C_DestroyFuncT
forall a. Maybe a
Nothing
drop_closures_DestroyFuncT :: DestroyFuncT -> DestroyFuncT_WithClosures
drop_closures_DestroyFuncT :: IO () -> C_DestroyFuncT
drop_closures_DestroyFuncT _f :: IO ()
_f _ = IO ()
_f
genClosure_DestroyFuncT :: MonadIO m => DestroyFuncT -> m (GClosure C_DestroyFuncT)
genClosure_DestroyFuncT :: IO () -> m (GClosure C_DestroyFuncT)
genClosure_DestroyFuncT cb :: IO ()
cb = IO (GClosure C_DestroyFuncT) -> m (GClosure C_DestroyFuncT)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_DestroyFuncT) -> m (GClosure C_DestroyFuncT))
-> IO (GClosure C_DestroyFuncT) -> m (GClosure C_DestroyFuncT)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_DestroyFuncT
cb' = IO () -> C_DestroyFuncT
drop_closures_DestroyFuncT IO ()
cb
let cb'' :: C_DestroyFuncT
cb'' = Maybe (Ptr (FunPtr C_DestroyFuncT))
-> C_DestroyFuncT -> C_DestroyFuncT
wrap_DestroyFuncT Maybe (Ptr (FunPtr C_DestroyFuncT))
forall a. Maybe a
Nothing C_DestroyFuncT
cb'
C_DestroyFuncT -> IO (FunPtr C_DestroyFuncT)
mk_DestroyFuncT C_DestroyFuncT
cb'' IO (FunPtr C_DestroyFuncT)
-> (FunPtr C_DestroyFuncT -> IO (GClosure C_DestroyFuncT))
-> IO (GClosure C_DestroyFuncT)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_DestroyFuncT -> IO (GClosure C_DestroyFuncT)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_DestroyFuncT ::
Maybe (Ptr (FunPtr C_DestroyFuncT)) ->
DestroyFuncT_WithClosures ->
C_DestroyFuncT
wrap_DestroyFuncT :: Maybe (Ptr (FunPtr C_DestroyFuncT))
-> C_DestroyFuncT -> C_DestroyFuncT
wrap_DestroyFuncT funptrptr :: Maybe (Ptr (FunPtr C_DestroyFuncT))
funptrptr _cb :: C_DestroyFuncT
_cb userData :: Ptr ()
userData = do
C_DestroyFuncT
_cb Ptr ()
userData
Maybe (Ptr (FunPtr C_DestroyFuncT)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_DestroyFuncT))
funptrptr
type C_BufferMessageFuncT =
Ptr HarfBuzz.BufferT.BufferT ->
Ptr HarfBuzz.FontT.FontT ->
CString ->
Ptr () ->
IO Int32
foreign import ccall "dynamic" __dynamic_C_BufferMessageFuncT :: FunPtr C_BufferMessageFuncT -> C_BufferMessageFuncT
dynamic_BufferMessageFuncT ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_BufferMessageFuncT
-> HarfBuzz.BufferT.BufferT
-> HarfBuzz.FontT.FontT
-> T.Text
-> Ptr ()
-> m Int32
dynamic_BufferMessageFuncT :: FunPtr C_BufferMessageFuncT
-> BufferT -> FontT -> Text -> Ptr () -> m Int32
dynamic_BufferMessageFuncT __funPtr :: FunPtr C_BufferMessageFuncT
__funPtr buffer :: BufferT
buffer font :: FontT
font message :: Text
message userData :: Ptr ()
userData = 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
$ do
Ptr BufferT
buffer' <- BufferT -> IO (Ptr BufferT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BufferT
buffer
Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
CString
message' <- Text -> IO CString
textToCString Text
message
Int32
result <- (FunPtr C_BufferMessageFuncT -> C_BufferMessageFuncT
__dynamic_C_BufferMessageFuncT FunPtr C_BufferMessageFuncT
__funPtr) Ptr BufferT
buffer' Ptr FontT
font' CString
message' Ptr ()
userData
BufferT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BufferT
buffer
FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
message'
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
foreign import ccall "wrapper"
mk_BufferMessageFuncT :: C_BufferMessageFuncT -> IO (FunPtr C_BufferMessageFuncT)
type BufferMessageFuncT =
HarfBuzz.BufferT.BufferT
-> HarfBuzz.FontT.FontT
-> T.Text
-> IO Int32
noBufferMessageFuncT :: Maybe BufferMessageFuncT
noBufferMessageFuncT :: Maybe BufferMessageFuncT
noBufferMessageFuncT = Maybe BufferMessageFuncT
forall a. Maybe a
Nothing
type BufferMessageFuncT_WithClosures =
HarfBuzz.BufferT.BufferT
-> HarfBuzz.FontT.FontT
-> T.Text
-> Ptr ()
-> IO Int32
noBufferMessageFuncT_WithClosures :: Maybe BufferMessageFuncT_WithClosures
noBufferMessageFuncT_WithClosures :: Maybe BufferMessageFuncT_WithClosures
noBufferMessageFuncT_WithClosures = Maybe BufferMessageFuncT_WithClosures
forall a. Maybe a
Nothing
drop_closures_BufferMessageFuncT :: BufferMessageFuncT -> BufferMessageFuncT_WithClosures
drop_closures_BufferMessageFuncT :: BufferMessageFuncT -> BufferMessageFuncT_WithClosures
drop_closures_BufferMessageFuncT _f :: BufferMessageFuncT
_f buffer :: BufferT
buffer font :: FontT
font message :: Text
message _ = BufferMessageFuncT
_f BufferT
buffer FontT
font Text
message
genClosure_BufferMessageFuncT :: MonadIO m => BufferMessageFuncT -> m (GClosure C_BufferMessageFuncT)
genClosure_BufferMessageFuncT :: BufferMessageFuncT -> m (GClosure C_BufferMessageFuncT)
genClosure_BufferMessageFuncT cb :: BufferMessageFuncT
cb = IO (GClosure C_BufferMessageFuncT)
-> m (GClosure C_BufferMessageFuncT)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_BufferMessageFuncT)
-> m (GClosure C_BufferMessageFuncT))
-> IO (GClosure C_BufferMessageFuncT)
-> m (GClosure C_BufferMessageFuncT)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: BufferMessageFuncT_WithClosures
cb' = BufferMessageFuncT -> BufferMessageFuncT_WithClosures
drop_closures_BufferMessageFuncT BufferMessageFuncT
cb
let cb'' :: C_BufferMessageFuncT
cb'' = Maybe (Ptr (FunPtr C_BufferMessageFuncT))
-> BufferMessageFuncT_WithClosures -> C_BufferMessageFuncT
wrap_BufferMessageFuncT Maybe (Ptr (FunPtr C_BufferMessageFuncT))
forall a. Maybe a
Nothing BufferMessageFuncT_WithClosures
cb'
C_BufferMessageFuncT -> IO (FunPtr C_BufferMessageFuncT)
mk_BufferMessageFuncT C_BufferMessageFuncT
cb'' IO (FunPtr C_BufferMessageFuncT)
-> (FunPtr C_BufferMessageFuncT
-> IO (GClosure C_BufferMessageFuncT))
-> IO (GClosure C_BufferMessageFuncT)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_BufferMessageFuncT -> IO (GClosure C_BufferMessageFuncT)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_BufferMessageFuncT ::
Maybe (Ptr (FunPtr C_BufferMessageFuncT)) ->
BufferMessageFuncT_WithClosures ->
C_BufferMessageFuncT
wrap_BufferMessageFuncT :: Maybe (Ptr (FunPtr C_BufferMessageFuncT))
-> BufferMessageFuncT_WithClosures -> C_BufferMessageFuncT
wrap_BufferMessageFuncT funptrptr :: Maybe (Ptr (FunPtr C_BufferMessageFuncT))
funptrptr _cb :: BufferMessageFuncT_WithClosures
_cb buffer :: Ptr BufferT
buffer font :: Ptr FontT
font message :: CString
message userData :: Ptr ()
userData = do
(ManagedPtr BufferT -> BufferT)
-> Ptr BufferT -> (BufferT -> IO Int32) -> IO Int32
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr BufferT -> BufferT
HarfBuzz.BufferT.BufferT Ptr BufferT
buffer ((BufferT -> IO Int32) -> IO Int32)
-> (BufferT -> IO Int32) -> IO Int32
forall a b. (a -> b) -> a -> b
$ \buffer' :: BufferT
buffer' -> do
(ManagedPtr FontT -> FontT)
-> Ptr FontT -> (FontT -> IO Int32) -> IO Int32
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr FontT -> FontT
HarfBuzz.FontT.FontT Ptr FontT
font ((FontT -> IO Int32) -> IO Int32)
-> (FontT -> IO Int32) -> IO Int32
forall a b. (a -> b) -> a -> b
$ \font' :: FontT
font' -> do
Text
message' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
message
Int32
result <- BufferMessageFuncT_WithClosures
_cb BufferT
buffer' FontT
font' Text
message' Ptr ()
userData
Maybe (Ptr (FunPtr C_BufferMessageFuncT)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_BufferMessageFuncT))
funptrptr
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result