-- | Copyright : Will Thompson and Iñaki García Etxebarria -- License : LGPL-2.1 -- Maintainer : Iñaki García Etxebarria #if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__)) #define ENABLE_OVERLOADING #endif module GI.HarfBuzz.Callbacks ( -- * Signals -- ** BufferMessageFuncT #signal:BufferMessageFuncT# BufferMessageFuncT , BufferMessageFuncT_WithClosures , C_BufferMessageFuncT , drop_closures_BufferMessageFuncT , dynamic_BufferMessageFuncT , genClosure_BufferMessageFuncT , mk_BufferMessageFuncT , noBufferMessageFuncT , noBufferMessageFuncT_WithClosures , wrap_BufferMessageFuncT , -- ** ColorLineGetColorStopsFuncT #signal:ColorLineGetColorStopsFuncT# C_ColorLineGetColorStopsFuncT , ColorLineGetColorStopsFuncT , ColorLineGetColorStopsFuncT_WithClosures, drop_closures_ColorLineGetColorStopsFuncT, dynamic_ColorLineGetColorStopsFuncT , genClosure_ColorLineGetColorStopsFuncT , mk_ColorLineGetColorStopsFuncT , noColorLineGetColorStopsFuncT , noColorLineGetColorStopsFuncT_WithClosures, wrap_ColorLineGetColorStopsFuncT , -- ** ColorLineGetExtendFuncT #signal:ColorLineGetExtendFuncT# C_ColorLineGetExtendFuncT , ColorLineGetExtendFuncT , ColorLineGetExtendFuncT_WithClosures , drop_closures_ColorLineGetExtendFuncT , dynamic_ColorLineGetExtendFuncT , genClosure_ColorLineGetExtendFuncT , mk_ColorLineGetExtendFuncT , noColorLineGetExtendFuncT , noColorLineGetExtendFuncT_WithClosures , wrap_ColorLineGetExtendFuncT , -- ** DestroyFuncT #signal:DestroyFuncT# C_DestroyFuncT , DestroyFuncT , DestroyFuncT_WithClosures , drop_closures_DestroyFuncT , dynamic_DestroyFuncT , genClosure_DestroyFuncT , mk_DestroyFuncT , noDestroyFuncT , noDestroyFuncT_WithClosures , wrap_DestroyFuncT , -- ** DrawClosePathFuncT #signal:DrawClosePathFuncT# C_DrawClosePathFuncT , DrawClosePathFuncT , DrawClosePathFuncT_WithClosures , drop_closures_DrawClosePathFuncT , dynamic_DrawClosePathFuncT , genClosure_DrawClosePathFuncT , mk_DrawClosePathFuncT , noDrawClosePathFuncT , noDrawClosePathFuncT_WithClosures , wrap_DrawClosePathFuncT , -- ** DrawCubicToFuncT #signal:DrawCubicToFuncT# C_DrawCubicToFuncT , DrawCubicToFuncT , DrawCubicToFuncT_WithClosures , drop_closures_DrawCubicToFuncT , dynamic_DrawCubicToFuncT , genClosure_DrawCubicToFuncT , mk_DrawCubicToFuncT , noDrawCubicToFuncT , noDrawCubicToFuncT_WithClosures , wrap_DrawCubicToFuncT , -- ** DrawLineToFuncT #signal:DrawLineToFuncT# C_DrawLineToFuncT , DrawLineToFuncT , DrawLineToFuncT_WithClosures , drop_closures_DrawLineToFuncT , dynamic_DrawLineToFuncT , genClosure_DrawLineToFuncT , mk_DrawLineToFuncT , noDrawLineToFuncT , noDrawLineToFuncT_WithClosures , wrap_DrawLineToFuncT , -- ** DrawMoveToFuncT #signal:DrawMoveToFuncT# C_DrawMoveToFuncT , DrawMoveToFuncT , DrawMoveToFuncT_WithClosures , drop_closures_DrawMoveToFuncT , dynamic_DrawMoveToFuncT , genClosure_DrawMoveToFuncT , mk_DrawMoveToFuncT , noDrawMoveToFuncT , noDrawMoveToFuncT_WithClosures , wrap_DrawMoveToFuncT , -- ** DrawQuadraticToFuncT #signal:DrawQuadraticToFuncT# C_DrawQuadraticToFuncT , DrawQuadraticToFuncT , DrawQuadraticToFuncT_WithClosures , drop_closures_DrawQuadraticToFuncT , dynamic_DrawQuadraticToFuncT , genClosure_DrawQuadraticToFuncT , mk_DrawQuadraticToFuncT , noDrawQuadraticToFuncT , noDrawQuadraticToFuncT_WithClosures , wrap_DrawQuadraticToFuncT , -- ** FontDrawGlyphFuncT #signal:FontDrawGlyphFuncT# C_FontDrawGlyphFuncT , FontDrawGlyphFuncT , FontDrawGlyphFuncT_WithClosures , drop_closures_FontDrawGlyphFuncT , dynamic_FontDrawGlyphFuncT , genClosure_FontDrawGlyphFuncT , mk_FontDrawGlyphFuncT , noFontDrawGlyphFuncT , noFontDrawGlyphFuncT_WithClosures , wrap_FontDrawGlyphFuncT , -- ** FontGetFontExtentsFuncT #signal:FontGetFontExtentsFuncT# C_FontGetFontExtentsFuncT , FontGetFontExtentsFuncT , FontGetFontExtentsFuncT_WithClosures , drop_closures_FontGetFontExtentsFuncT , dynamic_FontGetFontExtentsFuncT , genClosure_FontGetFontExtentsFuncT , mk_FontGetFontExtentsFuncT , noFontGetFontExtentsFuncT , noFontGetFontExtentsFuncT_WithClosures , wrap_FontGetFontExtentsFuncT , -- ** FontGetGlyphAdvanceFuncT #signal:FontGetGlyphAdvanceFuncT# C_FontGetGlyphAdvanceFuncT , FontGetGlyphAdvanceFuncT , FontGetGlyphAdvanceFuncT_WithClosures , drop_closures_FontGetGlyphAdvanceFuncT , dynamic_FontGetGlyphAdvanceFuncT , genClosure_FontGetGlyphAdvanceFuncT , mk_FontGetGlyphAdvanceFuncT , noFontGetGlyphAdvanceFuncT , noFontGetGlyphAdvanceFuncT_WithClosures , wrap_FontGetGlyphAdvanceFuncT , -- ** FontGetGlyphAdvancesFuncT #signal:FontGetGlyphAdvancesFuncT# C_FontGetGlyphAdvancesFuncT , FontGetGlyphAdvancesFuncT , FontGetGlyphAdvancesFuncT_WithClosures , drop_closures_FontGetGlyphAdvancesFuncT , dynamic_FontGetGlyphAdvancesFuncT , genClosure_FontGetGlyphAdvancesFuncT , mk_FontGetGlyphAdvancesFuncT , noFontGetGlyphAdvancesFuncT , noFontGetGlyphAdvancesFuncT_WithClosures, wrap_FontGetGlyphAdvancesFuncT , -- ** FontGetGlyphContourPointFuncT #signal:FontGetGlyphContourPointFuncT# C_FontGetGlyphContourPointFuncT , FontGetGlyphContourPointFuncT , FontGetGlyphContourPointFuncT_WithClosures, drop_closures_FontGetGlyphContourPointFuncT, dynamic_FontGetGlyphContourPointFuncT , genClosure_FontGetGlyphContourPointFuncT, mk_FontGetGlyphContourPointFuncT , noFontGetGlyphContourPointFuncT , noFontGetGlyphContourPointFuncT_WithClosures, wrap_FontGetGlyphContourPointFuncT , -- ** FontGetGlyphExtentsFuncT #signal:FontGetGlyphExtentsFuncT# C_FontGetGlyphExtentsFuncT , FontGetGlyphExtentsFuncT , FontGetGlyphExtentsFuncT_WithClosures , drop_closures_FontGetGlyphExtentsFuncT , dynamic_FontGetGlyphExtentsFuncT , genClosure_FontGetGlyphExtentsFuncT , mk_FontGetGlyphExtentsFuncT , noFontGetGlyphExtentsFuncT , noFontGetGlyphExtentsFuncT_WithClosures , wrap_FontGetGlyphExtentsFuncT , -- ** FontGetGlyphFromNameFuncT #signal:FontGetGlyphFromNameFuncT# C_FontGetGlyphFromNameFuncT , FontGetGlyphFromNameFuncT , FontGetGlyphFromNameFuncT_WithClosures , drop_closures_FontGetGlyphFromNameFuncT , dynamic_FontGetGlyphFromNameFuncT , genClosure_FontGetGlyphFromNameFuncT , mk_FontGetGlyphFromNameFuncT , noFontGetGlyphFromNameFuncT , noFontGetGlyphFromNameFuncT_WithClosures, wrap_FontGetGlyphFromNameFuncT , -- ** FontGetGlyphFuncT #signal:FontGetGlyphFuncT# C_FontGetGlyphFuncT , FontGetGlyphFuncT , FontGetGlyphFuncT_WithClosures , drop_closures_FontGetGlyphFuncT , dynamic_FontGetGlyphFuncT , genClosure_FontGetGlyphFuncT , mk_FontGetGlyphFuncT , noFontGetGlyphFuncT , noFontGetGlyphFuncT_WithClosures , wrap_FontGetGlyphFuncT , -- ** FontGetGlyphKerningFuncT #signal:FontGetGlyphKerningFuncT# C_FontGetGlyphKerningFuncT , FontGetGlyphKerningFuncT , FontGetGlyphKerningFuncT_WithClosures , drop_closures_FontGetGlyphKerningFuncT , dynamic_FontGetGlyphKerningFuncT , genClosure_FontGetGlyphKerningFuncT , mk_FontGetGlyphKerningFuncT , noFontGetGlyphKerningFuncT , noFontGetGlyphKerningFuncT_WithClosures , wrap_FontGetGlyphKerningFuncT , -- ** FontGetGlyphNameFuncT #signal:FontGetGlyphNameFuncT# C_FontGetGlyphNameFuncT , FontGetGlyphNameFuncT , FontGetGlyphNameFuncT_WithClosures , drop_closures_FontGetGlyphNameFuncT , dynamic_FontGetGlyphNameFuncT , genClosure_FontGetGlyphNameFuncT , mk_FontGetGlyphNameFuncT , noFontGetGlyphNameFuncT , noFontGetGlyphNameFuncT_WithClosures , wrap_FontGetGlyphNameFuncT , -- ** FontGetGlyphOriginFuncT #signal:FontGetGlyphOriginFuncT# C_FontGetGlyphOriginFuncT , FontGetGlyphOriginFuncT , FontGetGlyphOriginFuncT_WithClosures , drop_closures_FontGetGlyphOriginFuncT , dynamic_FontGetGlyphOriginFuncT , genClosure_FontGetGlyphOriginFuncT , mk_FontGetGlyphOriginFuncT , noFontGetGlyphOriginFuncT , noFontGetGlyphOriginFuncT_WithClosures , wrap_FontGetGlyphOriginFuncT , -- ** FontGetGlyphShapeFuncT #signal:FontGetGlyphShapeFuncT# C_FontGetGlyphShapeFuncT , FontGetGlyphShapeFuncT , FontGetGlyphShapeFuncT_WithClosures , drop_closures_FontGetGlyphShapeFuncT , dynamic_FontGetGlyphShapeFuncT , genClosure_FontGetGlyphShapeFuncT , mk_FontGetGlyphShapeFuncT , noFontGetGlyphShapeFuncT , noFontGetGlyphShapeFuncT_WithClosures , wrap_FontGetGlyphShapeFuncT , -- ** FontGetNominalGlyphFuncT #signal:FontGetNominalGlyphFuncT# C_FontGetNominalGlyphFuncT , FontGetNominalGlyphFuncT , FontGetNominalGlyphFuncT_WithClosures , drop_closures_FontGetNominalGlyphFuncT , dynamic_FontGetNominalGlyphFuncT , genClosure_FontGetNominalGlyphFuncT , mk_FontGetNominalGlyphFuncT , noFontGetNominalGlyphFuncT , noFontGetNominalGlyphFuncT_WithClosures , wrap_FontGetNominalGlyphFuncT , -- ** FontGetNominalGlyphsFuncT #signal:FontGetNominalGlyphsFuncT# C_FontGetNominalGlyphsFuncT , FontGetNominalGlyphsFuncT , FontGetNominalGlyphsFuncT_WithClosures , drop_closures_FontGetNominalGlyphsFuncT , dynamic_FontGetNominalGlyphsFuncT , genClosure_FontGetNominalGlyphsFuncT , mk_FontGetNominalGlyphsFuncT , noFontGetNominalGlyphsFuncT , noFontGetNominalGlyphsFuncT_WithClosures, wrap_FontGetNominalGlyphsFuncT , -- ** FontGetVariationGlyphFuncT #signal:FontGetVariationGlyphFuncT# C_FontGetVariationGlyphFuncT , FontGetVariationGlyphFuncT , FontGetVariationGlyphFuncT_WithClosures , drop_closures_FontGetVariationGlyphFuncT, dynamic_FontGetVariationGlyphFuncT , genClosure_FontGetVariationGlyphFuncT , mk_FontGetVariationGlyphFuncT , noFontGetVariationGlyphFuncT , noFontGetVariationGlyphFuncT_WithClosures, wrap_FontGetVariationGlyphFuncT , -- ** FontPaintGlyphFuncT #signal:FontPaintGlyphFuncT# C_FontPaintGlyphFuncT , FontPaintGlyphFuncT , FontPaintGlyphFuncT_WithClosures , drop_closures_FontPaintGlyphFuncT , dynamic_FontPaintGlyphFuncT , genClosure_FontPaintGlyphFuncT , mk_FontPaintGlyphFuncT , noFontPaintGlyphFuncT , noFontPaintGlyphFuncT_WithClosures , wrap_FontPaintGlyphFuncT , -- ** PaintColorFuncT #signal:PaintColorFuncT# C_PaintColorFuncT , PaintColorFuncT , PaintColorFuncT_WithClosures , drop_closures_PaintColorFuncT , dynamic_PaintColorFuncT , genClosure_PaintColorFuncT , mk_PaintColorFuncT , noPaintColorFuncT , noPaintColorFuncT_WithClosures , wrap_PaintColorFuncT , -- ** PaintCustomPaletteColorFuncT #signal:PaintCustomPaletteColorFuncT# C_PaintCustomPaletteColorFuncT , PaintCustomPaletteColorFuncT , PaintCustomPaletteColorFuncT_WithClosures, drop_closures_PaintCustomPaletteColorFuncT, dynamic_PaintCustomPaletteColorFuncT , genClosure_PaintCustomPaletteColorFuncT , mk_PaintCustomPaletteColorFuncT , noPaintCustomPaletteColorFuncT , noPaintCustomPaletteColorFuncT_WithClosures, wrap_PaintCustomPaletteColorFuncT , -- ** PaintImageFuncT #signal:PaintImageFuncT# C_PaintImageFuncT , PaintImageFuncT , PaintImageFuncT_WithClosures , drop_closures_PaintImageFuncT , dynamic_PaintImageFuncT , genClosure_PaintImageFuncT , mk_PaintImageFuncT , noPaintImageFuncT , noPaintImageFuncT_WithClosures , wrap_PaintImageFuncT , -- ** PaintLinearGradientFuncT #signal:PaintLinearGradientFuncT# C_PaintLinearGradientFuncT , PaintLinearGradientFuncT , PaintLinearGradientFuncT_WithClosures , drop_closures_PaintLinearGradientFuncT , dynamic_PaintLinearGradientFuncT , genClosure_PaintLinearGradientFuncT , mk_PaintLinearGradientFuncT , noPaintLinearGradientFuncT , noPaintLinearGradientFuncT_WithClosures , wrap_PaintLinearGradientFuncT , -- ** PaintPopClipFuncT #signal:PaintPopClipFuncT# C_PaintPopClipFuncT , PaintPopClipFuncT , PaintPopClipFuncT_WithClosures , drop_closures_PaintPopClipFuncT , dynamic_PaintPopClipFuncT , genClosure_PaintPopClipFuncT , mk_PaintPopClipFuncT , noPaintPopClipFuncT , noPaintPopClipFuncT_WithClosures , wrap_PaintPopClipFuncT , -- ** PaintPopGroupFuncT #signal:PaintPopGroupFuncT# C_PaintPopGroupFuncT , PaintPopGroupFuncT , PaintPopGroupFuncT_WithClosures , drop_closures_PaintPopGroupFuncT , dynamic_PaintPopGroupFuncT , genClosure_PaintPopGroupFuncT , mk_PaintPopGroupFuncT , noPaintPopGroupFuncT , noPaintPopGroupFuncT_WithClosures , wrap_PaintPopGroupFuncT , -- ** PaintPopTransformFuncT #signal:PaintPopTransformFuncT# C_PaintPopTransformFuncT , PaintPopTransformFuncT , PaintPopTransformFuncT_WithClosures , drop_closures_PaintPopTransformFuncT , dynamic_PaintPopTransformFuncT , genClosure_PaintPopTransformFuncT , mk_PaintPopTransformFuncT , noPaintPopTransformFuncT , noPaintPopTransformFuncT_WithClosures , wrap_PaintPopTransformFuncT , -- ** PaintPushClipGlyphFuncT #signal:PaintPushClipGlyphFuncT# C_PaintPushClipGlyphFuncT , PaintPushClipGlyphFuncT , PaintPushClipGlyphFuncT_WithClosures , drop_closures_PaintPushClipGlyphFuncT , dynamic_PaintPushClipGlyphFuncT , genClosure_PaintPushClipGlyphFuncT , mk_PaintPushClipGlyphFuncT , noPaintPushClipGlyphFuncT , noPaintPushClipGlyphFuncT_WithClosures , wrap_PaintPushClipGlyphFuncT , -- ** PaintPushClipRectangleFuncT #signal:PaintPushClipRectangleFuncT# C_PaintPushClipRectangleFuncT , PaintPushClipRectangleFuncT , PaintPushClipRectangleFuncT_WithClosures, drop_closures_PaintPushClipRectangleFuncT, dynamic_PaintPushClipRectangleFuncT , genClosure_PaintPushClipRectangleFuncT , mk_PaintPushClipRectangleFuncT , noPaintPushClipRectangleFuncT , noPaintPushClipRectangleFuncT_WithClosures, wrap_PaintPushClipRectangleFuncT , -- ** PaintPushGroupFuncT #signal:PaintPushGroupFuncT# C_PaintPushGroupFuncT , PaintPushGroupFuncT , PaintPushGroupFuncT_WithClosures , drop_closures_PaintPushGroupFuncT , dynamic_PaintPushGroupFuncT , genClosure_PaintPushGroupFuncT , mk_PaintPushGroupFuncT , noPaintPushGroupFuncT , noPaintPushGroupFuncT_WithClosures , wrap_PaintPushGroupFuncT , -- ** PaintPushTransformFuncT #signal:PaintPushTransformFuncT# C_PaintPushTransformFuncT , PaintPushTransformFuncT , PaintPushTransformFuncT_WithClosures , drop_closures_PaintPushTransformFuncT , dynamic_PaintPushTransformFuncT , genClosure_PaintPushTransformFuncT , mk_PaintPushTransformFuncT , noPaintPushTransformFuncT , noPaintPushTransformFuncT_WithClosures , wrap_PaintPushTransformFuncT , -- ** PaintRadialGradientFuncT #signal:PaintRadialGradientFuncT# C_PaintRadialGradientFuncT , PaintRadialGradientFuncT , PaintRadialGradientFuncT_WithClosures , drop_closures_PaintRadialGradientFuncT , dynamic_PaintRadialGradientFuncT , genClosure_PaintRadialGradientFuncT , mk_PaintRadialGradientFuncT , noPaintRadialGradientFuncT , noPaintRadialGradientFuncT_WithClosures , wrap_PaintRadialGradientFuncT , -- ** PaintSweepGradientFuncT #signal:PaintSweepGradientFuncT# C_PaintSweepGradientFuncT , PaintSweepGradientFuncT , PaintSweepGradientFuncT_WithClosures , drop_closures_PaintSweepGradientFuncT , dynamic_PaintSweepGradientFuncT , genClosure_PaintSweepGradientFuncT , mk_PaintSweepGradientFuncT , noPaintSweepGradientFuncT , noPaintSweepGradientFuncT_WithClosures , wrap_PaintSweepGradientFuncT , -- ** ReferenceTableFuncT #signal:ReferenceTableFuncT# C_ReferenceTableFuncT , ReferenceTableFuncT , ReferenceTableFuncT_WithClosures , drop_closures_ReferenceTableFuncT , dynamic_ReferenceTableFuncT , genClosure_ReferenceTableFuncT , mk_ReferenceTableFuncT , noReferenceTableFuncT , noReferenceTableFuncT_WithClosures , wrap_ReferenceTableFuncT , -- ** UnicodeCombiningClassFuncT #signal:UnicodeCombiningClassFuncT# C_UnicodeCombiningClassFuncT , UnicodeCombiningClassFuncT , UnicodeCombiningClassFuncT_WithClosures , drop_closures_UnicodeCombiningClassFuncT, dynamic_UnicodeCombiningClassFuncT , genClosure_UnicodeCombiningClassFuncT , mk_UnicodeCombiningClassFuncT , noUnicodeCombiningClassFuncT , noUnicodeCombiningClassFuncT_WithClosures, wrap_UnicodeCombiningClassFuncT , -- ** UnicodeComposeFuncT #signal:UnicodeComposeFuncT# C_UnicodeComposeFuncT , UnicodeComposeFuncT , UnicodeComposeFuncT_WithClosures , drop_closures_UnicodeComposeFuncT , dynamic_UnicodeComposeFuncT , genClosure_UnicodeComposeFuncT , mk_UnicodeComposeFuncT , noUnicodeComposeFuncT , noUnicodeComposeFuncT_WithClosures , wrap_UnicodeComposeFuncT , -- ** UnicodeDecomposeCompatibilityFuncT #signal:UnicodeDecomposeCompatibilityFuncT# C_UnicodeDecomposeCompatibilityFuncT , UnicodeDecomposeCompatibilityFuncT , UnicodeDecomposeCompatibilityFuncT_WithClosures, drop_closures_UnicodeDecomposeCompatibilityFuncT, dynamic_UnicodeDecomposeCompatibilityFuncT, genClosure_UnicodeDecomposeCompatibilityFuncT, mk_UnicodeDecomposeCompatibilityFuncT , noUnicodeDecomposeCompatibilityFuncT , noUnicodeDecomposeCompatibilityFuncT_WithClosures, wrap_UnicodeDecomposeCompatibilityFuncT , -- ** UnicodeDecomposeFuncT #signal:UnicodeDecomposeFuncT# C_UnicodeDecomposeFuncT , UnicodeDecomposeFuncT , UnicodeDecomposeFuncT_WithClosures , drop_closures_UnicodeDecomposeFuncT , dynamic_UnicodeDecomposeFuncT , genClosure_UnicodeDecomposeFuncT , mk_UnicodeDecomposeFuncT , noUnicodeDecomposeFuncT , noUnicodeDecomposeFuncT_WithClosures , wrap_UnicodeDecomposeFuncT , -- ** UnicodeEastasianWidthFuncT #signal:UnicodeEastasianWidthFuncT# C_UnicodeEastasianWidthFuncT , UnicodeEastasianWidthFuncT , UnicodeEastasianWidthFuncT_WithClosures , drop_closures_UnicodeEastasianWidthFuncT, dynamic_UnicodeEastasianWidthFuncT , genClosure_UnicodeEastasianWidthFuncT , mk_UnicodeEastasianWidthFuncT , noUnicodeEastasianWidthFuncT , noUnicodeEastasianWidthFuncT_WithClosures, wrap_UnicodeEastasianWidthFuncT , -- ** UnicodeGeneralCategoryFuncT #signal:UnicodeGeneralCategoryFuncT# C_UnicodeGeneralCategoryFuncT , UnicodeGeneralCategoryFuncT , UnicodeGeneralCategoryFuncT_WithClosures, drop_closures_UnicodeGeneralCategoryFuncT, dynamic_UnicodeGeneralCategoryFuncT , genClosure_UnicodeGeneralCategoryFuncT , mk_UnicodeGeneralCategoryFuncT , noUnicodeGeneralCategoryFuncT , noUnicodeGeneralCategoryFuncT_WithClosures, wrap_UnicodeGeneralCategoryFuncT , -- ** UnicodeMirroringFuncT #signal:UnicodeMirroringFuncT# C_UnicodeMirroringFuncT , UnicodeMirroringFuncT , UnicodeMirroringFuncT_WithClosures , drop_closures_UnicodeMirroringFuncT , dynamic_UnicodeMirroringFuncT , genClosure_UnicodeMirroringFuncT , mk_UnicodeMirroringFuncT , noUnicodeMirroringFuncT , noUnicodeMirroringFuncT_WithClosures , wrap_UnicodeMirroringFuncT , -- ** UnicodeScriptFuncT #signal:UnicodeScriptFuncT# 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.GHashTable as B.GHT import qualified Data.GI.Base.GVariant as B.GVariant import qualified Data.GI.Base.GValue as B.GValue import qualified Data.GI.Base.GParamSpec as B.GParamSpec import qualified Data.GI.Base.CallStack as B.CallStack import qualified Data.GI.Base.Properties as B.Properties import qualified Data.GI.Base.Signals as B.Signals import qualified Control.Monad.IO.Class as MIO import qualified Data.Coerce as Coerce import qualified Data.Text as T import qualified Data.Kind as DK import qualified Data.ByteString.Char8 as B import qualified Data.Map as Map import qualified Foreign.Ptr as FP import qualified GHC.OverloadedLabels as OL import qualified GHC.Records as R 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.ColorLineT as HarfBuzz.ColorLineT import {-# SOURCE #-} qualified GI.HarfBuzz.Structs.ColorStopT as HarfBuzz.ColorStopT import {-# SOURCE #-} qualified GI.HarfBuzz.Structs.DrawFuncsT as HarfBuzz.DrawFuncsT import {-# SOURCE #-} qualified GI.HarfBuzz.Structs.DrawStateT as HarfBuzz.DrawStateT 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.PaintFuncsT as HarfBuzz.PaintFuncsT import {-# SOURCE #-} qualified GI.HarfBuzz.Structs.UnicodeFuncsT as HarfBuzz.UnicodeFuncsT -- callback UnicodeScriptFuncT {- Callable { returnType = Just (TInterface Name { namespace = "HarfBuzz" , name = "script_t" }) , returnMayBeNull = False , returnTransfer = TransferNothing , returnDocumentation = Documentation { rawDocText = Just "The #hb_script_t of @unicode" , sinceVersion = Nothing } , args = [ Arg { argCName = "ufuncs" , argType = TInterface Name { namespace = "HarfBuzz" , name = "unicode_funcs_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "A Unicode-functions structure" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "unicode" , argType = TBasicType TUInt32 , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "The code point to query" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "user_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "User data pointer passed by the caller" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = 2 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } ] , skipReturn = False , callableThrows = False , callableDeprecated = Nothing , callableDocumentation = Documentation { rawDocText = Just "A virtual method for the #hb_unicode_funcs_t structure.\n\nThis method should retrieve the Script property for a\nspecified Unicode code point." , sinceVersion = Nothing } , callableResolvable = Nothing } -} -- | Type for the callback on the (unwrapped) C side. type C_UnicodeScriptFuncT = Ptr HarfBuzz.UnicodeFuncsT.UnicodeFuncsT -> Word32 -> Ptr () -> IO CUInt -- Args: [ Arg -- { argCName = "ufuncs" -- , argType = -- TInterface -- Name { namespace = "HarfBuzz" , name = "unicode_funcs_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "A Unicode-functions structure" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "unicode" -- , argType = TBasicType TUInt32 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The code point to query" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "user_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "User data pointer passed by the caller" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = 2 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just -- (TInterface Name { namespace = "HarfBuzz" , name = "script_t" }) -- throws : False -- Skip return : False foreign import ccall "dynamic" __dynamic_C_UnicodeScriptFuncT :: FunPtr C_UnicodeScriptFuncT -> C_UnicodeScriptFuncT -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell. dynamic_UnicodeScriptFuncT :: (B.CallStack.HasCallStack, MonadIO m) => FunPtr C_UnicodeScriptFuncT -> HarfBuzz.UnicodeFuncsT.UnicodeFuncsT -- ^ /@ufuncs@/: A Unicode-functions structure -> Word32 -- ^ /@unicode@/: The code point to query -> Ptr () -- ^ /@userData@/: User data pointer passed by the caller -> m HarfBuzz.Enums.ScriptT -- ^ __Returns:__ The t'GI.HarfBuzz.Enums.ScriptT' of /@unicode@/ dynamic_UnicodeScriptFuncT :: forall (m :: * -> *). (HasCallStack, MonadIO m) => FunPtr C_UnicodeScriptFuncT -> UnicodeFuncsT -> Word32 -> Ptr () -> m ScriptT dynamic_UnicodeScriptFuncT FunPtr C_UnicodeScriptFuncT __funPtr UnicodeFuncsT ufuncs Word32 unicode Ptr () userData = IO ScriptT -> m ScriptT forall a. IO a -> m a 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 a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return ScriptT result' -- | Generate a function pointer callable from C code, from a `C_UnicodeScriptFuncT`. foreign import ccall "wrapper" mk_UnicodeScriptFuncT :: C_UnicodeScriptFuncT -> IO (FunPtr C_UnicodeScriptFuncT) -- | A virtual method for the t'GI.HarfBuzz.Structs.UnicodeFuncsT.UnicodeFuncsT' structure. -- -- This method should retrieve the Script property for a -- specified Unicode code point. type UnicodeScriptFuncT = HarfBuzz.UnicodeFuncsT.UnicodeFuncsT -- ^ /@ufuncs@/: A Unicode-functions structure -> Word32 -- ^ /@unicode@/: The code point to query -> IO HarfBuzz.Enums.ScriptT -- ^ __Returns:__ The t'GI.HarfBuzz.Enums.ScriptT' of /@unicode@/ -- | A convenience synonym for @`Nothing` :: `Maybe` `UnicodeScriptFuncT`@. noUnicodeScriptFuncT :: Maybe UnicodeScriptFuncT noUnicodeScriptFuncT :: Maybe UnicodeScriptFuncT noUnicodeScriptFuncT = Maybe UnicodeScriptFuncT forall a. Maybe a Nothing -- | A virtual method for the t'GI.HarfBuzz.Structs.UnicodeFuncsT.UnicodeFuncsT' structure. -- -- This method should retrieve the Script property for a -- specified Unicode code point. type UnicodeScriptFuncT_WithClosures = HarfBuzz.UnicodeFuncsT.UnicodeFuncsT -- ^ /@ufuncs@/: A Unicode-functions structure -> Word32 -- ^ /@unicode@/: The code point to query -> Ptr () -- ^ /@userData@/: User data pointer passed by the caller -> IO HarfBuzz.Enums.ScriptT -- ^ __Returns:__ The t'GI.HarfBuzz.Enums.ScriptT' of /@unicode@/ -- | A convenience synonym for @`Nothing` :: `Maybe` `UnicodeScriptFuncT_WithClosures`@. noUnicodeScriptFuncT_WithClosures :: Maybe UnicodeScriptFuncT_WithClosures noUnicodeScriptFuncT_WithClosures :: Maybe UnicodeScriptFuncT_WithClosures noUnicodeScriptFuncT_WithClosures = Maybe UnicodeScriptFuncT_WithClosures forall a. Maybe a Nothing -- | A simple wrapper that ignores the closure arguments. drop_closures_UnicodeScriptFuncT :: UnicodeScriptFuncT -> UnicodeScriptFuncT_WithClosures drop_closures_UnicodeScriptFuncT :: UnicodeScriptFuncT -> UnicodeScriptFuncT_WithClosures drop_closures_UnicodeScriptFuncT UnicodeScriptFuncT _f UnicodeFuncsT ufuncs Word32 unicode Ptr () _ = UnicodeScriptFuncT _f UnicodeFuncsT ufuncs Word32 unicode -- | Wrap the callback into a `GClosure`. genClosure_UnicodeScriptFuncT :: MonadIO m => UnicodeScriptFuncT -> m (GClosure C_UnicodeScriptFuncT) genClosure_UnicodeScriptFuncT :: forall (m :: * -> *). MonadIO m => UnicodeScriptFuncT -> m (GClosure C_UnicodeScriptFuncT) genClosure_UnicodeScriptFuncT UnicodeScriptFuncT cb = IO (GClosure C_UnicodeScriptFuncT) -> m (GClosure C_UnicodeScriptFuncT) forall a. IO a -> m a 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 a b. IO a -> (a -> IO b) -> IO b 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 a `UnicodeScriptFuncT` into a `C_UnicodeScriptFuncT`. wrap_UnicodeScriptFuncT :: Maybe (Ptr (FunPtr C_UnicodeScriptFuncT)) -> UnicodeScriptFuncT_WithClosures -> C_UnicodeScriptFuncT wrap_UnicodeScriptFuncT :: Maybe (Ptr (FunPtr C_UnicodeScriptFuncT)) -> UnicodeScriptFuncT_WithClosures -> C_UnicodeScriptFuncT wrap_UnicodeScriptFuncT Maybe (Ptr (FunPtr C_UnicodeScriptFuncT)) gi'funptrptr UnicodeScriptFuncT_WithClosures gi'cb Ptr UnicodeFuncsT ufuncs Word32 unicode Ptr () userData = do Ptr UnicodeFuncsT -> (UnicodeFuncsT -> IO CUInt) -> IO CUInt forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr UnicodeFuncsT ufuncs ((UnicodeFuncsT -> IO CUInt) -> IO CUInt) -> (UnicodeFuncsT -> IO CUInt) -> IO CUInt forall a b. (a -> b) -> a -> b $ \UnicodeFuncsT ufuncs' -> do ScriptT result <- UnicodeScriptFuncT_WithClosures gi'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)) gi'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 a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return CUInt result' -- callback UnicodeMirroringFuncT {- Callable { returnType = Just (TBasicType TUInt32) , returnMayBeNull = False , returnTransfer = TransferNothing , returnDocumentation = Documentation { rawDocText = Just "The #hb_codepoint_t of the Mirroring Glyph for @unicode" , sinceVersion = Nothing } , args = [ Arg { argCName = "ufuncs" , argType = TInterface Name { namespace = "HarfBuzz" , name = "unicode_funcs_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "A Unicode-functions structure" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "unicode" , argType = TBasicType TUInt32 , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "The code point to query" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "user_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "User data pointer passed by the caller" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = 2 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } ] , skipReturn = False , callableThrows = False , callableDeprecated = Nothing , callableDocumentation = Documentation { rawDocText = Just "A virtual method for the #hb_unicode_funcs_t structure.\n\nThis method should retrieve the Bi-Directional Mirroring Glyph\ncode point for a specified Unicode code point.\n\n<note>Note: If a code point does not have a specified\nBi-Directional Mirroring Glyph defined, the method should\nreturn the original code point.</note>" , sinceVersion = Nothing } , callableResolvable = Nothing } -} -- | Type for the callback on the (unwrapped) C side. type C_UnicodeMirroringFuncT = Ptr HarfBuzz.UnicodeFuncsT.UnicodeFuncsT -> Word32 -> Ptr () -> IO Word32 -- Args: [ Arg -- { argCName = "ufuncs" -- , argType = -- TInterface -- Name { namespace = "HarfBuzz" , name = "unicode_funcs_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "A Unicode-functions structure" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "unicode" -- , argType = TBasicType TUInt32 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The code point to query" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "user_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "User data pointer passed by the caller" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = 2 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TUInt32) -- throws : False -- Skip return : False foreign import ccall "dynamic" __dynamic_C_UnicodeMirroringFuncT :: FunPtr C_UnicodeMirroringFuncT -> C_UnicodeMirroringFuncT -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell. dynamic_UnicodeMirroringFuncT :: (B.CallStack.HasCallStack, MonadIO m) => FunPtr C_UnicodeMirroringFuncT -> HarfBuzz.UnicodeFuncsT.UnicodeFuncsT -- ^ /@ufuncs@/: A Unicode-functions structure -> Word32 -- ^ /@unicode@/: The code point to query -> Ptr () -- ^ /@userData@/: User data pointer passed by the caller -> m Word32 -- ^ __Returns:__ The @/hb_codepoint_t/@ of the Mirroring Glyph for /@unicode@/ dynamic_UnicodeMirroringFuncT :: forall (m :: * -> *). (HasCallStack, MonadIO m) => FunPtr C_UnicodeMirroringFuncT -> UnicodeFuncsT -> Word32 -> Ptr () -> m Word32 dynamic_UnicodeMirroringFuncT FunPtr C_UnicodeMirroringFuncT __funPtr UnicodeFuncsT ufuncs Word32 unicode Ptr () userData = IO Word32 -> m Word32 forall a. IO a -> m a 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 a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return Word32 result -- | Generate a function pointer callable from C code, from a `C_UnicodeMirroringFuncT`. foreign import ccall "wrapper" mk_UnicodeMirroringFuncT :: C_UnicodeMirroringFuncT -> IO (FunPtr C_UnicodeMirroringFuncT) -- | A virtual method for the t'GI.HarfBuzz.Structs.UnicodeFuncsT.UnicodeFuncsT' structure. -- -- This method should retrieve the Bi-Directional Mirroring Glyph -- code point for a specified Unicode code point. -- -- \<note>Note: If a code point does not have a specified -- Bi-Directional Mirroring Glyph defined, the method should -- return the original code point.\<\/note> type UnicodeMirroringFuncT = HarfBuzz.UnicodeFuncsT.UnicodeFuncsT -- ^ /@ufuncs@/: A Unicode-functions structure -> Word32 -- ^ /@unicode@/: The code point to query -> IO Word32 -- ^ __Returns:__ The @/hb_codepoint_t/@ of the Mirroring Glyph for /@unicode@/ -- | A convenience synonym for @`Nothing` :: `Maybe` `UnicodeMirroringFuncT`@. noUnicodeMirroringFuncT :: Maybe UnicodeMirroringFuncT noUnicodeMirroringFuncT :: Maybe UnicodeMirroringFuncT noUnicodeMirroringFuncT = Maybe UnicodeMirroringFuncT forall a. Maybe a Nothing -- | A virtual method for the t'GI.HarfBuzz.Structs.UnicodeFuncsT.UnicodeFuncsT' structure. -- -- This method should retrieve the Bi-Directional Mirroring Glyph -- code point for a specified Unicode code point. -- -- \<note>Note: If a code point does not have a specified -- Bi-Directional Mirroring Glyph defined, the method should -- return the original code point.\<\/note> type UnicodeMirroringFuncT_WithClosures = HarfBuzz.UnicodeFuncsT.UnicodeFuncsT -- ^ /@ufuncs@/: A Unicode-functions structure -> Word32 -- ^ /@unicode@/: The code point to query -> Ptr () -- ^ /@userData@/: User data pointer passed by the caller -> IO Word32 -- ^ __Returns:__ The @/hb_codepoint_t/@ of the Mirroring Glyph for /@unicode@/ -- | A convenience synonym for @`Nothing` :: `Maybe` `UnicodeMirroringFuncT_WithClosures`@. noUnicodeMirroringFuncT_WithClosures :: Maybe UnicodeMirroringFuncT_WithClosures noUnicodeMirroringFuncT_WithClosures :: Maybe UnicodeMirroringFuncT_WithClosures noUnicodeMirroringFuncT_WithClosures = Maybe UnicodeMirroringFuncT_WithClosures forall a. Maybe a Nothing -- | A simple wrapper that ignores the closure arguments. drop_closures_UnicodeMirroringFuncT :: UnicodeMirroringFuncT -> UnicodeMirroringFuncT_WithClosures drop_closures_UnicodeMirroringFuncT :: UnicodeMirroringFuncT -> UnicodeMirroringFuncT_WithClosures drop_closures_UnicodeMirroringFuncT UnicodeMirroringFuncT _f UnicodeFuncsT ufuncs Word32 unicode Ptr () _ = UnicodeMirroringFuncT _f UnicodeFuncsT ufuncs Word32 unicode -- | Wrap the callback into a `GClosure`. genClosure_UnicodeMirroringFuncT :: MonadIO m => UnicodeMirroringFuncT -> m (GClosure C_UnicodeMirroringFuncT) genClosure_UnicodeMirroringFuncT :: forall (m :: * -> *). MonadIO m => UnicodeMirroringFuncT -> m (GClosure C_UnicodeMirroringFuncT) genClosure_UnicodeMirroringFuncT UnicodeMirroringFuncT cb = IO (GClosure C_UnicodeMirroringFuncT) -> m (GClosure C_UnicodeMirroringFuncT) forall a. IO a -> m a 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 a b. IO a -> (a -> IO b) -> IO b 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 a `UnicodeMirroringFuncT` into a `C_UnicodeMirroringFuncT`. wrap_UnicodeMirroringFuncT :: Maybe (Ptr (FunPtr C_UnicodeMirroringFuncT)) -> UnicodeMirroringFuncT_WithClosures -> C_UnicodeMirroringFuncT wrap_UnicodeMirroringFuncT :: Maybe (Ptr (FunPtr C_UnicodeMirroringFuncT)) -> UnicodeMirroringFuncT_WithClosures -> C_UnicodeMirroringFuncT wrap_UnicodeMirroringFuncT Maybe (Ptr (FunPtr C_UnicodeMirroringFuncT)) gi'funptrptr UnicodeMirroringFuncT_WithClosures gi'cb Ptr UnicodeFuncsT ufuncs Word32 unicode Ptr () userData = do Ptr UnicodeFuncsT -> (UnicodeFuncsT -> IO Word32) -> IO Word32 forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr UnicodeFuncsT ufuncs ((UnicodeFuncsT -> IO Word32) -> IO Word32) -> (UnicodeFuncsT -> IO Word32) -> IO Word32 forall a b. (a -> b) -> a -> b $ \UnicodeFuncsT ufuncs' -> do Word32 result <- UnicodeMirroringFuncT_WithClosures gi'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)) gi'funptrptr Word32 -> IO Word32 forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return Word32 result -- callback UnicodeGeneralCategoryFuncT {- Callable { returnType = Just (TInterface Name { namespace = "HarfBuzz" , name = "unicode_general_category_t" }) , returnMayBeNull = False , returnTransfer = TransferNothing , returnDocumentation = Documentation { rawDocText = Just "The #hb_unicode_general_category_t of @unicode" , sinceVersion = Nothing } , args = [ Arg { argCName = "ufuncs" , argType = TInterface Name { namespace = "HarfBuzz" , name = "unicode_funcs_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "A Unicode-functions structure" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "unicode" , argType = TBasicType TUInt32 , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "The code point to query" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "user_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "User data pointer passed by the caller" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = 2 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } ] , skipReturn = False , callableThrows = False , callableDeprecated = Nothing , callableDocumentation = Documentation { rawDocText = Just "A virtual method for the #hb_unicode_funcs_t structure.\n\nThis method should retrieve the General Category property for\na specified Unicode code point." , sinceVersion = Nothing } , callableResolvable = Nothing } -} -- | Type for the callback on the (unwrapped) C side. type C_UnicodeGeneralCategoryFuncT = Ptr HarfBuzz.UnicodeFuncsT.UnicodeFuncsT -> Word32 -> Ptr () -> IO CUInt -- Args: [ Arg -- { argCName = "ufuncs" -- , argType = -- TInterface -- Name { namespace = "HarfBuzz" , name = "unicode_funcs_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "A Unicode-functions structure" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "unicode" -- , argType = TBasicType TUInt32 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The code point to query" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "user_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "User data pointer passed by the caller" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = 2 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just -- (TInterface -- Name -- { namespace = "HarfBuzz" , name = "unicode_general_category_t" }) -- throws : False -- Skip return : False foreign import ccall "dynamic" __dynamic_C_UnicodeGeneralCategoryFuncT :: FunPtr C_UnicodeGeneralCategoryFuncT -> C_UnicodeGeneralCategoryFuncT -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell. dynamic_UnicodeGeneralCategoryFuncT :: (B.CallStack.HasCallStack, MonadIO m) => FunPtr C_UnicodeGeneralCategoryFuncT -> HarfBuzz.UnicodeFuncsT.UnicodeFuncsT -- ^ /@ufuncs@/: A Unicode-functions structure -> Word32 -- ^ /@unicode@/: The code point to query -> Ptr () -- ^ /@userData@/: User data pointer passed by the caller -> m HarfBuzz.Enums.UnicodeGeneralCategoryT -- ^ __Returns:__ The t'GI.HarfBuzz.Enums.UnicodeGeneralCategoryT' of /@unicode@/ dynamic_UnicodeGeneralCategoryFuncT :: forall (m :: * -> *). (HasCallStack, MonadIO m) => FunPtr C_UnicodeScriptFuncT -> UnicodeFuncsT -> Word32 -> Ptr () -> m UnicodeGeneralCategoryT dynamic_UnicodeGeneralCategoryFuncT FunPtr C_UnicodeScriptFuncT __funPtr UnicodeFuncsT ufuncs Word32 unicode Ptr () userData = IO UnicodeGeneralCategoryT -> m UnicodeGeneralCategoryT forall a. IO a -> m a 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 a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return UnicodeGeneralCategoryT result' -- | Generate a function pointer callable from C code, from a `C_UnicodeGeneralCategoryFuncT`. foreign import ccall "wrapper" mk_UnicodeGeneralCategoryFuncT :: C_UnicodeGeneralCategoryFuncT -> IO (FunPtr C_UnicodeGeneralCategoryFuncT) -- | A virtual method for the t'GI.HarfBuzz.Structs.UnicodeFuncsT.UnicodeFuncsT' structure. -- -- This method should retrieve the General Category property for -- a specified Unicode code point. type UnicodeGeneralCategoryFuncT = HarfBuzz.UnicodeFuncsT.UnicodeFuncsT -- ^ /@ufuncs@/: A Unicode-functions structure -> Word32 -- ^ /@unicode@/: The code point to query -> IO HarfBuzz.Enums.UnicodeGeneralCategoryT -- ^ __Returns:__ The t'GI.HarfBuzz.Enums.UnicodeGeneralCategoryT' of /@unicode@/ -- | A convenience synonym for @`Nothing` :: `Maybe` `UnicodeGeneralCategoryFuncT`@. noUnicodeGeneralCategoryFuncT :: Maybe UnicodeGeneralCategoryFuncT noUnicodeGeneralCategoryFuncT :: Maybe UnicodeGeneralCategoryFuncT noUnicodeGeneralCategoryFuncT = Maybe UnicodeGeneralCategoryFuncT forall a. Maybe a Nothing -- | A virtual method for the t'GI.HarfBuzz.Structs.UnicodeFuncsT.UnicodeFuncsT' structure. -- -- This method should retrieve the General Category property for -- a specified Unicode code point. type UnicodeGeneralCategoryFuncT_WithClosures = HarfBuzz.UnicodeFuncsT.UnicodeFuncsT -- ^ /@ufuncs@/: A Unicode-functions structure -> Word32 -- ^ /@unicode@/: The code point to query -> Ptr () -- ^ /@userData@/: User data pointer passed by the caller -> IO HarfBuzz.Enums.UnicodeGeneralCategoryT -- ^ __Returns:__ The t'GI.HarfBuzz.Enums.UnicodeGeneralCategoryT' of /@unicode@/ -- | A convenience synonym for @`Nothing` :: `Maybe` `UnicodeGeneralCategoryFuncT_WithClosures`@. noUnicodeGeneralCategoryFuncT_WithClosures :: Maybe UnicodeGeneralCategoryFuncT_WithClosures noUnicodeGeneralCategoryFuncT_WithClosures :: Maybe UnicodeGeneralCategoryFuncT_WithClosures noUnicodeGeneralCategoryFuncT_WithClosures = Maybe UnicodeGeneralCategoryFuncT_WithClosures forall a. Maybe a Nothing -- | A simple wrapper that ignores the closure arguments. drop_closures_UnicodeGeneralCategoryFuncT :: UnicodeGeneralCategoryFuncT -> UnicodeGeneralCategoryFuncT_WithClosures drop_closures_UnicodeGeneralCategoryFuncT :: UnicodeGeneralCategoryFuncT -> UnicodeGeneralCategoryFuncT_WithClosures drop_closures_UnicodeGeneralCategoryFuncT UnicodeGeneralCategoryFuncT _f UnicodeFuncsT ufuncs Word32 unicode Ptr () _ = UnicodeGeneralCategoryFuncT _f UnicodeFuncsT ufuncs Word32 unicode -- | Wrap the callback into a `GClosure`. genClosure_UnicodeGeneralCategoryFuncT :: MonadIO m => UnicodeGeneralCategoryFuncT -> m (GClosure C_UnicodeGeneralCategoryFuncT) genClosure_UnicodeGeneralCategoryFuncT :: forall (m :: * -> *). MonadIO m => UnicodeGeneralCategoryFuncT -> m (GClosure C_UnicodeScriptFuncT) genClosure_UnicodeGeneralCategoryFuncT UnicodeGeneralCategoryFuncT cb = IO (GClosure C_UnicodeScriptFuncT) -> m (GClosure C_UnicodeScriptFuncT) forall a. IO a -> m a 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 a b. IO a -> (a -> IO b) -> IO b 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 a `UnicodeGeneralCategoryFuncT` into a `C_UnicodeGeneralCategoryFuncT`. wrap_UnicodeGeneralCategoryFuncT :: Maybe (Ptr (FunPtr C_UnicodeGeneralCategoryFuncT)) -> UnicodeGeneralCategoryFuncT_WithClosures -> C_UnicodeGeneralCategoryFuncT wrap_UnicodeGeneralCategoryFuncT :: Maybe (Ptr (FunPtr C_UnicodeScriptFuncT)) -> UnicodeGeneralCategoryFuncT_WithClosures -> C_UnicodeScriptFuncT wrap_UnicodeGeneralCategoryFuncT Maybe (Ptr (FunPtr C_UnicodeScriptFuncT)) gi'funptrptr UnicodeGeneralCategoryFuncT_WithClosures gi'cb Ptr UnicodeFuncsT ufuncs Word32 unicode Ptr () userData = do Ptr UnicodeFuncsT -> (UnicodeFuncsT -> IO CUInt) -> IO CUInt forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr UnicodeFuncsT ufuncs ((UnicodeFuncsT -> IO CUInt) -> IO CUInt) -> (UnicodeFuncsT -> IO CUInt) -> IO CUInt forall a b. (a -> b) -> a -> b $ \UnicodeFuncsT ufuncs' -> do UnicodeGeneralCategoryT result <- UnicodeGeneralCategoryFuncT_WithClosures gi'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)) gi'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 a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return CUInt result' -- callback UnicodeEastasianWidthFuncT {- Callable { returnType = Just (TBasicType TUInt) , returnMayBeNull = False , returnTransfer = TransferNothing , returnDocumentation = Documentation { rawDocText = Nothing , sinceVersion = Nothing } , args = [ Arg { argCName = "ufuncs" , argType = TInterface Name { namespace = "HarfBuzz" , name = "unicode_funcs_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "A Unicode-functions structure" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "unicode" , argType = TBasicType TUInt32 , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "The code point to query" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "user_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "User data pointer passed by the caller" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = 2 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } ] , skipReturn = False , callableThrows = False , callableDeprecated = Just DeprecationInfo { deprecatedSinceVersion = Just "2.0.0" , deprecationMessage = Nothing } , callableDocumentation = Documentation { rawDocText = Just "A virtual method for the #hb_unicode_funcs_t structure." , sinceVersion = Nothing } , callableResolvable = Nothing } -} -- | Type for the callback on the (unwrapped) C side. type C_UnicodeEastasianWidthFuncT = Ptr HarfBuzz.UnicodeFuncsT.UnicodeFuncsT -> Word32 -> Ptr () -> IO Word32 -- Args: [ Arg -- { argCName = "ufuncs" -- , argType = -- TInterface -- Name { namespace = "HarfBuzz" , name = "unicode_funcs_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "A Unicode-functions structure" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "unicode" -- , argType = TBasicType TUInt32 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The code point to query" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "user_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "User data pointer passed by the caller" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = 2 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TUInt) -- throws : False -- Skip return : False foreign import ccall "dynamic" __dynamic_C_UnicodeEastasianWidthFuncT :: FunPtr C_UnicodeEastasianWidthFuncT -> C_UnicodeEastasianWidthFuncT -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell. dynamic_UnicodeEastasianWidthFuncT :: (B.CallStack.HasCallStack, MonadIO m) => FunPtr C_UnicodeEastasianWidthFuncT -> HarfBuzz.UnicodeFuncsT.UnicodeFuncsT -- ^ /@ufuncs@/: A Unicode-functions structure -> Word32 -- ^ /@unicode@/: The code point to query -> Ptr () -- ^ /@userData@/: User data pointer passed by the caller -> m Word32 dynamic_UnicodeEastasianWidthFuncT :: forall (m :: * -> *). (HasCallStack, MonadIO m) => FunPtr C_UnicodeMirroringFuncT -> UnicodeFuncsT -> Word32 -> Ptr () -> m Word32 dynamic_UnicodeEastasianWidthFuncT FunPtr C_UnicodeMirroringFuncT __funPtr UnicodeFuncsT ufuncs Word32 unicode Ptr () userData = IO Word32 -> m Word32 forall a. IO a -> m a 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 a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return Word32 result -- | Generate a function pointer callable from C code, from a `C_UnicodeEastasianWidthFuncT`. foreign import ccall "wrapper" mk_UnicodeEastasianWidthFuncT :: C_UnicodeEastasianWidthFuncT -> IO (FunPtr C_UnicodeEastasianWidthFuncT) {-# DEPRECATED UnicodeEastasianWidthFuncT ["(Since version 2.0.0)"] #-} -- | A virtual method for the t'GI.HarfBuzz.Structs.UnicodeFuncsT.UnicodeFuncsT' structure. type UnicodeEastasianWidthFuncT = HarfBuzz.UnicodeFuncsT.UnicodeFuncsT -- ^ /@ufuncs@/: A Unicode-functions structure -> Word32 -- ^ /@unicode@/: The code point to query -> IO Word32 -- | A convenience synonym for @`Nothing` :: `Maybe` `UnicodeEastasianWidthFuncT`@. noUnicodeEastasianWidthFuncT :: Maybe UnicodeEastasianWidthFuncT noUnicodeEastasianWidthFuncT :: Maybe UnicodeMirroringFuncT noUnicodeEastasianWidthFuncT = Maybe UnicodeMirroringFuncT forall a. Maybe a Nothing -- | A virtual method for the t'GI.HarfBuzz.Structs.UnicodeFuncsT.UnicodeFuncsT' structure. type UnicodeEastasianWidthFuncT_WithClosures = HarfBuzz.UnicodeFuncsT.UnicodeFuncsT -- ^ /@ufuncs@/: A Unicode-functions structure -> Word32 -- ^ /@unicode@/: The code point to query -> Ptr () -- ^ /@userData@/: User data pointer passed by the caller -> IO Word32 -- | A convenience synonym for @`Nothing` :: `Maybe` `UnicodeEastasianWidthFuncT_WithClosures`@. noUnicodeEastasianWidthFuncT_WithClosures :: Maybe UnicodeEastasianWidthFuncT_WithClosures noUnicodeEastasianWidthFuncT_WithClosures :: Maybe UnicodeMirroringFuncT_WithClosures noUnicodeEastasianWidthFuncT_WithClosures = Maybe UnicodeMirroringFuncT_WithClosures forall a. Maybe a Nothing -- | A simple wrapper that ignores the closure arguments. drop_closures_UnicodeEastasianWidthFuncT :: UnicodeEastasianWidthFuncT -> UnicodeEastasianWidthFuncT_WithClosures drop_closures_UnicodeEastasianWidthFuncT :: UnicodeMirroringFuncT -> UnicodeMirroringFuncT_WithClosures drop_closures_UnicodeEastasianWidthFuncT UnicodeMirroringFuncT _f UnicodeFuncsT ufuncs Word32 unicode Ptr () _ = UnicodeMirroringFuncT _f UnicodeFuncsT ufuncs Word32 unicode -- | Wrap the callback into a `GClosure`. genClosure_UnicodeEastasianWidthFuncT :: MonadIO m => UnicodeEastasianWidthFuncT -> m (GClosure C_UnicodeEastasianWidthFuncT) genClosure_UnicodeEastasianWidthFuncT :: forall (m :: * -> *). MonadIO m => UnicodeMirroringFuncT -> m (GClosure C_UnicodeMirroringFuncT) genClosure_UnicodeEastasianWidthFuncT UnicodeMirroringFuncT cb = IO (GClosure C_UnicodeMirroringFuncT) -> m (GClosure C_UnicodeMirroringFuncT) forall a. IO a -> m a 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 a b. IO a -> (a -> IO b) -> IO b 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 a `UnicodeEastasianWidthFuncT` into a `C_UnicodeEastasianWidthFuncT`. wrap_UnicodeEastasianWidthFuncT :: Maybe (Ptr (FunPtr C_UnicodeEastasianWidthFuncT)) -> UnicodeEastasianWidthFuncT_WithClosures -> C_UnicodeEastasianWidthFuncT wrap_UnicodeEastasianWidthFuncT :: Maybe (Ptr (FunPtr C_UnicodeMirroringFuncT)) -> UnicodeMirroringFuncT_WithClosures -> C_UnicodeMirroringFuncT wrap_UnicodeEastasianWidthFuncT Maybe (Ptr (FunPtr C_UnicodeMirroringFuncT)) gi'funptrptr UnicodeMirroringFuncT_WithClosures gi'cb Ptr UnicodeFuncsT ufuncs Word32 unicode Ptr () userData = do Ptr UnicodeFuncsT -> (UnicodeFuncsT -> IO Word32) -> IO Word32 forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr UnicodeFuncsT ufuncs ((UnicodeFuncsT -> IO Word32) -> IO Word32) -> (UnicodeFuncsT -> IO Word32) -> IO Word32 forall a b. (a -> b) -> a -> b $ \UnicodeFuncsT ufuncs' -> do Word32 result <- UnicodeMirroringFuncT_WithClosures gi'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)) gi'funptrptr Word32 -> IO Word32 forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return Word32 result -- callback UnicodeDecomposeFuncT {- Callable { returnType = Just (TBasicType TInt) , returnMayBeNull = False , returnTransfer = TransferNothing , returnDocumentation = Documentation { rawDocText = Just "`true` if @ab decomposed, `false` otherwise" , sinceVersion = Nothing } , args = [ Arg { argCName = "ufuncs" , argType = TInterface Name { namespace = "HarfBuzz" , name = "unicode_funcs_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "A Unicode-functions structure" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "ab" , argType = TBasicType TUInt32 , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "The code point to decompose" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "a" , argType = TBasicType TUInt32 , direction = DirectionOut , mayBeNull = False , argDoc = Documentation { rawDocText = Just "The first decomposed code point" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferEverything } , Arg { argCName = "b" , argType = TBasicType TUInt32 , direction = DirectionOut , mayBeNull = False , argDoc = Documentation { rawDocText = Just "The second decomposed code point" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferEverything } , Arg { argCName = "user_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "user data pointer passed by the caller" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = 4 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } ] , skipReturn = False , callableThrows = False , callableDeprecated = Nothing , callableDocumentation = Documentation { rawDocText = Just "A virtual method for the #hb_unicode_funcs_t structure.\n\nThis method should decompose an input Unicode code point,\nreturning the two decomposed code points in #hb_codepoint_t\noutput parameters (if successful). The method must return an\n#hb_bool_t indicating the success of the composition." , sinceVersion = Nothing } , callableResolvable = Nothing } -} -- | Type for the callback on the (unwrapped) C side. type C_UnicodeDecomposeFuncT = Ptr HarfBuzz.UnicodeFuncsT.UnicodeFuncsT -> Word32 -> Ptr Word32 -> Ptr Word32 -> Ptr () -> IO Int32 -- Args: [ Arg -- { argCName = "ufuncs" -- , argType = -- TInterface -- Name { namespace = "HarfBuzz" , name = "unicode_funcs_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "A Unicode-functions structure" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "ab" -- , argType = TBasicType TUInt32 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The code point to decompose" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "a" -- , argType = TBasicType TUInt32 -- , direction = DirectionOut -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The first decomposed code point" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferEverything -- } -- , Arg -- { argCName = "b" -- , argType = TBasicType TUInt32 -- , direction = DirectionOut -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The second decomposed code point" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferEverything -- } -- , Arg -- { argCName = "user_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "user data pointer passed by the caller" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = 4 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TInt) -- throws : False -- Skip return : False foreign import ccall "dynamic" __dynamic_C_UnicodeDecomposeFuncT :: FunPtr C_UnicodeDecomposeFuncT -> C_UnicodeDecomposeFuncT -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell. dynamic_UnicodeDecomposeFuncT :: (B.CallStack.HasCallStack, MonadIO m) => FunPtr C_UnicodeDecomposeFuncT -> HarfBuzz.UnicodeFuncsT.UnicodeFuncsT -- ^ /@ufuncs@/: A Unicode-functions structure -> Word32 -- ^ /@ab@/: The code point to decompose -> Ptr () -- ^ /@userData@/: user data pointer passed by the caller -> m ((Int32, Word32, Word32)) -- ^ __Returns:__ @true@ if /@ab@/ decomposed, @false@ otherwise dynamic_UnicodeDecomposeFuncT :: forall (m :: * -> *). (HasCallStack, MonadIO m) => FunPtr C_UnicodeDecomposeFuncT -> UnicodeFuncsT -> Word32 -> Ptr () -> m (Int32, Word32, Word32) dynamic_UnicodeDecomposeFuncT FunPtr C_UnicodeDecomposeFuncT __funPtr UnicodeFuncsT ufuncs Word32 ab Ptr () userData = IO (Int32, Word32, Word32) -> m (Int32, Word32, Word32) forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (Int32, Word32, Word32) -> m (Int32, Word32, Word32)) -> IO (Int32, Word32, Word32) -> m (Int32, Word32, 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 Ptr Word32 a <- IO (Ptr Word32) forall a. Storable a => IO (Ptr a) allocMem :: IO (Ptr Word32) Ptr Word32 b <- IO (Ptr Word32) forall a. Storable a => IO (Ptr a) allocMem :: IO (Ptr Word32) Int32 result <- (FunPtr C_UnicodeDecomposeFuncT -> C_UnicodeDecomposeFuncT __dynamic_C_UnicodeDecomposeFuncT FunPtr C_UnicodeDecomposeFuncT __funPtr) Ptr UnicodeFuncsT ufuncs' Word32 ab Ptr Word32 a Ptr Word32 b Ptr () userData Word32 a' <- Ptr Word32 -> IO Word32 forall a. Storable a => Ptr a -> IO a peek Ptr Word32 a Word32 b' <- Ptr Word32 -> IO Word32 forall a. Storable a => Ptr a -> IO a peek Ptr Word32 b UnicodeFuncsT -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr UnicodeFuncsT ufuncs Ptr Word32 -> IO () forall a. Ptr a -> IO () freeMem Ptr Word32 a Ptr Word32 -> IO () forall a. Ptr a -> IO () freeMem Ptr Word32 b (Int32, Word32, Word32) -> IO (Int32, Word32, Word32) forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return (Int32 result, Word32 a', Word32 b') -- | Generate a function pointer callable from C code, from a `C_UnicodeDecomposeFuncT`. foreign import ccall "wrapper" mk_UnicodeDecomposeFuncT :: C_UnicodeDecomposeFuncT -> IO (FunPtr C_UnicodeDecomposeFuncT) -- | A virtual method for the t'GI.HarfBuzz.Structs.UnicodeFuncsT.UnicodeFuncsT' structure. -- -- This method should decompose an input Unicode code point, -- returning the two decomposed code points in @/hb_codepoint_t/@ -- output parameters (if successful). The method must return an -- @/hb_bool_t/@ indicating the success of the composition. type UnicodeDecomposeFuncT = HarfBuzz.UnicodeFuncsT.UnicodeFuncsT -- ^ /@ufuncs@/: A Unicode-functions structure -> Word32 -- ^ /@ab@/: The code point to decompose -> IO ((Int32, Word32, Word32)) -- ^ __Returns:__ @true@ if /@ab@/ decomposed, @false@ otherwise -- | A convenience synonym for @`Nothing` :: `Maybe` `UnicodeDecomposeFuncT`@. noUnicodeDecomposeFuncT :: Maybe UnicodeDecomposeFuncT noUnicodeDecomposeFuncT :: Maybe UnicodeDecomposeFuncT noUnicodeDecomposeFuncT = Maybe UnicodeDecomposeFuncT forall a. Maybe a Nothing -- | A virtual method for the t'GI.HarfBuzz.Structs.UnicodeFuncsT.UnicodeFuncsT' structure. -- -- This method should decompose an input Unicode code point, -- returning the two decomposed code points in @/hb_codepoint_t/@ -- output parameters (if successful). The method must return an -- @/hb_bool_t/@ indicating the success of the composition. type UnicodeDecomposeFuncT_WithClosures = HarfBuzz.UnicodeFuncsT.UnicodeFuncsT -- ^ /@ufuncs@/: A Unicode-functions structure -> Word32 -- ^ /@ab@/: The code point to decompose -> Ptr () -- ^ /@userData@/: user data pointer passed by the caller -> IO ((Int32, Word32, Word32)) -- ^ __Returns:__ @true@ if /@ab@/ decomposed, @false@ otherwise -- | A convenience synonym for @`Nothing` :: `Maybe` `UnicodeDecomposeFuncT_WithClosures`@. noUnicodeDecomposeFuncT_WithClosures :: Maybe UnicodeDecomposeFuncT_WithClosures noUnicodeDecomposeFuncT_WithClosures :: Maybe UnicodeDecomposeFuncT_WithClosures noUnicodeDecomposeFuncT_WithClosures = Maybe UnicodeDecomposeFuncT_WithClosures forall a. Maybe a Nothing -- | A simple wrapper that ignores the closure arguments. drop_closures_UnicodeDecomposeFuncT :: UnicodeDecomposeFuncT -> UnicodeDecomposeFuncT_WithClosures drop_closures_UnicodeDecomposeFuncT :: UnicodeDecomposeFuncT -> UnicodeDecomposeFuncT_WithClosures drop_closures_UnicodeDecomposeFuncT UnicodeDecomposeFuncT _f UnicodeFuncsT ufuncs Word32 ab Ptr () _ = UnicodeDecomposeFuncT _f UnicodeFuncsT ufuncs Word32 ab -- | Wrap the callback into a `GClosure`. genClosure_UnicodeDecomposeFuncT :: MonadIO m => UnicodeDecomposeFuncT -> m (GClosure C_UnicodeDecomposeFuncT) genClosure_UnicodeDecomposeFuncT :: forall (m :: * -> *). MonadIO m => UnicodeDecomposeFuncT -> m (GClosure C_UnicodeDecomposeFuncT) genClosure_UnicodeDecomposeFuncT UnicodeDecomposeFuncT cb = IO (GClosure C_UnicodeDecomposeFuncT) -> m (GClosure C_UnicodeDecomposeFuncT) forall a. IO a -> m a 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 a b. IO a -> (a -> IO b) -> IO b 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 a `UnicodeDecomposeFuncT` into a `C_UnicodeDecomposeFuncT`. wrap_UnicodeDecomposeFuncT :: Maybe (Ptr (FunPtr C_UnicodeDecomposeFuncT)) -> UnicodeDecomposeFuncT_WithClosures -> C_UnicodeDecomposeFuncT wrap_UnicodeDecomposeFuncT :: Maybe (Ptr (FunPtr C_UnicodeDecomposeFuncT)) -> UnicodeDecomposeFuncT_WithClosures -> C_UnicodeDecomposeFuncT wrap_UnicodeDecomposeFuncT Maybe (Ptr (FunPtr C_UnicodeDecomposeFuncT)) gi'funptrptr UnicodeDecomposeFuncT_WithClosures gi'cb Ptr UnicodeFuncsT ufuncs Word32 ab Ptr Word32 a Ptr Word32 b Ptr () userData = do Ptr UnicodeFuncsT -> (UnicodeFuncsT -> IO Int32) -> IO Int32 forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr UnicodeFuncsT ufuncs ((UnicodeFuncsT -> IO Int32) -> IO Int32) -> (UnicodeFuncsT -> IO Int32) -> IO Int32 forall a b. (a -> b) -> a -> b $ \UnicodeFuncsT ufuncs' -> do (Int32 result, Word32 outa, Word32 outb) <- UnicodeDecomposeFuncT_WithClosures gi'cb UnicodeFuncsT ufuncs' Word32 ab Ptr () userData Ptr Word32 -> Word32 -> IO () forall a. Storable a => Ptr a -> a -> IO () poke Ptr Word32 a Word32 outa Ptr Word32 -> Word32 -> IO () forall a. Storable a => Ptr a -> a -> IO () poke Ptr Word32 b Word32 outb Maybe (Ptr (FunPtr C_UnicodeDecomposeFuncT)) -> IO () forall a. Maybe (Ptr (FunPtr a)) -> IO () maybeReleaseFunPtr Maybe (Ptr (FunPtr C_UnicodeDecomposeFuncT)) gi'funptrptr Int32 -> IO Int32 forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return Int32 result -- callback UnicodeDecomposeCompatibilityFuncT {- Callable { returnType = Just (TBasicType TUInt) , returnMayBeNull = False , returnTransfer = TransferNothing , returnDocumentation = Documentation { rawDocText = Just "number of codepoints in the full compatibility decomposition of @u, or 0 if no decomposition available." , sinceVersion = Nothing } , args = [ Arg { argCName = "ufuncs" , argType = TInterface Name { namespace = "HarfBuzz" , name = "unicode_funcs_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "a Unicode function structure" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "u" , argType = TBasicType TUInt32 , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "codepoint to decompose" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "decomposed" , argType = TBasicType TUInt32 , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "address of codepoint array (of length #HB_UNICODE_MAX_DECOMPOSITION_LEN) to write decomposition into" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "user_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "user data pointer as passed to hb_unicode_funcs_set_decompose_compatibility_func()" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = 3 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } ] , skipReturn = False , callableThrows = False , callableDeprecated = Just DeprecationInfo { deprecatedSinceVersion = Just "2.0.0" , deprecationMessage = Nothing } , callableDocumentation = Documentation { rawDocText = Just "Fully decompose @u to its Unicode compatibility decomposition. The codepoints of the decomposition will be written to @decomposed.\nThe complete length of the decomposition will be returned.\n\nIf @u has no compatibility decomposition, zero should be returned.\n\nThe Unicode standard guarantees that a buffer of length #HB_UNICODE_MAX_DECOMPOSITION_LEN codepoints will always be sufficient for any\ncompatibility decomposition plus an terminating value of 0. Consequently, @decompose must be allocated by the caller to be at least this length. Implementations\nof this function type must ensure that they do not write past the provided array." , sinceVersion = Nothing } , callableResolvable = Nothing } -} -- | Type for the callback on the (unwrapped) C side. type C_UnicodeDecomposeCompatibilityFuncT = Ptr HarfBuzz.UnicodeFuncsT.UnicodeFuncsT -> Word32 -> Word32 -> Ptr () -> IO Word32 -- Args: [ Arg -- { argCName = "ufuncs" -- , argType = -- TInterface -- Name { namespace = "HarfBuzz" , name = "unicode_funcs_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a Unicode function structure" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "u" -- , argType = TBasicType TUInt32 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "codepoint to decompose" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "decomposed" -- , argType = TBasicType TUInt32 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = -- Just -- "address of codepoint array (of length #HB_UNICODE_MAX_DECOMPOSITION_LEN) to write decomposition into" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "user_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = -- Just -- "user data pointer as passed to hb_unicode_funcs_set_decompose_compatibility_func()" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = 3 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TUInt) -- throws : False -- Skip return : False foreign import ccall "dynamic" __dynamic_C_UnicodeDecomposeCompatibilityFuncT :: FunPtr C_UnicodeDecomposeCompatibilityFuncT -> C_UnicodeDecomposeCompatibilityFuncT -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell. dynamic_UnicodeDecomposeCompatibilityFuncT :: (B.CallStack.HasCallStack, MonadIO m) => FunPtr C_UnicodeDecomposeCompatibilityFuncT -> HarfBuzz.UnicodeFuncsT.UnicodeFuncsT -- ^ /@ufuncs@/: a Unicode function structure -> Word32 -- ^ /@u@/: codepoint to decompose -> Word32 -- ^ /@decomposed@/: address of codepoint array (of length 'GI.HarfBuzz.Constants.UNICODE_MAX_DECOMPOSITION_LEN') to write decomposition into -> Ptr () -- ^ /@userData@/: user data pointer as passed to 'GI.HarfBuzz.Functions.unicodeFuncsSetDecomposeCompatibilityFunc' -> m Word32 -- ^ __Returns:__ number of codepoints in the full compatibility decomposition of /@u@/, or 0 if no decomposition available. dynamic_UnicodeDecomposeCompatibilityFuncT :: forall (m :: * -> *). (HasCallStack, MonadIO m) => FunPtr C_UnicodeDecomposeCompatibilityFuncT -> UnicodeFuncsT -> Word32 -> Word32 -> Ptr () -> m Word32 dynamic_UnicodeDecomposeCompatibilityFuncT FunPtr C_UnicodeDecomposeCompatibilityFuncT __funPtr UnicodeFuncsT ufuncs Word32 u Word32 decomposed Ptr () userData = IO Word32 -> m Word32 forall a. IO a -> m a 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 a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return Word32 result -- | Generate a function pointer callable from C code, from a `C_UnicodeDecomposeCompatibilityFuncT`. foreign import ccall "wrapper" mk_UnicodeDecomposeCompatibilityFuncT :: C_UnicodeDecomposeCompatibilityFuncT -> IO (FunPtr C_UnicodeDecomposeCompatibilityFuncT) {-# DEPRECATED UnicodeDecomposeCompatibilityFuncT ["(Since version 2.0.0)"] #-} -- | Fully decompose /@u@/ to its Unicode compatibility decomposition. The codepoints of the decomposition will be written to /@decomposed@/. -- The complete length of the decomposition will be returned. -- -- If /@u@/ has no compatibility decomposition, zero should be returned. -- -- The Unicode standard guarantees that a buffer of length 'GI.HarfBuzz.Constants.UNICODE_MAX_DECOMPOSITION_LEN' codepoints will always be sufficient for any -- compatibility decomposition plus an terminating value of 0. Consequently, /@decompose@/ must be allocated by the caller to be at least this length. Implementations -- of this function type must ensure that they do not write past the provided array. type UnicodeDecomposeCompatibilityFuncT = HarfBuzz.UnicodeFuncsT.UnicodeFuncsT -- ^ /@ufuncs@/: a Unicode function structure -> Word32 -- ^ /@u@/: codepoint to decompose -> Word32 -- ^ /@decomposed@/: address of codepoint array (of length 'GI.HarfBuzz.Constants.UNICODE_MAX_DECOMPOSITION_LEN') to write decomposition into -> IO Word32 -- ^ __Returns:__ number of codepoints in the full compatibility decomposition of /@u@/, or 0 if no decomposition available. -- | A convenience synonym for @`Nothing` :: `Maybe` `UnicodeDecomposeCompatibilityFuncT`@. noUnicodeDecomposeCompatibilityFuncT :: Maybe UnicodeDecomposeCompatibilityFuncT noUnicodeDecomposeCompatibilityFuncT :: Maybe UnicodeDecomposeCompatibilityFuncT noUnicodeDecomposeCompatibilityFuncT = Maybe UnicodeDecomposeCompatibilityFuncT forall a. Maybe a Nothing -- | Fully decompose /@u@/ to its Unicode compatibility decomposition. The codepoints of the decomposition will be written to /@decomposed@/. -- The complete length of the decomposition will be returned. -- -- If /@u@/ has no compatibility decomposition, zero should be returned. -- -- The Unicode standard guarantees that a buffer of length 'GI.HarfBuzz.Constants.UNICODE_MAX_DECOMPOSITION_LEN' codepoints will always be sufficient for any -- compatibility decomposition plus an terminating value of 0. Consequently, /@decompose@/ must be allocated by the caller to be at least this length. Implementations -- of this function type must ensure that they do not write past the provided array. type UnicodeDecomposeCompatibilityFuncT_WithClosures = HarfBuzz.UnicodeFuncsT.UnicodeFuncsT -- ^ /@ufuncs@/: a Unicode function structure -> Word32 -- ^ /@u@/: codepoint to decompose -> Word32 -- ^ /@decomposed@/: address of codepoint array (of length 'GI.HarfBuzz.Constants.UNICODE_MAX_DECOMPOSITION_LEN') to write decomposition into -> Ptr () -- ^ /@userData@/: user data pointer as passed to 'GI.HarfBuzz.Functions.unicodeFuncsSetDecomposeCompatibilityFunc' -> IO Word32 -- ^ __Returns:__ number of codepoints in the full compatibility decomposition of /@u@/, or 0 if no decomposition available. -- | A convenience synonym for @`Nothing` :: `Maybe` `UnicodeDecomposeCompatibilityFuncT_WithClosures`@. noUnicodeDecomposeCompatibilityFuncT_WithClosures :: Maybe UnicodeDecomposeCompatibilityFuncT_WithClosures noUnicodeDecomposeCompatibilityFuncT_WithClosures :: Maybe UnicodeDecomposeCompatibilityFuncT_WithClosures noUnicodeDecomposeCompatibilityFuncT_WithClosures = Maybe UnicodeDecomposeCompatibilityFuncT_WithClosures forall a. Maybe a Nothing -- | A simple wrapper that ignores the closure arguments. drop_closures_UnicodeDecomposeCompatibilityFuncT :: UnicodeDecomposeCompatibilityFuncT -> UnicodeDecomposeCompatibilityFuncT_WithClosures drop_closures_UnicodeDecomposeCompatibilityFuncT :: UnicodeDecomposeCompatibilityFuncT -> UnicodeDecomposeCompatibilityFuncT_WithClosures drop_closures_UnicodeDecomposeCompatibilityFuncT UnicodeDecomposeCompatibilityFuncT _f UnicodeFuncsT ufuncs Word32 u Word32 decomposed Ptr () _ = UnicodeDecomposeCompatibilityFuncT _f UnicodeFuncsT ufuncs Word32 u Word32 decomposed -- | Wrap the callback into a `GClosure`. genClosure_UnicodeDecomposeCompatibilityFuncT :: MonadIO m => UnicodeDecomposeCompatibilityFuncT -> m (GClosure C_UnicodeDecomposeCompatibilityFuncT) genClosure_UnicodeDecomposeCompatibilityFuncT :: forall (m :: * -> *). MonadIO m => UnicodeDecomposeCompatibilityFuncT -> m (GClosure C_UnicodeDecomposeCompatibilityFuncT) genClosure_UnicodeDecomposeCompatibilityFuncT UnicodeDecomposeCompatibilityFuncT cb = IO (GClosure C_UnicodeDecomposeCompatibilityFuncT) -> m (GClosure C_UnicodeDecomposeCompatibilityFuncT) forall a. IO a -> m a 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 a b. IO a -> (a -> IO b) -> IO b 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 a `UnicodeDecomposeCompatibilityFuncT` into a `C_UnicodeDecomposeCompatibilityFuncT`. wrap_UnicodeDecomposeCompatibilityFuncT :: Maybe (Ptr (FunPtr C_UnicodeDecomposeCompatibilityFuncT)) -> UnicodeDecomposeCompatibilityFuncT_WithClosures -> C_UnicodeDecomposeCompatibilityFuncT wrap_UnicodeDecomposeCompatibilityFuncT :: Maybe (Ptr (FunPtr C_UnicodeDecomposeCompatibilityFuncT)) -> UnicodeDecomposeCompatibilityFuncT_WithClosures -> C_UnicodeDecomposeCompatibilityFuncT wrap_UnicodeDecomposeCompatibilityFuncT Maybe (Ptr (FunPtr C_UnicodeDecomposeCompatibilityFuncT)) gi'funptrptr UnicodeDecomposeCompatibilityFuncT_WithClosures gi'cb Ptr UnicodeFuncsT ufuncs Word32 u Word32 decomposed Ptr () userData = do Ptr UnicodeFuncsT -> (UnicodeFuncsT -> IO Word32) -> IO Word32 forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr UnicodeFuncsT ufuncs ((UnicodeFuncsT -> IO Word32) -> IO Word32) -> (UnicodeFuncsT -> IO Word32) -> IO Word32 forall a b. (a -> b) -> a -> b $ \UnicodeFuncsT ufuncs' -> do Word32 result <- UnicodeDecomposeCompatibilityFuncT_WithClosures gi'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)) gi'funptrptr Word32 -> IO Word32 forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return Word32 result -- callback UnicodeComposeFuncT {- Callable { returnType = Just (TBasicType TInt) , returnMayBeNull = False , returnTransfer = TransferNothing , returnDocumentation = Documentation { rawDocText = Just "`true` is @a,@b composed, `false` otherwise" , sinceVersion = Nothing } , args = [ Arg { argCName = "ufuncs" , argType = TInterface Name { namespace = "HarfBuzz" , name = "unicode_funcs_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "A Unicode-functions structure" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "a" , argType = TBasicType TUInt32 , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "The first code point to compose" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "b" , argType = TBasicType TUInt32 , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "The second code point to compose" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "ab" , argType = TBasicType TUInt32 , direction = DirectionOut , mayBeNull = False , argDoc = Documentation { rawDocText = Just "The composed code point" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferEverything } , Arg { argCName = "user_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "user data pointer passed by the caller" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = 4 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } ] , skipReturn = False , callableThrows = False , callableDeprecated = Nothing , callableDocumentation = Documentation { rawDocText = Just "A virtual method for the #hb_unicode_funcs_t structure.\n\nThis method should compose a sequence of two input Unicode code\npoints by canonical equivalence, returning the composed code\npoint in a #hb_codepoint_t output parameter (if successful).\nThe method must return an #hb_bool_t indicating the success\nof the composition." , sinceVersion = Nothing } , callableResolvable = Nothing } -} -- | Type for the callback on the (unwrapped) C side. type C_UnicodeComposeFuncT = Ptr HarfBuzz.UnicodeFuncsT.UnicodeFuncsT -> Word32 -> Word32 -> Ptr Word32 -> Ptr () -> IO Int32 -- Args: [ Arg -- { argCName = "ufuncs" -- , argType = -- TInterface -- Name { namespace = "HarfBuzz" , name = "unicode_funcs_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "A Unicode-functions structure" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "a" -- , argType = TBasicType TUInt32 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The first code point to compose" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "b" -- , argType = TBasicType TUInt32 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The second code point to compose" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "ab" -- , argType = TBasicType TUInt32 -- , direction = DirectionOut -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The composed code point" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferEverything -- } -- , Arg -- { argCName = "user_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "user data pointer passed by the caller" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = 4 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TInt) -- throws : False -- Skip return : False foreign import ccall "dynamic" __dynamic_C_UnicodeComposeFuncT :: FunPtr C_UnicodeComposeFuncT -> C_UnicodeComposeFuncT -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell. dynamic_UnicodeComposeFuncT :: (B.CallStack.HasCallStack, MonadIO m) => FunPtr C_UnicodeComposeFuncT -> HarfBuzz.UnicodeFuncsT.UnicodeFuncsT -- ^ /@ufuncs@/: A Unicode-functions structure -> Word32 -- ^ /@a@/: The first code point to compose -> Word32 -- ^ /@b@/: The second code point to compose -> Ptr () -- ^ /@userData@/: user data pointer passed by the caller -> m ((Int32, Word32)) -- ^ __Returns:__ @true@ is /@a@/,/@b@/ composed, @false@ otherwise dynamic_UnicodeComposeFuncT :: forall (m :: * -> *). (HasCallStack, MonadIO m) => FunPtr C_UnicodeComposeFuncT -> UnicodeFuncsT -> Word32 -> Word32 -> Ptr () -> m (Int32, Word32) dynamic_UnicodeComposeFuncT FunPtr C_UnicodeComposeFuncT __funPtr UnicodeFuncsT ufuncs Word32 a Word32 b Ptr () userData = IO (Int32, Word32) -> m (Int32, Word32) forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (Int32, Word32) -> m (Int32, Word32)) -> IO (Int32, Word32) -> m (Int32, 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 Ptr Word32 ab <- IO (Ptr Word32) forall a. Storable a => IO (Ptr a) allocMem :: IO (Ptr Word32) Int32 result <- (FunPtr C_UnicodeComposeFuncT -> C_UnicodeComposeFuncT __dynamic_C_UnicodeComposeFuncT FunPtr C_UnicodeComposeFuncT __funPtr) Ptr UnicodeFuncsT ufuncs' Word32 a Word32 b Ptr Word32 ab Ptr () userData Word32 ab' <- Ptr Word32 -> IO Word32 forall a. Storable a => Ptr a -> IO a peek Ptr Word32 ab UnicodeFuncsT -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr UnicodeFuncsT ufuncs Ptr Word32 -> IO () forall a. Ptr a -> IO () freeMem Ptr Word32 ab (Int32, Word32) -> IO (Int32, Word32) forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return (Int32 result, Word32 ab') -- | Generate a function pointer callable from C code, from a `C_UnicodeComposeFuncT`. foreign import ccall "wrapper" mk_UnicodeComposeFuncT :: C_UnicodeComposeFuncT -> IO (FunPtr C_UnicodeComposeFuncT) -- | A virtual method for the t'GI.HarfBuzz.Structs.UnicodeFuncsT.UnicodeFuncsT' structure. -- -- This method should compose a sequence of two input Unicode code -- points by canonical equivalence, returning the composed code -- point in a @/hb_codepoint_t/@ output parameter (if successful). -- The method must return an @/hb_bool_t/@ indicating the success -- of the composition. type UnicodeComposeFuncT = HarfBuzz.UnicodeFuncsT.UnicodeFuncsT -- ^ /@ufuncs@/: A Unicode-functions structure -> Word32 -- ^ /@a@/: The first code point to compose -> Word32 -- ^ /@b@/: The second code point to compose -> IO ((Int32, Word32)) -- ^ __Returns:__ @true@ is /@a@/,/@b@/ composed, @false@ otherwise -- | A convenience synonym for @`Nothing` :: `Maybe` `UnicodeComposeFuncT`@. noUnicodeComposeFuncT :: Maybe UnicodeComposeFuncT noUnicodeComposeFuncT :: Maybe UnicodeComposeFuncT noUnicodeComposeFuncT = Maybe UnicodeComposeFuncT forall a. Maybe a Nothing -- | A virtual method for the t'GI.HarfBuzz.Structs.UnicodeFuncsT.UnicodeFuncsT' structure. -- -- This method should compose a sequence of two input Unicode code -- points by canonical equivalence, returning the composed code -- point in a @/hb_codepoint_t/@ output parameter (if successful). -- The method must return an @/hb_bool_t/@ indicating the success -- of the composition. type UnicodeComposeFuncT_WithClosures = HarfBuzz.UnicodeFuncsT.UnicodeFuncsT -- ^ /@ufuncs@/: A Unicode-functions structure -> Word32 -- ^ /@a@/: The first code point to compose -> Word32 -- ^ /@b@/: The second code point to compose -> Ptr () -- ^ /@userData@/: user data pointer passed by the caller -> IO ((Int32, Word32)) -- ^ __Returns:__ @true@ is /@a@/,/@b@/ composed, @false@ otherwise -- | A convenience synonym for @`Nothing` :: `Maybe` `UnicodeComposeFuncT_WithClosures`@. noUnicodeComposeFuncT_WithClosures :: Maybe UnicodeComposeFuncT_WithClosures noUnicodeComposeFuncT_WithClosures :: Maybe UnicodeComposeFuncT_WithClosures noUnicodeComposeFuncT_WithClosures = Maybe UnicodeComposeFuncT_WithClosures forall a. Maybe a Nothing -- | A simple wrapper that ignores the closure arguments. drop_closures_UnicodeComposeFuncT :: UnicodeComposeFuncT -> UnicodeComposeFuncT_WithClosures drop_closures_UnicodeComposeFuncT :: UnicodeComposeFuncT -> UnicodeComposeFuncT_WithClosures drop_closures_UnicodeComposeFuncT UnicodeComposeFuncT _f UnicodeFuncsT ufuncs Word32 a Word32 b Ptr () _ = UnicodeComposeFuncT _f UnicodeFuncsT ufuncs Word32 a Word32 b -- | Wrap the callback into a `GClosure`. genClosure_UnicodeComposeFuncT :: MonadIO m => UnicodeComposeFuncT -> m (GClosure C_UnicodeComposeFuncT) genClosure_UnicodeComposeFuncT :: forall (m :: * -> *). MonadIO m => UnicodeComposeFuncT -> m (GClosure C_UnicodeComposeFuncT) genClosure_UnicodeComposeFuncT UnicodeComposeFuncT cb = IO (GClosure C_UnicodeComposeFuncT) -> m (GClosure C_UnicodeComposeFuncT) forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (GClosure C_UnicodeComposeFuncT) -> m (GClosure C_UnicodeComposeFuncT)) -> IO (GClosure C_UnicodeComposeFuncT) -> m (GClosure C_UnicodeComposeFuncT) forall a b. (a -> b) -> a -> b $ do let cb' :: UnicodeComposeFuncT_WithClosures cb' = UnicodeComposeFuncT -> UnicodeComposeFuncT_WithClosures drop_closures_UnicodeComposeFuncT UnicodeComposeFuncT cb let cb'' :: C_UnicodeComposeFuncT cb'' = Maybe (Ptr (FunPtr C_UnicodeComposeFuncT)) -> UnicodeComposeFuncT_WithClosures -> C_UnicodeComposeFuncT wrap_UnicodeComposeFuncT Maybe (Ptr (FunPtr C_UnicodeComposeFuncT)) forall a. Maybe a Nothing UnicodeComposeFuncT_WithClosures cb' C_UnicodeComposeFuncT -> IO (FunPtr C_UnicodeComposeFuncT) mk_UnicodeComposeFuncT C_UnicodeComposeFuncT cb'' IO (FunPtr C_UnicodeComposeFuncT) -> (FunPtr C_UnicodeComposeFuncT -> IO (GClosure C_UnicodeComposeFuncT)) -> IO (GClosure C_UnicodeComposeFuncT) forall a b. IO a -> (a -> IO b) -> IO b forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b >>= FunPtr C_UnicodeComposeFuncT -> IO (GClosure C_UnicodeComposeFuncT) forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a) B.GClosure.newGClosure -- | Wrap a `UnicodeComposeFuncT` into a `C_UnicodeComposeFuncT`. wrap_UnicodeComposeFuncT :: Maybe (Ptr (FunPtr C_UnicodeComposeFuncT)) -> UnicodeComposeFuncT_WithClosures -> C_UnicodeComposeFuncT wrap_UnicodeComposeFuncT :: Maybe (Ptr (FunPtr C_UnicodeComposeFuncT)) -> UnicodeComposeFuncT_WithClosures -> C_UnicodeComposeFuncT wrap_UnicodeComposeFuncT Maybe (Ptr (FunPtr C_UnicodeComposeFuncT)) gi'funptrptr UnicodeComposeFuncT_WithClosures gi'cb Ptr UnicodeFuncsT ufuncs Word32 a Word32 b Ptr Word32 ab Ptr () userData = do Ptr UnicodeFuncsT -> (UnicodeFuncsT -> IO Int32) -> IO Int32 forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr UnicodeFuncsT ufuncs ((UnicodeFuncsT -> IO Int32) -> IO Int32) -> (UnicodeFuncsT -> IO Int32) -> IO Int32 forall a b. (a -> b) -> a -> b $ \UnicodeFuncsT ufuncs' -> do (Int32 result, Word32 outab) <- UnicodeComposeFuncT_WithClosures gi'cb UnicodeFuncsT ufuncs' Word32 a Word32 b Ptr () userData Ptr Word32 -> Word32 -> IO () forall a. Storable a => Ptr a -> a -> IO () poke Ptr Word32 ab Word32 outab Maybe (Ptr (FunPtr C_UnicodeComposeFuncT)) -> IO () forall a. Maybe (Ptr (FunPtr a)) -> IO () maybeReleaseFunPtr Maybe (Ptr (FunPtr C_UnicodeComposeFuncT)) gi'funptrptr Int32 -> IO Int32 forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return Int32 result -- callback UnicodeCombiningClassFuncT {- Callable { returnType = Just (TInterface Name { namespace = "HarfBuzz" , name = "unicode_combining_class_t" }) , returnMayBeNull = False , returnTransfer = TransferNothing , returnDocumentation = Documentation { rawDocText = Just "The #hb_unicode_combining_class_t of @unicode" , sinceVersion = Nothing } , args = [ Arg { argCName = "ufuncs" , argType = TInterface Name { namespace = "HarfBuzz" , name = "unicode_funcs_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "A Unicode-functions structure" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "unicode" , argType = TBasicType TUInt32 , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "The code point to query" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "user_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "User data pointer passed by the caller" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = 2 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } ] , skipReturn = False , callableThrows = False , callableDeprecated = Nothing , callableDocumentation = Documentation { rawDocText = Just "A virtual method for the #hb_unicode_funcs_t structure.\n\nThis method should retrieve the Canonical Combining Class (ccc)\nproperty for a specified Unicode code point." , sinceVersion = Nothing } , callableResolvable = Nothing } -} -- | Type for the callback on the (unwrapped) C side. type C_UnicodeCombiningClassFuncT = Ptr HarfBuzz.UnicodeFuncsT.UnicodeFuncsT -> Word32 -> Ptr () -> IO CUInt -- Args: [ Arg -- { argCName = "ufuncs" -- , argType = -- TInterface -- Name { namespace = "HarfBuzz" , name = "unicode_funcs_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "A Unicode-functions structure" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "unicode" -- , argType = TBasicType TUInt32 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The code point to query" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "user_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "User data pointer passed by the caller" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = 2 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just -- (TInterface -- Name -- { namespace = "HarfBuzz" , name = "unicode_combining_class_t" }) -- throws : False -- Skip return : False foreign import ccall "dynamic" __dynamic_C_UnicodeCombiningClassFuncT :: FunPtr C_UnicodeCombiningClassFuncT -> C_UnicodeCombiningClassFuncT -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell. dynamic_UnicodeCombiningClassFuncT :: (B.CallStack.HasCallStack, MonadIO m) => FunPtr C_UnicodeCombiningClassFuncT -> HarfBuzz.UnicodeFuncsT.UnicodeFuncsT -- ^ /@ufuncs@/: A Unicode-functions structure -> Word32 -- ^ /@unicode@/: The code point to query -> Ptr () -- ^ /@userData@/: User data pointer passed by the caller -> m HarfBuzz.Enums.UnicodeCombiningClassT -- ^ __Returns:__ The t'GI.HarfBuzz.Enums.UnicodeCombiningClassT' of /@unicode@/ dynamic_UnicodeCombiningClassFuncT :: forall (m :: * -> *). (HasCallStack, MonadIO m) => FunPtr C_UnicodeScriptFuncT -> UnicodeFuncsT -> Word32 -> Ptr () -> m UnicodeCombiningClassT dynamic_UnicodeCombiningClassFuncT FunPtr C_UnicodeScriptFuncT __funPtr UnicodeFuncsT ufuncs Word32 unicode Ptr () userData = IO UnicodeCombiningClassT -> m UnicodeCombiningClassT forall a. IO a -> m a 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 a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return UnicodeCombiningClassT result' -- | Generate a function pointer callable from C code, from a `C_UnicodeCombiningClassFuncT`. foreign import ccall "wrapper" mk_UnicodeCombiningClassFuncT :: C_UnicodeCombiningClassFuncT -> IO (FunPtr C_UnicodeCombiningClassFuncT) -- | A virtual method for the t'GI.HarfBuzz.Structs.UnicodeFuncsT.UnicodeFuncsT' structure. -- -- This method should retrieve the Canonical Combining Class (ccc) -- property for a specified Unicode code point. type UnicodeCombiningClassFuncT = HarfBuzz.UnicodeFuncsT.UnicodeFuncsT -- ^ /@ufuncs@/: A Unicode-functions structure -> Word32 -- ^ /@unicode@/: The code point to query -> IO HarfBuzz.Enums.UnicodeCombiningClassT -- ^ __Returns:__ The t'GI.HarfBuzz.Enums.UnicodeCombiningClassT' of /@unicode@/ -- | A convenience synonym for @`Nothing` :: `Maybe` `UnicodeCombiningClassFuncT`@. noUnicodeCombiningClassFuncT :: Maybe UnicodeCombiningClassFuncT noUnicodeCombiningClassFuncT :: Maybe UnicodeCombiningClassFuncT noUnicodeCombiningClassFuncT = Maybe UnicodeCombiningClassFuncT forall a. Maybe a Nothing -- | A virtual method for the t'GI.HarfBuzz.Structs.UnicodeFuncsT.UnicodeFuncsT' structure. -- -- This method should retrieve the Canonical Combining Class (ccc) -- property for a specified Unicode code point. type UnicodeCombiningClassFuncT_WithClosures = HarfBuzz.UnicodeFuncsT.UnicodeFuncsT -- ^ /@ufuncs@/: A Unicode-functions structure -> Word32 -- ^ /@unicode@/: The code point to query -> Ptr () -- ^ /@userData@/: User data pointer passed by the caller -> IO HarfBuzz.Enums.UnicodeCombiningClassT -- ^ __Returns:__ The t'GI.HarfBuzz.Enums.UnicodeCombiningClassT' of /@unicode@/ -- | A convenience synonym for @`Nothing` :: `Maybe` `UnicodeCombiningClassFuncT_WithClosures`@. noUnicodeCombiningClassFuncT_WithClosures :: Maybe UnicodeCombiningClassFuncT_WithClosures noUnicodeCombiningClassFuncT_WithClosures :: Maybe UnicodeCombiningClassFuncT_WithClosures noUnicodeCombiningClassFuncT_WithClosures = Maybe UnicodeCombiningClassFuncT_WithClosures forall a. Maybe a Nothing -- | A simple wrapper that ignores the closure arguments. drop_closures_UnicodeCombiningClassFuncT :: UnicodeCombiningClassFuncT -> UnicodeCombiningClassFuncT_WithClosures drop_closures_UnicodeCombiningClassFuncT :: UnicodeCombiningClassFuncT -> UnicodeCombiningClassFuncT_WithClosures drop_closures_UnicodeCombiningClassFuncT UnicodeCombiningClassFuncT _f UnicodeFuncsT ufuncs Word32 unicode Ptr () _ = UnicodeCombiningClassFuncT _f UnicodeFuncsT ufuncs Word32 unicode -- | Wrap the callback into a `GClosure`. genClosure_UnicodeCombiningClassFuncT :: MonadIO m => UnicodeCombiningClassFuncT -> m (GClosure C_UnicodeCombiningClassFuncT) genClosure_UnicodeCombiningClassFuncT :: forall (m :: * -> *). MonadIO m => UnicodeCombiningClassFuncT -> m (GClosure C_UnicodeScriptFuncT) genClosure_UnicodeCombiningClassFuncT UnicodeCombiningClassFuncT cb = IO (GClosure C_UnicodeScriptFuncT) -> m (GClosure C_UnicodeScriptFuncT) forall a. IO a -> m a 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 a b. IO a -> (a -> IO b) -> IO b 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 a `UnicodeCombiningClassFuncT` into a `C_UnicodeCombiningClassFuncT`. wrap_UnicodeCombiningClassFuncT :: Maybe (Ptr (FunPtr C_UnicodeCombiningClassFuncT)) -> UnicodeCombiningClassFuncT_WithClosures -> C_UnicodeCombiningClassFuncT wrap_UnicodeCombiningClassFuncT :: Maybe (Ptr (FunPtr C_UnicodeScriptFuncT)) -> UnicodeCombiningClassFuncT_WithClosures -> C_UnicodeScriptFuncT wrap_UnicodeCombiningClassFuncT Maybe (Ptr (FunPtr C_UnicodeScriptFuncT)) gi'funptrptr UnicodeCombiningClassFuncT_WithClosures gi'cb Ptr UnicodeFuncsT ufuncs Word32 unicode Ptr () userData = do Ptr UnicodeFuncsT -> (UnicodeFuncsT -> IO CUInt) -> IO CUInt forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr UnicodeFuncsT ufuncs ((UnicodeFuncsT -> IO CUInt) -> IO CUInt) -> (UnicodeFuncsT -> IO CUInt) -> IO CUInt forall a b. (a -> b) -> a -> b $ \UnicodeFuncsT ufuncs' -> do UnicodeCombiningClassT result <- UnicodeCombiningClassFuncT_WithClosures gi'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)) gi'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 a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return CUInt result' -- callback ReferenceTableFuncT {- Callable { returnType = Just (TInterface Name { namespace = "HarfBuzz" , name = "blob_t" }) , returnMayBeNull = False , returnTransfer = TransferEverything , returnDocumentation = Documentation { rawDocText = Just "A pointer to the @tag table within @face" , sinceVersion = Nothing } , args = [ Arg { argCName = "face" , argType = TInterface Name { namespace = "HarfBuzz" , name = "face_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "an #hb_face_t to reference table for" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "tag" , argType = TBasicType TUInt32 , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "the tag of the table to reference" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "user_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "User data pointer passed by the caller" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = 2 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } ] , skipReturn = False , callableThrows = False , callableDeprecated = Nothing , callableDocumentation = Documentation { rawDocText = Just "Callback function for hb_face_create_for_tables()." , sinceVersion = Just "0.9.2" } , callableResolvable = Nothing } -} -- | Type for the callback on the (unwrapped) C side. type C_ReferenceTableFuncT = Ptr HarfBuzz.FaceT.FaceT -> Word32 -> Ptr () -> IO (Ptr HarfBuzz.BlobT.BlobT) -- Args: [ Arg -- { argCName = "face" -- , argType = -- TInterface Name { namespace = "HarfBuzz" , name = "face_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "an #hb_face_t to reference table for" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "tag" -- , argType = TBasicType TUInt32 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the tag of the table to reference" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "user_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "User data pointer passed by the caller" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = 2 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TInterface Name { namespace = "HarfBuzz" , name = "blob_t" }) -- throws : False -- Skip return : False foreign import ccall "dynamic" __dynamic_C_ReferenceTableFuncT :: FunPtr C_ReferenceTableFuncT -> C_ReferenceTableFuncT -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell. dynamic_ReferenceTableFuncT :: (B.CallStack.HasCallStack, MonadIO m) => FunPtr C_ReferenceTableFuncT -> HarfBuzz.FaceT.FaceT -- ^ /@face@/: an t'GI.HarfBuzz.Structs.FaceT.FaceT' to reference table for -> Word32 -- ^ /@tag@/: the tag of the table to reference -> Ptr () -- ^ /@userData@/: User data pointer passed by the caller -> m HarfBuzz.BlobT.BlobT -- ^ __Returns:__ A pointer to the /@tag@/ table within /@face@/ dynamic_ReferenceTableFuncT :: forall (m :: * -> *). (HasCallStack, MonadIO m) => FunPtr C_ReferenceTableFuncT -> FaceT -> Word32 -> Ptr () -> m BlobT dynamic_ReferenceTableFuncT FunPtr C_ReferenceTableFuncT __funPtr FaceT face Word32 tag Ptr () userData = IO BlobT -> m BlobT forall a. IO a -> m a 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 Text "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 a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return BlobT result' -- | Generate a function pointer callable from C code, from a `C_ReferenceTableFuncT`. foreign import ccall "wrapper" mk_ReferenceTableFuncT :: C_ReferenceTableFuncT -> IO (FunPtr C_ReferenceTableFuncT) -- | Callback function for 'GI.HarfBuzz.Functions.faceCreateForTables'. -- -- /Since: 0.9.2/ type ReferenceTableFuncT = HarfBuzz.FaceT.FaceT -- ^ /@face@/: an t'GI.HarfBuzz.Structs.FaceT.FaceT' to reference table for -> Word32 -- ^ /@tag@/: the tag of the table to reference -> IO HarfBuzz.BlobT.BlobT -- ^ __Returns:__ A pointer to the /@tag@/ table within /@face@/ -- | A convenience synonym for @`Nothing` :: `Maybe` `ReferenceTableFuncT`@. noReferenceTableFuncT :: Maybe ReferenceTableFuncT noReferenceTableFuncT :: Maybe ReferenceTableFuncT noReferenceTableFuncT = Maybe ReferenceTableFuncT forall a. Maybe a Nothing -- | Callback function for 'GI.HarfBuzz.Functions.faceCreateForTables'. -- -- /Since: 0.9.2/ type ReferenceTableFuncT_WithClosures = HarfBuzz.FaceT.FaceT -- ^ /@face@/: an t'GI.HarfBuzz.Structs.FaceT.FaceT' to reference table for -> Word32 -- ^ /@tag@/: the tag of the table to reference -> Ptr () -- ^ /@userData@/: User data pointer passed by the caller -> IO HarfBuzz.BlobT.BlobT -- ^ __Returns:__ A pointer to the /@tag@/ table within /@face@/ -- | A convenience synonym for @`Nothing` :: `Maybe` `ReferenceTableFuncT_WithClosures`@. noReferenceTableFuncT_WithClosures :: Maybe ReferenceTableFuncT_WithClosures noReferenceTableFuncT_WithClosures :: Maybe ReferenceTableFuncT_WithClosures noReferenceTableFuncT_WithClosures = Maybe ReferenceTableFuncT_WithClosures forall a. Maybe a Nothing -- | A simple wrapper that ignores the closure arguments. drop_closures_ReferenceTableFuncT :: ReferenceTableFuncT -> ReferenceTableFuncT_WithClosures drop_closures_ReferenceTableFuncT :: ReferenceTableFuncT -> ReferenceTableFuncT_WithClosures drop_closures_ReferenceTableFuncT ReferenceTableFuncT _f FaceT face Word32 tag Ptr () _ = ReferenceTableFuncT _f FaceT face Word32 tag -- | Wrap the callback into a `GClosure`. genClosure_ReferenceTableFuncT :: MonadIO m => ReferenceTableFuncT -> m (GClosure C_ReferenceTableFuncT) genClosure_ReferenceTableFuncT :: forall (m :: * -> *). MonadIO m => ReferenceTableFuncT -> m (GClosure C_ReferenceTableFuncT) genClosure_ReferenceTableFuncT ReferenceTableFuncT cb = IO (GClosure C_ReferenceTableFuncT) -> m (GClosure C_ReferenceTableFuncT) forall a. IO a -> m a 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 a b. IO a -> (a -> IO b) -> IO b 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 a `ReferenceTableFuncT` into a `C_ReferenceTableFuncT`. wrap_ReferenceTableFuncT :: Maybe (Ptr (FunPtr C_ReferenceTableFuncT)) -> ReferenceTableFuncT_WithClosures -> C_ReferenceTableFuncT wrap_ReferenceTableFuncT :: Maybe (Ptr (FunPtr C_ReferenceTableFuncT)) -> ReferenceTableFuncT_WithClosures -> C_ReferenceTableFuncT wrap_ReferenceTableFuncT Maybe (Ptr (FunPtr C_ReferenceTableFuncT)) gi'funptrptr ReferenceTableFuncT_WithClosures gi'cb Ptr FaceT face Word32 tag Ptr () userData = do Ptr FaceT -> (FaceT -> IO (Ptr BlobT)) -> IO (Ptr BlobT) forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr FaceT face ((FaceT -> IO (Ptr BlobT)) -> IO (Ptr BlobT)) -> (FaceT -> IO (Ptr BlobT)) -> IO (Ptr BlobT) forall a b. (a -> b) -> a -> b $ \FaceT face' -> do BlobT result <- ReferenceTableFuncT_WithClosures gi'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)) gi'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 a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return Ptr BlobT result' -- callback PaintSweepGradientFuncT {- Callable { returnType = Nothing , returnMayBeNull = False , returnTransfer = TransferNothing , returnDocumentation = Documentation { rawDocText = Nothing , sinceVersion = Nothing } , args = [ Arg { argCName = "funcs" , argType = TInterface Name { namespace = "HarfBuzz" , name = "paint_funcs_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "paint functions object" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "paint_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "The data accompanying the paint functions in hb_font_paint_glyph()" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "color_line" , argType = TInterface Name { namespace = "HarfBuzz" , name = "color_line_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "Color information for the gradient" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "x0" , argType = TBasicType TFloat , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "X coordinate of the circle's center" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "y0" , argType = TBasicType TFloat , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "Y coordinate of the circle's center" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "start_angle" , argType = TBasicType TFloat , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "the start angle, in radians" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "end_angle" , argType = TBasicType TFloat , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "the end angle, in radians" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "user_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "User data pointer passed to hb_paint_funcs_set_sweep_gradient_func()" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = 7 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } ] , skipReturn = False , callableThrows = False , callableDeprecated = Nothing , callableDocumentation = Documentation { rawDocText = Just "A virtual method for the #hb_paint_funcs_t to paint a sweep\ngradient everywhere within the current clip.\n\nThe @color_line object contains information about the colors of the gradients.\nIt is only valid for the duration of the callback, you cannot keep it around.\n\nThe coordinates of the points are interpreted according\nto the current transform.\n\nSee the OpenType spec [COLR](https://learn.microsoft.com/en-us/typography/opentype/spec/colr)\nsection for details on how the points define the direction\nof the gradient, and how to interpret the @color_line." , sinceVersion = Just "7.0.0" } , callableResolvable = Nothing } -} -- | Type for the callback on the (unwrapped) C side. type C_PaintSweepGradientFuncT = Ptr HarfBuzz.PaintFuncsT.PaintFuncsT -> Ptr () -> Ptr HarfBuzz.ColorLineT.ColorLineT -> CFloat -> CFloat -> CFloat -> CFloat -> Ptr () -> IO () -- Args: [ Arg -- { argCName = "funcs" -- , argType = -- TInterface Name { namespace = "HarfBuzz" , name = "paint_funcs_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "paint functions object" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "paint_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = -- Just -- "The data accompanying the paint functions in hb_font_paint_glyph()" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "color_line" -- , argType = -- TInterface Name { namespace = "HarfBuzz" , name = "color_line_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "Color information for the gradient" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "x0" -- , argType = TBasicType TFloat -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "X coordinate of the circle's center" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "y0" -- , argType = TBasicType TFloat -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "Y coordinate of the circle's center" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "start_angle" -- , argType = TBasicType TFloat -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the start angle, in radians" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "end_angle" -- , argType = TBasicType TFloat -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the end angle, in radians" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "user_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = -- Just -- "User data pointer passed to hb_paint_funcs_set_sweep_gradient_func()" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = 7 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "dynamic" __dynamic_C_PaintSweepGradientFuncT :: FunPtr C_PaintSweepGradientFuncT -> C_PaintSweepGradientFuncT -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell. dynamic_PaintSweepGradientFuncT :: (B.CallStack.HasCallStack, MonadIO m) => FunPtr C_PaintSweepGradientFuncT -> HarfBuzz.PaintFuncsT.PaintFuncsT -- ^ /@funcs@/: paint functions object -> Ptr () -- ^ /@paintData@/: The data accompanying the paint functions in 'GI.HarfBuzz.Functions.fontPaintGlyph' -> HarfBuzz.ColorLineT.ColorLineT -- ^ /@colorLine@/: Color information for the gradient -> Float -- ^ /@x0@/: X coordinate of the circle\'s center -> Float -- ^ /@y0@/: Y coordinate of the circle\'s center -> Float -- ^ /@startAngle@/: the start angle, in radians -> Float -- ^ /@endAngle@/: the end angle, in radians -> Ptr () -- ^ /@userData@/: User data pointer passed to 'GI.HarfBuzz.Functions.paintFuncsSetSweepGradientFunc' -> m () dynamic_PaintSweepGradientFuncT :: forall (m :: * -> *). (HasCallStack, MonadIO m) => FunPtr C_PaintSweepGradientFuncT -> PaintFuncsT -> Ptr () -> ColorLineT -> Float -> Float -> Float -> Float -> Ptr () -> m () dynamic_PaintSweepGradientFuncT FunPtr C_PaintSweepGradientFuncT __funPtr PaintFuncsT funcs Ptr () paintData ColorLineT colorLine Float x0 Float y0 Float startAngle Float endAngle Ptr () userData = IO () -> m () forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do Ptr PaintFuncsT funcs' <- PaintFuncsT -> IO (Ptr PaintFuncsT) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr PaintFuncsT funcs Ptr ColorLineT colorLine' <- ColorLineT -> IO (Ptr ColorLineT) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr ColorLineT colorLine let x0' :: CFloat x0' = Float -> CFloat forall a b. (Real a, Fractional b) => a -> b realToFrac Float x0 let y0' :: CFloat y0' = Float -> CFloat forall a b. (Real a, Fractional b) => a -> b realToFrac Float y0 let startAngle' :: CFloat startAngle' = Float -> CFloat forall a b. (Real a, Fractional b) => a -> b realToFrac Float startAngle let endAngle' :: CFloat endAngle' = Float -> CFloat forall a b. (Real a, Fractional b) => a -> b realToFrac Float endAngle (FunPtr C_PaintSweepGradientFuncT -> C_PaintSweepGradientFuncT __dynamic_C_PaintSweepGradientFuncT FunPtr C_PaintSweepGradientFuncT __funPtr) Ptr PaintFuncsT funcs' Ptr () paintData Ptr ColorLineT colorLine' CFloat x0' CFloat y0' CFloat startAngle' CFloat endAngle' Ptr () userData PaintFuncsT -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr PaintFuncsT funcs ColorLineT -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr ColorLineT colorLine () -> IO () forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return () -- | Generate a function pointer callable from C code, from a `C_PaintSweepGradientFuncT`. foreign import ccall "wrapper" mk_PaintSweepGradientFuncT :: C_PaintSweepGradientFuncT -> IO (FunPtr C_PaintSweepGradientFuncT) -- | A virtual method for the t'GI.HarfBuzz.Structs.PaintFuncsT.PaintFuncsT' to paint a sweep -- gradient everywhere within the current clip. -- -- The /@colorLine@/ object contains information about the colors of the gradients. -- It is only valid for the duration of the callback, you cannot keep it around. -- -- The coordinates of the points are interpreted according -- to the current transform. -- -- See the OpenType spec <https://learn.microsoft.com/en-us/typography/opentype/spec/colr COLR> -- section for details on how the points define the direction -- of the gradient, and how to interpret the /@colorLine@/. -- -- /Since: 7.0.0/ type PaintSweepGradientFuncT = HarfBuzz.PaintFuncsT.PaintFuncsT -- ^ /@funcs@/: paint functions object -> Ptr () -- ^ /@paintData@/: The data accompanying the paint functions in 'GI.HarfBuzz.Functions.fontPaintGlyph' -> HarfBuzz.ColorLineT.ColorLineT -- ^ /@colorLine@/: Color information for the gradient -> Float -- ^ /@x0@/: X coordinate of the circle\'s center -> Float -- ^ /@y0@/: Y coordinate of the circle\'s center -> Float -- ^ /@startAngle@/: the start angle, in radians -> Float -- ^ /@endAngle@/: the end angle, in radians -> IO () -- | A convenience synonym for @`Nothing` :: `Maybe` `PaintSweepGradientFuncT`@. noPaintSweepGradientFuncT :: Maybe PaintSweepGradientFuncT noPaintSweepGradientFuncT :: Maybe PaintSweepGradientFuncT noPaintSweepGradientFuncT = Maybe PaintSweepGradientFuncT forall a. Maybe a Nothing -- | A virtual method for the t'GI.HarfBuzz.Structs.PaintFuncsT.PaintFuncsT' to paint a sweep -- gradient everywhere within the current clip. -- -- The /@colorLine@/ object contains information about the colors of the gradients. -- It is only valid for the duration of the callback, you cannot keep it around. -- -- The coordinates of the points are interpreted according -- to the current transform. -- -- See the OpenType spec <https://learn.microsoft.com/en-us/typography/opentype/spec/colr COLR> -- section for details on how the points define the direction -- of the gradient, and how to interpret the /@colorLine@/. -- -- /Since: 7.0.0/ type PaintSweepGradientFuncT_WithClosures = HarfBuzz.PaintFuncsT.PaintFuncsT -- ^ /@funcs@/: paint functions object -> Ptr () -- ^ /@paintData@/: The data accompanying the paint functions in 'GI.HarfBuzz.Functions.fontPaintGlyph' -> HarfBuzz.ColorLineT.ColorLineT -- ^ /@colorLine@/: Color information for the gradient -> Float -- ^ /@x0@/: X coordinate of the circle\'s center -> Float -- ^ /@y0@/: Y coordinate of the circle\'s center -> Float -- ^ /@startAngle@/: the start angle, in radians -> Float -- ^ /@endAngle@/: the end angle, in radians -> Ptr () -- ^ /@userData@/: User data pointer passed to 'GI.HarfBuzz.Functions.paintFuncsSetSweepGradientFunc' -> IO () -- | A convenience synonym for @`Nothing` :: `Maybe` `PaintSweepGradientFuncT_WithClosures`@. noPaintSweepGradientFuncT_WithClosures :: Maybe PaintSweepGradientFuncT_WithClosures noPaintSweepGradientFuncT_WithClosures :: Maybe PaintSweepGradientFuncT_WithClosures noPaintSweepGradientFuncT_WithClosures = Maybe PaintSweepGradientFuncT_WithClosures forall a. Maybe a Nothing -- | A simple wrapper that ignores the closure arguments. drop_closures_PaintSweepGradientFuncT :: PaintSweepGradientFuncT -> PaintSweepGradientFuncT_WithClosures drop_closures_PaintSweepGradientFuncT :: PaintSweepGradientFuncT -> PaintSweepGradientFuncT_WithClosures drop_closures_PaintSweepGradientFuncT PaintSweepGradientFuncT _f PaintFuncsT funcs Ptr () paintData ColorLineT colorLine Float x0 Float y0 Float startAngle Float endAngle Ptr () _ = PaintSweepGradientFuncT _f PaintFuncsT funcs Ptr () paintData ColorLineT colorLine Float x0 Float y0 Float startAngle Float endAngle -- | Wrap the callback into a `GClosure`. genClosure_PaintSweepGradientFuncT :: MonadIO m => PaintSweepGradientFuncT -> m (GClosure C_PaintSweepGradientFuncT) genClosure_PaintSweepGradientFuncT :: forall (m :: * -> *). MonadIO m => PaintSweepGradientFuncT -> m (GClosure C_PaintSweepGradientFuncT) genClosure_PaintSweepGradientFuncT PaintSweepGradientFuncT cb = IO (GClosure C_PaintSweepGradientFuncT) -> m (GClosure C_PaintSweepGradientFuncT) forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (GClosure C_PaintSweepGradientFuncT) -> m (GClosure C_PaintSweepGradientFuncT)) -> IO (GClosure C_PaintSweepGradientFuncT) -> m (GClosure C_PaintSweepGradientFuncT) forall a b. (a -> b) -> a -> b $ do let cb' :: PaintSweepGradientFuncT_WithClosures cb' = PaintSweepGradientFuncT -> PaintSweepGradientFuncT_WithClosures drop_closures_PaintSweepGradientFuncT PaintSweepGradientFuncT cb let cb'' :: C_PaintSweepGradientFuncT cb'' = Maybe (Ptr (FunPtr C_PaintSweepGradientFuncT)) -> PaintSweepGradientFuncT_WithClosures -> C_PaintSweepGradientFuncT wrap_PaintSweepGradientFuncT Maybe (Ptr (FunPtr C_PaintSweepGradientFuncT)) forall a. Maybe a Nothing PaintSweepGradientFuncT_WithClosures cb' C_PaintSweepGradientFuncT -> IO (FunPtr C_PaintSweepGradientFuncT) mk_PaintSweepGradientFuncT C_PaintSweepGradientFuncT cb'' IO (FunPtr C_PaintSweepGradientFuncT) -> (FunPtr C_PaintSweepGradientFuncT -> IO (GClosure C_PaintSweepGradientFuncT)) -> IO (GClosure C_PaintSweepGradientFuncT) forall a b. IO a -> (a -> IO b) -> IO b forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b >>= FunPtr C_PaintSweepGradientFuncT -> IO (GClosure C_PaintSweepGradientFuncT) forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a) B.GClosure.newGClosure -- | Wrap a `PaintSweepGradientFuncT` into a `C_PaintSweepGradientFuncT`. wrap_PaintSweepGradientFuncT :: Maybe (Ptr (FunPtr C_PaintSweepGradientFuncT)) -> PaintSweepGradientFuncT_WithClosures -> C_PaintSweepGradientFuncT wrap_PaintSweepGradientFuncT :: Maybe (Ptr (FunPtr C_PaintSweepGradientFuncT)) -> PaintSweepGradientFuncT_WithClosures -> C_PaintSweepGradientFuncT wrap_PaintSweepGradientFuncT Maybe (Ptr (FunPtr C_PaintSweepGradientFuncT)) gi'funptrptr PaintSweepGradientFuncT_WithClosures gi'cb Ptr PaintFuncsT funcs Ptr () paintData Ptr ColorLineT colorLine CFloat x0 CFloat y0 CFloat startAngle CFloat endAngle Ptr () userData = do Ptr PaintFuncsT -> (PaintFuncsT -> IO ()) -> IO () forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr PaintFuncsT funcs ((PaintFuncsT -> IO ()) -> IO ()) -> (PaintFuncsT -> IO ()) -> IO () forall a b. (a -> b) -> a -> b $ \PaintFuncsT funcs' -> do Ptr ColorLineT -> (ColorLineT -> IO ()) -> IO () forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr ColorLineT colorLine ((ColorLineT -> IO ()) -> IO ()) -> (ColorLineT -> IO ()) -> IO () forall a b. (a -> b) -> a -> b $ \ColorLineT colorLine' -> do let x0' :: Float x0' = CFloat -> Float forall a b. (Real a, Fractional b) => a -> b realToFrac CFloat x0 let y0' :: Float y0' = CFloat -> Float forall a b. (Real a, Fractional b) => a -> b realToFrac CFloat y0 let startAngle' :: Float startAngle' = CFloat -> Float forall a b. (Real a, Fractional b) => a -> b realToFrac CFloat startAngle let endAngle' :: Float endAngle' = CFloat -> Float forall a b. (Real a, Fractional b) => a -> b realToFrac CFloat endAngle PaintSweepGradientFuncT_WithClosures gi'cb PaintFuncsT funcs' Ptr () paintData ColorLineT colorLine' Float x0' Float y0' Float startAngle' Float endAngle' Ptr () userData Maybe (Ptr (FunPtr C_PaintSweepGradientFuncT)) -> IO () forall a. Maybe (Ptr (FunPtr a)) -> IO () maybeReleaseFunPtr Maybe (Ptr (FunPtr C_PaintSweepGradientFuncT)) gi'funptrptr -- callback PaintRadialGradientFuncT {- Callable { returnType = Nothing , returnMayBeNull = False , returnTransfer = TransferNothing , returnDocumentation = Documentation { rawDocText = Nothing , sinceVersion = Nothing } , args = [ Arg { argCName = "funcs" , argType = TInterface Name { namespace = "HarfBuzz" , name = "paint_funcs_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "paint functions object" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "paint_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "The data accompanying the paint functions in hb_font_paint_glyph()" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "color_line" , argType = TInterface Name { namespace = "HarfBuzz" , name = "color_line_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "Color information for the gradient" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "x0" , argType = TBasicType TFloat , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "X coordinate of the first circle's center" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "y0" , argType = TBasicType TFloat , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "Y coordinate of the first circle's center" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "r0" , argType = TBasicType TFloat , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "radius of the first circle" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "x1" , argType = TBasicType TFloat , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "X coordinate of the second circle's center" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "y1" , argType = TBasicType TFloat , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "Y coordinate of the second circle's center" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "r1" , argType = TBasicType TFloat , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "radius of the second circle" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "user_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "User data pointer passed to hb_paint_funcs_set_radial_gradient_func()" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = 9 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } ] , skipReturn = False , callableThrows = False , callableDeprecated = Nothing , callableDocumentation = Documentation { rawDocText = Just "A virtual method for the #hb_paint_funcs_t to paint a radial\ngradient everywhere within the current clip.\n\nThe @color_line object contains information about the colors of the gradients.\nIt is only valid for the duration of the callback, you cannot keep it around.\n\nThe coordinates of the points are interpreted according\nto the current transform.\n\nSee the OpenType spec [COLR](https://learn.microsoft.com/en-us/typography/opentype/spec/colr)\nsection for details on how the points define the direction\nof the gradient, and how to interpret the @color_line." , sinceVersion = Just "7.0.0" } , callableResolvable = Nothing } -} -- | Type for the callback on the (unwrapped) C side. type C_PaintRadialGradientFuncT = Ptr HarfBuzz.PaintFuncsT.PaintFuncsT -> Ptr () -> Ptr HarfBuzz.ColorLineT.ColorLineT -> CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> Ptr () -> IO () -- Args: [ Arg -- { argCName = "funcs" -- , argType = -- TInterface Name { namespace = "HarfBuzz" , name = "paint_funcs_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "paint functions object" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "paint_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = -- Just -- "The data accompanying the paint functions in hb_font_paint_glyph()" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "color_line" -- , argType = -- TInterface Name { namespace = "HarfBuzz" , name = "color_line_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "Color information for the gradient" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "x0" -- , argType = TBasicType TFloat -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "X coordinate of the first circle's center" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "y0" -- , argType = TBasicType TFloat -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "Y coordinate of the first circle's center" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "r0" -- , argType = TBasicType TFloat -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "radius of the first circle" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "x1" -- , argType = TBasicType TFloat -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "X coordinate of the second circle's center" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "y1" -- , argType = TBasicType TFloat -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "Y coordinate of the second circle's center" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "r1" -- , argType = TBasicType TFloat -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "radius of the second circle" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "user_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = -- Just -- "User data pointer passed to hb_paint_funcs_set_radial_gradient_func()" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = 9 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "dynamic" __dynamic_C_PaintRadialGradientFuncT :: FunPtr C_PaintRadialGradientFuncT -> C_PaintRadialGradientFuncT -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell. dynamic_PaintRadialGradientFuncT :: (B.CallStack.HasCallStack, MonadIO m) => FunPtr C_PaintRadialGradientFuncT -> HarfBuzz.PaintFuncsT.PaintFuncsT -- ^ /@funcs@/: paint functions object -> Ptr () -- ^ /@paintData@/: The data accompanying the paint functions in 'GI.HarfBuzz.Functions.fontPaintGlyph' -> HarfBuzz.ColorLineT.ColorLineT -- ^ /@colorLine@/: Color information for the gradient -> Float -- ^ /@x0@/: X coordinate of the first circle\'s center -> Float -- ^ /@y0@/: Y coordinate of the first circle\'s center -> Float -- ^ /@r0@/: radius of the first circle -> Float -- ^ /@x1@/: X coordinate of the second circle\'s center -> Float -- ^ /@y1@/: Y coordinate of the second circle\'s center -> Float -- ^ /@r1@/: radius of the second circle -> Ptr () -- ^ /@userData@/: User data pointer passed to 'GI.HarfBuzz.Functions.paintFuncsSetRadialGradientFunc' -> m () dynamic_PaintRadialGradientFuncT :: forall (m :: * -> *). (HasCallStack, MonadIO m) => FunPtr C_PaintRadialGradientFuncT -> PaintFuncsT -> Ptr () -> ColorLineT -> Float -> Float -> Float -> Float -> Float -> Float -> Ptr () -> m () dynamic_PaintRadialGradientFuncT FunPtr C_PaintRadialGradientFuncT __funPtr PaintFuncsT funcs Ptr () paintData ColorLineT colorLine Float x0 Float y0 Float r0 Float x1 Float y1 Float r1 Ptr () userData = IO () -> m () forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do Ptr PaintFuncsT funcs' <- PaintFuncsT -> IO (Ptr PaintFuncsT) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr PaintFuncsT funcs Ptr ColorLineT colorLine' <- ColorLineT -> IO (Ptr ColorLineT) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr ColorLineT colorLine let x0' :: CFloat x0' = Float -> CFloat forall a b. (Real a, Fractional b) => a -> b realToFrac Float x0 let y0' :: CFloat y0' = Float -> CFloat forall a b. (Real a, Fractional b) => a -> b realToFrac Float y0 let r0' :: CFloat r0' = Float -> CFloat forall a b. (Real a, Fractional b) => a -> b realToFrac Float r0 let x1' :: CFloat x1' = Float -> CFloat forall a b. (Real a, Fractional b) => a -> b realToFrac Float x1 let y1' :: CFloat y1' = Float -> CFloat forall a b. (Real a, Fractional b) => a -> b realToFrac Float y1 let r1' :: CFloat r1' = Float -> CFloat forall a b. (Real a, Fractional b) => a -> b realToFrac Float r1 (FunPtr C_PaintRadialGradientFuncT -> C_PaintRadialGradientFuncT __dynamic_C_PaintRadialGradientFuncT FunPtr C_PaintRadialGradientFuncT __funPtr) Ptr PaintFuncsT funcs' Ptr () paintData Ptr ColorLineT colorLine' CFloat x0' CFloat y0' CFloat r0' CFloat x1' CFloat y1' CFloat r1' Ptr () userData PaintFuncsT -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr PaintFuncsT funcs ColorLineT -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr ColorLineT colorLine () -> IO () forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return () -- | Generate a function pointer callable from C code, from a `C_PaintRadialGradientFuncT`. foreign import ccall "wrapper" mk_PaintRadialGradientFuncT :: C_PaintRadialGradientFuncT -> IO (FunPtr C_PaintRadialGradientFuncT) -- | A virtual method for the t'GI.HarfBuzz.Structs.PaintFuncsT.PaintFuncsT' to paint a radial -- gradient everywhere within the current clip. -- -- The /@colorLine@/ object contains information about the colors of the gradients. -- It is only valid for the duration of the callback, you cannot keep it around. -- -- The coordinates of the points are interpreted according -- to the current transform. -- -- See the OpenType spec <https://learn.microsoft.com/en-us/typography/opentype/spec/colr COLR> -- section for details on how the points define the direction -- of the gradient, and how to interpret the /@colorLine@/. -- -- /Since: 7.0.0/ type PaintRadialGradientFuncT = HarfBuzz.PaintFuncsT.PaintFuncsT -- ^ /@funcs@/: paint functions object -> Ptr () -- ^ /@paintData@/: The data accompanying the paint functions in 'GI.HarfBuzz.Functions.fontPaintGlyph' -> HarfBuzz.ColorLineT.ColorLineT -- ^ /@colorLine@/: Color information for the gradient -> Float -- ^ /@x0@/: X coordinate of the first circle\'s center -> Float -- ^ /@y0@/: Y coordinate of the first circle\'s center -> Float -- ^ /@r0@/: radius of the first circle -> Float -- ^ /@x1@/: X coordinate of the second circle\'s center -> Float -- ^ /@y1@/: Y coordinate of the second circle\'s center -> Float -- ^ /@r1@/: radius of the second circle -> IO () -- | A convenience synonym for @`Nothing` :: `Maybe` `PaintRadialGradientFuncT`@. noPaintRadialGradientFuncT :: Maybe PaintRadialGradientFuncT noPaintRadialGradientFuncT :: Maybe PaintRadialGradientFuncT noPaintRadialGradientFuncT = Maybe PaintRadialGradientFuncT forall a. Maybe a Nothing -- | A virtual method for the t'GI.HarfBuzz.Structs.PaintFuncsT.PaintFuncsT' to paint a radial -- gradient everywhere within the current clip. -- -- The /@colorLine@/ object contains information about the colors of the gradients. -- It is only valid for the duration of the callback, you cannot keep it around. -- -- The coordinates of the points are interpreted according -- to the current transform. -- -- See the OpenType spec <https://learn.microsoft.com/en-us/typography/opentype/spec/colr COLR> -- section for details on how the points define the direction -- of the gradient, and how to interpret the /@colorLine@/. -- -- /Since: 7.0.0/ type PaintRadialGradientFuncT_WithClosures = HarfBuzz.PaintFuncsT.PaintFuncsT -- ^ /@funcs@/: paint functions object -> Ptr () -- ^ /@paintData@/: The data accompanying the paint functions in 'GI.HarfBuzz.Functions.fontPaintGlyph' -> HarfBuzz.ColorLineT.ColorLineT -- ^ /@colorLine@/: Color information for the gradient -> Float -- ^ /@x0@/: X coordinate of the first circle\'s center -> Float -- ^ /@y0@/: Y coordinate of the first circle\'s center -> Float -- ^ /@r0@/: radius of the first circle -> Float -- ^ /@x1@/: X coordinate of the second circle\'s center -> Float -- ^ /@y1@/: Y coordinate of the second circle\'s center -> Float -- ^ /@r1@/: radius of the second circle -> Ptr () -- ^ /@userData@/: User data pointer passed to 'GI.HarfBuzz.Functions.paintFuncsSetRadialGradientFunc' -> IO () -- | A convenience synonym for @`Nothing` :: `Maybe` `PaintRadialGradientFuncT_WithClosures`@. noPaintRadialGradientFuncT_WithClosures :: Maybe PaintRadialGradientFuncT_WithClosures noPaintRadialGradientFuncT_WithClosures :: Maybe PaintRadialGradientFuncT_WithClosures noPaintRadialGradientFuncT_WithClosures = Maybe PaintRadialGradientFuncT_WithClosures forall a. Maybe a Nothing -- | A simple wrapper that ignores the closure arguments. drop_closures_PaintRadialGradientFuncT :: PaintRadialGradientFuncT -> PaintRadialGradientFuncT_WithClosures drop_closures_PaintRadialGradientFuncT :: PaintRadialGradientFuncT -> PaintRadialGradientFuncT_WithClosures drop_closures_PaintRadialGradientFuncT PaintRadialGradientFuncT _f PaintFuncsT funcs Ptr () paintData ColorLineT colorLine Float x0 Float y0 Float r0 Float x1 Float y1 Float r1 Ptr () _ = PaintRadialGradientFuncT _f PaintFuncsT funcs Ptr () paintData ColorLineT colorLine Float x0 Float y0 Float r0 Float x1 Float y1 Float r1 -- | Wrap the callback into a `GClosure`. genClosure_PaintRadialGradientFuncT :: MonadIO m => PaintRadialGradientFuncT -> m (GClosure C_PaintRadialGradientFuncT) genClosure_PaintRadialGradientFuncT :: forall (m :: * -> *). MonadIO m => PaintRadialGradientFuncT -> m (GClosure C_PaintRadialGradientFuncT) genClosure_PaintRadialGradientFuncT PaintRadialGradientFuncT cb = IO (GClosure C_PaintRadialGradientFuncT) -> m (GClosure C_PaintRadialGradientFuncT) forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (GClosure C_PaintRadialGradientFuncT) -> m (GClosure C_PaintRadialGradientFuncT)) -> IO (GClosure C_PaintRadialGradientFuncT) -> m (GClosure C_PaintRadialGradientFuncT) forall a b. (a -> b) -> a -> b $ do let cb' :: PaintRadialGradientFuncT_WithClosures cb' = PaintRadialGradientFuncT -> PaintRadialGradientFuncT_WithClosures drop_closures_PaintRadialGradientFuncT PaintRadialGradientFuncT cb let cb'' :: C_PaintRadialGradientFuncT cb'' = Maybe (Ptr (FunPtr C_PaintRadialGradientFuncT)) -> PaintRadialGradientFuncT_WithClosures -> C_PaintRadialGradientFuncT wrap_PaintRadialGradientFuncT Maybe (Ptr (FunPtr C_PaintRadialGradientFuncT)) forall a. Maybe a Nothing PaintRadialGradientFuncT_WithClosures cb' C_PaintRadialGradientFuncT -> IO (FunPtr C_PaintRadialGradientFuncT) mk_PaintRadialGradientFuncT C_PaintRadialGradientFuncT cb'' IO (FunPtr C_PaintRadialGradientFuncT) -> (FunPtr C_PaintRadialGradientFuncT -> IO (GClosure C_PaintRadialGradientFuncT)) -> IO (GClosure C_PaintRadialGradientFuncT) forall a b. IO a -> (a -> IO b) -> IO b forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b >>= FunPtr C_PaintRadialGradientFuncT -> IO (GClosure C_PaintRadialGradientFuncT) forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a) B.GClosure.newGClosure -- | Wrap a `PaintRadialGradientFuncT` into a `C_PaintRadialGradientFuncT`. wrap_PaintRadialGradientFuncT :: Maybe (Ptr (FunPtr C_PaintRadialGradientFuncT)) -> PaintRadialGradientFuncT_WithClosures -> C_PaintRadialGradientFuncT wrap_PaintRadialGradientFuncT :: Maybe (Ptr (FunPtr C_PaintRadialGradientFuncT)) -> PaintRadialGradientFuncT_WithClosures -> C_PaintRadialGradientFuncT wrap_PaintRadialGradientFuncT Maybe (Ptr (FunPtr C_PaintRadialGradientFuncT)) gi'funptrptr PaintRadialGradientFuncT_WithClosures gi'cb Ptr PaintFuncsT funcs Ptr () paintData Ptr ColorLineT colorLine CFloat x0 CFloat y0 CFloat r0 CFloat x1 CFloat y1 CFloat r1 Ptr () userData = do Ptr PaintFuncsT -> (PaintFuncsT -> IO ()) -> IO () forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr PaintFuncsT funcs ((PaintFuncsT -> IO ()) -> IO ()) -> (PaintFuncsT -> IO ()) -> IO () forall a b. (a -> b) -> a -> b $ \PaintFuncsT funcs' -> do Ptr ColorLineT -> (ColorLineT -> IO ()) -> IO () forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr ColorLineT colorLine ((ColorLineT -> IO ()) -> IO ()) -> (ColorLineT -> IO ()) -> IO () forall a b. (a -> b) -> a -> b $ \ColorLineT colorLine' -> do let x0' :: Float x0' = CFloat -> Float forall a b. (Real a, Fractional b) => a -> b realToFrac CFloat x0 let y0' :: Float y0' = CFloat -> Float forall a b. (Real a, Fractional b) => a -> b realToFrac CFloat y0 let r0' :: Float r0' = CFloat -> Float forall a b. (Real a, Fractional b) => a -> b realToFrac CFloat r0 let x1' :: Float x1' = CFloat -> Float forall a b. (Real a, Fractional b) => a -> b realToFrac CFloat x1 let y1' :: Float y1' = CFloat -> Float forall a b. (Real a, Fractional b) => a -> b realToFrac CFloat y1 let r1' :: Float r1' = CFloat -> Float forall a b. (Real a, Fractional b) => a -> b realToFrac CFloat r1 PaintRadialGradientFuncT_WithClosures gi'cb PaintFuncsT funcs' Ptr () paintData ColorLineT colorLine' Float x0' Float y0' Float r0' Float x1' Float y1' Float r1' Ptr () userData Maybe (Ptr (FunPtr C_PaintRadialGradientFuncT)) -> IO () forall a. Maybe (Ptr (FunPtr a)) -> IO () maybeReleaseFunPtr Maybe (Ptr (FunPtr C_PaintRadialGradientFuncT)) gi'funptrptr -- callback PaintPushTransformFuncT {- Callable { returnType = Nothing , returnMayBeNull = False , returnTransfer = TransferNothing , returnDocumentation = Documentation { rawDocText = Nothing , sinceVersion = Nothing } , args = [ Arg { argCName = "funcs" , argType = TInterface Name { namespace = "HarfBuzz" , name = "paint_funcs_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "paint functions object" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "paint_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "The data accompanying the paint functions in hb_font_paint_glyph()" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "xx" , argType = TBasicType TFloat , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "xx component of the transform matrix" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "yx" , argType = TBasicType TFloat , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "yx component of the transform matrix" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "xy" , argType = TBasicType TFloat , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "xy component of the transform matrix" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "yy" , argType = TBasicType TFloat , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "yy component of the transform matrix" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "dx" , argType = TBasicType TFloat , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "dx component of the transform matrix" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "dy" , argType = TBasicType TFloat , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "dy component of the transform matrix" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "user_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "User data pointer passed to hb_paint_funcs_set_push_transform_func()" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = 8 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } ] , skipReturn = False , callableThrows = False , callableDeprecated = Nothing , callableDocumentation = Documentation { rawDocText = Just "A virtual method for the #hb_paint_funcs_t to apply\na transform to subsequent paint calls.\n\nThis transform is applied after the current transform,\nand remains in effect until a matching call to\nthe #hb_paint_funcs_pop_transform_func_t vfunc." , sinceVersion = Just "7.0.0" } , callableResolvable = Nothing } -} -- | Type for the callback on the (unwrapped) C side. type C_PaintPushTransformFuncT = Ptr HarfBuzz.PaintFuncsT.PaintFuncsT -> Ptr () -> CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> Ptr () -> IO () -- Args: [ Arg -- { argCName = "funcs" -- , argType = -- TInterface Name { namespace = "HarfBuzz" , name = "paint_funcs_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "paint functions object" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "paint_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = -- Just -- "The data accompanying the paint functions in hb_font_paint_glyph()" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "xx" -- , argType = TBasicType TFloat -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "xx component of the transform matrix" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "yx" -- , argType = TBasicType TFloat -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "yx component of the transform matrix" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "xy" -- , argType = TBasicType TFloat -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "xy component of the transform matrix" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "yy" -- , argType = TBasicType TFloat -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "yy component of the transform matrix" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "dx" -- , argType = TBasicType TFloat -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "dx component of the transform matrix" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "dy" -- , argType = TBasicType TFloat -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "dy component of the transform matrix" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "user_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = -- Just -- "User data pointer passed to hb_paint_funcs_set_push_transform_func()" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = 8 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "dynamic" __dynamic_C_PaintPushTransformFuncT :: FunPtr C_PaintPushTransformFuncT -> C_PaintPushTransformFuncT -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell. dynamic_PaintPushTransformFuncT :: (B.CallStack.HasCallStack, MonadIO m) => FunPtr C_PaintPushTransformFuncT -> HarfBuzz.PaintFuncsT.PaintFuncsT -- ^ /@funcs@/: paint functions object -> Ptr () -- ^ /@paintData@/: The data accompanying the paint functions in 'GI.HarfBuzz.Functions.fontPaintGlyph' -> Float -- ^ /@xx@/: xx component of the transform matrix -> Float -- ^ /@yx@/: yx component of the transform matrix -> Float -- ^ /@xy@/: xy component of the transform matrix -> Float -- ^ /@yy@/: yy component of the transform matrix -> Float -- ^ /@dx@/: dx component of the transform matrix -> Float -- ^ /@dy@/: dy component of the transform matrix -> Ptr () -- ^ /@userData@/: User data pointer passed to 'GI.HarfBuzz.Functions.paintFuncsSetPushTransformFunc' -> m () dynamic_PaintPushTransformFuncT :: forall (m :: * -> *). (HasCallStack, MonadIO m) => FunPtr C_PaintPushTransformFuncT -> PaintFuncsT -> Ptr () -> Float -> Float -> Float -> Float -> Float -> Float -> Ptr () -> m () dynamic_PaintPushTransformFuncT FunPtr C_PaintPushTransformFuncT __funPtr PaintFuncsT funcs Ptr () paintData Float xx Float yx Float xy Float yy Float dx Float dy Ptr () userData = IO () -> m () forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do Ptr PaintFuncsT funcs' <- PaintFuncsT -> IO (Ptr PaintFuncsT) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr PaintFuncsT funcs let xx' :: CFloat xx' = Float -> CFloat forall a b. (Real a, Fractional b) => a -> b realToFrac Float xx let yx' :: CFloat yx' = Float -> CFloat forall a b. (Real a, Fractional b) => a -> b realToFrac Float yx let xy' :: CFloat xy' = Float -> CFloat forall a b. (Real a, Fractional b) => a -> b realToFrac Float xy let yy' :: CFloat yy' = Float -> CFloat forall a b. (Real a, Fractional b) => a -> b realToFrac Float yy let dx' :: CFloat dx' = Float -> CFloat forall a b. (Real a, Fractional b) => a -> b realToFrac Float dx let dy' :: CFloat dy' = Float -> CFloat forall a b. (Real a, Fractional b) => a -> b realToFrac Float dy (FunPtr C_PaintPushTransformFuncT -> C_PaintPushTransformFuncT __dynamic_C_PaintPushTransformFuncT FunPtr C_PaintPushTransformFuncT __funPtr) Ptr PaintFuncsT funcs' Ptr () paintData CFloat xx' CFloat yx' CFloat xy' CFloat yy' CFloat dx' CFloat dy' Ptr () userData PaintFuncsT -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr PaintFuncsT funcs () -> IO () forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return () -- | Generate a function pointer callable from C code, from a `C_PaintPushTransformFuncT`. foreign import ccall "wrapper" mk_PaintPushTransformFuncT :: C_PaintPushTransformFuncT -> IO (FunPtr C_PaintPushTransformFuncT) -- | A virtual method for the t'GI.HarfBuzz.Structs.PaintFuncsT.PaintFuncsT' to apply -- a transform to subsequent paint calls. -- -- This transform is applied after the current transform, -- and remains in effect until a matching call to -- the @/hb_paint_funcs_pop_transform_func_t/@ vfunc. -- -- /Since: 7.0.0/ type PaintPushTransformFuncT = HarfBuzz.PaintFuncsT.PaintFuncsT -- ^ /@funcs@/: paint functions object -> Ptr () -- ^ /@paintData@/: The data accompanying the paint functions in 'GI.HarfBuzz.Functions.fontPaintGlyph' -> Float -- ^ /@xx@/: xx component of the transform matrix -> Float -- ^ /@yx@/: yx component of the transform matrix -> Float -- ^ /@xy@/: xy component of the transform matrix -> Float -- ^ /@yy@/: yy component of the transform matrix -> Float -- ^ /@dx@/: dx component of the transform matrix -> Float -- ^ /@dy@/: dy component of the transform matrix -> IO () -- | A convenience synonym for @`Nothing` :: `Maybe` `PaintPushTransformFuncT`@. noPaintPushTransformFuncT :: Maybe PaintPushTransformFuncT noPaintPushTransformFuncT :: Maybe PaintPushTransformFuncT noPaintPushTransformFuncT = Maybe PaintPushTransformFuncT forall a. Maybe a Nothing -- | A virtual method for the t'GI.HarfBuzz.Structs.PaintFuncsT.PaintFuncsT' to apply -- a transform to subsequent paint calls. -- -- This transform is applied after the current transform, -- and remains in effect until a matching call to -- the @/hb_paint_funcs_pop_transform_func_t/@ vfunc. -- -- /Since: 7.0.0/ type PaintPushTransformFuncT_WithClosures = HarfBuzz.PaintFuncsT.PaintFuncsT -- ^ /@funcs@/: paint functions object -> Ptr () -- ^ /@paintData@/: The data accompanying the paint functions in 'GI.HarfBuzz.Functions.fontPaintGlyph' -> Float -- ^ /@xx@/: xx component of the transform matrix -> Float -- ^ /@yx@/: yx component of the transform matrix -> Float -- ^ /@xy@/: xy component of the transform matrix -> Float -- ^ /@yy@/: yy component of the transform matrix -> Float -- ^ /@dx@/: dx component of the transform matrix -> Float -- ^ /@dy@/: dy component of the transform matrix -> Ptr () -- ^ /@userData@/: User data pointer passed to 'GI.HarfBuzz.Functions.paintFuncsSetPushTransformFunc' -> IO () -- | A convenience synonym for @`Nothing` :: `Maybe` `PaintPushTransformFuncT_WithClosures`@. noPaintPushTransformFuncT_WithClosures :: Maybe PaintPushTransformFuncT_WithClosures noPaintPushTransformFuncT_WithClosures :: Maybe PaintPushTransformFuncT_WithClosures noPaintPushTransformFuncT_WithClosures = Maybe PaintPushTransformFuncT_WithClosures forall a. Maybe a Nothing -- | A simple wrapper that ignores the closure arguments. drop_closures_PaintPushTransformFuncT :: PaintPushTransformFuncT -> PaintPushTransformFuncT_WithClosures drop_closures_PaintPushTransformFuncT :: PaintPushTransformFuncT -> PaintPushTransformFuncT_WithClosures drop_closures_PaintPushTransformFuncT PaintPushTransformFuncT _f PaintFuncsT funcs Ptr () paintData Float xx Float yx Float xy Float yy Float dx Float dy Ptr () _ = PaintPushTransformFuncT _f PaintFuncsT funcs Ptr () paintData Float xx Float yx Float xy Float yy Float dx Float dy -- | Wrap the callback into a `GClosure`. genClosure_PaintPushTransformFuncT :: MonadIO m => PaintPushTransformFuncT -> m (GClosure C_PaintPushTransformFuncT) genClosure_PaintPushTransformFuncT :: forall (m :: * -> *). MonadIO m => PaintPushTransformFuncT -> m (GClosure C_PaintPushTransformFuncT) genClosure_PaintPushTransformFuncT PaintPushTransformFuncT cb = IO (GClosure C_PaintPushTransformFuncT) -> m (GClosure C_PaintPushTransformFuncT) forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (GClosure C_PaintPushTransformFuncT) -> m (GClosure C_PaintPushTransformFuncT)) -> IO (GClosure C_PaintPushTransformFuncT) -> m (GClosure C_PaintPushTransformFuncT) forall a b. (a -> b) -> a -> b $ do let cb' :: PaintPushTransformFuncT_WithClosures cb' = PaintPushTransformFuncT -> PaintPushTransformFuncT_WithClosures drop_closures_PaintPushTransformFuncT PaintPushTransformFuncT cb let cb'' :: C_PaintPushTransformFuncT cb'' = Maybe (Ptr (FunPtr C_PaintPushTransformFuncT)) -> PaintPushTransformFuncT_WithClosures -> C_PaintPushTransformFuncT wrap_PaintPushTransformFuncT Maybe (Ptr (FunPtr C_PaintPushTransformFuncT)) forall a. Maybe a Nothing PaintPushTransformFuncT_WithClosures cb' C_PaintPushTransformFuncT -> IO (FunPtr C_PaintPushTransformFuncT) mk_PaintPushTransformFuncT C_PaintPushTransformFuncT cb'' IO (FunPtr C_PaintPushTransformFuncT) -> (FunPtr C_PaintPushTransformFuncT -> IO (GClosure C_PaintPushTransformFuncT)) -> IO (GClosure C_PaintPushTransformFuncT) forall a b. IO a -> (a -> IO b) -> IO b forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b >>= FunPtr C_PaintPushTransformFuncT -> IO (GClosure C_PaintPushTransformFuncT) forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a) B.GClosure.newGClosure -- | Wrap a `PaintPushTransformFuncT` into a `C_PaintPushTransformFuncT`. wrap_PaintPushTransformFuncT :: Maybe (Ptr (FunPtr C_PaintPushTransformFuncT)) -> PaintPushTransformFuncT_WithClosures -> C_PaintPushTransformFuncT wrap_PaintPushTransformFuncT :: Maybe (Ptr (FunPtr C_PaintPushTransformFuncT)) -> PaintPushTransformFuncT_WithClosures -> C_PaintPushTransformFuncT wrap_PaintPushTransformFuncT Maybe (Ptr (FunPtr C_PaintPushTransformFuncT)) gi'funptrptr PaintPushTransformFuncT_WithClosures gi'cb Ptr PaintFuncsT funcs Ptr () paintData CFloat xx CFloat yx CFloat xy CFloat yy CFloat dx CFloat dy Ptr () userData = do Ptr PaintFuncsT -> (PaintFuncsT -> IO ()) -> IO () forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr PaintFuncsT funcs ((PaintFuncsT -> IO ()) -> IO ()) -> (PaintFuncsT -> IO ()) -> IO () forall a b. (a -> b) -> a -> b $ \PaintFuncsT funcs' -> do let xx' :: Float xx' = CFloat -> Float forall a b. (Real a, Fractional b) => a -> b realToFrac CFloat xx let yx' :: Float yx' = CFloat -> Float forall a b. (Real a, Fractional b) => a -> b realToFrac CFloat yx let xy' :: Float xy' = CFloat -> Float forall a b. (Real a, Fractional b) => a -> b realToFrac CFloat xy let yy' :: Float yy' = CFloat -> Float forall a b. (Real a, Fractional b) => a -> b realToFrac CFloat yy let dx' :: Float dx' = CFloat -> Float forall a b. (Real a, Fractional b) => a -> b realToFrac CFloat dx let dy' :: Float dy' = CFloat -> Float forall a b. (Real a, Fractional b) => a -> b realToFrac CFloat dy PaintPushTransformFuncT_WithClosures gi'cb PaintFuncsT funcs' Ptr () paintData Float xx' Float yx' Float xy' Float yy' Float dx' Float dy' Ptr () userData Maybe (Ptr (FunPtr C_PaintPushTransformFuncT)) -> IO () forall a. Maybe (Ptr (FunPtr a)) -> IO () maybeReleaseFunPtr Maybe (Ptr (FunPtr C_PaintPushTransformFuncT)) gi'funptrptr -- callback PaintPushGroupFuncT {- Callable { returnType = Nothing , returnMayBeNull = False , returnTransfer = TransferNothing , returnDocumentation = Documentation { rawDocText = Nothing , sinceVersion = Nothing } , args = [ Arg { argCName = "funcs" , argType = TInterface Name { namespace = "HarfBuzz" , name = "paint_funcs_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "paint functions object" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "paint_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "The data accompanying the paint functions in hb_font_paint_glyph()" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "user_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "User data pointer passed to hb_paint_funcs_set_push_group_func()" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = 2 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } ] , skipReturn = False , callableThrows = False , callableDeprecated = Nothing , callableDocumentation = Documentation { rawDocText = Just "A virtual method for the #hb_paint_funcs_t to use\nan intermediate surface for subsequent paint calls.\n\nThe drawing will be redirected to an intermediate surface\nuntil a matching call to the #hb_paint_funcs_pop_group_func_t\nvfunc." , sinceVersion = Just "7.0.0" } , callableResolvable = Nothing } -} -- | Type for the callback on the (unwrapped) C side. type C_PaintPushGroupFuncT = Ptr HarfBuzz.PaintFuncsT.PaintFuncsT -> Ptr () -> Ptr () -> IO () -- Args: [ Arg -- { argCName = "funcs" -- , argType = -- TInterface Name { namespace = "HarfBuzz" , name = "paint_funcs_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "paint functions object" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "paint_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = -- Just -- "The data accompanying the paint functions in hb_font_paint_glyph()" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "user_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = -- Just -- "User data pointer passed to hb_paint_funcs_set_push_group_func()" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = 2 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "dynamic" __dynamic_C_PaintPushGroupFuncT :: FunPtr C_PaintPushGroupFuncT -> C_PaintPushGroupFuncT -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell. dynamic_PaintPushGroupFuncT :: (B.CallStack.HasCallStack, MonadIO m) => FunPtr C_PaintPushGroupFuncT -> HarfBuzz.PaintFuncsT.PaintFuncsT -- ^ /@funcs@/: paint functions object -> Ptr () -- ^ /@paintData@/: The data accompanying the paint functions in 'GI.HarfBuzz.Functions.fontPaintGlyph' -> Ptr () -- ^ /@userData@/: User data pointer passed to 'GI.HarfBuzz.Functions.paintFuncsSetPushGroupFunc' -> m () dynamic_PaintPushGroupFuncT :: forall (m :: * -> *). (HasCallStack, MonadIO m) => FunPtr C_PaintPushGroupFuncT -> PaintFuncsT -> Ptr () -> Ptr () -> m () dynamic_PaintPushGroupFuncT FunPtr C_PaintPushGroupFuncT __funPtr PaintFuncsT funcs Ptr () paintData Ptr () userData = IO () -> m () forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do Ptr PaintFuncsT funcs' <- PaintFuncsT -> IO (Ptr PaintFuncsT) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr PaintFuncsT funcs (FunPtr C_PaintPushGroupFuncT -> C_PaintPushGroupFuncT __dynamic_C_PaintPushGroupFuncT FunPtr C_PaintPushGroupFuncT __funPtr) Ptr PaintFuncsT funcs' Ptr () paintData Ptr () userData PaintFuncsT -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr PaintFuncsT funcs () -> IO () forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return () -- | Generate a function pointer callable from C code, from a `C_PaintPushGroupFuncT`. foreign import ccall "wrapper" mk_PaintPushGroupFuncT :: C_PaintPushGroupFuncT -> IO (FunPtr C_PaintPushGroupFuncT) -- | A virtual method for the t'GI.HarfBuzz.Structs.PaintFuncsT.PaintFuncsT' to use -- an intermediate surface for subsequent paint calls. -- -- The drawing will be redirected to an intermediate surface -- until a matching call to the @/hb_paint_funcs_pop_group_func_t/@ -- vfunc. -- -- /Since: 7.0.0/ type PaintPushGroupFuncT = HarfBuzz.PaintFuncsT.PaintFuncsT -- ^ /@funcs@/: paint functions object -> Ptr () -- ^ /@paintData@/: The data accompanying the paint functions in 'GI.HarfBuzz.Functions.fontPaintGlyph' -> IO () -- | A convenience synonym for @`Nothing` :: `Maybe` `PaintPushGroupFuncT`@. noPaintPushGroupFuncT :: Maybe PaintPushGroupFuncT noPaintPushGroupFuncT :: Maybe PaintPushGroupFuncT noPaintPushGroupFuncT = Maybe PaintPushGroupFuncT forall a. Maybe a Nothing -- | A virtual method for the t'GI.HarfBuzz.Structs.PaintFuncsT.PaintFuncsT' to use -- an intermediate surface for subsequent paint calls. -- -- The drawing will be redirected to an intermediate surface -- until a matching call to the @/hb_paint_funcs_pop_group_func_t/@ -- vfunc. -- -- /Since: 7.0.0/ type PaintPushGroupFuncT_WithClosures = HarfBuzz.PaintFuncsT.PaintFuncsT -- ^ /@funcs@/: paint functions object -> Ptr () -- ^ /@paintData@/: The data accompanying the paint functions in 'GI.HarfBuzz.Functions.fontPaintGlyph' -> Ptr () -- ^ /@userData@/: User data pointer passed to 'GI.HarfBuzz.Functions.paintFuncsSetPushGroupFunc' -> IO () -- | A convenience synonym for @`Nothing` :: `Maybe` `PaintPushGroupFuncT_WithClosures`@. noPaintPushGroupFuncT_WithClosures :: Maybe PaintPushGroupFuncT_WithClosures noPaintPushGroupFuncT_WithClosures :: Maybe PaintPushGroupFuncT_WithClosures noPaintPushGroupFuncT_WithClosures = Maybe PaintPushGroupFuncT_WithClosures forall a. Maybe a Nothing -- | A simple wrapper that ignores the closure arguments. drop_closures_PaintPushGroupFuncT :: PaintPushGroupFuncT -> PaintPushGroupFuncT_WithClosures drop_closures_PaintPushGroupFuncT :: PaintPushGroupFuncT -> PaintPushGroupFuncT_WithClosures drop_closures_PaintPushGroupFuncT PaintPushGroupFuncT _f PaintFuncsT funcs Ptr () paintData Ptr () _ = PaintPushGroupFuncT _f PaintFuncsT funcs Ptr () paintData -- | Wrap the callback into a `GClosure`. genClosure_PaintPushGroupFuncT :: MonadIO m => PaintPushGroupFuncT -> m (GClosure C_PaintPushGroupFuncT) genClosure_PaintPushGroupFuncT :: forall (m :: * -> *). MonadIO m => PaintPushGroupFuncT -> m (GClosure C_PaintPushGroupFuncT) genClosure_PaintPushGroupFuncT PaintPushGroupFuncT cb = IO (GClosure C_PaintPushGroupFuncT) -> m (GClosure C_PaintPushGroupFuncT) forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (GClosure C_PaintPushGroupFuncT) -> m (GClosure C_PaintPushGroupFuncT)) -> IO (GClosure C_PaintPushGroupFuncT) -> m (GClosure C_PaintPushGroupFuncT) forall a b. (a -> b) -> a -> b $ do let cb' :: PaintPushGroupFuncT_WithClosures cb' = PaintPushGroupFuncT -> PaintPushGroupFuncT_WithClosures drop_closures_PaintPushGroupFuncT PaintPushGroupFuncT cb let cb'' :: C_PaintPushGroupFuncT cb'' = Maybe (Ptr (FunPtr C_PaintPushGroupFuncT)) -> PaintPushGroupFuncT_WithClosures -> C_PaintPushGroupFuncT wrap_PaintPushGroupFuncT Maybe (Ptr (FunPtr C_PaintPushGroupFuncT)) forall a. Maybe a Nothing PaintPushGroupFuncT_WithClosures cb' C_PaintPushGroupFuncT -> IO (FunPtr C_PaintPushGroupFuncT) mk_PaintPushGroupFuncT C_PaintPushGroupFuncT cb'' IO (FunPtr C_PaintPushGroupFuncT) -> (FunPtr C_PaintPushGroupFuncT -> IO (GClosure C_PaintPushGroupFuncT)) -> IO (GClosure C_PaintPushGroupFuncT) forall a b. IO a -> (a -> IO b) -> IO b forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b >>= FunPtr C_PaintPushGroupFuncT -> IO (GClosure C_PaintPushGroupFuncT) forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a) B.GClosure.newGClosure -- | Wrap a `PaintPushGroupFuncT` into a `C_PaintPushGroupFuncT`. wrap_PaintPushGroupFuncT :: Maybe (Ptr (FunPtr C_PaintPushGroupFuncT)) -> PaintPushGroupFuncT_WithClosures -> C_PaintPushGroupFuncT wrap_PaintPushGroupFuncT :: Maybe (Ptr (FunPtr C_PaintPushGroupFuncT)) -> PaintPushGroupFuncT_WithClosures -> C_PaintPushGroupFuncT wrap_PaintPushGroupFuncT Maybe (Ptr (FunPtr C_PaintPushGroupFuncT)) gi'funptrptr PaintPushGroupFuncT_WithClosures gi'cb Ptr PaintFuncsT funcs Ptr () paintData Ptr () userData = do Ptr PaintFuncsT -> (PaintFuncsT -> IO ()) -> IO () forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr PaintFuncsT funcs ((PaintFuncsT -> IO ()) -> IO ()) -> (PaintFuncsT -> IO ()) -> IO () forall a b. (a -> b) -> a -> b $ \PaintFuncsT funcs' -> do PaintPushGroupFuncT_WithClosures gi'cb PaintFuncsT funcs' Ptr () paintData Ptr () userData Maybe (Ptr (FunPtr C_PaintPushGroupFuncT)) -> IO () forall a. Maybe (Ptr (FunPtr a)) -> IO () maybeReleaseFunPtr Maybe (Ptr (FunPtr C_PaintPushGroupFuncT)) gi'funptrptr -- callback PaintPushClipRectangleFuncT {- Callable { returnType = Nothing , returnMayBeNull = False , returnTransfer = TransferNothing , returnDocumentation = Documentation { rawDocText = Nothing , sinceVersion = Nothing } , args = [ Arg { argCName = "funcs" , argType = TInterface Name { namespace = "HarfBuzz" , name = "paint_funcs_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "paint functions object" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "paint_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "The data accompanying the paint functions in hb_font_paint_glyph()" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "xmin" , argType = TBasicType TFloat , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "min X for the rectangle" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "ymin" , argType = TBasicType TFloat , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "min Y for the rectangle" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "xmax" , argType = TBasicType TFloat , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "max X for the rectangle" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "ymax" , argType = TBasicType TFloat , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "max Y for the rectangle" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "user_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "User data pointer passed to hb_paint_funcs_set_push_clip_rectangle_func()" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = 6 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } ] , skipReturn = False , callableThrows = False , callableDeprecated = Nothing , callableDocumentation = Documentation { rawDocText = Just "A virtual method for the #hb_paint_funcs_t to clip\nsubsequent paint calls to a rectangle.\n\nThe coordinates of the rectangle are interpreted according\nto the current transform.\n\nThis clip is applied in addition to the current clip,\nand remains in effect until a matching call to\nthe #hb_paint_funcs_pop_clip_func_t vfunc." , sinceVersion = Just "7.0.0" } , callableResolvable = Nothing } -} -- | Type for the callback on the (unwrapped) C side. type C_PaintPushClipRectangleFuncT = Ptr HarfBuzz.PaintFuncsT.PaintFuncsT -> Ptr () -> CFloat -> CFloat -> CFloat -> CFloat -> Ptr () -> IO () -- Args: [ Arg -- { argCName = "funcs" -- , argType = -- TInterface Name { namespace = "HarfBuzz" , name = "paint_funcs_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "paint functions object" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "paint_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = -- Just -- "The data accompanying the paint functions in hb_font_paint_glyph()" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "xmin" -- , argType = TBasicType TFloat -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "min X for the rectangle" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "ymin" -- , argType = TBasicType TFloat -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "min Y for the rectangle" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "xmax" -- , argType = TBasicType TFloat -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "max X for the rectangle" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "ymax" -- , argType = TBasicType TFloat -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "max Y for the rectangle" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "user_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = -- Just -- "User data pointer passed to hb_paint_funcs_set_push_clip_rectangle_func()" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = 6 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "dynamic" __dynamic_C_PaintPushClipRectangleFuncT :: FunPtr C_PaintPushClipRectangleFuncT -> C_PaintPushClipRectangleFuncT -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell. dynamic_PaintPushClipRectangleFuncT :: (B.CallStack.HasCallStack, MonadIO m) => FunPtr C_PaintPushClipRectangleFuncT -> HarfBuzz.PaintFuncsT.PaintFuncsT -- ^ /@funcs@/: paint functions object -> Ptr () -- ^ /@paintData@/: The data accompanying the paint functions in 'GI.HarfBuzz.Functions.fontPaintGlyph' -> Float -- ^ /@xmin@/: min X for the rectangle -> Float -- ^ /@ymin@/: min Y for the rectangle -> Float -- ^ /@xmax@/: max X for the rectangle -> Float -- ^ /@ymax@/: max Y for the rectangle -> Ptr () -- ^ /@userData@/: User data pointer passed to 'GI.HarfBuzz.Functions.paintFuncsSetPushClipRectangleFunc' -> m () dynamic_PaintPushClipRectangleFuncT :: forall (m :: * -> *). (HasCallStack, MonadIO m) => FunPtr C_PaintPushClipRectangleFuncT -> PaintFuncsT -> Ptr () -> Float -> Float -> Float -> Float -> Ptr () -> m () dynamic_PaintPushClipRectangleFuncT FunPtr C_PaintPushClipRectangleFuncT __funPtr PaintFuncsT funcs Ptr () paintData Float xmin Float ymin Float xmax Float ymax Ptr () userData = IO () -> m () forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do Ptr PaintFuncsT funcs' <- PaintFuncsT -> IO (Ptr PaintFuncsT) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr PaintFuncsT funcs let xmin' :: CFloat xmin' = Float -> CFloat forall a b. (Real a, Fractional b) => a -> b realToFrac Float xmin let ymin' :: CFloat ymin' = Float -> CFloat forall a b. (Real a, Fractional b) => a -> b realToFrac Float ymin let xmax' :: CFloat xmax' = Float -> CFloat forall a b. (Real a, Fractional b) => a -> b realToFrac Float xmax let ymax' :: CFloat ymax' = Float -> CFloat forall a b. (Real a, Fractional b) => a -> b realToFrac Float ymax (FunPtr C_PaintPushClipRectangleFuncT -> C_PaintPushClipRectangleFuncT __dynamic_C_PaintPushClipRectangleFuncT FunPtr C_PaintPushClipRectangleFuncT __funPtr) Ptr PaintFuncsT funcs' Ptr () paintData CFloat xmin' CFloat ymin' CFloat xmax' CFloat ymax' Ptr () userData PaintFuncsT -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr PaintFuncsT funcs () -> IO () forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return () -- | Generate a function pointer callable from C code, from a `C_PaintPushClipRectangleFuncT`. foreign import ccall "wrapper" mk_PaintPushClipRectangleFuncT :: C_PaintPushClipRectangleFuncT -> IO (FunPtr C_PaintPushClipRectangleFuncT) -- | A virtual method for the t'GI.HarfBuzz.Structs.PaintFuncsT.PaintFuncsT' to clip -- subsequent paint calls to a rectangle. -- -- The coordinates of the rectangle are interpreted according -- to the current transform. -- -- This clip is applied in addition to the current clip, -- and remains in effect until a matching call to -- the @/hb_paint_funcs_pop_clip_func_t/@ vfunc. -- -- /Since: 7.0.0/ type PaintPushClipRectangleFuncT = HarfBuzz.PaintFuncsT.PaintFuncsT -- ^ /@funcs@/: paint functions object -> Ptr () -- ^ /@paintData@/: The data accompanying the paint functions in 'GI.HarfBuzz.Functions.fontPaintGlyph' -> Float -- ^ /@xmin@/: min X for the rectangle -> Float -- ^ /@ymin@/: min Y for the rectangle -> Float -- ^ /@xmax@/: max X for the rectangle -> Float -- ^ /@ymax@/: max Y for the rectangle -> IO () -- | A convenience synonym for @`Nothing` :: `Maybe` `PaintPushClipRectangleFuncT`@. noPaintPushClipRectangleFuncT :: Maybe PaintPushClipRectangleFuncT noPaintPushClipRectangleFuncT :: Maybe PaintPushClipRectangleFuncT noPaintPushClipRectangleFuncT = Maybe PaintPushClipRectangleFuncT forall a. Maybe a Nothing -- | A virtual method for the t'GI.HarfBuzz.Structs.PaintFuncsT.PaintFuncsT' to clip -- subsequent paint calls to a rectangle. -- -- The coordinates of the rectangle are interpreted according -- to the current transform. -- -- This clip is applied in addition to the current clip, -- and remains in effect until a matching call to -- the @/hb_paint_funcs_pop_clip_func_t/@ vfunc. -- -- /Since: 7.0.0/ type PaintPushClipRectangleFuncT_WithClosures = HarfBuzz.PaintFuncsT.PaintFuncsT -- ^ /@funcs@/: paint functions object -> Ptr () -- ^ /@paintData@/: The data accompanying the paint functions in 'GI.HarfBuzz.Functions.fontPaintGlyph' -> Float -- ^ /@xmin@/: min X for the rectangle -> Float -- ^ /@ymin@/: min Y for the rectangle -> Float -- ^ /@xmax@/: max X for the rectangle -> Float -- ^ /@ymax@/: max Y for the rectangle -> Ptr () -- ^ /@userData@/: User data pointer passed to 'GI.HarfBuzz.Functions.paintFuncsSetPushClipRectangleFunc' -> IO () -- | A convenience synonym for @`Nothing` :: `Maybe` `PaintPushClipRectangleFuncT_WithClosures`@. noPaintPushClipRectangleFuncT_WithClosures :: Maybe PaintPushClipRectangleFuncT_WithClosures noPaintPushClipRectangleFuncT_WithClosures :: Maybe PaintPushClipRectangleFuncT_WithClosures noPaintPushClipRectangleFuncT_WithClosures = Maybe PaintPushClipRectangleFuncT_WithClosures forall a. Maybe a Nothing -- | A simple wrapper that ignores the closure arguments. drop_closures_PaintPushClipRectangleFuncT :: PaintPushClipRectangleFuncT -> PaintPushClipRectangleFuncT_WithClosures drop_closures_PaintPushClipRectangleFuncT :: PaintPushClipRectangleFuncT -> PaintPushClipRectangleFuncT_WithClosures drop_closures_PaintPushClipRectangleFuncT PaintPushClipRectangleFuncT _f PaintFuncsT funcs Ptr () paintData Float xmin Float ymin Float xmax Float ymax Ptr () _ = PaintPushClipRectangleFuncT _f PaintFuncsT funcs Ptr () paintData Float xmin Float ymin Float xmax Float ymax -- | Wrap the callback into a `GClosure`. genClosure_PaintPushClipRectangleFuncT :: MonadIO m => PaintPushClipRectangleFuncT -> m (GClosure C_PaintPushClipRectangleFuncT) genClosure_PaintPushClipRectangleFuncT :: forall (m :: * -> *). MonadIO m => PaintPushClipRectangleFuncT -> m (GClosure C_PaintPushClipRectangleFuncT) genClosure_PaintPushClipRectangleFuncT PaintPushClipRectangleFuncT cb = IO (GClosure C_PaintPushClipRectangleFuncT) -> m (GClosure C_PaintPushClipRectangleFuncT) forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (GClosure C_PaintPushClipRectangleFuncT) -> m (GClosure C_PaintPushClipRectangleFuncT)) -> IO (GClosure C_PaintPushClipRectangleFuncT) -> m (GClosure C_PaintPushClipRectangleFuncT) forall a b. (a -> b) -> a -> b $ do let cb' :: PaintPushClipRectangleFuncT_WithClosures cb' = PaintPushClipRectangleFuncT -> PaintPushClipRectangleFuncT_WithClosures drop_closures_PaintPushClipRectangleFuncT PaintPushClipRectangleFuncT cb let cb'' :: C_PaintPushClipRectangleFuncT cb'' = Maybe (Ptr (FunPtr C_PaintPushClipRectangleFuncT)) -> PaintPushClipRectangleFuncT_WithClosures -> C_PaintPushClipRectangleFuncT wrap_PaintPushClipRectangleFuncT Maybe (Ptr (FunPtr C_PaintPushClipRectangleFuncT)) forall a. Maybe a Nothing PaintPushClipRectangleFuncT_WithClosures cb' C_PaintPushClipRectangleFuncT -> IO (FunPtr C_PaintPushClipRectangleFuncT) mk_PaintPushClipRectangleFuncT C_PaintPushClipRectangleFuncT cb'' IO (FunPtr C_PaintPushClipRectangleFuncT) -> (FunPtr C_PaintPushClipRectangleFuncT -> IO (GClosure C_PaintPushClipRectangleFuncT)) -> IO (GClosure C_PaintPushClipRectangleFuncT) forall a b. IO a -> (a -> IO b) -> IO b forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b >>= FunPtr C_PaintPushClipRectangleFuncT -> IO (GClosure C_PaintPushClipRectangleFuncT) forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a) B.GClosure.newGClosure -- | Wrap a `PaintPushClipRectangleFuncT` into a `C_PaintPushClipRectangleFuncT`. wrap_PaintPushClipRectangleFuncT :: Maybe (Ptr (FunPtr C_PaintPushClipRectangleFuncT)) -> PaintPushClipRectangleFuncT_WithClosures -> C_PaintPushClipRectangleFuncT wrap_PaintPushClipRectangleFuncT :: Maybe (Ptr (FunPtr C_PaintPushClipRectangleFuncT)) -> PaintPushClipRectangleFuncT_WithClosures -> C_PaintPushClipRectangleFuncT wrap_PaintPushClipRectangleFuncT Maybe (Ptr (FunPtr C_PaintPushClipRectangleFuncT)) gi'funptrptr PaintPushClipRectangleFuncT_WithClosures gi'cb Ptr PaintFuncsT funcs Ptr () paintData CFloat xmin CFloat ymin CFloat xmax CFloat ymax Ptr () userData = do Ptr PaintFuncsT -> (PaintFuncsT -> IO ()) -> IO () forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr PaintFuncsT funcs ((PaintFuncsT -> IO ()) -> IO ()) -> (PaintFuncsT -> IO ()) -> IO () forall a b. (a -> b) -> a -> b $ \PaintFuncsT funcs' -> do let xmin' :: Float xmin' = CFloat -> Float forall a b. (Real a, Fractional b) => a -> b realToFrac CFloat xmin let ymin' :: Float ymin' = CFloat -> Float forall a b. (Real a, Fractional b) => a -> b realToFrac CFloat ymin let xmax' :: Float xmax' = CFloat -> Float forall a b. (Real a, Fractional b) => a -> b realToFrac CFloat xmax let ymax' :: Float ymax' = CFloat -> Float forall a b. (Real a, Fractional b) => a -> b realToFrac CFloat ymax PaintPushClipRectangleFuncT_WithClosures gi'cb PaintFuncsT funcs' Ptr () paintData Float xmin' Float ymin' Float xmax' Float ymax' Ptr () userData Maybe (Ptr (FunPtr C_PaintPushClipRectangleFuncT)) -> IO () forall a. Maybe (Ptr (FunPtr a)) -> IO () maybeReleaseFunPtr Maybe (Ptr (FunPtr C_PaintPushClipRectangleFuncT)) gi'funptrptr -- callback PaintPushClipGlyphFuncT {- Callable { returnType = Nothing , returnMayBeNull = False , returnTransfer = TransferNothing , returnDocumentation = Documentation { rawDocText = Nothing , sinceVersion = Nothing } , args = [ Arg { argCName = "funcs" , argType = TInterface Name { namespace = "HarfBuzz" , name = "paint_funcs_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "paint functions object" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "paint_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "The data accompanying the paint functions in hb_font_paint_glyph()" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "glyph" , argType = TBasicType TUInt32 , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "the glyph ID" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "font" , argType = TInterface Name { namespace = "HarfBuzz" , name = "font_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "the font" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "user_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "User data pointer passed to hb_paint_funcs_set_push_clip_glyph_func()" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = 4 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } ] , skipReturn = False , callableThrows = False , callableDeprecated = Nothing , callableDocumentation = Documentation { rawDocText = Just "A virtual method for the #hb_paint_funcs_t to clip\nsubsequent paint calls to the outline of a glyph.\n\nThe coordinates of the glyph outline are interpreted according\nto the current transform.\n\nThis clip is applied in addition to the current clip,\nand remains in effect until a matching call to\nthe #hb_paint_funcs_pop_clip_func_t vfunc." , sinceVersion = Just "7.0.0" } , callableResolvable = Nothing } -} -- | Type for the callback on the (unwrapped) C side. type C_PaintPushClipGlyphFuncT = Ptr HarfBuzz.PaintFuncsT.PaintFuncsT -> Ptr () -> Word32 -> Ptr HarfBuzz.FontT.FontT -> Ptr () -> IO () -- Args: [ Arg -- { argCName = "funcs" -- , argType = -- TInterface Name { namespace = "HarfBuzz" , name = "paint_funcs_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "paint functions object" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "paint_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = -- Just -- "The data accompanying the paint functions in hb_font_paint_glyph()" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "glyph" -- , argType = TBasicType TUInt32 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the glyph ID" , sinceVersion = Nothing } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "font" -- , argType = -- TInterface Name { namespace = "HarfBuzz" , name = "font_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the font" , sinceVersion = Nothing } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "user_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = -- Just -- "User data pointer passed to hb_paint_funcs_set_push_clip_glyph_func()" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = 4 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "dynamic" __dynamic_C_PaintPushClipGlyphFuncT :: FunPtr C_PaintPushClipGlyphFuncT -> C_PaintPushClipGlyphFuncT -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell. dynamic_PaintPushClipGlyphFuncT :: (B.CallStack.HasCallStack, MonadIO m) => FunPtr C_PaintPushClipGlyphFuncT -> HarfBuzz.PaintFuncsT.PaintFuncsT -- ^ /@funcs@/: paint functions object -> Ptr () -- ^ /@paintData@/: The data accompanying the paint functions in 'GI.HarfBuzz.Functions.fontPaintGlyph' -> Word32 -- ^ /@glyph@/: the glyph ID -> HarfBuzz.FontT.FontT -- ^ /@font@/: the font -> Ptr () -- ^ /@userData@/: User data pointer passed to 'GI.HarfBuzz.Functions.paintFuncsSetPushClipGlyphFunc' -> m () dynamic_PaintPushClipGlyphFuncT :: forall (m :: * -> *). (HasCallStack, MonadIO m) => FunPtr C_PaintPushClipGlyphFuncT -> PaintFuncsT -> Ptr () -> Word32 -> FontT -> Ptr () -> m () dynamic_PaintPushClipGlyphFuncT FunPtr C_PaintPushClipGlyphFuncT __funPtr PaintFuncsT funcs Ptr () paintData Word32 glyph FontT font Ptr () userData = IO () -> m () forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do Ptr PaintFuncsT funcs' <- PaintFuncsT -> IO (Ptr PaintFuncsT) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr PaintFuncsT funcs Ptr FontT font' <- FontT -> IO (Ptr FontT) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr FontT font (FunPtr C_PaintPushClipGlyphFuncT -> C_PaintPushClipGlyphFuncT __dynamic_C_PaintPushClipGlyphFuncT FunPtr C_PaintPushClipGlyphFuncT __funPtr) Ptr PaintFuncsT funcs' Ptr () paintData Word32 glyph Ptr FontT font' Ptr () userData PaintFuncsT -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr PaintFuncsT funcs FontT -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr FontT font () -> IO () forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return () -- | Generate a function pointer callable from C code, from a `C_PaintPushClipGlyphFuncT`. foreign import ccall "wrapper" mk_PaintPushClipGlyphFuncT :: C_PaintPushClipGlyphFuncT -> IO (FunPtr C_PaintPushClipGlyphFuncT) -- | A virtual method for the t'GI.HarfBuzz.Structs.PaintFuncsT.PaintFuncsT' to clip -- subsequent paint calls to the outline of a glyph. -- -- The coordinates of the glyph outline are interpreted according -- to the current transform. -- -- This clip is applied in addition to the current clip, -- and remains in effect until a matching call to -- the @/hb_paint_funcs_pop_clip_func_t/@ vfunc. -- -- /Since: 7.0.0/ type PaintPushClipGlyphFuncT = HarfBuzz.PaintFuncsT.PaintFuncsT -- ^ /@funcs@/: paint functions object -> Ptr () -- ^ /@paintData@/: The data accompanying the paint functions in 'GI.HarfBuzz.Functions.fontPaintGlyph' -> Word32 -- ^ /@glyph@/: the glyph ID -> HarfBuzz.FontT.FontT -- ^ /@font@/: the font -> IO () -- | A convenience synonym for @`Nothing` :: `Maybe` `PaintPushClipGlyphFuncT`@. noPaintPushClipGlyphFuncT :: Maybe PaintPushClipGlyphFuncT noPaintPushClipGlyphFuncT :: Maybe PaintPushClipGlyphFuncT noPaintPushClipGlyphFuncT = Maybe PaintPushClipGlyphFuncT forall a. Maybe a Nothing -- | A virtual method for the t'GI.HarfBuzz.Structs.PaintFuncsT.PaintFuncsT' to clip -- subsequent paint calls to the outline of a glyph. -- -- The coordinates of the glyph outline are interpreted according -- to the current transform. -- -- This clip is applied in addition to the current clip, -- and remains in effect until a matching call to -- the @/hb_paint_funcs_pop_clip_func_t/@ vfunc. -- -- /Since: 7.0.0/ type PaintPushClipGlyphFuncT_WithClosures = HarfBuzz.PaintFuncsT.PaintFuncsT -- ^ /@funcs@/: paint functions object -> Ptr () -- ^ /@paintData@/: The data accompanying the paint functions in 'GI.HarfBuzz.Functions.fontPaintGlyph' -> Word32 -- ^ /@glyph@/: the glyph ID -> HarfBuzz.FontT.FontT -- ^ /@font@/: the font -> Ptr () -- ^ /@userData@/: User data pointer passed to 'GI.HarfBuzz.Functions.paintFuncsSetPushClipGlyphFunc' -> IO () -- | A convenience synonym for @`Nothing` :: `Maybe` `PaintPushClipGlyphFuncT_WithClosures`@. noPaintPushClipGlyphFuncT_WithClosures :: Maybe PaintPushClipGlyphFuncT_WithClosures noPaintPushClipGlyphFuncT_WithClosures :: Maybe PaintPushClipGlyphFuncT_WithClosures noPaintPushClipGlyphFuncT_WithClosures = Maybe PaintPushClipGlyphFuncT_WithClosures forall a. Maybe a Nothing -- | A simple wrapper that ignores the closure arguments. drop_closures_PaintPushClipGlyphFuncT :: PaintPushClipGlyphFuncT -> PaintPushClipGlyphFuncT_WithClosures drop_closures_PaintPushClipGlyphFuncT :: PaintPushClipGlyphFuncT -> PaintPushClipGlyphFuncT_WithClosures drop_closures_PaintPushClipGlyphFuncT PaintPushClipGlyphFuncT _f PaintFuncsT funcs Ptr () paintData Word32 glyph FontT font Ptr () _ = PaintPushClipGlyphFuncT _f PaintFuncsT funcs Ptr () paintData Word32 glyph FontT font -- | Wrap the callback into a `GClosure`. genClosure_PaintPushClipGlyphFuncT :: MonadIO m => PaintPushClipGlyphFuncT -> m (GClosure C_PaintPushClipGlyphFuncT) genClosure_PaintPushClipGlyphFuncT :: forall (m :: * -> *). MonadIO m => PaintPushClipGlyphFuncT -> m (GClosure C_PaintPushClipGlyphFuncT) genClosure_PaintPushClipGlyphFuncT PaintPushClipGlyphFuncT cb = IO (GClosure C_PaintPushClipGlyphFuncT) -> m (GClosure C_PaintPushClipGlyphFuncT) forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (GClosure C_PaintPushClipGlyphFuncT) -> m (GClosure C_PaintPushClipGlyphFuncT)) -> IO (GClosure C_PaintPushClipGlyphFuncT) -> m (GClosure C_PaintPushClipGlyphFuncT) forall a b. (a -> b) -> a -> b $ do let cb' :: PaintPushClipGlyphFuncT_WithClosures cb' = PaintPushClipGlyphFuncT -> PaintPushClipGlyphFuncT_WithClosures drop_closures_PaintPushClipGlyphFuncT PaintPushClipGlyphFuncT cb let cb'' :: C_PaintPushClipGlyphFuncT cb'' = Maybe (Ptr (FunPtr C_PaintPushClipGlyphFuncT)) -> PaintPushClipGlyphFuncT_WithClosures -> C_PaintPushClipGlyphFuncT wrap_PaintPushClipGlyphFuncT Maybe (Ptr (FunPtr C_PaintPushClipGlyphFuncT)) forall a. Maybe a Nothing PaintPushClipGlyphFuncT_WithClosures cb' C_PaintPushClipGlyphFuncT -> IO (FunPtr C_PaintPushClipGlyphFuncT) mk_PaintPushClipGlyphFuncT C_PaintPushClipGlyphFuncT cb'' IO (FunPtr C_PaintPushClipGlyphFuncT) -> (FunPtr C_PaintPushClipGlyphFuncT -> IO (GClosure C_PaintPushClipGlyphFuncT)) -> IO (GClosure C_PaintPushClipGlyphFuncT) forall a b. IO a -> (a -> IO b) -> IO b forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b >>= FunPtr C_PaintPushClipGlyphFuncT -> IO (GClosure C_PaintPushClipGlyphFuncT) forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a) B.GClosure.newGClosure -- | Wrap a `PaintPushClipGlyphFuncT` into a `C_PaintPushClipGlyphFuncT`. wrap_PaintPushClipGlyphFuncT :: Maybe (Ptr (FunPtr C_PaintPushClipGlyphFuncT)) -> PaintPushClipGlyphFuncT_WithClosures -> C_PaintPushClipGlyphFuncT wrap_PaintPushClipGlyphFuncT :: Maybe (Ptr (FunPtr C_PaintPushClipGlyphFuncT)) -> PaintPushClipGlyphFuncT_WithClosures -> C_PaintPushClipGlyphFuncT wrap_PaintPushClipGlyphFuncT Maybe (Ptr (FunPtr C_PaintPushClipGlyphFuncT)) gi'funptrptr PaintPushClipGlyphFuncT_WithClosures gi'cb Ptr PaintFuncsT funcs Ptr () paintData Word32 glyph Ptr FontT font Ptr () userData = do Ptr PaintFuncsT -> (PaintFuncsT -> IO ()) -> IO () forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr PaintFuncsT funcs ((PaintFuncsT -> IO ()) -> IO ()) -> (PaintFuncsT -> IO ()) -> IO () forall a b. (a -> b) -> a -> b $ \PaintFuncsT funcs' -> do Ptr FontT -> (FontT -> IO ()) -> IO () forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr FontT font ((FontT -> IO ()) -> IO ()) -> (FontT -> IO ()) -> IO () forall a b. (a -> b) -> a -> b $ \FontT font' -> do PaintPushClipGlyphFuncT_WithClosures gi'cb PaintFuncsT funcs' Ptr () paintData Word32 glyph FontT font' Ptr () userData Maybe (Ptr (FunPtr C_PaintPushClipGlyphFuncT)) -> IO () forall a. Maybe (Ptr (FunPtr a)) -> IO () maybeReleaseFunPtr Maybe (Ptr (FunPtr C_PaintPushClipGlyphFuncT)) gi'funptrptr -- callback PaintPopTransformFuncT {- Callable { returnType = Nothing , returnMayBeNull = False , returnTransfer = TransferNothing , returnDocumentation = Documentation { rawDocText = Nothing , sinceVersion = Nothing } , args = [ Arg { argCName = "funcs" , argType = TInterface Name { namespace = "HarfBuzz" , name = "paint_funcs_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "paint functions object" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "paint_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "The data accompanying the paint functions in hb_font_paint_glyph()" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "user_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "User data pointer passed to hb_paint_funcs_set_pop_transform_func()" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = 2 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } ] , skipReturn = False , callableThrows = False , callableDeprecated = Nothing , callableDocumentation = Documentation { rawDocText = Just "A virtual method for the #hb_paint_funcs_t to undo\nthe effect of a prior call to the #hb_paint_funcs_push_transform_func_t\nvfunc." , sinceVersion = Just "7.0.0" } , callableResolvable = Nothing } -} -- | Type for the callback on the (unwrapped) C side. type C_PaintPopTransformFuncT = Ptr HarfBuzz.PaintFuncsT.PaintFuncsT -> Ptr () -> Ptr () -> IO () -- Args: [ Arg -- { argCName = "funcs" -- , argType = -- TInterface Name { namespace = "HarfBuzz" , name = "paint_funcs_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "paint functions object" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "paint_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = -- Just -- "The data accompanying the paint functions in hb_font_paint_glyph()" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "user_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = -- Just -- "User data pointer passed to hb_paint_funcs_set_pop_transform_func()" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = 2 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "dynamic" __dynamic_C_PaintPopTransformFuncT :: FunPtr C_PaintPopTransformFuncT -> C_PaintPopTransformFuncT -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell. dynamic_PaintPopTransformFuncT :: (B.CallStack.HasCallStack, MonadIO m) => FunPtr C_PaintPopTransformFuncT -> HarfBuzz.PaintFuncsT.PaintFuncsT -- ^ /@funcs@/: paint functions object -> Ptr () -- ^ /@paintData@/: The data accompanying the paint functions in 'GI.HarfBuzz.Functions.fontPaintGlyph' -> Ptr () -- ^ /@userData@/: User data pointer passed to 'GI.HarfBuzz.Functions.paintFuncsSetPopTransformFunc' -> m () dynamic_PaintPopTransformFuncT :: forall (m :: * -> *). (HasCallStack, MonadIO m) => FunPtr C_PaintPushGroupFuncT -> PaintFuncsT -> Ptr () -> Ptr () -> m () dynamic_PaintPopTransformFuncT FunPtr C_PaintPushGroupFuncT __funPtr PaintFuncsT funcs Ptr () paintData Ptr () userData = IO () -> m () forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do Ptr PaintFuncsT funcs' <- PaintFuncsT -> IO (Ptr PaintFuncsT) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr PaintFuncsT funcs (FunPtr C_PaintPushGroupFuncT -> C_PaintPushGroupFuncT __dynamic_C_PaintPopTransformFuncT FunPtr C_PaintPushGroupFuncT __funPtr) Ptr PaintFuncsT funcs' Ptr () paintData Ptr () userData PaintFuncsT -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr PaintFuncsT funcs () -> IO () forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return () -- | Generate a function pointer callable from C code, from a `C_PaintPopTransformFuncT`. foreign import ccall "wrapper" mk_PaintPopTransformFuncT :: C_PaintPopTransformFuncT -> IO (FunPtr C_PaintPopTransformFuncT) -- | A virtual method for the t'GI.HarfBuzz.Structs.PaintFuncsT.PaintFuncsT' to undo -- the effect of a prior call to the @/hb_paint_funcs_push_transform_func_t/@ -- vfunc. -- -- /Since: 7.0.0/ type PaintPopTransformFuncT = HarfBuzz.PaintFuncsT.PaintFuncsT -- ^ /@funcs@/: paint functions object -> Ptr () -- ^ /@paintData@/: The data accompanying the paint functions in 'GI.HarfBuzz.Functions.fontPaintGlyph' -> IO () -- | A convenience synonym for @`Nothing` :: `Maybe` `PaintPopTransformFuncT`@. noPaintPopTransformFuncT :: Maybe PaintPopTransformFuncT noPaintPopTransformFuncT :: Maybe PaintPushGroupFuncT noPaintPopTransformFuncT = Maybe PaintPushGroupFuncT forall a. Maybe a Nothing -- | A virtual method for the t'GI.HarfBuzz.Structs.PaintFuncsT.PaintFuncsT' to undo -- the effect of a prior call to the @/hb_paint_funcs_push_transform_func_t/@ -- vfunc. -- -- /Since: 7.0.0/ type PaintPopTransformFuncT_WithClosures = HarfBuzz.PaintFuncsT.PaintFuncsT -- ^ /@funcs@/: paint functions object -> Ptr () -- ^ /@paintData@/: The data accompanying the paint functions in 'GI.HarfBuzz.Functions.fontPaintGlyph' -> Ptr () -- ^ /@userData@/: User data pointer passed to 'GI.HarfBuzz.Functions.paintFuncsSetPopTransformFunc' -> IO () -- | A convenience synonym for @`Nothing` :: `Maybe` `PaintPopTransformFuncT_WithClosures`@. noPaintPopTransformFuncT_WithClosures :: Maybe PaintPopTransformFuncT_WithClosures noPaintPopTransformFuncT_WithClosures :: Maybe PaintPushGroupFuncT_WithClosures noPaintPopTransformFuncT_WithClosures = Maybe PaintPushGroupFuncT_WithClosures forall a. Maybe a Nothing -- | A simple wrapper that ignores the closure arguments. drop_closures_PaintPopTransformFuncT :: PaintPopTransformFuncT -> PaintPopTransformFuncT_WithClosures drop_closures_PaintPopTransformFuncT :: PaintPushGroupFuncT -> PaintPushGroupFuncT_WithClosures drop_closures_PaintPopTransformFuncT PaintPushGroupFuncT _f PaintFuncsT funcs Ptr () paintData Ptr () _ = PaintPushGroupFuncT _f PaintFuncsT funcs Ptr () paintData -- | Wrap the callback into a `GClosure`. genClosure_PaintPopTransformFuncT :: MonadIO m => PaintPopTransformFuncT -> m (GClosure C_PaintPopTransformFuncT) genClosure_PaintPopTransformFuncT :: forall (m :: * -> *). MonadIO m => PaintPushGroupFuncT -> m (GClosure C_PaintPushGroupFuncT) genClosure_PaintPopTransformFuncT PaintPushGroupFuncT cb = IO (GClosure C_PaintPushGroupFuncT) -> m (GClosure C_PaintPushGroupFuncT) forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (GClosure C_PaintPushGroupFuncT) -> m (GClosure C_PaintPushGroupFuncT)) -> IO (GClosure C_PaintPushGroupFuncT) -> m (GClosure C_PaintPushGroupFuncT) forall a b. (a -> b) -> a -> b $ do let cb' :: PaintPushGroupFuncT_WithClosures cb' = PaintPushGroupFuncT -> PaintPushGroupFuncT_WithClosures drop_closures_PaintPopTransformFuncT PaintPushGroupFuncT cb let cb'' :: C_PaintPushGroupFuncT cb'' = Maybe (Ptr (FunPtr C_PaintPushGroupFuncT)) -> PaintPushGroupFuncT_WithClosures -> C_PaintPushGroupFuncT wrap_PaintPopTransformFuncT Maybe (Ptr (FunPtr C_PaintPushGroupFuncT)) forall a. Maybe a Nothing PaintPushGroupFuncT_WithClosures cb' C_PaintPushGroupFuncT -> IO (FunPtr C_PaintPushGroupFuncT) mk_PaintPopTransformFuncT C_PaintPushGroupFuncT cb'' IO (FunPtr C_PaintPushGroupFuncT) -> (FunPtr C_PaintPushGroupFuncT -> IO (GClosure C_PaintPushGroupFuncT)) -> IO (GClosure C_PaintPushGroupFuncT) forall a b. IO a -> (a -> IO b) -> IO b forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b >>= FunPtr C_PaintPushGroupFuncT -> IO (GClosure C_PaintPushGroupFuncT) forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a) B.GClosure.newGClosure -- | Wrap a `PaintPopTransformFuncT` into a `C_PaintPopTransformFuncT`. wrap_PaintPopTransformFuncT :: Maybe (Ptr (FunPtr C_PaintPopTransformFuncT)) -> PaintPopTransformFuncT_WithClosures -> C_PaintPopTransformFuncT wrap_PaintPopTransformFuncT :: Maybe (Ptr (FunPtr C_PaintPushGroupFuncT)) -> PaintPushGroupFuncT_WithClosures -> C_PaintPushGroupFuncT wrap_PaintPopTransformFuncT Maybe (Ptr (FunPtr C_PaintPushGroupFuncT)) gi'funptrptr PaintPushGroupFuncT_WithClosures gi'cb Ptr PaintFuncsT funcs Ptr () paintData Ptr () userData = do Ptr PaintFuncsT -> (PaintFuncsT -> IO ()) -> IO () forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr PaintFuncsT funcs ((PaintFuncsT -> IO ()) -> IO ()) -> (PaintFuncsT -> IO ()) -> IO () forall a b. (a -> b) -> a -> b $ \PaintFuncsT funcs' -> do PaintPushGroupFuncT_WithClosures gi'cb PaintFuncsT funcs' Ptr () paintData Ptr () userData Maybe (Ptr (FunPtr C_PaintPushGroupFuncT)) -> IO () forall a. Maybe (Ptr (FunPtr a)) -> IO () maybeReleaseFunPtr Maybe (Ptr (FunPtr C_PaintPushGroupFuncT)) gi'funptrptr -- callback PaintPopGroupFuncT {- Callable { returnType = Nothing , returnMayBeNull = False , returnTransfer = TransferNothing , returnDocumentation = Documentation { rawDocText = Nothing , sinceVersion = Nothing } , args = [ Arg { argCName = "funcs" , argType = TInterface Name { namespace = "HarfBuzz" , name = "paint_funcs_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "paint functions object" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "paint_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "The data accompanying the paint functions in hb_font_paint_glyph()" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "mode" , argType = TInterface Name { namespace = "HarfBuzz" , name = "paint_composite_mode_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "the compositing mode to use" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "user_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "User data pointer passed to hb_paint_funcs_set_pop_group_func()" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = 3 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } ] , skipReturn = False , callableThrows = False , callableDeprecated = Nothing , callableDocumentation = Documentation { rawDocText = Just "A virtual method for the #hb_paint_funcs_t to undo\nthe effect of a prior call to the #hb_paint_funcs_push_group_func_t\nvfunc.\n\nThis call stops the redirection to the intermediate surface,\nand then composites it on the previous surface, using the\ncompositing mode passed to this call." , sinceVersion = Just "7.0.0" } , callableResolvable = Nothing } -} -- | Type for the callback on the (unwrapped) C side. type C_PaintPopGroupFuncT = Ptr HarfBuzz.PaintFuncsT.PaintFuncsT -> Ptr () -> CUInt -> Ptr () -> IO () -- Args: [ Arg -- { argCName = "funcs" -- , argType = -- TInterface Name { namespace = "HarfBuzz" , name = "paint_funcs_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "paint functions object" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "paint_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = -- Just -- "The data accompanying the paint functions in hb_font_paint_glyph()" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "mode" -- , argType = -- TInterface -- Name { namespace = "HarfBuzz" , name = "paint_composite_mode_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the compositing mode to use" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "user_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = -- Just -- "User data pointer passed to hb_paint_funcs_set_pop_group_func()" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = 3 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "dynamic" __dynamic_C_PaintPopGroupFuncT :: FunPtr C_PaintPopGroupFuncT -> C_PaintPopGroupFuncT -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell. dynamic_PaintPopGroupFuncT :: (B.CallStack.HasCallStack, MonadIO m) => FunPtr C_PaintPopGroupFuncT -> HarfBuzz.PaintFuncsT.PaintFuncsT -- ^ /@funcs@/: paint functions object -> Ptr () -- ^ /@paintData@/: The data accompanying the paint functions in 'GI.HarfBuzz.Functions.fontPaintGlyph' -> HarfBuzz.Enums.PaintCompositeModeT -- ^ /@mode@/: the compositing mode to use -> Ptr () -- ^ /@userData@/: User data pointer passed to 'GI.HarfBuzz.Functions.paintFuncsSetPopGroupFunc' -> m () dynamic_PaintPopGroupFuncT :: forall (m :: * -> *). (HasCallStack, MonadIO m) => FunPtr C_PaintPopGroupFuncT -> PaintFuncsT -> Ptr () -> PaintCompositeModeT -> Ptr () -> m () dynamic_PaintPopGroupFuncT FunPtr C_PaintPopGroupFuncT __funPtr PaintFuncsT funcs Ptr () paintData PaintCompositeModeT mode Ptr () userData = IO () -> m () forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do Ptr PaintFuncsT funcs' <- PaintFuncsT -> IO (Ptr PaintFuncsT) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr PaintFuncsT funcs let mode' :: CUInt mode' = (Int -> CUInt forall a b. (Integral a, Num b) => a -> b fromIntegral (Int -> CUInt) -> (PaintCompositeModeT -> Int) -> PaintCompositeModeT -> CUInt forall b c a. (b -> c) -> (a -> b) -> a -> c . PaintCompositeModeT -> Int forall a. Enum a => a -> Int fromEnum) PaintCompositeModeT mode (FunPtr C_PaintPopGroupFuncT -> C_PaintPopGroupFuncT __dynamic_C_PaintPopGroupFuncT FunPtr C_PaintPopGroupFuncT __funPtr) Ptr PaintFuncsT funcs' Ptr () paintData CUInt mode' Ptr () userData PaintFuncsT -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr PaintFuncsT funcs () -> IO () forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return () -- | Generate a function pointer callable from C code, from a `C_PaintPopGroupFuncT`. foreign import ccall "wrapper" mk_PaintPopGroupFuncT :: C_PaintPopGroupFuncT -> IO (FunPtr C_PaintPopGroupFuncT) -- | A virtual method for the t'GI.HarfBuzz.Structs.PaintFuncsT.PaintFuncsT' to undo -- the effect of a prior call to the @/hb_paint_funcs_push_group_func_t/@ -- vfunc. -- -- This call stops the redirection to the intermediate surface, -- and then composites it on the previous surface, using the -- compositing mode passed to this call. -- -- /Since: 7.0.0/ type PaintPopGroupFuncT = HarfBuzz.PaintFuncsT.PaintFuncsT -- ^ /@funcs@/: paint functions object -> Ptr () -- ^ /@paintData@/: The data accompanying the paint functions in 'GI.HarfBuzz.Functions.fontPaintGlyph' -> HarfBuzz.Enums.PaintCompositeModeT -- ^ /@mode@/: the compositing mode to use -> IO () -- | A convenience synonym for @`Nothing` :: `Maybe` `PaintPopGroupFuncT`@. noPaintPopGroupFuncT :: Maybe PaintPopGroupFuncT noPaintPopGroupFuncT :: Maybe PaintPopGroupFuncT noPaintPopGroupFuncT = Maybe PaintPopGroupFuncT forall a. Maybe a Nothing -- | A virtual method for the t'GI.HarfBuzz.Structs.PaintFuncsT.PaintFuncsT' to undo -- the effect of a prior call to the @/hb_paint_funcs_push_group_func_t/@ -- vfunc. -- -- This call stops the redirection to the intermediate surface, -- and then composites it on the previous surface, using the -- compositing mode passed to this call. -- -- /Since: 7.0.0/ type PaintPopGroupFuncT_WithClosures = HarfBuzz.PaintFuncsT.PaintFuncsT -- ^ /@funcs@/: paint functions object -> Ptr () -- ^ /@paintData@/: The data accompanying the paint functions in 'GI.HarfBuzz.Functions.fontPaintGlyph' -> HarfBuzz.Enums.PaintCompositeModeT -- ^ /@mode@/: the compositing mode to use -> Ptr () -- ^ /@userData@/: User data pointer passed to 'GI.HarfBuzz.Functions.paintFuncsSetPopGroupFunc' -> IO () -- | A convenience synonym for @`Nothing` :: `Maybe` `PaintPopGroupFuncT_WithClosures`@. noPaintPopGroupFuncT_WithClosures :: Maybe PaintPopGroupFuncT_WithClosures noPaintPopGroupFuncT_WithClosures :: Maybe PaintPopGroupFuncT_WithClosures noPaintPopGroupFuncT_WithClosures = Maybe PaintPopGroupFuncT_WithClosures forall a. Maybe a Nothing -- | A simple wrapper that ignores the closure arguments. drop_closures_PaintPopGroupFuncT :: PaintPopGroupFuncT -> PaintPopGroupFuncT_WithClosures drop_closures_PaintPopGroupFuncT :: PaintPopGroupFuncT -> PaintPopGroupFuncT_WithClosures drop_closures_PaintPopGroupFuncT PaintPopGroupFuncT _f PaintFuncsT funcs Ptr () paintData PaintCompositeModeT mode Ptr () _ = PaintPopGroupFuncT _f PaintFuncsT funcs Ptr () paintData PaintCompositeModeT mode -- | Wrap the callback into a `GClosure`. genClosure_PaintPopGroupFuncT :: MonadIO m => PaintPopGroupFuncT -> m (GClosure C_PaintPopGroupFuncT) genClosure_PaintPopGroupFuncT :: forall (m :: * -> *). MonadIO m => PaintPopGroupFuncT -> m (GClosure C_PaintPopGroupFuncT) genClosure_PaintPopGroupFuncT PaintPopGroupFuncT cb = IO (GClosure C_PaintPopGroupFuncT) -> m (GClosure C_PaintPopGroupFuncT) forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (GClosure C_PaintPopGroupFuncT) -> m (GClosure C_PaintPopGroupFuncT)) -> IO (GClosure C_PaintPopGroupFuncT) -> m (GClosure C_PaintPopGroupFuncT) forall a b. (a -> b) -> a -> b $ do let cb' :: PaintPopGroupFuncT_WithClosures cb' = PaintPopGroupFuncT -> PaintPopGroupFuncT_WithClosures drop_closures_PaintPopGroupFuncT PaintPopGroupFuncT cb let cb'' :: C_PaintPopGroupFuncT cb'' = Maybe (Ptr (FunPtr C_PaintPopGroupFuncT)) -> PaintPopGroupFuncT_WithClosures -> C_PaintPopGroupFuncT wrap_PaintPopGroupFuncT Maybe (Ptr (FunPtr C_PaintPopGroupFuncT)) forall a. Maybe a Nothing PaintPopGroupFuncT_WithClosures cb' C_PaintPopGroupFuncT -> IO (FunPtr C_PaintPopGroupFuncT) mk_PaintPopGroupFuncT C_PaintPopGroupFuncT cb'' IO (FunPtr C_PaintPopGroupFuncT) -> (FunPtr C_PaintPopGroupFuncT -> IO (GClosure C_PaintPopGroupFuncT)) -> IO (GClosure C_PaintPopGroupFuncT) forall a b. IO a -> (a -> IO b) -> IO b forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b >>= FunPtr C_PaintPopGroupFuncT -> IO (GClosure C_PaintPopGroupFuncT) forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a) B.GClosure.newGClosure -- | Wrap a `PaintPopGroupFuncT` into a `C_PaintPopGroupFuncT`. wrap_PaintPopGroupFuncT :: Maybe (Ptr (FunPtr C_PaintPopGroupFuncT)) -> PaintPopGroupFuncT_WithClosures -> C_PaintPopGroupFuncT wrap_PaintPopGroupFuncT :: Maybe (Ptr (FunPtr C_PaintPopGroupFuncT)) -> PaintPopGroupFuncT_WithClosures -> C_PaintPopGroupFuncT wrap_PaintPopGroupFuncT Maybe (Ptr (FunPtr C_PaintPopGroupFuncT)) gi'funptrptr PaintPopGroupFuncT_WithClosures gi'cb Ptr PaintFuncsT funcs Ptr () paintData CUInt mode Ptr () userData = do Ptr PaintFuncsT -> (PaintFuncsT -> IO ()) -> IO () forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr PaintFuncsT funcs ((PaintFuncsT -> IO ()) -> IO ()) -> (PaintFuncsT -> IO ()) -> IO () forall a b. (a -> b) -> a -> b $ \PaintFuncsT funcs' -> do let mode' :: PaintCompositeModeT mode' = (Int -> PaintCompositeModeT forall a. Enum a => Int -> a toEnum (Int -> PaintCompositeModeT) -> (CUInt -> Int) -> CUInt -> PaintCompositeModeT forall b c a. (b -> c) -> (a -> b) -> a -> c . CUInt -> Int forall a b. (Integral a, Num b) => a -> b fromIntegral) CUInt mode PaintPopGroupFuncT_WithClosures gi'cb PaintFuncsT funcs' Ptr () paintData PaintCompositeModeT mode' Ptr () userData Maybe (Ptr (FunPtr C_PaintPopGroupFuncT)) -> IO () forall a. Maybe (Ptr (FunPtr a)) -> IO () maybeReleaseFunPtr Maybe (Ptr (FunPtr C_PaintPopGroupFuncT)) gi'funptrptr -- callback PaintPopClipFuncT {- Callable { returnType = Nothing , returnMayBeNull = False , returnTransfer = TransferNothing , returnDocumentation = Documentation { rawDocText = Nothing , sinceVersion = Nothing } , args = [ Arg { argCName = "funcs" , argType = TInterface Name { namespace = "HarfBuzz" , name = "paint_funcs_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "paint functions object" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "paint_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "The data accompanying the paint functions in hb_font_paint_glyph()" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "user_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "User data pointer passed to hb_paint_funcs_set_pop_clip_func()" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = 2 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } ] , skipReturn = False , callableThrows = False , callableDeprecated = Nothing , callableDocumentation = Documentation { rawDocText = Just "A virtual method for the #hb_paint_funcs_t to undo\nthe effect of a prior call to the #hb_paint_funcs_push_clip_glyph_func_t\nor #hb_paint_funcs_push_clip_rectangle_func_t vfuncs." , sinceVersion = Just "7.0.0" } , callableResolvable = Nothing } -} -- | Type for the callback on the (unwrapped) C side. type C_PaintPopClipFuncT = Ptr HarfBuzz.PaintFuncsT.PaintFuncsT -> Ptr () -> Ptr () -> IO () -- Args: [ Arg -- { argCName = "funcs" -- , argType = -- TInterface Name { namespace = "HarfBuzz" , name = "paint_funcs_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "paint functions object" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "paint_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = -- Just -- "The data accompanying the paint functions in hb_font_paint_glyph()" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "user_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = -- Just -- "User data pointer passed to hb_paint_funcs_set_pop_clip_func()" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = 2 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "dynamic" __dynamic_C_PaintPopClipFuncT :: FunPtr C_PaintPopClipFuncT -> C_PaintPopClipFuncT -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell. dynamic_PaintPopClipFuncT :: (B.CallStack.HasCallStack, MonadIO m) => FunPtr C_PaintPopClipFuncT -> HarfBuzz.PaintFuncsT.PaintFuncsT -- ^ /@funcs@/: paint functions object -> Ptr () -- ^ /@paintData@/: The data accompanying the paint functions in 'GI.HarfBuzz.Functions.fontPaintGlyph' -> Ptr () -- ^ /@userData@/: User data pointer passed to 'GI.HarfBuzz.Functions.paintFuncsSetPopClipFunc' -> m () dynamic_PaintPopClipFuncT :: forall (m :: * -> *). (HasCallStack, MonadIO m) => FunPtr C_PaintPushGroupFuncT -> PaintFuncsT -> Ptr () -> Ptr () -> m () dynamic_PaintPopClipFuncT FunPtr C_PaintPushGroupFuncT __funPtr PaintFuncsT funcs Ptr () paintData Ptr () userData = IO () -> m () forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do Ptr PaintFuncsT funcs' <- PaintFuncsT -> IO (Ptr PaintFuncsT) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr PaintFuncsT funcs (FunPtr C_PaintPushGroupFuncT -> C_PaintPushGroupFuncT __dynamic_C_PaintPopClipFuncT FunPtr C_PaintPushGroupFuncT __funPtr) Ptr PaintFuncsT funcs' Ptr () paintData Ptr () userData PaintFuncsT -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr PaintFuncsT funcs () -> IO () forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return () -- | Generate a function pointer callable from C code, from a `C_PaintPopClipFuncT`. foreign import ccall "wrapper" mk_PaintPopClipFuncT :: C_PaintPopClipFuncT -> IO (FunPtr C_PaintPopClipFuncT) -- | A virtual method for the t'GI.HarfBuzz.Structs.PaintFuncsT.PaintFuncsT' to undo -- the effect of a prior call to the @/hb_paint_funcs_push_clip_glyph_func_t/@ -- or @/hb_paint_funcs_push_clip_rectangle_func_t/@ vfuncs. -- -- /Since: 7.0.0/ type PaintPopClipFuncT = HarfBuzz.PaintFuncsT.PaintFuncsT -- ^ /@funcs@/: paint functions object -> Ptr () -- ^ /@paintData@/: The data accompanying the paint functions in 'GI.HarfBuzz.Functions.fontPaintGlyph' -> IO () -- | A convenience synonym for @`Nothing` :: `Maybe` `PaintPopClipFuncT`@. noPaintPopClipFuncT :: Maybe PaintPopClipFuncT noPaintPopClipFuncT :: Maybe PaintPushGroupFuncT noPaintPopClipFuncT = Maybe PaintPushGroupFuncT forall a. Maybe a Nothing -- | A virtual method for the t'GI.HarfBuzz.Structs.PaintFuncsT.PaintFuncsT' to undo -- the effect of a prior call to the @/hb_paint_funcs_push_clip_glyph_func_t/@ -- or @/hb_paint_funcs_push_clip_rectangle_func_t/@ vfuncs. -- -- /Since: 7.0.0/ type PaintPopClipFuncT_WithClosures = HarfBuzz.PaintFuncsT.PaintFuncsT -- ^ /@funcs@/: paint functions object -> Ptr () -- ^ /@paintData@/: The data accompanying the paint functions in 'GI.HarfBuzz.Functions.fontPaintGlyph' -> Ptr () -- ^ /@userData@/: User data pointer passed to 'GI.HarfBuzz.Functions.paintFuncsSetPopClipFunc' -> IO () -- | A convenience synonym for @`Nothing` :: `Maybe` `PaintPopClipFuncT_WithClosures`@. noPaintPopClipFuncT_WithClosures :: Maybe PaintPopClipFuncT_WithClosures noPaintPopClipFuncT_WithClosures :: Maybe PaintPushGroupFuncT_WithClosures noPaintPopClipFuncT_WithClosures = Maybe PaintPushGroupFuncT_WithClosures forall a. Maybe a Nothing -- | A simple wrapper that ignores the closure arguments. drop_closures_PaintPopClipFuncT :: PaintPopClipFuncT -> PaintPopClipFuncT_WithClosures drop_closures_PaintPopClipFuncT :: PaintPushGroupFuncT -> PaintPushGroupFuncT_WithClosures drop_closures_PaintPopClipFuncT PaintPushGroupFuncT _f PaintFuncsT funcs Ptr () paintData Ptr () _ = PaintPushGroupFuncT _f PaintFuncsT funcs Ptr () paintData -- | Wrap the callback into a `GClosure`. genClosure_PaintPopClipFuncT :: MonadIO m => PaintPopClipFuncT -> m (GClosure C_PaintPopClipFuncT) genClosure_PaintPopClipFuncT :: forall (m :: * -> *). MonadIO m => PaintPushGroupFuncT -> m (GClosure C_PaintPushGroupFuncT) genClosure_PaintPopClipFuncT PaintPushGroupFuncT cb = IO (GClosure C_PaintPushGroupFuncT) -> m (GClosure C_PaintPushGroupFuncT) forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (GClosure C_PaintPushGroupFuncT) -> m (GClosure C_PaintPushGroupFuncT)) -> IO (GClosure C_PaintPushGroupFuncT) -> m (GClosure C_PaintPushGroupFuncT) forall a b. (a -> b) -> a -> b $ do let cb' :: PaintPushGroupFuncT_WithClosures cb' = PaintPushGroupFuncT -> PaintPushGroupFuncT_WithClosures drop_closures_PaintPopClipFuncT PaintPushGroupFuncT cb let cb'' :: C_PaintPushGroupFuncT cb'' = Maybe (Ptr (FunPtr C_PaintPushGroupFuncT)) -> PaintPushGroupFuncT_WithClosures -> C_PaintPushGroupFuncT wrap_PaintPopClipFuncT Maybe (Ptr (FunPtr C_PaintPushGroupFuncT)) forall a. Maybe a Nothing PaintPushGroupFuncT_WithClosures cb' C_PaintPushGroupFuncT -> IO (FunPtr C_PaintPushGroupFuncT) mk_PaintPopClipFuncT C_PaintPushGroupFuncT cb'' IO (FunPtr C_PaintPushGroupFuncT) -> (FunPtr C_PaintPushGroupFuncT -> IO (GClosure C_PaintPushGroupFuncT)) -> IO (GClosure C_PaintPushGroupFuncT) forall a b. IO a -> (a -> IO b) -> IO b forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b >>= FunPtr C_PaintPushGroupFuncT -> IO (GClosure C_PaintPushGroupFuncT) forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a) B.GClosure.newGClosure -- | Wrap a `PaintPopClipFuncT` into a `C_PaintPopClipFuncT`. wrap_PaintPopClipFuncT :: Maybe (Ptr (FunPtr C_PaintPopClipFuncT)) -> PaintPopClipFuncT_WithClosures -> C_PaintPopClipFuncT wrap_PaintPopClipFuncT :: Maybe (Ptr (FunPtr C_PaintPushGroupFuncT)) -> PaintPushGroupFuncT_WithClosures -> C_PaintPushGroupFuncT wrap_PaintPopClipFuncT Maybe (Ptr (FunPtr C_PaintPushGroupFuncT)) gi'funptrptr PaintPushGroupFuncT_WithClosures gi'cb Ptr PaintFuncsT funcs Ptr () paintData Ptr () userData = do Ptr PaintFuncsT -> (PaintFuncsT -> IO ()) -> IO () forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr PaintFuncsT funcs ((PaintFuncsT -> IO ()) -> IO ()) -> (PaintFuncsT -> IO ()) -> IO () forall a b. (a -> b) -> a -> b $ \PaintFuncsT funcs' -> do PaintPushGroupFuncT_WithClosures gi'cb PaintFuncsT funcs' Ptr () paintData Ptr () userData Maybe (Ptr (FunPtr C_PaintPushGroupFuncT)) -> IO () forall a. Maybe (Ptr (FunPtr a)) -> IO () maybeReleaseFunPtr Maybe (Ptr (FunPtr C_PaintPushGroupFuncT)) gi'funptrptr -- callback PaintLinearGradientFuncT {- Callable { returnType = Nothing , returnMayBeNull = False , returnTransfer = TransferNothing , returnDocumentation = Documentation { rawDocText = Nothing , sinceVersion = Nothing } , args = [ Arg { argCName = "funcs" , argType = TInterface Name { namespace = "HarfBuzz" , name = "paint_funcs_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "paint functions object" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "paint_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "The data accompanying the paint functions in hb_font_paint_glyph()" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "color_line" , argType = TInterface Name { namespace = "HarfBuzz" , name = "color_line_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "Color information for the gradient" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "x0" , argType = TBasicType TFloat , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "X coordinate of the first point" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "y0" , argType = TBasicType TFloat , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "Y coordinate of the first point" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "x1" , argType = TBasicType TFloat , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "X coordinate of the second point" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "y1" , argType = TBasicType TFloat , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "Y coordinate of the second point" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "x2" , argType = TBasicType TFloat , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "X coordinate of the third point" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "y2" , argType = TBasicType TFloat , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "Y coordinate of the third point" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "user_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "User data pointer passed to hb_paint_funcs_set_linear_gradient_func()" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = 9 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } ] , skipReturn = False , callableThrows = False , callableDeprecated = Nothing , callableDocumentation = Documentation { rawDocText = Just "A virtual method for the #hb_paint_funcs_t to paint a linear\ngradient everywhere within the current clip.\n\nThe @color_line object contains information about the colors of the gradients.\nIt is only valid for the duration of the callback, you cannot keep it around.\n\nThe coordinates of the points are interpreted according\nto the current transform.\n\nSee the OpenType spec [COLR](https://learn.microsoft.com/en-us/typography/opentype/spec/colr)\nsection for details on how the points define the direction\nof the gradient, and how to interpret the @color_line." , sinceVersion = Just "7.0.0" } , callableResolvable = Nothing } -} -- | Type for the callback on the (unwrapped) C side. type C_PaintLinearGradientFuncT = Ptr HarfBuzz.PaintFuncsT.PaintFuncsT -> Ptr () -> Ptr HarfBuzz.ColorLineT.ColorLineT -> CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> Ptr () -> IO () -- Args: [ Arg -- { argCName = "funcs" -- , argType = -- TInterface Name { namespace = "HarfBuzz" , name = "paint_funcs_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "paint functions object" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "paint_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = -- Just -- "The data accompanying the paint functions in hb_font_paint_glyph()" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "color_line" -- , argType = -- TInterface Name { namespace = "HarfBuzz" , name = "color_line_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "Color information for the gradient" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "x0" -- , argType = TBasicType TFloat -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "X coordinate of the first point" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "y0" -- , argType = TBasicType TFloat -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "Y coordinate of the first point" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "x1" -- , argType = TBasicType TFloat -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "X coordinate of the second point" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "y1" -- , argType = TBasicType TFloat -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "Y coordinate of the second point" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "x2" -- , argType = TBasicType TFloat -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "X coordinate of the third point" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "y2" -- , argType = TBasicType TFloat -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "Y coordinate of the third point" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "user_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = -- Just -- "User data pointer passed to hb_paint_funcs_set_linear_gradient_func()" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = 9 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "dynamic" __dynamic_C_PaintLinearGradientFuncT :: FunPtr C_PaintLinearGradientFuncT -> C_PaintLinearGradientFuncT -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell. dynamic_PaintLinearGradientFuncT :: (B.CallStack.HasCallStack, MonadIO m) => FunPtr C_PaintLinearGradientFuncT -> HarfBuzz.PaintFuncsT.PaintFuncsT -- ^ /@funcs@/: paint functions object -> Ptr () -- ^ /@paintData@/: The data accompanying the paint functions in 'GI.HarfBuzz.Functions.fontPaintGlyph' -> HarfBuzz.ColorLineT.ColorLineT -- ^ /@colorLine@/: Color information for the gradient -> Float -- ^ /@x0@/: X coordinate of the first point -> Float -- ^ /@y0@/: Y coordinate of the first point -> Float -- ^ /@x1@/: X coordinate of the second point -> Float -- ^ /@y1@/: Y coordinate of the second point -> Float -- ^ /@x2@/: X coordinate of the third point -> Float -- ^ /@y2@/: Y coordinate of the third point -> Ptr () -- ^ /@userData@/: User data pointer passed to 'GI.HarfBuzz.Functions.paintFuncsSetLinearGradientFunc' -> m () dynamic_PaintLinearGradientFuncT :: forall (m :: * -> *). (HasCallStack, MonadIO m) => FunPtr C_PaintRadialGradientFuncT -> PaintFuncsT -> Ptr () -> ColorLineT -> Float -> Float -> Float -> Float -> Float -> Float -> Ptr () -> m () dynamic_PaintLinearGradientFuncT FunPtr C_PaintRadialGradientFuncT __funPtr PaintFuncsT funcs Ptr () paintData ColorLineT colorLine Float x0 Float y0 Float x1 Float y1 Float x2 Float y2 Ptr () userData = IO () -> m () forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do Ptr PaintFuncsT funcs' <- PaintFuncsT -> IO (Ptr PaintFuncsT) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr PaintFuncsT funcs Ptr ColorLineT colorLine' <- ColorLineT -> IO (Ptr ColorLineT) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr ColorLineT colorLine let x0' :: CFloat x0' = Float -> CFloat forall a b. (Real a, Fractional b) => a -> b realToFrac Float x0 let y0' :: CFloat y0' = Float -> CFloat forall a b. (Real a, Fractional b) => a -> b realToFrac Float y0 let x1' :: CFloat x1' = Float -> CFloat forall a b. (Real a, Fractional b) => a -> b realToFrac Float x1 let y1' :: CFloat y1' = Float -> CFloat forall a b. (Real a, Fractional b) => a -> b realToFrac Float y1 let x2' :: CFloat x2' = Float -> CFloat forall a b. (Real a, Fractional b) => a -> b realToFrac Float x2 let y2' :: CFloat y2' = Float -> CFloat forall a b. (Real a, Fractional b) => a -> b realToFrac Float y2 (FunPtr C_PaintRadialGradientFuncT -> C_PaintRadialGradientFuncT __dynamic_C_PaintLinearGradientFuncT FunPtr C_PaintRadialGradientFuncT __funPtr) Ptr PaintFuncsT funcs' Ptr () paintData Ptr ColorLineT colorLine' CFloat x0' CFloat y0' CFloat x1' CFloat y1' CFloat x2' CFloat y2' Ptr () userData PaintFuncsT -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr PaintFuncsT funcs ColorLineT -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr ColorLineT colorLine () -> IO () forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return () -- | Generate a function pointer callable from C code, from a `C_PaintLinearGradientFuncT`. foreign import ccall "wrapper" mk_PaintLinearGradientFuncT :: C_PaintLinearGradientFuncT -> IO (FunPtr C_PaintLinearGradientFuncT) -- | A virtual method for the t'GI.HarfBuzz.Structs.PaintFuncsT.PaintFuncsT' to paint a linear -- gradient everywhere within the current clip. -- -- The /@colorLine@/ object contains information about the colors of the gradients. -- It is only valid for the duration of the callback, you cannot keep it around. -- -- The coordinates of the points are interpreted according -- to the current transform. -- -- See the OpenType spec <https://learn.microsoft.com/en-us/typography/opentype/spec/colr COLR> -- section for details on how the points define the direction -- of the gradient, and how to interpret the /@colorLine@/. -- -- /Since: 7.0.0/ type PaintLinearGradientFuncT = HarfBuzz.PaintFuncsT.PaintFuncsT -- ^ /@funcs@/: paint functions object -> Ptr () -- ^ /@paintData@/: The data accompanying the paint functions in 'GI.HarfBuzz.Functions.fontPaintGlyph' -> HarfBuzz.ColorLineT.ColorLineT -- ^ /@colorLine@/: Color information for the gradient -> Float -- ^ /@x0@/: X coordinate of the first point -> Float -- ^ /@y0@/: Y coordinate of the first point -> Float -- ^ /@x1@/: X coordinate of the second point -> Float -- ^ /@y1@/: Y coordinate of the second point -> Float -- ^ /@x2@/: X coordinate of the third point -> Float -- ^ /@y2@/: Y coordinate of the third point -> IO () -- | A convenience synonym for @`Nothing` :: `Maybe` `PaintLinearGradientFuncT`@. noPaintLinearGradientFuncT :: Maybe PaintLinearGradientFuncT noPaintLinearGradientFuncT :: Maybe PaintRadialGradientFuncT noPaintLinearGradientFuncT = Maybe PaintRadialGradientFuncT forall a. Maybe a Nothing -- | A virtual method for the t'GI.HarfBuzz.Structs.PaintFuncsT.PaintFuncsT' to paint a linear -- gradient everywhere within the current clip. -- -- The /@colorLine@/ object contains information about the colors of the gradients. -- It is only valid for the duration of the callback, you cannot keep it around. -- -- The coordinates of the points are interpreted according -- to the current transform. -- -- See the OpenType spec <https://learn.microsoft.com/en-us/typography/opentype/spec/colr COLR> -- section for details on how the points define the direction -- of the gradient, and how to interpret the /@colorLine@/. -- -- /Since: 7.0.0/ type PaintLinearGradientFuncT_WithClosures = HarfBuzz.PaintFuncsT.PaintFuncsT -- ^ /@funcs@/: paint functions object -> Ptr () -- ^ /@paintData@/: The data accompanying the paint functions in 'GI.HarfBuzz.Functions.fontPaintGlyph' -> HarfBuzz.ColorLineT.ColorLineT -- ^ /@colorLine@/: Color information for the gradient -> Float -- ^ /@x0@/: X coordinate of the first point -> Float -- ^ /@y0@/: Y coordinate of the first point -> Float -- ^ /@x1@/: X coordinate of the second point -> Float -- ^ /@y1@/: Y coordinate of the second point -> Float -- ^ /@x2@/: X coordinate of the third point -> Float -- ^ /@y2@/: Y coordinate of the third point -> Ptr () -- ^ /@userData@/: User data pointer passed to 'GI.HarfBuzz.Functions.paintFuncsSetLinearGradientFunc' -> IO () -- | A convenience synonym for @`Nothing` :: `Maybe` `PaintLinearGradientFuncT_WithClosures`@. noPaintLinearGradientFuncT_WithClosures :: Maybe PaintLinearGradientFuncT_WithClosures noPaintLinearGradientFuncT_WithClosures :: Maybe PaintRadialGradientFuncT_WithClosures noPaintLinearGradientFuncT_WithClosures = Maybe PaintRadialGradientFuncT_WithClosures forall a. Maybe a Nothing -- | A simple wrapper that ignores the closure arguments. drop_closures_PaintLinearGradientFuncT :: PaintLinearGradientFuncT -> PaintLinearGradientFuncT_WithClosures drop_closures_PaintLinearGradientFuncT :: PaintRadialGradientFuncT -> PaintRadialGradientFuncT_WithClosures drop_closures_PaintLinearGradientFuncT PaintRadialGradientFuncT _f PaintFuncsT funcs Ptr () paintData ColorLineT colorLine Float x0 Float y0 Float x1 Float y1 Float x2 Float y2 Ptr () _ = PaintRadialGradientFuncT _f PaintFuncsT funcs Ptr () paintData ColorLineT colorLine Float x0 Float y0 Float x1 Float y1 Float x2 Float y2 -- | Wrap the callback into a `GClosure`. genClosure_PaintLinearGradientFuncT :: MonadIO m => PaintLinearGradientFuncT -> m (GClosure C_PaintLinearGradientFuncT) genClosure_PaintLinearGradientFuncT :: forall (m :: * -> *). MonadIO m => PaintRadialGradientFuncT -> m (GClosure C_PaintRadialGradientFuncT) genClosure_PaintLinearGradientFuncT PaintRadialGradientFuncT cb = IO (GClosure C_PaintRadialGradientFuncT) -> m (GClosure C_PaintRadialGradientFuncT) forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (GClosure C_PaintRadialGradientFuncT) -> m (GClosure C_PaintRadialGradientFuncT)) -> IO (GClosure C_PaintRadialGradientFuncT) -> m (GClosure C_PaintRadialGradientFuncT) forall a b. (a -> b) -> a -> b $ do let cb' :: PaintRadialGradientFuncT_WithClosures cb' = PaintRadialGradientFuncT -> PaintRadialGradientFuncT_WithClosures drop_closures_PaintLinearGradientFuncT PaintRadialGradientFuncT cb let cb'' :: C_PaintRadialGradientFuncT cb'' = Maybe (Ptr (FunPtr C_PaintRadialGradientFuncT)) -> PaintRadialGradientFuncT_WithClosures -> C_PaintRadialGradientFuncT wrap_PaintLinearGradientFuncT Maybe (Ptr (FunPtr C_PaintRadialGradientFuncT)) forall a. Maybe a Nothing PaintRadialGradientFuncT_WithClosures cb' C_PaintRadialGradientFuncT -> IO (FunPtr C_PaintRadialGradientFuncT) mk_PaintLinearGradientFuncT C_PaintRadialGradientFuncT cb'' IO (FunPtr C_PaintRadialGradientFuncT) -> (FunPtr C_PaintRadialGradientFuncT -> IO (GClosure C_PaintRadialGradientFuncT)) -> IO (GClosure C_PaintRadialGradientFuncT) forall a b. IO a -> (a -> IO b) -> IO b forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b >>= FunPtr C_PaintRadialGradientFuncT -> IO (GClosure C_PaintRadialGradientFuncT) forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a) B.GClosure.newGClosure -- | Wrap a `PaintLinearGradientFuncT` into a `C_PaintLinearGradientFuncT`. wrap_PaintLinearGradientFuncT :: Maybe (Ptr (FunPtr C_PaintLinearGradientFuncT)) -> PaintLinearGradientFuncT_WithClosures -> C_PaintLinearGradientFuncT wrap_PaintLinearGradientFuncT :: Maybe (Ptr (FunPtr C_PaintRadialGradientFuncT)) -> PaintRadialGradientFuncT_WithClosures -> C_PaintRadialGradientFuncT wrap_PaintLinearGradientFuncT Maybe (Ptr (FunPtr C_PaintRadialGradientFuncT)) gi'funptrptr PaintRadialGradientFuncT_WithClosures gi'cb Ptr PaintFuncsT funcs Ptr () paintData Ptr ColorLineT colorLine CFloat x0 CFloat y0 CFloat x1 CFloat y1 CFloat x2 CFloat y2 Ptr () userData = do Ptr PaintFuncsT -> (PaintFuncsT -> IO ()) -> IO () forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr PaintFuncsT funcs ((PaintFuncsT -> IO ()) -> IO ()) -> (PaintFuncsT -> IO ()) -> IO () forall a b. (a -> b) -> a -> b $ \PaintFuncsT funcs' -> do Ptr ColorLineT -> (ColorLineT -> IO ()) -> IO () forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr ColorLineT colorLine ((ColorLineT -> IO ()) -> IO ()) -> (ColorLineT -> IO ()) -> IO () forall a b. (a -> b) -> a -> b $ \ColorLineT colorLine' -> do let x0' :: Float x0' = CFloat -> Float forall a b. (Real a, Fractional b) => a -> b realToFrac CFloat x0 let y0' :: Float y0' = CFloat -> Float forall a b. (Real a, Fractional b) => a -> b realToFrac CFloat y0 let x1' :: Float x1' = CFloat -> Float forall a b. (Real a, Fractional b) => a -> b realToFrac CFloat x1 let y1' :: Float y1' = CFloat -> Float forall a b. (Real a, Fractional b) => a -> b realToFrac CFloat y1 let x2' :: Float x2' = CFloat -> Float forall a b. (Real a, Fractional b) => a -> b realToFrac CFloat x2 let y2' :: Float y2' = CFloat -> Float forall a b. (Real a, Fractional b) => a -> b realToFrac CFloat y2 PaintRadialGradientFuncT_WithClosures gi'cb PaintFuncsT funcs' Ptr () paintData ColorLineT colorLine' Float x0' Float y0' Float x1' Float y1' Float x2' Float y2' Ptr () userData Maybe (Ptr (FunPtr C_PaintRadialGradientFuncT)) -> IO () forall a. Maybe (Ptr (FunPtr a)) -> IO () maybeReleaseFunPtr Maybe (Ptr (FunPtr C_PaintRadialGradientFuncT)) gi'funptrptr -- callback PaintImageFuncT {- Callable { returnType = Just (TBasicType TInt) , returnMayBeNull = False , returnTransfer = TransferNothing , returnDocumentation = Documentation { rawDocText = Just "Whether the operation was successful." , sinceVersion = Nothing } , args = [ Arg { argCName = "funcs" , argType = TInterface Name { namespace = "HarfBuzz" , name = "paint_funcs_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "paint functions object" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "paint_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "The data accompanying the paint functions in hb_font_paint_glyph()" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "image" , argType = TInterface Name { namespace = "HarfBuzz" , name = "blob_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "the image data" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "width" , argType = TBasicType TUInt , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "width of the raster image in pixels, or 0" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "height" , argType = TBasicType TUInt , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "height of the raster image in pixels, or 0" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "format" , argType = TBasicType TUInt32 , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "the image format as a tag" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "slant" , argType = TBasicType TFloat , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "the synthetic slant ratio to be applied to the image during rendering" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "extents" , argType = TInterface Name { namespace = "HarfBuzz" , name = "glyph_extents_t" } , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "glyph extents for desired rendering" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "user_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "User data pointer passed to hb_paint_funcs_set_image_func()" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = 8 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } ] , skipReturn = False , callableThrows = False , callableDeprecated = Nothing , callableDocumentation = Documentation { rawDocText = Just "A virtual method for the #hb_paint_funcs_t to paint a glyph image.\n\nThis method is called for glyphs with image blobs in the CBDT,\nsbix or SVG tables. The @format identifies the kind of data that\nis contained in @image. Possible values include #HB_PAINT_IMAGE_FORMAT_PNG,\n#HB_PAINT_IMAGE_FORMAT_SVG and #HB_PAINT_IMAGE_FORMAT_BGRA.\n\nThe image dimensions and glyph extents are provided if available,\nand should be used to size and position the image." , sinceVersion = Just "7.0.0" } , callableResolvable = Nothing } -} -- | Type for the callback on the (unwrapped) C side. type C_PaintImageFuncT = Ptr HarfBuzz.PaintFuncsT.PaintFuncsT -> Ptr () -> Ptr HarfBuzz.BlobT.BlobT -> Word32 -> Word32 -> Word32 -> CFloat -> Ptr HarfBuzz.GlyphExtentsT.GlyphExtentsT -> Ptr () -> IO Int32 -- Args: [ Arg -- { argCName = "funcs" -- , argType = -- TInterface Name { namespace = "HarfBuzz" , name = "paint_funcs_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "paint functions object" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "paint_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = -- Just -- "The data accompanying the paint functions in hb_font_paint_glyph()" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "image" -- , argType = -- TInterface Name { namespace = "HarfBuzz" , name = "blob_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the image data" , sinceVersion = Nothing } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "width" -- , argType = TBasicType TUInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "width of the raster image in pixels, or 0" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "height" -- , argType = TBasicType TUInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "height of the raster image in pixels, or 0" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "format" -- , argType = TBasicType TUInt32 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the image format as a tag" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "slant" -- , argType = TBasicType TFloat -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = -- Just -- "the synthetic slant ratio to be applied to the image during rendering" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "extents" -- , argType = -- TInterface -- Name { namespace = "HarfBuzz" , name = "glyph_extents_t" } -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "glyph extents for desired rendering" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "user_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = -- Just "User data pointer passed to hb_paint_funcs_set_image_func()" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = 8 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TInt) -- throws : False -- Skip return : False foreign import ccall "dynamic" __dynamic_C_PaintImageFuncT :: FunPtr C_PaintImageFuncT -> C_PaintImageFuncT -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell. dynamic_PaintImageFuncT :: (B.CallStack.HasCallStack, MonadIO m) => FunPtr C_PaintImageFuncT -> HarfBuzz.PaintFuncsT.PaintFuncsT -- ^ /@funcs@/: paint functions object -> Ptr () -- ^ /@paintData@/: The data accompanying the paint functions in 'GI.HarfBuzz.Functions.fontPaintGlyph' -> HarfBuzz.BlobT.BlobT -- ^ /@image@/: the image data -> Word32 -- ^ /@width@/: width of the raster image in pixels, or 0 -> Word32 -- ^ /@height@/: height of the raster image in pixels, or 0 -> Word32 -- ^ /@format@/: the image format as a tag -> Float -- ^ /@slant@/: the synthetic slant ratio to be applied to the image during rendering -> Maybe (HarfBuzz.GlyphExtentsT.GlyphExtentsT) -- ^ /@extents@/: glyph extents for desired rendering -> Ptr () -- ^ /@userData@/: User data pointer passed to 'GI.HarfBuzz.Functions.paintFuncsSetImageFunc' -> m Int32 -- ^ __Returns:__ Whether the operation was successful. dynamic_PaintImageFuncT :: forall (m :: * -> *). (HasCallStack, MonadIO m) => FunPtr C_PaintImageFuncT -> PaintFuncsT -> Ptr () -> BlobT -> Word32 -> Word32 -> Word32 -> Float -> Maybe GlyphExtentsT -> Ptr () -> m Int32 dynamic_PaintImageFuncT FunPtr C_PaintImageFuncT __funPtr PaintFuncsT funcs Ptr () paintData BlobT image Word32 width Word32 height Word32 format Float slant Maybe GlyphExtentsT extents Ptr () userData = IO Int32 -> m Int32 forall a. IO a -> m a 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 PaintFuncsT funcs' <- PaintFuncsT -> IO (Ptr PaintFuncsT) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr PaintFuncsT funcs Ptr BlobT image' <- BlobT -> IO (Ptr BlobT) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr BlobT image let slant' :: CFloat slant' = Float -> CFloat forall a b. (Real a, Fractional b) => a -> b realToFrac Float slant Ptr GlyphExtentsT maybeExtents <- case Maybe GlyphExtentsT extents of Maybe GlyphExtentsT Nothing -> Ptr GlyphExtentsT -> IO (Ptr GlyphExtentsT) forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return Ptr GlyphExtentsT forall a. Ptr a nullPtr Just GlyphExtentsT jExtents -> do Ptr GlyphExtentsT jExtents' <- GlyphExtentsT -> IO (Ptr GlyphExtentsT) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GlyphExtentsT jExtents Ptr GlyphExtentsT -> IO (Ptr GlyphExtentsT) forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return Ptr GlyphExtentsT jExtents' Int32 result <- (FunPtr C_PaintImageFuncT -> C_PaintImageFuncT __dynamic_C_PaintImageFuncT FunPtr C_PaintImageFuncT __funPtr) Ptr PaintFuncsT funcs' Ptr () paintData Ptr BlobT image' Word32 width Word32 height Word32 format CFloat slant' Ptr GlyphExtentsT maybeExtents Ptr () userData PaintFuncsT -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr PaintFuncsT funcs BlobT -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr BlobT image Maybe GlyphExtentsT -> (GlyphExtentsT -> IO ()) -> IO () forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m () whenJust Maybe GlyphExtentsT extents GlyphExtentsT -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr Int32 -> IO Int32 forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return Int32 result -- | Generate a function pointer callable from C code, from a `C_PaintImageFuncT`. foreign import ccall "wrapper" mk_PaintImageFuncT :: C_PaintImageFuncT -> IO (FunPtr C_PaintImageFuncT) -- | A virtual method for the t'GI.HarfBuzz.Structs.PaintFuncsT.PaintFuncsT' to paint a glyph image. -- -- This method is called for glyphs with image blobs in the CBDT, -- sbix or SVG tables. The /@format@/ identifies the kind of data that -- is contained in /@image@/. Possible values include @/HB_PAINT_IMAGE_FORMAT_PNG/@, -- @/HB_PAINT_IMAGE_FORMAT_SVG/@ and @/HB_PAINT_IMAGE_FORMAT_BGRA/@. -- -- The image dimensions and glyph extents are provided if available, -- and should be used to size and position the image. -- -- /Since: 7.0.0/ type PaintImageFuncT = HarfBuzz.PaintFuncsT.PaintFuncsT -- ^ /@funcs@/: paint functions object -> Ptr () -- ^ /@paintData@/: The data accompanying the paint functions in 'GI.HarfBuzz.Functions.fontPaintGlyph' -> HarfBuzz.BlobT.BlobT -- ^ /@image@/: the image data -> Word32 -- ^ /@width@/: width of the raster image in pixels, or 0 -> Word32 -- ^ /@height@/: height of the raster image in pixels, or 0 -> Word32 -- ^ /@format@/: the image format as a tag -> Float -- ^ /@slant@/: the synthetic slant ratio to be applied to the image during rendering -> Maybe HarfBuzz.GlyphExtentsT.GlyphExtentsT -- ^ /@extents@/: glyph extents for desired rendering -> IO Int32 -- ^ __Returns:__ Whether the operation was successful. -- | A convenience synonym for @`Nothing` :: `Maybe` `PaintImageFuncT`@. noPaintImageFuncT :: Maybe PaintImageFuncT noPaintImageFuncT :: Maybe PaintImageFuncT noPaintImageFuncT = Maybe PaintImageFuncT forall a. Maybe a Nothing -- | A virtual method for the t'GI.HarfBuzz.Structs.PaintFuncsT.PaintFuncsT' to paint a glyph image. -- -- This method is called for glyphs with image blobs in the CBDT, -- sbix or SVG tables. The /@format@/ identifies the kind of data that -- is contained in /@image@/. Possible values include @/HB_PAINT_IMAGE_FORMAT_PNG/@, -- @/HB_PAINT_IMAGE_FORMAT_SVG/@ and @/HB_PAINT_IMAGE_FORMAT_BGRA/@. -- -- The image dimensions and glyph extents are provided if available, -- and should be used to size and position the image. -- -- /Since: 7.0.0/ type PaintImageFuncT_WithClosures = HarfBuzz.PaintFuncsT.PaintFuncsT -- ^ /@funcs@/: paint functions object -> Ptr () -- ^ /@paintData@/: The data accompanying the paint functions in 'GI.HarfBuzz.Functions.fontPaintGlyph' -> HarfBuzz.BlobT.BlobT -- ^ /@image@/: the image data -> Word32 -- ^ /@width@/: width of the raster image in pixels, or 0 -> Word32 -- ^ /@height@/: height of the raster image in pixels, or 0 -> Word32 -- ^ /@format@/: the image format as a tag -> Float -- ^ /@slant@/: the synthetic slant ratio to be applied to the image during rendering -> Maybe HarfBuzz.GlyphExtentsT.GlyphExtentsT -- ^ /@extents@/: glyph extents for desired rendering -> Ptr () -- ^ /@userData@/: User data pointer passed to 'GI.HarfBuzz.Functions.paintFuncsSetImageFunc' -> IO Int32 -- ^ __Returns:__ Whether the operation was successful. -- | A convenience synonym for @`Nothing` :: `Maybe` `PaintImageFuncT_WithClosures`@. noPaintImageFuncT_WithClosures :: Maybe PaintImageFuncT_WithClosures noPaintImageFuncT_WithClosures :: Maybe PaintImageFuncT_WithClosures noPaintImageFuncT_WithClosures = Maybe PaintImageFuncT_WithClosures forall a. Maybe a Nothing -- | A simple wrapper that ignores the closure arguments. drop_closures_PaintImageFuncT :: PaintImageFuncT -> PaintImageFuncT_WithClosures drop_closures_PaintImageFuncT :: PaintImageFuncT -> PaintImageFuncT_WithClosures drop_closures_PaintImageFuncT PaintImageFuncT _f PaintFuncsT funcs Ptr () paintData BlobT image Word32 width Word32 height Word32 format Float slant Maybe GlyphExtentsT extents Ptr () _ = PaintImageFuncT _f PaintFuncsT funcs Ptr () paintData BlobT image Word32 width Word32 height Word32 format Float slant Maybe GlyphExtentsT extents -- | Wrap the callback into a `GClosure`. genClosure_PaintImageFuncT :: MonadIO m => PaintImageFuncT -> m (GClosure C_PaintImageFuncT) genClosure_PaintImageFuncT :: forall (m :: * -> *). MonadIO m => PaintImageFuncT -> m (GClosure C_PaintImageFuncT) genClosure_PaintImageFuncT PaintImageFuncT cb = IO (GClosure C_PaintImageFuncT) -> m (GClosure C_PaintImageFuncT) forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (GClosure C_PaintImageFuncT) -> m (GClosure C_PaintImageFuncT)) -> IO (GClosure C_PaintImageFuncT) -> m (GClosure C_PaintImageFuncT) forall a b. (a -> b) -> a -> b $ do let cb' :: PaintImageFuncT_WithClosures cb' = PaintImageFuncT -> PaintImageFuncT_WithClosures drop_closures_PaintImageFuncT PaintImageFuncT cb let cb'' :: C_PaintImageFuncT cb'' = Maybe (Ptr (FunPtr C_PaintImageFuncT)) -> PaintImageFuncT_WithClosures -> C_PaintImageFuncT wrap_PaintImageFuncT Maybe (Ptr (FunPtr C_PaintImageFuncT)) forall a. Maybe a Nothing PaintImageFuncT_WithClosures cb' C_PaintImageFuncT -> IO (FunPtr C_PaintImageFuncT) mk_PaintImageFuncT C_PaintImageFuncT cb'' IO (FunPtr C_PaintImageFuncT) -> (FunPtr C_PaintImageFuncT -> IO (GClosure C_PaintImageFuncT)) -> IO (GClosure C_PaintImageFuncT) forall a b. IO a -> (a -> IO b) -> IO b forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b >>= FunPtr C_PaintImageFuncT -> IO (GClosure C_PaintImageFuncT) forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a) B.GClosure.newGClosure -- | Wrap a `PaintImageFuncT` into a `C_PaintImageFuncT`. wrap_PaintImageFuncT :: Maybe (Ptr (FunPtr C_PaintImageFuncT)) -> PaintImageFuncT_WithClosures -> C_PaintImageFuncT wrap_PaintImageFuncT :: Maybe (Ptr (FunPtr C_PaintImageFuncT)) -> PaintImageFuncT_WithClosures -> C_PaintImageFuncT wrap_PaintImageFuncT Maybe (Ptr (FunPtr C_PaintImageFuncT)) gi'funptrptr PaintImageFuncT_WithClosures gi'cb Ptr PaintFuncsT funcs Ptr () paintData Ptr BlobT image Word32 width Word32 height Word32 format CFloat slant Ptr GlyphExtentsT extents Ptr () userData = do Ptr PaintFuncsT -> (PaintFuncsT -> IO Int32) -> IO Int32 forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr PaintFuncsT funcs ((PaintFuncsT -> IO Int32) -> IO Int32) -> (PaintFuncsT -> IO Int32) -> IO Int32 forall a b. (a -> b) -> a -> b $ \PaintFuncsT funcs' -> do Ptr BlobT -> (BlobT -> IO Int32) -> IO Int32 forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr BlobT image ((BlobT -> IO Int32) -> IO Int32) -> (BlobT -> IO Int32) -> IO Int32 forall a b. (a -> b) -> a -> b $ \BlobT image' -> do let slant' :: Float slant' = CFloat -> Float forall a b. (Real a, Fractional b) => a -> b realToFrac CFloat slant Maybe GlyphExtentsT maybeExtents <- if Ptr GlyphExtentsT extents Ptr GlyphExtentsT -> Ptr GlyphExtentsT -> Bool forall a. Eq a => a -> a -> Bool == Ptr GlyphExtentsT forall a. Ptr a nullPtr then Maybe GlyphExtentsT -> IO (Maybe GlyphExtentsT) forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return Maybe GlyphExtentsT forall a. Maybe a Nothing else 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 Maybe GlyphExtentsT -> IO (Maybe GlyphExtentsT) forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return (Maybe GlyphExtentsT -> IO (Maybe GlyphExtentsT)) -> Maybe GlyphExtentsT -> IO (Maybe GlyphExtentsT) forall a b. (a -> b) -> a -> b $ GlyphExtentsT -> Maybe GlyphExtentsT forall a. a -> Maybe a Just GlyphExtentsT extents' Int32 result <- PaintImageFuncT_WithClosures gi'cb PaintFuncsT funcs' Ptr () paintData BlobT image' Word32 width Word32 height Word32 format Float slant' Maybe GlyphExtentsT maybeExtents Ptr () userData Maybe (Ptr (FunPtr C_PaintImageFuncT)) -> IO () forall a. Maybe (Ptr (FunPtr a)) -> IO () maybeReleaseFunPtr Maybe (Ptr (FunPtr C_PaintImageFuncT)) gi'funptrptr Int32 -> IO Int32 forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return Int32 result -- callback PaintCustomPaletteColorFuncT {- Callable { returnType = Just (TBasicType TInt) , returnMayBeNull = False , returnTransfer = TransferNothing , returnDocumentation = Documentation { rawDocText = Just "`true` if found, `false` otherwise" , sinceVersion = Nothing } , args = [ Arg { argCName = "funcs" , argType = TInterface Name { namespace = "HarfBuzz" , name = "paint_funcs_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "paint functions object" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "paint_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "The data accompanying the paint functions in hb_font_paint_glyph()" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "color_index" , argType = TBasicType TUInt , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "the color index" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "color" , argType = TBasicType TUInt32 , direction = DirectionOut , mayBeNull = False , argDoc = Documentation { rawDocText = Just "fetched color" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferEverything } , Arg { argCName = "user_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "User data pointer passed to hb_paint_funcs_set_pop_group_func()" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = 4 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } ] , skipReturn = False , callableThrows = False , callableDeprecated = Nothing , callableDocumentation = Documentation { rawDocText = Just "A virtual method for the #hb_paint_funcs_t to fetch a color from the custom\ncolor palette.\n\nCustom palette colors override the colors from the fonts selected color\npalette. It is not necessary to override all palette entries; for entries\nthat should be taken from the font palette, return `false`.\n\nThis function might get called multiple times, but the custom palette is\nexpected to remain unchanged for duration of a hb_font_paint_glyph() call." , sinceVersion = Just "7.0.0" } , callableResolvable = Nothing } -} -- | Type for the callback on the (unwrapped) C side. type C_PaintCustomPaletteColorFuncT = Ptr HarfBuzz.PaintFuncsT.PaintFuncsT -> Ptr () -> Word32 -> Ptr Word32 -> Ptr () -> IO Int32 -- Args: [ Arg -- { argCName = "funcs" -- , argType = -- TInterface Name { namespace = "HarfBuzz" , name = "paint_funcs_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "paint functions object" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "paint_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = -- Just -- "The data accompanying the paint functions in hb_font_paint_glyph()" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "color_index" -- , argType = TBasicType TUInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the color index" , sinceVersion = Nothing } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "color" -- , argType = TBasicType TUInt32 -- , direction = DirectionOut -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "fetched color" , sinceVersion = Nothing } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferEverything -- } -- , Arg -- { argCName = "user_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = -- Just -- "User data pointer passed to hb_paint_funcs_set_pop_group_func()" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = 4 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TInt) -- throws : False -- Skip return : False foreign import ccall "dynamic" __dynamic_C_PaintCustomPaletteColorFuncT :: FunPtr C_PaintCustomPaletteColorFuncT -> C_PaintCustomPaletteColorFuncT -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell. dynamic_PaintCustomPaletteColorFuncT :: (B.CallStack.HasCallStack, MonadIO m) => FunPtr C_PaintCustomPaletteColorFuncT -> HarfBuzz.PaintFuncsT.PaintFuncsT -- ^ /@funcs@/: paint functions object -> Ptr () -- ^ /@paintData@/: The data accompanying the paint functions in 'GI.HarfBuzz.Functions.fontPaintGlyph' -> Word32 -- ^ /@colorIndex@/: the color index -> Ptr () -- ^ /@userData@/: User data pointer passed to 'GI.HarfBuzz.Functions.paintFuncsSetPopGroupFunc' -> m ((Int32, Word32)) -- ^ __Returns:__ @true@ if found, @false@ otherwise dynamic_PaintCustomPaletteColorFuncT :: forall (m :: * -> *). (HasCallStack, MonadIO m) => FunPtr C_PaintCustomPaletteColorFuncT -> PaintFuncsT -> Ptr () -> Word32 -> Ptr () -> m (Int32, Word32) dynamic_PaintCustomPaletteColorFuncT FunPtr C_PaintCustomPaletteColorFuncT __funPtr PaintFuncsT funcs Ptr () paintData Word32 colorIndex Ptr () userData = IO (Int32, Word32) -> m (Int32, Word32) forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (Int32, Word32) -> m (Int32, Word32)) -> IO (Int32, Word32) -> m (Int32, Word32) forall a b. (a -> b) -> a -> b $ do Ptr PaintFuncsT funcs' <- PaintFuncsT -> IO (Ptr PaintFuncsT) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr PaintFuncsT funcs Ptr Word32 color <- IO (Ptr Word32) forall a. Storable a => IO (Ptr a) allocMem :: IO (Ptr Word32) Int32 result <- (FunPtr C_PaintCustomPaletteColorFuncT -> C_PaintCustomPaletteColorFuncT __dynamic_C_PaintCustomPaletteColorFuncT FunPtr C_PaintCustomPaletteColorFuncT __funPtr) Ptr PaintFuncsT funcs' Ptr () paintData Word32 colorIndex Ptr Word32 color Ptr () userData Word32 color' <- Ptr Word32 -> IO Word32 forall a. Storable a => Ptr a -> IO a peek Ptr Word32 color PaintFuncsT -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr PaintFuncsT funcs Ptr Word32 -> IO () forall a. Ptr a -> IO () freeMem Ptr Word32 color (Int32, Word32) -> IO (Int32, Word32) forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return (Int32 result, Word32 color') -- | Generate a function pointer callable from C code, from a `C_PaintCustomPaletteColorFuncT`. foreign import ccall "wrapper" mk_PaintCustomPaletteColorFuncT :: C_PaintCustomPaletteColorFuncT -> IO (FunPtr C_PaintCustomPaletteColorFuncT) -- | A virtual method for the t'GI.HarfBuzz.Structs.PaintFuncsT.PaintFuncsT' to fetch a color from the custom -- color palette. -- -- Custom palette colors override the colors from the fonts selected color -- palette. It is not necessary to override all palette entries; for entries -- that should be taken from the font palette, return @false@. -- -- This function might get called multiple times, but the custom palette is -- expected to remain unchanged for duration of a 'GI.HarfBuzz.Functions.fontPaintGlyph' call. -- -- /Since: 7.0.0/ type PaintCustomPaletteColorFuncT = HarfBuzz.PaintFuncsT.PaintFuncsT -- ^ /@funcs@/: paint functions object -> Ptr () -- ^ /@paintData@/: The data accompanying the paint functions in 'GI.HarfBuzz.Functions.fontPaintGlyph' -> Word32 -- ^ /@colorIndex@/: the color index -> IO ((Int32, Word32)) -- ^ __Returns:__ @true@ if found, @false@ otherwise -- | A convenience synonym for @`Nothing` :: `Maybe` `PaintCustomPaletteColorFuncT`@. noPaintCustomPaletteColorFuncT :: Maybe PaintCustomPaletteColorFuncT noPaintCustomPaletteColorFuncT :: Maybe PaintCustomPaletteColorFuncT noPaintCustomPaletteColorFuncT = Maybe PaintCustomPaletteColorFuncT forall a. Maybe a Nothing -- | A virtual method for the t'GI.HarfBuzz.Structs.PaintFuncsT.PaintFuncsT' to fetch a color from the custom -- color palette. -- -- Custom palette colors override the colors from the fonts selected color -- palette. It is not necessary to override all palette entries; for entries -- that should be taken from the font palette, return @false@. -- -- This function might get called multiple times, but the custom palette is -- expected to remain unchanged for duration of a 'GI.HarfBuzz.Functions.fontPaintGlyph' call. -- -- /Since: 7.0.0/ type PaintCustomPaletteColorFuncT_WithClosures = HarfBuzz.PaintFuncsT.PaintFuncsT -- ^ /@funcs@/: paint functions object -> Ptr () -- ^ /@paintData@/: The data accompanying the paint functions in 'GI.HarfBuzz.Functions.fontPaintGlyph' -> Word32 -- ^ /@colorIndex@/: the color index -> Ptr () -- ^ /@userData@/: User data pointer passed to 'GI.HarfBuzz.Functions.paintFuncsSetPopGroupFunc' -> IO ((Int32, Word32)) -- ^ __Returns:__ @true@ if found, @false@ otherwise -- | A convenience synonym for @`Nothing` :: `Maybe` `PaintCustomPaletteColorFuncT_WithClosures`@. noPaintCustomPaletteColorFuncT_WithClosures :: Maybe PaintCustomPaletteColorFuncT_WithClosures noPaintCustomPaletteColorFuncT_WithClosures :: Maybe PaintCustomPaletteColorFuncT_WithClosures noPaintCustomPaletteColorFuncT_WithClosures = Maybe PaintCustomPaletteColorFuncT_WithClosures forall a. Maybe a Nothing -- | A simple wrapper that ignores the closure arguments. drop_closures_PaintCustomPaletteColorFuncT :: PaintCustomPaletteColorFuncT -> PaintCustomPaletteColorFuncT_WithClosures drop_closures_PaintCustomPaletteColorFuncT :: PaintCustomPaletteColorFuncT -> PaintCustomPaletteColorFuncT_WithClosures drop_closures_PaintCustomPaletteColorFuncT PaintCustomPaletteColorFuncT _f PaintFuncsT funcs Ptr () paintData Word32 colorIndex Ptr () _ = PaintCustomPaletteColorFuncT _f PaintFuncsT funcs Ptr () paintData Word32 colorIndex -- | Wrap the callback into a `GClosure`. genClosure_PaintCustomPaletteColorFuncT :: MonadIO m => PaintCustomPaletteColorFuncT -> m (GClosure C_PaintCustomPaletteColorFuncT) genClosure_PaintCustomPaletteColorFuncT :: forall (m :: * -> *). MonadIO m => PaintCustomPaletteColorFuncT -> m (GClosure C_PaintCustomPaletteColorFuncT) genClosure_PaintCustomPaletteColorFuncT PaintCustomPaletteColorFuncT cb = IO (GClosure C_PaintCustomPaletteColorFuncT) -> m (GClosure C_PaintCustomPaletteColorFuncT) forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (GClosure C_PaintCustomPaletteColorFuncT) -> m (GClosure C_PaintCustomPaletteColorFuncT)) -> IO (GClosure C_PaintCustomPaletteColorFuncT) -> m (GClosure C_PaintCustomPaletteColorFuncT) forall a b. (a -> b) -> a -> b $ do let cb' :: PaintCustomPaletteColorFuncT_WithClosures cb' = PaintCustomPaletteColorFuncT -> PaintCustomPaletteColorFuncT_WithClosures drop_closures_PaintCustomPaletteColorFuncT PaintCustomPaletteColorFuncT cb let cb'' :: C_PaintCustomPaletteColorFuncT cb'' = Maybe (Ptr (FunPtr C_PaintCustomPaletteColorFuncT)) -> PaintCustomPaletteColorFuncT_WithClosures -> C_PaintCustomPaletteColorFuncT wrap_PaintCustomPaletteColorFuncT Maybe (Ptr (FunPtr C_PaintCustomPaletteColorFuncT)) forall a. Maybe a Nothing PaintCustomPaletteColorFuncT_WithClosures cb' C_PaintCustomPaletteColorFuncT -> IO (FunPtr C_PaintCustomPaletteColorFuncT) mk_PaintCustomPaletteColorFuncT C_PaintCustomPaletteColorFuncT cb'' IO (FunPtr C_PaintCustomPaletteColorFuncT) -> (FunPtr C_PaintCustomPaletteColorFuncT -> IO (GClosure C_PaintCustomPaletteColorFuncT)) -> IO (GClosure C_PaintCustomPaletteColorFuncT) forall a b. IO a -> (a -> IO b) -> IO b forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b >>= FunPtr C_PaintCustomPaletteColorFuncT -> IO (GClosure C_PaintCustomPaletteColorFuncT) forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a) B.GClosure.newGClosure -- | Wrap a `PaintCustomPaletteColorFuncT` into a `C_PaintCustomPaletteColorFuncT`. wrap_PaintCustomPaletteColorFuncT :: Maybe (Ptr (FunPtr C_PaintCustomPaletteColorFuncT)) -> PaintCustomPaletteColorFuncT_WithClosures -> C_PaintCustomPaletteColorFuncT wrap_PaintCustomPaletteColorFuncT :: Maybe (Ptr (FunPtr C_PaintCustomPaletteColorFuncT)) -> PaintCustomPaletteColorFuncT_WithClosures -> C_PaintCustomPaletteColorFuncT wrap_PaintCustomPaletteColorFuncT Maybe (Ptr (FunPtr C_PaintCustomPaletteColorFuncT)) gi'funptrptr PaintCustomPaletteColorFuncT_WithClosures gi'cb Ptr PaintFuncsT funcs Ptr () paintData Word32 colorIndex Ptr Word32 color Ptr () userData = do Ptr PaintFuncsT -> (PaintFuncsT -> IO Int32) -> IO Int32 forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr PaintFuncsT funcs ((PaintFuncsT -> IO Int32) -> IO Int32) -> (PaintFuncsT -> IO Int32) -> IO Int32 forall a b. (a -> b) -> a -> b $ \PaintFuncsT funcs' -> do (Int32 result, Word32 outcolor) <- PaintCustomPaletteColorFuncT_WithClosures gi'cb PaintFuncsT funcs' Ptr () paintData Word32 colorIndex Ptr () userData Ptr Word32 -> Word32 -> IO () forall a. Storable a => Ptr a -> a -> IO () poke Ptr Word32 color Word32 outcolor Maybe (Ptr (FunPtr C_PaintCustomPaletteColorFuncT)) -> IO () forall a. Maybe (Ptr (FunPtr a)) -> IO () maybeReleaseFunPtr Maybe (Ptr (FunPtr C_PaintCustomPaletteColorFuncT)) gi'funptrptr Int32 -> IO Int32 forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return Int32 result -- callback PaintColorFuncT {- Callable { returnType = Nothing , returnMayBeNull = False , returnTransfer = TransferNothing , returnDocumentation = Documentation { rawDocText = Nothing , sinceVersion = Nothing } , args = [ Arg { argCName = "funcs" , argType = TInterface Name { namespace = "HarfBuzz" , name = "paint_funcs_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "paint functions object" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "paint_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "The data accompanying the paint functions in hb_font_paint_glyph()" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "is_foreground" , argType = TBasicType TInt , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "whether the color is the foreground" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "color" , argType = TBasicType TUInt32 , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "The color to use, unpremultiplied" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "user_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "User data pointer passed to hb_paint_funcs_set_color_func()" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = 4 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } ] , skipReturn = False , callableThrows = False , callableDeprecated = Nothing , callableDocumentation = Documentation { rawDocText = Just "A virtual method for the #hb_paint_funcs_t to paint a\ncolor everywhere within the current clip." , sinceVersion = Just "7.0.0" } , callableResolvable = Nothing } -} -- | Type for the callback on the (unwrapped) C side. type C_PaintColorFuncT = Ptr HarfBuzz.PaintFuncsT.PaintFuncsT -> Ptr () -> Int32 -> Word32 -> Ptr () -> IO () -- Args: [ Arg -- { argCName = "funcs" -- , argType = -- TInterface Name { namespace = "HarfBuzz" , name = "paint_funcs_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "paint functions object" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "paint_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = -- Just -- "The data accompanying the paint functions in hb_font_paint_glyph()" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "is_foreground" -- , argType = TBasicType TInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "whether the color is the foreground" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "color" -- , argType = TBasicType TUInt32 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The color to use, unpremultiplied" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "user_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = -- Just "User data pointer passed to hb_paint_funcs_set_color_func()" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = 4 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "dynamic" __dynamic_C_PaintColorFuncT :: FunPtr C_PaintColorFuncT -> C_PaintColorFuncT -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell. dynamic_PaintColorFuncT :: (B.CallStack.HasCallStack, MonadIO m) => FunPtr C_PaintColorFuncT -> HarfBuzz.PaintFuncsT.PaintFuncsT -- ^ /@funcs@/: paint functions object -> Ptr () -- ^ /@paintData@/: The data accompanying the paint functions in 'GI.HarfBuzz.Functions.fontPaintGlyph' -> Int32 -- ^ /@isForeground@/: whether the color is the foreground -> Word32 -- ^ /@color@/: The color to use, unpremultiplied -> Ptr () -- ^ /@userData@/: User data pointer passed to 'GI.HarfBuzz.Functions.paintFuncsSetColorFunc' -> m () dynamic_PaintColorFuncT :: forall (m :: * -> *). (HasCallStack, MonadIO m) => FunPtr C_PaintColorFuncT -> PaintFuncsT -> Ptr () -> Int32 -> Word32 -> Ptr () -> m () dynamic_PaintColorFuncT FunPtr C_PaintColorFuncT __funPtr PaintFuncsT funcs Ptr () paintData Int32 isForeground Word32 color Ptr () userData = IO () -> m () forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do Ptr PaintFuncsT funcs' <- PaintFuncsT -> IO (Ptr PaintFuncsT) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr PaintFuncsT funcs (FunPtr C_PaintColorFuncT -> C_PaintColorFuncT __dynamic_C_PaintColorFuncT FunPtr C_PaintColorFuncT __funPtr) Ptr PaintFuncsT funcs' Ptr () paintData Int32 isForeground Word32 color Ptr () userData PaintFuncsT -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr PaintFuncsT funcs () -> IO () forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return () -- | Generate a function pointer callable from C code, from a `C_PaintColorFuncT`. foreign import ccall "wrapper" mk_PaintColorFuncT :: C_PaintColorFuncT -> IO (FunPtr C_PaintColorFuncT) -- | A virtual method for the t'GI.HarfBuzz.Structs.PaintFuncsT.PaintFuncsT' to paint a -- color everywhere within the current clip. -- -- /Since: 7.0.0/ type PaintColorFuncT = HarfBuzz.PaintFuncsT.PaintFuncsT -- ^ /@funcs@/: paint functions object -> Ptr () -- ^ /@paintData@/: The data accompanying the paint functions in 'GI.HarfBuzz.Functions.fontPaintGlyph' -> Int32 -- ^ /@isForeground@/: whether the color is the foreground -> Word32 -- ^ /@color@/: The color to use, unpremultiplied -> IO () -- | A convenience synonym for @`Nothing` :: `Maybe` `PaintColorFuncT`@. noPaintColorFuncT :: Maybe PaintColorFuncT noPaintColorFuncT :: Maybe PaintColorFuncT noPaintColorFuncT = Maybe PaintColorFuncT forall a. Maybe a Nothing -- | A virtual method for the t'GI.HarfBuzz.Structs.PaintFuncsT.PaintFuncsT' to paint a -- color everywhere within the current clip. -- -- /Since: 7.0.0/ type PaintColorFuncT_WithClosures = HarfBuzz.PaintFuncsT.PaintFuncsT -- ^ /@funcs@/: paint functions object -> Ptr () -- ^ /@paintData@/: The data accompanying the paint functions in 'GI.HarfBuzz.Functions.fontPaintGlyph' -> Int32 -- ^ /@isForeground@/: whether the color is the foreground -> Word32 -- ^ /@color@/: The color to use, unpremultiplied -> Ptr () -- ^ /@userData@/: User data pointer passed to 'GI.HarfBuzz.Functions.paintFuncsSetColorFunc' -> IO () -- | A convenience synonym for @`Nothing` :: `Maybe` `PaintColorFuncT_WithClosures`@. noPaintColorFuncT_WithClosures :: Maybe PaintColorFuncT_WithClosures noPaintColorFuncT_WithClosures :: Maybe PaintColorFuncT_WithClosures noPaintColorFuncT_WithClosures = Maybe PaintColorFuncT_WithClosures forall a. Maybe a Nothing -- | A simple wrapper that ignores the closure arguments. drop_closures_PaintColorFuncT :: PaintColorFuncT -> PaintColorFuncT_WithClosures drop_closures_PaintColorFuncT :: PaintColorFuncT -> PaintColorFuncT_WithClosures drop_closures_PaintColorFuncT PaintColorFuncT _f PaintFuncsT funcs Ptr () paintData Int32 isForeground Word32 color Ptr () _ = PaintColorFuncT _f PaintFuncsT funcs Ptr () paintData Int32 isForeground Word32 color -- | Wrap the callback into a `GClosure`. genClosure_PaintColorFuncT :: MonadIO m => PaintColorFuncT -> m (GClosure C_PaintColorFuncT) genClosure_PaintColorFuncT :: forall (m :: * -> *). MonadIO m => PaintColorFuncT -> m (GClosure C_PaintColorFuncT) genClosure_PaintColorFuncT PaintColorFuncT cb = IO (GClosure C_PaintColorFuncT) -> m (GClosure C_PaintColorFuncT) forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (GClosure C_PaintColorFuncT) -> m (GClosure C_PaintColorFuncT)) -> IO (GClosure C_PaintColorFuncT) -> m (GClosure C_PaintColorFuncT) forall a b. (a -> b) -> a -> b $ do let cb' :: PaintColorFuncT_WithClosures cb' = PaintColorFuncT -> PaintColorFuncT_WithClosures drop_closures_PaintColorFuncT PaintColorFuncT cb let cb'' :: C_PaintColorFuncT cb'' = Maybe (Ptr (FunPtr C_PaintColorFuncT)) -> PaintColorFuncT_WithClosures -> C_PaintColorFuncT wrap_PaintColorFuncT Maybe (Ptr (FunPtr C_PaintColorFuncT)) forall a. Maybe a Nothing PaintColorFuncT_WithClosures cb' C_PaintColorFuncT -> IO (FunPtr C_PaintColorFuncT) mk_PaintColorFuncT C_PaintColorFuncT cb'' IO (FunPtr C_PaintColorFuncT) -> (FunPtr C_PaintColorFuncT -> IO (GClosure C_PaintColorFuncT)) -> IO (GClosure C_PaintColorFuncT) forall a b. IO a -> (a -> IO b) -> IO b forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b >>= FunPtr C_PaintColorFuncT -> IO (GClosure C_PaintColorFuncT) forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a) B.GClosure.newGClosure -- | Wrap a `PaintColorFuncT` into a `C_PaintColorFuncT`. wrap_PaintColorFuncT :: Maybe (Ptr (FunPtr C_PaintColorFuncT)) -> PaintColorFuncT_WithClosures -> C_PaintColorFuncT wrap_PaintColorFuncT :: Maybe (Ptr (FunPtr C_PaintColorFuncT)) -> PaintColorFuncT_WithClosures -> C_PaintColorFuncT wrap_PaintColorFuncT Maybe (Ptr (FunPtr C_PaintColorFuncT)) gi'funptrptr PaintColorFuncT_WithClosures gi'cb Ptr PaintFuncsT funcs Ptr () paintData Int32 isForeground Word32 color Ptr () userData = do Ptr PaintFuncsT -> (PaintFuncsT -> IO ()) -> IO () forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr PaintFuncsT funcs ((PaintFuncsT -> IO ()) -> IO ()) -> (PaintFuncsT -> IO ()) -> IO () forall a b. (a -> b) -> a -> b $ \PaintFuncsT funcs' -> do PaintColorFuncT_WithClosures gi'cb PaintFuncsT funcs' Ptr () paintData Int32 isForeground Word32 color Ptr () userData Maybe (Ptr (FunPtr C_PaintColorFuncT)) -> IO () forall a. Maybe (Ptr (FunPtr a)) -> IO () maybeReleaseFunPtr Maybe (Ptr (FunPtr C_PaintColorFuncT)) gi'funptrptr -- callback FontPaintGlyphFuncT {- Callable { returnType = Nothing , returnMayBeNull = False , returnTransfer = TransferNothing , returnDocumentation = Documentation { rawDocText = Nothing , sinceVersion = Nothing } , args = [ Arg { argCName = "font" , argType = TInterface Name { namespace = "HarfBuzz" , name = "font_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "#hb_font_t to work upon" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "font_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "@font user data pointer" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "glyph" , argType = TBasicType TUInt32 , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "The glyph ID to query" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "paint_funcs" , argType = TInterface Name { namespace = "HarfBuzz" , name = "paint_funcs_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "The paint functions to use" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "paint_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "The data accompanying the paint functions" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "palette_index" , argType = TBasicType TUInt , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "The color palette to use" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "foreground" , argType = TBasicType TUInt32 , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "The foreground color" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "user_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "User data pointer passed by the caller" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = 7 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } ] , skipReturn = False , callableThrows = False , callableDeprecated = Nothing , callableDocumentation = Documentation { rawDocText = Just "A virtual method for the #hb_font_funcs_t of an #hb_font_t object." , sinceVersion = Just "7.0.0" } , callableResolvable = Nothing } -} -- | Type for the callback on the (unwrapped) C side. type C_FontPaintGlyphFuncT = Ptr HarfBuzz.FontT.FontT -> Ptr () -> Word32 -> Ptr HarfBuzz.PaintFuncsT.PaintFuncsT -> Ptr () -> Word32 -> Word32 -> Ptr () -> IO () -- Args: [ Arg -- { argCName = "font" -- , argType = -- TInterface Name { namespace = "HarfBuzz" , name = "font_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "#hb_font_t to work upon" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "font_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "@font user data pointer" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "glyph" -- , argType = TBasicType TUInt32 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The glyph ID to query" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "paint_funcs" -- , argType = -- TInterface Name { namespace = "HarfBuzz" , name = "paint_funcs_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The paint functions to use" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "paint_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "The data accompanying the paint functions" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "palette_index" -- , argType = TBasicType TUInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The color palette to use" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "foreground" -- , argType = TBasicType TUInt32 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The foreground color" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "user_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "User data pointer passed by the caller" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = 7 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "dynamic" __dynamic_C_FontPaintGlyphFuncT :: FunPtr C_FontPaintGlyphFuncT -> C_FontPaintGlyphFuncT -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell. dynamic_FontPaintGlyphFuncT :: (B.CallStack.HasCallStack, MonadIO m) => FunPtr C_FontPaintGlyphFuncT -> HarfBuzz.FontT.FontT -- ^ /@font@/: t'GI.HarfBuzz.Structs.FontT.FontT' to work upon -> Ptr () -- ^ /@fontData@/: /@font@/ user data pointer -> Word32 -- ^ /@glyph@/: The glyph ID to query -> HarfBuzz.PaintFuncsT.PaintFuncsT -- ^ /@paintFuncs@/: The paint functions to use -> Ptr () -- ^ /@paintData@/: The data accompanying the paint functions -> Word32 -- ^ /@paletteIndex@/: The color palette to use -> Word32 -- ^ /@foreground@/: The foreground color -> Ptr () -- ^ /@userData@/: User data pointer passed by the caller -> m () dynamic_FontPaintGlyphFuncT :: forall (m :: * -> *). (HasCallStack, MonadIO m) => FunPtr C_FontPaintGlyphFuncT -> FontT -> Ptr () -> Word32 -> PaintFuncsT -> Ptr () -> Word32 -> Word32 -> Ptr () -> m () dynamic_FontPaintGlyphFuncT FunPtr C_FontPaintGlyphFuncT __funPtr FontT font Ptr () fontData Word32 glyph PaintFuncsT paintFuncs Ptr () paintData Word32 paletteIndex Word32 foreground Ptr () userData = IO () -> m () forall a. IO a -> m a 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 Ptr PaintFuncsT paintFuncs' <- PaintFuncsT -> IO (Ptr PaintFuncsT) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr PaintFuncsT paintFuncs (FunPtr C_FontPaintGlyphFuncT -> C_FontPaintGlyphFuncT __dynamic_C_FontPaintGlyphFuncT FunPtr C_FontPaintGlyphFuncT __funPtr) Ptr FontT font' Ptr () fontData Word32 glyph Ptr PaintFuncsT paintFuncs' Ptr () paintData Word32 paletteIndex Word32 foreground Ptr () userData FontT -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr FontT font PaintFuncsT -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr PaintFuncsT paintFuncs () -> IO () forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return () -- | Generate a function pointer callable from C code, from a `C_FontPaintGlyphFuncT`. foreign import ccall "wrapper" mk_FontPaintGlyphFuncT :: C_FontPaintGlyphFuncT -> IO (FunPtr C_FontPaintGlyphFuncT) -- | A virtual method for the t'GI.HarfBuzz.Structs.FontFuncsT.FontFuncsT' of an t'GI.HarfBuzz.Structs.FontT.FontT' object. -- -- /Since: 7.0.0/ type FontPaintGlyphFuncT = HarfBuzz.FontT.FontT -- ^ /@font@/: t'GI.HarfBuzz.Structs.FontT.FontT' to work upon -> Ptr () -- ^ /@fontData@/: /@font@/ user data pointer -> Word32 -- ^ /@glyph@/: The glyph ID to query -> HarfBuzz.PaintFuncsT.PaintFuncsT -- ^ /@paintFuncs@/: The paint functions to use -> Ptr () -- ^ /@paintData@/: The data accompanying the paint functions -> Word32 -- ^ /@paletteIndex@/: The color palette to use -> Word32 -- ^ /@foreground@/: The foreground color -> IO () -- | A convenience synonym for @`Nothing` :: `Maybe` `FontPaintGlyphFuncT`@. noFontPaintGlyphFuncT :: Maybe FontPaintGlyphFuncT noFontPaintGlyphFuncT :: Maybe FontPaintGlyphFuncT noFontPaintGlyphFuncT = Maybe FontPaintGlyphFuncT forall a. Maybe a Nothing -- | A virtual method for the t'GI.HarfBuzz.Structs.FontFuncsT.FontFuncsT' of an t'GI.HarfBuzz.Structs.FontT.FontT' object. -- -- /Since: 7.0.0/ type FontPaintGlyphFuncT_WithClosures = HarfBuzz.FontT.FontT -- ^ /@font@/: t'GI.HarfBuzz.Structs.FontT.FontT' to work upon -> Ptr () -- ^ /@fontData@/: /@font@/ user data pointer -> Word32 -- ^ /@glyph@/: The glyph ID to query -> HarfBuzz.PaintFuncsT.PaintFuncsT -- ^ /@paintFuncs@/: The paint functions to use -> Ptr () -- ^ /@paintData@/: The data accompanying the paint functions -> Word32 -- ^ /@paletteIndex@/: The color palette to use -> Word32 -- ^ /@foreground@/: The foreground color -> Ptr () -- ^ /@userData@/: User data pointer passed by the caller -> IO () -- | A convenience synonym for @`Nothing` :: `Maybe` `FontPaintGlyphFuncT_WithClosures`@. noFontPaintGlyphFuncT_WithClosures :: Maybe FontPaintGlyphFuncT_WithClosures noFontPaintGlyphFuncT_WithClosures :: Maybe FontPaintGlyphFuncT_WithClosures noFontPaintGlyphFuncT_WithClosures = Maybe FontPaintGlyphFuncT_WithClosures forall a. Maybe a Nothing -- | A simple wrapper that ignores the closure arguments. drop_closures_FontPaintGlyphFuncT :: FontPaintGlyphFuncT -> FontPaintGlyphFuncT_WithClosures drop_closures_FontPaintGlyphFuncT :: FontPaintGlyphFuncT -> FontPaintGlyphFuncT_WithClosures drop_closures_FontPaintGlyphFuncT FontPaintGlyphFuncT _f FontT font Ptr () fontData Word32 glyph PaintFuncsT paintFuncs Ptr () paintData Word32 paletteIndex Word32 foreground Ptr () _ = FontPaintGlyphFuncT _f FontT font Ptr () fontData Word32 glyph PaintFuncsT paintFuncs Ptr () paintData Word32 paletteIndex Word32 foreground -- | Wrap the callback into a `GClosure`. genClosure_FontPaintGlyphFuncT :: MonadIO m => FontPaintGlyphFuncT -> m (GClosure C_FontPaintGlyphFuncT) genClosure_FontPaintGlyphFuncT :: forall (m :: * -> *). MonadIO m => FontPaintGlyphFuncT -> m (GClosure C_FontPaintGlyphFuncT) genClosure_FontPaintGlyphFuncT FontPaintGlyphFuncT cb = IO (GClosure C_FontPaintGlyphFuncT) -> m (GClosure C_FontPaintGlyphFuncT) forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (GClosure C_FontPaintGlyphFuncT) -> m (GClosure C_FontPaintGlyphFuncT)) -> IO (GClosure C_FontPaintGlyphFuncT) -> m (GClosure C_FontPaintGlyphFuncT) forall a b. (a -> b) -> a -> b $ do let cb' :: FontPaintGlyphFuncT_WithClosures cb' = FontPaintGlyphFuncT -> FontPaintGlyphFuncT_WithClosures drop_closures_FontPaintGlyphFuncT FontPaintGlyphFuncT cb let cb'' :: C_FontPaintGlyphFuncT cb'' = Maybe (Ptr (FunPtr C_FontPaintGlyphFuncT)) -> FontPaintGlyphFuncT_WithClosures -> C_FontPaintGlyphFuncT wrap_FontPaintGlyphFuncT Maybe (Ptr (FunPtr C_FontPaintGlyphFuncT)) forall a. Maybe a Nothing FontPaintGlyphFuncT_WithClosures cb' C_FontPaintGlyphFuncT -> IO (FunPtr C_FontPaintGlyphFuncT) mk_FontPaintGlyphFuncT C_FontPaintGlyphFuncT cb'' IO (FunPtr C_FontPaintGlyphFuncT) -> (FunPtr C_FontPaintGlyphFuncT -> IO (GClosure C_FontPaintGlyphFuncT)) -> IO (GClosure C_FontPaintGlyphFuncT) forall a b. IO a -> (a -> IO b) -> IO b forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b >>= FunPtr C_FontPaintGlyphFuncT -> IO (GClosure C_FontPaintGlyphFuncT) forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a) B.GClosure.newGClosure -- | Wrap a `FontPaintGlyphFuncT` into a `C_FontPaintGlyphFuncT`. wrap_FontPaintGlyphFuncT :: Maybe (Ptr (FunPtr C_FontPaintGlyphFuncT)) -> FontPaintGlyphFuncT_WithClosures -> C_FontPaintGlyphFuncT wrap_FontPaintGlyphFuncT :: Maybe (Ptr (FunPtr C_FontPaintGlyphFuncT)) -> FontPaintGlyphFuncT_WithClosures -> C_FontPaintGlyphFuncT wrap_FontPaintGlyphFuncT Maybe (Ptr (FunPtr C_FontPaintGlyphFuncT)) gi'funptrptr FontPaintGlyphFuncT_WithClosures gi'cb Ptr FontT font Ptr () fontData Word32 glyph Ptr PaintFuncsT paintFuncs Ptr () paintData Word32 paletteIndex Word32 foreground Ptr () userData = do Ptr FontT -> (FontT -> IO ()) -> IO () forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr FontT font ((FontT -> IO ()) -> IO ()) -> (FontT -> IO ()) -> IO () forall a b. (a -> b) -> a -> b $ \FontT font' -> do Ptr PaintFuncsT -> (PaintFuncsT -> IO ()) -> IO () forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr PaintFuncsT paintFuncs ((PaintFuncsT -> IO ()) -> IO ()) -> (PaintFuncsT -> IO ()) -> IO () forall a b. (a -> b) -> a -> b $ \PaintFuncsT paintFuncs' -> do FontPaintGlyphFuncT_WithClosures gi'cb FontT font' Ptr () fontData Word32 glyph PaintFuncsT paintFuncs' Ptr () paintData Word32 paletteIndex Word32 foreground Ptr () userData Maybe (Ptr (FunPtr C_FontPaintGlyphFuncT)) -> IO () forall a. Maybe (Ptr (FunPtr a)) -> IO () maybeReleaseFunPtr Maybe (Ptr (FunPtr C_FontPaintGlyphFuncT)) gi'funptrptr -- callback FontGetVariationGlyphFuncT {- Callable { returnType = Just (TBasicType TInt) , returnMayBeNull = False , returnTransfer = TransferNothing , returnDocumentation = Documentation { rawDocText = Just "`true` if data found, `false` otherwise" , sinceVersion = Nothing } , args = [ Arg { argCName = "font" , argType = TInterface Name { namespace = "HarfBuzz" , name = "font_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "#hb_font_t to work upon" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "font_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "@font user data pointer" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "unicode" , argType = TBasicType TUInt32 , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "The Unicode code point to query" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "variation_selector" , argType = TBasicType TUInt32 , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "The variation-selector code point to query" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "glyph" , argType = TBasicType TUInt32 , direction = DirectionOut , mayBeNull = False , argDoc = Documentation { rawDocText = Just "The glyph ID retrieved" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferEverything } , Arg { argCName = "user_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "User data pointer passed by the caller" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = 5 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } ] , skipReturn = False , callableThrows = False , callableDeprecated = Nothing , callableDocumentation = Documentation { rawDocText = Just "A virtual method for the #hb_font_funcs_t of an #hb_font_t object.\n\nThis method should retrieve the glyph ID for a specified Unicode code point\nfollowed by a specified Variation Selector code point. Glyph IDs must be\nreturned in a #hb_codepoint_t output parameter." , sinceVersion = Nothing } , callableResolvable = Nothing } -} -- | Type for the callback on the (unwrapped) C side. type C_FontGetVariationGlyphFuncT = Ptr HarfBuzz.FontT.FontT -> Ptr () -> Word32 -> Word32 -> Ptr Word32 -> Ptr () -> IO Int32 -- Args: [ Arg -- { argCName = "font" -- , argType = -- TInterface Name { namespace = "HarfBuzz" , name = "font_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "#hb_font_t to work upon" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "font_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "@font user data pointer" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "unicode" -- , argType = TBasicType TUInt32 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The Unicode code point to query" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "variation_selector" -- , argType = TBasicType TUInt32 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The variation-selector code point to query" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "glyph" -- , argType = TBasicType TUInt32 -- , direction = DirectionOut -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The glyph ID retrieved" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferEverything -- } -- , Arg -- { argCName = "user_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "User data pointer passed by the caller" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = 5 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TInt) -- throws : False -- Skip return : False foreign import ccall "dynamic" __dynamic_C_FontGetVariationGlyphFuncT :: FunPtr C_FontGetVariationGlyphFuncT -> C_FontGetVariationGlyphFuncT -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell. dynamic_FontGetVariationGlyphFuncT :: (B.CallStack.HasCallStack, MonadIO m) => FunPtr C_FontGetVariationGlyphFuncT -> HarfBuzz.FontT.FontT -- ^ /@font@/: t'GI.HarfBuzz.Structs.FontT.FontT' to work upon -> Ptr () -- ^ /@fontData@/: /@font@/ user data pointer -> Word32 -- ^ /@unicode@/: The Unicode code point to query -> Word32 -- ^ /@variationSelector@/: The variation-selector code point to query -> Ptr () -- ^ /@userData@/: User data pointer passed by the caller -> m ((Int32, Word32)) -- ^ __Returns:__ @true@ if data found, @false@ otherwise dynamic_FontGetVariationGlyphFuncT :: forall (m :: * -> *). (HasCallStack, MonadIO m) => FunPtr C_FontGetVariationGlyphFuncT -> FontT -> Ptr () -> Word32 -> Word32 -> Ptr () -> m (Int32, Word32) dynamic_FontGetVariationGlyphFuncT FunPtr C_FontGetVariationGlyphFuncT __funPtr FontT font Ptr () fontData Word32 unicode Word32 variationSelector Ptr () userData = IO (Int32, Word32) -> m (Int32, Word32) forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (Int32, Word32) -> m (Int32, Word32)) -> IO (Int32, Word32) -> m (Int32, 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 Ptr Word32 glyph <- IO (Ptr Word32) forall a. Storable a => IO (Ptr a) allocMem :: IO (Ptr Word32) Int32 result <- (FunPtr C_FontGetVariationGlyphFuncT -> C_FontGetVariationGlyphFuncT __dynamic_C_FontGetVariationGlyphFuncT FunPtr C_FontGetVariationGlyphFuncT __funPtr) Ptr FontT font' Ptr () fontData Word32 unicode Word32 variationSelector Ptr Word32 glyph Ptr () userData Word32 glyph' <- Ptr Word32 -> IO Word32 forall a. Storable a => Ptr a -> IO a peek Ptr Word32 glyph FontT -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr FontT font Ptr Word32 -> IO () forall a. Ptr a -> IO () freeMem Ptr Word32 glyph (Int32, Word32) -> IO (Int32, Word32) forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return (Int32 result, Word32 glyph') -- | Generate a function pointer callable from C code, from a `C_FontGetVariationGlyphFuncT`. foreign import ccall "wrapper" mk_FontGetVariationGlyphFuncT :: C_FontGetVariationGlyphFuncT -> IO (FunPtr C_FontGetVariationGlyphFuncT) -- | A virtual method for the t'GI.HarfBuzz.Structs.FontFuncsT.FontFuncsT' of an t'GI.HarfBuzz.Structs.FontT.FontT' object. -- -- This method should retrieve the glyph ID for a specified Unicode code point -- followed by a specified Variation Selector code point. Glyph IDs must be -- returned in a @/hb_codepoint_t/@ output parameter. type FontGetVariationGlyphFuncT = HarfBuzz.FontT.FontT -- ^ /@font@/: t'GI.HarfBuzz.Structs.FontT.FontT' to work upon -> Ptr () -- ^ /@fontData@/: /@font@/ user data pointer -> Word32 -- ^ /@unicode@/: The Unicode code point to query -> Word32 -- ^ /@variationSelector@/: The variation-selector code point to query -> IO ((Int32, Word32)) -- ^ __Returns:__ @true@ if data found, @false@ otherwise -- | A convenience synonym for @`Nothing` :: `Maybe` `FontGetVariationGlyphFuncT`@. noFontGetVariationGlyphFuncT :: Maybe FontGetVariationGlyphFuncT noFontGetVariationGlyphFuncT :: Maybe FontGetVariationGlyphFuncT noFontGetVariationGlyphFuncT = Maybe FontGetVariationGlyphFuncT forall a. Maybe a Nothing -- | A virtual method for the t'GI.HarfBuzz.Structs.FontFuncsT.FontFuncsT' of an t'GI.HarfBuzz.Structs.FontT.FontT' object. -- -- This method should retrieve the glyph ID for a specified Unicode code point -- followed by a specified Variation Selector code point. Glyph IDs must be -- returned in a @/hb_codepoint_t/@ output parameter. type FontGetVariationGlyphFuncT_WithClosures = HarfBuzz.FontT.FontT -- ^ /@font@/: t'GI.HarfBuzz.Structs.FontT.FontT' to work upon -> Ptr () -- ^ /@fontData@/: /@font@/ user data pointer -> Word32 -- ^ /@unicode@/: The Unicode code point to query -> Word32 -- ^ /@variationSelector@/: The variation-selector code point to query -> Ptr () -- ^ /@userData@/: User data pointer passed by the caller -> IO ((Int32, Word32)) -- ^ __Returns:__ @true@ if data found, @false@ otherwise -- | A convenience synonym for @`Nothing` :: `Maybe` `FontGetVariationGlyphFuncT_WithClosures`@. noFontGetVariationGlyphFuncT_WithClosures :: Maybe FontGetVariationGlyphFuncT_WithClosures noFontGetVariationGlyphFuncT_WithClosures :: Maybe FontGetVariationGlyphFuncT_WithClosures noFontGetVariationGlyphFuncT_WithClosures = Maybe FontGetVariationGlyphFuncT_WithClosures forall a. Maybe a Nothing -- | A simple wrapper that ignores the closure arguments. drop_closures_FontGetVariationGlyphFuncT :: FontGetVariationGlyphFuncT -> FontGetVariationGlyphFuncT_WithClosures drop_closures_FontGetVariationGlyphFuncT :: FontGetVariationGlyphFuncT -> FontGetVariationGlyphFuncT_WithClosures drop_closures_FontGetVariationGlyphFuncT FontGetVariationGlyphFuncT _f FontT font Ptr () fontData Word32 unicode Word32 variationSelector Ptr () _ = FontGetVariationGlyphFuncT _f FontT font Ptr () fontData Word32 unicode Word32 variationSelector -- | Wrap the callback into a `GClosure`. genClosure_FontGetVariationGlyphFuncT :: MonadIO m => FontGetVariationGlyphFuncT -> m (GClosure C_FontGetVariationGlyphFuncT) genClosure_FontGetVariationGlyphFuncT :: forall (m :: * -> *). MonadIO m => FontGetVariationGlyphFuncT -> m (GClosure C_FontGetVariationGlyphFuncT) genClosure_FontGetVariationGlyphFuncT FontGetVariationGlyphFuncT cb = IO (GClosure C_FontGetVariationGlyphFuncT) -> m (GClosure C_FontGetVariationGlyphFuncT) forall a. IO a -> m a 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 a b. IO a -> (a -> IO b) -> IO b 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 a `FontGetVariationGlyphFuncT` into a `C_FontGetVariationGlyphFuncT`. wrap_FontGetVariationGlyphFuncT :: Maybe (Ptr (FunPtr C_FontGetVariationGlyphFuncT)) -> FontGetVariationGlyphFuncT_WithClosures -> C_FontGetVariationGlyphFuncT wrap_FontGetVariationGlyphFuncT :: Maybe (Ptr (FunPtr C_FontGetVariationGlyphFuncT)) -> FontGetVariationGlyphFuncT_WithClosures -> C_FontGetVariationGlyphFuncT wrap_FontGetVariationGlyphFuncT Maybe (Ptr (FunPtr C_FontGetVariationGlyphFuncT)) gi'funptrptr FontGetVariationGlyphFuncT_WithClosures gi'cb Ptr FontT font Ptr () fontData Word32 unicode Word32 variationSelector Ptr Word32 glyph Ptr () userData = do Ptr FontT -> (FontT -> IO Int32) -> IO Int32 forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr FontT font ((FontT -> IO Int32) -> IO Int32) -> (FontT -> IO Int32) -> IO Int32 forall a b. (a -> b) -> a -> b $ \FontT font' -> do (Int32 result, Word32 outglyph) <- FontGetVariationGlyphFuncT_WithClosures gi'cb FontT font' Ptr () fontData Word32 unicode Word32 variationSelector Ptr () userData Ptr Word32 -> Word32 -> IO () forall a. Storable a => Ptr a -> a -> IO () poke Ptr Word32 glyph Word32 outglyph Maybe (Ptr (FunPtr C_FontGetVariationGlyphFuncT)) -> IO () forall a. Maybe (Ptr (FunPtr a)) -> IO () maybeReleaseFunPtr Maybe (Ptr (FunPtr C_FontGetVariationGlyphFuncT)) gi'funptrptr Int32 -> IO Int32 forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return Int32 result -- callback FontGetNominalGlyphsFuncT {- Callable { returnType = Just (TBasicType TUInt) , returnMayBeNull = False , returnTransfer = TransferNothing , returnDocumentation = Documentation { rawDocText = Just "the number of code points processed" , sinceVersion = Nothing } , args = [ Arg { argCName = "font" , argType = TInterface Name { namespace = "HarfBuzz" , name = "font_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "#hb_font_t to work upon" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "font_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "@font user data pointer" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "count" , argType = TBasicType TUInt , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "number of code points to query" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "first_unicode" , argType = TBasicType TUInt32 , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "The first Unicode code point to query" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "unicode_stride" , argType = TBasicType TUInt , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "The stride between successive code points" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "first_glyph" , argType = TBasicType TUInt32 , direction = DirectionOut , mayBeNull = False , argDoc = Documentation { rawDocText = Just "The first glyph ID retrieved" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferEverything } , Arg { argCName = "glyph_stride" , argType = TBasicType TUInt , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "The stride between successive glyph IDs" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "user_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "User data pointer passed by the caller" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = 7 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } ] , skipReturn = False , callableThrows = False , callableDeprecated = Nothing , callableDocumentation = Documentation { rawDocText = Just "A virtual method for the #hb_font_funcs_t of an #hb_font_t object.\n\nThis method should retrieve the nominal glyph IDs for a sequence of\nUnicode code points. Glyph IDs must be returned in a #hb_codepoint_t\noutput parameter." , sinceVersion = Nothing } , callableResolvable = Nothing } -} -- | Type for the callback on the (unwrapped) C side. type C_FontGetNominalGlyphsFuncT = Ptr HarfBuzz.FontT.FontT -> Ptr () -> Word32 -> Word32 -> Word32 -> Ptr Word32 -> Word32 -> Ptr () -> IO Word32 -- Args: [ Arg -- { argCName = "font" -- , argType = -- TInterface Name { namespace = "HarfBuzz" , name = "font_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "#hb_font_t to work upon" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "font_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "@font user data pointer" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "count" -- , argType = TBasicType TUInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "number of code points to query" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "first_unicode" -- , argType = TBasicType TUInt32 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The first Unicode code point to query" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "unicode_stride" -- , argType = TBasicType TUInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The stride between successive code points" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "first_glyph" -- , argType = TBasicType TUInt32 -- , direction = DirectionOut -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The first glyph ID retrieved" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferEverything -- } -- , Arg -- { argCName = "glyph_stride" -- , argType = TBasicType TUInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The stride between successive glyph IDs" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "user_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "User data pointer passed by the caller" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = 7 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TUInt) -- throws : False -- Skip return : False foreign import ccall "dynamic" __dynamic_C_FontGetNominalGlyphsFuncT :: FunPtr C_FontGetNominalGlyphsFuncT -> C_FontGetNominalGlyphsFuncT -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell. dynamic_FontGetNominalGlyphsFuncT :: (B.CallStack.HasCallStack, MonadIO m) => FunPtr C_FontGetNominalGlyphsFuncT -> HarfBuzz.FontT.FontT -- ^ /@font@/: t'GI.HarfBuzz.Structs.FontT.FontT' to work upon -> Ptr () -- ^ /@fontData@/: /@font@/ user data pointer -> Word32 -- ^ /@count@/: number of code points to query -> Word32 -- ^ /@firstUnicode@/: The first Unicode code point to query -> Word32 -- ^ /@unicodeStride@/: The stride between successive code points -> Word32 -- ^ /@glyphStride@/: The stride between successive glyph IDs -> Ptr () -- ^ /@userData@/: User data pointer passed by the caller -> m ((Word32, Word32)) -- ^ __Returns:__ the number of code points processed dynamic_FontGetNominalGlyphsFuncT :: forall (m :: * -> *). (HasCallStack, MonadIO m) => FunPtr C_FontGetNominalGlyphsFuncT -> FontT -> Ptr () -> Word32 -> Word32 -> Word32 -> Word32 -> Ptr () -> m (Word32, Word32) dynamic_FontGetNominalGlyphsFuncT FunPtr C_FontGetNominalGlyphsFuncT __funPtr FontT font Ptr () fontData Word32 count Word32 firstUnicode Word32 unicodeStride Word32 glyphStride Ptr () userData = IO (Word32, Word32) -> m (Word32, Word32) forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (Word32, Word32) -> m (Word32, Word32)) -> IO (Word32, Word32) -> m (Word32, 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 Ptr Word32 firstGlyph <- IO (Ptr Word32) forall a. Storable a => IO (Ptr a) allocMem :: IO (Ptr Word32) 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 Ptr Word32 firstGlyph Word32 glyphStride Ptr () userData Word32 firstGlyph' <- Ptr Word32 -> IO Word32 forall a. Storable a => Ptr a -> IO a peek Ptr Word32 firstGlyph FontT -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr FontT font Ptr Word32 -> IO () forall a. Ptr a -> IO () freeMem Ptr Word32 firstGlyph (Word32, Word32) -> IO (Word32, Word32) forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return (Word32 result, Word32 firstGlyph') -- | Generate a function pointer callable from C code, from a `C_FontGetNominalGlyphsFuncT`. foreign import ccall "wrapper" mk_FontGetNominalGlyphsFuncT :: C_FontGetNominalGlyphsFuncT -> IO (FunPtr C_FontGetNominalGlyphsFuncT) -- | A virtual method for the t'GI.HarfBuzz.Structs.FontFuncsT.FontFuncsT' of an t'GI.HarfBuzz.Structs.FontT.FontT' object. -- -- This method should retrieve the nominal glyph IDs for a sequence of -- Unicode code points. Glyph IDs must be returned in a @/hb_codepoint_t/@ -- output parameter. type FontGetNominalGlyphsFuncT = HarfBuzz.FontT.FontT -- ^ /@font@/: t'GI.HarfBuzz.Structs.FontT.FontT' to work upon -> Ptr () -- ^ /@fontData@/: /@font@/ user data pointer -> Word32 -- ^ /@count@/: number of code points to query -> Word32 -- ^ /@firstUnicode@/: The first Unicode code point to query -> Word32 -- ^ /@unicodeStride@/: The stride between successive code points -> Word32 -- ^ /@glyphStride@/: The stride between successive glyph IDs -> IO ((Word32, Word32)) -- ^ __Returns:__ the number of code points processed -- | A convenience synonym for @`Nothing` :: `Maybe` `FontGetNominalGlyphsFuncT`@. noFontGetNominalGlyphsFuncT :: Maybe FontGetNominalGlyphsFuncT noFontGetNominalGlyphsFuncT :: Maybe FontGetNominalGlyphsFuncT noFontGetNominalGlyphsFuncT = Maybe FontGetNominalGlyphsFuncT forall a. Maybe a Nothing -- | A virtual method for the t'GI.HarfBuzz.Structs.FontFuncsT.FontFuncsT' of an t'GI.HarfBuzz.Structs.FontT.FontT' object. -- -- This method should retrieve the nominal glyph IDs for a sequence of -- Unicode code points. Glyph IDs must be returned in a @/hb_codepoint_t/@ -- output parameter. type FontGetNominalGlyphsFuncT_WithClosures = HarfBuzz.FontT.FontT -- ^ /@font@/: t'GI.HarfBuzz.Structs.FontT.FontT' to work upon -> Ptr () -- ^ /@fontData@/: /@font@/ user data pointer -> Word32 -- ^ /@count@/: number of code points to query -> Word32 -- ^ /@firstUnicode@/: The first Unicode code point to query -> Word32 -- ^ /@unicodeStride@/: The stride between successive code points -> Word32 -- ^ /@glyphStride@/: The stride between successive glyph IDs -> Ptr () -- ^ /@userData@/: User data pointer passed by the caller -> IO ((Word32, Word32)) -- ^ __Returns:__ the number of code points processed -- | A convenience synonym for @`Nothing` :: `Maybe` `FontGetNominalGlyphsFuncT_WithClosures`@. noFontGetNominalGlyphsFuncT_WithClosures :: Maybe FontGetNominalGlyphsFuncT_WithClosures noFontGetNominalGlyphsFuncT_WithClosures :: Maybe FontGetNominalGlyphsFuncT_WithClosures noFontGetNominalGlyphsFuncT_WithClosures = Maybe FontGetNominalGlyphsFuncT_WithClosures forall a. Maybe a Nothing -- | A simple wrapper that ignores the closure arguments. drop_closures_FontGetNominalGlyphsFuncT :: FontGetNominalGlyphsFuncT -> FontGetNominalGlyphsFuncT_WithClosures drop_closures_FontGetNominalGlyphsFuncT :: FontGetNominalGlyphsFuncT -> FontGetNominalGlyphsFuncT_WithClosures drop_closures_FontGetNominalGlyphsFuncT FontGetNominalGlyphsFuncT _f FontT font Ptr () fontData Word32 count Word32 firstUnicode Word32 unicodeStride Word32 glyphStride Ptr () _ = FontGetNominalGlyphsFuncT _f FontT font Ptr () fontData Word32 count Word32 firstUnicode Word32 unicodeStride Word32 glyphStride -- | Wrap the callback into a `GClosure`. genClosure_FontGetNominalGlyphsFuncT :: MonadIO m => FontGetNominalGlyphsFuncT -> m (GClosure C_FontGetNominalGlyphsFuncT) genClosure_FontGetNominalGlyphsFuncT :: forall (m :: * -> *). MonadIO m => FontGetNominalGlyphsFuncT -> m (GClosure C_FontGetNominalGlyphsFuncT) genClosure_FontGetNominalGlyphsFuncT FontGetNominalGlyphsFuncT cb = IO (GClosure C_FontGetNominalGlyphsFuncT) -> m (GClosure C_FontGetNominalGlyphsFuncT) forall a. IO a -> m a 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 a b. IO a -> (a -> IO b) -> IO b 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 a `FontGetNominalGlyphsFuncT` into a `C_FontGetNominalGlyphsFuncT`. wrap_FontGetNominalGlyphsFuncT :: Maybe (Ptr (FunPtr C_FontGetNominalGlyphsFuncT)) -> FontGetNominalGlyphsFuncT_WithClosures -> C_FontGetNominalGlyphsFuncT wrap_FontGetNominalGlyphsFuncT :: Maybe (Ptr (FunPtr C_FontGetNominalGlyphsFuncT)) -> FontGetNominalGlyphsFuncT_WithClosures -> C_FontGetNominalGlyphsFuncT wrap_FontGetNominalGlyphsFuncT Maybe (Ptr (FunPtr C_FontGetNominalGlyphsFuncT)) gi'funptrptr FontGetNominalGlyphsFuncT_WithClosures gi'cb Ptr FontT font Ptr () fontData Word32 count Word32 firstUnicode Word32 unicodeStride Ptr Word32 firstGlyph Word32 glyphStride Ptr () userData = do Ptr FontT -> (FontT -> IO Word32) -> IO Word32 forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr FontT font ((FontT -> IO Word32) -> IO Word32) -> (FontT -> IO Word32) -> IO Word32 forall a b. (a -> b) -> a -> b $ \FontT font' -> do (Word32 result, Word32 outfirstGlyph) <- FontGetNominalGlyphsFuncT_WithClosures gi'cb FontT font' Ptr () fontData Word32 count Word32 firstUnicode Word32 unicodeStride Word32 glyphStride Ptr () userData Ptr Word32 -> Word32 -> IO () forall a. Storable a => Ptr a -> a -> IO () poke Ptr Word32 firstGlyph Word32 outfirstGlyph Maybe (Ptr (FunPtr C_FontGetNominalGlyphsFuncT)) -> IO () forall a. Maybe (Ptr (FunPtr a)) -> IO () maybeReleaseFunPtr Maybe (Ptr (FunPtr C_FontGetNominalGlyphsFuncT)) gi'funptrptr Word32 -> IO Word32 forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return Word32 result -- callback FontGetNominalGlyphFuncT {- Callable { returnType = Just (TBasicType TInt) , returnMayBeNull = False , returnTransfer = TransferNothing , returnDocumentation = Documentation { rawDocText = Just "`true` if data found, `false` otherwise" , sinceVersion = Nothing } , args = [ Arg { argCName = "font" , argType = TInterface Name { namespace = "HarfBuzz" , name = "font_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "#hb_font_t to work upon" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "font_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "@font user data pointer" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "unicode" , argType = TBasicType TUInt32 , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "The Unicode code point to query" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "glyph" , argType = TBasicType TUInt32 , direction = DirectionOut , mayBeNull = False , argDoc = Documentation { rawDocText = Just "The glyph ID retrieved" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferEverything } , Arg { argCName = "user_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "User data pointer passed by the caller" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = 4 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } ] , skipReturn = False , callableThrows = False , callableDeprecated = Nothing , callableDocumentation = Documentation { rawDocText = Just "A virtual method for the #hb_font_funcs_t of an #hb_font_t object.\n\nThis method should retrieve the nominal glyph ID for a specified Unicode code\npoint. Glyph IDs must be returned in a #hb_codepoint_t output parameter." , sinceVersion = Nothing } , callableResolvable = Nothing } -} -- | Type for the callback on the (unwrapped) C side. type C_FontGetNominalGlyphFuncT = Ptr HarfBuzz.FontT.FontT -> Ptr () -> Word32 -> Ptr Word32 -> Ptr () -> IO Int32 -- Args: [ Arg -- { argCName = "font" -- , argType = -- TInterface Name { namespace = "HarfBuzz" , name = "font_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "#hb_font_t to work upon" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "font_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "@font user data pointer" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "unicode" -- , argType = TBasicType TUInt32 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The Unicode code point to query" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "glyph" -- , argType = TBasicType TUInt32 -- , direction = DirectionOut -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The glyph ID retrieved" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferEverything -- } -- , Arg -- { argCName = "user_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "User data pointer passed by the caller" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = 4 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TInt) -- throws : False -- Skip return : False foreign import ccall "dynamic" __dynamic_C_FontGetNominalGlyphFuncT :: FunPtr C_FontGetNominalGlyphFuncT -> C_FontGetNominalGlyphFuncT -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell. dynamic_FontGetNominalGlyphFuncT :: (B.CallStack.HasCallStack, MonadIO m) => FunPtr C_FontGetNominalGlyphFuncT -> HarfBuzz.FontT.FontT -- ^ /@font@/: t'GI.HarfBuzz.Structs.FontT.FontT' to work upon -> Ptr () -- ^ /@fontData@/: /@font@/ user data pointer -> Word32 -- ^ /@unicode@/: The Unicode code point to query -> Ptr () -- ^ /@userData@/: User data pointer passed by the caller -> m ((Int32, Word32)) -- ^ __Returns:__ @true@ if data found, @false@ otherwise dynamic_FontGetNominalGlyphFuncT :: forall (m :: * -> *). (HasCallStack, MonadIO m) => FunPtr C_FontGetNominalGlyphFuncT -> FontT -> Ptr () -> Word32 -> Ptr () -> m (Int32, Word32) dynamic_FontGetNominalGlyphFuncT FunPtr C_FontGetNominalGlyphFuncT __funPtr FontT font Ptr () fontData Word32 unicode Ptr () userData = IO (Int32, Word32) -> m (Int32, Word32) forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (Int32, Word32) -> m (Int32, Word32)) -> IO (Int32, Word32) -> m (Int32, 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 Ptr Word32 glyph <- IO (Ptr Word32) forall a. Storable a => IO (Ptr a) allocMem :: IO (Ptr Word32) Int32 result <- (FunPtr C_FontGetNominalGlyphFuncT -> C_FontGetNominalGlyphFuncT __dynamic_C_FontGetNominalGlyphFuncT FunPtr C_FontGetNominalGlyphFuncT __funPtr) Ptr FontT font' Ptr () fontData Word32 unicode Ptr Word32 glyph Ptr () userData Word32 glyph' <- Ptr Word32 -> IO Word32 forall a. Storable a => Ptr a -> IO a peek Ptr Word32 glyph FontT -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr FontT font Ptr Word32 -> IO () forall a. Ptr a -> IO () freeMem Ptr Word32 glyph (Int32, Word32) -> IO (Int32, Word32) forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return (Int32 result, Word32 glyph') -- | Generate a function pointer callable from C code, from a `C_FontGetNominalGlyphFuncT`. foreign import ccall "wrapper" mk_FontGetNominalGlyphFuncT :: C_FontGetNominalGlyphFuncT -> IO (FunPtr C_FontGetNominalGlyphFuncT) -- | A virtual method for the t'GI.HarfBuzz.Structs.FontFuncsT.FontFuncsT' of an t'GI.HarfBuzz.Structs.FontT.FontT' object. -- -- This method should retrieve the nominal glyph ID for a specified Unicode code -- point. Glyph IDs must be returned in a @/hb_codepoint_t/@ output parameter. type FontGetNominalGlyphFuncT = HarfBuzz.FontT.FontT -- ^ /@font@/: t'GI.HarfBuzz.Structs.FontT.FontT' to work upon -> Ptr () -- ^ /@fontData@/: /@font@/ user data pointer -> Word32 -- ^ /@unicode@/: The Unicode code point to query -> IO ((Int32, Word32)) -- ^ __Returns:__ @true@ if data found, @false@ otherwise -- | A convenience synonym for @`Nothing` :: `Maybe` `FontGetNominalGlyphFuncT`@. noFontGetNominalGlyphFuncT :: Maybe FontGetNominalGlyphFuncT noFontGetNominalGlyphFuncT :: Maybe FontGetNominalGlyphFuncT noFontGetNominalGlyphFuncT = Maybe FontGetNominalGlyphFuncT forall a. Maybe a Nothing -- | A virtual method for the t'GI.HarfBuzz.Structs.FontFuncsT.FontFuncsT' of an t'GI.HarfBuzz.Structs.FontT.FontT' object. -- -- This method should retrieve the nominal glyph ID for a specified Unicode code -- point. Glyph IDs must be returned in a @/hb_codepoint_t/@ output parameter. type FontGetNominalGlyphFuncT_WithClosures = HarfBuzz.FontT.FontT -- ^ /@font@/: t'GI.HarfBuzz.Structs.FontT.FontT' to work upon -> Ptr () -- ^ /@fontData@/: /@font@/ user data pointer -> Word32 -- ^ /@unicode@/: The Unicode code point to query -> Ptr () -- ^ /@userData@/: User data pointer passed by the caller -> IO ((Int32, Word32)) -- ^ __Returns:__ @true@ if data found, @false@ otherwise -- | A convenience synonym for @`Nothing` :: `Maybe` `FontGetNominalGlyphFuncT_WithClosures`@. noFontGetNominalGlyphFuncT_WithClosures :: Maybe FontGetNominalGlyphFuncT_WithClosures noFontGetNominalGlyphFuncT_WithClosures :: Maybe FontGetNominalGlyphFuncT_WithClosures noFontGetNominalGlyphFuncT_WithClosures = Maybe FontGetNominalGlyphFuncT_WithClosures forall a. Maybe a Nothing -- | A simple wrapper that ignores the closure arguments. drop_closures_FontGetNominalGlyphFuncT :: FontGetNominalGlyphFuncT -> FontGetNominalGlyphFuncT_WithClosures drop_closures_FontGetNominalGlyphFuncT :: FontGetNominalGlyphFuncT -> FontGetNominalGlyphFuncT_WithClosures drop_closures_FontGetNominalGlyphFuncT FontGetNominalGlyphFuncT _f FontT font Ptr () fontData Word32 unicode Ptr () _ = FontGetNominalGlyphFuncT _f FontT font Ptr () fontData Word32 unicode -- | Wrap the callback into a `GClosure`. genClosure_FontGetNominalGlyphFuncT :: MonadIO m => FontGetNominalGlyphFuncT -> m (GClosure C_FontGetNominalGlyphFuncT) genClosure_FontGetNominalGlyphFuncT :: forall (m :: * -> *). MonadIO m => FontGetNominalGlyphFuncT -> m (GClosure C_FontGetNominalGlyphFuncT) genClosure_FontGetNominalGlyphFuncT FontGetNominalGlyphFuncT cb = IO (GClosure C_FontGetNominalGlyphFuncT) -> m (GClosure C_FontGetNominalGlyphFuncT) forall a. IO a -> m a 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 a b. IO a -> (a -> IO b) -> IO b 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 a `FontGetNominalGlyphFuncT` into a `C_FontGetNominalGlyphFuncT`. wrap_FontGetNominalGlyphFuncT :: Maybe (Ptr (FunPtr C_FontGetNominalGlyphFuncT)) -> FontGetNominalGlyphFuncT_WithClosures -> C_FontGetNominalGlyphFuncT wrap_FontGetNominalGlyphFuncT :: Maybe (Ptr (FunPtr C_FontGetNominalGlyphFuncT)) -> FontGetNominalGlyphFuncT_WithClosures -> C_FontGetNominalGlyphFuncT wrap_FontGetNominalGlyphFuncT Maybe (Ptr (FunPtr C_FontGetNominalGlyphFuncT)) gi'funptrptr FontGetNominalGlyphFuncT_WithClosures gi'cb Ptr FontT font Ptr () fontData Word32 unicode Ptr Word32 glyph Ptr () userData = do Ptr FontT -> (FontT -> IO Int32) -> IO Int32 forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr FontT font ((FontT -> IO Int32) -> IO Int32) -> (FontT -> IO Int32) -> IO Int32 forall a b. (a -> b) -> a -> b $ \FontT font' -> do (Int32 result, Word32 outglyph) <- FontGetNominalGlyphFuncT_WithClosures gi'cb FontT font' Ptr () fontData Word32 unicode Ptr () userData Ptr Word32 -> Word32 -> IO () forall a. Storable a => Ptr a -> a -> IO () poke Ptr Word32 glyph Word32 outglyph Maybe (Ptr (FunPtr C_FontGetNominalGlyphFuncT)) -> IO () forall a. Maybe (Ptr (FunPtr a)) -> IO () maybeReleaseFunPtr Maybe (Ptr (FunPtr C_FontGetNominalGlyphFuncT)) gi'funptrptr Int32 -> IO Int32 forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return Int32 result -- callback FontGetGlyphShapeFuncT {- Callable { returnType = Nothing , returnMayBeNull = False , returnTransfer = TransferNothing , returnDocumentation = Documentation { rawDocText = Nothing , sinceVersion = Nothing } , args = [ Arg { argCName = "font" , argType = TInterface Name { namespace = "HarfBuzz" , name = "font_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "#hb_font_t to work upon" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "font_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "@font user data pointer" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "glyph" , argType = TBasicType TUInt32 , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "The glyph ID to query" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "draw_funcs" , argType = TInterface Name { namespace = "HarfBuzz" , name = "draw_funcs_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "The draw functions to send the shape data to" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "draw_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "The data accompanying the draw functions" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "user_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "User data pointer passed by the caller" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = 5 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } ] , skipReturn = False , callableThrows = False , callableDeprecated = Just DeprecationInfo { deprecatedSinceVersion = Just "7.0.0" , deprecationMessage = Just "Use #hb_font_draw_glyph_func_t instead" } , callableDocumentation = Documentation { rawDocText = Just "A virtual method for the #hb_font_funcs_t of an #hb_font_t object." , sinceVersion = Just "4.0.0" } , callableResolvable = Nothing } -} -- | Type for the callback on the (unwrapped) C side. type C_FontGetGlyphShapeFuncT = Ptr HarfBuzz.FontT.FontT -> Ptr () -> Word32 -> Ptr HarfBuzz.DrawFuncsT.DrawFuncsT -> Ptr () -> Ptr () -> IO () -- Args: [ Arg -- { argCName = "font" -- , argType = -- TInterface Name { namespace = "HarfBuzz" , name = "font_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "#hb_font_t to work upon" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "font_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "@font user data pointer" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "glyph" -- , argType = TBasicType TUInt32 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The glyph ID to query" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "draw_funcs" -- , argType = -- TInterface Name { namespace = "HarfBuzz" , name = "draw_funcs_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The draw functions to send the shape data to" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "draw_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "The data accompanying the draw functions" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "user_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "User data pointer passed by the caller" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = 5 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "dynamic" __dynamic_C_FontGetGlyphShapeFuncT :: FunPtr C_FontGetGlyphShapeFuncT -> C_FontGetGlyphShapeFuncT -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell. dynamic_FontGetGlyphShapeFuncT :: (B.CallStack.HasCallStack, MonadIO m) => FunPtr C_FontGetGlyphShapeFuncT -> HarfBuzz.FontT.FontT -- ^ /@font@/: t'GI.HarfBuzz.Structs.FontT.FontT' to work upon -> Ptr () -- ^ /@fontData@/: /@font@/ user data pointer -> Word32 -- ^ /@glyph@/: The glyph ID to query -> HarfBuzz.DrawFuncsT.DrawFuncsT -- ^ /@drawFuncs@/: The draw functions to send the shape data to -> Ptr () -- ^ /@drawData@/: The data accompanying the draw functions -> Ptr () -- ^ /@userData@/: User data pointer passed by the caller -> m () dynamic_FontGetGlyphShapeFuncT :: forall (m :: * -> *). (HasCallStack, MonadIO m) => FunPtr C_FontGetGlyphShapeFuncT -> FontT -> Ptr () -> Word32 -> DrawFuncsT -> Ptr () -> Ptr () -> m () dynamic_FontGetGlyphShapeFuncT FunPtr C_FontGetGlyphShapeFuncT __funPtr FontT font Ptr () fontData Word32 glyph DrawFuncsT drawFuncs Ptr () drawData Ptr () userData = IO () -> m () forall a. IO a -> m a 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 Ptr DrawFuncsT drawFuncs' <- DrawFuncsT -> IO (Ptr DrawFuncsT) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr DrawFuncsT drawFuncs (FunPtr C_FontGetGlyphShapeFuncT -> C_FontGetGlyphShapeFuncT __dynamic_C_FontGetGlyphShapeFuncT FunPtr C_FontGetGlyphShapeFuncT __funPtr) Ptr FontT font' Ptr () fontData Word32 glyph Ptr DrawFuncsT drawFuncs' Ptr () drawData Ptr () userData FontT -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr FontT font DrawFuncsT -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr DrawFuncsT drawFuncs () -> IO () forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return () -- | Generate a function pointer callable from C code, from a `C_FontGetGlyphShapeFuncT`. foreign import ccall "wrapper" mk_FontGetGlyphShapeFuncT :: C_FontGetGlyphShapeFuncT -> IO (FunPtr C_FontGetGlyphShapeFuncT) {-# DEPRECATED FontGetGlyphShapeFuncT ["(Since version 7.0.0)","Use t'GI.HarfBuzz.Callbacks.FontDrawGlyphFuncT' instead"] #-} -- | A virtual method for the t'GI.HarfBuzz.Structs.FontFuncsT.FontFuncsT' of an t'GI.HarfBuzz.Structs.FontT.FontT' object. -- -- /Since: 4.0.0/ type FontGetGlyphShapeFuncT = HarfBuzz.FontT.FontT -- ^ /@font@/: t'GI.HarfBuzz.Structs.FontT.FontT' to work upon -> Ptr () -- ^ /@fontData@/: /@font@/ user data pointer -> Word32 -- ^ /@glyph@/: The glyph ID to query -> HarfBuzz.DrawFuncsT.DrawFuncsT -- ^ /@drawFuncs@/: The draw functions to send the shape data to -> Ptr () -- ^ /@drawData@/: The data accompanying the draw functions -> IO () -- | A convenience synonym for @`Nothing` :: `Maybe` `FontGetGlyphShapeFuncT`@. noFontGetGlyphShapeFuncT :: Maybe FontGetGlyphShapeFuncT noFontGetGlyphShapeFuncT :: Maybe FontGetGlyphShapeFuncT noFontGetGlyphShapeFuncT = Maybe FontGetGlyphShapeFuncT forall a. Maybe a Nothing -- | A virtual method for the t'GI.HarfBuzz.Structs.FontFuncsT.FontFuncsT' of an t'GI.HarfBuzz.Structs.FontT.FontT' object. -- -- /Since: 4.0.0/ type FontGetGlyphShapeFuncT_WithClosures = HarfBuzz.FontT.FontT -- ^ /@font@/: t'GI.HarfBuzz.Structs.FontT.FontT' to work upon -> Ptr () -- ^ /@fontData@/: /@font@/ user data pointer -> Word32 -- ^ /@glyph@/: The glyph ID to query -> HarfBuzz.DrawFuncsT.DrawFuncsT -- ^ /@drawFuncs@/: The draw functions to send the shape data to -> Ptr () -- ^ /@drawData@/: The data accompanying the draw functions -> Ptr () -- ^ /@userData@/: User data pointer passed by the caller -> IO () -- | A convenience synonym for @`Nothing` :: `Maybe` `FontGetGlyphShapeFuncT_WithClosures`@. noFontGetGlyphShapeFuncT_WithClosures :: Maybe FontGetGlyphShapeFuncT_WithClosures noFontGetGlyphShapeFuncT_WithClosures :: Maybe FontGetGlyphShapeFuncT_WithClosures noFontGetGlyphShapeFuncT_WithClosures = Maybe FontGetGlyphShapeFuncT_WithClosures forall a. Maybe a Nothing -- | A simple wrapper that ignores the closure arguments. drop_closures_FontGetGlyphShapeFuncT :: FontGetGlyphShapeFuncT -> FontGetGlyphShapeFuncT_WithClosures drop_closures_FontGetGlyphShapeFuncT :: FontGetGlyphShapeFuncT -> FontGetGlyphShapeFuncT_WithClosures drop_closures_FontGetGlyphShapeFuncT FontGetGlyphShapeFuncT _f FontT font Ptr () fontData Word32 glyph DrawFuncsT drawFuncs Ptr () drawData Ptr () _ = FontGetGlyphShapeFuncT _f FontT font Ptr () fontData Word32 glyph DrawFuncsT drawFuncs Ptr () drawData -- | Wrap the callback into a `GClosure`. genClosure_FontGetGlyphShapeFuncT :: MonadIO m => FontGetGlyphShapeFuncT -> m (GClosure C_FontGetGlyphShapeFuncT) genClosure_FontGetGlyphShapeFuncT :: forall (m :: * -> *). MonadIO m => FontGetGlyphShapeFuncT -> m (GClosure C_FontGetGlyphShapeFuncT) genClosure_FontGetGlyphShapeFuncT FontGetGlyphShapeFuncT cb = IO (GClosure C_FontGetGlyphShapeFuncT) -> m (GClosure C_FontGetGlyphShapeFuncT) forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (GClosure C_FontGetGlyphShapeFuncT) -> m (GClosure C_FontGetGlyphShapeFuncT)) -> IO (GClosure C_FontGetGlyphShapeFuncT) -> m (GClosure C_FontGetGlyphShapeFuncT) forall a b. (a -> b) -> a -> b $ do let cb' :: FontGetGlyphShapeFuncT_WithClosures cb' = FontGetGlyphShapeFuncT -> FontGetGlyphShapeFuncT_WithClosures drop_closures_FontGetGlyphShapeFuncT FontGetGlyphShapeFuncT cb let cb'' :: C_FontGetGlyphShapeFuncT cb'' = Maybe (Ptr (FunPtr C_FontGetGlyphShapeFuncT)) -> FontGetGlyphShapeFuncT_WithClosures -> C_FontGetGlyphShapeFuncT wrap_FontGetGlyphShapeFuncT Maybe (Ptr (FunPtr C_FontGetGlyphShapeFuncT)) forall a. Maybe a Nothing FontGetGlyphShapeFuncT_WithClosures cb' C_FontGetGlyphShapeFuncT -> IO (FunPtr C_FontGetGlyphShapeFuncT) mk_FontGetGlyphShapeFuncT C_FontGetGlyphShapeFuncT cb'' IO (FunPtr C_FontGetGlyphShapeFuncT) -> (FunPtr C_FontGetGlyphShapeFuncT -> IO (GClosure C_FontGetGlyphShapeFuncT)) -> IO (GClosure C_FontGetGlyphShapeFuncT) forall a b. IO a -> (a -> IO b) -> IO b forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b >>= FunPtr C_FontGetGlyphShapeFuncT -> IO (GClosure C_FontGetGlyphShapeFuncT) forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a) B.GClosure.newGClosure -- | Wrap a `FontGetGlyphShapeFuncT` into a `C_FontGetGlyphShapeFuncT`. wrap_FontGetGlyphShapeFuncT :: Maybe (Ptr (FunPtr C_FontGetGlyphShapeFuncT)) -> FontGetGlyphShapeFuncT_WithClosures -> C_FontGetGlyphShapeFuncT wrap_FontGetGlyphShapeFuncT :: Maybe (Ptr (FunPtr C_FontGetGlyphShapeFuncT)) -> FontGetGlyphShapeFuncT_WithClosures -> C_FontGetGlyphShapeFuncT wrap_FontGetGlyphShapeFuncT Maybe (Ptr (FunPtr C_FontGetGlyphShapeFuncT)) gi'funptrptr FontGetGlyphShapeFuncT_WithClosures gi'cb Ptr FontT font Ptr () fontData Word32 glyph Ptr DrawFuncsT drawFuncs Ptr () drawData Ptr () userData = do Ptr FontT -> (FontT -> IO ()) -> IO () forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr FontT font ((FontT -> IO ()) -> IO ()) -> (FontT -> IO ()) -> IO () forall a b. (a -> b) -> a -> b $ \FontT font' -> do Ptr DrawFuncsT -> (DrawFuncsT -> IO ()) -> IO () forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr DrawFuncsT drawFuncs ((DrawFuncsT -> IO ()) -> IO ()) -> (DrawFuncsT -> IO ()) -> IO () forall a b. (a -> b) -> a -> b $ \DrawFuncsT drawFuncs' -> do FontGetGlyphShapeFuncT_WithClosures gi'cb FontT font' Ptr () fontData Word32 glyph DrawFuncsT drawFuncs' Ptr () drawData Ptr () userData Maybe (Ptr (FunPtr C_FontGetGlyphShapeFuncT)) -> IO () forall a. Maybe (Ptr (FunPtr a)) -> IO () maybeReleaseFunPtr Maybe (Ptr (FunPtr C_FontGetGlyphShapeFuncT)) gi'funptrptr -- callback FontGetGlyphOriginFuncT {- Callable { returnType = Just (TBasicType TInt) , returnMayBeNull = False , returnTransfer = TransferNothing , returnDocumentation = Documentation { rawDocText = Just "`true` if data found, `false` otherwise" , sinceVersion = Nothing } , args = [ Arg { argCName = "font" , argType = TInterface Name { namespace = "HarfBuzz" , name = "font_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "#hb_font_t to work upon" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "font_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "@font user data pointer" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "glyph" , argType = TBasicType TUInt32 , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "The glyph ID to query" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "x" , argType = TBasicType TInt32 , direction = DirectionOut , mayBeNull = False , argDoc = Documentation { rawDocText = Just "The X coordinate of the origin" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferEverything } , Arg { argCName = "y" , argType = TBasicType TInt32 , direction = DirectionOut , mayBeNull = False , argDoc = Documentation { rawDocText = Just "The Y coordinate of the origin" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferEverything } , Arg { argCName = "user_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "User data pointer passed by the caller" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = 5 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } ] , skipReturn = False , callableThrows = False , callableDeprecated = Nothing , callableDocumentation = Documentation { rawDocText = Just "A virtual method for the #hb_font_funcs_t of an #hb_font_t object.\n\nThis method should retrieve the (X,Y) coordinates (in font units) of the\norigin for a glyph. Each coordinate must be returned in an #hb_position_t\noutput parameter." , sinceVersion = Nothing } , callableResolvable = Nothing } -} -- | Type for the callback on the (unwrapped) C side. type C_FontGetGlyphOriginFuncT = Ptr HarfBuzz.FontT.FontT -> Ptr () -> Word32 -> Ptr Int32 -> Ptr Int32 -> Ptr () -> IO Int32 -- Args: [ Arg -- { argCName = "font" -- , argType = -- TInterface Name { namespace = "HarfBuzz" , name = "font_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "#hb_font_t to work upon" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "font_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "@font user data pointer" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "glyph" -- , argType = TBasicType TUInt32 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The glyph ID to query" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "x" -- , argType = TBasicType TInt32 -- , direction = DirectionOut -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The X coordinate of the origin" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferEverything -- } -- , Arg -- { argCName = "y" -- , argType = TBasicType TInt32 -- , direction = DirectionOut -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The Y coordinate of the origin" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferEverything -- } -- , Arg -- { argCName = "user_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "User data pointer passed by the caller" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = 5 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TInt) -- throws : False -- Skip return : False foreign import ccall "dynamic" __dynamic_C_FontGetGlyphOriginFuncT :: FunPtr C_FontGetGlyphOriginFuncT -> C_FontGetGlyphOriginFuncT -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell. dynamic_FontGetGlyphOriginFuncT :: (B.CallStack.HasCallStack, MonadIO m) => FunPtr C_FontGetGlyphOriginFuncT -> HarfBuzz.FontT.FontT -- ^ /@font@/: t'GI.HarfBuzz.Structs.FontT.FontT' to work upon -> Ptr () -- ^ /@fontData@/: /@font@/ user data pointer -> Word32 -- ^ /@glyph@/: The glyph ID to query -> Ptr () -- ^ /@userData@/: User data pointer passed by the caller -> m ((Int32, Int32, Int32)) -- ^ __Returns:__ @true@ if data found, @false@ otherwise dynamic_FontGetGlyphOriginFuncT :: forall (m :: * -> *). (HasCallStack, MonadIO m) => FunPtr C_FontGetGlyphOriginFuncT -> FontT -> Ptr () -> Word32 -> Ptr () -> m (Int32, Int32, Int32) dynamic_FontGetGlyphOriginFuncT FunPtr C_FontGetGlyphOriginFuncT __funPtr FontT font Ptr () fontData Word32 glyph Ptr () userData = IO (Int32, Int32, Int32) -> m (Int32, Int32, Int32) forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (Int32, Int32, Int32) -> m (Int32, Int32, Int32)) -> IO (Int32, Int32, Int32) -> m (Int32, Int32, 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 Int32 x <- IO (Ptr Int32) forall a. Storable a => IO (Ptr a) allocMem :: IO (Ptr Int32) Ptr Int32 y <- IO (Ptr Int32) forall a. Storable a => IO (Ptr a) allocMem :: IO (Ptr Int32) Int32 result <- (FunPtr C_FontGetGlyphOriginFuncT -> C_FontGetGlyphOriginFuncT __dynamic_C_FontGetGlyphOriginFuncT FunPtr C_FontGetGlyphOriginFuncT __funPtr) Ptr FontT font' Ptr () fontData Word32 glyph Ptr Int32 x Ptr Int32 y Ptr () userData Int32 x' <- Ptr Int32 -> IO Int32 forall a. Storable a => Ptr a -> IO a peek Ptr Int32 x Int32 y' <- Ptr Int32 -> IO Int32 forall a. Storable a => Ptr a -> IO a peek Ptr Int32 y FontT -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr FontT font Ptr Int32 -> IO () forall a. Ptr a -> IO () freeMem Ptr Int32 x Ptr Int32 -> IO () forall a. Ptr a -> IO () freeMem Ptr Int32 y (Int32, Int32, Int32) -> IO (Int32, Int32, Int32) forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return (Int32 result, Int32 x', Int32 y') -- | Generate a function pointer callable from C code, from a `C_FontGetGlyphOriginFuncT`. foreign import ccall "wrapper" mk_FontGetGlyphOriginFuncT :: C_FontGetGlyphOriginFuncT -> IO (FunPtr C_FontGetGlyphOriginFuncT) -- | A virtual method for the t'GI.HarfBuzz.Structs.FontFuncsT.FontFuncsT' of an t'GI.HarfBuzz.Structs.FontT.FontT' object. -- -- This method should retrieve the (X,Y) coordinates (in font units) of the -- origin for a glyph. Each coordinate must be returned in an @/hb_position_t/@ -- output parameter. type FontGetGlyphOriginFuncT = HarfBuzz.FontT.FontT -- ^ /@font@/: t'GI.HarfBuzz.Structs.FontT.FontT' to work upon -> Ptr () -- ^ /@fontData@/: /@font@/ user data pointer -> Word32 -- ^ /@glyph@/: The glyph ID to query -> IO ((Int32, Int32, Int32)) -- ^ __Returns:__ @true@ if data found, @false@ otherwise -- | A convenience synonym for @`Nothing` :: `Maybe` `FontGetGlyphOriginFuncT`@. noFontGetGlyphOriginFuncT :: Maybe FontGetGlyphOriginFuncT noFontGetGlyphOriginFuncT :: Maybe FontGetGlyphOriginFuncT noFontGetGlyphOriginFuncT = Maybe FontGetGlyphOriginFuncT forall a. Maybe a Nothing -- | A virtual method for the t'GI.HarfBuzz.Structs.FontFuncsT.FontFuncsT' of an t'GI.HarfBuzz.Structs.FontT.FontT' object. -- -- This method should retrieve the (X,Y) coordinates (in font units) of the -- origin for a glyph. Each coordinate must be returned in an @/hb_position_t/@ -- output parameter. type FontGetGlyphOriginFuncT_WithClosures = HarfBuzz.FontT.FontT -- ^ /@font@/: t'GI.HarfBuzz.Structs.FontT.FontT' to work upon -> Ptr () -- ^ /@fontData@/: /@font@/ user data pointer -> Word32 -- ^ /@glyph@/: The glyph ID to query -> Ptr () -- ^ /@userData@/: User data pointer passed by the caller -> IO ((Int32, Int32, Int32)) -- ^ __Returns:__ @true@ if data found, @false@ otherwise -- | A convenience synonym for @`Nothing` :: `Maybe` `FontGetGlyphOriginFuncT_WithClosures`@. noFontGetGlyphOriginFuncT_WithClosures :: Maybe FontGetGlyphOriginFuncT_WithClosures noFontGetGlyphOriginFuncT_WithClosures :: Maybe FontGetGlyphOriginFuncT_WithClosures noFontGetGlyphOriginFuncT_WithClosures = Maybe FontGetGlyphOriginFuncT_WithClosures forall a. Maybe a Nothing -- | A simple wrapper that ignores the closure arguments. drop_closures_FontGetGlyphOriginFuncT :: FontGetGlyphOriginFuncT -> FontGetGlyphOriginFuncT_WithClosures drop_closures_FontGetGlyphOriginFuncT :: FontGetGlyphOriginFuncT -> FontGetGlyphOriginFuncT_WithClosures drop_closures_FontGetGlyphOriginFuncT FontGetGlyphOriginFuncT _f FontT font Ptr () fontData Word32 glyph Ptr () _ = FontGetGlyphOriginFuncT _f FontT font Ptr () fontData Word32 glyph -- | Wrap the callback into a `GClosure`. genClosure_FontGetGlyphOriginFuncT :: MonadIO m => FontGetGlyphOriginFuncT -> m (GClosure C_FontGetGlyphOriginFuncT) genClosure_FontGetGlyphOriginFuncT :: forall (m :: * -> *). MonadIO m => FontGetGlyphOriginFuncT -> m (GClosure C_FontGetGlyphOriginFuncT) genClosure_FontGetGlyphOriginFuncT FontGetGlyphOriginFuncT cb = IO (GClosure C_FontGetGlyphOriginFuncT) -> m (GClosure C_FontGetGlyphOriginFuncT) forall a. IO a -> m a 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 a b. IO a -> (a -> IO b) -> IO b 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 a `FontGetGlyphOriginFuncT` into a `C_FontGetGlyphOriginFuncT`. wrap_FontGetGlyphOriginFuncT :: Maybe (Ptr (FunPtr C_FontGetGlyphOriginFuncT)) -> FontGetGlyphOriginFuncT_WithClosures -> C_FontGetGlyphOriginFuncT wrap_FontGetGlyphOriginFuncT :: Maybe (Ptr (FunPtr C_FontGetGlyphOriginFuncT)) -> FontGetGlyphOriginFuncT_WithClosures -> C_FontGetGlyphOriginFuncT wrap_FontGetGlyphOriginFuncT Maybe (Ptr (FunPtr C_FontGetGlyphOriginFuncT)) gi'funptrptr FontGetGlyphOriginFuncT_WithClosures gi'cb Ptr FontT font Ptr () fontData Word32 glyph Ptr Int32 x Ptr Int32 y Ptr () userData = do Ptr FontT -> (FontT -> IO Int32) -> IO Int32 forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr FontT font ((FontT -> IO Int32) -> IO Int32) -> (FontT -> IO Int32) -> IO Int32 forall a b. (a -> b) -> a -> b $ \FontT font' -> do (Int32 result, Int32 outx, Int32 outy) <- FontGetGlyphOriginFuncT_WithClosures gi'cb FontT font' Ptr () fontData Word32 glyph Ptr () userData Ptr Int32 -> Int32 -> IO () forall a. Storable a => Ptr a -> a -> IO () poke Ptr Int32 x Int32 outx Ptr Int32 -> Int32 -> IO () forall a. Storable a => Ptr a -> a -> IO () poke Ptr Int32 y Int32 outy Maybe (Ptr (FunPtr C_FontGetGlyphOriginFuncT)) -> IO () forall a. Maybe (Ptr (FunPtr a)) -> IO () maybeReleaseFunPtr Maybe (Ptr (FunPtr C_FontGetGlyphOriginFuncT)) gi'funptrptr Int32 -> IO Int32 forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return Int32 result -- callback FontGetGlyphNameFuncT {- Callable { returnType = Just (TBasicType TInt) , returnMayBeNull = False , returnTransfer = TransferNothing , returnDocumentation = Documentation { rawDocText = Just "`true` if data found, `false` otherwise" , sinceVersion = Nothing } , args = [ Arg { argCName = "font" , argType = TInterface Name { namespace = "HarfBuzz" , name = "font_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "#hb_font_t to work upon" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "font_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "@font user data pointer" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "glyph" , argType = TBasicType TUInt32 , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "The glyph ID to query" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "name" , argType = TCArray False (-1) 4 (TBasicType TUTF8) , direction = DirectionOut , mayBeNull = False , argDoc = Documentation { rawDocText = Just "Name string retrieved for the glyph ID" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferEverything } , Arg { argCName = "size" , argType = TBasicType TUInt , direction = DirectionOut , mayBeNull = False , argDoc = Documentation { rawDocText = Just "Length of the glyph-name string retrieved" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferEverything } , Arg { argCName = "user_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "User data pointer passed by the caller" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = 5 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } ] , skipReturn = False , callableThrows = False , callableDeprecated = Nothing , callableDocumentation = Documentation { rawDocText = Just "A virtual method for the #hb_font_funcs_t of an #hb_font_t object.\n\nThis method should retrieve the glyph name that corresponds to a\nglyph ID. The name should be returned in a string output parameter." , sinceVersion = Nothing } , callableResolvable = Nothing } -} -- | Type for the callback on the (unwrapped) C side. type C_FontGetGlyphNameFuncT = Ptr HarfBuzz.FontT.FontT -> Ptr () -> Word32 -> Ptr (Ptr CString) -> Ptr Word32 -> Ptr () -> IO Int32 -- Args: [ Arg -- { argCName = "font" -- , argType = -- TInterface Name { namespace = "HarfBuzz" , name = "font_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "#hb_font_t to work upon" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "font_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "@font user data pointer" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "glyph" -- , argType = TBasicType TUInt32 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The glyph ID to query" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "name" -- , argType = TCArray False (-1) 4 (TBasicType TUTF8) -- , direction = DirectionOut -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "Name string retrieved for the glyph ID" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferEverything -- } -- , Arg -- { argCName = "size" -- , argType = TBasicType TUInt -- , direction = DirectionOut -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "Length of the glyph-name string retrieved" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferEverything -- } -- , Arg -- { argCName = "user_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "User data pointer passed by the caller" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = 5 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [ Arg -- { argCName = "size" -- , argType = TBasicType TUInt -- , direction = DirectionOut -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "Length of the glyph-name string retrieved" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferEverything -- } -- ] -- returnType: Just (TBasicType TInt) -- throws : False -- Skip return : False foreign import ccall "dynamic" __dynamic_C_FontGetGlyphNameFuncT :: FunPtr C_FontGetGlyphNameFuncT -> C_FontGetGlyphNameFuncT -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell. dynamic_FontGetGlyphNameFuncT :: (B.CallStack.HasCallStack, MonadIO m) => FunPtr C_FontGetGlyphNameFuncT -> HarfBuzz.FontT.FontT -- ^ /@font@/: t'GI.HarfBuzz.Structs.FontT.FontT' to work upon -> Ptr () -- ^ /@fontData@/: /@font@/ user data pointer -> Word32 -- ^ /@glyph@/: The glyph ID to query -> Ptr () -- ^ /@userData@/: User data pointer passed by the caller -> m ((Int32, [T.Text])) -- ^ __Returns:__ @true@ if data found, @false@ otherwise dynamic_FontGetGlyphNameFuncT :: forall (m :: * -> *). (HasCallStack, MonadIO m) => FunPtr C_FontGetGlyphNameFuncT -> FontT -> Ptr () -> Word32 -> Ptr () -> m (Int32, [Text]) dynamic_FontGetGlyphNameFuncT FunPtr C_FontGetGlyphNameFuncT __funPtr FontT font Ptr () fontData Word32 glyph Ptr () userData = IO (Int32, [Text]) -> m (Int32, [Text]) forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (Int32, [Text]) -> m (Int32, [Text])) -> IO (Int32, [Text]) -> m (Int32, [Text]) 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 (Ptr CString) name <- IO (Ptr (Ptr CString)) forall a. Storable a => IO (Ptr a) callocMem :: IO (Ptr (Ptr CString)) Ptr Word32 size <- IO (Ptr Word32) forall a. Storable a => IO (Ptr a) allocMem :: IO (Ptr Word32) Int32 result <- (FunPtr C_FontGetGlyphNameFuncT -> C_FontGetGlyphNameFuncT __dynamic_C_FontGetGlyphNameFuncT FunPtr C_FontGetGlyphNameFuncT __funPtr) Ptr FontT font' Ptr () fontData Word32 glyph Ptr (Ptr CString) name Ptr Word32 size Ptr () userData Word32 size' <- Ptr Word32 -> IO Word32 forall a. Storable a => Ptr a -> IO a peek Ptr Word32 size Ptr CString name' <- Ptr (Ptr CString) -> IO (Ptr CString) forall a. Storable a => Ptr a -> IO a peek Ptr (Ptr CString) name [Text] name'' <- (Word32 -> Ptr CString -> IO [Text] forall a. (HasCallStack, Integral a) => a -> Ptr CString -> IO [Text] unpackUTF8CArrayWithLength Word32 size') Ptr CString name' (Word32 -> (CString -> IO ()) -> Ptr CString -> IO () forall a b c. (Storable a, Integral b) => b -> (a -> IO c) -> Ptr a -> IO () mapCArrayWithLength Word32 size') CString -> IO () forall a. Ptr a -> IO () freeMem Ptr CString name' Ptr CString -> IO () forall a. Ptr a -> IO () freeMem Ptr CString name' FontT -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr FontT font Ptr (Ptr CString) -> IO () forall a. Ptr a -> IO () freeMem Ptr (Ptr CString) name Ptr Word32 -> IO () forall a. Ptr a -> IO () freeMem Ptr Word32 size (Int32, [Text]) -> IO (Int32, [Text]) forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return (Int32 result, [Text] name'') -- | Generate a function pointer callable from C code, from a `C_FontGetGlyphNameFuncT`. foreign import ccall "wrapper" mk_FontGetGlyphNameFuncT :: C_FontGetGlyphNameFuncT -> IO (FunPtr C_FontGetGlyphNameFuncT) -- | A virtual method for the t'GI.HarfBuzz.Structs.FontFuncsT.FontFuncsT' of an t'GI.HarfBuzz.Structs.FontT.FontT' object. -- -- This method should retrieve the glyph name that corresponds to a -- glyph ID. The name should be returned in a string output parameter. type FontGetGlyphNameFuncT = HarfBuzz.FontT.FontT -- ^ /@font@/: t'GI.HarfBuzz.Structs.FontT.FontT' to work upon -> Ptr () -- ^ /@fontData@/: /@font@/ user data pointer -> Word32 -- ^ /@glyph@/: The glyph ID to query -> IO ((Int32, [T.Text])) -- ^ __Returns:__ @true@ if data found, @false@ otherwise -- | A convenience synonym for @`Nothing` :: `Maybe` `FontGetGlyphNameFuncT`@. noFontGetGlyphNameFuncT :: Maybe FontGetGlyphNameFuncT noFontGetGlyphNameFuncT :: Maybe FontGetGlyphNameFuncT noFontGetGlyphNameFuncT = Maybe FontGetGlyphNameFuncT forall a. Maybe a Nothing -- | A virtual method for the t'GI.HarfBuzz.Structs.FontFuncsT.FontFuncsT' of an t'GI.HarfBuzz.Structs.FontT.FontT' object. -- -- This method should retrieve the glyph name that corresponds to a -- glyph ID. The name should be returned in a string output parameter. type FontGetGlyphNameFuncT_WithClosures = HarfBuzz.FontT.FontT -- ^ /@font@/: t'GI.HarfBuzz.Structs.FontT.FontT' to work upon -> Ptr () -- ^ /@fontData@/: /@font@/ user data pointer -> Word32 -- ^ /@glyph@/: The glyph ID to query -> Ptr () -- ^ /@userData@/: User data pointer passed by the caller -> IO ((Int32, [T.Text])) -- ^ __Returns:__ @true@ if data found, @false@ otherwise -- | A convenience synonym for @`Nothing` :: `Maybe` `FontGetGlyphNameFuncT_WithClosures`@. noFontGetGlyphNameFuncT_WithClosures :: Maybe FontGetGlyphNameFuncT_WithClosures noFontGetGlyphNameFuncT_WithClosures :: Maybe FontGetGlyphNameFuncT_WithClosures noFontGetGlyphNameFuncT_WithClosures = Maybe FontGetGlyphNameFuncT_WithClosures forall a. Maybe a Nothing -- | A simple wrapper that ignores the closure arguments. drop_closures_FontGetGlyphNameFuncT :: FontGetGlyphNameFuncT -> FontGetGlyphNameFuncT_WithClosures drop_closures_FontGetGlyphNameFuncT :: FontGetGlyphNameFuncT -> FontGetGlyphNameFuncT_WithClosures drop_closures_FontGetGlyphNameFuncT FontGetGlyphNameFuncT _f FontT font Ptr () fontData Word32 glyph Ptr () _ = FontGetGlyphNameFuncT _f FontT font Ptr () fontData Word32 glyph -- | Wrap the callback into a `GClosure`. genClosure_FontGetGlyphNameFuncT :: MonadIO m => FontGetGlyphNameFuncT -> m (GClosure C_FontGetGlyphNameFuncT) genClosure_FontGetGlyphNameFuncT :: forall (m :: * -> *). MonadIO m => FontGetGlyphNameFuncT -> m (GClosure C_FontGetGlyphNameFuncT) genClosure_FontGetGlyphNameFuncT FontGetGlyphNameFuncT cb = IO (GClosure C_FontGetGlyphNameFuncT) -> m (GClosure C_FontGetGlyphNameFuncT) forall a. IO a -> m a 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 a b. IO a -> (a -> IO b) -> IO b 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 a `FontGetGlyphNameFuncT` into a `C_FontGetGlyphNameFuncT`. wrap_FontGetGlyphNameFuncT :: Maybe (Ptr (FunPtr C_FontGetGlyphNameFuncT)) -> FontGetGlyphNameFuncT_WithClosures -> C_FontGetGlyphNameFuncT wrap_FontGetGlyphNameFuncT :: Maybe (Ptr (FunPtr C_FontGetGlyphNameFuncT)) -> FontGetGlyphNameFuncT_WithClosures -> C_FontGetGlyphNameFuncT wrap_FontGetGlyphNameFuncT Maybe (Ptr (FunPtr C_FontGetGlyphNameFuncT)) gi'funptrptr FontGetGlyphNameFuncT_WithClosures gi'cb Ptr FontT font Ptr () fontData Word32 glyph Ptr (Ptr CString) name Ptr Word32 size Ptr () userData = do Ptr FontT -> (FontT -> IO Int32) -> IO Int32 forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr FontT font ((FontT -> IO Int32) -> IO Int32) -> (FontT -> IO Int32) -> IO Int32 forall a b. (a -> b) -> a -> b $ \FontT font' -> do (Int32 result, [Text] outname) <- FontGetGlyphNameFuncT_WithClosures gi'cb FontT font' Ptr () fontData Word32 glyph Ptr () userData Ptr CString outname' <- [Text] -> IO (Ptr CString) packUTF8CArray [Text] outname Ptr (Ptr CString) -> Ptr CString -> IO () forall a. Storable a => Ptr a -> a -> IO () poke Ptr (Ptr CString) name Ptr CString outname' Maybe (Ptr (FunPtr C_FontGetGlyphNameFuncT)) -> IO () forall a. Maybe (Ptr (FunPtr a)) -> IO () maybeReleaseFunPtr Maybe (Ptr (FunPtr C_FontGetGlyphNameFuncT)) gi'funptrptr Int32 -> IO Int32 forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return Int32 result -- callback FontGetGlyphKerningFuncT {- Callable { returnType = Just (TBasicType TInt32) , returnMayBeNull = False , returnTransfer = TransferNothing , returnDocumentation = Documentation { rawDocText = Nothing , sinceVersion = Nothing } , args = [ Arg { argCName = "font" , argType = TInterface Name { namespace = "HarfBuzz" , name = "font_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "#hb_font_t to work upon" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "font_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "@font user data pointer" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "first_glyph" , argType = TBasicType TUInt32 , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "The glyph ID of the first glyph in the glyph pair" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "second_glyph" , argType = TBasicType TUInt32 , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "The glyph ID of the second glyph in the glyph pair" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "user_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "User data pointer passed by the caller" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = 4 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } ] , skipReturn = False , callableThrows = False , callableDeprecated = Nothing , callableDocumentation = Documentation { rawDocText = Just "This method should retrieve the kerning-adjustment value for a glyph-pair in\nthe specified font, for horizontal text segments." , sinceVersion = Nothing } , callableResolvable = Nothing } -} -- | Type for the callback on the (unwrapped) C side. type C_FontGetGlyphKerningFuncT = Ptr HarfBuzz.FontT.FontT -> Ptr () -> Word32 -> Word32 -> Ptr () -> IO Int32 -- Args: [ Arg -- { argCName = "font" -- , argType = -- TInterface Name { namespace = "HarfBuzz" , name = "font_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "#hb_font_t to work upon" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "font_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "@font user data pointer" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "first_glyph" -- , argType = TBasicType TUInt32 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = -- Just "The glyph ID of the first glyph in the glyph pair" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "second_glyph" -- , argType = TBasicType TUInt32 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = -- Just "The glyph ID of the second glyph in the glyph pair" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "user_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "User data pointer passed by the caller" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = 4 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TInt32) -- throws : False -- Skip return : False foreign import ccall "dynamic" __dynamic_C_FontGetGlyphKerningFuncT :: FunPtr C_FontGetGlyphKerningFuncT -> C_FontGetGlyphKerningFuncT -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell. dynamic_FontGetGlyphKerningFuncT :: (B.CallStack.HasCallStack, MonadIO m) => FunPtr C_FontGetGlyphKerningFuncT -> HarfBuzz.FontT.FontT -- ^ /@font@/: t'GI.HarfBuzz.Structs.FontT.FontT' to work upon -> Ptr () -- ^ /@fontData@/: /@font@/ user data pointer -> Word32 -- ^ /@firstGlyph@/: The glyph ID of the first glyph in the glyph pair -> Word32 -- ^ /@secondGlyph@/: The glyph ID of the second glyph in the glyph pair -> Ptr () -- ^ /@userData@/: User data pointer passed by the caller -> m Int32 dynamic_FontGetGlyphKerningFuncT :: forall (m :: * -> *). (HasCallStack, MonadIO m) => FunPtr C_FontGetGlyphKerningFuncT -> FontT -> Ptr () -> Word32 -> Word32 -> Ptr () -> m Int32 dynamic_FontGetGlyphKerningFuncT FunPtr C_FontGetGlyphKerningFuncT __funPtr FontT font Ptr () fontData Word32 firstGlyph Word32 secondGlyph Ptr () userData = IO Int32 -> m Int32 forall a. IO a -> m a 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_FontGetGlyphKerningFuncT -> C_FontGetGlyphKerningFuncT __dynamic_C_FontGetGlyphKerningFuncT FunPtr C_FontGetGlyphKerningFuncT __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 a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return Int32 result -- | Generate a function pointer callable from C code, from a `C_FontGetGlyphKerningFuncT`. foreign import ccall "wrapper" mk_FontGetGlyphKerningFuncT :: C_FontGetGlyphKerningFuncT -> IO (FunPtr C_FontGetGlyphKerningFuncT) -- | This method should retrieve the kerning-adjustment value for a glyph-pair in -- the specified font, for horizontal text segments. type FontGetGlyphKerningFuncT = HarfBuzz.FontT.FontT -- ^ /@font@/: t'GI.HarfBuzz.Structs.FontT.FontT' to work upon -> Ptr () -- ^ /@fontData@/: /@font@/ user data pointer -> Word32 -- ^ /@firstGlyph@/: The glyph ID of the first glyph in the glyph pair -> Word32 -- ^ /@secondGlyph@/: The glyph ID of the second glyph in the glyph pair -> IO Int32 -- | A convenience synonym for @`Nothing` :: `Maybe` `FontGetGlyphKerningFuncT`@. noFontGetGlyphKerningFuncT :: Maybe FontGetGlyphKerningFuncT noFontGetGlyphKerningFuncT :: Maybe FontGetGlyphKerningFuncT noFontGetGlyphKerningFuncT = Maybe FontGetGlyphKerningFuncT forall a. Maybe a Nothing -- | This method should retrieve the kerning-adjustment value for a glyph-pair in -- the specified font, for horizontal text segments. type FontGetGlyphKerningFuncT_WithClosures = HarfBuzz.FontT.FontT -- ^ /@font@/: t'GI.HarfBuzz.Structs.FontT.FontT' to work upon -> Ptr () -- ^ /@fontData@/: /@font@/ user data pointer -> Word32 -- ^ /@firstGlyph@/: The glyph ID of the first glyph in the glyph pair -> Word32 -- ^ /@secondGlyph@/: The glyph ID of the second glyph in the glyph pair -> Ptr () -- ^ /@userData@/: User data pointer passed by the caller -> IO Int32 -- | A convenience synonym for @`Nothing` :: `Maybe` `FontGetGlyphKerningFuncT_WithClosures`@. noFontGetGlyphKerningFuncT_WithClosures :: Maybe FontGetGlyphKerningFuncT_WithClosures noFontGetGlyphKerningFuncT_WithClosures :: Maybe FontGetGlyphKerningFuncT_WithClosures noFontGetGlyphKerningFuncT_WithClosures = Maybe FontGetGlyphKerningFuncT_WithClosures forall a. Maybe a Nothing -- | A simple wrapper that ignores the closure arguments. drop_closures_FontGetGlyphKerningFuncT :: FontGetGlyphKerningFuncT -> FontGetGlyphKerningFuncT_WithClosures drop_closures_FontGetGlyphKerningFuncT :: FontGetGlyphKerningFuncT -> FontGetGlyphKerningFuncT_WithClosures drop_closures_FontGetGlyphKerningFuncT FontGetGlyphKerningFuncT _f FontT font Ptr () fontData Word32 firstGlyph Word32 secondGlyph Ptr () _ = FontGetGlyphKerningFuncT _f FontT font Ptr () fontData Word32 firstGlyph Word32 secondGlyph -- | Wrap the callback into a `GClosure`. genClosure_FontGetGlyphKerningFuncT :: MonadIO m => FontGetGlyphKerningFuncT -> m (GClosure C_FontGetGlyphKerningFuncT) genClosure_FontGetGlyphKerningFuncT :: forall (m :: * -> *). MonadIO m => FontGetGlyphKerningFuncT -> m (GClosure C_FontGetGlyphKerningFuncT) genClosure_FontGetGlyphKerningFuncT FontGetGlyphKerningFuncT cb = IO (GClosure C_FontGetGlyphKerningFuncT) -> m (GClosure C_FontGetGlyphKerningFuncT) forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (GClosure C_FontGetGlyphKerningFuncT) -> m (GClosure C_FontGetGlyphKerningFuncT)) -> IO (GClosure C_FontGetGlyphKerningFuncT) -> m (GClosure C_FontGetGlyphKerningFuncT) forall a b. (a -> b) -> a -> b $ do let cb' :: FontGetGlyphKerningFuncT_WithClosures cb' = FontGetGlyphKerningFuncT -> FontGetGlyphKerningFuncT_WithClosures drop_closures_FontGetGlyphKerningFuncT FontGetGlyphKerningFuncT cb let cb'' :: C_FontGetGlyphKerningFuncT cb'' = Maybe (Ptr (FunPtr C_FontGetGlyphKerningFuncT)) -> FontGetGlyphKerningFuncT_WithClosures -> C_FontGetGlyphKerningFuncT wrap_FontGetGlyphKerningFuncT Maybe (Ptr (FunPtr C_FontGetGlyphKerningFuncT)) forall a. Maybe a Nothing FontGetGlyphKerningFuncT_WithClosures cb' C_FontGetGlyphKerningFuncT -> IO (FunPtr C_FontGetGlyphKerningFuncT) mk_FontGetGlyphKerningFuncT C_FontGetGlyphKerningFuncT cb'' IO (FunPtr C_FontGetGlyphKerningFuncT) -> (FunPtr C_FontGetGlyphKerningFuncT -> IO (GClosure C_FontGetGlyphKerningFuncT)) -> IO (GClosure C_FontGetGlyphKerningFuncT) forall a b. IO a -> (a -> IO b) -> IO b forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b >>= FunPtr C_FontGetGlyphKerningFuncT -> IO (GClosure C_FontGetGlyphKerningFuncT) forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a) B.GClosure.newGClosure -- | Wrap a `FontGetGlyphKerningFuncT` into a `C_FontGetGlyphKerningFuncT`. wrap_FontGetGlyphKerningFuncT :: Maybe (Ptr (FunPtr C_FontGetGlyphKerningFuncT)) -> FontGetGlyphKerningFuncT_WithClosures -> C_FontGetGlyphKerningFuncT wrap_FontGetGlyphKerningFuncT :: Maybe (Ptr (FunPtr C_FontGetGlyphKerningFuncT)) -> FontGetGlyphKerningFuncT_WithClosures -> C_FontGetGlyphKerningFuncT wrap_FontGetGlyphKerningFuncT Maybe (Ptr (FunPtr C_FontGetGlyphKerningFuncT)) gi'funptrptr FontGetGlyphKerningFuncT_WithClosures gi'cb Ptr FontT font Ptr () fontData Word32 firstGlyph Word32 secondGlyph Ptr () userData = do Ptr FontT -> (FontT -> IO Int32) -> IO Int32 forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr FontT font ((FontT -> IO Int32) -> IO Int32) -> (FontT -> IO Int32) -> IO Int32 forall a b. (a -> b) -> a -> b $ \FontT font' -> do Int32 result <- FontGetGlyphKerningFuncT_WithClosures gi'cb FontT font' Ptr () fontData Word32 firstGlyph Word32 secondGlyph Ptr () userData Maybe (Ptr (FunPtr C_FontGetGlyphKerningFuncT)) -> IO () forall a. Maybe (Ptr (FunPtr a)) -> IO () maybeReleaseFunPtr Maybe (Ptr (FunPtr C_FontGetGlyphKerningFuncT)) gi'funptrptr Int32 -> IO Int32 forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return Int32 result -- callback FontGetGlyphFuncT {- Callable { returnType = Just (TBasicType TInt) , returnMayBeNull = False , returnTransfer = TransferNothing , returnDocumentation = Documentation { rawDocText = Just "`true` if data found, `false` otherwise" , sinceVersion = Nothing } , args = [ Arg { argCName = "font" , argType = TInterface Name { namespace = "HarfBuzz" , name = "font_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "#hb_font_t to work upon" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "font_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "@font user data pointer" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "unicode" , argType = TBasicType TUInt32 , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "The Unicode code point to query" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "variation_selector" , argType = TBasicType TUInt32 , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "The variation-selector code point to query" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "glyph" , argType = TBasicType TUInt32 , direction = DirectionOut , mayBeNull = False , argDoc = Documentation { rawDocText = Just "The glyph ID retrieved" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferEverything } , Arg { argCName = "user_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "User data pointer passed by the caller" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = 5 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } ] , skipReturn = False , callableThrows = False , callableDeprecated = Just DeprecationInfo { deprecatedSinceVersion = Just "1.2.3" , deprecationMessage = Nothing } , callableDocumentation = Documentation { rawDocText = Just "A virtual method for the #hb_font_funcs_t of an #hb_font_t object.\n\nThis method should retrieve the glyph ID for a specified Unicode code point\nfont, with an optional variation selector." , sinceVersion = Nothing } , callableResolvable = Nothing } -} -- | Type for the callback on the (unwrapped) C side. type C_FontGetGlyphFuncT = Ptr HarfBuzz.FontT.FontT -> Ptr () -> Word32 -> Word32 -> Ptr Word32 -> Ptr () -> IO Int32 -- Args: [ Arg -- { argCName = "font" -- , argType = -- TInterface Name { namespace = "HarfBuzz" , name = "font_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "#hb_font_t to work upon" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "font_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "@font user data pointer" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "unicode" -- , argType = TBasicType TUInt32 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The Unicode code point to query" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "variation_selector" -- , argType = TBasicType TUInt32 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The variation-selector code point to query" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "glyph" -- , argType = TBasicType TUInt32 -- , direction = DirectionOut -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The glyph ID retrieved" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferEverything -- } -- , Arg -- { argCName = "user_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "User data pointer passed by the caller" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = 5 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TInt) -- throws : False -- Skip return : False foreign import ccall "dynamic" __dynamic_C_FontGetGlyphFuncT :: FunPtr C_FontGetGlyphFuncT -> C_FontGetGlyphFuncT -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell. dynamic_FontGetGlyphFuncT :: (B.CallStack.HasCallStack, MonadIO m) => FunPtr C_FontGetGlyphFuncT -> HarfBuzz.FontT.FontT -- ^ /@font@/: t'GI.HarfBuzz.Structs.FontT.FontT' to work upon -> Ptr () -- ^ /@fontData@/: /@font@/ user data pointer -> Word32 -- ^ /@unicode@/: The Unicode code point to query -> Word32 -- ^ /@variationSelector@/: The variation-selector code point to query -> Ptr () -- ^ /@userData@/: User data pointer passed by the caller -> m ((Int32, Word32)) -- ^ __Returns:__ @true@ if data found, @false@ otherwise dynamic_FontGetGlyphFuncT :: forall (m :: * -> *). (HasCallStack, MonadIO m) => FunPtr C_FontGetVariationGlyphFuncT -> FontT -> Ptr () -> Word32 -> Word32 -> Ptr () -> m (Int32, Word32) dynamic_FontGetGlyphFuncT FunPtr C_FontGetVariationGlyphFuncT __funPtr FontT font Ptr () fontData Word32 unicode Word32 variationSelector Ptr () userData = IO (Int32, Word32) -> m (Int32, Word32) forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (Int32, Word32) -> m (Int32, Word32)) -> IO (Int32, Word32) -> m (Int32, 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 Ptr Word32 glyph <- IO (Ptr Word32) forall a. Storable a => IO (Ptr a) allocMem :: IO (Ptr Word32) Int32 result <- (FunPtr C_FontGetVariationGlyphFuncT -> C_FontGetVariationGlyphFuncT __dynamic_C_FontGetGlyphFuncT FunPtr C_FontGetVariationGlyphFuncT __funPtr) Ptr FontT font' Ptr () fontData Word32 unicode Word32 variationSelector Ptr Word32 glyph Ptr () userData Word32 glyph' <- Ptr Word32 -> IO Word32 forall a. Storable a => Ptr a -> IO a peek Ptr Word32 glyph FontT -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr FontT font Ptr Word32 -> IO () forall a. Ptr a -> IO () freeMem Ptr Word32 glyph (Int32, Word32) -> IO (Int32, Word32) forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return (Int32 result, Word32 glyph') -- | Generate a function pointer callable from C code, from a `C_FontGetGlyphFuncT`. foreign import ccall "wrapper" mk_FontGetGlyphFuncT :: C_FontGetGlyphFuncT -> IO (FunPtr C_FontGetGlyphFuncT) {-# DEPRECATED FontGetGlyphFuncT ["(Since version 1.2.3)"] #-} -- | A virtual method for the t'GI.HarfBuzz.Structs.FontFuncsT.FontFuncsT' of an t'GI.HarfBuzz.Structs.FontT.FontT' object. -- -- This method should retrieve the glyph ID for a specified Unicode code point -- font, with an optional variation selector. type FontGetGlyphFuncT = HarfBuzz.FontT.FontT -- ^ /@font@/: t'GI.HarfBuzz.Structs.FontT.FontT' to work upon -> Ptr () -- ^ /@fontData@/: /@font@/ user data pointer -> Word32 -- ^ /@unicode@/: The Unicode code point to query -> Word32 -- ^ /@variationSelector@/: The variation-selector code point to query -> IO ((Int32, Word32)) -- ^ __Returns:__ @true@ if data found, @false@ otherwise -- | A convenience synonym for @`Nothing` :: `Maybe` `FontGetGlyphFuncT`@. noFontGetGlyphFuncT :: Maybe FontGetGlyphFuncT noFontGetGlyphFuncT :: Maybe FontGetVariationGlyphFuncT noFontGetGlyphFuncT = Maybe FontGetVariationGlyphFuncT forall a. Maybe a Nothing -- | A virtual method for the t'GI.HarfBuzz.Structs.FontFuncsT.FontFuncsT' of an t'GI.HarfBuzz.Structs.FontT.FontT' object. -- -- This method should retrieve the glyph ID for a specified Unicode code point -- font, with an optional variation selector. type FontGetGlyphFuncT_WithClosures = HarfBuzz.FontT.FontT -- ^ /@font@/: t'GI.HarfBuzz.Structs.FontT.FontT' to work upon -> Ptr () -- ^ /@fontData@/: /@font@/ user data pointer -> Word32 -- ^ /@unicode@/: The Unicode code point to query -> Word32 -- ^ /@variationSelector@/: The variation-selector code point to query -> Ptr () -- ^ /@userData@/: User data pointer passed by the caller -> IO ((Int32, Word32)) -- ^ __Returns:__ @true@ if data found, @false@ otherwise -- | A convenience synonym for @`Nothing` :: `Maybe` `FontGetGlyphFuncT_WithClosures`@. noFontGetGlyphFuncT_WithClosures :: Maybe FontGetGlyphFuncT_WithClosures noFontGetGlyphFuncT_WithClosures :: Maybe FontGetVariationGlyphFuncT_WithClosures noFontGetGlyphFuncT_WithClosures = Maybe FontGetVariationGlyphFuncT_WithClosures forall a. Maybe a Nothing -- | A simple wrapper that ignores the closure arguments. drop_closures_FontGetGlyphFuncT :: FontGetGlyphFuncT -> FontGetGlyphFuncT_WithClosures drop_closures_FontGetGlyphFuncT :: FontGetVariationGlyphFuncT -> FontGetVariationGlyphFuncT_WithClosures drop_closures_FontGetGlyphFuncT FontGetVariationGlyphFuncT _f FontT font Ptr () fontData Word32 unicode Word32 variationSelector Ptr () _ = FontGetVariationGlyphFuncT _f FontT font Ptr () fontData Word32 unicode Word32 variationSelector -- | Wrap the callback into a `GClosure`. genClosure_FontGetGlyphFuncT :: MonadIO m => FontGetGlyphFuncT -> m (GClosure C_FontGetGlyphFuncT) genClosure_FontGetGlyphFuncT :: forall (m :: * -> *). MonadIO m => FontGetVariationGlyphFuncT -> m (GClosure C_FontGetVariationGlyphFuncT) genClosure_FontGetGlyphFuncT FontGetVariationGlyphFuncT cb = IO (GClosure C_FontGetVariationGlyphFuncT) -> m (GClosure C_FontGetVariationGlyphFuncT) forall a. IO a -> m a 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 a b. IO a -> (a -> IO b) -> IO b 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 a `FontGetGlyphFuncT` into a `C_FontGetGlyphFuncT`. wrap_FontGetGlyphFuncT :: Maybe (Ptr (FunPtr C_FontGetGlyphFuncT)) -> FontGetGlyphFuncT_WithClosures -> C_FontGetGlyphFuncT wrap_FontGetGlyphFuncT :: Maybe (Ptr (FunPtr C_FontGetVariationGlyphFuncT)) -> FontGetVariationGlyphFuncT_WithClosures -> C_FontGetVariationGlyphFuncT wrap_FontGetGlyphFuncT Maybe (Ptr (FunPtr C_FontGetVariationGlyphFuncT)) gi'funptrptr FontGetVariationGlyphFuncT_WithClosures gi'cb Ptr FontT font Ptr () fontData Word32 unicode Word32 variationSelector Ptr Word32 glyph Ptr () userData = do Ptr FontT -> (FontT -> IO Int32) -> IO Int32 forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr FontT font ((FontT -> IO Int32) -> IO Int32) -> (FontT -> IO Int32) -> IO Int32 forall a b. (a -> b) -> a -> b $ \FontT font' -> do (Int32 result, Word32 outglyph) <- FontGetVariationGlyphFuncT_WithClosures gi'cb FontT font' Ptr () fontData Word32 unicode Word32 variationSelector Ptr () userData Ptr Word32 -> Word32 -> IO () forall a. Storable a => Ptr a -> a -> IO () poke Ptr Word32 glyph Word32 outglyph Maybe (Ptr (FunPtr C_FontGetVariationGlyphFuncT)) -> IO () forall a. Maybe (Ptr (FunPtr a)) -> IO () maybeReleaseFunPtr Maybe (Ptr (FunPtr C_FontGetVariationGlyphFuncT)) gi'funptrptr Int32 -> IO Int32 forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return Int32 result -- callback FontGetGlyphFromNameFuncT {- Callable { returnType = Just (TBasicType TInt) , returnMayBeNull = False , returnTransfer = TransferNothing , returnDocumentation = Documentation { rawDocText = Just "`true` if data found, `false` otherwise" , sinceVersion = Nothing } , args = [ Arg { argCName = "font" , argType = TInterface Name { namespace = "HarfBuzz" , name = "font_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "#hb_font_t to work upon" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "font_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "@font user data pointer" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "name" , argType = TCArray False (-1) 3 (TBasicType TUTF8) , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "The name string to query" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "len" , argType = TBasicType TInt , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "The length of the name queried" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "glyph" , argType = TBasicType TUInt32 , direction = DirectionOut , mayBeNull = False , argDoc = Documentation { rawDocText = Just "The glyph ID retrieved" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferEverything } , Arg { argCName = "user_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "User data pointer passed by the caller" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = 5 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } ] , skipReturn = False , callableThrows = False , callableDeprecated = Nothing , callableDocumentation = Documentation { rawDocText = Just "A virtual method for the #hb_font_funcs_t of an #hb_font_t object.\n\nThis method should retrieve the glyph ID that corresponds to a glyph-name\nstring." , sinceVersion = Nothing } , callableResolvable = Nothing } -} -- | Type for the callback on the (unwrapped) C side. type C_FontGetGlyphFromNameFuncT = Ptr HarfBuzz.FontT.FontT -> Ptr () -> Ptr CString -> Int32 -> Ptr Word32 -> Ptr () -> IO Int32 -- Args: [ Arg -- { argCName = "font" -- , argType = -- TInterface Name { namespace = "HarfBuzz" , name = "font_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "#hb_font_t to work upon" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "font_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "@font user data pointer" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "name" -- , argType = TCArray False (-1) 3 (TBasicType TUTF8) -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The name string to query" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "len" -- , argType = TBasicType TInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The length of the name queried" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "glyph" -- , argType = TBasicType TUInt32 -- , direction = DirectionOut -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The glyph ID retrieved" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferEverything -- } -- , Arg -- { argCName = "user_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "User data pointer passed by the caller" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = 5 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [ Arg -- { argCName = "len" -- , argType = TBasicType TInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The length of the name queried" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- returnType: Just (TBasicType TInt) -- throws : False -- Skip return : False foreign import ccall "dynamic" __dynamic_C_FontGetGlyphFromNameFuncT :: FunPtr C_FontGetGlyphFromNameFuncT -> C_FontGetGlyphFromNameFuncT -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell. dynamic_FontGetGlyphFromNameFuncT :: (B.CallStack.HasCallStack, MonadIO m) => FunPtr C_FontGetGlyphFromNameFuncT -> HarfBuzz.FontT.FontT -- ^ /@font@/: t'GI.HarfBuzz.Structs.FontT.FontT' to work upon -> Ptr () -- ^ /@fontData@/: /@font@/ user data pointer -> [T.Text] -- ^ /@name@/: The name string to query -> Ptr () -- ^ /@userData@/: User data pointer passed by the caller -> m ((Int32, Word32)) -- ^ __Returns:__ @true@ if data found, @false@ otherwise dynamic_FontGetGlyphFromNameFuncT :: forall (m :: * -> *). (HasCallStack, MonadIO m) => FunPtr C_FontGetGlyphFromNameFuncT -> FontT -> Ptr () -> [Text] -> Ptr () -> m (Int32, Word32) dynamic_FontGetGlyphFromNameFuncT FunPtr C_FontGetGlyphFromNameFuncT __funPtr FontT font Ptr () fontData [Text] name Ptr () userData = IO (Int32, Word32) -> m (Int32, Word32) forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (Int32, Word32) -> m (Int32, Word32)) -> IO (Int32, Word32) -> m (Int32, Word32) forall a b. (a -> b) -> a -> b $ do let len :: Int32 len = Int -> Int32 forall a b. (Integral a, Num b) => a -> b fromIntegral (Int -> Int32) -> Int -> Int32 forall a b. (a -> b) -> a -> b $ [Text] -> Int forall a. [a] -> Int forall (t :: * -> *) a. Foldable t => t a -> Int P.length [Text] name Ptr FontT font' <- FontT -> IO (Ptr FontT) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr FontT font Ptr CString name' <- [Text] -> IO (Ptr CString) packUTF8CArray [Text] name Ptr Word32 glyph <- IO (Ptr Word32) forall a. Storable a => IO (Ptr a) allocMem :: IO (Ptr Word32) Int32 result <- (FunPtr C_FontGetGlyphFromNameFuncT -> C_FontGetGlyphFromNameFuncT __dynamic_C_FontGetGlyphFromNameFuncT FunPtr C_FontGetGlyphFromNameFuncT __funPtr) Ptr FontT font' Ptr () fontData Ptr CString name' Int32 len Ptr Word32 glyph Ptr () userData Word32 glyph' <- Ptr Word32 -> IO Word32 forall a. Storable a => Ptr a -> IO a peek Ptr Word32 glyph FontT -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr FontT font (Int32 -> (CString -> IO ()) -> Ptr CString -> IO () forall a b c. (Storable a, Integral b) => b -> (a -> IO c) -> Ptr a -> IO () mapCArrayWithLength Int32 len) CString -> IO () forall a. Ptr a -> IO () freeMem Ptr CString name' Ptr CString -> IO () forall a. Ptr a -> IO () freeMem Ptr CString name' Ptr Word32 -> IO () forall a. Ptr a -> IO () freeMem Ptr Word32 glyph (Int32, Word32) -> IO (Int32, Word32) forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return (Int32 result, Word32 glyph') -- | Generate a function pointer callable from C code, from a `C_FontGetGlyphFromNameFuncT`. foreign import ccall "wrapper" mk_FontGetGlyphFromNameFuncT :: C_FontGetGlyphFromNameFuncT -> IO (FunPtr C_FontGetGlyphFromNameFuncT) -- | A virtual method for the t'GI.HarfBuzz.Structs.FontFuncsT.FontFuncsT' of an t'GI.HarfBuzz.Structs.FontT.FontT' object. -- -- This method should retrieve the glyph ID that corresponds to a glyph-name -- string. type FontGetGlyphFromNameFuncT = HarfBuzz.FontT.FontT -- ^ /@font@/: t'GI.HarfBuzz.Structs.FontT.FontT' to work upon -> Ptr () -- ^ /@fontData@/: /@font@/ user data pointer -> [T.Text] -- ^ /@name@/: The name string to query -> IO ((Int32, Word32)) -- ^ __Returns:__ @true@ if data found, @false@ otherwise -- | A convenience synonym for @`Nothing` :: `Maybe` `FontGetGlyphFromNameFuncT`@. noFontGetGlyphFromNameFuncT :: Maybe FontGetGlyphFromNameFuncT noFontGetGlyphFromNameFuncT :: Maybe FontGetGlyphFromNameFuncT noFontGetGlyphFromNameFuncT = Maybe FontGetGlyphFromNameFuncT forall a. Maybe a Nothing -- | A virtual method for the t'GI.HarfBuzz.Structs.FontFuncsT.FontFuncsT' of an t'GI.HarfBuzz.Structs.FontT.FontT' object. -- -- This method should retrieve the glyph ID that corresponds to a glyph-name -- string. type FontGetGlyphFromNameFuncT_WithClosures = HarfBuzz.FontT.FontT -- ^ /@font@/: t'GI.HarfBuzz.Structs.FontT.FontT' to work upon -> Ptr () -- ^ /@fontData@/: /@font@/ user data pointer -> [T.Text] -- ^ /@name@/: The name string to query -> Ptr () -- ^ /@userData@/: User data pointer passed by the caller -> IO ((Int32, Word32)) -- ^ __Returns:__ @true@ if data found, @false@ otherwise -- | A convenience synonym for @`Nothing` :: `Maybe` `FontGetGlyphFromNameFuncT_WithClosures`@. noFontGetGlyphFromNameFuncT_WithClosures :: Maybe FontGetGlyphFromNameFuncT_WithClosures noFontGetGlyphFromNameFuncT_WithClosures :: Maybe FontGetGlyphFromNameFuncT_WithClosures noFontGetGlyphFromNameFuncT_WithClosures = Maybe FontGetGlyphFromNameFuncT_WithClosures forall a. Maybe a Nothing -- | A simple wrapper that ignores the closure arguments. drop_closures_FontGetGlyphFromNameFuncT :: FontGetGlyphFromNameFuncT -> FontGetGlyphFromNameFuncT_WithClosures drop_closures_FontGetGlyphFromNameFuncT :: FontGetGlyphFromNameFuncT -> FontGetGlyphFromNameFuncT_WithClosures drop_closures_FontGetGlyphFromNameFuncT FontGetGlyphFromNameFuncT _f FontT font Ptr () fontData [Text] name Ptr () _ = FontGetGlyphFromNameFuncT _f FontT font Ptr () fontData [Text] name -- | Wrap the callback into a `GClosure`. genClosure_FontGetGlyphFromNameFuncT :: MonadIO m => FontGetGlyphFromNameFuncT -> m (GClosure C_FontGetGlyphFromNameFuncT) genClosure_FontGetGlyphFromNameFuncT :: forall (m :: * -> *). MonadIO m => FontGetGlyphFromNameFuncT -> m (GClosure C_FontGetGlyphFromNameFuncT) genClosure_FontGetGlyphFromNameFuncT FontGetGlyphFromNameFuncT cb = IO (GClosure C_FontGetGlyphFromNameFuncT) -> m (GClosure C_FontGetGlyphFromNameFuncT) forall a. IO a -> m a 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 a b. IO a -> (a -> IO b) -> IO b 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 a `FontGetGlyphFromNameFuncT` into a `C_FontGetGlyphFromNameFuncT`. wrap_FontGetGlyphFromNameFuncT :: Maybe (Ptr (FunPtr C_FontGetGlyphFromNameFuncT)) -> FontGetGlyphFromNameFuncT_WithClosures -> C_FontGetGlyphFromNameFuncT wrap_FontGetGlyphFromNameFuncT :: Maybe (Ptr (FunPtr C_FontGetGlyphFromNameFuncT)) -> FontGetGlyphFromNameFuncT_WithClosures -> C_FontGetGlyphFromNameFuncT wrap_FontGetGlyphFromNameFuncT Maybe (Ptr (FunPtr C_FontGetGlyphFromNameFuncT)) gi'funptrptr FontGetGlyphFromNameFuncT_WithClosures gi'cb Ptr FontT font Ptr () fontData Ptr CString name Int32 len Ptr Word32 glyph Ptr () userData = do Ptr FontT -> (FontT -> IO Int32) -> IO Int32 forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr FontT font ((FontT -> IO Int32) -> IO Int32) -> (FontT -> IO Int32) -> IO Int32 forall a b. (a -> b) -> a -> b $ \FontT font' -> do [Text] name' <- (Int32 -> Ptr CString -> IO [Text] forall a. (HasCallStack, Integral a) => a -> Ptr CString -> IO [Text] unpackUTF8CArrayWithLength Int32 len) Ptr CString name (Int32 result, Word32 outglyph) <- FontGetGlyphFromNameFuncT_WithClosures gi'cb FontT font' Ptr () fontData [Text] name' Ptr () userData Ptr Word32 -> Word32 -> IO () forall a. Storable a => Ptr a -> a -> IO () poke Ptr Word32 glyph Word32 outglyph Maybe (Ptr (FunPtr C_FontGetGlyphFromNameFuncT)) -> IO () forall a. Maybe (Ptr (FunPtr a)) -> IO () maybeReleaseFunPtr Maybe (Ptr (FunPtr C_FontGetGlyphFromNameFuncT)) gi'funptrptr Int32 -> IO Int32 forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return Int32 result -- callback FontGetGlyphExtentsFuncT {- Callable { returnType = Just (TBasicType TInt) , returnMayBeNull = False , returnTransfer = TransferNothing , returnDocumentation = Documentation { rawDocText = Just "`true` if data found, `false` otherwise" , sinceVersion = Nothing } , args = [ Arg { argCName = "font" , argType = TInterface Name { namespace = "HarfBuzz" , name = "font_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "#hb_font_t to work upon" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "font_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "@font user data pointer" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "glyph" , argType = TBasicType TUInt32 , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "The glyph ID to query" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "extents" , argType = TInterface Name { namespace = "HarfBuzz" , name = "glyph_extents_t" } , direction = DirectionOut , mayBeNull = False , argDoc = Documentation { rawDocText = Just "The #hb_glyph_extents_t retrieved" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = True , transfer = TransferNothing } , Arg { argCName = "user_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "User data pointer passed by the caller" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = 4 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } ] , skipReturn = False , callableThrows = False , callableDeprecated = Nothing , callableDocumentation = Documentation { rawDocText = Just "A virtual method for the #hb_font_funcs_t of an #hb_font_t object.\n\nThis method should retrieve the extents for a specified glyph. Extents must be\nreturned in an #hb_glyph_extents output parameter." , sinceVersion = Nothing } , callableResolvable = Nothing } -} -- | Type for the callback on the (unwrapped) C side. type C_FontGetGlyphExtentsFuncT = Ptr HarfBuzz.FontT.FontT -> Ptr () -> Word32 -> Ptr HarfBuzz.GlyphExtentsT.GlyphExtentsT -> Ptr () -> IO Int32 -- Args: [ Arg -- { argCName = "font" -- , argType = -- TInterface Name { namespace = "HarfBuzz" , name = "font_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "#hb_font_t to work upon" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "font_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "@font user data pointer" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "glyph" -- , argType = TBasicType TUInt32 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The glyph ID to query" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "extents" -- , argType = -- TInterface -- Name { namespace = "HarfBuzz" , name = "glyph_extents_t" } -- , direction = DirectionOut -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The #hb_glyph_extents_t retrieved" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = True -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "user_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "User data pointer passed by the caller" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = 4 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TInt) -- throws : False -- Skip return : False foreign import ccall "dynamic" __dynamic_C_FontGetGlyphExtentsFuncT :: FunPtr C_FontGetGlyphExtentsFuncT -> C_FontGetGlyphExtentsFuncT -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell. dynamic_FontGetGlyphExtentsFuncT :: (B.CallStack.HasCallStack, MonadIO m) => FunPtr C_FontGetGlyphExtentsFuncT -> HarfBuzz.FontT.FontT -- ^ /@font@/: t'GI.HarfBuzz.Structs.FontT.FontT' to work upon -> Ptr () -- ^ /@fontData@/: /@font@/ user data pointer -> Word32 -- ^ /@glyph@/: The glyph ID to query -> Ptr () -- ^ /@userData@/: User data pointer passed by the caller -> m ((Int32, HarfBuzz.GlyphExtentsT.GlyphExtentsT)) -- ^ __Returns:__ @true@ if data found, @false@ otherwise dynamic_FontGetGlyphExtentsFuncT :: forall (m :: * -> *). (HasCallStack, MonadIO m) => FunPtr C_FontGetGlyphExtentsFuncT -> FontT -> Ptr () -> Word32 -> Ptr () -> m (Int32, GlyphExtentsT) dynamic_FontGetGlyphExtentsFuncT FunPtr C_FontGetGlyphExtentsFuncT __funPtr FontT font Ptr () fontData Word32 glyph Ptr () userData = IO (Int32, GlyphExtentsT) -> m (Int32, GlyphExtentsT) forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (Int32, GlyphExtentsT) -> m (Int32, GlyphExtentsT)) -> IO (Int32, GlyphExtentsT) -> m (Int32, GlyphExtentsT) 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 <- Int -> IO (Ptr GlyphExtentsT) forall a. Int -> IO (Ptr a) SP.callocBytes Int 16 :: IO (Ptr HarfBuzz.GlyphExtentsT.GlyphExtentsT) 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 GlyphExtentsT extents' <- ((ManagedPtr GlyphExtentsT -> GlyphExtentsT) -> Ptr GlyphExtentsT -> IO GlyphExtentsT forall a. (HasCallStack, BoxedPtr a) => (ManagedPtr a -> a) -> Ptr a -> IO a wrapPtr ManagedPtr GlyphExtentsT -> GlyphExtentsT HarfBuzz.GlyphExtentsT.GlyphExtentsT) Ptr GlyphExtentsT extents FontT -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr FontT font (Int32, GlyphExtentsT) -> IO (Int32, GlyphExtentsT) forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return (Int32 result, GlyphExtentsT extents') -- | Generate a function pointer callable from C code, from a `C_FontGetGlyphExtentsFuncT`. foreign import ccall "wrapper" mk_FontGetGlyphExtentsFuncT :: C_FontGetGlyphExtentsFuncT -> IO (FunPtr C_FontGetGlyphExtentsFuncT) -- | A virtual method for the t'GI.HarfBuzz.Structs.FontFuncsT.FontFuncsT' of an t'GI.HarfBuzz.Structs.FontT.FontT' object. -- -- This method should retrieve the extents for a specified glyph. Extents must be -- returned in an @/hb_glyph_extents/@ output parameter. type FontGetGlyphExtentsFuncT = HarfBuzz.FontT.FontT -- ^ /@font@/: t'GI.HarfBuzz.Structs.FontT.FontT' to work upon -> Ptr () -- ^ /@fontData@/: /@font@/ user data pointer -> Word32 -- ^ /@glyph@/: The glyph ID to query -> IO ((Int32, HarfBuzz.GlyphExtentsT.GlyphExtentsT)) -- ^ __Returns:__ @true@ if data found, @false@ otherwise -- | A convenience synonym for @`Nothing` :: `Maybe` `FontGetGlyphExtentsFuncT`@. noFontGetGlyphExtentsFuncT :: Maybe FontGetGlyphExtentsFuncT noFontGetGlyphExtentsFuncT :: Maybe FontGetGlyphExtentsFuncT noFontGetGlyphExtentsFuncT = Maybe FontGetGlyphExtentsFuncT forall a. Maybe a Nothing -- | A virtual method for the t'GI.HarfBuzz.Structs.FontFuncsT.FontFuncsT' of an t'GI.HarfBuzz.Structs.FontT.FontT' object. -- -- This method should retrieve the extents for a specified glyph. Extents must be -- returned in an @/hb_glyph_extents/@ output parameter. type FontGetGlyphExtentsFuncT_WithClosures = HarfBuzz.FontT.FontT -- ^ /@font@/: t'GI.HarfBuzz.Structs.FontT.FontT' to work upon -> Ptr () -- ^ /@fontData@/: /@font@/ user data pointer -> Word32 -- ^ /@glyph@/: The glyph ID to query -> Ptr () -- ^ /@userData@/: User data pointer passed by the caller -> IO ((Int32, HarfBuzz.GlyphExtentsT.GlyphExtentsT)) -- ^ __Returns:__ @true@ if data found, @false@ otherwise -- | A convenience synonym for @`Nothing` :: `Maybe` `FontGetGlyphExtentsFuncT_WithClosures`@. noFontGetGlyphExtentsFuncT_WithClosures :: Maybe FontGetGlyphExtentsFuncT_WithClosures noFontGetGlyphExtentsFuncT_WithClosures :: Maybe FontGetGlyphExtentsFuncT_WithClosures noFontGetGlyphExtentsFuncT_WithClosures = Maybe FontGetGlyphExtentsFuncT_WithClosures forall a. Maybe a Nothing -- | A simple wrapper that ignores the closure arguments. drop_closures_FontGetGlyphExtentsFuncT :: FontGetGlyphExtentsFuncT -> FontGetGlyphExtentsFuncT_WithClosures drop_closures_FontGetGlyphExtentsFuncT :: FontGetGlyphExtentsFuncT -> FontGetGlyphExtentsFuncT_WithClosures drop_closures_FontGetGlyphExtentsFuncT FontGetGlyphExtentsFuncT _f FontT font Ptr () fontData Word32 glyph Ptr () _ = FontGetGlyphExtentsFuncT _f FontT font Ptr () fontData Word32 glyph -- | Wrap the callback into a `GClosure`. genClosure_FontGetGlyphExtentsFuncT :: MonadIO m => FontGetGlyphExtentsFuncT -> m (GClosure C_FontGetGlyphExtentsFuncT) genClosure_FontGetGlyphExtentsFuncT :: forall (m :: * -> *). MonadIO m => FontGetGlyphExtentsFuncT -> m (GClosure C_FontGetGlyphExtentsFuncT) genClosure_FontGetGlyphExtentsFuncT FontGetGlyphExtentsFuncT cb = IO (GClosure C_FontGetGlyphExtentsFuncT) -> m (GClosure C_FontGetGlyphExtentsFuncT) forall a. IO a -> m a 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 a b. IO a -> (a -> IO b) -> IO b 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 a `FontGetGlyphExtentsFuncT` into a `C_FontGetGlyphExtentsFuncT`. wrap_FontGetGlyphExtentsFuncT :: Maybe (Ptr (FunPtr C_FontGetGlyphExtentsFuncT)) -> FontGetGlyphExtentsFuncT_WithClosures -> C_FontGetGlyphExtentsFuncT wrap_FontGetGlyphExtentsFuncT :: Maybe (Ptr (FunPtr C_FontGetGlyphExtentsFuncT)) -> FontGetGlyphExtentsFuncT_WithClosures -> C_FontGetGlyphExtentsFuncT wrap_FontGetGlyphExtentsFuncT Maybe (Ptr (FunPtr C_FontGetGlyphExtentsFuncT)) gi'funptrptr FontGetGlyphExtentsFuncT_WithClosures gi'cb Ptr FontT font Ptr () fontData Word32 glyph Ptr GlyphExtentsT extents Ptr () userData = do -- XXX Could not generate callback wrapper for FontGetGlyphExtentsFuncT -- Not implemented: Unexpected transfer type for "extents" [Char] -> IO Int32 forall a. HasCallStack => [Char] -> a P.error [Char] "The bindings for wrap_FontGetGlyphExtentsFuncT could not be generated, function unsupported." -- callback FontGetGlyphContourPointFuncT {- Callable { returnType = Just (TBasicType TInt) , returnMayBeNull = False , returnTransfer = TransferNothing , returnDocumentation = Documentation { rawDocText = Just "`true` if data found, `false` otherwise" , sinceVersion = Nothing } , args = [ Arg { argCName = "font" , argType = TInterface Name { namespace = "HarfBuzz" , name = "font_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "#hb_font_t to work upon" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "font_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "@font user data pointer" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "glyph" , argType = TBasicType TUInt32 , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "The glyph ID to query" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "point_index" , argType = TBasicType TUInt , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "The contour-point index to query" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "x" , argType = TBasicType TInt32 , direction = DirectionOut , mayBeNull = False , argDoc = Documentation { rawDocText = Just "The X value retrieved for the contour point" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferEverything } , Arg { argCName = "y" , argType = TBasicType TInt32 , direction = DirectionOut , mayBeNull = False , argDoc = Documentation { rawDocText = Just "The Y value retrieved for the contour point" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferEverything } , Arg { argCName = "user_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "User data pointer passed by the caller" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = 6 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } ] , skipReturn = False , callableThrows = False , callableDeprecated = Nothing , callableDocumentation = Documentation { rawDocText = Just "A virtual method for the #hb_font_funcs_t of an #hb_font_t object.\n\nThis method should retrieve the (X,Y) coordinates (in font units) for a\nspecified contour point in a glyph. Each coordinate must be returned as\nan #hb_position_t output parameter." , sinceVersion = Nothing } , callableResolvable = Nothing } -} -- | Type for the callback on the (unwrapped) C side. type C_FontGetGlyphContourPointFuncT = Ptr HarfBuzz.FontT.FontT -> Ptr () -> Word32 -> Word32 -> Ptr Int32 -> Ptr Int32 -> Ptr () -> IO Int32 -- Args: [ Arg -- { argCName = "font" -- , argType = -- TInterface Name { namespace = "HarfBuzz" , name = "font_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "#hb_font_t to work upon" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "font_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "@font user data pointer" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "glyph" -- , argType = TBasicType TUInt32 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The glyph ID to query" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "point_index" -- , argType = TBasicType TUInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The contour-point index to query" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "x" -- , argType = TBasicType TInt32 -- , direction = DirectionOut -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The X value retrieved for the contour point" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferEverything -- } -- , Arg -- { argCName = "y" -- , argType = TBasicType TInt32 -- , direction = DirectionOut -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The Y value retrieved for the contour point" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferEverything -- } -- , Arg -- { argCName = "user_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "User data pointer passed by the caller" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = 6 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TInt) -- throws : False -- Skip return : False foreign import ccall "dynamic" __dynamic_C_FontGetGlyphContourPointFuncT :: FunPtr C_FontGetGlyphContourPointFuncT -> C_FontGetGlyphContourPointFuncT -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell. dynamic_FontGetGlyphContourPointFuncT :: (B.CallStack.HasCallStack, MonadIO m) => FunPtr C_FontGetGlyphContourPointFuncT -> HarfBuzz.FontT.FontT -- ^ /@font@/: t'GI.HarfBuzz.Structs.FontT.FontT' to work upon -> Ptr () -- ^ /@fontData@/: /@font@/ user data pointer -> Word32 -- ^ /@glyph@/: The glyph ID to query -> Word32 -- ^ /@pointIndex@/: The contour-point index to query -> Ptr () -- ^ /@userData@/: User data pointer passed by the caller -> m ((Int32, Int32, Int32)) -- ^ __Returns:__ @true@ if data found, @false@ otherwise dynamic_FontGetGlyphContourPointFuncT :: forall (m :: * -> *). (HasCallStack, MonadIO m) => FunPtr C_FontGetGlyphContourPointFuncT -> FontT -> Ptr () -> Word32 -> Word32 -> Ptr () -> m (Int32, Int32, Int32) dynamic_FontGetGlyphContourPointFuncT FunPtr C_FontGetGlyphContourPointFuncT __funPtr FontT font Ptr () fontData Word32 glyph Word32 pointIndex Ptr () userData = IO (Int32, Int32, Int32) -> m (Int32, Int32, Int32) forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (Int32, Int32, Int32) -> m (Int32, Int32, Int32)) -> IO (Int32, Int32, Int32) -> m (Int32, Int32, 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 Int32 x <- IO (Ptr Int32) forall a. Storable a => IO (Ptr a) allocMem :: IO (Ptr Int32) Ptr Int32 y <- IO (Ptr Int32) forall a. Storable a => IO (Ptr a) allocMem :: IO (Ptr Int32) Int32 result <- (FunPtr C_FontGetGlyphContourPointFuncT -> C_FontGetGlyphContourPointFuncT __dynamic_C_FontGetGlyphContourPointFuncT FunPtr C_FontGetGlyphContourPointFuncT __funPtr) Ptr FontT font' Ptr () fontData Word32 glyph Word32 pointIndex Ptr Int32 x Ptr Int32 y Ptr () userData Int32 x' <- Ptr Int32 -> IO Int32 forall a. Storable a => Ptr a -> IO a peek Ptr Int32 x Int32 y' <- Ptr Int32 -> IO Int32 forall a. Storable a => Ptr a -> IO a peek Ptr Int32 y FontT -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr FontT font Ptr Int32 -> IO () forall a. Ptr a -> IO () freeMem Ptr Int32 x Ptr Int32 -> IO () forall a. Ptr a -> IO () freeMem Ptr Int32 y (Int32, Int32, Int32) -> IO (Int32, Int32, Int32) forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return (Int32 result, Int32 x', Int32 y') -- | Generate a function pointer callable from C code, from a `C_FontGetGlyphContourPointFuncT`. foreign import ccall "wrapper" mk_FontGetGlyphContourPointFuncT :: C_FontGetGlyphContourPointFuncT -> IO (FunPtr C_FontGetGlyphContourPointFuncT) -- | A virtual method for the t'GI.HarfBuzz.Structs.FontFuncsT.FontFuncsT' of an t'GI.HarfBuzz.Structs.FontT.FontT' object. -- -- This method should retrieve the (X,Y) coordinates (in font units) for a -- specified contour point in a glyph. Each coordinate must be returned as -- an @/hb_position_t/@ output parameter. type FontGetGlyphContourPointFuncT = HarfBuzz.FontT.FontT -- ^ /@font@/: t'GI.HarfBuzz.Structs.FontT.FontT' to work upon -> Ptr () -- ^ /@fontData@/: /@font@/ user data pointer -> Word32 -- ^ /@glyph@/: The glyph ID to query -> Word32 -- ^ /@pointIndex@/: The contour-point index to query -> IO ((Int32, Int32, Int32)) -- ^ __Returns:__ @true@ if data found, @false@ otherwise -- | A convenience synonym for @`Nothing` :: `Maybe` `FontGetGlyphContourPointFuncT`@. noFontGetGlyphContourPointFuncT :: Maybe FontGetGlyphContourPointFuncT noFontGetGlyphContourPointFuncT :: Maybe FontGetGlyphContourPointFuncT noFontGetGlyphContourPointFuncT = Maybe FontGetGlyphContourPointFuncT forall a. Maybe a Nothing -- | A virtual method for the t'GI.HarfBuzz.Structs.FontFuncsT.FontFuncsT' of an t'GI.HarfBuzz.Structs.FontT.FontT' object. -- -- This method should retrieve the (X,Y) coordinates (in font units) for a -- specified contour point in a glyph. Each coordinate must be returned as -- an @/hb_position_t/@ output parameter. type FontGetGlyphContourPointFuncT_WithClosures = HarfBuzz.FontT.FontT -- ^ /@font@/: t'GI.HarfBuzz.Structs.FontT.FontT' to work upon -> Ptr () -- ^ /@fontData@/: /@font@/ user data pointer -> Word32 -- ^ /@glyph@/: The glyph ID to query -> Word32 -- ^ /@pointIndex@/: The contour-point index to query -> Ptr () -- ^ /@userData@/: User data pointer passed by the caller -> IO ((Int32, Int32, Int32)) -- ^ __Returns:__ @true@ if data found, @false@ otherwise -- | A convenience synonym for @`Nothing` :: `Maybe` `FontGetGlyphContourPointFuncT_WithClosures`@. noFontGetGlyphContourPointFuncT_WithClosures :: Maybe FontGetGlyphContourPointFuncT_WithClosures noFontGetGlyphContourPointFuncT_WithClosures :: Maybe FontGetGlyphContourPointFuncT_WithClosures noFontGetGlyphContourPointFuncT_WithClosures = Maybe FontGetGlyphContourPointFuncT_WithClosures forall a. Maybe a Nothing -- | A simple wrapper that ignores the closure arguments. drop_closures_FontGetGlyphContourPointFuncT :: FontGetGlyphContourPointFuncT -> FontGetGlyphContourPointFuncT_WithClosures drop_closures_FontGetGlyphContourPointFuncT :: FontGetGlyphContourPointFuncT -> FontGetGlyphContourPointFuncT_WithClosures drop_closures_FontGetGlyphContourPointFuncT FontGetGlyphContourPointFuncT _f FontT font Ptr () fontData Word32 glyph Word32 pointIndex Ptr () _ = FontGetGlyphContourPointFuncT _f FontT font Ptr () fontData Word32 glyph Word32 pointIndex -- | Wrap the callback into a `GClosure`. genClosure_FontGetGlyphContourPointFuncT :: MonadIO m => FontGetGlyphContourPointFuncT -> m (GClosure C_FontGetGlyphContourPointFuncT) genClosure_FontGetGlyphContourPointFuncT :: forall (m :: * -> *). MonadIO m => FontGetGlyphContourPointFuncT -> m (GClosure C_FontGetGlyphContourPointFuncT) genClosure_FontGetGlyphContourPointFuncT FontGetGlyphContourPointFuncT cb = IO (GClosure C_FontGetGlyphContourPointFuncT) -> m (GClosure C_FontGetGlyphContourPointFuncT) forall a. IO a -> m a 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 a b. IO a -> (a -> IO b) -> IO b 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 a `FontGetGlyphContourPointFuncT` into a `C_FontGetGlyphContourPointFuncT`. wrap_FontGetGlyphContourPointFuncT :: Maybe (Ptr (FunPtr C_FontGetGlyphContourPointFuncT)) -> FontGetGlyphContourPointFuncT_WithClosures -> C_FontGetGlyphContourPointFuncT wrap_FontGetGlyphContourPointFuncT :: Maybe (Ptr (FunPtr C_FontGetGlyphContourPointFuncT)) -> FontGetGlyphContourPointFuncT_WithClosures -> C_FontGetGlyphContourPointFuncT wrap_FontGetGlyphContourPointFuncT Maybe (Ptr (FunPtr C_FontGetGlyphContourPointFuncT)) gi'funptrptr FontGetGlyphContourPointFuncT_WithClosures gi'cb Ptr FontT font Ptr () fontData Word32 glyph Word32 pointIndex Ptr Int32 x Ptr Int32 y Ptr () userData = do Ptr FontT -> (FontT -> IO Int32) -> IO Int32 forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr FontT font ((FontT -> IO Int32) -> IO Int32) -> (FontT -> IO Int32) -> IO Int32 forall a b. (a -> b) -> a -> b $ \FontT font' -> do (Int32 result, Int32 outx, Int32 outy) <- FontGetGlyphContourPointFuncT_WithClosures gi'cb FontT font' Ptr () fontData Word32 glyph Word32 pointIndex Ptr () userData Ptr Int32 -> Int32 -> IO () forall a. Storable a => Ptr a -> a -> IO () poke Ptr Int32 x Int32 outx Ptr Int32 -> Int32 -> IO () forall a. Storable a => Ptr a -> a -> IO () poke Ptr Int32 y Int32 outy Maybe (Ptr (FunPtr C_FontGetGlyphContourPointFuncT)) -> IO () forall a. Maybe (Ptr (FunPtr a)) -> IO () maybeReleaseFunPtr Maybe (Ptr (FunPtr C_FontGetGlyphContourPointFuncT)) gi'funptrptr Int32 -> IO Int32 forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return Int32 result -- callback FontGetGlyphAdvancesFuncT {- Callable { returnType = Nothing , returnMayBeNull = False , returnTransfer = TransferNothing , returnDocumentation = Documentation { rawDocText = Nothing , sinceVersion = Nothing } , args = [ Arg { argCName = "font" , argType = TInterface Name { namespace = "HarfBuzz" , name = "font_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "#hb_font_t to work upon" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "font_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "@font user data pointer" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "count" , argType = TBasicType TUInt , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "The number of glyph IDs in the sequence queried" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "first_glyph" , argType = TBasicType TUInt32 , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "The first glyph ID to query" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "glyph_stride" , argType = TBasicType TUInt , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "The stride between successive glyph IDs" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "first_advance" , argType = TBasicType TInt32 , direction = DirectionOut , mayBeNull = False , argDoc = Documentation { rawDocText = Just "The first advance retrieved" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferEverything } , Arg { argCName = "advance_stride" , argType = TBasicType TUInt , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "The stride between successive advances" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "user_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "User data pointer passed by the caller" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = 7 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } ] , skipReturn = False , callableThrows = False , callableDeprecated = Nothing , callableDocumentation = Documentation { rawDocText = Just "A virtual method for the #hb_font_funcs_t of an #hb_font_t object.\n\nThis method should retrieve the advances for a sequence of glyphs." , sinceVersion = Nothing } , callableResolvable = Nothing } -} -- | Type for the callback on the (unwrapped) C side. type C_FontGetGlyphAdvancesFuncT = Ptr HarfBuzz.FontT.FontT -> Ptr () -> Word32 -> Word32 -> Word32 -> Ptr Int32 -> Word32 -> Ptr () -> IO () -- Args: [ Arg -- { argCName = "font" -- , argType = -- TInterface Name { namespace = "HarfBuzz" , name = "font_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "#hb_font_t to work upon" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "font_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "@font user data pointer" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "count" -- , argType = TBasicType TUInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = -- Just "The number of glyph IDs in the sequence queried" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "first_glyph" -- , argType = TBasicType TUInt32 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The first glyph ID to query" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "glyph_stride" -- , argType = TBasicType TUInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The stride between successive glyph IDs" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "first_advance" -- , argType = TBasicType TInt32 -- , direction = DirectionOut -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The first advance retrieved" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferEverything -- } -- , Arg -- { argCName = "advance_stride" -- , argType = TBasicType TUInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The stride between successive advances" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "user_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "User data pointer passed by the caller" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = 7 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "dynamic" __dynamic_C_FontGetGlyphAdvancesFuncT :: FunPtr C_FontGetGlyphAdvancesFuncT -> C_FontGetGlyphAdvancesFuncT -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell. dynamic_FontGetGlyphAdvancesFuncT :: (B.CallStack.HasCallStack, MonadIO m) => FunPtr C_FontGetGlyphAdvancesFuncT -> HarfBuzz.FontT.FontT -- ^ /@font@/: t'GI.HarfBuzz.Structs.FontT.FontT' to work upon -> Ptr () -- ^ /@fontData@/: /@font@/ user data pointer -> Word32 -- ^ /@count@/: The number of glyph IDs in the sequence queried -> Word32 -- ^ /@firstGlyph@/: The first glyph ID to query -> Word32 -- ^ /@glyphStride@/: The stride between successive glyph IDs -> Word32 -- ^ /@advanceStride@/: The stride between successive advances -> Ptr () -- ^ /@userData@/: User data pointer passed by the caller -> m (Int32) dynamic_FontGetGlyphAdvancesFuncT :: forall (m :: * -> *). (HasCallStack, MonadIO m) => FunPtr C_FontGetGlyphAdvancesFuncT -> FontT -> Ptr () -> Word32 -> Word32 -> Word32 -> Word32 -> Ptr () -> m Int32 dynamic_FontGetGlyphAdvancesFuncT FunPtr C_FontGetGlyphAdvancesFuncT __funPtr FontT font Ptr () fontData Word32 count Word32 firstGlyph Word32 glyphStride Word32 advanceStride Ptr () userData = IO Int32 -> m Int32 forall a. IO a -> m a 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 Int32 firstAdvance <- IO (Ptr Int32) forall a. Storable a => IO (Ptr a) allocMem :: IO (Ptr Int32) (FunPtr C_FontGetGlyphAdvancesFuncT -> C_FontGetGlyphAdvancesFuncT __dynamic_C_FontGetGlyphAdvancesFuncT FunPtr C_FontGetGlyphAdvancesFuncT __funPtr) Ptr FontT font' Ptr () fontData Word32 count Word32 firstGlyph Word32 glyphStride Ptr Int32 firstAdvance Word32 advanceStride Ptr () userData Int32 firstAdvance' <- Ptr Int32 -> IO Int32 forall a. Storable a => Ptr a -> IO a peek Ptr Int32 firstAdvance FontT -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr FontT font Ptr Int32 -> IO () forall a. Ptr a -> IO () freeMem Ptr Int32 firstAdvance Int32 -> IO Int32 forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return Int32 firstAdvance' -- | Generate a function pointer callable from C code, from a `C_FontGetGlyphAdvancesFuncT`. foreign import ccall "wrapper" mk_FontGetGlyphAdvancesFuncT :: C_FontGetGlyphAdvancesFuncT -> IO (FunPtr C_FontGetGlyphAdvancesFuncT) -- | A virtual method for the t'GI.HarfBuzz.Structs.FontFuncsT.FontFuncsT' of an t'GI.HarfBuzz.Structs.FontT.FontT' object. -- -- This method should retrieve the advances for a sequence of glyphs. type FontGetGlyphAdvancesFuncT = HarfBuzz.FontT.FontT -- ^ /@font@/: t'GI.HarfBuzz.Structs.FontT.FontT' to work upon -> Ptr () -- ^ /@fontData@/: /@font@/ user data pointer -> Word32 -- ^ /@count@/: The number of glyph IDs in the sequence queried -> Word32 -- ^ /@firstGlyph@/: The first glyph ID to query -> Word32 -- ^ /@glyphStride@/: The stride between successive glyph IDs -> Word32 -- ^ /@advanceStride@/: The stride between successive advances -> IO (Int32) -- | A convenience synonym for @`Nothing` :: `Maybe` `FontGetGlyphAdvancesFuncT`@. noFontGetGlyphAdvancesFuncT :: Maybe FontGetGlyphAdvancesFuncT noFontGetGlyphAdvancesFuncT :: Maybe FontGetGlyphAdvancesFuncT noFontGetGlyphAdvancesFuncT = Maybe FontGetGlyphAdvancesFuncT forall a. Maybe a Nothing -- | A virtual method for the t'GI.HarfBuzz.Structs.FontFuncsT.FontFuncsT' of an t'GI.HarfBuzz.Structs.FontT.FontT' object. -- -- This method should retrieve the advances for a sequence of glyphs. type FontGetGlyphAdvancesFuncT_WithClosures = HarfBuzz.FontT.FontT -- ^ /@font@/: t'GI.HarfBuzz.Structs.FontT.FontT' to work upon -> Ptr () -- ^ /@fontData@/: /@font@/ user data pointer -> Word32 -- ^ /@count@/: The number of glyph IDs in the sequence queried -> Word32 -- ^ /@firstGlyph@/: The first glyph ID to query -> Word32 -- ^ /@glyphStride@/: The stride between successive glyph IDs -> Word32 -- ^ /@advanceStride@/: The stride between successive advances -> Ptr () -- ^ /@userData@/: User data pointer passed by the caller -> IO (Int32) -- | A convenience synonym for @`Nothing` :: `Maybe` `FontGetGlyphAdvancesFuncT_WithClosures`@. noFontGetGlyphAdvancesFuncT_WithClosures :: Maybe FontGetGlyphAdvancesFuncT_WithClosures noFontGetGlyphAdvancesFuncT_WithClosures :: Maybe FontGetGlyphAdvancesFuncT_WithClosures noFontGetGlyphAdvancesFuncT_WithClosures = Maybe FontGetGlyphAdvancesFuncT_WithClosures forall a. Maybe a Nothing -- | A simple wrapper that ignores the closure arguments. drop_closures_FontGetGlyphAdvancesFuncT :: FontGetGlyphAdvancesFuncT -> FontGetGlyphAdvancesFuncT_WithClosures drop_closures_FontGetGlyphAdvancesFuncT :: FontGetGlyphAdvancesFuncT -> FontGetGlyphAdvancesFuncT_WithClosures drop_closures_FontGetGlyphAdvancesFuncT FontGetGlyphAdvancesFuncT _f FontT font Ptr () fontData Word32 count Word32 firstGlyph Word32 glyphStride Word32 advanceStride Ptr () _ = FontGetGlyphAdvancesFuncT _f FontT font Ptr () fontData Word32 count Word32 firstGlyph Word32 glyphStride Word32 advanceStride -- | Wrap the callback into a `GClosure`. genClosure_FontGetGlyphAdvancesFuncT :: MonadIO m => FontGetGlyphAdvancesFuncT -> m (GClosure C_FontGetGlyphAdvancesFuncT) genClosure_FontGetGlyphAdvancesFuncT :: forall (m :: * -> *). MonadIO m => FontGetGlyphAdvancesFuncT -> m (GClosure C_FontGetGlyphAdvancesFuncT) genClosure_FontGetGlyphAdvancesFuncT FontGetGlyphAdvancesFuncT cb = IO (GClosure C_FontGetGlyphAdvancesFuncT) -> m (GClosure C_FontGetGlyphAdvancesFuncT) forall a. IO a -> m a 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 a b. IO a -> (a -> IO b) -> IO b 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 a `FontGetGlyphAdvancesFuncT` into a `C_FontGetGlyphAdvancesFuncT`. wrap_FontGetGlyphAdvancesFuncT :: Maybe (Ptr (FunPtr C_FontGetGlyphAdvancesFuncT)) -> FontGetGlyphAdvancesFuncT_WithClosures -> C_FontGetGlyphAdvancesFuncT wrap_FontGetGlyphAdvancesFuncT :: Maybe (Ptr (FunPtr C_FontGetGlyphAdvancesFuncT)) -> FontGetGlyphAdvancesFuncT_WithClosures -> C_FontGetGlyphAdvancesFuncT wrap_FontGetGlyphAdvancesFuncT Maybe (Ptr (FunPtr C_FontGetGlyphAdvancesFuncT)) gi'funptrptr FontGetGlyphAdvancesFuncT_WithClosures gi'cb Ptr FontT font Ptr () fontData Word32 count Word32 firstGlyph Word32 glyphStride Ptr Int32 firstAdvance Word32 advanceStride Ptr () userData = do Ptr FontT -> (FontT -> IO ()) -> IO () forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr FontT font ((FontT -> IO ()) -> IO ()) -> (FontT -> IO ()) -> IO () forall a b. (a -> b) -> a -> b $ \FontT font' -> do Int32 outfirstAdvance <- FontGetGlyphAdvancesFuncT_WithClosures gi'cb FontT font' Ptr () fontData Word32 count Word32 firstGlyph Word32 glyphStride Word32 advanceStride Ptr () userData Ptr Int32 -> Int32 -> IO () forall a. Storable a => Ptr a -> a -> IO () poke Ptr Int32 firstAdvance Int32 outfirstAdvance Maybe (Ptr (FunPtr C_FontGetGlyphAdvancesFuncT)) -> IO () forall a. Maybe (Ptr (FunPtr a)) -> IO () maybeReleaseFunPtr Maybe (Ptr (FunPtr C_FontGetGlyphAdvancesFuncT)) gi'funptrptr -- callback FontGetGlyphAdvanceFuncT {- Callable { returnType = Just (TBasicType TInt32) , returnMayBeNull = False , returnTransfer = TransferNothing , returnDocumentation = Documentation { rawDocText = Just "The advance of @glyph within @font" , sinceVersion = Nothing } , args = [ Arg { argCName = "font" , argType = TInterface Name { namespace = "HarfBuzz" , name = "font_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "#hb_font_t to work upon" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "font_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "@font user data pointer" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "glyph" , argType = TBasicType TUInt32 , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "The glyph ID to query" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "user_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "User data pointer passed by the caller" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = 3 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } ] , skipReturn = False , callableThrows = False , callableDeprecated = Nothing , callableDocumentation = Documentation { rawDocText = Just "A virtual method for the #hb_font_funcs_t of an #hb_font_t object.\n\nThis method should retrieve the advance for a specified glyph. The\nmethod must return an #hb_position_t." , sinceVersion = Nothing } , callableResolvable = Nothing } -} -- | Type for the callback on the (unwrapped) C side. type C_FontGetGlyphAdvanceFuncT = Ptr HarfBuzz.FontT.FontT -> Ptr () -> Word32 -> Ptr () -> IO Int32 -- Args: [ Arg -- { argCName = "font" -- , argType = -- TInterface Name { namespace = "HarfBuzz" , name = "font_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "#hb_font_t to work upon" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "font_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "@font user data pointer" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "glyph" -- , argType = TBasicType TUInt32 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The glyph ID to query" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "user_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "User data pointer passed by the caller" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = 3 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TInt32) -- throws : False -- Skip return : False foreign import ccall "dynamic" __dynamic_C_FontGetGlyphAdvanceFuncT :: FunPtr C_FontGetGlyphAdvanceFuncT -> C_FontGetGlyphAdvanceFuncT -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell. dynamic_FontGetGlyphAdvanceFuncT :: (B.CallStack.HasCallStack, MonadIO m) => FunPtr C_FontGetGlyphAdvanceFuncT -> HarfBuzz.FontT.FontT -- ^ /@font@/: t'GI.HarfBuzz.Structs.FontT.FontT' to work upon -> Ptr () -- ^ /@fontData@/: /@font@/ user data pointer -> Word32 -- ^ /@glyph@/: The glyph ID to query -> Ptr () -- ^ /@userData@/: User data pointer passed by the caller -> m Int32 -- ^ __Returns:__ The advance of /@glyph@/ within /@font@/ dynamic_FontGetGlyphAdvanceFuncT :: forall (m :: * -> *). (HasCallStack, MonadIO m) => FunPtr C_FontGetGlyphAdvanceFuncT -> FontT -> Ptr () -> Word32 -> Ptr () -> m Int32 dynamic_FontGetGlyphAdvanceFuncT FunPtr C_FontGetGlyphAdvanceFuncT __funPtr FontT font Ptr () fontData Word32 glyph Ptr () userData = IO Int32 -> m Int32 forall a. IO a -> m a 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 a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return Int32 result -- | Generate a function pointer callable from C code, from a `C_FontGetGlyphAdvanceFuncT`. foreign import ccall "wrapper" mk_FontGetGlyphAdvanceFuncT :: C_FontGetGlyphAdvanceFuncT -> IO (FunPtr C_FontGetGlyphAdvanceFuncT) -- | A virtual method for the t'GI.HarfBuzz.Structs.FontFuncsT.FontFuncsT' of an t'GI.HarfBuzz.Structs.FontT.FontT' object. -- -- This method should retrieve the advance for a specified glyph. The -- method must return an @/hb_position_t/@. type FontGetGlyphAdvanceFuncT = HarfBuzz.FontT.FontT -- ^ /@font@/: t'GI.HarfBuzz.Structs.FontT.FontT' to work upon -> Ptr () -- ^ /@fontData@/: /@font@/ user data pointer -> Word32 -- ^ /@glyph@/: The glyph ID to query -> IO Int32 -- ^ __Returns:__ The advance of /@glyph@/ within /@font@/ -- | A convenience synonym for @`Nothing` :: `Maybe` `FontGetGlyphAdvanceFuncT`@. noFontGetGlyphAdvanceFuncT :: Maybe FontGetGlyphAdvanceFuncT noFontGetGlyphAdvanceFuncT :: Maybe FontGetGlyphAdvanceFuncT noFontGetGlyphAdvanceFuncT = Maybe FontGetGlyphAdvanceFuncT forall a. Maybe a Nothing -- | A virtual method for the t'GI.HarfBuzz.Structs.FontFuncsT.FontFuncsT' of an t'GI.HarfBuzz.Structs.FontT.FontT' object. -- -- This method should retrieve the advance for a specified glyph. The -- method must return an @/hb_position_t/@. type FontGetGlyphAdvanceFuncT_WithClosures = HarfBuzz.FontT.FontT -- ^ /@font@/: t'GI.HarfBuzz.Structs.FontT.FontT' to work upon -> Ptr () -- ^ /@fontData@/: /@font@/ user data pointer -> Word32 -- ^ /@glyph@/: The glyph ID to query -> Ptr () -- ^ /@userData@/: User data pointer passed by the caller -> IO Int32 -- ^ __Returns:__ The advance of /@glyph@/ within /@font@/ -- | A convenience synonym for @`Nothing` :: `Maybe` `FontGetGlyphAdvanceFuncT_WithClosures`@. noFontGetGlyphAdvanceFuncT_WithClosures :: Maybe FontGetGlyphAdvanceFuncT_WithClosures noFontGetGlyphAdvanceFuncT_WithClosures :: Maybe FontGetGlyphAdvanceFuncT_WithClosures noFontGetGlyphAdvanceFuncT_WithClosures = Maybe FontGetGlyphAdvanceFuncT_WithClosures forall a. Maybe a Nothing -- | A simple wrapper that ignores the closure arguments. drop_closures_FontGetGlyphAdvanceFuncT :: FontGetGlyphAdvanceFuncT -> FontGetGlyphAdvanceFuncT_WithClosures drop_closures_FontGetGlyphAdvanceFuncT :: FontGetGlyphAdvanceFuncT -> FontGetGlyphAdvanceFuncT_WithClosures drop_closures_FontGetGlyphAdvanceFuncT FontGetGlyphAdvanceFuncT _f FontT font Ptr () fontData Word32 glyph Ptr () _ = FontGetGlyphAdvanceFuncT _f FontT font Ptr () fontData Word32 glyph -- | Wrap the callback into a `GClosure`. genClosure_FontGetGlyphAdvanceFuncT :: MonadIO m => FontGetGlyphAdvanceFuncT -> m (GClosure C_FontGetGlyphAdvanceFuncT) genClosure_FontGetGlyphAdvanceFuncT :: forall (m :: * -> *). MonadIO m => FontGetGlyphAdvanceFuncT -> m (GClosure C_FontGetGlyphAdvanceFuncT) genClosure_FontGetGlyphAdvanceFuncT FontGetGlyphAdvanceFuncT cb = IO (GClosure C_FontGetGlyphAdvanceFuncT) -> m (GClosure C_FontGetGlyphAdvanceFuncT) forall a. IO a -> m a 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 a b. IO a -> (a -> IO b) -> IO b 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 a `FontGetGlyphAdvanceFuncT` into a `C_FontGetGlyphAdvanceFuncT`. wrap_FontGetGlyphAdvanceFuncT :: Maybe (Ptr (FunPtr C_FontGetGlyphAdvanceFuncT)) -> FontGetGlyphAdvanceFuncT_WithClosures -> C_FontGetGlyphAdvanceFuncT wrap_FontGetGlyphAdvanceFuncT :: Maybe (Ptr (FunPtr C_FontGetGlyphAdvanceFuncT)) -> FontGetGlyphAdvanceFuncT_WithClosures -> C_FontGetGlyphAdvanceFuncT wrap_FontGetGlyphAdvanceFuncT Maybe (Ptr (FunPtr C_FontGetGlyphAdvanceFuncT)) gi'funptrptr FontGetGlyphAdvanceFuncT_WithClosures gi'cb Ptr FontT font Ptr () fontData Word32 glyph Ptr () userData = do Ptr FontT -> (FontT -> IO Int32) -> IO Int32 forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr FontT font ((FontT -> IO Int32) -> IO Int32) -> (FontT -> IO Int32) -> IO Int32 forall a b. (a -> b) -> a -> b $ \FontT font' -> do Int32 result <- FontGetGlyphAdvanceFuncT_WithClosures gi'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)) gi'funptrptr Int32 -> IO Int32 forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return Int32 result -- callback FontGetFontExtentsFuncT {- Callable { returnType = Just (TBasicType TInt) , returnMayBeNull = False , returnTransfer = TransferNothing , returnDocumentation = Documentation { rawDocText = Nothing , sinceVersion = Nothing } , args = [ Arg { argCName = "font" , argType = TInterface Name { namespace = "HarfBuzz" , name = "font_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "#hb_font_t to work upon" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "font_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "@font user data pointer" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "extents" , argType = TInterface Name { namespace = "HarfBuzz" , name = "font_extents_t" } , direction = DirectionOut , mayBeNull = False , argDoc = Documentation { rawDocText = Just "The font extents retrieved" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = True , transfer = TransferNothing } , Arg { argCName = "user_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "User data pointer passed by the caller" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = 3 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } ] , skipReturn = False , callableThrows = False , callableDeprecated = Nothing , callableDocumentation = Documentation { rawDocText = Just "This method should retrieve the extents for a font." , sinceVersion = Nothing } , callableResolvable = Nothing } -} -- | Type for the callback on the (unwrapped) C side. type C_FontGetFontExtentsFuncT = Ptr HarfBuzz.FontT.FontT -> Ptr () -> Ptr HarfBuzz.FontExtentsT.FontExtentsT -> Ptr () -> IO Int32 -- Args: [ Arg -- { argCName = "font" -- , argType = -- TInterface Name { namespace = "HarfBuzz" , name = "font_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "#hb_font_t to work upon" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "font_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "@font user data pointer" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "extents" -- , argType = -- TInterface -- Name { namespace = "HarfBuzz" , name = "font_extents_t" } -- , direction = DirectionOut -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The font extents retrieved" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = True -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "user_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "User data pointer passed by the caller" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = 3 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TInt) -- throws : False -- Skip return : False foreign import ccall "dynamic" __dynamic_C_FontGetFontExtentsFuncT :: FunPtr C_FontGetFontExtentsFuncT -> C_FontGetFontExtentsFuncT -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell. dynamic_FontGetFontExtentsFuncT :: (B.CallStack.HasCallStack, MonadIO m) => FunPtr C_FontGetFontExtentsFuncT -> HarfBuzz.FontT.FontT -- ^ /@font@/: t'GI.HarfBuzz.Structs.FontT.FontT' to work upon -> Ptr () -- ^ /@fontData@/: /@font@/ user data pointer -> Ptr () -- ^ /@userData@/: User data pointer passed by the caller -> m ((Int32, HarfBuzz.FontExtentsT.FontExtentsT)) dynamic_FontGetFontExtentsFuncT :: forall (m :: * -> *). (HasCallStack, MonadIO m) => FunPtr C_FontGetFontExtentsFuncT -> FontT -> Ptr () -> Ptr () -> m (Int32, FontExtentsT) dynamic_FontGetFontExtentsFuncT FunPtr C_FontGetFontExtentsFuncT __funPtr FontT font Ptr () fontData Ptr () userData = IO (Int32, FontExtentsT) -> m (Int32, FontExtentsT) forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (Int32, FontExtentsT) -> m (Int32, FontExtentsT)) -> IO (Int32, FontExtentsT) -> m (Int32, FontExtentsT) 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 <- Int -> IO (Ptr FontExtentsT) forall a. Int -> IO (Ptr a) SP.callocBytes Int 48 :: IO (Ptr HarfBuzz.FontExtentsT.FontExtentsT) Int32 result <- (FunPtr C_FontGetFontExtentsFuncT -> C_FontGetFontExtentsFuncT __dynamic_C_FontGetFontExtentsFuncT FunPtr C_FontGetFontExtentsFuncT __funPtr) Ptr FontT font' Ptr () fontData Ptr FontExtentsT extents Ptr () userData FontExtentsT extents' <- ((ManagedPtr FontExtentsT -> FontExtentsT) -> Ptr FontExtentsT -> IO FontExtentsT forall a. (HasCallStack, BoxedPtr a) => (ManagedPtr a -> a) -> Ptr a -> IO a wrapPtr ManagedPtr FontExtentsT -> FontExtentsT HarfBuzz.FontExtentsT.FontExtentsT) Ptr FontExtentsT extents FontT -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr FontT font (Int32, FontExtentsT) -> IO (Int32, FontExtentsT) forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return (Int32 result, FontExtentsT extents') -- | Generate a function pointer callable from C code, from a `C_FontGetFontExtentsFuncT`. foreign import ccall "wrapper" mk_FontGetFontExtentsFuncT :: C_FontGetFontExtentsFuncT -> IO (FunPtr C_FontGetFontExtentsFuncT) -- | This method should retrieve the extents for a font. type FontGetFontExtentsFuncT = HarfBuzz.FontT.FontT -- ^ /@font@/: t'GI.HarfBuzz.Structs.FontT.FontT' to work upon -> Ptr () -- ^ /@fontData@/: /@font@/ user data pointer -> IO ((Int32, HarfBuzz.FontExtentsT.FontExtentsT)) -- | A convenience synonym for @`Nothing` :: `Maybe` `FontGetFontExtentsFuncT`@. noFontGetFontExtentsFuncT :: Maybe FontGetFontExtentsFuncT noFontGetFontExtentsFuncT :: Maybe FontGetFontExtentsFuncT noFontGetFontExtentsFuncT = Maybe FontGetFontExtentsFuncT forall a. Maybe a Nothing -- | This method should retrieve the extents for a font. type FontGetFontExtentsFuncT_WithClosures = HarfBuzz.FontT.FontT -- ^ /@font@/: t'GI.HarfBuzz.Structs.FontT.FontT' to work upon -> Ptr () -- ^ /@fontData@/: /@font@/ user data pointer -> Ptr () -- ^ /@userData@/: User data pointer passed by the caller -> IO ((Int32, HarfBuzz.FontExtentsT.FontExtentsT)) -- | A convenience synonym for @`Nothing` :: `Maybe` `FontGetFontExtentsFuncT_WithClosures`@. noFontGetFontExtentsFuncT_WithClosures :: Maybe FontGetFontExtentsFuncT_WithClosures noFontGetFontExtentsFuncT_WithClosures :: Maybe FontGetFontExtentsFuncT_WithClosures noFontGetFontExtentsFuncT_WithClosures = Maybe FontGetFontExtentsFuncT_WithClosures forall a. Maybe a Nothing -- | A simple wrapper that ignores the closure arguments. drop_closures_FontGetFontExtentsFuncT :: FontGetFontExtentsFuncT -> FontGetFontExtentsFuncT_WithClosures drop_closures_FontGetFontExtentsFuncT :: FontGetFontExtentsFuncT -> FontGetFontExtentsFuncT_WithClosures drop_closures_FontGetFontExtentsFuncT FontGetFontExtentsFuncT _f FontT font Ptr () fontData Ptr () _ = FontGetFontExtentsFuncT _f FontT font Ptr () fontData -- | Wrap the callback into a `GClosure`. genClosure_FontGetFontExtentsFuncT :: MonadIO m => FontGetFontExtentsFuncT -> m (GClosure C_FontGetFontExtentsFuncT) genClosure_FontGetFontExtentsFuncT :: forall (m :: * -> *). MonadIO m => FontGetFontExtentsFuncT -> m (GClosure C_FontGetFontExtentsFuncT) genClosure_FontGetFontExtentsFuncT FontGetFontExtentsFuncT cb = IO (GClosure C_FontGetFontExtentsFuncT) -> m (GClosure C_FontGetFontExtentsFuncT) forall a. IO a -> m a 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 a b. IO a -> (a -> IO b) -> IO b 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 a `FontGetFontExtentsFuncT` into a `C_FontGetFontExtentsFuncT`. wrap_FontGetFontExtentsFuncT :: Maybe (Ptr (FunPtr C_FontGetFontExtentsFuncT)) -> FontGetFontExtentsFuncT_WithClosures -> C_FontGetFontExtentsFuncT wrap_FontGetFontExtentsFuncT :: Maybe (Ptr (FunPtr C_FontGetFontExtentsFuncT)) -> FontGetFontExtentsFuncT_WithClosures -> C_FontGetFontExtentsFuncT wrap_FontGetFontExtentsFuncT Maybe (Ptr (FunPtr C_FontGetFontExtentsFuncT)) gi'funptrptr FontGetFontExtentsFuncT_WithClosures gi'cb Ptr FontT font Ptr () fontData Ptr FontExtentsT extents Ptr () userData = do -- XXX Could not generate callback wrapper for FontGetFontExtentsFuncT -- Not implemented: Unexpected transfer type for "extents" [Char] -> IO Int32 forall a. HasCallStack => [Char] -> a P.error [Char] "The bindings for wrap_FontGetFontExtentsFuncT could not be generated, function unsupported." -- callback FontDrawGlyphFuncT {- Callable { returnType = Nothing , returnMayBeNull = False , returnTransfer = TransferNothing , returnDocumentation = Documentation { rawDocText = Nothing , sinceVersion = Nothing } , args = [ Arg { argCName = "font" , argType = TInterface Name { namespace = "HarfBuzz" , name = "font_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "#hb_font_t to work upon" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "font_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "@font user data pointer" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "glyph" , argType = TBasicType TUInt32 , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "The glyph ID to query" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "draw_funcs" , argType = TInterface Name { namespace = "HarfBuzz" , name = "draw_funcs_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "The draw functions to send the shape data to" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "draw_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "The data accompanying the draw functions" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "user_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "User data pointer passed by the caller" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = 5 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } ] , skipReturn = False , callableThrows = False , callableDeprecated = Nothing , callableDocumentation = Documentation { rawDocText = Just "A virtual method for the #hb_font_funcs_t of an #hb_font_t object." , sinceVersion = Just "7.0.0" } , callableResolvable = Nothing } -} -- | Type for the callback on the (unwrapped) C side. type C_FontDrawGlyphFuncT = Ptr HarfBuzz.FontT.FontT -> Ptr () -> Word32 -> Ptr HarfBuzz.DrawFuncsT.DrawFuncsT -> Ptr () -> Ptr () -> IO () -- Args: [ Arg -- { argCName = "font" -- , argType = -- TInterface Name { namespace = "HarfBuzz" , name = "font_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "#hb_font_t to work upon" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "font_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "@font user data pointer" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "glyph" -- , argType = TBasicType TUInt32 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The glyph ID to query" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "draw_funcs" -- , argType = -- TInterface Name { namespace = "HarfBuzz" , name = "draw_funcs_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The draw functions to send the shape data to" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "draw_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "The data accompanying the draw functions" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "user_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "User data pointer passed by the caller" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = 5 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "dynamic" __dynamic_C_FontDrawGlyphFuncT :: FunPtr C_FontDrawGlyphFuncT -> C_FontDrawGlyphFuncT -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell. dynamic_FontDrawGlyphFuncT :: (B.CallStack.HasCallStack, MonadIO m) => FunPtr C_FontDrawGlyphFuncT -> HarfBuzz.FontT.FontT -- ^ /@font@/: t'GI.HarfBuzz.Structs.FontT.FontT' to work upon -> Ptr () -- ^ /@fontData@/: /@font@/ user data pointer -> Word32 -- ^ /@glyph@/: The glyph ID to query -> HarfBuzz.DrawFuncsT.DrawFuncsT -- ^ /@drawFuncs@/: The draw functions to send the shape data to -> Ptr () -- ^ /@drawData@/: The data accompanying the draw functions -> Ptr () -- ^ /@userData@/: User data pointer passed by the caller -> m () dynamic_FontDrawGlyphFuncT :: forall (m :: * -> *). (HasCallStack, MonadIO m) => FunPtr C_FontGetGlyphShapeFuncT -> FontT -> Ptr () -> Word32 -> DrawFuncsT -> Ptr () -> Ptr () -> m () dynamic_FontDrawGlyphFuncT FunPtr C_FontGetGlyphShapeFuncT __funPtr FontT font Ptr () fontData Word32 glyph DrawFuncsT drawFuncs Ptr () drawData Ptr () userData = IO () -> m () forall a. IO a -> m a 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 Ptr DrawFuncsT drawFuncs' <- DrawFuncsT -> IO (Ptr DrawFuncsT) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr DrawFuncsT drawFuncs (FunPtr C_FontGetGlyphShapeFuncT -> C_FontGetGlyphShapeFuncT __dynamic_C_FontDrawGlyphFuncT FunPtr C_FontGetGlyphShapeFuncT __funPtr) Ptr FontT font' Ptr () fontData Word32 glyph Ptr DrawFuncsT drawFuncs' Ptr () drawData Ptr () userData FontT -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr FontT font DrawFuncsT -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr DrawFuncsT drawFuncs () -> IO () forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return () -- | Generate a function pointer callable from C code, from a `C_FontDrawGlyphFuncT`. foreign import ccall "wrapper" mk_FontDrawGlyphFuncT :: C_FontDrawGlyphFuncT -> IO (FunPtr C_FontDrawGlyphFuncT) -- | A virtual method for the t'GI.HarfBuzz.Structs.FontFuncsT.FontFuncsT' of an t'GI.HarfBuzz.Structs.FontT.FontT' object. -- -- /Since: 7.0.0/ type FontDrawGlyphFuncT = HarfBuzz.FontT.FontT -- ^ /@font@/: t'GI.HarfBuzz.Structs.FontT.FontT' to work upon -> Ptr () -- ^ /@fontData@/: /@font@/ user data pointer -> Word32 -- ^ /@glyph@/: The glyph ID to query -> HarfBuzz.DrawFuncsT.DrawFuncsT -- ^ /@drawFuncs@/: The draw functions to send the shape data to -> Ptr () -- ^ /@drawData@/: The data accompanying the draw functions -> IO () -- | A convenience synonym for @`Nothing` :: `Maybe` `FontDrawGlyphFuncT`@. noFontDrawGlyphFuncT :: Maybe FontDrawGlyphFuncT noFontDrawGlyphFuncT :: Maybe FontGetGlyphShapeFuncT noFontDrawGlyphFuncT = Maybe FontGetGlyphShapeFuncT forall a. Maybe a Nothing -- | A virtual method for the t'GI.HarfBuzz.Structs.FontFuncsT.FontFuncsT' of an t'GI.HarfBuzz.Structs.FontT.FontT' object. -- -- /Since: 7.0.0/ type FontDrawGlyphFuncT_WithClosures = HarfBuzz.FontT.FontT -- ^ /@font@/: t'GI.HarfBuzz.Structs.FontT.FontT' to work upon -> Ptr () -- ^ /@fontData@/: /@font@/ user data pointer -> Word32 -- ^ /@glyph@/: The glyph ID to query -> HarfBuzz.DrawFuncsT.DrawFuncsT -- ^ /@drawFuncs@/: The draw functions to send the shape data to -> Ptr () -- ^ /@drawData@/: The data accompanying the draw functions -> Ptr () -- ^ /@userData@/: User data pointer passed by the caller -> IO () -- | A convenience synonym for @`Nothing` :: `Maybe` `FontDrawGlyphFuncT_WithClosures`@. noFontDrawGlyphFuncT_WithClosures :: Maybe FontDrawGlyphFuncT_WithClosures noFontDrawGlyphFuncT_WithClosures :: Maybe FontGetGlyphShapeFuncT_WithClosures noFontDrawGlyphFuncT_WithClosures = Maybe FontGetGlyphShapeFuncT_WithClosures forall a. Maybe a Nothing -- | A simple wrapper that ignores the closure arguments. drop_closures_FontDrawGlyphFuncT :: FontDrawGlyphFuncT -> FontDrawGlyphFuncT_WithClosures drop_closures_FontDrawGlyphFuncT :: FontGetGlyphShapeFuncT -> FontGetGlyphShapeFuncT_WithClosures drop_closures_FontDrawGlyphFuncT FontGetGlyphShapeFuncT _f FontT font Ptr () fontData Word32 glyph DrawFuncsT drawFuncs Ptr () drawData Ptr () _ = FontGetGlyphShapeFuncT _f FontT font Ptr () fontData Word32 glyph DrawFuncsT drawFuncs Ptr () drawData -- | Wrap the callback into a `GClosure`. genClosure_FontDrawGlyphFuncT :: MonadIO m => FontDrawGlyphFuncT -> m (GClosure C_FontDrawGlyphFuncT) genClosure_FontDrawGlyphFuncT :: forall (m :: * -> *). MonadIO m => FontGetGlyphShapeFuncT -> m (GClosure C_FontGetGlyphShapeFuncT) genClosure_FontDrawGlyphFuncT FontGetGlyphShapeFuncT cb = IO (GClosure C_FontGetGlyphShapeFuncT) -> m (GClosure C_FontGetGlyphShapeFuncT) forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (GClosure C_FontGetGlyphShapeFuncT) -> m (GClosure C_FontGetGlyphShapeFuncT)) -> IO (GClosure C_FontGetGlyphShapeFuncT) -> m (GClosure C_FontGetGlyphShapeFuncT) forall a b. (a -> b) -> a -> b $ do let cb' :: FontGetGlyphShapeFuncT_WithClosures cb' = FontGetGlyphShapeFuncT -> FontGetGlyphShapeFuncT_WithClosures drop_closures_FontDrawGlyphFuncT FontGetGlyphShapeFuncT cb let cb'' :: C_FontGetGlyphShapeFuncT cb'' = Maybe (Ptr (FunPtr C_FontGetGlyphShapeFuncT)) -> FontGetGlyphShapeFuncT_WithClosures -> C_FontGetGlyphShapeFuncT wrap_FontDrawGlyphFuncT Maybe (Ptr (FunPtr C_FontGetGlyphShapeFuncT)) forall a. Maybe a Nothing FontGetGlyphShapeFuncT_WithClosures cb' C_FontGetGlyphShapeFuncT -> IO (FunPtr C_FontGetGlyphShapeFuncT) mk_FontDrawGlyphFuncT C_FontGetGlyphShapeFuncT cb'' IO (FunPtr C_FontGetGlyphShapeFuncT) -> (FunPtr C_FontGetGlyphShapeFuncT -> IO (GClosure C_FontGetGlyphShapeFuncT)) -> IO (GClosure C_FontGetGlyphShapeFuncT) forall a b. IO a -> (a -> IO b) -> IO b forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b >>= FunPtr C_FontGetGlyphShapeFuncT -> IO (GClosure C_FontGetGlyphShapeFuncT) forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a) B.GClosure.newGClosure -- | Wrap a `FontDrawGlyphFuncT` into a `C_FontDrawGlyphFuncT`. wrap_FontDrawGlyphFuncT :: Maybe (Ptr (FunPtr C_FontDrawGlyphFuncT)) -> FontDrawGlyphFuncT_WithClosures -> C_FontDrawGlyphFuncT wrap_FontDrawGlyphFuncT :: Maybe (Ptr (FunPtr C_FontGetGlyphShapeFuncT)) -> FontGetGlyphShapeFuncT_WithClosures -> C_FontGetGlyphShapeFuncT wrap_FontDrawGlyphFuncT Maybe (Ptr (FunPtr C_FontGetGlyphShapeFuncT)) gi'funptrptr FontGetGlyphShapeFuncT_WithClosures gi'cb Ptr FontT font Ptr () fontData Word32 glyph Ptr DrawFuncsT drawFuncs Ptr () drawData Ptr () userData = do Ptr FontT -> (FontT -> IO ()) -> IO () forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr FontT font ((FontT -> IO ()) -> IO ()) -> (FontT -> IO ()) -> IO () forall a b. (a -> b) -> a -> b $ \FontT font' -> do Ptr DrawFuncsT -> (DrawFuncsT -> IO ()) -> IO () forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr DrawFuncsT drawFuncs ((DrawFuncsT -> IO ()) -> IO ()) -> (DrawFuncsT -> IO ()) -> IO () forall a b. (a -> b) -> a -> b $ \DrawFuncsT drawFuncs' -> do FontGetGlyphShapeFuncT_WithClosures gi'cb FontT font' Ptr () fontData Word32 glyph DrawFuncsT drawFuncs' Ptr () drawData Ptr () userData Maybe (Ptr (FunPtr C_FontGetGlyphShapeFuncT)) -> IO () forall a. Maybe (Ptr (FunPtr a)) -> IO () maybeReleaseFunPtr Maybe (Ptr (FunPtr C_FontGetGlyphShapeFuncT)) gi'funptrptr -- callback DrawQuadraticToFuncT {- Callable { returnType = Nothing , returnMayBeNull = False , returnTransfer = TransferNothing , returnDocumentation = Documentation { rawDocText = Nothing , sinceVersion = Nothing } , args = [ Arg { argCName = "dfuncs" , argType = TInterface Name { namespace = "HarfBuzz" , name = "draw_funcs_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "draw functions object" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "draw_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "The data accompanying the draw functions in hb_font_draw_glyph()" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "st" , argType = TInterface Name { namespace = "HarfBuzz" , name = "draw_state_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "current draw state" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "control_x" , argType = TBasicType TFloat , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "X component of control point" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "control_y" , argType = TBasicType TFloat , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "Y component of control point" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "to_x" , argType = TBasicType TFloat , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "X component of target point" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "to_y" , argType = TBasicType TFloat , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "Y component of target point" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "user_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "User data pointer passed to hb_draw_funcs_set_quadratic_to_func()" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = 7 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } ] , skipReturn = False , callableThrows = False , callableDeprecated = Nothing , callableDocumentation = Documentation { rawDocText = Just "A virtual method for the #hb_draw_funcs_t to perform a \"quadratic-to\" draw\noperation." , sinceVersion = Just "4.0.0" } , callableResolvable = Nothing } -} -- | Type for the callback on the (unwrapped) C side. type C_DrawQuadraticToFuncT = Ptr HarfBuzz.DrawFuncsT.DrawFuncsT -> Ptr () -> Ptr HarfBuzz.DrawStateT.DrawStateT -> CFloat -> CFloat -> CFloat -> CFloat -> Ptr () -> IO () -- Args: [ Arg -- { argCName = "dfuncs" -- , argType = -- TInterface Name { namespace = "HarfBuzz" , name = "draw_funcs_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "draw functions object" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "draw_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = -- Just -- "The data accompanying the draw functions in hb_font_draw_glyph()" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "st" -- , argType = -- TInterface Name { namespace = "HarfBuzz" , name = "draw_state_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "current draw state" , sinceVersion = Nothing } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "control_x" -- , argType = TBasicType TFloat -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "X component of control point" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "control_y" -- , argType = TBasicType TFloat -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "Y component of control point" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "to_x" -- , argType = TBasicType TFloat -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "X component of target point" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "to_y" -- , argType = TBasicType TFloat -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "Y component of target point" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "user_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = -- Just -- "User data pointer passed to hb_draw_funcs_set_quadratic_to_func()" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = 7 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "dynamic" __dynamic_C_DrawQuadraticToFuncT :: FunPtr C_DrawQuadraticToFuncT -> C_DrawQuadraticToFuncT -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell. dynamic_DrawQuadraticToFuncT :: (B.CallStack.HasCallStack, MonadIO m) => FunPtr C_DrawQuadraticToFuncT -> HarfBuzz.DrawFuncsT.DrawFuncsT -- ^ /@dfuncs@/: draw functions object -> Ptr () -- ^ /@drawData@/: The data accompanying the draw functions in 'GI.HarfBuzz.Functions.fontDrawGlyph' -> HarfBuzz.DrawStateT.DrawStateT -- ^ /@st@/: current draw state -> Float -- ^ /@controlX@/: X component of control point -> Float -- ^ /@controlY@/: Y component of control point -> Float -- ^ /@toX@/: X component of target point -> Float -- ^ /@toY@/: Y component of target point -> Ptr () -- ^ /@userData@/: User data pointer passed to 'GI.HarfBuzz.Functions.drawFuncsSetQuadraticToFunc' -> m () dynamic_DrawQuadraticToFuncT :: forall (m :: * -> *). (HasCallStack, MonadIO m) => FunPtr C_DrawQuadraticToFuncT -> DrawFuncsT -> Ptr () -> DrawStateT -> Float -> Float -> Float -> Float -> Ptr () -> m () dynamic_DrawQuadraticToFuncT FunPtr C_DrawQuadraticToFuncT __funPtr DrawFuncsT dfuncs Ptr () drawData DrawStateT st Float controlX Float controlY Float toX Float toY Ptr () userData = IO () -> m () forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do Ptr DrawFuncsT dfuncs' <- DrawFuncsT -> IO (Ptr DrawFuncsT) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr DrawFuncsT dfuncs Ptr DrawStateT st' <- DrawStateT -> IO (Ptr DrawStateT) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr DrawStateT st let controlX' :: CFloat controlX' = Float -> CFloat forall a b. (Real a, Fractional b) => a -> b realToFrac Float controlX let controlY' :: CFloat controlY' = Float -> CFloat forall a b. (Real a, Fractional b) => a -> b realToFrac Float controlY let toX' :: CFloat toX' = Float -> CFloat forall a b. (Real a, Fractional b) => a -> b realToFrac Float toX let toY' :: CFloat toY' = Float -> CFloat forall a b. (Real a, Fractional b) => a -> b realToFrac Float toY (FunPtr C_DrawQuadraticToFuncT -> C_DrawQuadraticToFuncT __dynamic_C_DrawQuadraticToFuncT FunPtr C_DrawQuadraticToFuncT __funPtr) Ptr DrawFuncsT dfuncs' Ptr () drawData Ptr DrawStateT st' CFloat controlX' CFloat controlY' CFloat toX' CFloat toY' Ptr () userData DrawFuncsT -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr DrawFuncsT dfuncs DrawStateT -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr DrawStateT st () -> IO () forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return () -- | Generate a function pointer callable from C code, from a `C_DrawQuadraticToFuncT`. foreign import ccall "wrapper" mk_DrawQuadraticToFuncT :: C_DrawQuadraticToFuncT -> IO (FunPtr C_DrawQuadraticToFuncT) -- | A virtual method for the t'GI.HarfBuzz.Structs.DrawFuncsT.DrawFuncsT' to perform a \"quadratic-to\" draw -- operation. -- -- /Since: 4.0.0/ type DrawQuadraticToFuncT = HarfBuzz.DrawFuncsT.DrawFuncsT -- ^ /@dfuncs@/: draw functions object -> Ptr () -- ^ /@drawData@/: The data accompanying the draw functions in 'GI.HarfBuzz.Functions.fontDrawGlyph' -> HarfBuzz.DrawStateT.DrawStateT -- ^ /@st@/: current draw state -> Float -- ^ /@controlX@/: X component of control point -> Float -- ^ /@controlY@/: Y component of control point -> Float -- ^ /@toX@/: X component of target point -> Float -- ^ /@toY@/: Y component of target point -> IO () -- | A convenience synonym for @`Nothing` :: `Maybe` `DrawQuadraticToFuncT`@. noDrawQuadraticToFuncT :: Maybe DrawQuadraticToFuncT noDrawQuadraticToFuncT :: Maybe DrawQuadraticToFuncT noDrawQuadraticToFuncT = Maybe DrawQuadraticToFuncT forall a. Maybe a Nothing -- | A virtual method for the t'GI.HarfBuzz.Structs.DrawFuncsT.DrawFuncsT' to perform a \"quadratic-to\" draw -- operation. -- -- /Since: 4.0.0/ type DrawQuadraticToFuncT_WithClosures = HarfBuzz.DrawFuncsT.DrawFuncsT -- ^ /@dfuncs@/: draw functions object -> Ptr () -- ^ /@drawData@/: The data accompanying the draw functions in 'GI.HarfBuzz.Functions.fontDrawGlyph' -> HarfBuzz.DrawStateT.DrawStateT -- ^ /@st@/: current draw state -> Float -- ^ /@controlX@/: X component of control point -> Float -- ^ /@controlY@/: Y component of control point -> Float -- ^ /@toX@/: X component of target point -> Float -- ^ /@toY@/: Y component of target point -> Ptr () -- ^ /@userData@/: User data pointer passed to 'GI.HarfBuzz.Functions.drawFuncsSetQuadraticToFunc' -> IO () -- | A convenience synonym for @`Nothing` :: `Maybe` `DrawQuadraticToFuncT_WithClosures`@. noDrawQuadraticToFuncT_WithClosures :: Maybe DrawQuadraticToFuncT_WithClosures noDrawQuadraticToFuncT_WithClosures :: Maybe DrawQuadraticToFuncT_WithClosures noDrawQuadraticToFuncT_WithClosures = Maybe DrawQuadraticToFuncT_WithClosures forall a. Maybe a Nothing -- | A simple wrapper that ignores the closure arguments. drop_closures_DrawQuadraticToFuncT :: DrawQuadraticToFuncT -> DrawQuadraticToFuncT_WithClosures drop_closures_DrawQuadraticToFuncT :: DrawQuadraticToFuncT -> DrawQuadraticToFuncT_WithClosures drop_closures_DrawQuadraticToFuncT DrawQuadraticToFuncT _f DrawFuncsT dfuncs Ptr () drawData DrawStateT st Float controlX Float controlY Float toX Float toY Ptr () _ = DrawQuadraticToFuncT _f DrawFuncsT dfuncs Ptr () drawData DrawStateT st Float controlX Float controlY Float toX Float toY -- | Wrap the callback into a `GClosure`. genClosure_DrawQuadraticToFuncT :: MonadIO m => DrawQuadraticToFuncT -> m (GClosure C_DrawQuadraticToFuncT) genClosure_DrawQuadraticToFuncT :: forall (m :: * -> *). MonadIO m => DrawQuadraticToFuncT -> m (GClosure C_DrawQuadraticToFuncT) genClosure_DrawQuadraticToFuncT DrawQuadraticToFuncT cb = IO (GClosure C_DrawQuadraticToFuncT) -> m (GClosure C_DrawQuadraticToFuncT) forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (GClosure C_DrawQuadraticToFuncT) -> m (GClosure C_DrawQuadraticToFuncT)) -> IO (GClosure C_DrawQuadraticToFuncT) -> m (GClosure C_DrawQuadraticToFuncT) forall a b. (a -> b) -> a -> b $ do let cb' :: DrawQuadraticToFuncT_WithClosures cb' = DrawQuadraticToFuncT -> DrawQuadraticToFuncT_WithClosures drop_closures_DrawQuadraticToFuncT DrawQuadraticToFuncT cb let cb'' :: C_DrawQuadraticToFuncT cb'' = Maybe (Ptr (FunPtr C_DrawQuadraticToFuncT)) -> DrawQuadraticToFuncT_WithClosures -> C_DrawQuadraticToFuncT wrap_DrawQuadraticToFuncT Maybe (Ptr (FunPtr C_DrawQuadraticToFuncT)) forall a. Maybe a Nothing DrawQuadraticToFuncT_WithClosures cb' C_DrawQuadraticToFuncT -> IO (FunPtr C_DrawQuadraticToFuncT) mk_DrawQuadraticToFuncT C_DrawQuadraticToFuncT cb'' IO (FunPtr C_DrawQuadraticToFuncT) -> (FunPtr C_DrawQuadraticToFuncT -> IO (GClosure C_DrawQuadraticToFuncT)) -> IO (GClosure C_DrawQuadraticToFuncT) forall a b. IO a -> (a -> IO b) -> IO b forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b >>= FunPtr C_DrawQuadraticToFuncT -> IO (GClosure C_DrawQuadraticToFuncT) forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a) B.GClosure.newGClosure -- | Wrap a `DrawQuadraticToFuncT` into a `C_DrawQuadraticToFuncT`. wrap_DrawQuadraticToFuncT :: Maybe (Ptr (FunPtr C_DrawQuadraticToFuncT)) -> DrawQuadraticToFuncT_WithClosures -> C_DrawQuadraticToFuncT wrap_DrawQuadraticToFuncT :: Maybe (Ptr (FunPtr C_DrawQuadraticToFuncT)) -> DrawQuadraticToFuncT_WithClosures -> C_DrawQuadraticToFuncT wrap_DrawQuadraticToFuncT Maybe (Ptr (FunPtr C_DrawQuadraticToFuncT)) gi'funptrptr DrawQuadraticToFuncT_WithClosures gi'cb Ptr DrawFuncsT dfuncs Ptr () drawData Ptr DrawStateT st CFloat controlX CFloat controlY CFloat toX CFloat toY Ptr () userData = do Ptr DrawFuncsT -> (DrawFuncsT -> IO ()) -> IO () forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr DrawFuncsT dfuncs ((DrawFuncsT -> IO ()) -> IO ()) -> (DrawFuncsT -> IO ()) -> IO () forall a b. (a -> b) -> a -> b $ \DrawFuncsT dfuncs' -> do Ptr DrawStateT -> (DrawStateT -> IO ()) -> IO () forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr DrawStateT st ((DrawStateT -> IO ()) -> IO ()) -> (DrawStateT -> IO ()) -> IO () forall a b. (a -> b) -> a -> b $ \DrawStateT st' -> do let controlX' :: Float controlX' = CFloat -> Float forall a b. (Real a, Fractional b) => a -> b realToFrac CFloat controlX let controlY' :: Float controlY' = CFloat -> Float forall a b. (Real a, Fractional b) => a -> b realToFrac CFloat controlY let toX' :: Float toX' = CFloat -> Float forall a b. (Real a, Fractional b) => a -> b realToFrac CFloat toX let toY' :: Float toY' = CFloat -> Float forall a b. (Real a, Fractional b) => a -> b realToFrac CFloat toY DrawQuadraticToFuncT_WithClosures gi'cb DrawFuncsT dfuncs' Ptr () drawData DrawStateT st' Float controlX' Float controlY' Float toX' Float toY' Ptr () userData Maybe (Ptr (FunPtr C_DrawQuadraticToFuncT)) -> IO () forall a. Maybe (Ptr (FunPtr a)) -> IO () maybeReleaseFunPtr Maybe (Ptr (FunPtr C_DrawQuadraticToFuncT)) gi'funptrptr -- callback DrawMoveToFuncT {- Callable { returnType = Nothing , returnMayBeNull = False , returnTransfer = TransferNothing , returnDocumentation = Documentation { rawDocText = Nothing , sinceVersion = Nothing } , args = [ Arg { argCName = "dfuncs" , argType = TInterface Name { namespace = "HarfBuzz" , name = "draw_funcs_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "draw functions object" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "draw_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "The data accompanying the draw functions in hb_font_draw_glyph()" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "st" , argType = TInterface Name { namespace = "HarfBuzz" , name = "draw_state_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "current draw state" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "to_x" , argType = TBasicType TFloat , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "X component of target point" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "to_y" , argType = TBasicType TFloat , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "Y component of target point" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "user_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "User data pointer passed to hb_draw_funcs_set_move_to_func()" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = 5 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } ] , skipReturn = False , callableThrows = False , callableDeprecated = Nothing , callableDocumentation = Documentation { rawDocText = Just "A virtual method for the #hb_draw_funcs_t to perform a \"move-to\" draw\noperation." , sinceVersion = Just "4.0.0" } , callableResolvable = Nothing } -} -- | Type for the callback on the (unwrapped) C side. type C_DrawMoveToFuncT = Ptr HarfBuzz.DrawFuncsT.DrawFuncsT -> Ptr () -> Ptr HarfBuzz.DrawStateT.DrawStateT -> CFloat -> CFloat -> Ptr () -> IO () -- Args: [ Arg -- { argCName = "dfuncs" -- , argType = -- TInterface Name { namespace = "HarfBuzz" , name = "draw_funcs_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "draw functions object" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "draw_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = -- Just -- "The data accompanying the draw functions in hb_font_draw_glyph()" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "st" -- , argType = -- TInterface Name { namespace = "HarfBuzz" , name = "draw_state_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "current draw state" , sinceVersion = Nothing } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "to_x" -- , argType = TBasicType TFloat -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "X component of target point" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "to_y" -- , argType = TBasicType TFloat -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "Y component of target point" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "user_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = -- Just "User data pointer passed to hb_draw_funcs_set_move_to_func()" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = 5 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "dynamic" __dynamic_C_DrawMoveToFuncT :: FunPtr C_DrawMoveToFuncT -> C_DrawMoveToFuncT -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell. dynamic_DrawMoveToFuncT :: (B.CallStack.HasCallStack, MonadIO m) => FunPtr C_DrawMoveToFuncT -> HarfBuzz.DrawFuncsT.DrawFuncsT -- ^ /@dfuncs@/: draw functions object -> Ptr () -- ^ /@drawData@/: The data accompanying the draw functions in 'GI.HarfBuzz.Functions.fontDrawGlyph' -> HarfBuzz.DrawStateT.DrawStateT -- ^ /@st@/: current draw state -> Float -- ^ /@toX@/: X component of target point -> Float -- ^ /@toY@/: Y component of target point -> Ptr () -- ^ /@userData@/: User data pointer passed to 'GI.HarfBuzz.Functions.drawFuncsSetMoveToFunc' -> m () dynamic_DrawMoveToFuncT :: forall (m :: * -> *). (HasCallStack, MonadIO m) => FunPtr C_DrawMoveToFuncT -> DrawFuncsT -> Ptr () -> DrawStateT -> Float -> Float -> Ptr () -> m () dynamic_DrawMoveToFuncT FunPtr C_DrawMoveToFuncT __funPtr DrawFuncsT dfuncs Ptr () drawData DrawStateT st Float toX Float toY Ptr () userData = IO () -> m () forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do Ptr DrawFuncsT dfuncs' <- DrawFuncsT -> IO (Ptr DrawFuncsT) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr DrawFuncsT dfuncs Ptr DrawStateT st' <- DrawStateT -> IO (Ptr DrawStateT) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr DrawStateT st let toX' :: CFloat toX' = Float -> CFloat forall a b. (Real a, Fractional b) => a -> b realToFrac Float toX let toY' :: CFloat toY' = Float -> CFloat forall a b. (Real a, Fractional b) => a -> b realToFrac Float toY (FunPtr C_DrawMoveToFuncT -> C_DrawMoveToFuncT __dynamic_C_DrawMoveToFuncT FunPtr C_DrawMoveToFuncT __funPtr) Ptr DrawFuncsT dfuncs' Ptr () drawData Ptr DrawStateT st' CFloat toX' CFloat toY' Ptr () userData DrawFuncsT -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr DrawFuncsT dfuncs DrawStateT -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr DrawStateT st () -> IO () forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return () -- | Generate a function pointer callable from C code, from a `C_DrawMoveToFuncT`. foreign import ccall "wrapper" mk_DrawMoveToFuncT :: C_DrawMoveToFuncT -> IO (FunPtr C_DrawMoveToFuncT) -- | A virtual method for the t'GI.HarfBuzz.Structs.DrawFuncsT.DrawFuncsT' to perform a \"move-to\" draw -- operation. -- -- /Since: 4.0.0/ type DrawMoveToFuncT = HarfBuzz.DrawFuncsT.DrawFuncsT -- ^ /@dfuncs@/: draw functions object -> Ptr () -- ^ /@drawData@/: The data accompanying the draw functions in 'GI.HarfBuzz.Functions.fontDrawGlyph' -> HarfBuzz.DrawStateT.DrawStateT -- ^ /@st@/: current draw state -> Float -- ^ /@toX@/: X component of target point -> Float -- ^ /@toY@/: Y component of target point -> IO () -- | A convenience synonym for @`Nothing` :: `Maybe` `DrawMoveToFuncT`@. noDrawMoveToFuncT :: Maybe DrawMoveToFuncT noDrawMoveToFuncT :: Maybe DrawMoveToFuncT noDrawMoveToFuncT = Maybe DrawMoveToFuncT forall a. Maybe a Nothing -- | A virtual method for the t'GI.HarfBuzz.Structs.DrawFuncsT.DrawFuncsT' to perform a \"move-to\" draw -- operation. -- -- /Since: 4.0.0/ type DrawMoveToFuncT_WithClosures = HarfBuzz.DrawFuncsT.DrawFuncsT -- ^ /@dfuncs@/: draw functions object -> Ptr () -- ^ /@drawData@/: The data accompanying the draw functions in 'GI.HarfBuzz.Functions.fontDrawGlyph' -> HarfBuzz.DrawStateT.DrawStateT -- ^ /@st@/: current draw state -> Float -- ^ /@toX@/: X component of target point -> Float -- ^ /@toY@/: Y component of target point -> Ptr () -- ^ /@userData@/: User data pointer passed to 'GI.HarfBuzz.Functions.drawFuncsSetMoveToFunc' -> IO () -- | A convenience synonym for @`Nothing` :: `Maybe` `DrawMoveToFuncT_WithClosures`@. noDrawMoveToFuncT_WithClosures :: Maybe DrawMoveToFuncT_WithClosures noDrawMoveToFuncT_WithClosures :: Maybe DrawMoveToFuncT_WithClosures noDrawMoveToFuncT_WithClosures = Maybe DrawMoveToFuncT_WithClosures forall a. Maybe a Nothing -- | A simple wrapper that ignores the closure arguments. drop_closures_DrawMoveToFuncT :: DrawMoveToFuncT -> DrawMoveToFuncT_WithClosures drop_closures_DrawMoveToFuncT :: DrawMoveToFuncT -> DrawMoveToFuncT_WithClosures drop_closures_DrawMoveToFuncT DrawMoveToFuncT _f DrawFuncsT dfuncs Ptr () drawData DrawStateT st Float toX Float toY Ptr () _ = DrawMoveToFuncT _f DrawFuncsT dfuncs Ptr () drawData DrawStateT st Float toX Float toY -- | Wrap the callback into a `GClosure`. genClosure_DrawMoveToFuncT :: MonadIO m => DrawMoveToFuncT -> m (GClosure C_DrawMoveToFuncT) genClosure_DrawMoveToFuncT :: forall (m :: * -> *). MonadIO m => DrawMoveToFuncT -> m (GClosure C_DrawMoveToFuncT) genClosure_DrawMoveToFuncT DrawMoveToFuncT cb = IO (GClosure C_DrawMoveToFuncT) -> m (GClosure C_DrawMoveToFuncT) forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (GClosure C_DrawMoveToFuncT) -> m (GClosure C_DrawMoveToFuncT)) -> IO (GClosure C_DrawMoveToFuncT) -> m (GClosure C_DrawMoveToFuncT) forall a b. (a -> b) -> a -> b $ do let cb' :: DrawMoveToFuncT_WithClosures cb' = DrawMoveToFuncT -> DrawMoveToFuncT_WithClosures drop_closures_DrawMoveToFuncT DrawMoveToFuncT cb let cb'' :: C_DrawMoveToFuncT cb'' = Maybe (Ptr (FunPtr C_DrawMoveToFuncT)) -> DrawMoveToFuncT_WithClosures -> C_DrawMoveToFuncT wrap_DrawMoveToFuncT Maybe (Ptr (FunPtr C_DrawMoveToFuncT)) forall a. Maybe a Nothing DrawMoveToFuncT_WithClosures cb' C_DrawMoveToFuncT -> IO (FunPtr C_DrawMoveToFuncT) mk_DrawMoveToFuncT C_DrawMoveToFuncT cb'' IO (FunPtr C_DrawMoveToFuncT) -> (FunPtr C_DrawMoveToFuncT -> IO (GClosure C_DrawMoveToFuncT)) -> IO (GClosure C_DrawMoveToFuncT) forall a b. IO a -> (a -> IO b) -> IO b forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b >>= FunPtr C_DrawMoveToFuncT -> IO (GClosure C_DrawMoveToFuncT) forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a) B.GClosure.newGClosure -- | Wrap a `DrawMoveToFuncT` into a `C_DrawMoveToFuncT`. wrap_DrawMoveToFuncT :: Maybe (Ptr (FunPtr C_DrawMoveToFuncT)) -> DrawMoveToFuncT_WithClosures -> C_DrawMoveToFuncT wrap_DrawMoveToFuncT :: Maybe (Ptr (FunPtr C_DrawMoveToFuncT)) -> DrawMoveToFuncT_WithClosures -> C_DrawMoveToFuncT wrap_DrawMoveToFuncT Maybe (Ptr (FunPtr C_DrawMoveToFuncT)) gi'funptrptr DrawMoveToFuncT_WithClosures gi'cb Ptr DrawFuncsT dfuncs Ptr () drawData Ptr DrawStateT st CFloat toX CFloat toY Ptr () userData = do Ptr DrawFuncsT -> (DrawFuncsT -> IO ()) -> IO () forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr DrawFuncsT dfuncs ((DrawFuncsT -> IO ()) -> IO ()) -> (DrawFuncsT -> IO ()) -> IO () forall a b. (a -> b) -> a -> b $ \DrawFuncsT dfuncs' -> do Ptr DrawStateT -> (DrawStateT -> IO ()) -> IO () forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr DrawStateT st ((DrawStateT -> IO ()) -> IO ()) -> (DrawStateT -> IO ()) -> IO () forall a b. (a -> b) -> a -> b $ \DrawStateT st' -> do let toX' :: Float toX' = CFloat -> Float forall a b. (Real a, Fractional b) => a -> b realToFrac CFloat toX let toY' :: Float toY' = CFloat -> Float forall a b. (Real a, Fractional b) => a -> b realToFrac CFloat toY DrawMoveToFuncT_WithClosures gi'cb DrawFuncsT dfuncs' Ptr () drawData DrawStateT st' Float toX' Float toY' Ptr () userData Maybe (Ptr (FunPtr C_DrawMoveToFuncT)) -> IO () forall a. Maybe (Ptr (FunPtr a)) -> IO () maybeReleaseFunPtr Maybe (Ptr (FunPtr C_DrawMoveToFuncT)) gi'funptrptr -- callback DrawLineToFuncT {- Callable { returnType = Nothing , returnMayBeNull = False , returnTransfer = TransferNothing , returnDocumentation = Documentation { rawDocText = Nothing , sinceVersion = Nothing } , args = [ Arg { argCName = "dfuncs" , argType = TInterface Name { namespace = "HarfBuzz" , name = "draw_funcs_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "draw functions object" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "draw_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "The data accompanying the draw functions in hb_font_draw_glyph()" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "st" , argType = TInterface Name { namespace = "HarfBuzz" , name = "draw_state_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "current draw state" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "to_x" , argType = TBasicType TFloat , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "X component of target point" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "to_y" , argType = TBasicType TFloat , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "Y component of target point" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "user_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "User data pointer passed to hb_draw_funcs_set_line_to_func()" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = 5 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } ] , skipReturn = False , callableThrows = False , callableDeprecated = Nothing , callableDocumentation = Documentation { rawDocText = Just "A virtual method for the #hb_draw_funcs_t to perform a \"line-to\" draw\noperation." , sinceVersion = Just "4.0.0" } , callableResolvable = Nothing } -} -- | Type for the callback on the (unwrapped) C side. type C_DrawLineToFuncT = Ptr HarfBuzz.DrawFuncsT.DrawFuncsT -> Ptr () -> Ptr HarfBuzz.DrawStateT.DrawStateT -> CFloat -> CFloat -> Ptr () -> IO () -- Args: [ Arg -- { argCName = "dfuncs" -- , argType = -- TInterface Name { namespace = "HarfBuzz" , name = "draw_funcs_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "draw functions object" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "draw_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = -- Just -- "The data accompanying the draw functions in hb_font_draw_glyph()" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "st" -- , argType = -- TInterface Name { namespace = "HarfBuzz" , name = "draw_state_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "current draw state" , sinceVersion = Nothing } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "to_x" -- , argType = TBasicType TFloat -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "X component of target point" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "to_y" -- , argType = TBasicType TFloat -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "Y component of target point" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "user_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = -- Just "User data pointer passed to hb_draw_funcs_set_line_to_func()" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = 5 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "dynamic" __dynamic_C_DrawLineToFuncT :: FunPtr C_DrawLineToFuncT -> C_DrawLineToFuncT -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell. dynamic_DrawLineToFuncT :: (B.CallStack.HasCallStack, MonadIO m) => FunPtr C_DrawLineToFuncT -> HarfBuzz.DrawFuncsT.DrawFuncsT -- ^ /@dfuncs@/: draw functions object -> Ptr () -- ^ /@drawData@/: The data accompanying the draw functions in 'GI.HarfBuzz.Functions.fontDrawGlyph' -> HarfBuzz.DrawStateT.DrawStateT -- ^ /@st@/: current draw state -> Float -- ^ /@toX@/: X component of target point -> Float -- ^ /@toY@/: Y component of target point -> Ptr () -- ^ /@userData@/: User data pointer passed to 'GI.HarfBuzz.Functions.drawFuncsSetLineToFunc' -> m () dynamic_DrawLineToFuncT :: forall (m :: * -> *). (HasCallStack, MonadIO m) => FunPtr C_DrawMoveToFuncT -> DrawFuncsT -> Ptr () -> DrawStateT -> Float -> Float -> Ptr () -> m () dynamic_DrawLineToFuncT FunPtr C_DrawMoveToFuncT __funPtr DrawFuncsT dfuncs Ptr () drawData DrawStateT st Float toX Float toY Ptr () userData = IO () -> m () forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do Ptr DrawFuncsT dfuncs' <- DrawFuncsT -> IO (Ptr DrawFuncsT) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr DrawFuncsT dfuncs Ptr DrawStateT st' <- DrawStateT -> IO (Ptr DrawStateT) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr DrawStateT st let toX' :: CFloat toX' = Float -> CFloat forall a b. (Real a, Fractional b) => a -> b realToFrac Float toX let toY' :: CFloat toY' = Float -> CFloat forall a b. (Real a, Fractional b) => a -> b realToFrac Float toY (FunPtr C_DrawMoveToFuncT -> C_DrawMoveToFuncT __dynamic_C_DrawLineToFuncT FunPtr C_DrawMoveToFuncT __funPtr) Ptr DrawFuncsT dfuncs' Ptr () drawData Ptr DrawStateT st' CFloat toX' CFloat toY' Ptr () userData DrawFuncsT -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr DrawFuncsT dfuncs DrawStateT -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr DrawStateT st () -> IO () forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return () -- | Generate a function pointer callable from C code, from a `C_DrawLineToFuncT`. foreign import ccall "wrapper" mk_DrawLineToFuncT :: C_DrawLineToFuncT -> IO (FunPtr C_DrawLineToFuncT) -- | A virtual method for the t'GI.HarfBuzz.Structs.DrawFuncsT.DrawFuncsT' to perform a \"line-to\" draw -- operation. -- -- /Since: 4.0.0/ type DrawLineToFuncT = HarfBuzz.DrawFuncsT.DrawFuncsT -- ^ /@dfuncs@/: draw functions object -> Ptr () -- ^ /@drawData@/: The data accompanying the draw functions in 'GI.HarfBuzz.Functions.fontDrawGlyph' -> HarfBuzz.DrawStateT.DrawStateT -- ^ /@st@/: current draw state -> Float -- ^ /@toX@/: X component of target point -> Float -- ^ /@toY@/: Y component of target point -> IO () -- | A convenience synonym for @`Nothing` :: `Maybe` `DrawLineToFuncT`@. noDrawLineToFuncT :: Maybe DrawLineToFuncT noDrawLineToFuncT :: Maybe DrawMoveToFuncT noDrawLineToFuncT = Maybe DrawMoveToFuncT forall a. Maybe a Nothing -- | A virtual method for the t'GI.HarfBuzz.Structs.DrawFuncsT.DrawFuncsT' to perform a \"line-to\" draw -- operation. -- -- /Since: 4.0.0/ type DrawLineToFuncT_WithClosures = HarfBuzz.DrawFuncsT.DrawFuncsT -- ^ /@dfuncs@/: draw functions object -> Ptr () -- ^ /@drawData@/: The data accompanying the draw functions in 'GI.HarfBuzz.Functions.fontDrawGlyph' -> HarfBuzz.DrawStateT.DrawStateT -- ^ /@st@/: current draw state -> Float -- ^ /@toX@/: X component of target point -> Float -- ^ /@toY@/: Y component of target point -> Ptr () -- ^ /@userData@/: User data pointer passed to 'GI.HarfBuzz.Functions.drawFuncsSetLineToFunc' -> IO () -- | A convenience synonym for @`Nothing` :: `Maybe` `DrawLineToFuncT_WithClosures`@. noDrawLineToFuncT_WithClosures :: Maybe DrawLineToFuncT_WithClosures noDrawLineToFuncT_WithClosures :: Maybe DrawMoveToFuncT_WithClosures noDrawLineToFuncT_WithClosures = Maybe DrawMoveToFuncT_WithClosures forall a. Maybe a Nothing -- | A simple wrapper that ignores the closure arguments. drop_closures_DrawLineToFuncT :: DrawLineToFuncT -> DrawLineToFuncT_WithClosures drop_closures_DrawLineToFuncT :: DrawMoveToFuncT -> DrawMoveToFuncT_WithClosures drop_closures_DrawLineToFuncT DrawMoveToFuncT _f DrawFuncsT dfuncs Ptr () drawData DrawStateT st Float toX Float toY Ptr () _ = DrawMoveToFuncT _f DrawFuncsT dfuncs Ptr () drawData DrawStateT st Float toX Float toY -- | Wrap the callback into a `GClosure`. genClosure_DrawLineToFuncT :: MonadIO m => DrawLineToFuncT -> m (GClosure C_DrawLineToFuncT) genClosure_DrawLineToFuncT :: forall (m :: * -> *). MonadIO m => DrawMoveToFuncT -> m (GClosure C_DrawMoveToFuncT) genClosure_DrawLineToFuncT DrawMoveToFuncT cb = IO (GClosure C_DrawMoveToFuncT) -> m (GClosure C_DrawMoveToFuncT) forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (GClosure C_DrawMoveToFuncT) -> m (GClosure C_DrawMoveToFuncT)) -> IO (GClosure C_DrawMoveToFuncT) -> m (GClosure C_DrawMoveToFuncT) forall a b. (a -> b) -> a -> b $ do let cb' :: DrawMoveToFuncT_WithClosures cb' = DrawMoveToFuncT -> DrawMoveToFuncT_WithClosures drop_closures_DrawLineToFuncT DrawMoveToFuncT cb let cb'' :: C_DrawMoveToFuncT cb'' = Maybe (Ptr (FunPtr C_DrawMoveToFuncT)) -> DrawMoveToFuncT_WithClosures -> C_DrawMoveToFuncT wrap_DrawLineToFuncT Maybe (Ptr (FunPtr C_DrawMoveToFuncT)) forall a. Maybe a Nothing DrawMoveToFuncT_WithClosures cb' C_DrawMoveToFuncT -> IO (FunPtr C_DrawMoveToFuncT) mk_DrawLineToFuncT C_DrawMoveToFuncT cb'' IO (FunPtr C_DrawMoveToFuncT) -> (FunPtr C_DrawMoveToFuncT -> IO (GClosure C_DrawMoveToFuncT)) -> IO (GClosure C_DrawMoveToFuncT) forall a b. IO a -> (a -> IO b) -> IO b forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b >>= FunPtr C_DrawMoveToFuncT -> IO (GClosure C_DrawMoveToFuncT) forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a) B.GClosure.newGClosure -- | Wrap a `DrawLineToFuncT` into a `C_DrawLineToFuncT`. wrap_DrawLineToFuncT :: Maybe (Ptr (FunPtr C_DrawLineToFuncT)) -> DrawLineToFuncT_WithClosures -> C_DrawLineToFuncT wrap_DrawLineToFuncT :: Maybe (Ptr (FunPtr C_DrawMoveToFuncT)) -> DrawMoveToFuncT_WithClosures -> C_DrawMoveToFuncT wrap_DrawLineToFuncT Maybe (Ptr (FunPtr C_DrawMoveToFuncT)) gi'funptrptr DrawMoveToFuncT_WithClosures gi'cb Ptr DrawFuncsT dfuncs Ptr () drawData Ptr DrawStateT st CFloat toX CFloat toY Ptr () userData = do Ptr DrawFuncsT -> (DrawFuncsT -> IO ()) -> IO () forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr DrawFuncsT dfuncs ((DrawFuncsT -> IO ()) -> IO ()) -> (DrawFuncsT -> IO ()) -> IO () forall a b. (a -> b) -> a -> b $ \DrawFuncsT dfuncs' -> do Ptr DrawStateT -> (DrawStateT -> IO ()) -> IO () forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr DrawStateT st ((DrawStateT -> IO ()) -> IO ()) -> (DrawStateT -> IO ()) -> IO () forall a b. (a -> b) -> a -> b $ \DrawStateT st' -> do let toX' :: Float toX' = CFloat -> Float forall a b. (Real a, Fractional b) => a -> b realToFrac CFloat toX let toY' :: Float toY' = CFloat -> Float forall a b. (Real a, Fractional b) => a -> b realToFrac CFloat toY DrawMoveToFuncT_WithClosures gi'cb DrawFuncsT dfuncs' Ptr () drawData DrawStateT st' Float toX' Float toY' Ptr () userData Maybe (Ptr (FunPtr C_DrawMoveToFuncT)) -> IO () forall a. Maybe (Ptr (FunPtr a)) -> IO () maybeReleaseFunPtr Maybe (Ptr (FunPtr C_DrawMoveToFuncT)) gi'funptrptr -- callback DrawCubicToFuncT {- Callable { returnType = Nothing , returnMayBeNull = False , returnTransfer = TransferNothing , returnDocumentation = Documentation { rawDocText = Nothing , sinceVersion = Nothing } , args = [ Arg { argCName = "dfuncs" , argType = TInterface Name { namespace = "HarfBuzz" , name = "draw_funcs_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "draw functions object" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "draw_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "The data accompanying the draw functions in hb_font_draw_glyph()" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "st" , argType = TInterface Name { namespace = "HarfBuzz" , name = "draw_state_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "current draw state" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "control1_x" , argType = TBasicType TFloat , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "X component of first control point" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "control1_y" , argType = TBasicType TFloat , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "Y component of first control point" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "control2_x" , argType = TBasicType TFloat , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "X component of second control point" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "control2_y" , argType = TBasicType TFloat , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "Y component of second control point" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "to_x" , argType = TBasicType TFloat , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "X component of target point" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "to_y" , argType = TBasicType TFloat , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "Y component of target point" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "user_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "User data pointer passed to hb_draw_funcs_set_cubic_to_func()" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = 9 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } ] , skipReturn = False , callableThrows = False , callableDeprecated = Nothing , callableDocumentation = Documentation { rawDocText = Just "A virtual method for the #hb_draw_funcs_t to perform a \"cubic-to\" draw\noperation." , sinceVersion = Just "4.0.0" } , callableResolvable = Nothing } -} -- | Type for the callback on the (unwrapped) C side. type C_DrawCubicToFuncT = Ptr HarfBuzz.DrawFuncsT.DrawFuncsT -> Ptr () -> Ptr HarfBuzz.DrawStateT.DrawStateT -> CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> Ptr () -> IO () -- Args: [ Arg -- { argCName = "dfuncs" -- , argType = -- TInterface Name { namespace = "HarfBuzz" , name = "draw_funcs_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "draw functions object" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "draw_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = -- Just -- "The data accompanying the draw functions in hb_font_draw_glyph()" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "st" -- , argType = -- TInterface Name { namespace = "HarfBuzz" , name = "draw_state_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "current draw state" , sinceVersion = Nothing } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "control1_x" -- , argType = TBasicType TFloat -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "X component of first control point" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "control1_y" -- , argType = TBasicType TFloat -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "Y component of first control point" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "control2_x" -- , argType = TBasicType TFloat -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "X component of second control point" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "control2_y" -- , argType = TBasicType TFloat -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "Y component of second control point" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "to_x" -- , argType = TBasicType TFloat -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "X component of target point" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "to_y" -- , argType = TBasicType TFloat -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "Y component of target point" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "user_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = -- Just -- "User data pointer passed to hb_draw_funcs_set_cubic_to_func()" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = 9 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "dynamic" __dynamic_C_DrawCubicToFuncT :: FunPtr C_DrawCubicToFuncT -> C_DrawCubicToFuncT -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell. dynamic_DrawCubicToFuncT :: (B.CallStack.HasCallStack, MonadIO m) => FunPtr C_DrawCubicToFuncT -> HarfBuzz.DrawFuncsT.DrawFuncsT -- ^ /@dfuncs@/: draw functions object -> Ptr () -- ^ /@drawData@/: The data accompanying the draw functions in 'GI.HarfBuzz.Functions.fontDrawGlyph' -> HarfBuzz.DrawStateT.DrawStateT -- ^ /@st@/: current draw state -> Float -- ^ /@control1X@/: X component of first control point -> Float -- ^ /@control1Y@/: Y component of first control point -> Float -- ^ /@control2X@/: X component of second control point -> Float -- ^ /@control2Y@/: Y component of second control point -> Float -- ^ /@toX@/: X component of target point -> Float -- ^ /@toY@/: Y component of target point -> Ptr () -- ^ /@userData@/: User data pointer passed to 'GI.HarfBuzz.Functions.drawFuncsSetCubicToFunc' -> m () dynamic_DrawCubicToFuncT :: forall (m :: * -> *). (HasCallStack, MonadIO m) => FunPtr C_DrawCubicToFuncT -> DrawFuncsT -> Ptr () -> DrawStateT -> Float -> Float -> Float -> Float -> Float -> Float -> Ptr () -> m () dynamic_DrawCubicToFuncT FunPtr C_DrawCubicToFuncT __funPtr DrawFuncsT dfuncs Ptr () drawData DrawStateT st Float control1X Float control1Y Float control2X Float control2Y Float toX Float toY Ptr () userData = IO () -> m () forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do Ptr DrawFuncsT dfuncs' <- DrawFuncsT -> IO (Ptr DrawFuncsT) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr DrawFuncsT dfuncs Ptr DrawStateT st' <- DrawStateT -> IO (Ptr DrawStateT) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr DrawStateT st let control1X' :: CFloat control1X' = Float -> CFloat forall a b. (Real a, Fractional b) => a -> b realToFrac Float control1X let control1Y' :: CFloat control1Y' = Float -> CFloat forall a b. (Real a, Fractional b) => a -> b realToFrac Float control1Y let control2X' :: CFloat control2X' = Float -> CFloat forall a b. (Real a, Fractional b) => a -> b realToFrac Float control2X let control2Y' :: CFloat control2Y' = Float -> CFloat forall a b. (Real a, Fractional b) => a -> b realToFrac Float control2Y let toX' :: CFloat toX' = Float -> CFloat forall a b. (Real a, Fractional b) => a -> b realToFrac Float toX let toY' :: CFloat toY' = Float -> CFloat forall a b. (Real a, Fractional b) => a -> b realToFrac Float toY (FunPtr C_DrawCubicToFuncT -> C_DrawCubicToFuncT __dynamic_C_DrawCubicToFuncT FunPtr C_DrawCubicToFuncT __funPtr) Ptr DrawFuncsT dfuncs' Ptr () drawData Ptr DrawStateT st' CFloat control1X' CFloat control1Y' CFloat control2X' CFloat control2Y' CFloat toX' CFloat toY' Ptr () userData DrawFuncsT -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr DrawFuncsT dfuncs DrawStateT -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr DrawStateT st () -> IO () forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return () -- | Generate a function pointer callable from C code, from a `C_DrawCubicToFuncT`. foreign import ccall "wrapper" mk_DrawCubicToFuncT :: C_DrawCubicToFuncT -> IO (FunPtr C_DrawCubicToFuncT) -- | A virtual method for the t'GI.HarfBuzz.Structs.DrawFuncsT.DrawFuncsT' to perform a \"cubic-to\" draw -- operation. -- -- /Since: 4.0.0/ type DrawCubicToFuncT = HarfBuzz.DrawFuncsT.DrawFuncsT -- ^ /@dfuncs@/: draw functions object -> Ptr () -- ^ /@drawData@/: The data accompanying the draw functions in 'GI.HarfBuzz.Functions.fontDrawGlyph' -> HarfBuzz.DrawStateT.DrawStateT -- ^ /@st@/: current draw state -> Float -- ^ /@control1X@/: X component of first control point -> Float -- ^ /@control1Y@/: Y component of first control point -> Float -- ^ /@control2X@/: X component of second control point -> Float -- ^ /@control2Y@/: Y component of second control point -> Float -- ^ /@toX@/: X component of target point -> Float -- ^ /@toY@/: Y component of target point -> IO () -- | A convenience synonym for @`Nothing` :: `Maybe` `DrawCubicToFuncT`@. noDrawCubicToFuncT :: Maybe DrawCubicToFuncT noDrawCubicToFuncT :: Maybe DrawCubicToFuncT noDrawCubicToFuncT = Maybe DrawCubicToFuncT forall a. Maybe a Nothing -- | A virtual method for the t'GI.HarfBuzz.Structs.DrawFuncsT.DrawFuncsT' to perform a \"cubic-to\" draw -- operation. -- -- /Since: 4.0.0/ type DrawCubicToFuncT_WithClosures = HarfBuzz.DrawFuncsT.DrawFuncsT -- ^ /@dfuncs@/: draw functions object -> Ptr () -- ^ /@drawData@/: The data accompanying the draw functions in 'GI.HarfBuzz.Functions.fontDrawGlyph' -> HarfBuzz.DrawStateT.DrawStateT -- ^ /@st@/: current draw state -> Float -- ^ /@control1X@/: X component of first control point -> Float -- ^ /@control1Y@/: Y component of first control point -> Float -- ^ /@control2X@/: X component of second control point -> Float -- ^ /@control2Y@/: Y component of second control point -> Float -- ^ /@toX@/: X component of target point -> Float -- ^ /@toY@/: Y component of target point -> Ptr () -- ^ /@userData@/: User data pointer passed to 'GI.HarfBuzz.Functions.drawFuncsSetCubicToFunc' -> IO () -- | A convenience synonym for @`Nothing` :: `Maybe` `DrawCubicToFuncT_WithClosures`@. noDrawCubicToFuncT_WithClosures :: Maybe DrawCubicToFuncT_WithClosures noDrawCubicToFuncT_WithClosures :: Maybe DrawCubicToFuncT_WithClosures noDrawCubicToFuncT_WithClosures = Maybe DrawCubicToFuncT_WithClosures forall a. Maybe a Nothing -- | A simple wrapper that ignores the closure arguments. drop_closures_DrawCubicToFuncT :: DrawCubicToFuncT -> DrawCubicToFuncT_WithClosures drop_closures_DrawCubicToFuncT :: DrawCubicToFuncT -> DrawCubicToFuncT_WithClosures drop_closures_DrawCubicToFuncT DrawCubicToFuncT _f DrawFuncsT dfuncs Ptr () drawData DrawStateT st Float control1X Float control1Y Float control2X Float control2Y Float toX Float toY Ptr () _ = DrawCubicToFuncT _f DrawFuncsT dfuncs Ptr () drawData DrawStateT st Float control1X Float control1Y Float control2X Float control2Y Float toX Float toY -- | Wrap the callback into a `GClosure`. genClosure_DrawCubicToFuncT :: MonadIO m => DrawCubicToFuncT -> m (GClosure C_DrawCubicToFuncT) genClosure_DrawCubicToFuncT :: forall (m :: * -> *). MonadIO m => DrawCubicToFuncT -> m (GClosure C_DrawCubicToFuncT) genClosure_DrawCubicToFuncT DrawCubicToFuncT cb = IO (GClosure C_DrawCubicToFuncT) -> m (GClosure C_DrawCubicToFuncT) forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (GClosure C_DrawCubicToFuncT) -> m (GClosure C_DrawCubicToFuncT)) -> IO (GClosure C_DrawCubicToFuncT) -> m (GClosure C_DrawCubicToFuncT) forall a b. (a -> b) -> a -> b $ do let cb' :: DrawCubicToFuncT_WithClosures cb' = DrawCubicToFuncT -> DrawCubicToFuncT_WithClosures drop_closures_DrawCubicToFuncT DrawCubicToFuncT cb let cb'' :: C_DrawCubicToFuncT cb'' = Maybe (Ptr (FunPtr C_DrawCubicToFuncT)) -> DrawCubicToFuncT_WithClosures -> C_DrawCubicToFuncT wrap_DrawCubicToFuncT Maybe (Ptr (FunPtr C_DrawCubicToFuncT)) forall a. Maybe a Nothing DrawCubicToFuncT_WithClosures cb' C_DrawCubicToFuncT -> IO (FunPtr C_DrawCubicToFuncT) mk_DrawCubicToFuncT C_DrawCubicToFuncT cb'' IO (FunPtr C_DrawCubicToFuncT) -> (FunPtr C_DrawCubicToFuncT -> IO (GClosure C_DrawCubicToFuncT)) -> IO (GClosure C_DrawCubicToFuncT) forall a b. IO a -> (a -> IO b) -> IO b forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b >>= FunPtr C_DrawCubicToFuncT -> IO (GClosure C_DrawCubicToFuncT) forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a) B.GClosure.newGClosure -- | Wrap a `DrawCubicToFuncT` into a `C_DrawCubicToFuncT`. wrap_DrawCubicToFuncT :: Maybe (Ptr (FunPtr C_DrawCubicToFuncT)) -> DrawCubicToFuncT_WithClosures -> C_DrawCubicToFuncT wrap_DrawCubicToFuncT :: Maybe (Ptr (FunPtr C_DrawCubicToFuncT)) -> DrawCubicToFuncT_WithClosures -> C_DrawCubicToFuncT wrap_DrawCubicToFuncT Maybe (Ptr (FunPtr C_DrawCubicToFuncT)) gi'funptrptr DrawCubicToFuncT_WithClosures gi'cb Ptr DrawFuncsT dfuncs Ptr () drawData Ptr DrawStateT st CFloat control1X CFloat control1Y CFloat control2X CFloat control2Y CFloat toX CFloat toY Ptr () userData = do Ptr DrawFuncsT -> (DrawFuncsT -> IO ()) -> IO () forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr DrawFuncsT dfuncs ((DrawFuncsT -> IO ()) -> IO ()) -> (DrawFuncsT -> IO ()) -> IO () forall a b. (a -> b) -> a -> b $ \DrawFuncsT dfuncs' -> do Ptr DrawStateT -> (DrawStateT -> IO ()) -> IO () forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr DrawStateT st ((DrawStateT -> IO ()) -> IO ()) -> (DrawStateT -> IO ()) -> IO () forall a b. (a -> b) -> a -> b $ \DrawStateT st' -> do let control1X' :: Float control1X' = CFloat -> Float forall a b. (Real a, Fractional b) => a -> b realToFrac CFloat control1X let control1Y' :: Float control1Y' = CFloat -> Float forall a b. (Real a, Fractional b) => a -> b realToFrac CFloat control1Y let control2X' :: Float control2X' = CFloat -> Float forall a b. (Real a, Fractional b) => a -> b realToFrac CFloat control2X let control2Y' :: Float control2Y' = CFloat -> Float forall a b. (Real a, Fractional b) => a -> b realToFrac CFloat control2Y let toX' :: Float toX' = CFloat -> Float forall a b. (Real a, Fractional b) => a -> b realToFrac CFloat toX let toY' :: Float toY' = CFloat -> Float forall a b. (Real a, Fractional b) => a -> b realToFrac CFloat toY DrawCubicToFuncT_WithClosures gi'cb DrawFuncsT dfuncs' Ptr () drawData DrawStateT st' Float control1X' Float control1Y' Float control2X' Float control2Y' Float toX' Float toY' Ptr () userData Maybe (Ptr (FunPtr C_DrawCubicToFuncT)) -> IO () forall a. Maybe (Ptr (FunPtr a)) -> IO () maybeReleaseFunPtr Maybe (Ptr (FunPtr C_DrawCubicToFuncT)) gi'funptrptr -- callback DrawClosePathFuncT {- Callable { returnType = Nothing , returnMayBeNull = False , returnTransfer = TransferNothing , returnDocumentation = Documentation { rawDocText = Nothing , sinceVersion = Nothing } , args = [ Arg { argCName = "dfuncs" , argType = TInterface Name { namespace = "HarfBuzz" , name = "draw_funcs_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "draw functions object" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "draw_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "The data accompanying the draw functions in hb_font_draw_glyph()" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "st" , argType = TInterface Name { namespace = "HarfBuzz" , name = "draw_state_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "current draw state" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "user_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "User data pointer passed to hb_draw_funcs_set_close_path_func()" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = 3 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } ] , skipReturn = False , callableThrows = False , callableDeprecated = Nothing , callableDocumentation = Documentation { rawDocText = Just "A virtual method for the #hb_draw_funcs_t to perform a \"close-path\" draw\noperation." , sinceVersion = Just "4.0.0" } , callableResolvable = Nothing } -} -- | Type for the callback on the (unwrapped) C side. type C_DrawClosePathFuncT = Ptr HarfBuzz.DrawFuncsT.DrawFuncsT -> Ptr () -> Ptr HarfBuzz.DrawStateT.DrawStateT -> Ptr () -> IO () -- Args: [ Arg -- { argCName = "dfuncs" -- , argType = -- TInterface Name { namespace = "HarfBuzz" , name = "draw_funcs_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "draw functions object" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "draw_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = -- Just -- "The data accompanying the draw functions in hb_font_draw_glyph()" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "st" -- , argType = -- TInterface Name { namespace = "HarfBuzz" , name = "draw_state_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "current draw state" , sinceVersion = Nothing } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "user_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = -- Just -- "User data pointer passed to hb_draw_funcs_set_close_path_func()" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = 3 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "dynamic" __dynamic_C_DrawClosePathFuncT :: FunPtr C_DrawClosePathFuncT -> C_DrawClosePathFuncT -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell. dynamic_DrawClosePathFuncT :: (B.CallStack.HasCallStack, MonadIO m) => FunPtr C_DrawClosePathFuncT -> HarfBuzz.DrawFuncsT.DrawFuncsT -- ^ /@dfuncs@/: draw functions object -> Ptr () -- ^ /@drawData@/: The data accompanying the draw functions in 'GI.HarfBuzz.Functions.fontDrawGlyph' -> HarfBuzz.DrawStateT.DrawStateT -- ^ /@st@/: current draw state -> Ptr () -- ^ /@userData@/: User data pointer passed to 'GI.HarfBuzz.Functions.drawFuncsSetClosePathFunc' -> m () dynamic_DrawClosePathFuncT :: forall (m :: * -> *). (HasCallStack, MonadIO m) => FunPtr C_DrawClosePathFuncT -> DrawFuncsT -> Ptr () -> DrawStateT -> Ptr () -> m () dynamic_DrawClosePathFuncT FunPtr C_DrawClosePathFuncT __funPtr DrawFuncsT dfuncs Ptr () drawData DrawStateT st Ptr () userData = IO () -> m () forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do Ptr DrawFuncsT dfuncs' <- DrawFuncsT -> IO (Ptr DrawFuncsT) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr DrawFuncsT dfuncs Ptr DrawStateT st' <- DrawStateT -> IO (Ptr DrawStateT) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr DrawStateT st (FunPtr C_DrawClosePathFuncT -> C_DrawClosePathFuncT __dynamic_C_DrawClosePathFuncT FunPtr C_DrawClosePathFuncT __funPtr) Ptr DrawFuncsT dfuncs' Ptr () drawData Ptr DrawStateT st' Ptr () userData DrawFuncsT -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr DrawFuncsT dfuncs DrawStateT -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr DrawStateT st () -> IO () forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return () -- | Generate a function pointer callable from C code, from a `C_DrawClosePathFuncT`. foreign import ccall "wrapper" mk_DrawClosePathFuncT :: C_DrawClosePathFuncT -> IO (FunPtr C_DrawClosePathFuncT) -- | A virtual method for the t'GI.HarfBuzz.Structs.DrawFuncsT.DrawFuncsT' to perform a \"close-path\" draw -- operation. -- -- /Since: 4.0.0/ type DrawClosePathFuncT = HarfBuzz.DrawFuncsT.DrawFuncsT -- ^ /@dfuncs@/: draw functions object -> Ptr () -- ^ /@drawData@/: The data accompanying the draw functions in 'GI.HarfBuzz.Functions.fontDrawGlyph' -> HarfBuzz.DrawStateT.DrawStateT -- ^ /@st@/: current draw state -> IO () -- | A convenience synonym for @`Nothing` :: `Maybe` `DrawClosePathFuncT`@. noDrawClosePathFuncT :: Maybe DrawClosePathFuncT noDrawClosePathFuncT :: Maybe DrawClosePathFuncT noDrawClosePathFuncT = Maybe DrawClosePathFuncT forall a. Maybe a Nothing -- | A virtual method for the t'GI.HarfBuzz.Structs.DrawFuncsT.DrawFuncsT' to perform a \"close-path\" draw -- operation. -- -- /Since: 4.0.0/ type DrawClosePathFuncT_WithClosures = HarfBuzz.DrawFuncsT.DrawFuncsT -- ^ /@dfuncs@/: draw functions object -> Ptr () -- ^ /@drawData@/: The data accompanying the draw functions in 'GI.HarfBuzz.Functions.fontDrawGlyph' -> HarfBuzz.DrawStateT.DrawStateT -- ^ /@st@/: current draw state -> Ptr () -- ^ /@userData@/: User data pointer passed to 'GI.HarfBuzz.Functions.drawFuncsSetClosePathFunc' -> IO () -- | A convenience synonym for @`Nothing` :: `Maybe` `DrawClosePathFuncT_WithClosures`@. noDrawClosePathFuncT_WithClosures :: Maybe DrawClosePathFuncT_WithClosures noDrawClosePathFuncT_WithClosures :: Maybe DrawClosePathFuncT_WithClosures noDrawClosePathFuncT_WithClosures = Maybe DrawClosePathFuncT_WithClosures forall a. Maybe a Nothing -- | A simple wrapper that ignores the closure arguments. drop_closures_DrawClosePathFuncT :: DrawClosePathFuncT -> DrawClosePathFuncT_WithClosures drop_closures_DrawClosePathFuncT :: DrawClosePathFuncT -> DrawClosePathFuncT_WithClosures drop_closures_DrawClosePathFuncT DrawClosePathFuncT _f DrawFuncsT dfuncs Ptr () drawData DrawStateT st Ptr () _ = DrawClosePathFuncT _f DrawFuncsT dfuncs Ptr () drawData DrawStateT st -- | Wrap the callback into a `GClosure`. genClosure_DrawClosePathFuncT :: MonadIO m => DrawClosePathFuncT -> m (GClosure C_DrawClosePathFuncT) genClosure_DrawClosePathFuncT :: forall (m :: * -> *). MonadIO m => DrawClosePathFuncT -> m (GClosure C_DrawClosePathFuncT) genClosure_DrawClosePathFuncT DrawClosePathFuncT cb = IO (GClosure C_DrawClosePathFuncT) -> m (GClosure C_DrawClosePathFuncT) forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (GClosure C_DrawClosePathFuncT) -> m (GClosure C_DrawClosePathFuncT)) -> IO (GClosure C_DrawClosePathFuncT) -> m (GClosure C_DrawClosePathFuncT) forall a b. (a -> b) -> a -> b $ do let cb' :: DrawClosePathFuncT_WithClosures cb' = DrawClosePathFuncT -> DrawClosePathFuncT_WithClosures drop_closures_DrawClosePathFuncT DrawClosePathFuncT cb let cb'' :: C_DrawClosePathFuncT cb'' = Maybe (Ptr (FunPtr C_DrawClosePathFuncT)) -> DrawClosePathFuncT_WithClosures -> C_DrawClosePathFuncT wrap_DrawClosePathFuncT Maybe (Ptr (FunPtr C_DrawClosePathFuncT)) forall a. Maybe a Nothing DrawClosePathFuncT_WithClosures cb' C_DrawClosePathFuncT -> IO (FunPtr C_DrawClosePathFuncT) mk_DrawClosePathFuncT C_DrawClosePathFuncT cb'' IO (FunPtr C_DrawClosePathFuncT) -> (FunPtr C_DrawClosePathFuncT -> IO (GClosure C_DrawClosePathFuncT)) -> IO (GClosure C_DrawClosePathFuncT) forall a b. IO a -> (a -> IO b) -> IO b forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b >>= FunPtr C_DrawClosePathFuncT -> IO (GClosure C_DrawClosePathFuncT) forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a) B.GClosure.newGClosure -- | Wrap a `DrawClosePathFuncT` into a `C_DrawClosePathFuncT`. wrap_DrawClosePathFuncT :: Maybe (Ptr (FunPtr C_DrawClosePathFuncT)) -> DrawClosePathFuncT_WithClosures -> C_DrawClosePathFuncT wrap_DrawClosePathFuncT :: Maybe (Ptr (FunPtr C_DrawClosePathFuncT)) -> DrawClosePathFuncT_WithClosures -> C_DrawClosePathFuncT wrap_DrawClosePathFuncT Maybe (Ptr (FunPtr C_DrawClosePathFuncT)) gi'funptrptr DrawClosePathFuncT_WithClosures gi'cb Ptr DrawFuncsT dfuncs Ptr () drawData Ptr DrawStateT st Ptr () userData = do Ptr DrawFuncsT -> (DrawFuncsT -> IO ()) -> IO () forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr DrawFuncsT dfuncs ((DrawFuncsT -> IO ()) -> IO ()) -> (DrawFuncsT -> IO ()) -> IO () forall a b. (a -> b) -> a -> b $ \DrawFuncsT dfuncs' -> do Ptr DrawStateT -> (DrawStateT -> IO ()) -> IO () forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr DrawStateT st ((DrawStateT -> IO ()) -> IO ()) -> (DrawStateT -> IO ()) -> IO () forall a b. (a -> b) -> a -> b $ \DrawStateT st' -> do DrawClosePathFuncT_WithClosures gi'cb DrawFuncsT dfuncs' Ptr () drawData DrawStateT st' Ptr () userData Maybe (Ptr (FunPtr C_DrawClosePathFuncT)) -> IO () forall a. Maybe (Ptr (FunPtr a)) -> IO () maybeReleaseFunPtr Maybe (Ptr (FunPtr C_DrawClosePathFuncT)) gi'funptrptr -- callback DestroyFuncT {- Callable { returnType = Nothing , returnMayBeNull = False , returnTransfer = TransferNothing , returnDocumentation = Documentation { rawDocText = Nothing , sinceVersion = Nothing } , args = [ Arg { argCName = "user_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "the data to be destroyed" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = 0 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } ] , skipReturn = False , callableThrows = False , callableDeprecated = Nothing , callableDocumentation = Documentation { rawDocText = Just "A virtual method for destroy user-data callbacks." , sinceVersion = Nothing } , callableResolvable = Nothing } -} -- | Type for the callback on the (unwrapped) C side. type C_DestroyFuncT = Ptr () -> IO () -- Args: [ Arg -- { argCName = "user_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "the data to be destroyed" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = 0 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "dynamic" __dynamic_C_DestroyFuncT :: FunPtr C_DestroyFuncT -> C_DestroyFuncT -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell. dynamic_DestroyFuncT :: (B.CallStack.HasCallStack, MonadIO m) => FunPtr C_DestroyFuncT -> Ptr () -- ^ /@userData@/: the data to be destroyed -> m () dynamic_DestroyFuncT :: forall (m :: * -> *). (HasCallStack, MonadIO m) => FunPtr C_DestroyFuncT -> Ptr () -> m () dynamic_DestroyFuncT FunPtr C_DestroyFuncT __funPtr Ptr () userData = IO () -> m () forall a. IO a -> m a 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 a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return () -- | Generate a function pointer callable from C code, from a `C_DestroyFuncT`. foreign import ccall "wrapper" mk_DestroyFuncT :: C_DestroyFuncT -> IO (FunPtr C_DestroyFuncT) -- | A virtual method for destroy user-data callbacks. type DestroyFuncT = IO () -- | A convenience synonym for @`Nothing` :: `Maybe` `DestroyFuncT`@. noDestroyFuncT :: Maybe DestroyFuncT noDestroyFuncT :: Maybe (IO ()) noDestroyFuncT = Maybe (IO ()) forall a. Maybe a Nothing -- | A virtual method for destroy user-data callbacks. type DestroyFuncT_WithClosures = Ptr () -- ^ /@userData@/: the data to be destroyed -> IO () -- | A convenience synonym for @`Nothing` :: `Maybe` `DestroyFuncT_WithClosures`@. noDestroyFuncT_WithClosures :: Maybe DestroyFuncT_WithClosures noDestroyFuncT_WithClosures :: Maybe C_DestroyFuncT noDestroyFuncT_WithClosures = Maybe C_DestroyFuncT forall a. Maybe a Nothing -- | A simple wrapper that ignores the closure arguments. drop_closures_DestroyFuncT :: DestroyFuncT -> DestroyFuncT_WithClosures drop_closures_DestroyFuncT :: IO () -> C_DestroyFuncT drop_closures_DestroyFuncT IO () _f Ptr () _ = IO () _f -- | Wrap the callback into a `GClosure`. genClosure_DestroyFuncT :: MonadIO m => DestroyFuncT -> m (GClosure C_DestroyFuncT) genClosure_DestroyFuncT :: forall (m :: * -> *). MonadIO m => IO () -> m (GClosure C_DestroyFuncT) genClosure_DestroyFuncT IO () cb = IO (GClosure C_DestroyFuncT) -> m (GClosure C_DestroyFuncT) forall a. IO a -> m a 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 a b. IO a -> (a -> IO b) -> IO b 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 a `DestroyFuncT` into a `C_DestroyFuncT`. wrap_DestroyFuncT :: Maybe (Ptr (FunPtr C_DestroyFuncT)) -> DestroyFuncT_WithClosures -> C_DestroyFuncT wrap_DestroyFuncT :: Maybe (Ptr (FunPtr C_DestroyFuncT)) -> C_DestroyFuncT -> C_DestroyFuncT wrap_DestroyFuncT Maybe (Ptr (FunPtr C_DestroyFuncT)) gi'funptrptr C_DestroyFuncT gi'cb Ptr () userData = do C_DestroyFuncT gi'cb Ptr () userData Maybe (Ptr (FunPtr C_DestroyFuncT)) -> IO () forall a. Maybe (Ptr (FunPtr a)) -> IO () maybeReleaseFunPtr Maybe (Ptr (FunPtr C_DestroyFuncT)) gi'funptrptr -- callback ColorLineGetExtendFuncT {- Callable { returnType = Just (TInterface Name { namespace = "HarfBuzz" , name = "paint_extend_t" }) , returnMayBeNull = False , returnTransfer = TransferNothing , returnDocumentation = Documentation { rawDocText = Just "the extend mode of @color_line" , sinceVersion = Nothing } , args = [ Arg { argCName = "color_line" , argType = TInterface Name { namespace = "HarfBuzz" , name = "color_line_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "a #hb_color_line_t object" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "color_line_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "the data accompanying @color_line" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "user_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "the data accompanying this method" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = 2 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } ] , skipReturn = False , callableThrows = False , callableDeprecated = Nothing , callableDocumentation = Documentation { rawDocText = Just "A virtual method for the @hb_color_line_t to fetches the extend mode." , sinceVersion = Just "7.0.0" } , callableResolvable = Nothing } -} -- | Type for the callback on the (unwrapped) C side. type C_ColorLineGetExtendFuncT = Ptr HarfBuzz.ColorLineT.ColorLineT -> Ptr () -> Ptr () -> IO CUInt -- Args: [ Arg -- { argCName = "color_line" -- , argType = -- TInterface Name { namespace = "HarfBuzz" , name = "color_line_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a #hb_color_line_t object" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "color_line_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "the data accompanying @color_line" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "user_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "the data accompanying this method" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = 2 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just -- (TInterface -- Name { namespace = "HarfBuzz" , name = "paint_extend_t" }) -- throws : False -- Skip return : False foreign import ccall "dynamic" __dynamic_C_ColorLineGetExtendFuncT :: FunPtr C_ColorLineGetExtendFuncT -> C_ColorLineGetExtendFuncT -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell. dynamic_ColorLineGetExtendFuncT :: (B.CallStack.HasCallStack, MonadIO m) => FunPtr C_ColorLineGetExtendFuncT -> HarfBuzz.ColorLineT.ColorLineT -- ^ /@colorLine@/: a t'GI.HarfBuzz.Structs.ColorLineT.ColorLineT' object -> Ptr () -- ^ /@colorLineData@/: the data accompanying /@colorLine@/ -> Ptr () -- ^ /@userData@/: the data accompanying this method -> m HarfBuzz.Enums.PaintExtendT -- ^ __Returns:__ the extend mode of /@colorLine@/ dynamic_ColorLineGetExtendFuncT :: forall (m :: * -> *). (HasCallStack, MonadIO m) => FunPtr C_ColorLineGetExtendFuncT -> ColorLineT -> Ptr () -> Ptr () -> m PaintExtendT dynamic_ColorLineGetExtendFuncT FunPtr C_ColorLineGetExtendFuncT __funPtr ColorLineT colorLine Ptr () colorLineData Ptr () userData = IO PaintExtendT -> m PaintExtendT forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO PaintExtendT -> m PaintExtendT) -> IO PaintExtendT -> m PaintExtendT forall a b. (a -> b) -> a -> b $ do Ptr ColorLineT colorLine' <- ColorLineT -> IO (Ptr ColorLineT) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr ColorLineT colorLine CUInt result <- (FunPtr C_ColorLineGetExtendFuncT -> C_ColorLineGetExtendFuncT __dynamic_C_ColorLineGetExtendFuncT FunPtr C_ColorLineGetExtendFuncT __funPtr) Ptr ColorLineT colorLine' Ptr () colorLineData Ptr () userData let result' :: PaintExtendT result' = (Int -> PaintExtendT forall a. Enum a => Int -> a toEnum (Int -> PaintExtendT) -> (CUInt -> Int) -> CUInt -> PaintExtendT forall b c a. (b -> c) -> (a -> b) -> a -> c . CUInt -> Int forall a b. (Integral a, Num b) => a -> b fromIntegral) CUInt result ColorLineT -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr ColorLineT colorLine PaintExtendT -> IO PaintExtendT forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return PaintExtendT result' -- | Generate a function pointer callable from C code, from a `C_ColorLineGetExtendFuncT`. foreign import ccall "wrapper" mk_ColorLineGetExtendFuncT :: C_ColorLineGetExtendFuncT -> IO (FunPtr C_ColorLineGetExtendFuncT) -- | A virtual method for the /@hbColorLineT@/ to fetches the extend mode. -- -- /Since: 7.0.0/ type ColorLineGetExtendFuncT = HarfBuzz.ColorLineT.ColorLineT -- ^ /@colorLine@/: a t'GI.HarfBuzz.Structs.ColorLineT.ColorLineT' object -> Ptr () -- ^ /@colorLineData@/: the data accompanying /@colorLine@/ -> IO HarfBuzz.Enums.PaintExtendT -- ^ __Returns:__ the extend mode of /@colorLine@/ -- | A convenience synonym for @`Nothing` :: `Maybe` `ColorLineGetExtendFuncT`@. noColorLineGetExtendFuncT :: Maybe ColorLineGetExtendFuncT noColorLineGetExtendFuncT :: Maybe ColorLineGetExtendFuncT noColorLineGetExtendFuncT = Maybe ColorLineGetExtendFuncT forall a. Maybe a Nothing -- | A virtual method for the /@hbColorLineT@/ to fetches the extend mode. -- -- /Since: 7.0.0/ type ColorLineGetExtendFuncT_WithClosures = HarfBuzz.ColorLineT.ColorLineT -- ^ /@colorLine@/: a t'GI.HarfBuzz.Structs.ColorLineT.ColorLineT' object -> Ptr () -- ^ /@colorLineData@/: the data accompanying /@colorLine@/ -> Ptr () -- ^ /@userData@/: the data accompanying this method -> IO HarfBuzz.Enums.PaintExtendT -- ^ __Returns:__ the extend mode of /@colorLine@/ -- | A convenience synonym for @`Nothing` :: `Maybe` `ColorLineGetExtendFuncT_WithClosures`@. noColorLineGetExtendFuncT_WithClosures :: Maybe ColorLineGetExtendFuncT_WithClosures noColorLineGetExtendFuncT_WithClosures :: Maybe ColorLineGetExtendFuncT_WithClosures noColorLineGetExtendFuncT_WithClosures = Maybe ColorLineGetExtendFuncT_WithClosures forall a. Maybe a Nothing -- | A simple wrapper that ignores the closure arguments. drop_closures_ColorLineGetExtendFuncT :: ColorLineGetExtendFuncT -> ColorLineGetExtendFuncT_WithClosures drop_closures_ColorLineGetExtendFuncT :: ColorLineGetExtendFuncT -> ColorLineGetExtendFuncT_WithClosures drop_closures_ColorLineGetExtendFuncT ColorLineGetExtendFuncT _f ColorLineT colorLine Ptr () colorLineData Ptr () _ = ColorLineGetExtendFuncT _f ColorLineT colorLine Ptr () colorLineData -- | Wrap the callback into a `GClosure`. genClosure_ColorLineGetExtendFuncT :: MonadIO m => ColorLineGetExtendFuncT -> m (GClosure C_ColorLineGetExtendFuncT) genClosure_ColorLineGetExtendFuncT :: forall (m :: * -> *). MonadIO m => ColorLineGetExtendFuncT -> m (GClosure C_ColorLineGetExtendFuncT) genClosure_ColorLineGetExtendFuncT ColorLineGetExtendFuncT cb = IO (GClosure C_ColorLineGetExtendFuncT) -> m (GClosure C_ColorLineGetExtendFuncT) forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (GClosure C_ColorLineGetExtendFuncT) -> m (GClosure C_ColorLineGetExtendFuncT)) -> IO (GClosure C_ColorLineGetExtendFuncT) -> m (GClosure C_ColorLineGetExtendFuncT) forall a b. (a -> b) -> a -> b $ do let cb' :: ColorLineGetExtendFuncT_WithClosures cb' = ColorLineGetExtendFuncT -> ColorLineGetExtendFuncT_WithClosures drop_closures_ColorLineGetExtendFuncT ColorLineGetExtendFuncT cb let cb'' :: C_ColorLineGetExtendFuncT cb'' = Maybe (Ptr (FunPtr C_ColorLineGetExtendFuncT)) -> ColorLineGetExtendFuncT_WithClosures -> C_ColorLineGetExtendFuncT wrap_ColorLineGetExtendFuncT Maybe (Ptr (FunPtr C_ColorLineGetExtendFuncT)) forall a. Maybe a Nothing ColorLineGetExtendFuncT_WithClosures cb' C_ColorLineGetExtendFuncT -> IO (FunPtr C_ColorLineGetExtendFuncT) mk_ColorLineGetExtendFuncT C_ColorLineGetExtendFuncT cb'' IO (FunPtr C_ColorLineGetExtendFuncT) -> (FunPtr C_ColorLineGetExtendFuncT -> IO (GClosure C_ColorLineGetExtendFuncT)) -> IO (GClosure C_ColorLineGetExtendFuncT) forall a b. IO a -> (a -> IO b) -> IO b forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b >>= FunPtr C_ColorLineGetExtendFuncT -> IO (GClosure C_ColorLineGetExtendFuncT) forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a) B.GClosure.newGClosure -- | Wrap a `ColorLineGetExtendFuncT` into a `C_ColorLineGetExtendFuncT`. wrap_ColorLineGetExtendFuncT :: Maybe (Ptr (FunPtr C_ColorLineGetExtendFuncT)) -> ColorLineGetExtendFuncT_WithClosures -> C_ColorLineGetExtendFuncT wrap_ColorLineGetExtendFuncT :: Maybe (Ptr (FunPtr C_ColorLineGetExtendFuncT)) -> ColorLineGetExtendFuncT_WithClosures -> C_ColorLineGetExtendFuncT wrap_ColorLineGetExtendFuncT Maybe (Ptr (FunPtr C_ColorLineGetExtendFuncT)) gi'funptrptr ColorLineGetExtendFuncT_WithClosures gi'cb Ptr ColorLineT colorLine Ptr () colorLineData Ptr () userData = do Ptr ColorLineT -> (ColorLineT -> IO CUInt) -> IO CUInt forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr ColorLineT colorLine ((ColorLineT -> IO CUInt) -> IO CUInt) -> (ColorLineT -> IO CUInt) -> IO CUInt forall a b. (a -> b) -> a -> b $ \ColorLineT colorLine' -> do PaintExtendT result <- ColorLineGetExtendFuncT_WithClosures gi'cb ColorLineT colorLine' Ptr () colorLineData Ptr () userData Maybe (Ptr (FunPtr C_ColorLineGetExtendFuncT)) -> IO () forall a. Maybe (Ptr (FunPtr a)) -> IO () maybeReleaseFunPtr Maybe (Ptr (FunPtr C_ColorLineGetExtendFuncT)) gi'funptrptr let result' :: CUInt result' = (Int -> CUInt forall a b. (Integral a, Num b) => a -> b fromIntegral (Int -> CUInt) -> (PaintExtendT -> Int) -> PaintExtendT -> CUInt forall b c a. (b -> c) -> (a -> b) -> a -> c . PaintExtendT -> Int forall a. Enum a => a -> Int fromEnum) PaintExtendT result CUInt -> IO CUInt forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return CUInt result' -- callback ColorLineGetColorStopsFuncT {- Callable { returnType = Just (TBasicType TUInt) , returnMayBeNull = False , returnTransfer = TransferNothing , returnDocumentation = Documentation { rawDocText = Just "the total number of color stops in @color_line" , sinceVersion = Nothing } , args = [ Arg { argCName = "color_line" , argType = TInterface Name { namespace = "HarfBuzz" , name = "color_line_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "a #hb_color_line_t object" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "color_line_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "the data accompanying @color_line" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "start" , argType = TBasicType TUInt , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "the index of the first color stop to return" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "count" , argType = TBasicType TUInt , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "Input = the maximum number of feature tags to return;\n Output = the actual number of feature tags returned (may be zero)" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferEverything } , Arg { argCName = "color_stops" , argType = TCArray False (-1) 3 (TInterface Name { namespace = "HarfBuzz" , name = "color_stop_t" }) , direction = DirectionInout , mayBeNull = False , argDoc = Documentation { rawDocText = Just "Array of #hb_color_stop_t to populate" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = True , transfer = TransferEverything } , Arg { argCName = "user_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "the data accompanying this method" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = 5 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } ] , skipReturn = False , callableThrows = False , callableDeprecated = Nothing , callableDocumentation = Documentation { rawDocText = Just "A virtual method for the #hb_color_line_t to fetch color stops." , sinceVersion = Just "7.0.0" } , callableResolvable = Nothing } -} -- | Type for the callback on the (unwrapped) C side. type C_ColorLineGetColorStopsFuncT = Ptr HarfBuzz.ColorLineT.ColorLineT -> Ptr () -> Word32 -> Word32 -> Ptr HarfBuzz.ColorStopT.ColorStopT -> Ptr () -> IO Word32 -- Args: [ Arg -- { argCName = "color_line" -- , argType = -- TInterface Name { namespace = "HarfBuzz" , name = "color_line_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a #hb_color_line_t object" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "color_line_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "the data accompanying @color_line" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "start" -- , argType = TBasicType TUInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the index of the first color stop to return" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "count" -- , argType = TBasicType TUInt -- , direction = DirectionOut -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = -- Just -- "Input = the maximum number of feature tags to return;\n Output = the actual number of feature tags returned (may be zero)" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferEverything -- } -- , Arg -- { argCName = "color_stops" -- , argType = -- TCArray -- False -- (-1) -- 3 -- (TInterface -- Name { namespace = "HarfBuzz" , name = "color_stop_t" }) -- , direction = DirectionOut -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "Array of #hb_color_stop_t to populate" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = True -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "user_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "the data accompanying this method" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = 5 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [ Arg -- { argCName = "count" -- , argType = TBasicType TUInt -- , direction = DirectionOut -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = -- Just -- "Input = the maximum number of feature tags to return;\n Output = the actual number of feature tags returned (may be zero)" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferEverything -- } -- ] -- returnType: Just (TBasicType TUInt) -- throws : False -- Skip return : False foreign import ccall "dynamic" __dynamic_C_ColorLineGetColorStopsFuncT :: FunPtr C_ColorLineGetColorStopsFuncT -> C_ColorLineGetColorStopsFuncT -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell. dynamic_ColorLineGetColorStopsFuncT :: (B.CallStack.HasCallStack, MonadIO m) => FunPtr C_ColorLineGetColorStopsFuncT -> HarfBuzz.ColorLineT.ColorLineT -- ^ /@colorLine@/: a t'GI.HarfBuzz.Structs.ColorLineT.ColorLineT' object -> Ptr () -- ^ /@colorLineData@/: the data accompanying /@colorLine@/ -> Word32 -- ^ /@start@/: the index of the first color stop to return -> [HarfBuzz.ColorStopT.ColorStopT] -- ^ /@colorStops@/: Array of t'GI.HarfBuzz.Structs.ColorStopT.ColorStopT' to populate -> Ptr () -- ^ /@userData@/: the data accompanying this method -> m ((Word32, [HarfBuzz.ColorStopT.ColorStopT])) -- ^ __Returns:__ the total number of color stops in /@colorLine@/ dynamic_ColorLineGetColorStopsFuncT :: forall (m :: * -> *). (HasCallStack, MonadIO m) => FunPtr C_ColorLineGetColorStopsFuncT -> ColorLineT -> Ptr () -> Word32 -> [ColorStopT] -> Ptr () -> m (Word32, [ColorStopT]) dynamic_ColorLineGetColorStopsFuncT FunPtr C_ColorLineGetColorStopsFuncT __funPtr ColorLineT colorLine Ptr () colorLineData Word32 start [ColorStopT] colorStops Ptr () userData = IO (Word32, [ColorStopT]) -> m (Word32, [ColorStopT]) forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (Word32, [ColorStopT]) -> m (Word32, [ColorStopT])) -> IO (Word32, [ColorStopT]) -> m (Word32, [ColorStopT]) forall a b. (a -> b) -> a -> b $ do let count :: Word32 count = Int -> Word32 forall a b. (Integral a, Num b) => a -> b fromIntegral (Int -> Word32) -> Int -> Word32 forall a b. (a -> b) -> a -> b $ [ColorStopT] -> Int forall a. [a] -> Int forall (t :: * -> *) a. Foldable t => t a -> Int P.length [ColorStopT] colorStops Ptr ColorLineT colorLine' <- ColorLineT -> IO (Ptr ColorLineT) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr ColorLineT colorLine [Ptr ColorStopT] colorStops' <- (ColorStopT -> IO (Ptr ColorStopT)) -> [ColorStopT] -> IO [Ptr ColorStopT] forall (t :: * -> *) (m :: * -> *) a b. (Traversable t, Monad m) => (a -> m b) -> t a -> m (t b) forall (m :: * -> *) a b. Monad m => (a -> m b) -> [a] -> m [b] mapM ColorStopT -> IO (Ptr ColorStopT) forall a. (HasCallStack, GBoxed a) => a -> IO (Ptr a) B.ManagedPtr.disownBoxed [ColorStopT] colorStops Ptr ColorStopT colorStops'' <- Int -> [Ptr ColorStopT] -> IO (Ptr ColorStopT) forall a. Int -> [Ptr a] -> IO (Ptr a) packBlockArray Int 12 [Ptr ColorStopT] colorStops' Word32 result <- (FunPtr C_ColorLineGetColorStopsFuncT -> C_ColorLineGetColorStopsFuncT __dynamic_C_ColorLineGetColorStopsFuncT FunPtr C_ColorLineGetColorStopsFuncT __funPtr) Ptr ColorLineT colorLine' Ptr () colorLineData Word32 start Word32 count Ptr ColorStopT colorStops'' Ptr () userData [Ptr ColorStopT] colorStops''' <- (Int -> Word32 -> Ptr ColorStopT -> IO [Ptr ColorStopT] forall a b. (Integral a, GBoxed b) => Int -> a -> Ptr b -> IO [Ptr b] unpackBoxedArrayWithLength Int 12 Word32 count) Ptr ColorStopT colorStops'' [ColorStopT] colorStops'''' <- (Ptr ColorStopT -> IO ColorStopT) -> [Ptr ColorStopT] -> IO [ColorStopT] forall (t :: * -> *) (m :: * -> *) a b. (Traversable t, Monad m) => (a -> m b) -> t a -> m (t b) forall (m :: * -> *) a b. Monad m => (a -> m b) -> [a] -> m [b] mapM ((ManagedPtr ColorStopT -> ColorStopT) -> Ptr ColorStopT -> IO ColorStopT forall a. (HasCallStack, GBoxed a) => (ManagedPtr a -> a) -> Ptr a -> IO a wrapBoxed ManagedPtr ColorStopT -> ColorStopT HarfBuzz.ColorStopT.ColorStopT) [Ptr ColorStopT] colorStops''' Ptr ColorStopT -> IO () forall a. Ptr a -> IO () freeMem Ptr ColorStopT colorStops'' ColorLineT -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr ColorLineT colorLine (ColorStopT -> IO ()) -> [ColorStopT] -> IO () forall (t :: * -> *) (m :: * -> *) a b. (Foldable t, Monad m) => (a -> m b) -> t a -> m () mapM_ ColorStopT -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr [ColorStopT] colorStops (Word32, [ColorStopT]) -> IO (Word32, [ColorStopT]) forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return (Word32 result, [ColorStopT] colorStops'''') -- | Generate a function pointer callable from C code, from a `C_ColorLineGetColorStopsFuncT`. foreign import ccall "wrapper" mk_ColorLineGetColorStopsFuncT :: C_ColorLineGetColorStopsFuncT -> IO (FunPtr C_ColorLineGetColorStopsFuncT) -- | A virtual method for the t'GI.HarfBuzz.Structs.ColorLineT.ColorLineT' to fetch color stops. -- -- /Since: 7.0.0/ type ColorLineGetColorStopsFuncT = HarfBuzz.ColorLineT.ColorLineT -- ^ /@colorLine@/: a t'GI.HarfBuzz.Structs.ColorLineT.ColorLineT' object -> Ptr () -- ^ /@colorLineData@/: the data accompanying /@colorLine@/ -> Word32 -- ^ /@start@/: the index of the first color stop to return -> [HarfBuzz.ColorStopT.ColorStopT] -- ^ /@colorStops@/: Array of t'GI.HarfBuzz.Structs.ColorStopT.ColorStopT' to populate -> IO ((Word32, [HarfBuzz.ColorStopT.ColorStopT])) -- ^ __Returns:__ the total number of color stops in /@colorLine@/ -- | A convenience synonym for @`Nothing` :: `Maybe` `ColorLineGetColorStopsFuncT`@. noColorLineGetColorStopsFuncT :: Maybe ColorLineGetColorStopsFuncT noColorLineGetColorStopsFuncT :: Maybe ColorLineGetColorStopsFuncT noColorLineGetColorStopsFuncT = Maybe ColorLineGetColorStopsFuncT forall a. Maybe a Nothing -- | A virtual method for the t'GI.HarfBuzz.Structs.ColorLineT.ColorLineT' to fetch color stops. -- -- /Since: 7.0.0/ type ColorLineGetColorStopsFuncT_WithClosures = HarfBuzz.ColorLineT.ColorLineT -- ^ /@colorLine@/: a t'GI.HarfBuzz.Structs.ColorLineT.ColorLineT' object -> Ptr () -- ^ /@colorLineData@/: the data accompanying /@colorLine@/ -> Word32 -- ^ /@start@/: the index of the first color stop to return -> [HarfBuzz.ColorStopT.ColorStopT] -- ^ /@colorStops@/: Array of t'GI.HarfBuzz.Structs.ColorStopT.ColorStopT' to populate -> Ptr () -- ^ /@userData@/: the data accompanying this method -> IO ((Word32, [HarfBuzz.ColorStopT.ColorStopT])) -- ^ __Returns:__ the total number of color stops in /@colorLine@/ -- | A convenience synonym for @`Nothing` :: `Maybe` `ColorLineGetColorStopsFuncT_WithClosures`@. noColorLineGetColorStopsFuncT_WithClosures :: Maybe ColorLineGetColorStopsFuncT_WithClosures noColorLineGetColorStopsFuncT_WithClosures :: Maybe ColorLineGetColorStopsFuncT_WithClosures noColorLineGetColorStopsFuncT_WithClosures = Maybe ColorLineGetColorStopsFuncT_WithClosures forall a. Maybe a Nothing -- | A simple wrapper that ignores the closure arguments. drop_closures_ColorLineGetColorStopsFuncT :: ColorLineGetColorStopsFuncT -> ColorLineGetColorStopsFuncT_WithClosures drop_closures_ColorLineGetColorStopsFuncT :: ColorLineGetColorStopsFuncT -> ColorLineGetColorStopsFuncT_WithClosures drop_closures_ColorLineGetColorStopsFuncT ColorLineGetColorStopsFuncT _f ColorLineT colorLine Ptr () colorLineData Word32 start [ColorStopT] colorStops Ptr () _ = ColorLineGetColorStopsFuncT _f ColorLineT colorLine Ptr () colorLineData Word32 start [ColorStopT] colorStops -- | Wrap the callback into a `GClosure`. genClosure_ColorLineGetColorStopsFuncT :: MonadIO m => ColorLineGetColorStopsFuncT -> m (GClosure C_ColorLineGetColorStopsFuncT) genClosure_ColorLineGetColorStopsFuncT :: forall (m :: * -> *). MonadIO m => ColorLineGetColorStopsFuncT -> m (GClosure C_ColorLineGetColorStopsFuncT) genClosure_ColorLineGetColorStopsFuncT ColorLineGetColorStopsFuncT cb = IO (GClosure C_ColorLineGetColorStopsFuncT) -> m (GClosure C_ColorLineGetColorStopsFuncT) forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (GClosure C_ColorLineGetColorStopsFuncT) -> m (GClosure C_ColorLineGetColorStopsFuncT)) -> IO (GClosure C_ColorLineGetColorStopsFuncT) -> m (GClosure C_ColorLineGetColorStopsFuncT) forall a b. (a -> b) -> a -> b $ do let cb' :: ColorLineGetColorStopsFuncT_WithClosures cb' = ColorLineGetColorStopsFuncT -> ColorLineGetColorStopsFuncT_WithClosures drop_closures_ColorLineGetColorStopsFuncT ColorLineGetColorStopsFuncT cb let cb'' :: C_ColorLineGetColorStopsFuncT cb'' = Maybe (Ptr (FunPtr C_ColorLineGetColorStopsFuncT)) -> ColorLineGetColorStopsFuncT_WithClosures -> C_ColorLineGetColorStopsFuncT wrap_ColorLineGetColorStopsFuncT Maybe (Ptr (FunPtr C_ColorLineGetColorStopsFuncT)) forall a. Maybe a Nothing ColorLineGetColorStopsFuncT_WithClosures cb' C_ColorLineGetColorStopsFuncT -> IO (FunPtr C_ColorLineGetColorStopsFuncT) mk_ColorLineGetColorStopsFuncT C_ColorLineGetColorStopsFuncT cb'' IO (FunPtr C_ColorLineGetColorStopsFuncT) -> (FunPtr C_ColorLineGetColorStopsFuncT -> IO (GClosure C_ColorLineGetColorStopsFuncT)) -> IO (GClosure C_ColorLineGetColorStopsFuncT) forall a b. IO a -> (a -> IO b) -> IO b forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b >>= FunPtr C_ColorLineGetColorStopsFuncT -> IO (GClosure C_ColorLineGetColorStopsFuncT) forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a) B.GClosure.newGClosure -- | Wrap a `ColorLineGetColorStopsFuncT` into a `C_ColorLineGetColorStopsFuncT`. wrap_ColorLineGetColorStopsFuncT :: Maybe (Ptr (FunPtr C_ColorLineGetColorStopsFuncT)) -> ColorLineGetColorStopsFuncT_WithClosures -> C_ColorLineGetColorStopsFuncT wrap_ColorLineGetColorStopsFuncT :: Maybe (Ptr (FunPtr C_ColorLineGetColorStopsFuncT)) -> ColorLineGetColorStopsFuncT_WithClosures -> C_ColorLineGetColorStopsFuncT wrap_ColorLineGetColorStopsFuncT Maybe (Ptr (FunPtr C_ColorLineGetColorStopsFuncT)) gi'funptrptr ColorLineGetColorStopsFuncT_WithClosures gi'cb Ptr ColorLineT colorLine Ptr () colorLineData Word32 start Word32 count Ptr ColorStopT colorStops Ptr () userData = do -- XXX Could not generate callback wrapper for ColorLineGetColorStopsFuncT -- Not implemented: Don't know how to unpack C array of type TCArray False (-1) 3 (TInterface (Name {namespace = "HarfBuzz", name = "color_stop_t"})) [Char] -> IO Word32 forall a. HasCallStack => [Char] -> a P.error [Char] "The bindings for wrap_ColorLineGetColorStopsFuncT could not be generated, function unsupported." -- callback BufferMessageFuncT {- Callable { returnType = Just (TBasicType TInt) , returnMayBeNull = False , returnTransfer = TransferNothing , returnDocumentation = Documentation { rawDocText = Just "`true` to perform the shaping step, `false` to skip it." , sinceVersion = Nothing } , args = [ Arg { argCName = "buffer" , argType = TInterface Name { namespace = "HarfBuzz" , name = "buffer_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "An #hb_buffer_t to work upon" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "font" , argType = TInterface Name { namespace = "HarfBuzz" , name = "font_t" } , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "The #hb_font_t the @buffer is shaped with" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "message" , argType = TBasicType TUTF8 , direction = DirectionIn , mayBeNull = False , argDoc = Documentation { rawDocText = Just "`NULL`-terminated message passed to the function" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = -1 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } , Arg { argCName = "user_data" , argType = TBasicType TPtr , direction = DirectionIn , mayBeNull = True , argDoc = Documentation { rawDocText = Just "User data pointer passed by the caller" , sinceVersion = Nothing } , argScope = ScopeTypeInvalid , argClosure = 3 , argDestroy = -1 , argCallerAllocates = False , transfer = TransferNothing } ] , skipReturn = False , callableThrows = False , callableDeprecated = Nothing , callableDocumentation = Documentation { rawDocText = Just "A callback method for #hb_buffer_t. The method gets called with the\n#hb_buffer_t it was set on, the #hb_font_t the buffer is shaped with and a\nmessage describing what step of the shaping process will be performed.\nReturning `false` from this method will skip this shaping step and move to\nthe next one." , sinceVersion = Just "1.1.3" } , callableResolvable = Nothing } -} -- | Type for the callback on the (unwrapped) C side. type C_BufferMessageFuncT = Ptr HarfBuzz.BufferT.BufferT -> Ptr HarfBuzz.FontT.FontT -> CString -> Ptr () -> IO Int32 -- Args: [ Arg -- { argCName = "buffer" -- , argType = -- TInterface Name { namespace = "HarfBuzz" , name = "buffer_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "An #hb_buffer_t to work upon" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "font" -- , argType = -- TInterface Name { namespace = "HarfBuzz" , name = "font_t" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The #hb_font_t the @buffer is shaped with" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "message" -- , argType = TBasicType TUTF8 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = -- Just "`NULL`-terminated message passed to the function" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "user_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "User data pointer passed by the caller" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = 3 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TInt) -- throws : False -- Skip return : False foreign import ccall "dynamic" __dynamic_C_BufferMessageFuncT :: FunPtr C_BufferMessageFuncT -> C_BufferMessageFuncT -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell. dynamic_BufferMessageFuncT :: (B.CallStack.HasCallStack, MonadIO m) => FunPtr C_BufferMessageFuncT -> HarfBuzz.BufferT.BufferT -- ^ /@buffer@/: An t'GI.HarfBuzz.Structs.BufferT.BufferT' to work upon -> HarfBuzz.FontT.FontT -- ^ /@font@/: The t'GI.HarfBuzz.Structs.FontT.FontT' the /@buffer@/ is shaped with -> T.Text -- ^ /@message@/: @NULL@-terminated message passed to the function -> Ptr () -- ^ /@userData@/: User data pointer passed by the caller -> m Int32 -- ^ __Returns:__ @true@ to perform the shaping step, @false@ to skip it. dynamic_BufferMessageFuncT :: forall (m :: * -> *). (HasCallStack, MonadIO m) => FunPtr C_BufferMessageFuncT -> BufferT -> FontT -> Text -> Ptr () -> m Int32 dynamic_BufferMessageFuncT FunPtr C_BufferMessageFuncT __funPtr BufferT buffer FontT font Text message Ptr () userData = IO Int32 -> m Int32 forall a. IO a -> m a 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 a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return Int32 result -- | Generate a function pointer callable from C code, from a `C_BufferMessageFuncT`. foreign import ccall "wrapper" mk_BufferMessageFuncT :: C_BufferMessageFuncT -> IO (FunPtr C_BufferMessageFuncT) -- | A callback method for t'GI.HarfBuzz.Structs.BufferT.BufferT'. The method gets called with the -- t'GI.HarfBuzz.Structs.BufferT.BufferT' it was set on, the t'GI.HarfBuzz.Structs.FontT.FontT' the buffer is shaped with and a -- message describing what step of the shaping process will be performed. -- Returning @false@ from this method will skip this shaping step and move to -- the next one. -- -- /Since: 1.1.3/ type BufferMessageFuncT = HarfBuzz.BufferT.BufferT -- ^ /@buffer@/: An t'GI.HarfBuzz.Structs.BufferT.BufferT' to work upon -> HarfBuzz.FontT.FontT -- ^ /@font@/: The t'GI.HarfBuzz.Structs.FontT.FontT' the /@buffer@/ is shaped with -> T.Text -- ^ /@message@/: @NULL@-terminated message passed to the function -> IO Int32 -- ^ __Returns:__ @true@ to perform the shaping step, @false@ to skip it. -- | A convenience synonym for @`Nothing` :: `Maybe` `BufferMessageFuncT`@. noBufferMessageFuncT :: Maybe BufferMessageFuncT noBufferMessageFuncT :: Maybe BufferMessageFuncT noBufferMessageFuncT = Maybe BufferMessageFuncT forall a. Maybe a Nothing -- | A callback method for t'GI.HarfBuzz.Structs.BufferT.BufferT'. The method gets called with the -- t'GI.HarfBuzz.Structs.BufferT.BufferT' it was set on, the t'GI.HarfBuzz.Structs.FontT.FontT' the buffer is shaped with and a -- message describing what step of the shaping process will be performed. -- Returning @false@ from this method will skip this shaping step and move to -- the next one. -- -- /Since: 1.1.3/ type BufferMessageFuncT_WithClosures = HarfBuzz.BufferT.BufferT -- ^ /@buffer@/: An t'GI.HarfBuzz.Structs.BufferT.BufferT' to work upon -> HarfBuzz.FontT.FontT -- ^ /@font@/: The t'GI.HarfBuzz.Structs.FontT.FontT' the /@buffer@/ is shaped with -> T.Text -- ^ /@message@/: @NULL@-terminated message passed to the function -> Ptr () -- ^ /@userData@/: User data pointer passed by the caller -> IO Int32 -- ^ __Returns:__ @true@ to perform the shaping step, @false@ to skip it. -- | A convenience synonym for @`Nothing` :: `Maybe` `BufferMessageFuncT_WithClosures`@. noBufferMessageFuncT_WithClosures :: Maybe BufferMessageFuncT_WithClosures noBufferMessageFuncT_WithClosures :: Maybe BufferMessageFuncT_WithClosures noBufferMessageFuncT_WithClosures = Maybe BufferMessageFuncT_WithClosures forall a. Maybe a Nothing -- | A simple wrapper that ignores the closure arguments. drop_closures_BufferMessageFuncT :: BufferMessageFuncT -> BufferMessageFuncT_WithClosures drop_closures_BufferMessageFuncT :: BufferMessageFuncT -> BufferMessageFuncT_WithClosures drop_closures_BufferMessageFuncT BufferMessageFuncT _f BufferT buffer FontT font Text message Ptr () _ = BufferMessageFuncT _f BufferT buffer FontT font Text message -- | Wrap the callback into a `GClosure`. genClosure_BufferMessageFuncT :: MonadIO m => BufferMessageFuncT -> m (GClosure C_BufferMessageFuncT) genClosure_BufferMessageFuncT :: forall (m :: * -> *). MonadIO m => BufferMessageFuncT -> m (GClosure C_BufferMessageFuncT) genClosure_BufferMessageFuncT BufferMessageFuncT cb = IO (GClosure C_BufferMessageFuncT) -> m (GClosure C_BufferMessageFuncT) forall a. IO a -> m a 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 a b. IO a -> (a -> IO b) -> IO b 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 a `BufferMessageFuncT` into a `C_BufferMessageFuncT`. wrap_BufferMessageFuncT :: Maybe (Ptr (FunPtr C_BufferMessageFuncT)) -> BufferMessageFuncT_WithClosures -> C_BufferMessageFuncT wrap_BufferMessageFuncT :: Maybe (Ptr (FunPtr C_BufferMessageFuncT)) -> BufferMessageFuncT_WithClosures -> C_BufferMessageFuncT wrap_BufferMessageFuncT Maybe (Ptr (FunPtr C_BufferMessageFuncT)) gi'funptrptr BufferMessageFuncT_WithClosures gi'cb Ptr BufferT buffer Ptr FontT font CString message Ptr () userData = do Ptr BufferT -> (BufferT -> IO Int32) -> IO Int32 forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr BufferT buffer ((BufferT -> IO Int32) -> IO Int32) -> (BufferT -> IO Int32) -> IO Int32 forall a b. (a -> b) -> a -> b $ \BufferT buffer' -> do Ptr FontT -> (FontT -> IO Int32) -> IO Int32 forall a b. (HasCallStack, ManagedPtrNewtype a) => Ptr a -> (a -> IO b) -> IO b B.ManagedPtr.withTransient Ptr FontT font ((FontT -> IO Int32) -> IO Int32) -> (FontT -> IO Int32) -> IO Int32 forall a b. (a -> b) -> a -> b $ \FontT font' -> do Text message' <- HasCallStack => CString -> IO Text CString -> IO Text cstringToText CString message Int32 result <- BufferMessageFuncT_WithClosures gi'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)) gi'funptrptr Int32 -> IO Int32 forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return Int32 result