-- | Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
-- 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.Functions
    ( 

 -- * Methods
-- ** blobCopyWritableOrFail #method:blobCopyWritableOrFail#

    blobCopyWritableOrFail                  ,


-- ** blobCreateFromFile #method:blobCreateFromFile#

    blobCreateFromFile                      ,


-- ** blobCreateSubBlob #method:blobCreateSubBlob#

    blobCreateSubBlob                       ,


-- ** blobGetData #method:blobGetData#

    blobGetData                             ,


-- ** blobGetDataWritable #method:blobGetDataWritable#

    blobGetDataWritable                     ,


-- ** blobGetEmpty #method:blobGetEmpty#

    blobGetEmpty                            ,


-- ** blobGetLength #method:blobGetLength#

    blobGetLength                           ,


-- ** blobIsImmutable #method:blobIsImmutable#

    blobIsImmutable                         ,


-- ** blobMakeImmutable #method:blobMakeImmutable#

    blobMakeImmutable                       ,


-- ** bufferAdd #method:bufferAdd#

    bufferAdd                               ,


-- ** bufferAddCodepoints #method:bufferAddCodepoints#

    bufferAddCodepoints                     ,


-- ** bufferAddLatin1 #method:bufferAddLatin1#

    bufferAddLatin1                         ,


-- ** bufferAddUtf16 #method:bufferAddUtf16#

    bufferAddUtf16                          ,


-- ** bufferAddUtf32 #method:bufferAddUtf32#

    bufferAddUtf32                          ,


-- ** bufferAddUtf8 #method:bufferAddUtf8#

    bufferAddUtf8                           ,


-- ** bufferAllocationSuccessful #method:bufferAllocationSuccessful#

    bufferAllocationSuccessful              ,


-- ** bufferAppend #method:bufferAppend#

    bufferAppend                            ,


-- ** bufferClearContents #method:bufferClearContents#

    bufferClearContents                     ,


-- ** bufferCreate #method:bufferCreate#

    bufferCreate                            ,


-- ** bufferDeserializeGlyphs #method:bufferDeserializeGlyphs#

    bufferDeserializeGlyphs                 ,


-- ** bufferDiff #method:bufferDiff#

    bufferDiff                              ,


-- ** bufferGetClusterLevel #method:bufferGetClusterLevel#

    bufferGetClusterLevel                   ,


-- ** bufferGetContentType #method:bufferGetContentType#

    bufferGetContentType                    ,


-- ** bufferGetDirection #method:bufferGetDirection#

    bufferGetDirection                      ,


-- ** bufferGetEmpty #method:bufferGetEmpty#

    bufferGetEmpty                          ,


-- ** bufferGetFlags #method:bufferGetFlags#

    bufferGetFlags                          ,


-- ** bufferGetGlyphInfos #method:bufferGetGlyphInfos#

    bufferGetGlyphInfos                     ,


-- ** bufferGetGlyphPositions #method:bufferGetGlyphPositions#

    bufferGetGlyphPositions                 ,


-- ** bufferGetInvisibleGlyph #method:bufferGetInvisibleGlyph#

    bufferGetInvisibleGlyph                 ,


-- ** bufferGetLanguage #method:bufferGetLanguage#

    bufferGetLanguage                       ,


-- ** bufferGetLength #method:bufferGetLength#

    bufferGetLength                         ,


-- ** bufferGetReplacementCodepoint #method:bufferGetReplacementCodepoint#

    bufferGetReplacementCodepoint           ,


-- ** bufferGetScript #method:bufferGetScript#

    bufferGetScript                         ,


-- ** bufferGetSegmentProperties #method:bufferGetSegmentProperties#

    bufferGetSegmentProperties              ,


-- ** bufferGetUnicodeFuncs #method:bufferGetUnicodeFuncs#

    bufferGetUnicodeFuncs                   ,


-- ** bufferGuessSegmentProperties #method:bufferGuessSegmentProperties#

    bufferGuessSegmentProperties            ,


-- ** bufferNormalizeGlyphs #method:bufferNormalizeGlyphs#

    bufferNormalizeGlyphs                   ,


-- ** bufferPreAllocate #method:bufferPreAllocate#

    bufferPreAllocate                       ,


-- ** bufferReset #method:bufferReset#

    bufferReset                             ,


-- ** bufferReverse #method:bufferReverse#

    bufferReverse                           ,


-- ** bufferReverseClusters #method:bufferReverseClusters#

    bufferReverseClusters                   ,


-- ** bufferReverseRange #method:bufferReverseRange#

    bufferReverseRange                      ,


-- ** bufferSerializeFormatFromString #method:bufferSerializeFormatFromString#

    bufferSerializeFormatFromString         ,


-- ** bufferSerializeFormatToString #method:bufferSerializeFormatToString#

    bufferSerializeFormatToString           ,


-- ** bufferSerializeGlyphs #method:bufferSerializeGlyphs#

    bufferSerializeGlyphs                   ,


-- ** bufferSerializeListFormats #method:bufferSerializeListFormats#

    bufferSerializeListFormats              ,


-- ** bufferSetClusterLevel #method:bufferSetClusterLevel#

    bufferSetClusterLevel                   ,


-- ** bufferSetContentType #method:bufferSetContentType#

    bufferSetContentType                    ,


-- ** bufferSetDirection #method:bufferSetDirection#

    bufferSetDirection                      ,


-- ** bufferSetFlags #method:bufferSetFlags#

    bufferSetFlags                          ,


-- ** bufferSetInvisibleGlyph #method:bufferSetInvisibleGlyph#

    bufferSetInvisibleGlyph                 ,


-- ** bufferSetLanguage #method:bufferSetLanguage#

    bufferSetLanguage                       ,


-- ** bufferSetLength #method:bufferSetLength#

    bufferSetLength                         ,


-- ** bufferSetMessageFunc #method:bufferSetMessageFunc#

    bufferSetMessageFunc                    ,


-- ** bufferSetReplacementCodepoint #method:bufferSetReplacementCodepoint#

    bufferSetReplacementCodepoint           ,


-- ** bufferSetScript #method:bufferSetScript#

    bufferSetScript                         ,


-- ** bufferSetSegmentProperties #method:bufferSetSegmentProperties#

    bufferSetSegmentProperties              ,


-- ** bufferSetUnicodeFuncs #method:bufferSetUnicodeFuncs#

    bufferSetUnicodeFuncs                   ,


-- ** colorGetAlpha #method:colorGetAlpha#

    colorGetAlpha                           ,


-- ** colorGetBlue #method:colorGetBlue#

    colorGetBlue                            ,


-- ** colorGetGreen #method:colorGetGreen#

    colorGetGreen                           ,


-- ** colorGetRed #method:colorGetRed#

    colorGetRed                             ,


-- ** directionFromString #method:directionFromString#

    directionFromString                     ,


-- ** directionToString #method:directionToString#

    directionToString                       ,


-- ** faceBuilderAddTable #method:faceBuilderAddTable#

    faceBuilderAddTable                     ,


-- ** faceBuilderCreate #method:faceBuilderCreate#

    faceBuilderCreate                       ,


-- ** faceCollectUnicodes #method:faceCollectUnicodes#

    faceCollectUnicodes                     ,


-- ** faceCollectVariationSelectors #method:faceCollectVariationSelectors#

    faceCollectVariationSelectors           ,


-- ** faceCollectVariationUnicodes #method:faceCollectVariationUnicodes#

    faceCollectVariationUnicodes            ,


-- ** faceCount #method:faceCount#

    faceCount                               ,


-- ** faceCreate #method:faceCreate#

    faceCreate                              ,


-- ** faceCreateForTables #method:faceCreateForTables#

    faceCreateForTables                     ,


-- ** faceGetEmpty #method:faceGetEmpty#

    faceGetEmpty                            ,


-- ** faceGetGlyphCount #method:faceGetGlyphCount#

    faceGetGlyphCount                       ,


-- ** faceGetIndex #method:faceGetIndex#

    faceGetIndex                            ,


-- ** faceGetTableTags #method:faceGetTableTags#

    faceGetTableTags                        ,


-- ** faceGetUpem #method:faceGetUpem#

    faceGetUpem                             ,


-- ** faceIsImmutable #method:faceIsImmutable#

    faceIsImmutable                         ,


-- ** faceMakeImmutable #method:faceMakeImmutable#

    faceMakeImmutable                       ,


-- ** faceReferenceBlob #method:faceReferenceBlob#

    faceReferenceBlob                       ,


-- ** faceReferenceTable #method:faceReferenceTable#

    faceReferenceTable                      ,


-- ** faceSetGlyphCount #method:faceSetGlyphCount#

    faceSetGlyphCount                       ,


-- ** faceSetIndex #method:faceSetIndex#

    faceSetIndex                            ,


-- ** faceSetUpem #method:faceSetUpem#

    faceSetUpem                             ,


-- ** featureFromString #method:featureFromString#

    featureFromString                       ,


-- ** featureToString #method:featureToString#

    featureToString                         ,


-- ** fontAddGlyphOriginForDirection #method:fontAddGlyphOriginForDirection#

    fontAddGlyphOriginForDirection          ,


-- ** fontCreate #method:fontCreate#

    fontCreate                              ,


-- ** fontCreateSubFont #method:fontCreateSubFont#

    fontCreateSubFont                       ,


-- ** fontFuncsCreate #method:fontFuncsCreate#

    fontFuncsCreate                         ,


-- ** fontFuncsGetEmpty #method:fontFuncsGetEmpty#

    fontFuncsGetEmpty                       ,


-- ** fontFuncsIsImmutable #method:fontFuncsIsImmutable#

    fontFuncsIsImmutable                    ,


-- ** fontFuncsMakeImmutable #method:fontFuncsMakeImmutable#

    fontFuncsMakeImmutable                  ,


-- ** fontFuncsSetFontHExtentsFunc #method:fontFuncsSetFontHExtentsFunc#

    fontFuncsSetFontHExtentsFunc            ,


-- ** fontFuncsSetFontVExtentsFunc #method:fontFuncsSetFontVExtentsFunc#

    fontFuncsSetFontVExtentsFunc            ,


-- ** fontFuncsSetGlyphContourPointFunc #method:fontFuncsSetGlyphContourPointFunc#

    fontFuncsSetGlyphContourPointFunc       ,


-- ** fontFuncsSetGlyphExtentsFunc #method:fontFuncsSetGlyphExtentsFunc#

    fontFuncsSetGlyphExtentsFunc            ,


-- ** fontFuncsSetGlyphFromNameFunc #method:fontFuncsSetGlyphFromNameFunc#

    fontFuncsSetGlyphFromNameFunc           ,


-- ** fontFuncsSetGlyphFunc #method:fontFuncsSetGlyphFunc#

    fontFuncsSetGlyphFunc                   ,


-- ** fontFuncsSetGlyphHAdvanceFunc #method:fontFuncsSetGlyphHAdvanceFunc#

    fontFuncsSetGlyphHAdvanceFunc           ,


-- ** fontFuncsSetGlyphHAdvancesFunc #method:fontFuncsSetGlyphHAdvancesFunc#

    fontFuncsSetGlyphHAdvancesFunc          ,


-- ** fontFuncsSetGlyphHKerningFunc #method:fontFuncsSetGlyphHKerningFunc#

    fontFuncsSetGlyphHKerningFunc           ,


-- ** fontFuncsSetGlyphHOriginFunc #method:fontFuncsSetGlyphHOriginFunc#

    fontFuncsSetGlyphHOriginFunc            ,


-- ** fontFuncsSetGlyphNameFunc #method:fontFuncsSetGlyphNameFunc#

    fontFuncsSetGlyphNameFunc               ,


-- ** fontFuncsSetGlyphVAdvanceFunc #method:fontFuncsSetGlyphVAdvanceFunc#

    fontFuncsSetGlyphVAdvanceFunc           ,


-- ** fontFuncsSetGlyphVAdvancesFunc #method:fontFuncsSetGlyphVAdvancesFunc#

    fontFuncsSetGlyphVAdvancesFunc          ,


-- ** fontFuncsSetGlyphVKerningFunc #method:fontFuncsSetGlyphVKerningFunc#

    fontFuncsSetGlyphVKerningFunc           ,


-- ** fontFuncsSetGlyphVOriginFunc #method:fontFuncsSetGlyphVOriginFunc#

    fontFuncsSetGlyphVOriginFunc            ,


-- ** fontFuncsSetNominalGlyphFunc #method:fontFuncsSetNominalGlyphFunc#

    fontFuncsSetNominalGlyphFunc            ,


-- ** fontFuncsSetNominalGlyphsFunc #method:fontFuncsSetNominalGlyphsFunc#

    fontFuncsSetNominalGlyphsFunc           ,


-- ** fontFuncsSetVariationGlyphFunc #method:fontFuncsSetVariationGlyphFunc#

    fontFuncsSetVariationGlyphFunc          ,


-- ** fontGetEmpty #method:fontGetEmpty#

    fontGetEmpty                            ,


-- ** fontGetExtentsForDirection #method:fontGetExtentsForDirection#

    fontGetExtentsForDirection              ,


-- ** fontGetFace #method:fontGetFace#

    fontGetFace                             ,


-- ** fontGetGlyph #method:fontGetGlyph#

    fontGetGlyph                            ,


-- ** fontGetGlyphAdvanceForDirection #method:fontGetGlyphAdvanceForDirection#

    fontGetGlyphAdvanceForDirection         ,


-- ** fontGetGlyphAdvancesForDirection #method:fontGetGlyphAdvancesForDirection#

    fontGetGlyphAdvancesForDirection        ,


-- ** fontGetGlyphContourPoint #method:fontGetGlyphContourPoint#

    fontGetGlyphContourPoint                ,


-- ** fontGetGlyphContourPointForOrigin #method:fontGetGlyphContourPointForOrigin#

    fontGetGlyphContourPointForOrigin       ,


-- ** fontGetGlyphExtents #method:fontGetGlyphExtents#

    fontGetGlyphExtents                     ,


-- ** fontGetGlyphExtentsForOrigin #method:fontGetGlyphExtentsForOrigin#

    fontGetGlyphExtentsForOrigin            ,


-- ** fontGetGlyphFromName #method:fontGetGlyphFromName#

    fontGetGlyphFromName                    ,


-- ** fontGetGlyphHAdvance #method:fontGetGlyphHAdvance#

    fontGetGlyphHAdvance                    ,


-- ** fontGetGlyphHAdvances #method:fontGetGlyphHAdvances#

    fontGetGlyphHAdvances                   ,


-- ** fontGetGlyphHKerning #method:fontGetGlyphHKerning#

    fontGetGlyphHKerning                    ,


-- ** fontGetGlyphHOrigin #method:fontGetGlyphHOrigin#

    fontGetGlyphHOrigin                     ,


-- ** fontGetGlyphKerningForDirection #method:fontGetGlyphKerningForDirection#

    fontGetGlyphKerningForDirection         ,


-- ** fontGetGlyphName #method:fontGetGlyphName#

    fontGetGlyphName                        ,


-- ** fontGetGlyphOriginForDirection #method:fontGetGlyphOriginForDirection#

    fontGetGlyphOriginForDirection          ,


-- ** fontGetGlyphVAdvance #method:fontGetGlyphVAdvance#

    fontGetGlyphVAdvance                    ,


-- ** fontGetGlyphVAdvances #method:fontGetGlyphVAdvances#

    fontGetGlyphVAdvances                   ,


-- ** fontGetGlyphVKerning #method:fontGetGlyphVKerning#

    fontGetGlyphVKerning                    ,


-- ** fontGetGlyphVOrigin #method:fontGetGlyphVOrigin#

    fontGetGlyphVOrigin                     ,


-- ** fontGetHExtents #method:fontGetHExtents#

    fontGetHExtents                         ,


-- ** fontGetNominalGlyph #method:fontGetNominalGlyph#

    fontGetNominalGlyph                     ,


-- ** fontGetNominalGlyphs #method:fontGetNominalGlyphs#

    fontGetNominalGlyphs                    ,


-- ** fontGetParent #method:fontGetParent#

    fontGetParent                           ,


-- ** fontGetPpem #method:fontGetPpem#

    fontGetPpem                             ,


-- ** fontGetPtem #method:fontGetPtem#

    fontGetPtem                             ,


-- ** fontGetScale #method:fontGetScale#

    fontGetScale                            ,


-- ** fontGetVExtents #method:fontGetVExtents#

    fontGetVExtents                         ,


-- ** fontGetVarCoordsNormalized #method:fontGetVarCoordsNormalized#

    fontGetVarCoordsNormalized              ,


-- ** fontGetVariationGlyph #method:fontGetVariationGlyph#

    fontGetVariationGlyph                   ,


-- ** fontGlyphFromString #method:fontGlyphFromString#

    fontGlyphFromString                     ,


-- ** fontGlyphToString #method:fontGlyphToString#

    fontGlyphToString                       ,


-- ** fontIsImmutable #method:fontIsImmutable#

    fontIsImmutable                         ,


-- ** fontMakeImmutable #method:fontMakeImmutable#

    fontMakeImmutable                       ,


-- ** fontSetFace #method:fontSetFace#

    fontSetFace                             ,


-- ** fontSetFuncs #method:fontSetFuncs#

    fontSetFuncs                            ,


-- ** fontSetFuncsData #method:fontSetFuncsData#

    fontSetFuncsData                        ,


-- ** fontSetParent #method:fontSetParent#

    fontSetParent                           ,


-- ** fontSetPpem #method:fontSetPpem#

    fontSetPpem                             ,


-- ** fontSetPtem #method:fontSetPtem#

    fontSetPtem                             ,


-- ** fontSetScale #method:fontSetScale#

    fontSetScale                            ,


-- ** fontSetVarCoordsDesign #method:fontSetVarCoordsDesign#

    fontSetVarCoordsDesign                  ,


-- ** fontSetVarCoordsNormalized #method:fontSetVarCoordsNormalized#

    fontSetVarCoordsNormalized              ,


-- ** fontSetVarNamedInstance #method:fontSetVarNamedInstance#

    fontSetVarNamedInstance                 ,


-- ** fontSetVariations #method:fontSetVariations#

    fontSetVariations                       ,


-- ** fontSubtractGlyphOriginForDirection #method:fontSubtractGlyphOriginForDirection#

    fontSubtractGlyphOriginForDirection     ,


-- ** ftFontChanged #method:ftFontChanged#

    ftFontChanged                           ,


-- ** ftFontGetLoadFlags #method:ftFontGetLoadFlags#

    ftFontGetLoadFlags                      ,


-- ** ftFontSetFuncs #method:ftFontSetFuncs#

    ftFontSetFuncs                          ,


-- ** ftFontSetLoadFlags #method:ftFontSetLoadFlags#

    ftFontSetLoadFlags                      ,


-- ** glibBlobCreate #method:glibBlobCreate#

    glibBlobCreate                          ,


-- ** glibGetUnicodeFuncs #method:glibGetUnicodeFuncs#

    glibGetUnicodeFuncs                     ,


-- ** glibScriptFromScript #method:glibScriptFromScript#

    glibScriptFromScript                    ,


-- ** glibScriptToScript #method:glibScriptToScript#

    glibScriptToScript                      ,


-- ** glyphInfoGetGlyphFlags #method:glyphInfoGetGlyphFlags#

    glyphInfoGetGlyphFlags                  ,


-- ** languageFromString #method:languageFromString#

    languageFromString                      ,


-- ** languageGetDefault #method:languageGetDefault#

    languageGetDefault                      ,


-- ** languageToString #method:languageToString#

    languageToString                        ,


-- ** mapAllocationSuccessful #method:mapAllocationSuccessful#

    mapAllocationSuccessful                 ,


-- ** mapClear #method:mapClear#

    mapClear                                ,


-- ** mapCreate #method:mapCreate#

    mapCreate                               ,


-- ** mapDel #method:mapDel#

    mapDel                                  ,


-- ** mapGet #method:mapGet#

    mapGet                                  ,


-- ** mapGetEmpty #method:mapGetEmpty#

    mapGetEmpty                             ,


-- ** mapGetPopulation #method:mapGetPopulation#

    mapGetPopulation                        ,


-- ** mapHas #method:mapHas#

    mapHas                                  ,


-- ** mapIsEmpty #method:mapIsEmpty#

    mapIsEmpty                              ,


-- ** mapSet #method:mapSet#

    mapSet                                  ,


-- ** otColorGlyphGetLayers #method:otColorGlyphGetLayers#

    otColorGlyphGetLayers                   ,


-- ** otColorGlyphReferencePng #method:otColorGlyphReferencePng#

    otColorGlyphReferencePng                ,


-- ** otColorGlyphReferenceSvg #method:otColorGlyphReferenceSvg#

    otColorGlyphReferenceSvg                ,


-- ** otColorHasLayers #method:otColorHasLayers#

    otColorHasLayers                        ,


-- ** otColorHasPalettes #method:otColorHasPalettes#

    otColorHasPalettes                      ,


-- ** otColorHasPng #method:otColorHasPng#

    otColorHasPng                           ,


-- ** otColorHasSvg #method:otColorHasSvg#

    otColorHasSvg                           ,


-- ** otColorPaletteColorGetNameId #method:otColorPaletteColorGetNameId#

    otColorPaletteColorGetNameId            ,


-- ** otColorPaletteGetColors #method:otColorPaletteGetColors#

    otColorPaletteGetColors                 ,


-- ** otColorPaletteGetCount #method:otColorPaletteGetCount#

    otColorPaletteGetCount                  ,


-- ** otColorPaletteGetFlags #method:otColorPaletteGetFlags#

    otColorPaletteGetFlags                  ,


-- ** otColorPaletteGetNameId #method:otColorPaletteGetNameId#

    otColorPaletteGetNameId                 ,


-- ** otFontSetFuncs #method:otFontSetFuncs#

    otFontSetFuncs                          ,


-- ** otLayoutFeatureGetCharacters #method:otLayoutFeatureGetCharacters#

    otLayoutFeatureGetCharacters            ,


-- ** otLayoutFeatureGetLookups #method:otLayoutFeatureGetLookups#

    otLayoutFeatureGetLookups               ,


-- ** otLayoutFeatureGetNameIds #method:otLayoutFeatureGetNameIds#

    otLayoutFeatureGetNameIds               ,


-- ** otLayoutFeatureWithVariationsGetLookups #method:otLayoutFeatureWithVariationsGetLookups#

    otLayoutFeatureWithVariationsGetLookups ,


-- ** otLayoutGetAttachPoints #method:otLayoutGetAttachPoints#

    otLayoutGetAttachPoints                 ,


-- ** otLayoutGetBaseline #method:otLayoutGetBaseline#

    otLayoutGetBaseline                     ,


-- ** otLayoutGetGlyphClass #method:otLayoutGetGlyphClass#

    otLayoutGetGlyphClass                   ,


-- ** otLayoutGetLigatureCarets #method:otLayoutGetLigatureCarets#

    otLayoutGetLigatureCarets               ,


-- ** otLayoutGetSizeParams #method:otLayoutGetSizeParams#

    otLayoutGetSizeParams                   ,


-- ** otLayoutHasGlyphClasses #method:otLayoutHasGlyphClasses#

    otLayoutHasGlyphClasses                 ,


-- ** otLayoutHasPositioning #method:otLayoutHasPositioning#

    otLayoutHasPositioning                  ,


-- ** otLayoutHasSubstitution #method:otLayoutHasSubstitution#

    otLayoutHasSubstitution                 ,


-- ** otLayoutLanguageFindFeature #method:otLayoutLanguageFindFeature#

    otLayoutLanguageFindFeature             ,


-- ** otLayoutLanguageGetFeatureIndexes #method:otLayoutLanguageGetFeatureIndexes#

    otLayoutLanguageGetFeatureIndexes       ,


-- ** otLayoutLanguageGetFeatureTags #method:otLayoutLanguageGetFeatureTags#

    otLayoutLanguageGetFeatureTags          ,


-- ** otLayoutLanguageGetRequiredFeature #method:otLayoutLanguageGetRequiredFeature#

    otLayoutLanguageGetRequiredFeature      ,


-- ** otLayoutLanguageGetRequiredFeatureIndex #method:otLayoutLanguageGetRequiredFeatureIndex#

    otLayoutLanguageGetRequiredFeatureIndex ,


-- ** otLayoutLookupWouldSubstitute #method:otLayoutLookupWouldSubstitute#

    otLayoutLookupWouldSubstitute           ,


-- ** otLayoutScriptFindLanguage #method:otLayoutScriptFindLanguage#

    otLayoutScriptFindLanguage              ,


-- ** otLayoutScriptGetLanguageTags #method:otLayoutScriptGetLanguageTags#

    otLayoutScriptGetLanguageTags           ,


-- ** otLayoutScriptSelectLanguage #method:otLayoutScriptSelectLanguage#

    otLayoutScriptSelectLanguage            ,


-- ** otLayoutTableChooseScript #method:otLayoutTableChooseScript#

    otLayoutTableChooseScript               ,


-- ** otLayoutTableFindFeatureVariations #method:otLayoutTableFindFeatureVariations#

    otLayoutTableFindFeatureVariations      ,


-- ** otLayoutTableFindScript #method:otLayoutTableFindScript#

    otLayoutTableFindScript                 ,


-- ** otLayoutTableGetFeatureTags #method:otLayoutTableGetFeatureTags#

    otLayoutTableGetFeatureTags             ,


-- ** otLayoutTableGetLookupCount #method:otLayoutTableGetLookupCount#

    otLayoutTableGetLookupCount             ,


-- ** otLayoutTableGetScriptTags #method:otLayoutTableGetScriptTags#

    otLayoutTableGetScriptTags              ,


-- ** otLayoutTableSelectScript #method:otLayoutTableSelectScript#

    otLayoutTableSelectScript               ,


-- ** otMathGetConstant #method:otMathGetConstant#

    otMathGetConstant                       ,


-- ** otMathGetGlyphAssembly #method:otMathGetGlyphAssembly#

    otMathGetGlyphAssembly                  ,


-- ** otMathGetGlyphItalicsCorrection #method:otMathGetGlyphItalicsCorrection#

    otMathGetGlyphItalicsCorrection         ,


-- ** otMathGetGlyphKerning #method:otMathGetGlyphKerning#

    otMathGetGlyphKerning                   ,


-- ** otMathGetGlyphTopAccentAttachment #method:otMathGetGlyphTopAccentAttachment#

    otMathGetGlyphTopAccentAttachment       ,


-- ** otMathGetGlyphVariants #method:otMathGetGlyphVariants#

    otMathGetGlyphVariants                  ,


-- ** otMathGetMinConnectorOverlap #method:otMathGetMinConnectorOverlap#

    otMathGetMinConnectorOverlap            ,


-- ** otMathHasData #method:otMathHasData#

    otMathHasData                           ,


-- ** otMathIsGlyphExtendedShape #method:otMathIsGlyphExtendedShape#

    otMathIsGlyphExtendedShape              ,


-- ** otMetaGetEntryTags #method:otMetaGetEntryTags#

    otMetaGetEntryTags                      ,


-- ** otMetaReferenceEntry #method:otMetaReferenceEntry#

    otMetaReferenceEntry                    ,


-- ** otMetricsGetPosition #method:otMetricsGetPosition#

    otMetricsGetPosition                    ,


-- ** otMetricsGetVariation #method:otMetricsGetVariation#

    otMetricsGetVariation                   ,


-- ** otMetricsGetXVariation #method:otMetricsGetXVariation#

    otMetricsGetXVariation                  ,


-- ** otMetricsGetYVariation #method:otMetricsGetYVariation#

    otMetricsGetYVariation                  ,


-- ** otNameGetUtf16 #method:otNameGetUtf16#

    otNameGetUtf16                          ,


-- ** otNameGetUtf32 #method:otNameGetUtf32#

    otNameGetUtf32                          ,


-- ** otNameGetUtf8 #method:otNameGetUtf8#

    otNameGetUtf8                           ,


-- ** otNameListNames #method:otNameListNames#

    otNameListNames                         ,


-- ** otShapeGlyphsClosure #method:otShapeGlyphsClosure#

    otShapeGlyphsClosure                    ,


-- ** otTagFromLanguage #method:otTagFromLanguage#

    otTagFromLanguage                       ,


-- ** otTagToLanguage #method:otTagToLanguage#

    otTagToLanguage                         ,


-- ** otTagToScript #method:otTagToScript#

    otTagToScript                           ,


-- ** otTagsFromScript #method:otTagsFromScript#

    otTagsFromScript                        ,


-- ** otTagsFromScriptAndLanguage #method:otTagsFromScriptAndLanguage#

    otTagsFromScriptAndLanguage             ,


-- ** otTagsToScriptAndLanguage #method:otTagsToScriptAndLanguage#

    otTagsToScriptAndLanguage               ,


-- ** otVarFindAxis #method:otVarFindAxis#

    otVarFindAxis                           ,


-- ** otVarFindAxisInfo #method:otVarFindAxisInfo#

    otVarFindAxisInfo                       ,


-- ** otVarGetAxes #method:otVarGetAxes#

    otVarGetAxes                            ,


-- ** otVarGetAxisCount #method:otVarGetAxisCount#

    otVarGetAxisCount                       ,


-- ** otVarGetAxisInfos #method:otVarGetAxisInfos#

    otVarGetAxisInfos                       ,


-- ** otVarGetNamedInstanceCount #method:otVarGetNamedInstanceCount#

    otVarGetNamedInstanceCount              ,


-- ** otVarHasData #method:otVarHasData#

    otVarHasData                            ,


-- ** otVarNamedInstanceGetDesignCoords #method:otVarNamedInstanceGetDesignCoords#

    otVarNamedInstanceGetDesignCoords       ,


-- ** otVarNamedInstanceGetPostscriptNameId #method:otVarNamedInstanceGetPostscriptNameId#

    otVarNamedInstanceGetPostscriptNameId   ,


-- ** otVarNamedInstanceGetSubfamilyNameId #method:otVarNamedInstanceGetSubfamilyNameId#

    otVarNamedInstanceGetSubfamilyNameId    ,


-- ** otVarNormalizeCoords #method:otVarNormalizeCoords#

    otVarNormalizeCoords                    ,


-- ** otVarNormalizeVariations #method:otVarNormalizeVariations#

    otVarNormalizeVariations                ,


-- ** scriptFromIso15924Tag #method:scriptFromIso15924Tag#

    scriptFromIso15924Tag                   ,


-- ** scriptFromString #method:scriptFromString#

    scriptFromString                        ,


-- ** scriptGetHorizontalDirection #method:scriptGetHorizontalDirection#

    scriptGetHorizontalDirection            ,


-- ** scriptToIso15924Tag #method:scriptToIso15924Tag#

    scriptToIso15924Tag                     ,


-- ** segmentPropertiesEqual #method:segmentPropertiesEqual#

    segmentPropertiesEqual                  ,


-- ** segmentPropertiesHash #method:segmentPropertiesHash#

    segmentPropertiesHash                   ,


-- ** setAdd #method:setAdd#

    setAdd                                  ,


-- ** setAddRange #method:setAddRange#

    setAddRange                             ,


-- ** setAllocationSuccessful #method:setAllocationSuccessful#

    setAllocationSuccessful                 ,


-- ** setClear #method:setClear#

    setClear                                ,


-- ** setCreate #method:setCreate#

    setCreate                               ,


-- ** setDel #method:setDel#

    setDel                                  ,


-- ** setDelRange #method:setDelRange#

    setDelRange                             ,


-- ** setGetEmpty #method:setGetEmpty#

    setGetEmpty                             ,


-- ** setGetMax #method:setGetMax#

    setGetMax                               ,


-- ** setGetMin #method:setGetMin#

    setGetMin                               ,


-- ** setGetPopulation #method:setGetPopulation#

    setGetPopulation                        ,


-- ** setHas #method:setHas#

    setHas                                  ,


-- ** setIntersect #method:setIntersect#

    setIntersect                            ,


-- ** setInvert #method:setInvert#

    setInvert                               ,


-- ** setIsEmpty #method:setIsEmpty#

    setIsEmpty                              ,


-- ** setIsEqual #method:setIsEqual#

    setIsEqual                              ,


-- ** setIsSubset #method:setIsSubset#

    setIsSubset                             ,


-- ** setNext #method:setNext#

    setNext                                 ,


-- ** setNextRange #method:setNextRange#

    setNextRange                            ,


-- ** setPrevious #method:setPrevious#

    setPrevious                             ,


-- ** setPreviousRange #method:setPreviousRange#

    setPreviousRange                        ,


-- ** setSet #method:setSet#

    setSet                                  ,


-- ** setSubtract #method:setSubtract#

    setSubtract                             ,


-- ** setSymmetricDifference #method:setSymmetricDifference#

    setSymmetricDifference                  ,


-- ** setUnion #method:setUnion#

    setUnion                                ,


-- ** shape #method:shape#

    shape                                   ,


-- ** shapeFull #method:shapeFull#

    shapeFull                               ,


-- ** shapeListShapers #method:shapeListShapers#

    shapeListShapers                        ,


-- ** shapePlanCreate #method:shapePlanCreate#

    shapePlanCreate                         ,


-- ** shapePlanCreate2 #method:shapePlanCreate2#

    shapePlanCreate2                        ,


-- ** shapePlanCreateCached #method:shapePlanCreateCached#

    shapePlanCreateCached                   ,


-- ** shapePlanCreateCached2 #method:shapePlanCreateCached2#

    shapePlanCreateCached2                  ,


-- ** shapePlanExecute #method:shapePlanExecute#

    shapePlanExecute                        ,


-- ** shapePlanGetEmpty #method:shapePlanGetEmpty#

    shapePlanGetEmpty                       ,


-- ** shapePlanGetShaper #method:shapePlanGetShaper#

    shapePlanGetShaper                      ,


-- ** tagFromString #method:tagFromString#

    tagFromString                           ,


-- ** unicodeCombiningClass #method:unicodeCombiningClass#

    unicodeCombiningClass                   ,


-- ** unicodeCompose #method:unicodeCompose#

    unicodeCompose                          ,


-- ** unicodeDecompose #method:unicodeDecompose#

    unicodeDecompose                        ,


-- ** unicodeDecomposeCompatibility #method:unicodeDecomposeCompatibility#

    unicodeDecomposeCompatibility           ,


-- ** unicodeEastasianWidth #method:unicodeEastasianWidth#

    unicodeEastasianWidth                   ,


-- ** unicodeFuncsCreate #method:unicodeFuncsCreate#

    unicodeFuncsCreate                      ,


-- ** unicodeFuncsGetDefault #method:unicodeFuncsGetDefault#

    unicodeFuncsGetDefault                  ,


-- ** unicodeFuncsGetEmpty #method:unicodeFuncsGetEmpty#

    unicodeFuncsGetEmpty                    ,


-- ** unicodeFuncsGetParent #method:unicodeFuncsGetParent#

    unicodeFuncsGetParent                   ,


-- ** unicodeFuncsIsImmutable #method:unicodeFuncsIsImmutable#

    unicodeFuncsIsImmutable                 ,


-- ** unicodeFuncsMakeImmutable #method:unicodeFuncsMakeImmutable#

    unicodeFuncsMakeImmutable               ,


-- ** unicodeFuncsSetCombiningClassFunc #method:unicodeFuncsSetCombiningClassFunc#

    unicodeFuncsSetCombiningClassFunc       ,


-- ** unicodeFuncsSetComposeFunc #method:unicodeFuncsSetComposeFunc#

    unicodeFuncsSetComposeFunc              ,


-- ** unicodeFuncsSetDecomposeCompatibilityFunc #method:unicodeFuncsSetDecomposeCompatibilityFunc#

    unicodeFuncsSetDecomposeCompatibilityFunc,


-- ** unicodeFuncsSetDecomposeFunc #method:unicodeFuncsSetDecomposeFunc#

    unicodeFuncsSetDecomposeFunc            ,


-- ** unicodeFuncsSetEastasianWidthFunc #method:unicodeFuncsSetEastasianWidthFunc#

    unicodeFuncsSetEastasianWidthFunc       ,


-- ** unicodeFuncsSetGeneralCategoryFunc #method:unicodeFuncsSetGeneralCategoryFunc#

    unicodeFuncsSetGeneralCategoryFunc      ,


-- ** unicodeFuncsSetMirroringFunc #method:unicodeFuncsSetMirroringFunc#

    unicodeFuncsSetMirroringFunc            ,


-- ** unicodeFuncsSetScriptFunc #method:unicodeFuncsSetScriptFunc#

    unicodeFuncsSetScriptFunc               ,


-- ** unicodeGeneralCategory #method:unicodeGeneralCategory#

    unicodeGeneralCategory                  ,


-- ** unicodeMirroring #method:unicodeMirroring#

    unicodeMirroring                        ,


-- ** unicodeScript #method:unicodeScript#

    unicodeScript                           ,


-- ** variationFromString #method:variationFromString#

    variationFromString                     ,


-- ** variationToString #method:variationToString#

    variationToString                       ,


-- ** version #method:version#

    version                                 ,


-- ** versionAtleast #method:versionAtleast#

    versionAtleast                          ,


-- ** versionString #method:versionString#

    versionString                           ,




    ) where

import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P

import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL

import qualified GI.GLib.Enums as GLib.Enums
import qualified GI.GLib.Structs.Bytes as GLib.Bytes
import qualified GI.HarfBuzz.Callbacks as HarfBuzz.Callbacks
import {-# SOURCE #-} qualified GI.HarfBuzz.Enums as HarfBuzz.Enums
import {-# SOURCE #-} qualified GI.HarfBuzz.Flags as HarfBuzz.Flags
import {-# SOURCE #-} qualified GI.HarfBuzz.Structs.BlobT as HarfBuzz.BlobT
import {-# SOURCE #-} qualified GI.HarfBuzz.Structs.BufferT as HarfBuzz.BufferT
import {-# SOURCE #-} qualified GI.HarfBuzz.Structs.FaceT as HarfBuzz.FaceT
import {-# SOURCE #-} qualified GI.HarfBuzz.Structs.FeatureT as HarfBuzz.FeatureT
import {-# SOURCE #-} qualified GI.HarfBuzz.Structs.FontExtentsT as HarfBuzz.FontExtentsT
import {-# SOURCE #-} qualified GI.HarfBuzz.Structs.FontFuncsT as HarfBuzz.FontFuncsT
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.GlyphInfoT as HarfBuzz.GlyphInfoT
import {-# SOURCE #-} qualified GI.HarfBuzz.Structs.GlyphPositionT as HarfBuzz.GlyphPositionT
import {-# SOURCE #-} qualified GI.HarfBuzz.Structs.LanguageT as HarfBuzz.LanguageT
import {-# SOURCE #-} qualified GI.HarfBuzz.Structs.MapT as HarfBuzz.MapT
import {-# SOURCE #-} qualified GI.HarfBuzz.Structs.OtColorLayerT as HarfBuzz.OtColorLayerT
import {-# SOURCE #-} qualified GI.HarfBuzz.Structs.OtMathGlyphPartT as HarfBuzz.OtMathGlyphPartT
import {-# SOURCE #-} qualified GI.HarfBuzz.Structs.OtMathGlyphVariantT as HarfBuzz.OtMathGlyphVariantT
import {-# SOURCE #-} qualified GI.HarfBuzz.Structs.OtNameEntryT as HarfBuzz.OtNameEntryT
import {-# SOURCE #-} qualified GI.HarfBuzz.Structs.OtVarAxisInfoT as HarfBuzz.OtVarAxisInfoT
import {-# SOURCE #-} qualified GI.HarfBuzz.Structs.OtVarAxisT as HarfBuzz.OtVarAxisT
import {-# SOURCE #-} qualified GI.HarfBuzz.Structs.SegmentPropertiesT as HarfBuzz.SegmentPropertiesT
import {-# SOURCE #-} qualified GI.HarfBuzz.Structs.SetT as HarfBuzz.SetT
import {-# SOURCE #-} qualified GI.HarfBuzz.Structs.ShapePlanT as HarfBuzz.ShapePlanT
import {-# SOURCE #-} qualified GI.HarfBuzz.Structs.UnicodeFuncsT as HarfBuzz.UnicodeFuncsT
import {-# SOURCE #-} qualified GI.HarfBuzz.Structs.VariationT as HarfBuzz.VariationT

-- function version_string
-- Args: []
-- Lengths: []
-- returnType: Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "hb_version_string" hb_version_string :: 
    IO CString

-- | Returns library version as a string with three components.
-- 
-- /Since: 0.9.2/
versionString ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m T.Text
    -- ^ __Returns:__ library version string.
versionString :: m Text
versionString  = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
    CString
result <- IO CString
hb_version_string
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"versionString" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'


-- function version_atleast
-- Args: [ Arg
--           { argCName = "major"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "minor"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "micro"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_version_atleast" hb_version_atleast :: 
    Word32 ->                               -- major : TBasicType TUInt
    Word32 ->                               -- minor : TBasicType TUInt
    Word32 ->                               -- micro : TBasicType TUInt
    IO Int32

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.30/
versionAtleast ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Word32
    -> Word32
    -> Word32
    -> m Int32
versionAtleast :: Word32 -> Word32 -> Word32 -> m Int32
versionAtleast Word32
major Word32
minor Word32
micro = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Int32
result <- Word32 -> Word32 -> Word32 -> IO Int32
hb_version_atleast Word32
major Word32
minor Word32
micro
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function version
-- Args: [ Arg
--           { argCName = "major"
--           , argType = TBasicType TUInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Library major version component."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "minor"
--           , argType = TBasicType TUInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Library minor version component."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "micro"
--           , argType = TBasicType TUInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Library micro version component."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_version" hb_version :: 
    Ptr Word32 ->                           -- major : TBasicType TUInt
    Ptr Word32 ->                           -- minor : TBasicType TUInt
    Ptr Word32 ->                           -- micro : TBasicType TUInt
    IO ()

-- | Returns library version as three integer components.
-- 
-- /Since: 0.9.2/
version ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m ((Word32, Word32, Word32))
version :: m (Word32, Word32, Word32)
version  = IO (Word32, Word32, Word32) -> m (Word32, Word32, Word32)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Word32, Word32, Word32) -> m (Word32, Word32, Word32))
-> IO (Word32, Word32, Word32) -> m (Word32, Word32, Word32)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Word32
major <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
    Ptr Word32
minor <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
    Ptr Word32
micro <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
    Ptr Word32 -> Ptr Word32 -> Ptr Word32 -> IO ()
hb_version Ptr Word32
major Ptr Word32
minor Ptr Word32
micro
    Word32
major' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
major
    Word32
minor' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
minor
    Word32
micro' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
micro
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
major
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
minor
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
micro
    (Word32, Word32, Word32) -> IO (Word32, Word32, Word32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Word32
major', Word32
minor', Word32
micro')


-- function variation_to_string
-- Args: [ Arg
--           { argCName = "variation"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "variation_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "buf"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "size"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_variation_to_string" hb_variation_to_string :: 
    Ptr HarfBuzz.VariationT.VariationT ->   -- variation : TInterface (Name {namespace = "HarfBuzz", name = "variation_t"})
    CString ->                              -- buf : TBasicType TUTF8
    Word32 ->                               -- size : TBasicType TUInt
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 1.4.2/
variationToString ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.VariationT.VariationT
    -> T.Text
    -> Word32
    -> m ()
variationToString :: VariationT -> Text -> Word32 -> m ()
variationToString VariationT
variation Text
buf Word32
size = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr VariationT
variation' <- VariationT -> IO (Ptr VariationT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VariationT
variation
    CString
buf' <- Text -> IO CString
textToCString Text
buf
    Ptr VariationT -> CString -> Word32 -> IO ()
hb_variation_to_string Ptr VariationT
variation' CString
buf' Word32
size
    VariationT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr VariationT
variation
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
buf'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function variation_from_string
-- Args: [ Arg
--           { argCName = "str"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , 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 = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "variation"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "variation_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_variation_from_string" hb_variation_from_string :: 
    CString ->                              -- str : TBasicType TUTF8
    Int32 ->                                -- len : TBasicType TInt
    Ptr HarfBuzz.VariationT.VariationT ->   -- variation : TInterface (Name {namespace = "HarfBuzz", name = "variation_t"})
    IO Int32

-- | /No description available in the introspection data./
-- 
-- /Since: 1.4.2/
variationFromString ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    T.Text
    -> Int32
    -> HarfBuzz.VariationT.VariationT
    -> m Int32
variationFromString :: Text -> Int32 -> VariationT -> m Int32
variationFromString Text
str Int32
len VariationT
variation = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    CString
str' <- Text -> IO CString
textToCString Text
str
    Ptr VariationT
variation' <- VariationT -> IO (Ptr VariationT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VariationT
variation
    Int32
result <- CString -> Int32 -> Ptr VariationT -> IO Int32
hb_variation_from_string CString
str' Int32
len Ptr VariationT
variation'
    VariationT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr VariationT
variation
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
str'
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function unicode_script
-- Args: [ Arg
--           { argCName = "ufuncs"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "unicode_funcs_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , 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 = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "HarfBuzz" , name = "script_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_unicode_script" hb_unicode_script :: 
    Ptr HarfBuzz.UnicodeFuncsT.UnicodeFuncsT -> -- ufuncs : TInterface (Name {namespace = "HarfBuzz", name = "unicode_funcs_t"})
    Word32 ->                               -- unicode : TBasicType TUInt32
    IO CUInt

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
unicodeScript ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.UnicodeFuncsT.UnicodeFuncsT
    -> Word32
    -> m HarfBuzz.Enums.ScriptT
unicodeScript :: UnicodeFuncsT -> Word32 -> m ScriptT
unicodeScript UnicodeFuncsT
ufuncs Word32
unicode = IO ScriptT -> m ScriptT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ScriptT -> m ScriptT) -> IO ScriptT -> m ScriptT
forall a b. (a -> b) -> a -> b
$ do
    Ptr UnicodeFuncsT
ufuncs' <- UnicodeFuncsT -> IO (Ptr UnicodeFuncsT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr UnicodeFuncsT
ufuncs
    CUInt
result <- Ptr UnicodeFuncsT -> Word32 -> IO CUInt
hb_unicode_script Ptr UnicodeFuncsT
ufuncs' Word32
unicode
    let result' :: ScriptT
result' = (Int -> ScriptT
forall a. Enum a => Int -> a
toEnum (Int -> ScriptT) -> (CUInt -> Int) -> CUInt -> ScriptT
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
    UnicodeFuncsT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr UnicodeFuncsT
ufuncs
    ScriptT -> IO ScriptT
forall (m :: * -> *) a. Monad m => a -> m a
return ScriptT
result'


-- function unicode_mirroring
-- Args: [ Arg
--           { argCName = "ufuncs"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "unicode_funcs_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , 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 = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt32)
-- throws : False
-- Skip return : False

foreign import ccall "hb_unicode_mirroring" hb_unicode_mirroring :: 
    Ptr HarfBuzz.UnicodeFuncsT.UnicodeFuncsT -> -- ufuncs : TInterface (Name {namespace = "HarfBuzz", name = "unicode_funcs_t"})
    Word32 ->                               -- unicode : TBasicType TUInt32
    IO Word32

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
unicodeMirroring ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.UnicodeFuncsT.UnicodeFuncsT
    -> Word32
    -> m Word32
unicodeMirroring :: UnicodeFuncsT -> Word32 -> m Word32
unicodeMirroring UnicodeFuncsT
ufuncs Word32
unicode = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
    Ptr UnicodeFuncsT
ufuncs' <- UnicodeFuncsT -> IO (Ptr UnicodeFuncsT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr UnicodeFuncsT
ufuncs
    Word32
result <- Ptr UnicodeFuncsT -> Word32 -> IO Word32
hb_unicode_mirroring Ptr UnicodeFuncsT
ufuncs' Word32
unicode
    UnicodeFuncsT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr UnicodeFuncsT
ufuncs
    Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result


-- function unicode_general_category
-- Args: [ Arg
--           { argCName = "ufuncs"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "unicode_funcs_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , 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 = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , 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 "hb_unicode_general_category" hb_unicode_general_category :: 
    Ptr HarfBuzz.UnicodeFuncsT.UnicodeFuncsT -> -- ufuncs : TInterface (Name {namespace = "HarfBuzz", name = "unicode_funcs_t"})
    Word32 ->                               -- unicode : TBasicType TUInt32
    IO CUInt

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
unicodeGeneralCategory ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.UnicodeFuncsT.UnicodeFuncsT
    -> Word32
    -> m HarfBuzz.Enums.UnicodeGeneralCategoryT
unicodeGeneralCategory :: UnicodeFuncsT -> Word32 -> m UnicodeGeneralCategoryT
unicodeGeneralCategory UnicodeFuncsT
ufuncs Word32
unicode = IO UnicodeGeneralCategoryT -> m UnicodeGeneralCategoryT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO UnicodeGeneralCategoryT -> m UnicodeGeneralCategoryT)
-> IO UnicodeGeneralCategoryT -> m UnicodeGeneralCategoryT
forall a b. (a -> b) -> a -> b
$ do
    Ptr UnicodeFuncsT
ufuncs' <- UnicodeFuncsT -> IO (Ptr UnicodeFuncsT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr UnicodeFuncsT
ufuncs
    CUInt
result <- Ptr UnicodeFuncsT -> Word32 -> IO CUInt
hb_unicode_general_category Ptr UnicodeFuncsT
ufuncs' Word32
unicode
    let result' :: UnicodeGeneralCategoryT
result' = (Int -> UnicodeGeneralCategoryT
forall a. Enum a => Int -> a
toEnum (Int -> UnicodeGeneralCategoryT)
-> (CUInt -> Int) -> CUInt -> UnicodeGeneralCategoryT
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
    UnicodeFuncsT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr UnicodeFuncsT
ufuncs
    UnicodeGeneralCategoryT -> IO UnicodeGeneralCategoryT
forall (m :: * -> *) a. Monad m => a -> m a
return UnicodeGeneralCategoryT
result'


-- function unicode_funcs_set_script_func
-- 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 = "func"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "unicode_script_func_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = 2
--           , argDestroy = 3
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "destroy"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "destroy_func_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_unicode_funcs_set_script_func" hb_unicode_funcs_set_script_func :: 
    Ptr HarfBuzz.UnicodeFuncsT.UnicodeFuncsT -> -- ufuncs : TInterface (Name {namespace = "HarfBuzz", name = "unicode_funcs_t"})
    FunPtr HarfBuzz.Callbacks.C_UnicodeScriptFuncT -> -- func : TInterface (Name {namespace = "HarfBuzz", name = "unicode_script_func_t"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    FunPtr HarfBuzz.Callbacks.C_DestroyFuncT -> -- destroy : TInterface (Name {namespace = "HarfBuzz", name = "destroy_func_t"})
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
unicodeFuncsSetScriptFunc ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.UnicodeFuncsT.UnicodeFuncsT
    -- ^ /@ufuncs@/: a Unicode function structure
    -> HarfBuzz.Callbacks.UnicodeScriptFuncT
    -> m ()
unicodeFuncsSetScriptFunc :: UnicodeFuncsT -> UnicodeScriptFuncT -> m ()
unicodeFuncsSetScriptFunc UnicodeFuncsT
ufuncs UnicodeScriptFuncT
func = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr UnicodeFuncsT
ufuncs' <- UnicodeFuncsT -> IO (Ptr UnicodeFuncsT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr UnicodeFuncsT
ufuncs
    FunPtr C_UnicodeScriptFuncT
func' <- C_UnicodeScriptFuncT -> IO (FunPtr C_UnicodeScriptFuncT)
HarfBuzz.Callbacks.mk_UnicodeScriptFuncT (Maybe (Ptr (FunPtr C_UnicodeScriptFuncT))
-> UnicodeScriptFuncT_WithClosures -> C_UnicodeScriptFuncT
HarfBuzz.Callbacks.wrap_UnicodeScriptFuncT Maybe (Ptr (FunPtr C_UnicodeScriptFuncT))
forall a. Maybe a
Nothing (UnicodeScriptFuncT -> UnicodeScriptFuncT_WithClosures
HarfBuzz.Callbacks.drop_closures_UnicodeScriptFuncT UnicodeScriptFuncT
func))
    let userData :: Ptr ()
userData = FunPtr C_UnicodeScriptFuncT -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_UnicodeScriptFuncT
func'
    let destroy :: FunPtr (Ptr a -> IO ())
destroy = FunPtr (Ptr a -> IO ())
forall a. FunPtr (Ptr a -> IO ())
safeFreeFunPtrPtr
    Ptr UnicodeFuncsT
-> FunPtr C_UnicodeScriptFuncT
-> Ptr ()
-> FunPtr C_DestroyFuncT
-> IO ()
hb_unicode_funcs_set_script_func Ptr UnicodeFuncsT
ufuncs' FunPtr C_UnicodeScriptFuncT
func' Ptr ()
userData FunPtr C_DestroyFuncT
forall a. FunPtr (Ptr a -> IO ())
destroy
    UnicodeFuncsT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr UnicodeFuncsT
ufuncs
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function unicode_funcs_set_mirroring_func
-- 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 = "func"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "unicode_mirroring_func_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = 2
--           , argDestroy = 3
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "destroy"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "destroy_func_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_unicode_funcs_set_mirroring_func" hb_unicode_funcs_set_mirroring_func :: 
    Ptr HarfBuzz.UnicodeFuncsT.UnicodeFuncsT -> -- ufuncs : TInterface (Name {namespace = "HarfBuzz", name = "unicode_funcs_t"})
    FunPtr HarfBuzz.Callbacks.C_UnicodeMirroringFuncT -> -- func : TInterface (Name {namespace = "HarfBuzz", name = "unicode_mirroring_func_t"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    FunPtr HarfBuzz.Callbacks.C_DestroyFuncT -> -- destroy : TInterface (Name {namespace = "HarfBuzz", name = "destroy_func_t"})
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
unicodeFuncsSetMirroringFunc ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.UnicodeFuncsT.UnicodeFuncsT
    -- ^ /@ufuncs@/: a Unicode function structure
    -> HarfBuzz.Callbacks.UnicodeMirroringFuncT
    -> m ()
unicodeFuncsSetMirroringFunc :: UnicodeFuncsT -> UnicodeMirroringFuncT -> m ()
unicodeFuncsSetMirroringFunc UnicodeFuncsT
ufuncs UnicodeMirroringFuncT
func = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr UnicodeFuncsT
ufuncs' <- UnicodeFuncsT -> IO (Ptr UnicodeFuncsT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr UnicodeFuncsT
ufuncs
    FunPtr C_UnicodeMirroringFuncT
func' <- C_UnicodeMirroringFuncT -> IO (FunPtr C_UnicodeMirroringFuncT)
HarfBuzz.Callbacks.mk_UnicodeMirroringFuncT (Maybe (Ptr (FunPtr C_UnicodeMirroringFuncT))
-> UnicodeMirroringFuncT_WithClosures -> C_UnicodeMirroringFuncT
HarfBuzz.Callbacks.wrap_UnicodeMirroringFuncT Maybe (Ptr (FunPtr C_UnicodeMirroringFuncT))
forall a. Maybe a
Nothing (UnicodeMirroringFuncT -> UnicodeMirroringFuncT_WithClosures
HarfBuzz.Callbacks.drop_closures_UnicodeMirroringFuncT UnicodeMirroringFuncT
func))
    let userData :: Ptr ()
userData = FunPtr C_UnicodeMirroringFuncT -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_UnicodeMirroringFuncT
func'
    let destroy :: FunPtr (Ptr a -> IO ())
destroy = FunPtr (Ptr a -> IO ())
forall a. FunPtr (Ptr a -> IO ())
safeFreeFunPtrPtr
    Ptr UnicodeFuncsT
-> FunPtr C_UnicodeMirroringFuncT
-> Ptr ()
-> FunPtr C_DestroyFuncT
-> IO ()
hb_unicode_funcs_set_mirroring_func Ptr UnicodeFuncsT
ufuncs' FunPtr C_UnicodeMirroringFuncT
func' Ptr ()
userData FunPtr C_DestroyFuncT
forall a. FunPtr (Ptr a -> IO ())
destroy
    UnicodeFuncsT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr UnicodeFuncsT
ufuncs
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function unicode_funcs_set_general_category_func
-- 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 = "func"
--           , argType =
--               TInterface
--                 Name
--                   { namespace = "HarfBuzz"
--                   , name = "unicode_general_category_func_t"
--                   }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = 2
--           , argDestroy = 3
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "destroy"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "destroy_func_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_unicode_funcs_set_general_category_func" hb_unicode_funcs_set_general_category_func :: 
    Ptr HarfBuzz.UnicodeFuncsT.UnicodeFuncsT -> -- ufuncs : TInterface (Name {namespace = "HarfBuzz", name = "unicode_funcs_t"})
    FunPtr HarfBuzz.Callbacks.C_UnicodeGeneralCategoryFuncT -> -- func : TInterface (Name {namespace = "HarfBuzz", name = "unicode_general_category_func_t"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    FunPtr HarfBuzz.Callbacks.C_DestroyFuncT -> -- destroy : TInterface (Name {namespace = "HarfBuzz", name = "destroy_func_t"})
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
unicodeFuncsSetGeneralCategoryFunc ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.UnicodeFuncsT.UnicodeFuncsT
    -- ^ /@ufuncs@/: a Unicode function structure
    -> HarfBuzz.Callbacks.UnicodeGeneralCategoryFuncT
    -> m ()
unicodeFuncsSetGeneralCategoryFunc :: UnicodeFuncsT -> UnicodeGeneralCategoryFuncT -> m ()
unicodeFuncsSetGeneralCategoryFunc UnicodeFuncsT
ufuncs UnicodeGeneralCategoryFuncT
func = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr UnicodeFuncsT
ufuncs' <- UnicodeFuncsT -> IO (Ptr UnicodeFuncsT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr UnicodeFuncsT
ufuncs
    FunPtr C_UnicodeScriptFuncT
func' <- C_UnicodeScriptFuncT -> IO (FunPtr C_UnicodeScriptFuncT)
HarfBuzz.Callbacks.mk_UnicodeGeneralCategoryFuncT (Maybe (Ptr (FunPtr C_UnicodeScriptFuncT))
-> UnicodeGeneralCategoryFuncT_WithClosures -> C_UnicodeScriptFuncT
HarfBuzz.Callbacks.wrap_UnicodeGeneralCategoryFuncT Maybe (Ptr (FunPtr C_UnicodeScriptFuncT))
forall a. Maybe a
Nothing (UnicodeGeneralCategoryFuncT
-> UnicodeGeneralCategoryFuncT_WithClosures
HarfBuzz.Callbacks.drop_closures_UnicodeGeneralCategoryFuncT UnicodeGeneralCategoryFuncT
func))
    let userData :: Ptr ()
userData = FunPtr C_UnicodeScriptFuncT -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_UnicodeScriptFuncT
func'
    let destroy :: FunPtr (Ptr a -> IO ())
destroy = FunPtr (Ptr a -> IO ())
forall a. FunPtr (Ptr a -> IO ())
safeFreeFunPtrPtr
    Ptr UnicodeFuncsT
-> FunPtr C_UnicodeScriptFuncT
-> Ptr ()
-> FunPtr C_DestroyFuncT
-> IO ()
hb_unicode_funcs_set_general_category_func Ptr UnicodeFuncsT
ufuncs' FunPtr C_UnicodeScriptFuncT
func' Ptr ()
userData FunPtr C_DestroyFuncT
forall a. FunPtr (Ptr a -> IO ())
destroy
    UnicodeFuncsT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr UnicodeFuncsT
ufuncs
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function unicode_funcs_set_eastasian_width_func
-- 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 = "func"
--           , argType =
--               TInterface
--                 Name
--                   { namespace = "HarfBuzz"
--                   , name = "unicode_eastasian_width_func_t"
--                   }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = 2
--           , argDestroy = 3
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "destroy"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "destroy_func_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_unicode_funcs_set_eastasian_width_func" hb_unicode_funcs_set_eastasian_width_func :: 
    Ptr HarfBuzz.UnicodeFuncsT.UnicodeFuncsT -> -- ufuncs : TInterface (Name {namespace = "HarfBuzz", name = "unicode_funcs_t"})
    FunPtr HarfBuzz.Callbacks.C_UnicodeEastasianWidthFuncT -> -- func : TInterface (Name {namespace = "HarfBuzz", name = "unicode_eastasian_width_func_t"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    FunPtr HarfBuzz.Callbacks.C_DestroyFuncT -> -- destroy : TInterface (Name {namespace = "HarfBuzz", name = "destroy_func_t"})
    IO ()

{-# DEPRECATED unicodeFuncsSetEastasianWidthFunc ["(Since version 2.0.0)"] #-}
-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
unicodeFuncsSetEastasianWidthFunc ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.UnicodeFuncsT.UnicodeFuncsT
    -- ^ /@ufuncs@/: a Unicode function structure
    -> HarfBuzz.Callbacks.UnicodeEastasianWidthFuncT
    -> m ()
unicodeFuncsSetEastasianWidthFunc :: UnicodeFuncsT -> UnicodeMirroringFuncT -> m ()
unicodeFuncsSetEastasianWidthFunc UnicodeFuncsT
ufuncs UnicodeMirroringFuncT
func = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr UnicodeFuncsT
ufuncs' <- UnicodeFuncsT -> IO (Ptr UnicodeFuncsT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr UnicodeFuncsT
ufuncs
    FunPtr C_UnicodeMirroringFuncT
func' <- C_UnicodeMirroringFuncT -> IO (FunPtr C_UnicodeMirroringFuncT)
HarfBuzz.Callbacks.mk_UnicodeEastasianWidthFuncT (Maybe (Ptr (FunPtr C_UnicodeMirroringFuncT))
-> UnicodeMirroringFuncT_WithClosures -> C_UnicodeMirroringFuncT
HarfBuzz.Callbacks.wrap_UnicodeEastasianWidthFuncT Maybe (Ptr (FunPtr C_UnicodeMirroringFuncT))
forall a. Maybe a
Nothing (UnicodeMirroringFuncT -> UnicodeMirroringFuncT_WithClosures
HarfBuzz.Callbacks.drop_closures_UnicodeEastasianWidthFuncT UnicodeMirroringFuncT
func))
    let userData :: Ptr ()
userData = FunPtr C_UnicodeMirroringFuncT -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_UnicodeMirroringFuncT
func'
    let destroy :: FunPtr (Ptr a -> IO ())
destroy = FunPtr (Ptr a -> IO ())
forall a. FunPtr (Ptr a -> IO ())
safeFreeFunPtrPtr
    Ptr UnicodeFuncsT
-> FunPtr C_UnicodeMirroringFuncT
-> Ptr ()
-> FunPtr C_DestroyFuncT
-> IO ()
hb_unicode_funcs_set_eastasian_width_func Ptr UnicodeFuncsT
ufuncs' FunPtr C_UnicodeMirroringFuncT
func' Ptr ()
userData FunPtr C_DestroyFuncT
forall a. FunPtr (Ptr a -> IO ())
destroy
    UnicodeFuncsT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr UnicodeFuncsT
ufuncs
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function unicode_funcs_set_decompose_func
-- 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 = "func"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "unicode_decompose_func_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = 2
--           , argDestroy = 3
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "destroy"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "destroy_func_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_unicode_funcs_set_decompose_func" hb_unicode_funcs_set_decompose_func :: 
    Ptr HarfBuzz.UnicodeFuncsT.UnicodeFuncsT -> -- ufuncs : TInterface (Name {namespace = "HarfBuzz", name = "unicode_funcs_t"})
    FunPtr HarfBuzz.Callbacks.C_UnicodeDecomposeFuncT -> -- func : TInterface (Name {namespace = "HarfBuzz", name = "unicode_decompose_func_t"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    FunPtr HarfBuzz.Callbacks.C_DestroyFuncT -> -- destroy : TInterface (Name {namespace = "HarfBuzz", name = "destroy_func_t"})
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
unicodeFuncsSetDecomposeFunc ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.UnicodeFuncsT.UnicodeFuncsT
    -- ^ /@ufuncs@/: a Unicode function structure
    -> HarfBuzz.Callbacks.UnicodeDecomposeFuncT
    -> m ()
unicodeFuncsSetDecomposeFunc :: UnicodeFuncsT -> UnicodeDecomposeFuncT -> m ()
unicodeFuncsSetDecomposeFunc UnicodeFuncsT
ufuncs UnicodeDecomposeFuncT
func = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr UnicodeFuncsT
ufuncs' <- UnicodeFuncsT -> IO (Ptr UnicodeFuncsT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr UnicodeFuncsT
ufuncs
    FunPtr C_UnicodeDecomposeFuncT
func' <- C_UnicodeDecomposeFuncT -> IO (FunPtr C_UnicodeDecomposeFuncT)
HarfBuzz.Callbacks.mk_UnicodeDecomposeFuncT (Maybe (Ptr (FunPtr C_UnicodeDecomposeFuncT))
-> UnicodeDecomposeFuncT_WithClosures -> C_UnicodeDecomposeFuncT
HarfBuzz.Callbacks.wrap_UnicodeDecomposeFuncT Maybe (Ptr (FunPtr C_UnicodeDecomposeFuncT))
forall a. Maybe a
Nothing (UnicodeDecomposeFuncT -> UnicodeDecomposeFuncT_WithClosures
HarfBuzz.Callbacks.drop_closures_UnicodeDecomposeFuncT UnicodeDecomposeFuncT
func))
    let userData :: Ptr ()
userData = FunPtr C_UnicodeDecomposeFuncT -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_UnicodeDecomposeFuncT
func'
    let destroy :: FunPtr (Ptr a -> IO ())
destroy = FunPtr (Ptr a -> IO ())
forall a. FunPtr (Ptr a -> IO ())
safeFreeFunPtrPtr
    Ptr UnicodeFuncsT
-> FunPtr C_UnicodeDecomposeFuncT
-> Ptr ()
-> FunPtr C_DestroyFuncT
-> IO ()
hb_unicode_funcs_set_decompose_func Ptr UnicodeFuncsT
ufuncs' FunPtr C_UnicodeDecomposeFuncT
func' Ptr ()
userData FunPtr C_DestroyFuncT
forall a. FunPtr (Ptr a -> IO ())
destroy
    UnicodeFuncsT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr UnicodeFuncsT
ufuncs
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function unicode_funcs_set_decompose_compatibility_func
-- 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 = "func"
--           , argType =
--               TInterface
--                 Name
--                   { namespace = "HarfBuzz"
--                   , name = "unicode_decompose_compatibility_func_t"
--                   }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = 2
--           , argDestroy = 3
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "destroy"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "destroy_func_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_unicode_funcs_set_decompose_compatibility_func" hb_unicode_funcs_set_decompose_compatibility_func :: 
    Ptr HarfBuzz.UnicodeFuncsT.UnicodeFuncsT -> -- ufuncs : TInterface (Name {namespace = "HarfBuzz", name = "unicode_funcs_t"})
    FunPtr HarfBuzz.Callbacks.C_UnicodeDecomposeCompatibilityFuncT -> -- func : TInterface (Name {namespace = "HarfBuzz", name = "unicode_decompose_compatibility_func_t"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    FunPtr HarfBuzz.Callbacks.C_DestroyFuncT -> -- destroy : TInterface (Name {namespace = "HarfBuzz", name = "destroy_func_t"})
    IO ()

{-# DEPRECATED unicodeFuncsSetDecomposeCompatibilityFunc ["(Since version 2.0.0)"] #-}
-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
unicodeFuncsSetDecomposeCompatibilityFunc ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.UnicodeFuncsT.UnicodeFuncsT
    -- ^ /@ufuncs@/: a Unicode function structure
    -> HarfBuzz.Callbacks.UnicodeDecomposeCompatibilityFuncT
    -> m ()
unicodeFuncsSetDecomposeCompatibilityFunc :: UnicodeFuncsT -> UnicodeDecomposeCompatibilityFuncT -> m ()
unicodeFuncsSetDecomposeCompatibilityFunc UnicodeFuncsT
ufuncs UnicodeDecomposeCompatibilityFuncT
func = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr UnicodeFuncsT
ufuncs' <- UnicodeFuncsT -> IO (Ptr UnicodeFuncsT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr UnicodeFuncsT
ufuncs
    FunPtr C_UnicodeDecomposeCompatibilityFuncT
func' <- C_UnicodeDecomposeCompatibilityFuncT
-> IO (FunPtr C_UnicodeDecomposeCompatibilityFuncT)
HarfBuzz.Callbacks.mk_UnicodeDecomposeCompatibilityFuncT (Maybe (Ptr (FunPtr C_UnicodeDecomposeCompatibilityFuncT))
-> UnicodeDecomposeCompatibilityFuncT_WithClosures
-> C_UnicodeDecomposeCompatibilityFuncT
HarfBuzz.Callbacks.wrap_UnicodeDecomposeCompatibilityFuncT Maybe (Ptr (FunPtr C_UnicodeDecomposeCompatibilityFuncT))
forall a. Maybe a
Nothing (UnicodeDecomposeCompatibilityFuncT
-> UnicodeDecomposeCompatibilityFuncT_WithClosures
HarfBuzz.Callbacks.drop_closures_UnicodeDecomposeCompatibilityFuncT UnicodeDecomposeCompatibilityFuncT
func))
    let userData :: Ptr ()
userData = FunPtr C_UnicodeDecomposeCompatibilityFuncT -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_UnicodeDecomposeCompatibilityFuncT
func'
    let destroy :: FunPtr (Ptr a -> IO ())
destroy = FunPtr (Ptr a -> IO ())
forall a. FunPtr (Ptr a -> IO ())
safeFreeFunPtrPtr
    Ptr UnicodeFuncsT
-> FunPtr C_UnicodeDecomposeCompatibilityFuncT
-> Ptr ()
-> FunPtr C_DestroyFuncT
-> IO ()
hb_unicode_funcs_set_decompose_compatibility_func Ptr UnicodeFuncsT
ufuncs' FunPtr C_UnicodeDecomposeCompatibilityFuncT
func' Ptr ()
userData FunPtr C_DestroyFuncT
forall a. FunPtr (Ptr a -> IO ())
destroy
    UnicodeFuncsT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr UnicodeFuncsT
ufuncs
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function unicode_funcs_set_compose_func
-- 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 = "func"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "unicode_compose_func_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = 2
--           , argDestroy = 3
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "destroy"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "destroy_func_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_unicode_funcs_set_compose_func" hb_unicode_funcs_set_compose_func :: 
    Ptr HarfBuzz.UnicodeFuncsT.UnicodeFuncsT -> -- ufuncs : TInterface (Name {namespace = "HarfBuzz", name = "unicode_funcs_t"})
    FunPtr HarfBuzz.Callbacks.C_UnicodeComposeFuncT -> -- func : TInterface (Name {namespace = "HarfBuzz", name = "unicode_compose_func_t"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    FunPtr HarfBuzz.Callbacks.C_DestroyFuncT -> -- destroy : TInterface (Name {namespace = "HarfBuzz", name = "destroy_func_t"})
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
unicodeFuncsSetComposeFunc ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.UnicodeFuncsT.UnicodeFuncsT
    -- ^ /@ufuncs@/: a Unicode function structure
    -> HarfBuzz.Callbacks.UnicodeComposeFuncT
    -> m ()
unicodeFuncsSetComposeFunc :: UnicodeFuncsT -> UnicodeDecomposeFuncT -> m ()
unicodeFuncsSetComposeFunc UnicodeFuncsT
ufuncs UnicodeDecomposeFuncT
func = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr UnicodeFuncsT
ufuncs' <- UnicodeFuncsT -> IO (Ptr UnicodeFuncsT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr UnicodeFuncsT
ufuncs
    FunPtr C_UnicodeDecomposeFuncT
func' <- C_UnicodeDecomposeFuncT -> IO (FunPtr C_UnicodeDecomposeFuncT)
HarfBuzz.Callbacks.mk_UnicodeComposeFuncT (Maybe (Ptr (FunPtr C_UnicodeDecomposeFuncT))
-> UnicodeDecomposeFuncT_WithClosures -> C_UnicodeDecomposeFuncT
HarfBuzz.Callbacks.wrap_UnicodeComposeFuncT Maybe (Ptr (FunPtr C_UnicodeDecomposeFuncT))
forall a. Maybe a
Nothing (UnicodeDecomposeFuncT -> UnicodeDecomposeFuncT_WithClosures
HarfBuzz.Callbacks.drop_closures_UnicodeComposeFuncT UnicodeDecomposeFuncT
func))
    let userData :: Ptr ()
userData = FunPtr C_UnicodeDecomposeFuncT -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_UnicodeDecomposeFuncT
func'
    let destroy :: FunPtr (Ptr a -> IO ())
destroy = FunPtr (Ptr a -> IO ())
forall a. FunPtr (Ptr a -> IO ())
safeFreeFunPtrPtr
    Ptr UnicodeFuncsT
-> FunPtr C_UnicodeDecomposeFuncT
-> Ptr ()
-> FunPtr C_DestroyFuncT
-> IO ()
hb_unicode_funcs_set_compose_func Ptr UnicodeFuncsT
ufuncs' FunPtr C_UnicodeDecomposeFuncT
func' Ptr ()
userData FunPtr C_DestroyFuncT
forall a. FunPtr (Ptr a -> IO ())
destroy
    UnicodeFuncsT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr UnicodeFuncsT
ufuncs
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function unicode_funcs_set_combining_class_func
-- 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 = "func"
--           , argType =
--               TInterface
--                 Name
--                   { namespace = "HarfBuzz"
--                   , name = "unicode_combining_class_func_t"
--                   }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = 2
--           , argDestroy = 3
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "destroy"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "destroy_func_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_unicode_funcs_set_combining_class_func" hb_unicode_funcs_set_combining_class_func :: 
    Ptr HarfBuzz.UnicodeFuncsT.UnicodeFuncsT -> -- ufuncs : TInterface (Name {namespace = "HarfBuzz", name = "unicode_funcs_t"})
    FunPtr HarfBuzz.Callbacks.C_UnicodeCombiningClassFuncT -> -- func : TInterface (Name {namespace = "HarfBuzz", name = "unicode_combining_class_func_t"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    FunPtr HarfBuzz.Callbacks.C_DestroyFuncT -> -- destroy : TInterface (Name {namespace = "HarfBuzz", name = "destroy_func_t"})
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
unicodeFuncsSetCombiningClassFunc ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.UnicodeFuncsT.UnicodeFuncsT
    -- ^ /@ufuncs@/: a Unicode function structure
    -> HarfBuzz.Callbacks.UnicodeCombiningClassFuncT
    -> m ()
unicodeFuncsSetCombiningClassFunc :: UnicodeFuncsT -> UnicodeCombiningClassFuncT -> m ()
unicodeFuncsSetCombiningClassFunc UnicodeFuncsT
ufuncs UnicodeCombiningClassFuncT
func = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr UnicodeFuncsT
ufuncs' <- UnicodeFuncsT -> IO (Ptr UnicodeFuncsT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr UnicodeFuncsT
ufuncs
    FunPtr C_UnicodeScriptFuncT
func' <- C_UnicodeScriptFuncT -> IO (FunPtr C_UnicodeScriptFuncT)
HarfBuzz.Callbacks.mk_UnicodeCombiningClassFuncT (Maybe (Ptr (FunPtr C_UnicodeScriptFuncT))
-> UnicodeCombiningClassFuncT_WithClosures -> C_UnicodeScriptFuncT
HarfBuzz.Callbacks.wrap_UnicodeCombiningClassFuncT Maybe (Ptr (FunPtr C_UnicodeScriptFuncT))
forall a. Maybe a
Nothing (UnicodeCombiningClassFuncT
-> UnicodeCombiningClassFuncT_WithClosures
HarfBuzz.Callbacks.drop_closures_UnicodeCombiningClassFuncT UnicodeCombiningClassFuncT
func))
    let userData :: Ptr ()
userData = FunPtr C_UnicodeScriptFuncT -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_UnicodeScriptFuncT
func'
    let destroy :: FunPtr (Ptr a -> IO ())
destroy = FunPtr (Ptr a -> IO ())
forall a. FunPtr (Ptr a -> IO ())
safeFreeFunPtrPtr
    Ptr UnicodeFuncsT
-> FunPtr C_UnicodeScriptFuncT
-> Ptr ()
-> FunPtr C_DestroyFuncT
-> IO ()
hb_unicode_funcs_set_combining_class_func Ptr UnicodeFuncsT
ufuncs' FunPtr C_UnicodeScriptFuncT
func' Ptr ()
userData FunPtr C_DestroyFuncT
forall a. FunPtr (Ptr a -> IO ())
destroy
    UnicodeFuncsT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr UnicodeFuncsT
ufuncs
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function unicode_funcs_make_immutable
-- Args: [ Arg
--           { argCName = "ufuncs"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "unicode_funcs_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Unicode functions." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_unicode_funcs_make_immutable" hb_unicode_funcs_make_immutable :: 
    Ptr HarfBuzz.UnicodeFuncsT.UnicodeFuncsT -> -- ufuncs : TInterface (Name {namespace = "HarfBuzz", name = "unicode_funcs_t"})
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
unicodeFuncsMakeImmutable ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.UnicodeFuncsT.UnicodeFuncsT
    -- ^ /@ufuncs@/: Unicode functions.
    -> m ()
unicodeFuncsMakeImmutable :: UnicodeFuncsT -> m ()
unicodeFuncsMakeImmutable UnicodeFuncsT
ufuncs = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr UnicodeFuncsT
ufuncs' <- UnicodeFuncsT -> IO (Ptr UnicodeFuncsT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr UnicodeFuncsT
ufuncs
    Ptr UnicodeFuncsT -> IO ()
hb_unicode_funcs_make_immutable Ptr UnicodeFuncsT
ufuncs'
    UnicodeFuncsT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr UnicodeFuncsT
ufuncs
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function unicode_funcs_is_immutable
-- Args: [ Arg
--           { argCName = "ufuncs"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "unicode_funcs_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Unicode functions." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_unicode_funcs_is_immutable" hb_unicode_funcs_is_immutable :: 
    Ptr HarfBuzz.UnicodeFuncsT.UnicodeFuncsT -> -- ufuncs : TInterface (Name {namespace = "HarfBuzz", name = "unicode_funcs_t"})
    IO Int32

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
unicodeFuncsIsImmutable ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.UnicodeFuncsT.UnicodeFuncsT
    -- ^ /@ufuncs@/: Unicode functions.
    -> m Int32
unicodeFuncsIsImmutable :: UnicodeFuncsT -> m Int32
unicodeFuncsIsImmutable UnicodeFuncsT
ufuncs = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr UnicodeFuncsT
ufuncs' <- UnicodeFuncsT -> IO (Ptr UnicodeFuncsT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr UnicodeFuncsT
ufuncs
    Int32
result <- Ptr UnicodeFuncsT -> IO Int32
hb_unicode_funcs_is_immutable Ptr UnicodeFuncsT
ufuncs'
    UnicodeFuncsT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr UnicodeFuncsT
ufuncs
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function unicode_funcs_get_parent
-- Args: [ Arg
--           { argCName = "ufuncs"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "unicode_funcs_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Unicode functions." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface
--                  Name { namespace = "HarfBuzz" , name = "unicode_funcs_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_unicode_funcs_get_parent" hb_unicode_funcs_get_parent :: 
    Ptr HarfBuzz.UnicodeFuncsT.UnicodeFuncsT -> -- ufuncs : TInterface (Name {namespace = "HarfBuzz", name = "unicode_funcs_t"})
    IO (Ptr HarfBuzz.UnicodeFuncsT.UnicodeFuncsT)

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
unicodeFuncsGetParent ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.UnicodeFuncsT.UnicodeFuncsT
    -- ^ /@ufuncs@/: Unicode functions.
    -> m HarfBuzz.UnicodeFuncsT.UnicodeFuncsT
unicodeFuncsGetParent :: UnicodeFuncsT -> m UnicodeFuncsT
unicodeFuncsGetParent UnicodeFuncsT
ufuncs = IO UnicodeFuncsT -> m UnicodeFuncsT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO UnicodeFuncsT -> m UnicodeFuncsT)
-> IO UnicodeFuncsT -> m UnicodeFuncsT
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 UnicodeFuncsT
result <- Ptr UnicodeFuncsT -> IO (Ptr UnicodeFuncsT)
hb_unicode_funcs_get_parent Ptr UnicodeFuncsT
ufuncs'
    Text -> Ptr UnicodeFuncsT -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"unicodeFuncsGetParent" Ptr UnicodeFuncsT
result
    UnicodeFuncsT
result' <- ((ManagedPtr UnicodeFuncsT -> UnicodeFuncsT)
-> Ptr UnicodeFuncsT -> IO UnicodeFuncsT
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr UnicodeFuncsT -> UnicodeFuncsT
HarfBuzz.UnicodeFuncsT.UnicodeFuncsT) Ptr UnicodeFuncsT
result
    UnicodeFuncsT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr UnicodeFuncsT
ufuncs
    UnicodeFuncsT -> IO UnicodeFuncsT
forall (m :: * -> *) a. Monad m => a -> m a
return UnicodeFuncsT
result'


-- function unicode_funcs_get_empty
-- Args: []
-- Lengths: []
-- returnType: Just
--               (TInterface
--                  Name { namespace = "HarfBuzz" , name = "unicode_funcs_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_unicode_funcs_get_empty" hb_unicode_funcs_get_empty :: 
    IO (Ptr HarfBuzz.UnicodeFuncsT.UnicodeFuncsT)

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
unicodeFuncsGetEmpty ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m HarfBuzz.UnicodeFuncsT.UnicodeFuncsT
unicodeFuncsGetEmpty :: m UnicodeFuncsT
unicodeFuncsGetEmpty  = IO UnicodeFuncsT -> m UnicodeFuncsT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO UnicodeFuncsT -> m UnicodeFuncsT)
-> IO UnicodeFuncsT -> m UnicodeFuncsT
forall a b. (a -> b) -> a -> b
$ do
    Ptr UnicodeFuncsT
result <- IO (Ptr UnicodeFuncsT)
hb_unicode_funcs_get_empty
    Text -> Ptr UnicodeFuncsT -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"unicodeFuncsGetEmpty" Ptr UnicodeFuncsT
result
    UnicodeFuncsT
result' <- ((ManagedPtr UnicodeFuncsT -> UnicodeFuncsT)
-> Ptr UnicodeFuncsT -> IO UnicodeFuncsT
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr UnicodeFuncsT -> UnicodeFuncsT
HarfBuzz.UnicodeFuncsT.UnicodeFuncsT) Ptr UnicodeFuncsT
result
    UnicodeFuncsT -> IO UnicodeFuncsT
forall (m :: * -> *) a. Monad m => a -> m a
return UnicodeFuncsT
result'


-- function unicode_funcs_get_default
-- Args: []
-- Lengths: []
-- returnType: Just
--               (TInterface
--                  Name { namespace = "HarfBuzz" , name = "unicode_funcs_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_unicode_funcs_get_default" hb_unicode_funcs_get_default :: 
    IO (Ptr HarfBuzz.UnicodeFuncsT.UnicodeFuncsT)

-- | /No description available in the introspection data./
unicodeFuncsGetDefault ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m HarfBuzz.UnicodeFuncsT.UnicodeFuncsT
unicodeFuncsGetDefault :: m UnicodeFuncsT
unicodeFuncsGetDefault  = IO UnicodeFuncsT -> m UnicodeFuncsT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO UnicodeFuncsT -> m UnicodeFuncsT)
-> IO UnicodeFuncsT -> m UnicodeFuncsT
forall a b. (a -> b) -> a -> b
$ do
    Ptr UnicodeFuncsT
result <- IO (Ptr UnicodeFuncsT)
hb_unicode_funcs_get_default
    Text -> Ptr UnicodeFuncsT -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"unicodeFuncsGetDefault" Ptr UnicodeFuncsT
result
    UnicodeFuncsT
result' <- ((ManagedPtr UnicodeFuncsT -> UnicodeFuncsT)
-> Ptr UnicodeFuncsT -> IO UnicodeFuncsT
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr UnicodeFuncsT -> UnicodeFuncsT
HarfBuzz.UnicodeFuncsT.UnicodeFuncsT) Ptr UnicodeFuncsT
result
    UnicodeFuncsT -> IO UnicodeFuncsT
forall (m :: * -> *) a. Monad m => a -> m a
return UnicodeFuncsT
result'


-- function unicode_funcs_create
-- Args: [ Arg
--           { argCName = "parent"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "unicode_funcs_t" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface
--                  Name { namespace = "HarfBuzz" , name = "unicode_funcs_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_unicode_funcs_create" hb_unicode_funcs_create :: 
    Ptr HarfBuzz.UnicodeFuncsT.UnicodeFuncsT -> -- parent : TInterface (Name {namespace = "HarfBuzz", name = "unicode_funcs_t"})
    IO (Ptr HarfBuzz.UnicodeFuncsT.UnicodeFuncsT)

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
unicodeFuncsCreate ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Maybe (HarfBuzz.UnicodeFuncsT.UnicodeFuncsT)
    -> m HarfBuzz.UnicodeFuncsT.UnicodeFuncsT
unicodeFuncsCreate :: Maybe UnicodeFuncsT -> m UnicodeFuncsT
unicodeFuncsCreate Maybe UnicodeFuncsT
parent = IO UnicodeFuncsT -> m UnicodeFuncsT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO UnicodeFuncsT -> m UnicodeFuncsT)
-> IO UnicodeFuncsT -> m UnicodeFuncsT
forall a b. (a -> b) -> a -> b
$ do
    Ptr UnicodeFuncsT
maybeParent <- case Maybe UnicodeFuncsT
parent of
        Maybe UnicodeFuncsT
Nothing -> Ptr UnicodeFuncsT -> IO (Ptr UnicodeFuncsT)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr UnicodeFuncsT
forall a. Ptr a
nullPtr
        Just UnicodeFuncsT
jParent -> do
            Ptr UnicodeFuncsT
jParent' <- UnicodeFuncsT -> IO (Ptr UnicodeFuncsT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr UnicodeFuncsT
jParent
            Ptr UnicodeFuncsT -> IO (Ptr UnicodeFuncsT)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr UnicodeFuncsT
jParent'
    Ptr UnicodeFuncsT
result <- Ptr UnicodeFuncsT -> IO (Ptr UnicodeFuncsT)
hb_unicode_funcs_create Ptr UnicodeFuncsT
maybeParent
    Text -> Ptr UnicodeFuncsT -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"unicodeFuncsCreate" Ptr UnicodeFuncsT
result
    UnicodeFuncsT
result' <- ((ManagedPtr UnicodeFuncsT -> UnicodeFuncsT)
-> Ptr UnicodeFuncsT -> IO UnicodeFuncsT
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr UnicodeFuncsT -> UnicodeFuncsT
HarfBuzz.UnicodeFuncsT.UnicodeFuncsT) Ptr UnicodeFuncsT
result
    Maybe UnicodeFuncsT -> (UnicodeFuncsT -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe UnicodeFuncsT
parent UnicodeFuncsT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    UnicodeFuncsT -> IO UnicodeFuncsT
forall (m :: * -> *) a. Monad m => a -> m a
return UnicodeFuncsT
result'


-- function unicode_eastasian_width
-- Args: [ Arg
--           { argCName = "ufuncs"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "unicode_funcs_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , 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 = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_unicode_eastasian_width" hb_unicode_eastasian_width :: 
    Ptr HarfBuzz.UnicodeFuncsT.UnicodeFuncsT -> -- ufuncs : TInterface (Name {namespace = "HarfBuzz", name = "unicode_funcs_t"})
    Word32 ->                               -- unicode : TBasicType TUInt32
    IO Word32

{-# DEPRECATED unicodeEastasianWidth ["(Since version 2.0.0)"] #-}
-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
unicodeEastasianWidth ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.UnicodeFuncsT.UnicodeFuncsT
    -> Word32
    -> m Word32
unicodeEastasianWidth :: UnicodeFuncsT -> Word32 -> m Word32
unicodeEastasianWidth UnicodeFuncsT
ufuncs Word32
unicode = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
    Ptr UnicodeFuncsT
ufuncs' <- UnicodeFuncsT -> IO (Ptr UnicodeFuncsT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr UnicodeFuncsT
ufuncs
    Word32
result <- Ptr UnicodeFuncsT -> Word32 -> IO Word32
hb_unicode_eastasian_width Ptr UnicodeFuncsT
ufuncs' Word32
unicode
    UnicodeFuncsT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr UnicodeFuncsT
ufuncs
    Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result


-- function unicode_decompose_compatibility
-- Args: [ Arg
--           { argCName = "ufuncs"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "unicode_funcs_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Unicode functions." , 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 = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "decomposed"
--           , argType = TBasicType TUInt32
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_unicode_decompose_compatibility" hb_unicode_decompose_compatibility :: 
    Ptr HarfBuzz.UnicodeFuncsT.UnicodeFuncsT -> -- ufuncs : TInterface (Name {namespace = "HarfBuzz", name = "unicode_funcs_t"})
    Word32 ->                               -- u : TBasicType TUInt32
    Ptr Word32 ->                           -- decomposed : TBasicType TUInt32
    IO Word32

{-# DEPRECATED unicodeDecomposeCompatibility ["(Since version 2.0.0)"] #-}
-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
unicodeDecomposeCompatibility ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.UnicodeFuncsT.UnicodeFuncsT
    -- ^ /@ufuncs@/: Unicode functions.
    -> Word32
    -> m ((Word32, Word32))
unicodeDecomposeCompatibility :: UnicodeFuncsT -> Word32 -> m (Word32, Word32)
unicodeDecomposeCompatibility UnicodeFuncsT
ufuncs Word32
u = IO (Word32, Word32) -> m (Word32, Word32)
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 UnicodeFuncsT
ufuncs' <- UnicodeFuncsT -> IO (Ptr UnicodeFuncsT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr UnicodeFuncsT
ufuncs
    Ptr Word32
decomposed <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
    Word32
result <- Ptr UnicodeFuncsT -> Word32 -> Ptr Word32 -> IO Word32
hb_unicode_decompose_compatibility Ptr UnicodeFuncsT
ufuncs' Word32
u Ptr Word32
decomposed
    Word32
decomposed' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
decomposed
    UnicodeFuncsT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr UnicodeFuncsT
ufuncs
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
decomposed
    (Word32, Word32) -> IO (Word32, Word32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Word32
result, Word32
decomposed')


-- function unicode_decompose
-- Args: [ Arg
--           { argCName = "ufuncs"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "unicode_funcs_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Unicode functions." , 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 = Nothing , 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 = Nothing , 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 = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_unicode_decompose" hb_unicode_decompose :: 
    Ptr HarfBuzz.UnicodeFuncsT.UnicodeFuncsT -> -- ufuncs : TInterface (Name {namespace = "HarfBuzz", name = "unicode_funcs_t"})
    Word32 ->                               -- ab : TBasicType TUInt32
    Ptr Word32 ->                           -- a : TBasicType TUInt32
    Ptr Word32 ->                           -- b : TBasicType TUInt32
    IO Int32

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
unicodeDecompose ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.UnicodeFuncsT.UnicodeFuncsT
    -- ^ /@ufuncs@/: Unicode functions.
    -> Word32
    -> m ((Int32, Word32, Word32))
unicodeDecompose :: UnicodeFuncsT -> Word32 -> m (Int32, Word32, Word32)
unicodeDecompose UnicodeFuncsT
ufuncs Word32
ab = IO (Int32, Word32, Word32) -> m (Int32, Word32, Word32)
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 <- Ptr UnicodeFuncsT -> Word32 -> Ptr Word32 -> Ptr Word32 -> IO Int32
hb_unicode_decompose Ptr UnicodeFuncsT
ufuncs' Word32
ab Ptr Word32
a Ptr Word32
b
    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 (m :: * -> *) a. Monad m => a -> m a
return (Int32
result, Word32
a', Word32
b')


-- function unicode_compose
-- Args: [ Arg
--           { argCName = "ufuncs"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "unicode_funcs_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Unicode functions." , 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 = Nothing , 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 = Nothing , 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 = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_unicode_compose" hb_unicode_compose :: 
    Ptr HarfBuzz.UnicodeFuncsT.UnicodeFuncsT -> -- ufuncs : TInterface (Name {namespace = "HarfBuzz", name = "unicode_funcs_t"})
    Word32 ->                               -- a : TBasicType TUInt32
    Word32 ->                               -- b : TBasicType TUInt32
    Ptr Word32 ->                           -- ab : TBasicType TUInt32
    IO Int32

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
unicodeCompose ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.UnicodeFuncsT.UnicodeFuncsT
    -- ^ /@ufuncs@/: Unicode functions.
    -> Word32
    -> Word32
    -> m ((Int32, Word32))
unicodeCompose :: UnicodeFuncsT -> Word32 -> Word32 -> m (Int32, Word32)
unicodeCompose UnicodeFuncsT
ufuncs Word32
a Word32
b = IO (Int32, Word32) -> m (Int32, Word32)
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 <- Ptr UnicodeFuncsT -> Word32 -> Word32 -> Ptr Word32 -> IO Int32
hb_unicode_compose Ptr UnicodeFuncsT
ufuncs' Word32
a Word32
b Ptr Word32
ab
    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 (m :: * -> *) a. Monad m => a -> m a
return (Int32
result, Word32
ab')


-- function unicode_combining_class
-- Args: [ Arg
--           { argCName = "ufuncs"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "unicode_funcs_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , 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 = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , 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 "hb_unicode_combining_class" hb_unicode_combining_class :: 
    Ptr HarfBuzz.UnicodeFuncsT.UnicodeFuncsT -> -- ufuncs : TInterface (Name {namespace = "HarfBuzz", name = "unicode_funcs_t"})
    Word32 ->                               -- unicode : TBasicType TUInt32
    IO CUInt

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
unicodeCombiningClass ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.UnicodeFuncsT.UnicodeFuncsT
    -> Word32
    -> m HarfBuzz.Enums.UnicodeCombiningClassT
unicodeCombiningClass :: UnicodeFuncsT -> Word32 -> m UnicodeCombiningClassT
unicodeCombiningClass UnicodeFuncsT
ufuncs Word32
unicode = IO UnicodeCombiningClassT -> m UnicodeCombiningClassT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO UnicodeCombiningClassT -> m UnicodeCombiningClassT)
-> IO UnicodeCombiningClassT -> m UnicodeCombiningClassT
forall a b. (a -> b) -> a -> b
$ do
    Ptr UnicodeFuncsT
ufuncs' <- UnicodeFuncsT -> IO (Ptr UnicodeFuncsT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr UnicodeFuncsT
ufuncs
    CUInt
result <- Ptr UnicodeFuncsT -> Word32 -> IO CUInt
hb_unicode_combining_class Ptr UnicodeFuncsT
ufuncs' Word32
unicode
    let result' :: UnicodeCombiningClassT
result' = (Int -> UnicodeCombiningClassT
forall a. Enum a => Int -> a
toEnum (Int -> UnicodeCombiningClassT)
-> (CUInt -> Int) -> CUInt -> UnicodeCombiningClassT
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
    UnicodeFuncsT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr UnicodeFuncsT
ufuncs
    UnicodeCombiningClassT -> IO UnicodeCombiningClassT
forall (m :: * -> *) a. Monad m => a -> m a
return UnicodeCombiningClassT
result'


-- function tag_to_string
-- XXX Could not generate function tag_to_string

-- Not implemented: Don't know how to allocate "buf" of type TCArray False 4 (-1) (TBasicType TUInt8)

-- function tag_from_string
-- Args: [ Arg
--           { argCName = "str"
--           , argType = TCArray False (-1) 1 (TBasicType TUInt8)
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , 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 = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "len"
--              , argType = TBasicType TInt
--              , direction = DirectionIn
--              , mayBeNull = False
--              , argDoc =
--                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--              , argScope = ScopeTypeInvalid
--              , argClosure = -1
--              , argDestroy = -1
--              , argCallerAllocates = False
--              , transfer = TransferNothing
--              }
--          ]
-- returnType: Just (TBasicType TUInt32)
-- throws : False
-- Skip return : False

foreign import ccall "hb_tag_from_string" hb_tag_from_string :: 
    Ptr Word8 ->                            -- str : TCArray False (-1) 1 (TBasicType TUInt8)
    Int32 ->                                -- len : TBasicType TInt
    IO Word32

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
tagFromString ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    ByteString
    -> m Word32
tagFromString :: ByteString -> m Word32
tagFromString ByteString
str = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
    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
$ ByteString -> Int
B.length ByteString
str
    Ptr Word8
str' <- ByteString -> IO (Ptr Word8)
packByteString ByteString
str
    Word32
result <- Ptr Word8 -> Int32 -> IO Word32
hb_tag_from_string Ptr Word8
str' Int32
len
    Ptr Word8 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word8
str'
    Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result


-- function shape_plan_get_shaper
-- Args: [ Arg
--           { argCName = "shape_plan"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "shape_plan_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a shape plan." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "hb_shape_plan_get_shaper" hb_shape_plan_get_shaper :: 
    Ptr HarfBuzz.ShapePlanT.ShapePlanT ->   -- shape_plan : TInterface (Name {namespace = "HarfBuzz", name = "shape_plan_t"})
    IO CString

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.7/
shapePlanGetShaper ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.ShapePlanT.ShapePlanT
    -- ^ /@shapePlan@/: a shape plan.
    -> m T.Text
shapePlanGetShaper :: ShapePlanT -> m Text
shapePlanGetShaper ShapePlanT
shapePlan = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
    Ptr ShapePlanT
shapePlan' <- ShapePlanT -> IO (Ptr ShapePlanT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr ShapePlanT
shapePlan
    CString
result <- Ptr ShapePlanT -> IO CString
hb_shape_plan_get_shaper Ptr ShapePlanT
shapePlan'
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"shapePlanGetShaper" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    ShapePlanT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr ShapePlanT
shapePlan
    Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'


-- function shape_plan_get_empty
-- Args: []
-- Lengths: []
-- returnType: Just
--               (TInterface
--                  Name { namespace = "HarfBuzz" , name = "shape_plan_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_shape_plan_get_empty" hb_shape_plan_get_empty :: 
    IO (Ptr HarfBuzz.ShapePlanT.ShapePlanT)

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.7/
shapePlanGetEmpty ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m HarfBuzz.ShapePlanT.ShapePlanT
shapePlanGetEmpty :: m ShapePlanT
shapePlanGetEmpty  = IO ShapePlanT -> m ShapePlanT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ShapePlanT -> m ShapePlanT) -> IO ShapePlanT -> m ShapePlanT
forall a b. (a -> b) -> a -> b
$ do
    Ptr ShapePlanT
result <- IO (Ptr ShapePlanT)
hb_shape_plan_get_empty
    Text -> Ptr ShapePlanT -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"shapePlanGetEmpty" Ptr ShapePlanT
result
    ShapePlanT
result' <- ((ManagedPtr ShapePlanT -> ShapePlanT)
-> Ptr ShapePlanT -> IO ShapePlanT
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr ShapePlanT -> ShapePlanT
HarfBuzz.ShapePlanT.ShapePlanT) Ptr ShapePlanT
result
    ShapePlanT -> IO ShapePlanT
forall (m :: * -> *) a. Monad m => a -> m a
return ShapePlanT
result'


-- function shape_plan_execute
-- Args: [ Arg
--           { argCName = "shape_plan"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "shape_plan_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a shape plan." , 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 "a font." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "buffer"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "buffer_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a buffer." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "features"
--           , argType =
--               TCArray
--                 False
--                 (-1)
--                 4
--                 (TInterface Name { namespace = "HarfBuzz" , name = "feature_t" })
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "num_features"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "num_features"
--              , argType = TBasicType TUInt
--              , direction = DirectionIn
--              , mayBeNull = False
--              , argDoc =
--                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--              , argScope = ScopeTypeInvalid
--              , argClosure = -1
--              , argDestroy = -1
--              , argCallerAllocates = False
--              , transfer = TransferNothing
--              }
--          ]
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_shape_plan_execute" hb_shape_plan_execute :: 
    Ptr HarfBuzz.ShapePlanT.ShapePlanT ->   -- shape_plan : TInterface (Name {namespace = "HarfBuzz", name = "shape_plan_t"})
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    Ptr HarfBuzz.BufferT.BufferT ->         -- buffer : TInterface (Name {namespace = "HarfBuzz", name = "buffer_t"})
    Ptr HarfBuzz.FeatureT.FeatureT ->       -- features : TCArray False (-1) 4 (TInterface (Name {namespace = "HarfBuzz", name = "feature_t"}))
    Word32 ->                               -- num_features : TBasicType TUInt
    IO Int32

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.7/
shapePlanExecute ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.ShapePlanT.ShapePlanT
    -- ^ /@shapePlan@/: a shape plan.
    -> HarfBuzz.FontT.FontT
    -- ^ /@font@/: a font.
    -> HarfBuzz.BufferT.BufferT
    -- ^ /@buffer@/: a buffer.
    -> [HarfBuzz.FeatureT.FeatureT]
    -> m Int32
shapePlanExecute :: ShapePlanT -> FontT -> BufferT -> [FeatureT] -> m Int32
shapePlanExecute ShapePlanT
shapePlan FontT
font BufferT
buffer [FeatureT]
features = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    let numFeatures :: Word32
numFeatures = Int -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Word32) -> Int -> Word32
forall a b. (a -> b) -> a -> b
$ [FeatureT] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [FeatureT]
features
    Ptr ShapePlanT
shapePlan' <- ShapePlanT -> IO (Ptr ShapePlanT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr ShapePlanT
shapePlan
    Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
    Ptr BufferT
buffer' <- BufferT -> IO (Ptr BufferT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BufferT
buffer
    [Ptr FeatureT]
features' <- (FeatureT -> IO (Ptr FeatureT)) -> [FeatureT] -> IO [Ptr FeatureT]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM FeatureT -> IO (Ptr FeatureT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr [FeatureT]
features
    Ptr FeatureT
features'' <- Int -> [Ptr FeatureT] -> IO (Ptr FeatureT)
forall a. Int -> [Ptr a] -> IO (Ptr a)
packBlockArray Int
16 [Ptr FeatureT]
features'
    Int32
result <- Ptr ShapePlanT
-> Ptr FontT -> Ptr BufferT -> Ptr FeatureT -> Word32 -> IO Int32
hb_shape_plan_execute Ptr ShapePlanT
shapePlan' Ptr FontT
font' Ptr BufferT
buffer' Ptr FeatureT
features'' Word32
numFeatures
    ShapePlanT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr ShapePlanT
shapePlan
    FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
    BufferT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BufferT
buffer
    (FeatureT -> IO ()) -> [FeatureT] -> IO ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ FeatureT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr [FeatureT]
features
    Ptr FeatureT -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr FeatureT
features''
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function shape_plan_create_cached2
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "props"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "segment_properties_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_features"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "feature_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "num_user_features"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "coords"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "num_coords"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "shaper_list"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface
--                  Name { namespace = "HarfBuzz" , name = "shape_plan_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_shape_plan_create_cached2" hb_shape_plan_create_cached2 :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Ptr HarfBuzz.SegmentPropertiesT.SegmentPropertiesT -> -- props : TInterface (Name {namespace = "HarfBuzz", name = "segment_properties_t"})
    Ptr HarfBuzz.FeatureT.FeatureT ->       -- user_features : TInterface (Name {namespace = "HarfBuzz", name = "feature_t"})
    Word32 ->                               -- num_user_features : TBasicType TUInt
    Int32 ->                                -- coords : TBasicType TInt
    Word32 ->                               -- num_coords : TBasicType TUInt
    CString ->                              -- shaper_list : TBasicType TUTF8
    IO (Ptr HarfBuzz.ShapePlanT.ShapePlanT)

-- | /No description available in the introspection data./
shapePlanCreateCached2 ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -> HarfBuzz.SegmentPropertiesT.SegmentPropertiesT
    -> HarfBuzz.FeatureT.FeatureT
    -> Word32
    -> Int32
    -> Word32
    -> T.Text
    -> m HarfBuzz.ShapePlanT.ShapePlanT
shapePlanCreateCached2 :: FaceT
-> SegmentPropertiesT
-> FeatureT
-> Word32
-> Int32
-> Word32
-> Text
-> m ShapePlanT
shapePlanCreateCached2 FaceT
face SegmentPropertiesT
props FeatureT
userFeatures Word32
numUserFeatures Int32
coords Word32
numCoords Text
shaperList = IO ShapePlanT -> m ShapePlanT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ShapePlanT -> m ShapePlanT) -> IO ShapePlanT -> m ShapePlanT
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 SegmentPropertiesT
props' <- SegmentPropertiesT -> IO (Ptr SegmentPropertiesT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr SegmentPropertiesT
props
    Ptr FeatureT
userFeatures' <- FeatureT -> IO (Ptr FeatureT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FeatureT
userFeatures
    CString
shaperList' <- Text -> IO CString
textToCString Text
shaperList
    Ptr ShapePlanT
result <- Ptr FaceT
-> Ptr SegmentPropertiesT
-> Ptr FeatureT
-> Word32
-> Int32
-> Word32
-> CString
-> IO (Ptr ShapePlanT)
hb_shape_plan_create_cached2 Ptr FaceT
face' Ptr SegmentPropertiesT
props' Ptr FeatureT
userFeatures' Word32
numUserFeatures Int32
coords Word32
numCoords CString
shaperList'
    Text -> Ptr ShapePlanT -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"shapePlanCreateCached2" Ptr ShapePlanT
result
    ShapePlanT
result' <- ((ManagedPtr ShapePlanT -> ShapePlanT)
-> Ptr ShapePlanT -> IO ShapePlanT
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr ShapePlanT -> ShapePlanT
HarfBuzz.ShapePlanT.ShapePlanT) Ptr ShapePlanT
result
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    SegmentPropertiesT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr SegmentPropertiesT
props
    FeatureT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FeatureT
userFeatures
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
shaperList'
    ShapePlanT -> IO ShapePlanT
forall (m :: * -> *) a. Monad m => a -> m a
return ShapePlanT
result'


-- function shape_plan_create_cached
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "props"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "segment_properties_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_features"
--           , argType =
--               TCArray
--                 False
--                 (-1)
--                 3
--                 (TInterface Name { namespace = "HarfBuzz" , name = "feature_t" })
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "num_user_features"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "shaper_list"
--           , argType = TCArray True (-1) (-1) (TBasicType TUTF8)
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "num_user_features"
--              , argType = TBasicType TUInt
--              , direction = DirectionIn
--              , mayBeNull = False
--              , argDoc =
--                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--              , argScope = ScopeTypeInvalid
--              , argClosure = -1
--              , argDestroy = -1
--              , argCallerAllocates = False
--              , transfer = TransferNothing
--              }
--          ]
-- returnType: Just
--               (TInterface
--                  Name { namespace = "HarfBuzz" , name = "shape_plan_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_shape_plan_create_cached" hb_shape_plan_create_cached :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Ptr HarfBuzz.SegmentPropertiesT.SegmentPropertiesT -> -- props : TInterface (Name {namespace = "HarfBuzz", name = "segment_properties_t"})
    Ptr HarfBuzz.FeatureT.FeatureT ->       -- user_features : TCArray False (-1) 3 (TInterface (Name {namespace = "HarfBuzz", name = "feature_t"}))
    Word32 ->                               -- num_user_features : TBasicType TUInt
    Ptr CString ->                          -- shaper_list : TCArray True (-1) (-1) (TBasicType TUTF8)
    IO (Ptr HarfBuzz.ShapePlanT.ShapePlanT)

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.7/
shapePlanCreateCached ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -> HarfBuzz.SegmentPropertiesT.SegmentPropertiesT
    -> [HarfBuzz.FeatureT.FeatureT]
    -> [T.Text]
    -> m HarfBuzz.ShapePlanT.ShapePlanT
shapePlanCreateCached :: FaceT -> SegmentPropertiesT -> [FeatureT] -> [Text] -> m ShapePlanT
shapePlanCreateCached FaceT
face SegmentPropertiesT
props [FeatureT]
userFeatures [Text]
shaperList = IO ShapePlanT -> m ShapePlanT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ShapePlanT -> m ShapePlanT) -> IO ShapePlanT -> m ShapePlanT
forall a b. (a -> b) -> a -> b
$ do
    let numUserFeatures :: Word32
numUserFeatures = Int -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Word32) -> Int -> Word32
forall a b. (a -> b) -> a -> b
$ [FeatureT] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [FeatureT]
userFeatures
    Ptr FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Ptr SegmentPropertiesT
props' <- SegmentPropertiesT -> IO (Ptr SegmentPropertiesT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr SegmentPropertiesT
props
    [Ptr FeatureT]
userFeatures' <- (FeatureT -> IO (Ptr FeatureT)) -> [FeatureT] -> IO [Ptr FeatureT]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM FeatureT -> IO (Ptr FeatureT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr [FeatureT]
userFeatures
    Ptr FeatureT
userFeatures'' <- Int -> [Ptr FeatureT] -> IO (Ptr FeatureT)
forall a. Int -> [Ptr a] -> IO (Ptr a)
packBlockArray Int
16 [Ptr FeatureT]
userFeatures'
    Ptr CString
shaperList' <- [Text] -> IO (Ptr CString)
packZeroTerminatedUTF8CArray [Text]
shaperList
    Ptr ShapePlanT
result <- Ptr FaceT
-> Ptr SegmentPropertiesT
-> Ptr FeatureT
-> Word32
-> Ptr CString
-> IO (Ptr ShapePlanT)
hb_shape_plan_create_cached Ptr FaceT
face' Ptr SegmentPropertiesT
props' Ptr FeatureT
userFeatures'' Word32
numUserFeatures Ptr CString
shaperList'
    Text -> Ptr ShapePlanT -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"shapePlanCreateCached" Ptr ShapePlanT
result
    ShapePlanT
result' <- ((ManagedPtr ShapePlanT -> ShapePlanT)
-> Ptr ShapePlanT -> IO ShapePlanT
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr ShapePlanT -> ShapePlanT
HarfBuzz.ShapePlanT.ShapePlanT) Ptr ShapePlanT
result
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    SegmentPropertiesT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr SegmentPropertiesT
props
    (FeatureT -> IO ()) -> [FeatureT] -> IO ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ FeatureT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr [FeatureT]
userFeatures
    Ptr FeatureT -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr FeatureT
userFeatures''
    (CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
shaperList'
    Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
shaperList'
    ShapePlanT -> IO ShapePlanT
forall (m :: * -> *) a. Monad m => a -> m a
return ShapePlanT
result'


-- function shape_plan_create2
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "props"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "segment_properties_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_features"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "feature_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "num_user_features"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "coords"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "num_coords"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "shaper_list"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface
--                  Name { namespace = "HarfBuzz" , name = "shape_plan_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_shape_plan_create2" hb_shape_plan_create2 :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Ptr HarfBuzz.SegmentPropertiesT.SegmentPropertiesT -> -- props : TInterface (Name {namespace = "HarfBuzz", name = "segment_properties_t"})
    Ptr HarfBuzz.FeatureT.FeatureT ->       -- user_features : TInterface (Name {namespace = "HarfBuzz", name = "feature_t"})
    Word32 ->                               -- num_user_features : TBasicType TUInt
    Int32 ->                                -- coords : TBasicType TInt
    Word32 ->                               -- num_coords : TBasicType TUInt
    CString ->                              -- shaper_list : TBasicType TUTF8
    IO (Ptr HarfBuzz.ShapePlanT.ShapePlanT)

-- | /No description available in the introspection data./
shapePlanCreate2 ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -> HarfBuzz.SegmentPropertiesT.SegmentPropertiesT
    -> HarfBuzz.FeatureT.FeatureT
    -> Word32
    -> Int32
    -> Word32
    -> T.Text
    -> m HarfBuzz.ShapePlanT.ShapePlanT
shapePlanCreate2 :: FaceT
-> SegmentPropertiesT
-> FeatureT
-> Word32
-> Int32
-> Word32
-> Text
-> m ShapePlanT
shapePlanCreate2 FaceT
face SegmentPropertiesT
props FeatureT
userFeatures Word32
numUserFeatures Int32
coords Word32
numCoords Text
shaperList = IO ShapePlanT -> m ShapePlanT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ShapePlanT -> m ShapePlanT) -> IO ShapePlanT -> m ShapePlanT
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 SegmentPropertiesT
props' <- SegmentPropertiesT -> IO (Ptr SegmentPropertiesT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr SegmentPropertiesT
props
    Ptr FeatureT
userFeatures' <- FeatureT -> IO (Ptr FeatureT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FeatureT
userFeatures
    CString
shaperList' <- Text -> IO CString
textToCString Text
shaperList
    Ptr ShapePlanT
result <- Ptr FaceT
-> Ptr SegmentPropertiesT
-> Ptr FeatureT
-> Word32
-> Int32
-> Word32
-> CString
-> IO (Ptr ShapePlanT)
hb_shape_plan_create2 Ptr FaceT
face' Ptr SegmentPropertiesT
props' Ptr FeatureT
userFeatures' Word32
numUserFeatures Int32
coords Word32
numCoords CString
shaperList'
    Text -> Ptr ShapePlanT -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"shapePlanCreate2" Ptr ShapePlanT
result
    ShapePlanT
result' <- ((ManagedPtr ShapePlanT -> ShapePlanT)
-> Ptr ShapePlanT -> IO ShapePlanT
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr ShapePlanT -> ShapePlanT
HarfBuzz.ShapePlanT.ShapePlanT) Ptr ShapePlanT
result
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    SegmentPropertiesT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr SegmentPropertiesT
props
    FeatureT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FeatureT
userFeatures
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
shaperList'
    ShapePlanT -> IO ShapePlanT
forall (m :: * -> *) a. Monad m => a -> m a
return ShapePlanT
result'


-- function shape_plan_create
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "props"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "segment_properties_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_features"
--           , argType =
--               TCArray
--                 False
--                 (-1)
--                 3
--                 (TInterface Name { namespace = "HarfBuzz" , name = "feature_t" })
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "num_user_features"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "shaper_list"
--           , argType = TCArray True (-1) (-1) (TBasicType TUTF8)
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "num_user_features"
--              , argType = TBasicType TUInt
--              , direction = DirectionIn
--              , mayBeNull = False
--              , argDoc =
--                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--              , argScope = ScopeTypeInvalid
--              , argClosure = -1
--              , argDestroy = -1
--              , argCallerAllocates = False
--              , transfer = TransferNothing
--              }
--          ]
-- returnType: Just
--               (TInterface
--                  Name { namespace = "HarfBuzz" , name = "shape_plan_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_shape_plan_create" hb_shape_plan_create :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Ptr HarfBuzz.SegmentPropertiesT.SegmentPropertiesT -> -- props : TInterface (Name {namespace = "HarfBuzz", name = "segment_properties_t"})
    Ptr HarfBuzz.FeatureT.FeatureT ->       -- user_features : TCArray False (-1) 3 (TInterface (Name {namespace = "HarfBuzz", name = "feature_t"}))
    Word32 ->                               -- num_user_features : TBasicType TUInt
    Ptr CString ->                          -- shaper_list : TCArray True (-1) (-1) (TBasicType TUTF8)
    IO (Ptr HarfBuzz.ShapePlanT.ShapePlanT)

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.7/
shapePlanCreate ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -> HarfBuzz.SegmentPropertiesT.SegmentPropertiesT
    -> [HarfBuzz.FeatureT.FeatureT]
    -> [T.Text]
    -> m HarfBuzz.ShapePlanT.ShapePlanT
shapePlanCreate :: FaceT -> SegmentPropertiesT -> [FeatureT] -> [Text] -> m ShapePlanT
shapePlanCreate FaceT
face SegmentPropertiesT
props [FeatureT]
userFeatures [Text]
shaperList = IO ShapePlanT -> m ShapePlanT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ShapePlanT -> m ShapePlanT) -> IO ShapePlanT -> m ShapePlanT
forall a b. (a -> b) -> a -> b
$ do
    let numUserFeatures :: Word32
numUserFeatures = Int -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Word32) -> Int -> Word32
forall a b. (a -> b) -> a -> b
$ [FeatureT] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [FeatureT]
userFeatures
    Ptr FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Ptr SegmentPropertiesT
props' <- SegmentPropertiesT -> IO (Ptr SegmentPropertiesT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr SegmentPropertiesT
props
    [Ptr FeatureT]
userFeatures' <- (FeatureT -> IO (Ptr FeatureT)) -> [FeatureT] -> IO [Ptr FeatureT]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM FeatureT -> IO (Ptr FeatureT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr [FeatureT]
userFeatures
    Ptr FeatureT
userFeatures'' <- Int -> [Ptr FeatureT] -> IO (Ptr FeatureT)
forall a. Int -> [Ptr a] -> IO (Ptr a)
packBlockArray Int
16 [Ptr FeatureT]
userFeatures'
    Ptr CString
shaperList' <- [Text] -> IO (Ptr CString)
packZeroTerminatedUTF8CArray [Text]
shaperList
    Ptr ShapePlanT
result <- Ptr FaceT
-> Ptr SegmentPropertiesT
-> Ptr FeatureT
-> Word32
-> Ptr CString
-> IO (Ptr ShapePlanT)
hb_shape_plan_create Ptr FaceT
face' Ptr SegmentPropertiesT
props' Ptr FeatureT
userFeatures'' Word32
numUserFeatures Ptr CString
shaperList'
    Text -> Ptr ShapePlanT -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"shapePlanCreate" Ptr ShapePlanT
result
    ShapePlanT
result' <- ((ManagedPtr ShapePlanT -> ShapePlanT)
-> Ptr ShapePlanT -> IO ShapePlanT
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr ShapePlanT -> ShapePlanT
HarfBuzz.ShapePlanT.ShapePlanT) Ptr ShapePlanT
result
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    SegmentPropertiesT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr SegmentPropertiesT
props
    (FeatureT -> IO ()) -> [FeatureT] -> IO ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ FeatureT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr [FeatureT]
userFeatures
    Ptr FeatureT -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr FeatureT
userFeatures''
    (CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
shaperList'
    Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
shaperList'
    ShapePlanT -> IO ShapePlanT
forall (m :: * -> *) a. Monad m => a -> m a
return ShapePlanT
result'


-- function shape_list_shapers
-- Args: []
-- Lengths: []
-- returnType: Just (TCArray True (-1) (-1) (TBasicType TUTF8))
-- throws : False
-- Skip return : False

foreign import ccall "hb_shape_list_shapers" hb_shape_list_shapers :: 
    IO (Ptr CString)

-- | Retrieves the list of shapers supported by HarfBuzz.
-- 
-- /Since: 0.9.2/
shapeListShapers ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m [T.Text]
    -- ^ __Returns:__ an array of
    --    constant strings
shapeListShapers :: m [Text]
shapeListShapers  = IO [Text] -> m [Text]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Text] -> m [Text]) -> IO [Text] -> m [Text]
forall a b. (a -> b) -> a -> b
$ do
    Ptr CString
result <- IO (Ptr CString)
hb_shape_list_shapers
    Text -> Ptr CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"shapeListShapers" Ptr CString
result
    [Text]
result' <- HasCallStack => Ptr CString -> IO [Text]
Ptr CString -> IO [Text]
unpackZeroTerminatedUTF8CArray Ptr CString
result
    [Text] -> IO [Text]
forall (m :: * -> *) a. Monad m => a -> m a
return [Text]
result'


-- function shape_full
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #hb_font_t to use for shaping"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "buffer"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "buffer_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #hb_buffer_t to shape"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "features"
--           , argType =
--               TCArray
--                 False
--                 (-1)
--                 3
--                 (TInterface Name { namespace = "HarfBuzz" , name = "feature_t" })
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "an array of user\n   specified #hb_feature_t or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "num_features"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the length of @features array"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "shaper_list"
--           , argType = TCArray True (-1) (-1) (TBasicType TUTF8)
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "a %NULL-terminated\n   array of shapers to use or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "num_features"
--              , argType = TBasicType TUInt
--              , direction = DirectionIn
--              , mayBeNull = False
--              , argDoc =
--                  Documentation
--                    { rawDocText = Just "the length of @features array"
--                    , sinceVersion = Nothing
--                    }
--              , argScope = ScopeTypeInvalid
--              , argClosure = -1
--              , argDestroy = -1
--              , argCallerAllocates = False
--              , transfer = TransferNothing
--              }
--          ]
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_shape_full" hb_shape_full :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    Ptr HarfBuzz.BufferT.BufferT ->         -- buffer : TInterface (Name {namespace = "HarfBuzz", name = "buffer_t"})
    Ptr HarfBuzz.FeatureT.FeatureT ->       -- features : TCArray False (-1) 3 (TInterface (Name {namespace = "HarfBuzz", name = "feature_t"}))
    Word32 ->                               -- num_features : TBasicType TUInt
    Ptr CString ->                          -- shaper_list : TCArray True (-1) (-1) (TBasicType TUTF8)
    IO Int32

-- | See 'GI.HarfBuzz.Functions.shape' for details. If /@shaperList@/ is not 'P.Nothing', the specified
-- shapers will be used in the given order, otherwise the default shapers list
-- will be used.
-- 
-- /Since: 0.9.2/
shapeFull ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: an t'GI.HarfBuzz.Structs.FontT.FontT' to use for shaping
    -> HarfBuzz.BufferT.BufferT
    -- ^ /@buffer@/: an t'GI.HarfBuzz.Structs.BufferT.BufferT' to shape
    -> Maybe ([HarfBuzz.FeatureT.FeatureT])
    -- ^ /@features@/: an array of user
    --    specified t'GI.HarfBuzz.Structs.FeatureT.FeatureT' or 'P.Nothing'
    -> Maybe ([T.Text])
    -- ^ /@shaperList@/: a 'P.Nothing'-terminated
    --    array of shapers to use or 'P.Nothing'
    -> m Int32
    -- ^ __Returns:__ false if all shapers failed, true otherwise
shapeFull :: FontT -> BufferT -> Maybe [FeatureT] -> Maybe [Text] -> m Int32
shapeFull FontT
font BufferT
buffer Maybe [FeatureT]
features Maybe [Text]
shaperList = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    let numFeatures :: Word32
numFeatures = case Maybe [FeatureT]
features of
            Maybe [FeatureT]
Nothing -> Word32
0
            Just [FeatureT]
jFeatures -> Int -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Word32) -> Int -> Word32
forall a b. (a -> b) -> a -> b
$ [FeatureT] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [FeatureT]
jFeatures
    Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
    Ptr BufferT
buffer' <- BufferT -> IO (Ptr BufferT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BufferT
buffer
    Ptr FeatureT
maybeFeatures <- case Maybe [FeatureT]
features of
        Maybe [FeatureT]
Nothing -> Ptr FeatureT -> IO (Ptr FeatureT)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr FeatureT
forall a. Ptr a
nullPtr
        Just [FeatureT]
jFeatures -> do
            [Ptr FeatureT]
jFeatures' <- (FeatureT -> IO (Ptr FeatureT)) -> [FeatureT] -> IO [Ptr FeatureT]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM FeatureT -> IO (Ptr FeatureT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr [FeatureT]
jFeatures
            Ptr FeatureT
jFeatures'' <- Int -> [Ptr FeatureT] -> IO (Ptr FeatureT)
forall a. Int -> [Ptr a] -> IO (Ptr a)
packBlockArray Int
16 [Ptr FeatureT]
jFeatures'
            Ptr FeatureT -> IO (Ptr FeatureT)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr FeatureT
jFeatures''
    Ptr CString
maybeShaperList <- case Maybe [Text]
shaperList of
        Maybe [Text]
Nothing -> Ptr CString -> IO (Ptr CString)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CString
forall a. Ptr a
nullPtr
        Just [Text]
jShaperList -> do
            Ptr CString
jShaperList' <- [Text] -> IO (Ptr CString)
packZeroTerminatedUTF8CArray [Text]
jShaperList
            Ptr CString -> IO (Ptr CString)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CString
jShaperList'
    Int32
result <- Ptr FontT
-> Ptr BufferT -> Ptr FeatureT -> Word32 -> Ptr CString -> IO Int32
hb_shape_full Ptr FontT
font' Ptr BufferT
buffer' Ptr FeatureT
maybeFeatures Word32
numFeatures Ptr CString
maybeShaperList
    FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
    BufferT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BufferT
buffer
    Maybe [FeatureT] -> ([FeatureT] -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe [FeatureT]
features ((FeatureT -> IO ()) -> [FeatureT] -> IO ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ FeatureT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr)
    Ptr FeatureT -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr FeatureT
maybeFeatures
    (CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
maybeShaperList
    Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
maybeShaperList
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function shape
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #hb_font_t to use for shaping"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "buffer"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "buffer_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #hb_buffer_t to shape"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "features"
--           , argType =
--               TCArray
--                 False
--                 (-1)
--                 3
--                 (TInterface Name { namespace = "HarfBuzz" , name = "feature_t" })
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "an array of user\n   specified #hb_feature_t or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "num_features"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the length of @features array"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "num_features"
--              , argType = TBasicType TUInt
--              , direction = DirectionIn
--              , mayBeNull = False
--              , argDoc =
--                  Documentation
--                    { rawDocText = Just "the length of @features array"
--                    , sinceVersion = Nothing
--                    }
--              , argScope = ScopeTypeInvalid
--              , argClosure = -1
--              , argDestroy = -1
--              , argCallerAllocates = False
--              , transfer = TransferNothing
--              }
--          ]
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_shape" hb_shape :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    Ptr HarfBuzz.BufferT.BufferT ->         -- buffer : TInterface (Name {namespace = "HarfBuzz", name = "buffer_t"})
    Ptr HarfBuzz.FeatureT.FeatureT ->       -- features : TCArray False (-1) 3 (TInterface (Name {namespace = "HarfBuzz", name = "feature_t"}))
    Word32 ->                               -- num_features : TBasicType TUInt
    IO ()

-- | Shapes /@buffer@/ using /@font@/ turning its Unicode characters content to
-- positioned glyphs. If /@features@/ is not 'P.Nothing', it will be used to control the
-- features applied during shaping. If two /@features@/ have the same tag but
-- overlapping ranges the value of the feature with the higher index takes
-- precedence.
-- 
-- /Since: 0.9.2/
shape ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: an t'GI.HarfBuzz.Structs.FontT.FontT' to use for shaping
    -> HarfBuzz.BufferT.BufferT
    -- ^ /@buffer@/: an t'GI.HarfBuzz.Structs.BufferT.BufferT' to shape
    -> Maybe ([HarfBuzz.FeatureT.FeatureT])
    -- ^ /@features@/: an array of user
    --    specified t'GI.HarfBuzz.Structs.FeatureT.FeatureT' or 'P.Nothing'
    -> m ()
shape :: FontT -> BufferT -> Maybe [FeatureT] -> m ()
shape FontT
font BufferT
buffer Maybe [FeatureT]
features = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    let numFeatures :: Word32
numFeatures = case Maybe [FeatureT]
features of
            Maybe [FeatureT]
Nothing -> Word32
0
            Just [FeatureT]
jFeatures -> Int -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Word32) -> Int -> Word32
forall a b. (a -> b) -> a -> b
$ [FeatureT] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [FeatureT]
jFeatures
    Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
    Ptr BufferT
buffer' <- BufferT -> IO (Ptr BufferT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BufferT
buffer
    Ptr FeatureT
maybeFeatures <- case Maybe [FeatureT]
features of
        Maybe [FeatureT]
Nothing -> Ptr FeatureT -> IO (Ptr FeatureT)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr FeatureT
forall a. Ptr a
nullPtr
        Just [FeatureT]
jFeatures -> do
            [Ptr FeatureT]
jFeatures' <- (FeatureT -> IO (Ptr FeatureT)) -> [FeatureT] -> IO [Ptr FeatureT]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM FeatureT -> IO (Ptr FeatureT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr [FeatureT]
jFeatures
            Ptr FeatureT
jFeatures'' <- Int -> [Ptr FeatureT] -> IO (Ptr FeatureT)
forall a. Int -> [Ptr a] -> IO (Ptr a)
packBlockArray Int
16 [Ptr FeatureT]
jFeatures'
            Ptr FeatureT -> IO (Ptr FeatureT)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr FeatureT
jFeatures''
    Ptr FontT -> Ptr BufferT -> Ptr FeatureT -> Word32 -> IO ()
hb_shape Ptr FontT
font' Ptr BufferT
buffer' Ptr FeatureT
maybeFeatures Word32
numFeatures
    FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
    BufferT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BufferT
buffer
    Maybe [FeatureT] -> ([FeatureT] -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe [FeatureT]
features ((FeatureT -> IO ()) -> [FeatureT] -> IO ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ FeatureT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr)
    Ptr FeatureT -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr FeatureT
maybeFeatures
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function set_union
-- Args: [ Arg
--           { argCName = "set"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "set_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a set." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "other"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "set_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_set_union" hb_set_union :: 
    Ptr HarfBuzz.SetT.SetT ->               -- set : TInterface (Name {namespace = "HarfBuzz", name = "set_t"})
    Ptr HarfBuzz.SetT.SetT ->               -- other : TInterface (Name {namespace = "HarfBuzz", name = "set_t"})
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
setUnion ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.SetT.SetT
    -- ^ /@set@/: a set.
    -> HarfBuzz.SetT.SetT
    -> m ()
setUnion :: SetT -> SetT -> m ()
setUnion SetT
set SetT
other = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr SetT
set' <- SetT -> IO (Ptr SetT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr SetT
set
    Ptr SetT
other' <- SetT -> IO (Ptr SetT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr SetT
other
    Ptr SetT -> Ptr SetT -> IO ()
hb_set_union Ptr SetT
set' Ptr SetT
other'
    SetT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr SetT
set
    SetT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr SetT
other
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function set_symmetric_difference
-- Args: [ Arg
--           { argCName = "set"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "set_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a set." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "other"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "set_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_set_symmetric_difference" hb_set_symmetric_difference :: 
    Ptr HarfBuzz.SetT.SetT ->               -- set : TInterface (Name {namespace = "HarfBuzz", name = "set_t"})
    Ptr HarfBuzz.SetT.SetT ->               -- other : TInterface (Name {namespace = "HarfBuzz", name = "set_t"})
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
setSymmetricDifference ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.SetT.SetT
    -- ^ /@set@/: a set.
    -> HarfBuzz.SetT.SetT
    -> m ()
setSymmetricDifference :: SetT -> SetT -> m ()
setSymmetricDifference SetT
set SetT
other = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr SetT
set' <- SetT -> IO (Ptr SetT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr SetT
set
    Ptr SetT
other' <- SetT -> IO (Ptr SetT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr SetT
other
    Ptr SetT -> Ptr SetT -> IO ()
hb_set_symmetric_difference Ptr SetT
set' Ptr SetT
other'
    SetT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr SetT
set
    SetT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr SetT
other
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function set_subtract
-- Args: [ Arg
--           { argCName = "set"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "set_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a set." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "other"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "set_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_set_subtract" hb_set_subtract :: 
    Ptr HarfBuzz.SetT.SetT ->               -- set : TInterface (Name {namespace = "HarfBuzz", name = "set_t"})
    Ptr HarfBuzz.SetT.SetT ->               -- other : TInterface (Name {namespace = "HarfBuzz", name = "set_t"})
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
setSubtract ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.SetT.SetT
    -- ^ /@set@/: a set.
    -> HarfBuzz.SetT.SetT
    -> m ()
setSubtract :: SetT -> SetT -> m ()
setSubtract SetT
set SetT
other = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr SetT
set' <- SetT -> IO (Ptr SetT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr SetT
set
    Ptr SetT
other' <- SetT -> IO (Ptr SetT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr SetT
other
    Ptr SetT -> Ptr SetT -> IO ()
hb_set_subtract Ptr SetT
set' Ptr SetT
other'
    SetT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr SetT
set
    SetT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr SetT
other
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function set_set
-- Args: [ Arg
--           { argCName = "set"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "set_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a set." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "other"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "set_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_set_set" hb_set_set :: 
    Ptr HarfBuzz.SetT.SetT ->               -- set : TInterface (Name {namespace = "HarfBuzz", name = "set_t"})
    Ptr HarfBuzz.SetT.SetT ->               -- other : TInterface (Name {namespace = "HarfBuzz", name = "set_t"})
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
setSet ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.SetT.SetT
    -- ^ /@set@/: a set.
    -> HarfBuzz.SetT.SetT
    -> m ()
setSet :: SetT -> SetT -> m ()
setSet SetT
set SetT
other = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr SetT
set' <- SetT -> IO (Ptr SetT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr SetT
set
    Ptr SetT
other' <- SetT -> IO (Ptr SetT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr SetT
other
    Ptr SetT -> Ptr SetT -> IO ()
hb_set_set Ptr SetT
set' Ptr SetT
other'
    SetT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr SetT
set
    SetT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr SetT
other
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function set_previous_range
-- Args: [ Arg
--           { argCName = "set"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "set_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a set." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "first"
--           , argType = TBasicType TUInt32
--           , direction = DirectionInout
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "input current first and output first codepoint in the range."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "last"
--           , argType = TBasicType TUInt32
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "output last codepoint in the range."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_set_previous_range" hb_set_previous_range :: 
    Ptr HarfBuzz.SetT.SetT ->               -- set : TInterface (Name {namespace = "HarfBuzz", name = "set_t"})
    Ptr Word32 ->                           -- first : TBasicType TUInt32
    Ptr Word32 ->                           -- last : TBasicType TUInt32
    IO Int32

-- | Gets the previous consecutive range of numbers in /@set@/ that
-- are less than current value of /@first@/.
-- 
-- Set /@first@/ to 'GI.HarfBuzz.Constants.SET_VALUE_INVALID' to get started.
-- 
-- /Since: 1.8.0/
setPreviousRange ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.SetT.SetT
    -- ^ /@set@/: a set.
    -> Word32
    -- ^ /@first@/: input current first and output first codepoint in the range.
    -> m ((Int32, Word32, Word32))
    -- ^ __Returns:__ whether there was a previous range.
setPreviousRange :: SetT -> Word32 -> m (Int32, Word32, Word32)
setPreviousRange SetT
set Word32
first = IO (Int32, Word32, Word32) -> m (Int32, Word32, Word32)
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 SetT
set' <- SetT -> IO (Ptr SetT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr SetT
set
    Ptr Word32
first' <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
    Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr Word32
first' Word32
first
    Ptr Word32
last <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
    Int32
result <- Ptr SetT -> Ptr Word32 -> Ptr Word32 -> IO Int32
hb_set_previous_range Ptr SetT
set' Ptr Word32
first' Ptr Word32
last
    Word32
first'' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
first'
    Word32
last' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
last
    SetT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr SetT
set
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
first'
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
last
    (Int32, Word32, Word32) -> IO (Int32, Word32, Word32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
result, Word32
first'', Word32
last')


-- function set_previous
-- Args: [ Arg
--           { argCName = "set"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "set_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a set." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "codepoint"
--           , argType = TBasicType TUInt32
--           , direction = DirectionInout
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_set_previous" hb_set_previous :: 
    Ptr HarfBuzz.SetT.SetT ->               -- set : TInterface (Name {namespace = "HarfBuzz", name = "set_t"})
    Ptr Word32 ->                           -- codepoint : TBasicType TUInt32
    IO Int32

-- | Gets the previous number in /@set@/ that is lower than current value of /@codepoint@/.
-- 
-- Set /@codepoint@/ to 'GI.HarfBuzz.Constants.SET_VALUE_INVALID' to get started.
-- 
-- /Since: 1.8.0/
setPrevious ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.SetT.SetT
    -- ^ /@set@/: a set.
    -> Word32
    -> m ((Int32, Word32))
    -- ^ __Returns:__ whether there was a previous value.
setPrevious :: SetT -> Word32 -> m (Int32, Word32)
setPrevious SetT
set Word32
codepoint = IO (Int32, Word32) -> m (Int32, Word32)
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 SetT
set' <- SetT -> IO (Ptr SetT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr SetT
set
    Ptr Word32
codepoint' <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
    Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr Word32
codepoint' Word32
codepoint
    Int32
result <- Ptr SetT -> Ptr Word32 -> IO Int32
hb_set_previous Ptr SetT
set' Ptr Word32
codepoint'
    Word32
codepoint'' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
codepoint'
    SetT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr SetT
set
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
codepoint'
    (Int32, Word32) -> IO (Int32, Word32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
result, Word32
codepoint'')


-- function set_next_range
-- Args: [ Arg
--           { argCName = "set"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "set_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a set." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "first"
--           , argType = TBasicType TUInt32
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "output first codepoint in the range."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "last"
--           , argType = TBasicType TUInt32
--           , direction = DirectionInout
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "input current last and output last codepoint in the range."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_set_next_range" hb_set_next_range :: 
    Ptr HarfBuzz.SetT.SetT ->               -- set : TInterface (Name {namespace = "HarfBuzz", name = "set_t"})
    Ptr Word32 ->                           -- first : TBasicType TUInt32
    Ptr Word32 ->                           -- last : TBasicType TUInt32
    IO Int32

-- | Gets the next consecutive range of numbers in /@set@/ that
-- are greater than current value of /@last@/.
-- 
-- Set /@last@/ to 'GI.HarfBuzz.Constants.SET_VALUE_INVALID' to get started.
-- 
-- /Since: 0.9.7/
setNextRange ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.SetT.SetT
    -- ^ /@set@/: a set.
    -> Word32
    -- ^ /@last@/: input current last and output last codepoint in the range.
    -> m ((Int32, Word32, Word32))
    -- ^ __Returns:__ whether there was a next range.
setNextRange :: SetT -> Word32 -> m (Int32, Word32, Word32)
setNextRange SetT
set Word32
last = IO (Int32, Word32, Word32) -> m (Int32, Word32, Word32)
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 SetT
set' <- SetT -> IO (Ptr SetT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr SetT
set
    Ptr Word32
first <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
    Ptr Word32
last' <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
    Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr Word32
last' Word32
last
    Int32
result <- Ptr SetT -> Ptr Word32 -> Ptr Word32 -> IO Int32
hb_set_next_range Ptr SetT
set' Ptr Word32
first Ptr Word32
last'
    Word32
first' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
first
    Word32
last'' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
last'
    SetT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr SetT
set
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
first
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
last'
    (Int32, Word32, Word32) -> IO (Int32, Word32, Word32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
result, Word32
first', Word32
last'')


-- function set_next
-- Args: [ Arg
--           { argCName = "set"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "set_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a set." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "codepoint"
--           , argType = TBasicType TUInt32
--           , direction = DirectionInout
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_set_next" hb_set_next :: 
    Ptr HarfBuzz.SetT.SetT ->               -- set : TInterface (Name {namespace = "HarfBuzz", name = "set_t"})
    Ptr Word32 ->                           -- codepoint : TBasicType TUInt32
    IO Int32

-- | Gets the next number in /@set@/ that is greater than current value of /@codepoint@/.
-- 
-- Set /@codepoint@/ to 'GI.HarfBuzz.Constants.SET_VALUE_INVALID' to get started.
-- 
-- /Since: 0.9.2/
setNext ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.SetT.SetT
    -- ^ /@set@/: a set.
    -> Word32
    -> m ((Int32, Word32))
    -- ^ __Returns:__ whether there was a next value.
setNext :: SetT -> Word32 -> m (Int32, Word32)
setNext SetT
set Word32
codepoint = IO (Int32, Word32) -> m (Int32, Word32)
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 SetT
set' <- SetT -> IO (Ptr SetT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr SetT
set
    Ptr Word32
codepoint' <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
    Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr Word32
codepoint' Word32
codepoint
    Int32
result <- Ptr SetT -> Ptr Word32 -> IO Int32
hb_set_next Ptr SetT
set' Ptr Word32
codepoint'
    Word32
codepoint'' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
codepoint'
    SetT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr SetT
set
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
codepoint'
    (Int32, Word32) -> IO (Int32, Word32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
result, Word32
codepoint'')


-- function set_is_subset
-- Args: [ Arg
--           { argCName = "set"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "set_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a set." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "larger_set"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "set_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "other set." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_set_is_subset" hb_set_is_subset :: 
    Ptr HarfBuzz.SetT.SetT ->               -- set : TInterface (Name {namespace = "HarfBuzz", name = "set_t"})
    Ptr HarfBuzz.SetT.SetT ->               -- larger_set : TInterface (Name {namespace = "HarfBuzz", name = "set_t"})
    IO Int32

-- | /No description available in the introspection data./
-- 
-- /Since: 1.8.1/
setIsSubset ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.SetT.SetT
    -- ^ /@set@/: a set.
    -> HarfBuzz.SetT.SetT
    -- ^ /@largerSet@/: other set.
    -> m Int32
    -- ^ __Returns:__ 'P.True' if the /@set@/ is a subset of (or equal to) /@largerSet@/, 'P.False' otherwise.
setIsSubset :: SetT -> SetT -> m Int32
setIsSubset SetT
set SetT
largerSet = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr SetT
set' <- SetT -> IO (Ptr SetT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr SetT
set
    Ptr SetT
largerSet' <- SetT -> IO (Ptr SetT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr SetT
largerSet
    Int32
result <- Ptr SetT -> Ptr SetT -> IO Int32
hb_set_is_subset Ptr SetT
set' Ptr SetT
largerSet'
    SetT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr SetT
set
    SetT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr SetT
largerSet
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function set_is_equal
-- Args: [ Arg
--           { argCName = "set"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "set_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a set." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "other"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "set_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "other set." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_set_is_equal" hb_set_is_equal :: 
    Ptr HarfBuzz.SetT.SetT ->               -- set : TInterface (Name {namespace = "HarfBuzz", name = "set_t"})
    Ptr HarfBuzz.SetT.SetT ->               -- other : TInterface (Name {namespace = "HarfBuzz", name = "set_t"})
    IO Int32

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.7/
setIsEqual ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.SetT.SetT
    -- ^ /@set@/: a set.
    -> HarfBuzz.SetT.SetT
    -- ^ /@other@/: other set.
    -> m Int32
    -- ^ __Returns:__ 'P.True' if the two sets are equal, 'P.False' otherwise.
setIsEqual :: SetT -> SetT -> m Int32
setIsEqual SetT
set SetT
other = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr SetT
set' <- SetT -> IO (Ptr SetT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr SetT
set
    Ptr SetT
other' <- SetT -> IO (Ptr SetT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr SetT
other
    Int32
result <- Ptr SetT -> Ptr SetT -> IO Int32
hb_set_is_equal Ptr SetT
set' Ptr SetT
other'
    SetT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr SetT
set
    SetT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr SetT
other
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function set_is_empty
-- Args: [ Arg
--           { argCName = "set"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "set_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a set." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_set_is_empty" hb_set_is_empty :: 
    Ptr HarfBuzz.SetT.SetT ->               -- set : TInterface (Name {namespace = "HarfBuzz", name = "set_t"})
    IO Int32

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.7/
setIsEmpty ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.SetT.SetT
    -- ^ /@set@/: a set.
    -> m Int32
setIsEmpty :: SetT -> m Int32
setIsEmpty SetT
set = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr SetT
set' <- SetT -> IO (Ptr SetT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr SetT
set
    Int32
result <- Ptr SetT -> IO Int32
hb_set_is_empty Ptr SetT
set'
    SetT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr SetT
set
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function set_invert
-- Args: [ Arg
--           { argCName = "set"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "set_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a set." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_set_invert" hb_set_invert :: 
    Ptr HarfBuzz.SetT.SetT ->               -- set : TInterface (Name {namespace = "HarfBuzz", name = "set_t"})
    IO ()

{-# DEPRECATED setInvert ["(Since version 1.6.1)"] #-}
-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.10/
setInvert ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.SetT.SetT
    -- ^ /@set@/: a set.
    -> m ()
setInvert :: SetT -> m ()
setInvert SetT
set = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr SetT
set' <- SetT -> IO (Ptr SetT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr SetT
set
    Ptr SetT -> IO ()
hb_set_invert Ptr SetT
set'
    SetT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr SetT
set
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function set_intersect
-- Args: [ Arg
--           { argCName = "set"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "set_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a set." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "other"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "set_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_set_intersect" hb_set_intersect :: 
    Ptr HarfBuzz.SetT.SetT ->               -- set : TInterface (Name {namespace = "HarfBuzz", name = "set_t"})
    Ptr HarfBuzz.SetT.SetT ->               -- other : TInterface (Name {namespace = "HarfBuzz", name = "set_t"})
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
setIntersect ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.SetT.SetT
    -- ^ /@set@/: a set.
    -> HarfBuzz.SetT.SetT
    -> m ()
setIntersect :: SetT -> SetT -> m ()
setIntersect SetT
set SetT
other = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr SetT
set' <- SetT -> IO (Ptr SetT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr SetT
set
    Ptr SetT
other' <- SetT -> IO (Ptr SetT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr SetT
other
    Ptr SetT -> Ptr SetT -> IO ()
hb_set_intersect Ptr SetT
set' Ptr SetT
other'
    SetT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr SetT
set
    SetT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr SetT
other
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function set_has
-- Args: [ Arg
--           { argCName = "set"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "set_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a set." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "codepoint"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_set_has" hb_set_has :: 
    Ptr HarfBuzz.SetT.SetT ->               -- set : TInterface (Name {namespace = "HarfBuzz", name = "set_t"})
    Word32 ->                               -- codepoint : TBasicType TUInt32
    IO Int32

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
setHas ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.SetT.SetT
    -- ^ /@set@/: a set.
    -> Word32
    -> m Int32
setHas :: SetT -> Word32 -> m Int32
setHas SetT
set Word32
codepoint = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr SetT
set' <- SetT -> IO (Ptr SetT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr SetT
set
    Int32
result <- Ptr SetT -> Word32 -> IO Int32
hb_set_has Ptr SetT
set' Word32
codepoint
    SetT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr SetT
set
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function set_get_population
-- Args: [ Arg
--           { argCName = "set"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "set_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a set." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_set_get_population" hb_set_get_population :: 
    Ptr HarfBuzz.SetT.SetT ->               -- set : TInterface (Name {namespace = "HarfBuzz", name = "set_t"})
    IO Word32

-- | Returns the number of numbers in the set.
-- 
-- /Since: 0.9.7/
setGetPopulation ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.SetT.SetT
    -- ^ /@set@/: a set.
    -> m Word32
    -- ^ __Returns:__ set population.
setGetPopulation :: SetT -> m Word32
setGetPopulation SetT
set = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
    Ptr SetT
set' <- SetT -> IO (Ptr SetT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr SetT
set
    Word32
result <- Ptr SetT -> IO Word32
hb_set_get_population Ptr SetT
set'
    SetT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr SetT
set
    Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result


-- function set_get_min
-- Args: [ Arg
--           { argCName = "set"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "set_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a set." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt32)
-- throws : False
-- Skip return : False

foreign import ccall "hb_set_get_min" hb_set_get_min :: 
    Ptr HarfBuzz.SetT.SetT ->               -- set : TInterface (Name {namespace = "HarfBuzz", name = "set_t"})
    IO Word32

-- | Finds the minimum number in the set.
-- 
-- /Since: 0.9.7/
setGetMin ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.SetT.SetT
    -- ^ /@set@/: a set.
    -> m Word32
    -- ^ __Returns:__ minimum of the set, or 'GI.HarfBuzz.Constants.SET_VALUE_INVALID' if set is empty.
setGetMin :: SetT -> m Word32
setGetMin SetT
set = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
    Ptr SetT
set' <- SetT -> IO (Ptr SetT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr SetT
set
    Word32
result <- Ptr SetT -> IO Word32
hb_set_get_min Ptr SetT
set'
    SetT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr SetT
set
    Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result


-- function set_get_max
-- Args: [ Arg
--           { argCName = "set"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "set_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a set." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt32)
-- throws : False
-- Skip return : False

foreign import ccall "hb_set_get_max" hb_set_get_max :: 
    Ptr HarfBuzz.SetT.SetT ->               -- set : TInterface (Name {namespace = "HarfBuzz", name = "set_t"})
    IO Word32

-- | Finds the maximum number in the set.
-- 
-- /Since: 0.9.7/
setGetMax ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.SetT.SetT
    -- ^ /@set@/: a set.
    -> m Word32
    -- ^ __Returns:__ minimum of the set, or 'GI.HarfBuzz.Constants.SET_VALUE_INVALID' if set is empty.
setGetMax :: SetT -> m Word32
setGetMax SetT
set = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
    Ptr SetT
set' <- SetT -> IO (Ptr SetT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr SetT
set
    Word32
result <- Ptr SetT -> IO Word32
hb_set_get_max Ptr SetT
set'
    SetT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr SetT
set
    Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result


-- function set_get_empty
-- Args: []
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "HarfBuzz" , name = "set_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_set_get_empty" hb_set_get_empty :: 
    IO (Ptr HarfBuzz.SetT.SetT)

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
setGetEmpty ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m HarfBuzz.SetT.SetT
setGetEmpty :: m SetT
setGetEmpty  = IO SetT -> m SetT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SetT -> m SetT) -> IO SetT -> m SetT
forall a b. (a -> b) -> a -> b
$ do
    Ptr SetT
result <- IO (Ptr SetT)
hb_set_get_empty
    Text -> Ptr SetT -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"setGetEmpty" Ptr SetT
result
    SetT
result' <- ((ManagedPtr SetT -> SetT) -> Ptr SetT -> IO SetT
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr SetT -> SetT
HarfBuzz.SetT.SetT) Ptr SetT
result
    SetT -> IO SetT
forall (m :: * -> *) a. Monad m => a -> m a
return SetT
result'


-- function set_del_range
-- Args: [ Arg
--           { argCName = "set"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "set_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a set." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "first"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "last"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_set_del_range" hb_set_del_range :: 
    Ptr HarfBuzz.SetT.SetT ->               -- set : TInterface (Name {namespace = "HarfBuzz", name = "set_t"})
    Word32 ->                               -- first : TBasicType TUInt32
    Word32 ->                               -- last : TBasicType TUInt32
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.7/
setDelRange ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.SetT.SetT
    -- ^ /@set@/: a set.
    -> Word32
    -> Word32
    -> m ()
setDelRange :: SetT -> Word32 -> Word32 -> m ()
setDelRange SetT
set Word32
first Word32
last = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr SetT
set' <- SetT -> IO (Ptr SetT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr SetT
set
    Ptr SetT -> Word32 -> Word32 -> IO ()
hb_set_del_range Ptr SetT
set' Word32
first Word32
last
    SetT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr SetT
set
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function set_del
-- Args: [ Arg
--           { argCName = "set"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "set_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a set." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "codepoint"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_set_del" hb_set_del :: 
    Ptr HarfBuzz.SetT.SetT ->               -- set : TInterface (Name {namespace = "HarfBuzz", name = "set_t"})
    Word32 ->                               -- codepoint : TBasicType TUInt32
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
setDel ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.SetT.SetT
    -- ^ /@set@/: a set.
    -> Word32
    -> m ()
setDel :: SetT -> Word32 -> m ()
setDel SetT
set Word32
codepoint = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr SetT
set' <- SetT -> IO (Ptr SetT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr SetT
set
    Ptr SetT -> Word32 -> IO ()
hb_set_del Ptr SetT
set' Word32
codepoint
    SetT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr SetT
set
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function set_create
-- Args: []
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "HarfBuzz" , name = "set_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_set_create" hb_set_create :: 
    IO (Ptr HarfBuzz.SetT.SetT)

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
setCreate ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m HarfBuzz.SetT.SetT
setCreate :: m SetT
setCreate  = IO SetT -> m SetT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SetT -> m SetT) -> IO SetT -> m SetT
forall a b. (a -> b) -> a -> b
$ do
    Ptr SetT
result <- IO (Ptr SetT)
hb_set_create
    Text -> Ptr SetT -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"setCreate" Ptr SetT
result
    SetT
result' <- ((ManagedPtr SetT -> SetT) -> Ptr SetT -> IO SetT
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr SetT -> SetT
HarfBuzz.SetT.SetT) Ptr SetT
result
    SetT -> IO SetT
forall (m :: * -> *) a. Monad m => a -> m a
return SetT
result'


-- function set_clear
-- Args: [ Arg
--           { argCName = "set"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "set_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a set." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_set_clear" hb_set_clear :: 
    Ptr HarfBuzz.SetT.SetT ->               -- set : TInterface (Name {namespace = "HarfBuzz", name = "set_t"})
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
setClear ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.SetT.SetT
    -- ^ /@set@/: a set.
    -> m ()
setClear :: SetT -> m ()
setClear SetT
set = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr SetT
set' <- SetT -> IO (Ptr SetT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr SetT
set
    Ptr SetT -> IO ()
hb_set_clear Ptr SetT
set'
    SetT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr SetT
set
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function set_allocation_successful
-- Args: [ Arg
--           { argCName = "set"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "set_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a set." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_set_allocation_successful" hb_set_allocation_successful :: 
    Ptr HarfBuzz.SetT.SetT ->               -- set : TInterface (Name {namespace = "HarfBuzz", name = "set_t"})
    IO Int32

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
setAllocationSuccessful ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.SetT.SetT
    -- ^ /@set@/: a set.
    -> m Int32
setAllocationSuccessful :: SetT -> m Int32
setAllocationSuccessful SetT
set = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr SetT
set' <- SetT -> IO (Ptr SetT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr SetT
set
    Int32
result <- Ptr SetT -> IO Int32
hb_set_allocation_successful Ptr SetT
set'
    SetT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr SetT
set
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function set_add_range
-- Args: [ Arg
--           { argCName = "set"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "set_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a set." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "first"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "last"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_set_add_range" hb_set_add_range :: 
    Ptr HarfBuzz.SetT.SetT ->               -- set : TInterface (Name {namespace = "HarfBuzz", name = "set_t"})
    Word32 ->                               -- first : TBasicType TUInt32
    Word32 ->                               -- last : TBasicType TUInt32
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.7/
setAddRange ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.SetT.SetT
    -- ^ /@set@/: a set.
    -> Word32
    -> Word32
    -> m ()
setAddRange :: SetT -> Word32 -> Word32 -> m ()
setAddRange SetT
set Word32
first Word32
last = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr SetT
set' <- SetT -> IO (Ptr SetT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr SetT
set
    Ptr SetT -> Word32 -> Word32 -> IO ()
hb_set_add_range Ptr SetT
set' Word32
first Word32
last
    SetT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr SetT
set
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function set_add
-- Args: [ Arg
--           { argCName = "set"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "set_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a set." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "codepoint"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_set_add" hb_set_add :: 
    Ptr HarfBuzz.SetT.SetT ->               -- set : TInterface (Name {namespace = "HarfBuzz", name = "set_t"})
    Word32 ->                               -- codepoint : TBasicType TUInt32
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
setAdd ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.SetT.SetT
    -- ^ /@set@/: a set.
    -> Word32
    -> m ()
setAdd :: SetT -> Word32 -> m ()
setAdd SetT
set Word32
codepoint = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr SetT
set' <- SetT -> IO (Ptr SetT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr SetT
set
    Ptr SetT -> Word32 -> IO ()
hb_set_add Ptr SetT
set' Word32
codepoint
    SetT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr SetT
set
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function segment_properties_hash
-- Args: [ Arg
--           { argCName = "p"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "segment_properties_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#hb_segment_properties_t to hash."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_segment_properties_hash" hb_segment_properties_hash :: 
    Ptr HarfBuzz.SegmentPropertiesT.SegmentPropertiesT -> -- p : TInterface (Name {namespace = "HarfBuzz", name = "segment_properties_t"})
    IO Word32

-- | Creates a hash representing /@p@/.
-- 
-- /Since: 0.9.7/
segmentPropertiesHash ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.SegmentPropertiesT.SegmentPropertiesT
    -- ^ /@p@/: t'GI.HarfBuzz.Structs.SegmentPropertiesT.SegmentPropertiesT' to hash.
    -> m Word32
    -- ^ __Returns:__ A hash of /@p@/.
segmentPropertiesHash :: SegmentPropertiesT -> m Word32
segmentPropertiesHash SegmentPropertiesT
p = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
    Ptr SegmentPropertiesT
p' <- SegmentPropertiesT -> IO (Ptr SegmentPropertiesT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr SegmentPropertiesT
p
    Word32
result <- Ptr SegmentPropertiesT -> IO Word32
hb_segment_properties_hash Ptr SegmentPropertiesT
p'
    SegmentPropertiesT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr SegmentPropertiesT
p
    Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result


-- function segment_properties_equal
-- Args: [ Arg
--           { argCName = "a"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "segment_properties_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "first #hb_segment_properties_t to compare."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "b"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "segment_properties_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "second #hb_segment_properties_t to compare."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_segment_properties_equal" hb_segment_properties_equal :: 
    Ptr HarfBuzz.SegmentPropertiesT.SegmentPropertiesT -> -- a : TInterface (Name {namespace = "HarfBuzz", name = "segment_properties_t"})
    Ptr HarfBuzz.SegmentPropertiesT.SegmentPropertiesT -> -- b : TInterface (Name {namespace = "HarfBuzz", name = "segment_properties_t"})
    IO Int32

-- | Checks the equality of two t'GI.HarfBuzz.Structs.SegmentPropertiesT.SegmentPropertiesT'\'s.
-- 
-- /Since: 0.9.7/
segmentPropertiesEqual ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.SegmentPropertiesT.SegmentPropertiesT
    -- ^ /@a@/: first t'GI.HarfBuzz.Structs.SegmentPropertiesT.SegmentPropertiesT' to compare.
    -> HarfBuzz.SegmentPropertiesT.SegmentPropertiesT
    -- ^ /@b@/: second t'GI.HarfBuzz.Structs.SegmentPropertiesT.SegmentPropertiesT' to compare.
    -> m Int32
    -- ^ __Returns:__ @/true/@ if all properties of /@a@/ equal those of /@b@/, false otherwise.
segmentPropertiesEqual :: SegmentPropertiesT -> SegmentPropertiesT -> m Int32
segmentPropertiesEqual SegmentPropertiesT
a SegmentPropertiesT
b = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr SegmentPropertiesT
a' <- SegmentPropertiesT -> IO (Ptr SegmentPropertiesT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr SegmentPropertiesT
a
    Ptr SegmentPropertiesT
b' <- SegmentPropertiesT -> IO (Ptr SegmentPropertiesT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr SegmentPropertiesT
b
    Int32
result <- Ptr SegmentPropertiesT -> Ptr SegmentPropertiesT -> IO Int32
hb_segment_properties_equal Ptr SegmentPropertiesT
a' Ptr SegmentPropertiesT
b'
    SegmentPropertiesT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr SegmentPropertiesT
a
    SegmentPropertiesT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr SegmentPropertiesT
b
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function script_to_iso15924_tag
-- Args: [ Arg
--           { argCName = "script"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "script_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #hb_script_t to convert."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt32)
-- throws : False
-- Skip return : False

foreign import ccall "hb_script_to_iso15924_tag" hb_script_to_iso15924_tag :: 
    CUInt ->                                -- script : TInterface (Name {namespace = "HarfBuzz", name = "script_t"})
    IO Word32

-- | See 'GI.HarfBuzz.Functions.scriptFromIso15924Tag'.
-- 
-- /Since: 0.9.2/
scriptToIso15924Tag ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.Enums.ScriptT
    -- ^ /@script@/: an t'GI.HarfBuzz.Enums.ScriptT' to convert.
    -> m Word32
    -- ^ __Returns:__ An @/hb_tag_t/@ representing an ISO 15924 script tag.
scriptToIso15924Tag :: ScriptT -> m Word32
scriptToIso15924Tag ScriptT
script = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
    let script' :: CUInt
script' = (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
script
    Word32
result <- CUInt -> IO Word32
hb_script_to_iso15924_tag CUInt
script'
    Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result


-- function script_get_horizontal_direction
-- Args: [ Arg
--           { argCName = "script"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "script_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "HarfBuzz" , name = "direction_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_script_get_horizontal_direction" hb_script_get_horizontal_direction :: 
    CUInt ->                                -- script : TInterface (Name {namespace = "HarfBuzz", name = "script_t"})
    IO CUInt

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
scriptGetHorizontalDirection ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.Enums.ScriptT
    -> m HarfBuzz.Enums.DirectionT
scriptGetHorizontalDirection :: ScriptT -> m DirectionT
scriptGetHorizontalDirection ScriptT
script = IO DirectionT -> m DirectionT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DirectionT -> m DirectionT) -> IO DirectionT -> m DirectionT
forall a b. (a -> b) -> a -> b
$ do
    let script' :: CUInt
script' = (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
script
    CUInt
result <- CUInt -> IO CUInt
hb_script_get_horizontal_direction CUInt
script'
    let result' :: DirectionT
result' = (Int -> DirectionT
forall a. Enum a => Int -> a
toEnum (Int -> DirectionT) -> (CUInt -> Int) -> CUInt -> DirectionT
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
    DirectionT -> IO DirectionT
forall (m :: * -> *) a. Monad m => a -> m a
return DirectionT
result'


-- function script_from_string
-- Args: [ Arg
--           { argCName = "str"
--           , argType = TCArray False (-1) 1 (TBasicType TUInt8)
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "a string representing an\n      ISO\160\&15924 tag."
--                 , 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 "length of the @str, or -1 if it is %NULL-terminated."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "len"
--              , argType = TBasicType TInt
--              , direction = DirectionIn
--              , mayBeNull = False
--              , argDoc =
--                  Documentation
--                    { rawDocText =
--                        Just "length of the @str, or -1 if it is %NULL-terminated."
--                    , sinceVersion = Nothing
--                    }
--              , argScope = ScopeTypeInvalid
--              , argClosure = -1
--              , argDestroy = -1
--              , argCallerAllocates = False
--              , transfer = TransferNothing
--              }
--          ]
-- returnType: Just
--               (TInterface Name { namespace = "HarfBuzz" , name = "script_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_script_from_string" hb_script_from_string :: 
    Ptr Word8 ->                            -- str : TCArray False (-1) 1 (TBasicType TUInt8)
    Int32 ->                                -- len : TBasicType TInt
    IO CUInt

-- | Converts a string /@str@/ representing an ISO 15924 script tag to a
-- corresponding t'GI.HarfBuzz.Enums.ScriptT'. Shorthand for 'GI.HarfBuzz.Functions.tagFromString' then
-- 'GI.HarfBuzz.Functions.scriptFromIso15924Tag'.
-- 
-- /Since: 0.9.2/
scriptFromString ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    ByteString
    -- ^ /@str@/: a string representing an
    --       ISO 15924 tag.
    -> m HarfBuzz.Enums.ScriptT
    -- ^ __Returns:__ An t'GI.HarfBuzz.Enums.ScriptT' corresponding to the ISO 15924 tag.
scriptFromString :: ByteString -> m ScriptT
scriptFromString ByteString
str = IO ScriptT -> m ScriptT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ScriptT -> m ScriptT) -> IO ScriptT -> m ScriptT
forall a b. (a -> b) -> a -> b
$ do
    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
$ ByteString -> Int
B.length ByteString
str
    Ptr Word8
str' <- ByteString -> IO (Ptr Word8)
packByteString ByteString
str
    CUInt
result <- Ptr Word8 -> Int32 -> IO CUInt
hb_script_from_string Ptr Word8
str' Int32
len
    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
    Ptr Word8 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word8
str'
    ScriptT -> IO ScriptT
forall (m :: * -> *) a. Monad m => a -> m a
return ScriptT
result'


-- function script_from_iso15924_tag
-- Args: [ Arg
--           { argCName = "tag"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "an #hb_tag_t representing an ISO\160\&15924 tag."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "HarfBuzz" , name = "script_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_script_from_iso15924_tag" hb_script_from_iso15924_tag :: 
    Word32 ->                               -- tag : TBasicType TUInt32
    IO CUInt

-- | Converts an ISO 15924 script tag to a corresponding t'GI.HarfBuzz.Enums.ScriptT'.
-- 
-- /Since: 0.9.2/
scriptFromIso15924Tag ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Word32
    -- ^ /@tag@/: an @/hb_tag_t/@ representing an ISO 15924 tag.
    -> m HarfBuzz.Enums.ScriptT
    -- ^ __Returns:__ An t'GI.HarfBuzz.Enums.ScriptT' corresponding to the ISO 15924 tag.
scriptFromIso15924Tag :: Word32 -> m ScriptT
scriptFromIso15924Tag Word32
tag = IO ScriptT -> m ScriptT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ScriptT -> m ScriptT) -> IO ScriptT -> m ScriptT
forall a b. (a -> b) -> a -> b
$ do
    CUInt
result <- Word32 -> IO CUInt
hb_script_from_iso15924_tag Word32
tag
    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
    ScriptT -> IO ScriptT
forall (m :: * -> *) a. Monad m => a -> m a
return ScriptT
result'


-- function ot_var_normalize_variations
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "variations"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "variation_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "variations_length"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "coords"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "coords_length"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_var_normalize_variations" hb_ot_var_normalize_variations :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Ptr HarfBuzz.VariationT.VariationT ->   -- variations : TInterface (Name {namespace = "HarfBuzz", name = "variation_t"})
    Word32 ->                               -- variations_length : TBasicType TUInt
    Int32 ->                                -- coords : TBasicType TInt
    Word32 ->                               -- coords_length : TBasicType TUInt
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 1.4.2/
otVarNormalizeVariations ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -> HarfBuzz.VariationT.VariationT
    -> Word32
    -> Int32
    -> Word32
    -> m ()
otVarNormalizeVariations :: FaceT -> VariationT -> Word32 -> Int32 -> Word32 -> m ()
otVarNormalizeVariations FaceT
face VariationT
variations Word32
variationsLength Int32
coords Word32
coordsLength = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Ptr VariationT
variations' <- VariationT -> IO (Ptr VariationT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VariationT
variations
    Ptr FaceT -> Ptr VariationT -> Word32 -> Int32 -> Word32 -> IO ()
hb_ot_var_normalize_variations Ptr FaceT
face' Ptr VariationT
variations' Word32
variationsLength Int32
coords Word32
coordsLength
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    VariationT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr VariationT
variations
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function ot_var_normalize_coords
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "coords_length"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "design_coords"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "normalized_coords"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_var_normalize_coords" hb_ot_var_normalize_coords :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Word32 ->                               -- coords_length : TBasicType TUInt
    CFloat ->                               -- design_coords : TBasicType TFloat
    Int32 ->                                -- normalized_coords : TBasicType TInt
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 1.4.2/
otVarNormalizeCoords ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -> Word32
    -> Float
    -> Int32
    -> m ()
otVarNormalizeCoords :: FaceT -> Word32 -> Float -> Int32 -> m ()
otVarNormalizeCoords FaceT
face Word32
coordsLength Float
designCoords Int32
normalizedCoords = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    let designCoords' :: CFloat
designCoords' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
designCoords
    Ptr FaceT -> Word32 -> CFloat -> Int32 -> IO ()
hb_ot_var_normalize_coords Ptr FaceT
face' Word32
coordsLength CFloat
designCoords' Int32
normalizedCoords
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function ot_var_named_instance_get_subfamily_name_id
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "instance_index"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_var_named_instance_get_subfamily_name_id" hb_ot_var_named_instance_get_subfamily_name_id :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Word32 ->                               -- instance_index : TBasicType TUInt
    IO Word32

-- | /No description available in the introspection data./
otVarNamedInstanceGetSubfamilyNameId ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -> Word32
    -> m Word32
otVarNamedInstanceGetSubfamilyNameId :: FaceT -> Word32 -> m Word32
otVarNamedInstanceGetSubfamilyNameId FaceT
face Word32
instanceIndex = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
    Ptr FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Word32
result <- Ptr FaceT -> Word32 -> IO Word32
hb_ot_var_named_instance_get_subfamily_name_id Ptr FaceT
face' Word32
instanceIndex
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result


-- function ot_var_named_instance_get_postscript_name_id
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "instance_index"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_var_named_instance_get_postscript_name_id" hb_ot_var_named_instance_get_postscript_name_id :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Word32 ->                               -- instance_index : TBasicType TUInt
    IO Word32

-- | /No description available in the introspection data./
otVarNamedInstanceGetPostscriptNameId ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -> Word32
    -> m Word32
otVarNamedInstanceGetPostscriptNameId :: FaceT -> Word32 -> m Word32
otVarNamedInstanceGetPostscriptNameId FaceT
face Word32
instanceIndex = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
    Ptr FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Word32
result <- Ptr FaceT -> Word32 -> IO Word32
hb_ot_var_named_instance_get_postscript_name_id Ptr FaceT
face' Word32
instanceIndex
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result


-- function ot_var_named_instance_get_design_coords
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "instance_index"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "coords_length"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "coords"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_var_named_instance_get_design_coords" hb_ot_var_named_instance_get_design_coords :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Word32 ->                               -- instance_index : TBasicType TUInt
    Word32 ->                               -- coords_length : TBasicType TUInt
    CFloat ->                               -- coords : TBasicType TFloat
    IO Word32

-- | /No description available in the introspection data./
otVarNamedInstanceGetDesignCoords ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -> Word32
    -> Word32
    -> Float
    -> m Word32
otVarNamedInstanceGetDesignCoords :: FaceT -> Word32 -> Word32 -> Float -> m Word32
otVarNamedInstanceGetDesignCoords FaceT
face Word32
instanceIndex Word32
coordsLength Float
coords = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
    Ptr FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    let coords' :: CFloat
coords' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
coords
    Word32
result <- Ptr FaceT -> Word32 -> Word32 -> CFloat -> IO Word32
hb_ot_var_named_instance_get_design_coords Ptr FaceT
face' Word32
instanceIndex Word32
coordsLength CFloat
coords'
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result


-- function ot_var_has_data
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#hb_face_t to test" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_var_has_data" hb_ot_var_has_data :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    IO Int32

-- | This function allows to verify the presence of OpenType variation data on the face.
-- 
-- /Since: 1.4.2/
otVarHasData ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: t'GI.HarfBuzz.Structs.FaceT.FaceT' to test
    -> m Int32
    -- ^ __Returns:__ true if face has a \`fvar\' table and false otherwise
otVarHasData :: FaceT -> m Int32
otVarHasData FaceT
face = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Int32
result <- Ptr FaceT -> IO Int32
hb_ot_var_has_data Ptr FaceT
face'
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function ot_var_get_named_instance_count
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_var_get_named_instance_count" hb_ot_var_get_named_instance_count :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    IO Word32

-- | /No description available in the introspection data./
otVarGetNamedInstanceCount ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -> m Word32
otVarGetNamedInstanceCount :: FaceT -> m Word32
otVarGetNamedInstanceCount FaceT
face = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
    Ptr FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Word32
result <- Ptr FaceT -> IO Word32
hb_ot_var_get_named_instance_count Ptr FaceT
face'
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result


-- function ot_var_get_axis_infos
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "start_offset"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "axes_count"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "axes_array"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "ot_var_axis_info_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_var_get_axis_infos" hb_ot_var_get_axis_infos :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Word32 ->                               -- start_offset : TBasicType TUInt
    Word32 ->                               -- axes_count : TBasicType TUInt
    Ptr HarfBuzz.OtVarAxisInfoT.OtVarAxisInfoT -> -- axes_array : TInterface (Name {namespace = "HarfBuzz", name = "ot_var_axis_info_t"})
    IO Word32

-- | /No description available in the introspection data./
-- 
-- /Since: 2.2.0/
otVarGetAxisInfos ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -> Word32
    -> Word32
    -> HarfBuzz.OtVarAxisInfoT.OtVarAxisInfoT
    -> m Word32
otVarGetAxisInfos :: FaceT -> Word32 -> Word32 -> OtVarAxisInfoT -> m Word32
otVarGetAxisInfos FaceT
face Word32
startOffset Word32
axesCount OtVarAxisInfoT
axesArray = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
    Ptr FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Ptr OtVarAxisInfoT
axesArray' <- OtVarAxisInfoT -> IO (Ptr OtVarAxisInfoT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr OtVarAxisInfoT
axesArray
    Word32
result <- Ptr FaceT -> Word32 -> Word32 -> Ptr OtVarAxisInfoT -> IO Word32
hb_ot_var_get_axis_infos Ptr FaceT
face' Word32
startOffset Word32
axesCount Ptr OtVarAxisInfoT
axesArray'
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    OtVarAxisInfoT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr OtVarAxisInfoT
axesArray
    Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result


-- function ot_var_get_axis_count
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_var_get_axis_count" hb_ot_var_get_axis_count :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    IO Word32

-- | /No description available in the introspection data./
-- 
-- /Since: 1.4.2/
otVarGetAxisCount ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -> m Word32
otVarGetAxisCount :: FaceT -> m Word32
otVarGetAxisCount FaceT
face = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
    Ptr FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Word32
result <- Ptr FaceT -> IO Word32
hb_ot_var_get_axis_count Ptr FaceT
face'
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result


-- function ot_var_get_axes
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "start_offset"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "axes_count"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "axes_array"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "ot_var_axis_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_var_get_axes" hb_ot_var_get_axes :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Word32 ->                               -- start_offset : TBasicType TUInt
    Word32 ->                               -- axes_count : TBasicType TUInt
    Ptr HarfBuzz.OtVarAxisT.OtVarAxisT ->   -- axes_array : TInterface (Name {namespace = "HarfBuzz", name = "ot_var_axis_t"})
    IO Word32

{-# DEPRECATED otVarGetAxes ["(Since version 2.2.0)"] #-}
-- | /No description available in the introspection data./
-- 
-- /Since: 1.4.2/
otVarGetAxes ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -> Word32
    -> Word32
    -> HarfBuzz.OtVarAxisT.OtVarAxisT
    -> m Word32
otVarGetAxes :: FaceT -> Word32 -> Word32 -> OtVarAxisT -> m Word32
otVarGetAxes FaceT
face Word32
startOffset Word32
axesCount OtVarAxisT
axesArray = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
    Ptr FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Ptr OtVarAxisT
axesArray' <- OtVarAxisT -> IO (Ptr OtVarAxisT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr OtVarAxisT
axesArray
    Word32
result <- Ptr FaceT -> Word32 -> Word32 -> Ptr OtVarAxisT -> IO Word32
hb_ot_var_get_axes Ptr FaceT
face' Word32
startOffset Word32
axesCount Ptr OtVarAxisT
axesArray'
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    OtVarAxisT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr OtVarAxisT
axesArray
    Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result


-- function ot_var_find_axis_info
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "axis_tag"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "axis_info"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "ot_var_axis_info_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_var_find_axis_info" hb_ot_var_find_axis_info :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Word32 ->                               -- axis_tag : TBasicType TUInt32
    Ptr HarfBuzz.OtVarAxisInfoT.OtVarAxisInfoT -> -- axis_info : TInterface (Name {namespace = "HarfBuzz", name = "ot_var_axis_info_t"})
    IO Int32

-- | /No description available in the introspection data./
-- 
-- /Since: 2.2.0/
otVarFindAxisInfo ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -> Word32
    -> HarfBuzz.OtVarAxisInfoT.OtVarAxisInfoT
    -> m Int32
otVarFindAxisInfo :: FaceT -> Word32 -> OtVarAxisInfoT -> m Int32
otVarFindAxisInfo FaceT
face Word32
axisTag OtVarAxisInfoT
axisInfo = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Ptr OtVarAxisInfoT
axisInfo' <- OtVarAxisInfoT -> IO (Ptr OtVarAxisInfoT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr OtVarAxisInfoT
axisInfo
    Int32
result <- Ptr FaceT -> Word32 -> Ptr OtVarAxisInfoT -> IO Int32
hb_ot_var_find_axis_info Ptr FaceT
face' Word32
axisTag Ptr OtVarAxisInfoT
axisInfo'
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    OtVarAxisInfoT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr OtVarAxisInfoT
axisInfo
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function ot_var_find_axis
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "axis_tag"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "axis_index"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "axis_info"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "ot_var_axis_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_var_find_axis" hb_ot_var_find_axis :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Word32 ->                               -- axis_tag : TBasicType TUInt32
    Word32 ->                               -- axis_index : TBasicType TUInt
    Ptr HarfBuzz.OtVarAxisT.OtVarAxisT ->   -- axis_info : TInterface (Name {namespace = "HarfBuzz", name = "ot_var_axis_t"})
    IO Int32

{-# DEPRECATED otVarFindAxis ["(Since version 2.2.0)"] #-}
-- | /No description available in the introspection data./
-- 
-- /Since: 1.4.2/
otVarFindAxis ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -> Word32
    -> Word32
    -> HarfBuzz.OtVarAxisT.OtVarAxisT
    -> m Int32
otVarFindAxis :: FaceT -> Word32 -> Word32 -> OtVarAxisT -> m Int32
otVarFindAxis FaceT
face Word32
axisTag Word32
axisIndex OtVarAxisT
axisInfo = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Ptr OtVarAxisT
axisInfo' <- OtVarAxisT -> IO (Ptr OtVarAxisT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr OtVarAxisT
axisInfo
    Int32
result <- Ptr FaceT -> Word32 -> Word32 -> Ptr OtVarAxisT -> IO Int32
hb_ot_var_find_axis Ptr FaceT
face' Word32
axisTag Word32
axisIndex Ptr OtVarAxisT
axisInfo'
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    OtVarAxisT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr OtVarAxisT
axisInfo
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function ot_tags_to_script_and_language
-- Args: [ Arg
--           { argCName = "script_tag"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a script tag" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "language_tag"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a language tag" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "script"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "script_t" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the #hb_script_t corresponding to @script_tag (OUT)."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "language"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "language_t" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "the #hb_language_t corresponding to @script_tag and\n@language_tag (OUT)."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_tags_to_script_and_language" hb_ot_tags_to_script_and_language :: 
    Word32 ->                               -- script_tag : TBasicType TUInt32
    Word32 ->                               -- language_tag : TBasicType TUInt32
    CUInt ->                                -- script : TInterface (Name {namespace = "HarfBuzz", name = "script_t"})
    Ptr HarfBuzz.LanguageT.LanguageT ->     -- language : TInterface (Name {namespace = "HarfBuzz", name = "language_t"})
    IO ()

-- | Converts a script tag and a language tag to an t'GI.HarfBuzz.Enums.ScriptT' and an
-- t'GI.HarfBuzz.Structs.LanguageT.LanguageT'.
-- 
-- /Since: 2.0.0/
otTagsToScriptAndLanguage ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Word32
    -- ^ /@scriptTag@/: a script tag
    -> Word32
    -- ^ /@languageTag@/: a language tag
    -> HarfBuzz.Enums.ScriptT
    -- ^ /@script@/: the t'GI.HarfBuzz.Enums.ScriptT' corresponding to /@scriptTag@/ (OUT).
    -> Maybe (HarfBuzz.LanguageT.LanguageT)
    -- ^ /@language@/: the t'GI.HarfBuzz.Structs.LanguageT.LanguageT' corresponding to /@scriptTag@/ and
    -- /@languageTag@/ (OUT).
    -> m ()
otTagsToScriptAndLanguage :: Word32 -> Word32 -> ScriptT -> Maybe LanguageT -> m ()
otTagsToScriptAndLanguage Word32
scriptTag Word32
languageTag ScriptT
script Maybe LanguageT
language = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    let script' :: CUInt
script' = (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
script
    Ptr LanguageT
maybeLanguage <- case Maybe LanguageT
language of
        Maybe LanguageT
Nothing -> Ptr LanguageT -> IO (Ptr LanguageT)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr LanguageT
forall a. Ptr a
nullPtr
        Just LanguageT
jLanguage -> do
            Ptr LanguageT
jLanguage' <- LanguageT -> IO (Ptr LanguageT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr LanguageT
jLanguage
            Ptr LanguageT -> IO (Ptr LanguageT)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr LanguageT
jLanguage'
    Word32 -> Word32 -> CUInt -> Ptr LanguageT -> IO ()
hb_ot_tags_to_script_and_language Word32
scriptTag Word32
languageTag CUInt
script' Ptr LanguageT
maybeLanguage
    Maybe LanguageT -> (LanguageT -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe LanguageT
language LanguageT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function ot_tags_from_script_and_language
-- Args: [ Arg
--           { argCName = "script"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "script_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #hb_script_t to convert."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "language"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "language_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #hb_language_t to convert."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "script_count"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "maximum number of script tags to retrieve (IN)\nand actual number of script tags retrieved (OUT)"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "script_tags"
--           , argType = TBasicType TUInt32
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "array of size at least @script_count to store the\nscript tag results"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "language_count"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "maximum number of language tags to retrieve\n(IN) and actual number of language tags retrieved (OUT)"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "language_tags"
--           , argType = TBasicType TUInt32
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "array of size at least @language_count to store\nthe language tag results"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_tags_from_script_and_language" hb_ot_tags_from_script_and_language :: 
    CUInt ->                                -- script : TInterface (Name {namespace = "HarfBuzz", name = "script_t"})
    Ptr HarfBuzz.LanguageT.LanguageT ->     -- language : TInterface (Name {namespace = "HarfBuzz", name = "language_t"})
    Word32 ->                               -- script_count : TBasicType TUInt
    Ptr Word32 ->                           -- script_tags : TBasicType TUInt32
    Word32 ->                               -- language_count : TBasicType TUInt
    Ptr Word32 ->                           -- language_tags : TBasicType TUInt32
    IO ()

-- | Converts an t'GI.HarfBuzz.Enums.ScriptT' and an t'GI.HarfBuzz.Structs.LanguageT.LanguageT' to script and language tags.
-- 
-- /Since: 2.0.0/
otTagsFromScriptAndLanguage ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.Enums.ScriptT
    -- ^ /@script@/: an t'GI.HarfBuzz.Enums.ScriptT' to convert.
    -> HarfBuzz.LanguageT.LanguageT
    -- ^ /@language@/: an t'GI.HarfBuzz.Structs.LanguageT.LanguageT' to convert.
    -> Word32
    -- ^ /@scriptCount@/: maximum number of script tags to retrieve (IN)
    -- and actual number of script tags retrieved (OUT)
    -> Word32
    -- ^ /@languageCount@/: maximum number of language tags to retrieve
    -- (IN) and actual number of language tags retrieved (OUT)
    -> m ((Word32, Word32))
otTagsFromScriptAndLanguage :: ScriptT -> LanguageT -> Word32 -> Word32 -> m (Word32, Word32)
otTagsFromScriptAndLanguage ScriptT
script LanguageT
language Word32
scriptCount Word32
languageCount = IO (Word32, Word32) -> m (Word32, Word32)
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
    let script' :: CUInt
script' = (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
script
    Ptr LanguageT
language' <- LanguageT -> IO (Ptr LanguageT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr LanguageT
language
    Ptr Word32
scriptTags <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
    Ptr Word32
languageTags <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
    CUInt
-> Ptr LanguageT
-> Word32
-> Ptr Word32
-> Word32
-> Ptr Word32
-> IO ()
hb_ot_tags_from_script_and_language CUInt
script' Ptr LanguageT
language' Word32
scriptCount Ptr Word32
scriptTags Word32
languageCount Ptr Word32
languageTags
    Word32
scriptTags' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
scriptTags
    Word32
languageTags' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
languageTags
    LanguageT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr LanguageT
language
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
scriptTags
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
languageTags
    (Word32, Word32) -> IO (Word32, Word32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Word32
scriptTags', Word32
languageTags')


-- function ot_tags_from_script
-- Args: [ Arg
--           { argCName = "script"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "script_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "script_tag_1"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "script_tag_2"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_tags_from_script" hb_ot_tags_from_script :: 
    CUInt ->                                -- script : TInterface (Name {namespace = "HarfBuzz", name = "script_t"})
    Word32 ->                               -- script_tag_1 : TBasicType TUInt32
    Word32 ->                               -- script_tag_2 : TBasicType TUInt32
    IO ()

-- | /No description available in the introspection data./
otTagsFromScript ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.Enums.ScriptT
    -> Word32
    -> Word32
    -> m ()
otTagsFromScript :: ScriptT -> Word32 -> Word32 -> m ()
otTagsFromScript ScriptT
script Word32
scriptTag1 Word32
scriptTag2 = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    let script' :: CUInt
script' = (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
script
    CUInt -> Word32 -> Word32 -> IO ()
hb_ot_tags_from_script CUInt
script' Word32
scriptTag1 Word32
scriptTag2
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function ot_tag_to_script
-- Args: [ Arg
--           { argCName = "tag"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "HarfBuzz" , name = "script_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_tag_to_script" hb_ot_tag_to_script :: 
    Word32 ->                               -- tag : TBasicType TUInt32
    IO CUInt

-- | /No description available in the introspection data./
otTagToScript ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Word32
    -> m HarfBuzz.Enums.ScriptT
otTagToScript :: Word32 -> m ScriptT
otTagToScript Word32
tag = IO ScriptT -> m ScriptT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ScriptT -> m ScriptT) -> IO ScriptT -> m ScriptT
forall a b. (a -> b) -> a -> b
$ do
    CUInt
result <- Word32 -> IO CUInt
hb_ot_tag_to_script Word32
tag
    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
    ScriptT -> IO ScriptT
forall (m :: * -> *) a. Monad m => a -> m a
return ScriptT
result'


-- function ot_tag_to_language
-- Args: [ Arg
--           { argCName = "tag"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "HarfBuzz" , name = "language_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_tag_to_language" hb_ot_tag_to_language :: 
    Word32 ->                               -- tag : TBasicType TUInt32
    IO (Ptr HarfBuzz.LanguageT.LanguageT)

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
otTagToLanguage ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Word32
    -> m HarfBuzz.LanguageT.LanguageT
otTagToLanguage :: Word32 -> m LanguageT
otTagToLanguage Word32
tag = IO LanguageT -> m LanguageT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO LanguageT -> m LanguageT) -> IO LanguageT -> m LanguageT
forall a b. (a -> b) -> a -> b
$ do
    Ptr LanguageT
result <- Word32 -> IO (Ptr LanguageT)
hb_ot_tag_to_language Word32
tag
    Text -> Ptr LanguageT -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"otTagToLanguage" Ptr LanguageT
result
    LanguageT
result' <- ((ManagedPtr LanguageT -> LanguageT)
-> Ptr LanguageT -> IO LanguageT
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr LanguageT -> LanguageT
HarfBuzz.LanguageT.LanguageT) Ptr LanguageT
result
    LanguageT -> IO LanguageT
forall (m :: * -> *) a. Monad m => a -> m a
return LanguageT
result'


-- function ot_tag_from_language
-- Args: [ Arg
--           { argCName = "language"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "language_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt32)
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_tag_from_language" hb_ot_tag_from_language :: 
    Ptr HarfBuzz.LanguageT.LanguageT ->     -- language : TInterface (Name {namespace = "HarfBuzz", name = "language_t"})
    IO Word32

-- | /No description available in the introspection data./
otTagFromLanguage ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.LanguageT.LanguageT
    -> m Word32
otTagFromLanguage :: LanguageT -> m Word32
otTagFromLanguage LanguageT
language = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
    Ptr LanguageT
language' <- LanguageT -> IO (Ptr LanguageT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr LanguageT
language
    Word32
result <- Ptr LanguageT -> IO Word32
hb_ot_tag_from_language Ptr LanguageT
language'
    LanguageT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr LanguageT
language
    Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result


-- function ot_shape_glyphs_closure
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "buffer"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "buffer_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "features"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "feature_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "num_features"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "glyphs"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "set_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_shape_glyphs_closure" hb_ot_shape_glyphs_closure :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    Ptr HarfBuzz.BufferT.BufferT ->         -- buffer : TInterface (Name {namespace = "HarfBuzz", name = "buffer_t"})
    Ptr HarfBuzz.FeatureT.FeatureT ->       -- features : TInterface (Name {namespace = "HarfBuzz", name = "feature_t"})
    Word32 ->                               -- num_features : TBasicType TUInt
    Ptr HarfBuzz.SetT.SetT ->               -- glyphs : TInterface (Name {namespace = "HarfBuzz", name = "set_t"})
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
otShapeGlyphsClosure ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -> HarfBuzz.BufferT.BufferT
    -> HarfBuzz.FeatureT.FeatureT
    -> Word32
    -> HarfBuzz.SetT.SetT
    -> m ()
otShapeGlyphsClosure :: FontT -> BufferT -> FeatureT -> Word32 -> SetT -> m ()
otShapeGlyphsClosure FontT
font BufferT
buffer FeatureT
features Word32
numFeatures SetT
glyphs = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
    Ptr BufferT
buffer' <- BufferT -> IO (Ptr BufferT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BufferT
buffer
    Ptr FeatureT
features' <- FeatureT -> IO (Ptr FeatureT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FeatureT
features
    Ptr SetT
glyphs' <- SetT -> IO (Ptr SetT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr SetT
glyphs
    Ptr FontT
-> Ptr BufferT -> Ptr FeatureT -> Word32 -> Ptr SetT -> IO ()
hb_ot_shape_glyphs_closure Ptr FontT
font' Ptr BufferT
buffer' Ptr FeatureT
features' Word32
numFeatures Ptr SetT
glyphs'
    FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
    BufferT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BufferT
buffer
    FeatureT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FeatureT
features
    SetT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr SetT
glyphs
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function ot_name_list_names
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "font face." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "num_entries"
--           , argType = TBasicType TUInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "number of returned entries."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "num_entries"
--              , argType = TBasicType TUInt
--              , direction = DirectionOut
--              , mayBeNull = False
--              , argDoc =
--                  Documentation
--                    { rawDocText = Just "number of returned entries."
--                    , sinceVersion = Nothing
--                    }
--              , argScope = ScopeTypeInvalid
--              , argClosure = -1
--              , argDestroy = -1
--              , argCallerAllocates = False
--              , transfer = TransferEverything
--              }
--          ]
-- returnType: Just
--               (TCArray
--                  False
--                  (-1)
--                  1
--                  (TInterface
--                     Name { namespace = "HarfBuzz" , name = "ot_name_entry_t" }))
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_name_list_names" hb_ot_name_list_names :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Ptr Word32 ->                           -- num_entries : TBasicType TUInt
    IO (Ptr HarfBuzz.OtNameEntryT.OtNameEntryT)

-- | Enumerates all available name IDs and language combinations. Returned
-- array is owned by the /@face@/ and should not be modified.  It can be
-- used as long as /@face@/ is alive.
-- 
-- /Since: 2.1.0/
otNameListNames ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: font face.
    -> m [HarfBuzz.OtNameEntryT.OtNameEntryT]
    -- ^ __Returns:__ Array of available name entries.
otNameListNames :: FaceT -> m [OtNameEntryT]
otNameListNames FaceT
face = IO [OtNameEntryT] -> m [OtNameEntryT]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [OtNameEntryT] -> m [OtNameEntryT])
-> IO [OtNameEntryT] -> m [OtNameEntryT]
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 Word32
numEntries <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
    Ptr OtNameEntryT
result <- Ptr FaceT -> Ptr Word32 -> IO (Ptr OtNameEntryT)
hb_ot_name_list_names Ptr FaceT
face' Ptr Word32
numEntries
    Word32
numEntries' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
numEntries
    Text -> Ptr OtNameEntryT -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"otNameListNames" Ptr OtNameEntryT
result
    [Ptr OtNameEntryT]
result' <- (Int -> Word32 -> Ptr OtNameEntryT -> IO [Ptr OtNameEntryT]
forall a b. Integral a => Int -> a -> Ptr b -> IO [Ptr b]
unpackBlockArrayWithLength Int
16 Word32
numEntries') Ptr OtNameEntryT
result
    [OtNameEntryT]
result'' <- (Ptr OtNameEntryT -> IO OtNameEntryT)
-> [Ptr OtNameEntryT] -> IO [OtNameEntryT]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((ManagedPtr OtNameEntryT -> OtNameEntryT)
-> Ptr OtNameEntryT -> IO OtNameEntryT
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr OtNameEntryT -> OtNameEntryT
HarfBuzz.OtNameEntryT.OtNameEntryT) [Ptr OtNameEntryT]
result'
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
numEntries
    [OtNameEntryT] -> IO [OtNameEntryT]
forall (m :: * -> *) a. Monad m => a -> m a
return [OtNameEntryT]
result''


-- function ot_name_get_utf8
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "font face." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "name_id"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "OpenType name identifier to fetch."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "language"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "language_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "language to fetch the name for."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "text_size"
--           , argType = TBasicType TUInt
--           , direction = DirectionOut
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "input size of @text buffer, and output size of\n                                  text written to buffer."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "text"
--           , argType = TCArray False (-1) 3 (TBasicType TUTF8)
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "buffer to write fetched name into."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = True
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "text_size"
--              , argType = TBasicType TUInt
--              , direction = DirectionOut
--              , mayBeNull = True
--              , argDoc =
--                  Documentation
--                    { rawDocText =
--                        Just
--                          "input size of @text buffer, and output size of\n                                  text written to buffer."
--                    , sinceVersion = Nothing
--                    }
--              , argScope = ScopeTypeInvalid
--              , argClosure = -1
--              , argDestroy = -1
--              , argCallerAllocates = False
--              , transfer = TransferEverything
--              }
--          ]
-- returnType: Just (TBasicType TUInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_name_get_utf8" hb_ot_name_get_utf8 :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Word32 ->                               -- name_id : TBasicType TUInt
    Ptr HarfBuzz.LanguageT.LanguageT ->     -- language : TInterface (Name {namespace = "HarfBuzz", name = "language_t"})
    Word32 ->                               -- text_size : TBasicType TUInt
    Ptr CString ->                          -- text : TCArray False (-1) 3 (TBasicType TUTF8)
    IO Word32

-- | Fetches a font name from the OpenType \'name\' table.
-- If /@language@/ is 'GI.HarfBuzz.Constants.LANGUAGE_INVALID', English (\"en\") is assumed.
-- Returns string in UTF-8 encoding.
-- 
-- /Since: 2.1.0/
otNameGetUtf8 ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: font face.
    -> Word32
    -- ^ /@nameId@/: OpenType name identifier to fetch.
    -> HarfBuzz.LanguageT.LanguageT
    -- ^ /@language@/: language to fetch the name for.
    -> [T.Text]
    -- ^ /@text@/: buffer to write fetched name into.
    -> m ((Word32, [T.Text]))
    -- ^ __Returns:__ full length of the requested string, or 0 if not found.
otNameGetUtf8 :: FaceT -> Word32 -> LanguageT -> [Text] -> m (Word32, [Text])
otNameGetUtf8 FaceT
face Word32
nameId LanguageT
language [Text]
text = IO (Word32, [Text]) -> m (Word32, [Text])
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Word32, [Text]) -> m (Word32, [Text]))
-> IO (Word32, [Text]) -> m (Word32, [Text])
forall a b. (a -> b) -> a -> b
$ do
    let textSize :: Word32
textSize = Int -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Word32) -> Int -> Word32
forall a b. (a -> b) -> a -> b
$ [Text] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [Text]
text
    Ptr FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Ptr LanguageT
language' <- LanguageT -> IO (Ptr LanguageT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr LanguageT
language
    Ptr CString
text' <- [Text] -> IO (Ptr CString)
packUTF8CArray [Text]
text
    Word32
result <- Ptr FaceT
-> Word32 -> Ptr LanguageT -> Word32 -> Ptr CString -> IO Word32
hb_ot_name_get_utf8 Ptr FaceT
face' Word32
nameId Ptr LanguageT
language' Word32
textSize Ptr CString
text'
    [Text]
text'' <- (Word32 -> Ptr CString -> IO [Text]
forall a.
(HasCallStack, Integral a) =>
a -> Ptr CString -> IO [Text]
unpackUTF8CArrayWithLength Word32
textSize) Ptr CString
text'
    (Word32 -> (CString -> IO ()) -> Ptr CString -> IO ()
forall a b c.
(Storable a, Integral b) =>
b -> (a -> IO c) -> Ptr a -> IO ()
mapCArrayWithLength Word32
textSize) CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
text'
    Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
text'
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    LanguageT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr LanguageT
language
    (Word32, [Text]) -> IO (Word32, [Text])
forall (m :: * -> *) a. Monad m => a -> m a
return (Word32
result, [Text]
text'')


-- function ot_name_get_utf32
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "font face." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "name_id"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "OpenType name identifier to fetch."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "language"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "language_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "language to fetch the name for."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "text_size"
--           , argType = TBasicType TUInt
--           , direction = DirectionOut
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "input size of @text buffer, and output size of\n                                  text written to buffer."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "text"
--           , argType = TCArray False (-1) 3 (TBasicType TUInt32)
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "buffer to write fetched name into."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = True
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "text_size"
--              , argType = TBasicType TUInt
--              , direction = DirectionOut
--              , mayBeNull = True
--              , argDoc =
--                  Documentation
--                    { rawDocText =
--                        Just
--                          "input size of @text buffer, and output size of\n                                  text written to buffer."
--                    , sinceVersion = Nothing
--                    }
--              , argScope = ScopeTypeInvalid
--              , argClosure = -1
--              , argDestroy = -1
--              , argCallerAllocates = False
--              , transfer = TransferEverything
--              }
--          ]
-- returnType: Just (TBasicType TUInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_name_get_utf32" hb_ot_name_get_utf32 :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Word32 ->                               -- name_id : TBasicType TUInt
    Ptr HarfBuzz.LanguageT.LanguageT ->     -- language : TInterface (Name {namespace = "HarfBuzz", name = "language_t"})
    Word32 ->                               -- text_size : TBasicType TUInt
    Ptr Word32 ->                           -- text : TCArray False (-1) 3 (TBasicType TUInt32)
    IO Word32

-- | Fetches a font name from the OpenType \'name\' table.
-- If /@language@/ is 'GI.HarfBuzz.Constants.LANGUAGE_INVALID', English (\"en\") is assumed.
-- Returns string in UTF-32 encoding.
-- 
-- /Since: 2.1.0/
otNameGetUtf32 ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: font face.
    -> Word32
    -- ^ /@nameId@/: OpenType name identifier to fetch.
    -> HarfBuzz.LanguageT.LanguageT
    -- ^ /@language@/: language to fetch the name for.
    -> [Word32]
    -- ^ /@text@/: buffer to write fetched name into.
    -> m ((Word32, [Word32]))
    -- ^ __Returns:__ full length of the requested string, or 0 if not found.
otNameGetUtf32 :: FaceT -> Word32 -> LanguageT -> [Word32] -> m (Word32, [Word32])
otNameGetUtf32 FaceT
face Word32
nameId LanguageT
language [Word32]
text = IO (Word32, [Word32]) -> m (Word32, [Word32])
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
    let textSize :: Word32
textSize = Int -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Word32) -> Int -> Word32
forall a b. (a -> b) -> a -> b
$ [Word32] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [Word32]
text
    Ptr FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Ptr LanguageT
language' <- LanguageT -> IO (Ptr LanguageT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr LanguageT
language
    Ptr Word32
text' <- [Word32] -> IO (Ptr Word32)
forall a. Storable a => [a] -> IO (Ptr a)
packStorableArray [Word32]
text
    Word32
result <- Ptr FaceT
-> Word32 -> Ptr LanguageT -> Word32 -> Ptr Word32 -> IO Word32
hb_ot_name_get_utf32 Ptr FaceT
face' Word32
nameId Ptr LanguageT
language' Word32
textSize Ptr Word32
text'
    [Word32]
text'' <- (Word32 -> Ptr Word32 -> IO [Word32]
forall a b. (Integral a, Storable b) => a -> Ptr b -> IO [b]
unpackStorableArrayWithLength Word32
textSize) Ptr Word32
text'
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
text'
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    LanguageT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr LanguageT
language
    (Word32, [Word32]) -> IO (Word32, [Word32])
forall (m :: * -> *) a. Monad m => a -> m a
return (Word32
result, [Word32]
text'')


-- function ot_name_get_utf16
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "font face." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "name_id"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "OpenType name identifier to fetch."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "language"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "language_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "language to fetch the name for."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "text_size"
--           , argType = TBasicType TUInt
--           , direction = DirectionOut
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "input size of @text buffer, and output size of\n                                  text written to buffer."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "text"
--           , argType = TCArray False (-1) 3 (TBasicType TUInt16)
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "buffer to write fetched name into."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = True
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "text_size"
--              , argType = TBasicType TUInt
--              , direction = DirectionOut
--              , mayBeNull = True
--              , argDoc =
--                  Documentation
--                    { rawDocText =
--                        Just
--                          "input size of @text buffer, and output size of\n                                  text written to buffer."
--                    , sinceVersion = Nothing
--                    }
--              , argScope = ScopeTypeInvalid
--              , argClosure = -1
--              , argDestroy = -1
--              , argCallerAllocates = False
--              , transfer = TransferEverything
--              }
--          ]
-- returnType: Just (TBasicType TUInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_name_get_utf16" hb_ot_name_get_utf16 :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Word32 ->                               -- name_id : TBasicType TUInt
    Ptr HarfBuzz.LanguageT.LanguageT ->     -- language : TInterface (Name {namespace = "HarfBuzz", name = "language_t"})
    Word32 ->                               -- text_size : TBasicType TUInt
    Ptr Word16 ->                           -- text : TCArray False (-1) 3 (TBasicType TUInt16)
    IO Word32

-- | Fetches a font name from the OpenType \'name\' table.
-- If /@language@/ is 'GI.HarfBuzz.Constants.LANGUAGE_INVALID', English (\"en\") is assumed.
-- Returns string in UTF-16 encoding.
-- 
-- /Since: 2.1.0/
otNameGetUtf16 ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: font face.
    -> Word32
    -- ^ /@nameId@/: OpenType name identifier to fetch.
    -> HarfBuzz.LanguageT.LanguageT
    -- ^ /@language@/: language to fetch the name for.
    -> [Word16]
    -- ^ /@text@/: buffer to write fetched name into.
    -> m ((Word32, [Word16]))
    -- ^ __Returns:__ full length of the requested string, or 0 if not found.
otNameGetUtf16 :: FaceT -> Word32 -> LanguageT -> [Word16] -> m (Word32, [Word16])
otNameGetUtf16 FaceT
face Word32
nameId LanguageT
language [Word16]
text = IO (Word32, [Word16]) -> m (Word32, [Word16])
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Word32, [Word16]) -> m (Word32, [Word16]))
-> IO (Word32, [Word16]) -> m (Word32, [Word16])
forall a b. (a -> b) -> a -> b
$ do
    let textSize :: Word32
textSize = Int -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Word32) -> Int -> Word32
forall a b. (a -> b) -> a -> b
$ [Word16] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [Word16]
text
    Ptr FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Ptr LanguageT
language' <- LanguageT -> IO (Ptr LanguageT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr LanguageT
language
    Ptr Word16
text' <- [Word16] -> IO (Ptr Word16)
forall a. Storable a => [a] -> IO (Ptr a)
packStorableArray [Word16]
text
    Word32
result <- Ptr FaceT
-> Word32 -> Ptr LanguageT -> Word32 -> Ptr Word16 -> IO Word32
hb_ot_name_get_utf16 Ptr FaceT
face' Word32
nameId Ptr LanguageT
language' Word32
textSize Ptr Word16
text'
    [Word16]
text'' <- (Word32 -> Ptr Word16 -> IO [Word16]
forall a b. (Integral a, Storable b) => a -> Ptr b -> IO [b]
unpackStorableArrayWithLength Word32
textSize) Ptr Word16
text'
    Ptr Word16 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word16
text'
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    LanguageT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr LanguageT
language
    (Word32, [Word16]) -> IO (Word32, [Word16])
forall (m :: * -> *) a. Monad m => a -> m a
return (Word32
result, [Word16]
text'')


-- function ot_metrics_get_y_variation
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "metrics_tag"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "ot_metrics_tag_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt32)
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_metrics_get_y_variation" hb_ot_metrics_get_y_variation :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    CUInt ->                                -- metrics_tag : TInterface (Name {namespace = "HarfBuzz", name = "ot_metrics_tag_t"})
    IO Int32

-- | /No description available in the introspection data./
-- 
-- /Since: 2.6.0/
otMetricsGetYVariation ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -> HarfBuzz.Enums.OtMetricsTagT
    -> m Int32
otMetricsGetYVariation :: FontT -> OtMetricsTagT -> m Int32
otMetricsGetYVariation FontT
font OtMetricsTagT
metricsTag = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
    let metricsTag' :: CUInt
metricsTag' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (OtMetricsTagT -> Int) -> OtMetricsTagT -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. OtMetricsTagT -> Int
forall a. Enum a => a -> Int
fromEnum) OtMetricsTagT
metricsTag
    Int32
result <- Ptr FontT -> CUInt -> IO Int32
hb_ot_metrics_get_y_variation Ptr FontT
font' CUInt
metricsTag'
    FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function ot_metrics_get_x_variation
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "metrics_tag"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "ot_metrics_tag_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt32)
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_metrics_get_x_variation" hb_ot_metrics_get_x_variation :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    CUInt ->                                -- metrics_tag : TInterface (Name {namespace = "HarfBuzz", name = "ot_metrics_tag_t"})
    IO Int32

-- | /No description available in the introspection data./
-- 
-- /Since: 2.6.0/
otMetricsGetXVariation ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -> HarfBuzz.Enums.OtMetricsTagT
    -> m Int32
otMetricsGetXVariation :: FontT -> OtMetricsTagT -> m Int32
otMetricsGetXVariation FontT
font OtMetricsTagT
metricsTag = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
    let metricsTag' :: CUInt
metricsTag' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (OtMetricsTagT -> Int) -> OtMetricsTagT -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. OtMetricsTagT -> Int
forall a. Enum a => a -> Int
fromEnum) OtMetricsTagT
metricsTag
    Int32
result <- Ptr FontT -> CUInt -> IO Int32
hb_ot_metrics_get_x_variation Ptr FontT
font' CUInt
metricsTag'
    FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function ot_metrics_get_variation
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "metrics_tag"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "ot_metrics_tag_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TFloat)
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_metrics_get_variation" hb_ot_metrics_get_variation :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    CUInt ->                                -- metrics_tag : TInterface (Name {namespace = "HarfBuzz", name = "ot_metrics_tag_t"})
    IO CFloat

-- | /No description available in the introspection data./
-- 
-- /Since: 2.6.0/
otMetricsGetVariation ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -> HarfBuzz.Enums.OtMetricsTagT
    -> m Float
otMetricsGetVariation :: FontT -> OtMetricsTagT -> m Float
otMetricsGetVariation FontT
font OtMetricsTagT
metricsTag = IO Float -> m Float
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Float -> m Float) -> IO Float -> m Float
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
    let metricsTag' :: CUInt
metricsTag' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (OtMetricsTagT -> Int) -> OtMetricsTagT -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. OtMetricsTagT -> Int
forall a. Enum a => a -> Int
fromEnum) OtMetricsTagT
metricsTag
    CFloat
result <- Ptr FontT -> CUInt -> IO CFloat
hb_ot_metrics_get_variation Ptr FontT
font' CUInt
metricsTag'
    let result' :: Float
result' = CFloat -> Float
forall a b. (Real a, Fractional b) => a -> b
realToFrac CFloat
result
    FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
    Float -> IO Float
forall (m :: * -> *) a. Monad m => a -> m a
return Float
result'


-- function ot_metrics_get_position
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #hb_font_t object."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "metrics_tag"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "ot_metrics_tag_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "tag of metrics value you like to fetch."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "position"
--           , argType = TBasicType TInt32
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "result of metrics value from the font."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_metrics_get_position" hb_ot_metrics_get_position :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    CUInt ->                                -- metrics_tag : TInterface (Name {namespace = "HarfBuzz", name = "ot_metrics_tag_t"})
    Ptr Int32 ->                            -- position : TBasicType TInt32
    IO Int32

-- | It fetches metrics value corresponding to a given tag from a font.
-- 
-- /Since: 2.6.0/
otMetricsGetPosition ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: a t'GI.HarfBuzz.Structs.FontT.FontT' object.
    -> HarfBuzz.Enums.OtMetricsTagT
    -- ^ /@metricsTag@/: tag of metrics value you like to fetch.
    -> m ((Int32, Int32))
    -- ^ __Returns:__ Whether found the requested metrics in the font.
otMetricsGetPosition :: FontT -> OtMetricsTagT -> m (Int32, Int32)
otMetricsGetPosition FontT
font OtMetricsTagT
metricsTag = IO (Int32, Int32) -> m (Int32, Int32)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Int32, Int32) -> m (Int32, Int32))
-> IO (Int32, Int32) -> m (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
    let metricsTag' :: CUInt
metricsTag' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (OtMetricsTagT -> Int) -> OtMetricsTagT -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. OtMetricsTagT -> Int
forall a. Enum a => a -> Int
fromEnum) OtMetricsTagT
metricsTag
    Ptr Int32
position <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Int32
result <- Ptr FontT -> CUInt -> Ptr Int32 -> IO Int32
hb_ot_metrics_get_position Ptr FontT
font' CUInt
metricsTag' Ptr Int32
position
    Int32
position' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
position
    FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
position
    (Int32, Int32) -> IO (Int32, Int32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
result, Int32
position')


-- function ot_meta_reference_entry
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #hb_face_t object."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "meta_tag"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "ot_meta_tag_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "tag of metadata you like to have."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "HarfBuzz" , name = "blob_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_meta_reference_entry" hb_ot_meta_reference_entry :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    CUInt ->                                -- meta_tag : TInterface (Name {namespace = "HarfBuzz", name = "ot_meta_tag_t"})
    IO (Ptr HarfBuzz.BlobT.BlobT)

-- | It fetches metadata entry of a given tag from a font.
-- 
-- /Since: 2.6.0/
otMetaReferenceEntry ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: a t'GI.HarfBuzz.Structs.FaceT.FaceT' object.
    -> HarfBuzz.Enums.OtMetaTagT
    -- ^ /@metaTag@/: tag of metadata you like to have.
    -> m HarfBuzz.BlobT.BlobT
    -- ^ __Returns:__ A blob containing the blob.
otMetaReferenceEntry :: FaceT -> OtMetaTagT -> m BlobT
otMetaReferenceEntry FaceT
face OtMetaTagT
metaTag = IO BlobT -> m BlobT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO BlobT -> m BlobT) -> IO BlobT -> m BlobT
forall a b. (a -> b) -> a -> b
$ do
    Ptr FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    let metaTag' :: CUInt
metaTag' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (OtMetaTagT -> Int) -> OtMetaTagT -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. OtMetaTagT -> Int
forall a. Enum a => a -> Int
fromEnum) OtMetaTagT
metaTag
    Ptr BlobT
result <- Ptr FaceT -> CUInt -> IO (Ptr BlobT)
hb_ot_meta_reference_entry Ptr FaceT
face' CUInt
metaTag'
    Text -> Ptr BlobT -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"otMetaReferenceEntry" Ptr BlobT
result
    BlobT
result' <- ((ManagedPtr BlobT -> BlobT) -> Ptr BlobT -> IO BlobT
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr BlobT -> BlobT
HarfBuzz.BlobT.BlobT) Ptr BlobT
result
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    BlobT -> IO BlobT
forall (m :: * -> *) a. Monad m => a -> m a
return BlobT
result'


-- function ot_meta_get_entry_tags
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "start_offset"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "entries_count"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "entries"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "ot_meta_tag_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_meta_get_entry_tags" hb_ot_meta_get_entry_tags :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Word32 ->                               -- start_offset : TBasicType TUInt
    Word32 ->                               -- entries_count : TBasicType TUInt
    CUInt ->                                -- entries : TInterface (Name {namespace = "HarfBuzz", name = "ot_meta_tag_t"})
    IO Word32

-- | /No description available in the introspection data./
otMetaGetEntryTags ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -> Word32
    -> Word32
    -> HarfBuzz.Enums.OtMetaTagT
    -> m Word32
otMetaGetEntryTags :: FaceT -> Word32 -> Word32 -> OtMetaTagT -> m Word32
otMetaGetEntryTags FaceT
face Word32
startOffset Word32
entriesCount OtMetaTagT
entries = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
    Ptr FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    let entries' :: CUInt
entries' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (OtMetaTagT -> Int) -> OtMetaTagT -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. OtMetaTagT -> Int
forall a. Enum a => a -> Int
fromEnum) OtMetaTagT
entries
    Word32
result <- Ptr FaceT -> Word32 -> Word32 -> CUInt -> IO Word32
hb_ot_meta_get_entry_tags Ptr FaceT
face' Word32
startOffset Word32
entriesCount CUInt
entries'
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result


-- function ot_math_is_glyph_extended_shape
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#hb_face_t to work upon"
--                 , 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 index to test"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_math_is_glyph_extended_shape" hb_ot_math_is_glyph_extended_shape :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Word32 ->                               -- glyph : TBasicType TUInt32
    IO Int32

-- | Tests whether the given glyph index is an extended shape in the face.
-- 
-- /Since: 1.3.3/
otMathIsGlyphExtendedShape ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: t'GI.HarfBuzz.Structs.FaceT.FaceT' to work upon
    -> Word32
    -- ^ /@glyph@/: The glyph index to test
    -> m Int32
    -- ^ __Returns:__ true if the glyph is an extended shape, false otherwise
otMathIsGlyphExtendedShape :: FaceT -> Word32 -> m Int32
otMathIsGlyphExtendedShape FaceT
face Word32
glyph = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Int32
result <- Ptr FaceT -> Word32 -> IO Int32
hb_ot_math_is_glyph_extended_shape Ptr FaceT
face' Word32
glyph
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function ot_math_has_data
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#hb_face_t to test" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_math_has_data" hb_ot_math_has_data :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    IO Int32

-- | Tests whether a face has a @MATH@ table.
-- 
-- /Since: 1.3.3/
otMathHasData ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: t'GI.HarfBuzz.Structs.FaceT.FaceT' to test
    -> m Int32
    -- ^ __Returns:__ true if the table is found, false otherwise
otMathHasData :: FaceT -> m Int32
otMathHasData FaceT
face = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Int32
result <- Ptr FaceT -> IO Int32
hb_ot_math_has_data Ptr FaceT
face'
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function ot_math_get_min_connector_overlap
-- 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 = "direction"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "direction_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "direction of the stretching (horizontal or vertical)"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt32)
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_math_get_min_connector_overlap" hb_ot_math_get_min_connector_overlap :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    CUInt ->                                -- direction : TInterface (Name {namespace = "HarfBuzz", name = "direction_t"})
    IO Int32

-- | Fetches the MathVariants table for the specified font and returns the
-- minimum overlap of connecting glyphs that are required to draw a glyph
-- assembly in the specified direction.
-- 
-- \<note>The /@direction@/ parameter is only used to select between horizontal
-- or vertical directions for the construction. Even though all t'GI.HarfBuzz.Enums.DirectionT'
-- values are accepted, only the result of @/HB_DIRECTION_IS_HORIZONTAL/@ is
-- considered.\<\/note>
-- 
-- /Since: 1.3.3/
otMathGetMinConnectorOverlap ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: t'GI.HarfBuzz.Structs.FontT.FontT' to work upon
    -> HarfBuzz.Enums.DirectionT
    -- ^ /@direction@/: direction of the stretching (horizontal or vertical)
    -> m Int32
    -- ^ __Returns:__ requested minimum connector overlap or zero
otMathGetMinConnectorOverlap :: FontT -> DirectionT -> m Int32
otMathGetMinConnectorOverlap FontT
font DirectionT
direction = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
    let direction' :: CUInt
direction' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (DirectionT -> Int) -> DirectionT -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. DirectionT -> Int
forall a. Enum a => a -> Int
fromEnum) DirectionT
direction
    Int32
result <- Ptr FontT -> CUInt -> IO Int32
hb_ot_math_get_min_connector_overlap Ptr FontT
font' CUInt
direction'
    FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function ot_math_get_glyph_variants
-- 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 = "glyph"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The index of the glyph to stretch"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "direction"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "direction_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "The direction of the stretching (horizontal or vertical)"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "start_offset"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "offset of the first variant to retrieve"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "variants_count"
--           , argType = TBasicType TUInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "Input = the maximum number of variants to return;\n                          Output = the actual number of variants returned"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "variants"
--           , argType =
--               TCArray
--                 False
--                 (-1)
--                 4
--                 (TInterface
--                    Name { namespace = "HarfBuzz" , name = "ot_math_glyph_variant_t" })
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "array of variants returned"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = True
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "variants_count"
--              , argType = TBasicType TUInt
--              , direction = DirectionOut
--              , mayBeNull = False
--              , argDoc =
--                  Documentation
--                    { rawDocText =
--                        Just
--                          "Input = the maximum number of variants to return;\n                          Output = the actual number of variants returned"
--                    , sinceVersion = Nothing
--                    }
--              , argScope = ScopeTypeInvalid
--              , argClosure = -1
--              , argDestroy = -1
--              , argCallerAllocates = False
--              , transfer = TransferEverything
--              }
--          ]
-- returnType: Just (TBasicType TUInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_math_get_glyph_variants" hb_ot_math_get_glyph_variants :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    Word32 ->                               -- glyph : TBasicType TUInt32
    CUInt ->                                -- direction : TInterface (Name {namespace = "HarfBuzz", name = "direction_t"})
    Word32 ->                               -- start_offset : TBasicType TUInt
    Word32 ->                               -- variants_count : TBasicType TUInt
    Ptr HarfBuzz.OtMathGlyphVariantT.OtMathGlyphVariantT -> -- variants : TCArray False (-1) 4 (TInterface (Name {namespace = "HarfBuzz", name = "ot_math_glyph_variant_t"}))
    IO Word32

-- | Fetches the MathGlyphConstruction for the specified font, glyph index, and
-- direction. The corresponding list of size variants is returned as a list of
-- t'GI.HarfBuzz.Structs.OtMathGlyphVariantT.OtMathGlyphVariantT' structs.
-- 
-- \<note>The /@direction@/ parameter is only used to select between horizontal
-- or vertical directions for the construction. Even though all t'GI.HarfBuzz.Enums.DirectionT'
-- values are accepted, only the result of @/HB_DIRECTION_IS_HORIZONTAL/@ is
-- considered.\<\/note>
-- 
-- /Since: 1.3.3/
otMathGetGlyphVariants ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: t'GI.HarfBuzz.Structs.FontT.FontT' to work upon
    -> Word32
    -- ^ /@glyph@/: The index of the glyph to stretch
    -> HarfBuzz.Enums.DirectionT
    -- ^ /@direction@/: The direction of the stretching (horizontal or vertical)
    -> Word32
    -- ^ /@startOffset@/: offset of the first variant to retrieve
    -> [HarfBuzz.OtMathGlyphVariantT.OtMathGlyphVariantT]
    -- ^ /@variants@/: array of variants returned
    -> m ((Word32, [HarfBuzz.OtMathGlyphVariantT.OtMathGlyphVariantT]))
    -- ^ __Returns:__ the total number of size variants available or zero
otMathGetGlyphVariants :: FontT
-> Word32
-> DirectionT
-> Word32
-> [OtMathGlyphVariantT]
-> m (Word32, [OtMathGlyphVariantT])
otMathGetGlyphVariants FontT
font Word32
glyph DirectionT
direction Word32
startOffset [OtMathGlyphVariantT]
variants = IO (Word32, [OtMathGlyphVariantT])
-> m (Word32, [OtMathGlyphVariantT])
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Word32, [OtMathGlyphVariantT])
 -> m (Word32, [OtMathGlyphVariantT]))
-> IO (Word32, [OtMathGlyphVariantT])
-> m (Word32, [OtMathGlyphVariantT])
forall a b. (a -> b) -> a -> b
$ do
    let variantsCount :: Word32
variantsCount = Int -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Word32) -> Int -> Word32
forall a b. (a -> b) -> a -> b
$ [OtMathGlyphVariantT] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [OtMathGlyphVariantT]
variants
    Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
    let direction' :: CUInt
direction' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (DirectionT -> Int) -> DirectionT -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. DirectionT -> Int
forall a. Enum a => a -> Int
fromEnum) DirectionT
direction
    [Ptr OtMathGlyphVariantT]
variants' <- (OtMathGlyphVariantT -> IO (Ptr OtMathGlyphVariantT))
-> [OtMathGlyphVariantT] -> IO [Ptr OtMathGlyphVariantT]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM OtMathGlyphVariantT -> IO (Ptr OtMathGlyphVariantT)
forall a. (HasCallStack, GBoxed a) => a -> IO (Ptr a)
B.ManagedPtr.disownBoxed [OtMathGlyphVariantT]
variants
    Ptr OtMathGlyphVariantT
variants'' <- Int -> [Ptr OtMathGlyphVariantT] -> IO (Ptr OtMathGlyphVariantT)
forall a. Int -> [Ptr a] -> IO (Ptr a)
packBlockArray Int
8 [Ptr OtMathGlyphVariantT]
variants'
    Word32
result <- Ptr FontT
-> Word32
-> CUInt
-> Word32
-> Word32
-> Ptr OtMathGlyphVariantT
-> IO Word32
hb_ot_math_get_glyph_variants Ptr FontT
font' Word32
glyph CUInt
direction' Word32
startOffset Word32
variantsCount Ptr OtMathGlyphVariantT
variants''
    [Ptr OtMathGlyphVariantT]
variants''' <- (Int
-> Word32
-> Ptr OtMathGlyphVariantT
-> IO [Ptr OtMathGlyphVariantT]
forall a b.
(Integral a, GBoxed b) =>
Int -> a -> Ptr b -> IO [Ptr b]
unpackBoxedArrayWithLength Int
8 Word32
variantsCount) Ptr OtMathGlyphVariantT
variants''
    [OtMathGlyphVariantT]
variants'''' <- (Ptr OtMathGlyphVariantT -> IO OtMathGlyphVariantT)
-> [Ptr OtMathGlyphVariantT] -> IO [OtMathGlyphVariantT]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((ManagedPtr OtMathGlyphVariantT -> OtMathGlyphVariantT)
-> Ptr OtMathGlyphVariantT -> IO OtMathGlyphVariantT
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr OtMathGlyphVariantT -> OtMathGlyphVariantT
HarfBuzz.OtMathGlyphVariantT.OtMathGlyphVariantT) [Ptr OtMathGlyphVariantT]
variants'''
    Ptr OtMathGlyphVariantT -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr OtMathGlyphVariantT
variants''
    FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
    (OtMathGlyphVariantT -> IO ()) -> [OtMathGlyphVariantT] -> IO ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ OtMathGlyphVariantT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr [OtMathGlyphVariantT]
variants
    (Word32, [OtMathGlyphVariantT])
-> IO (Word32, [OtMathGlyphVariantT])
forall (m :: * -> *) a. Monad m => a -> m a
return (Word32
result, [OtMathGlyphVariantT]
variants'''')


-- function ot_math_get_glyph_top_accent_attachment
-- 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 = "glyph"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "The glyph index from which to retrieve the value"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt32)
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_math_get_glyph_top_accent_attachment" hb_ot_math_get_glyph_top_accent_attachment :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    Word32 ->                               -- glyph : TBasicType TUInt32
    IO Int32

-- | Fetches a top-accent-attachment value (if one exists) for the specified
-- glyph index.
-- 
-- For any glyph that does not have a top-accent-attachment value - that is,
-- a glyph not covered by the @MathTopAccentAttachment@ table (or, when
-- /@font@/ has no @MathTopAccentAttachment@ table or no @MATH@ table, any
-- glyph) - the function synthesizes a value, returning the position at
-- one-half the glyph\'s advance width.
-- 
-- /Since: 1.3.3/
otMathGetGlyphTopAccentAttachment ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: t'GI.HarfBuzz.Structs.FontT.FontT' to work upon
    -> Word32
    -- ^ /@glyph@/: The glyph index from which to retrieve the value
    -> m Int32
    -- ^ __Returns:__ the top accent attachment of the glyph or 0.5 * the advance
    --               width of /@glyph@/
otMathGetGlyphTopAccentAttachment :: FontT -> Word32 -> m Int32
otMathGetGlyphTopAccentAttachment FontT
font Word32
glyph = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
    Int32
result <- Ptr FontT -> Word32 -> IO Int32
hb_ot_math_get_glyph_top_accent_attachment Ptr FontT
font' Word32
glyph
    FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function ot_math_get_glyph_kerning
-- 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 = "glyph"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "The glyph index from which to retrieve the value"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "kern"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "ot_math_kern_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "The #hb_ot_math_kern_t from which to retrieve the value"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "correction_height"
--           , argType = TBasicType TInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the correction height to use to determine the kerning."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt32)
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_math_get_glyph_kerning" hb_ot_math_get_glyph_kerning :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    Word32 ->                               -- glyph : TBasicType TUInt32
    CUInt ->                                -- kern : TInterface (Name {namespace = "HarfBuzz", name = "ot_math_kern_t"})
    Int32 ->                                -- correction_height : TBasicType TInt32
    IO Int32

-- | Fetches the math kerning (cut-ins) value for the specified font, glyph index, and
-- /@kern@/.
-- 
-- If the MathKern table is found, the function examines it to find a height
-- value that is greater or equal to /@correctionHeight@/. If such a height
-- value is found, corresponding kerning value from the table is returned. If
-- no such height value is found, the last kerning value is returned.
-- 
-- /Since: 1.3.3/
otMathGetGlyphKerning ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: t'GI.HarfBuzz.Structs.FontT.FontT' to work upon
    -> Word32
    -- ^ /@glyph@/: The glyph index from which to retrieve the value
    -> HarfBuzz.Enums.OtMathKernT
    -- ^ /@kern@/: The t'GI.HarfBuzz.Enums.OtMathKernT' from which to retrieve the value
    -> Int32
    -- ^ /@correctionHeight@/: the correction height to use to determine the kerning.
    -> m Int32
    -- ^ __Returns:__ requested kerning value or zero
otMathGetGlyphKerning :: FontT -> Word32 -> OtMathKernT -> Int32 -> m Int32
otMathGetGlyphKerning FontT
font Word32
glyph OtMathKernT
kern Int32
correctionHeight = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
    let kern' :: CUInt
kern' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (OtMathKernT -> Int) -> OtMathKernT -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. OtMathKernT -> Int
forall a. Enum a => a -> Int
fromEnum) OtMathKernT
kern
    Int32
result <- Ptr FontT -> Word32 -> CUInt -> Int32 -> IO Int32
hb_ot_math_get_glyph_kerning Ptr FontT
font' Word32
glyph CUInt
kern' Int32
correctionHeight
    FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function ot_math_get_glyph_italics_correction
-- 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 = "glyph"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "The glyph index from which to retrieve the value"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt32)
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_math_get_glyph_italics_correction" hb_ot_math_get_glyph_italics_correction :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    Word32 ->                               -- glyph : TBasicType TUInt32
    IO Int32

-- | Fetches an italics-correction value (if one exists) for the specified
-- glyph index.
-- 
-- /Since: 1.3.3/
otMathGetGlyphItalicsCorrection ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: t'GI.HarfBuzz.Structs.FontT.FontT' to work upon
    -> Word32
    -- ^ /@glyph@/: The glyph index from which to retrieve the value
    -> m Int32
    -- ^ __Returns:__ the italics correction of the glyph or zero
otMathGetGlyphItalicsCorrection :: FontT -> Word32 -> m Int32
otMathGetGlyphItalicsCorrection FontT
font Word32
glyph = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
    Int32
result <- Ptr FontT -> Word32 -> IO Int32
hb_ot_math_get_glyph_italics_correction Ptr FontT
font' Word32
glyph
    FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function ot_math_get_glyph_assembly
-- 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 = "glyph"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The index of the glyph to stretch"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "direction"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "direction_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "direction of the stretching (horizontal or vertical)"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "start_offset"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "offset of the first glyph part to retrieve"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "parts_count"
--           , argType = TBasicType TUInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "Input = maximum number of glyph parts to return;\n              Output = actual number of parts returned"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "parts"
--           , argType =
--               TCArray
--                 False
--                 (-1)
--                 4
--                 (TInterface
--                    Name { namespace = "HarfBuzz" , name = "ot_math_glyph_part_t" })
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the glyph parts returned"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = True
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "italics_correction"
--           , argType = TBasicType TInt32
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "italics correction of the glyph assembly"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "parts_count"
--              , argType = TBasicType TUInt
--              , direction = DirectionOut
--              , mayBeNull = False
--              , argDoc =
--                  Documentation
--                    { rawDocText =
--                        Just
--                          "Input = maximum number of glyph parts to return;\n              Output = actual number of parts returned"
--                    , sinceVersion = Nothing
--                    }
--              , argScope = ScopeTypeInvalid
--              , argClosure = -1
--              , argDestroy = -1
--              , argCallerAllocates = False
--              , transfer = TransferEverything
--              }
--          ]
-- returnType: Just (TBasicType TUInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_math_get_glyph_assembly" hb_ot_math_get_glyph_assembly :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    Word32 ->                               -- glyph : TBasicType TUInt32
    CUInt ->                                -- direction : TInterface (Name {namespace = "HarfBuzz", name = "direction_t"})
    Word32 ->                               -- start_offset : TBasicType TUInt
    Word32 ->                               -- parts_count : TBasicType TUInt
    Ptr HarfBuzz.OtMathGlyphPartT.OtMathGlyphPartT -> -- parts : TCArray False (-1) 4 (TInterface (Name {namespace = "HarfBuzz", name = "ot_math_glyph_part_t"}))
    Ptr Int32 ->                            -- italics_correction : TBasicType TInt32
    IO Word32

-- | Fetches the GlyphAssembly for the specified font, glyph index, and direction.
-- Returned are a list of t'GI.HarfBuzz.Structs.OtMathGlyphPartT.OtMathGlyphPartT' glyph parts that can be
-- used to draw the glyph and an italics-correction value (if one is defined
-- in the font).
-- 
-- \<note>The /@direction@/ parameter is only used to select between horizontal
-- or vertical directions for the construction. Even though all t'GI.HarfBuzz.Enums.DirectionT'
-- values are accepted, only the result of @/HB_DIRECTION_IS_HORIZONTAL/@ is
-- considered.\<\/note>
-- 
-- /Since: 1.3.3/
otMathGetGlyphAssembly ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: t'GI.HarfBuzz.Structs.FontT.FontT' to work upon
    -> Word32
    -- ^ /@glyph@/: The index of the glyph to stretch
    -> HarfBuzz.Enums.DirectionT
    -- ^ /@direction@/: direction of the stretching (horizontal or vertical)
    -> Word32
    -- ^ /@startOffset@/: offset of the first glyph part to retrieve
    -> [HarfBuzz.OtMathGlyphPartT.OtMathGlyphPartT]
    -- ^ /@parts@/: the glyph parts returned
    -> m ((Word32, [HarfBuzz.OtMathGlyphPartT.OtMathGlyphPartT], Int32))
    -- ^ __Returns:__ the total number of parts in the glyph assembly
otMathGetGlyphAssembly :: FontT
-> Word32
-> DirectionT
-> Word32
-> [OtMathGlyphPartT]
-> m (Word32, [OtMathGlyphPartT], Int32)
otMathGetGlyphAssembly FontT
font Word32
glyph DirectionT
direction Word32
startOffset [OtMathGlyphPartT]
parts = IO (Word32, [OtMathGlyphPartT], Int32)
-> m (Word32, [OtMathGlyphPartT], Int32)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Word32, [OtMathGlyphPartT], Int32)
 -> m (Word32, [OtMathGlyphPartT], Int32))
-> IO (Word32, [OtMathGlyphPartT], Int32)
-> m (Word32, [OtMathGlyphPartT], Int32)
forall a b. (a -> b) -> a -> b
$ do
    let partsCount :: Word32
partsCount = Int -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Word32) -> Int -> Word32
forall a b. (a -> b) -> a -> b
$ [OtMathGlyphPartT] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [OtMathGlyphPartT]
parts
    Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
    let direction' :: CUInt
direction' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (DirectionT -> Int) -> DirectionT -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. DirectionT -> Int
forall a. Enum a => a -> Int
fromEnum) DirectionT
direction
    [Ptr OtMathGlyphPartT]
parts' <- (OtMathGlyphPartT -> IO (Ptr OtMathGlyphPartT))
-> [OtMathGlyphPartT] -> IO [Ptr OtMathGlyphPartT]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM OtMathGlyphPartT -> IO (Ptr OtMathGlyphPartT)
forall a. (HasCallStack, GBoxed a) => a -> IO (Ptr a)
B.ManagedPtr.disownBoxed [OtMathGlyphPartT]
parts
    Ptr OtMathGlyphPartT
parts'' <- Int -> [Ptr OtMathGlyphPartT] -> IO (Ptr OtMathGlyphPartT)
forall a. Int -> [Ptr a] -> IO (Ptr a)
packBlockArray Int
20 [Ptr OtMathGlyphPartT]
parts'
    Ptr Int32
italicsCorrection <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Word32
result <- Ptr FontT
-> Word32
-> CUInt
-> Word32
-> Word32
-> Ptr OtMathGlyphPartT
-> Ptr Int32
-> IO Word32
hb_ot_math_get_glyph_assembly Ptr FontT
font' Word32
glyph CUInt
direction' Word32
startOffset Word32
partsCount Ptr OtMathGlyphPartT
parts'' Ptr Int32
italicsCorrection
    [Ptr OtMathGlyphPartT]
parts''' <- (Int -> Word32 -> Ptr OtMathGlyphPartT -> IO [Ptr OtMathGlyphPartT]
forall a b.
(Integral a, GBoxed b) =>
Int -> a -> Ptr b -> IO [Ptr b]
unpackBoxedArrayWithLength Int
20 Word32
partsCount) Ptr OtMathGlyphPartT
parts''
    [OtMathGlyphPartT]
parts'''' <- (Ptr OtMathGlyphPartT -> IO OtMathGlyphPartT)
-> [Ptr OtMathGlyphPartT] -> IO [OtMathGlyphPartT]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((ManagedPtr OtMathGlyphPartT -> OtMathGlyphPartT)
-> Ptr OtMathGlyphPartT -> IO OtMathGlyphPartT
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr OtMathGlyphPartT -> OtMathGlyphPartT
HarfBuzz.OtMathGlyphPartT.OtMathGlyphPartT) [Ptr OtMathGlyphPartT]
parts'''
    Ptr OtMathGlyphPartT -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr OtMathGlyphPartT
parts''
    Int32
italicsCorrection' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
italicsCorrection
    FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
    (OtMathGlyphPartT -> IO ()) -> [OtMathGlyphPartT] -> IO ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ OtMathGlyphPartT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr [OtMathGlyphPartT]
parts
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
italicsCorrection
    (Word32, [OtMathGlyphPartT], Int32)
-> IO (Word32, [OtMathGlyphPartT], Int32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Word32
result, [OtMathGlyphPartT]
parts'''', Int32
italicsCorrection')


-- function ot_math_get_constant
-- 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 = "constant"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "ot_math_constant_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "#hb_ot_math_constant_t the constant to retrieve"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt32)
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_math_get_constant" hb_ot_math_get_constant :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    CUInt ->                                -- constant : TInterface (Name {namespace = "HarfBuzz", name = "ot_math_constant_t"})
    IO Int32

-- | Fetches the specified math constant. For most constants, the value returned
-- is an @/hb_position_t/@.
-- 
-- However, if the requested constant is @/HB_OT_MATH_CONSTANT_SCRIPT_PERCENT_SCALE_DOWN/@,
-- @/HB_OT_MATH_CONSTANT_SCRIPT_SCRIPT_PERCENT_SCALE_DOWN/@ or
-- @/HB_OT_MATH_CONSTANT_SCRIPT_PERCENT_SCALE_DOWN/@, then the return value is
-- an integer between 0 and 100 representing that percentage.
-- 
-- /Since: 1.3.3/
otMathGetConstant ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: t'GI.HarfBuzz.Structs.FontT.FontT' to work upon
    -> HarfBuzz.Enums.OtMathConstantT
    -- ^ /@constant@/: t'GI.HarfBuzz.Enums.OtMathConstantT' the constant to retrieve
    -> m Int32
    -- ^ __Returns:__ the requested constant or zero
otMathGetConstant :: FontT -> OtMathConstantT -> m Int32
otMathGetConstant FontT
font OtMathConstantT
constant = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
    let constant' :: CUInt
constant' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (OtMathConstantT -> Int) -> OtMathConstantT -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. OtMathConstantT -> Int
forall a. Enum a => a -> Int
fromEnum) OtMathConstantT
constant
    Int32
result <- Ptr FontT -> CUInt -> IO Int32
hb_ot_math_get_constant Ptr FontT
font' CUInt
constant'
    FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function ot_layout_table_select_script
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#hb_face_t to work upon"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "table_tag"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "HB_OT_TAG_GSUB or HB_OT_TAG_GPOS"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "script_count"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Number of script tags in the array"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "script_tags"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Array of #hb_tag_t script tags"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "script_index"
--           , argType = TBasicType TUInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The index of the requested script"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "chosen_script"
--           , argType = TBasicType TUInt32
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#hb_tag_t of the requested script"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_layout_table_select_script" hb_ot_layout_table_select_script :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Word32 ->                               -- table_tag : TBasicType TUInt32
    Word32 ->                               -- script_count : TBasicType TUInt
    Word32 ->                               -- script_tags : TBasicType TUInt32
    Ptr Word32 ->                           -- script_index : TBasicType TUInt
    Ptr Word32 ->                           -- chosen_script : TBasicType TUInt32
    IO Int32

-- | /No description available in the introspection data./
-- 
-- /Since: 2.0.0/
otLayoutTableSelectScript ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: t'GI.HarfBuzz.Structs.FaceT.FaceT' to work upon
    -> Word32
    -- ^ /@tableTag@/: HB_OT_TAG_GSUB or HB_OT_TAG_GPOS
    -> Word32
    -- ^ /@scriptCount@/: Number of script tags in the array
    -> Word32
    -- ^ /@scriptTags@/: Array of @/hb_tag_t/@ script tags
    -> m ((Int32, Word32, Word32))
otLayoutTableSelectScript :: FaceT -> Word32 -> Word32 -> Word32 -> m (Int32, Word32, Word32)
otLayoutTableSelectScript FaceT
face Word32
tableTag Word32
scriptCount Word32
scriptTags = IO (Int32, Word32, Word32) -> m (Int32, Word32, Word32)
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 FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Ptr Word32
scriptIndex <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
    Ptr Word32
chosenScript <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
    Int32
result <- Ptr FaceT
-> Word32
-> Word32
-> Word32
-> Ptr Word32
-> Ptr Word32
-> IO Int32
hb_ot_layout_table_select_script Ptr FaceT
face' Word32
tableTag Word32
scriptCount Word32
scriptTags Ptr Word32
scriptIndex Ptr Word32
chosenScript
    Word32
scriptIndex' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
scriptIndex
    Word32
chosenScript' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
chosenScript
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
scriptIndex
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
chosenScript
    (Int32, Word32, Word32) -> IO (Int32, Word32, Word32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
result, Word32
scriptIndex', Word32
chosenScript')


-- function ot_layout_table_get_script_tags
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#hb_face_t to work upon"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "table_tag"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "HB_OT_TAG_GSUB or HB_OT_TAG_GPOS"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "start_offset"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "offset of the first script tag to retrieve"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "script_count"
--           , argType = TBasicType TUInt
--           , direction = DirectionOut
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "Input = the maximum number of script tags to return;\n               Output = the actual number of script tags returned (may be zero)"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "script_tags"
--           , argType = TCArray False (-1) 3 (TBasicType TUInt32)
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "The array of #hb_tag_t script tags found for the query"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "script_count"
--              , argType = TBasicType TUInt
--              , direction = DirectionOut
--              , mayBeNull = True
--              , argDoc =
--                  Documentation
--                    { rawDocText =
--                        Just
--                          "Input = the maximum number of script tags to return;\n               Output = the actual number of script 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 "hb_ot_layout_table_get_script_tags" hb_ot_layout_table_get_script_tags :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Word32 ->                               -- table_tag : TBasicType TUInt32
    Word32 ->                               -- start_offset : TBasicType TUInt
    Ptr Word32 ->                           -- script_count : TBasicType TUInt
    Ptr (Ptr Word32) ->                     -- script_tags : TCArray False (-1) 3 (TBasicType TUInt32)
    IO Word32

-- | Fetches a list of all scripts enumerated in the specified face\'s GSUB table
-- or GPOS table. The list returned will begin at the offset provided.
otLayoutTableGetScriptTags ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: t'GI.HarfBuzz.Structs.FaceT.FaceT' to work upon
    -> Word32
    -- ^ /@tableTag@/: HB_OT_TAG_GSUB or HB_OT_TAG_GPOS
    -> Word32
    -- ^ /@startOffset@/: offset of the first script tag to retrieve
    -> m ((Word32, [Word32]))
otLayoutTableGetScriptTags :: FaceT -> Word32 -> Word32 -> m (Word32, [Word32])
otLayoutTableGetScriptTags FaceT
face Word32
tableTag Word32
startOffset = IO (Word32, [Word32]) -> m (Word32, [Word32])
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 FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Ptr Word32
scriptCount <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
    Ptr (Ptr Word32)
scriptTags <- IO (Ptr (Ptr Word32))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr Word32))
    Word32
result <- Ptr FaceT
-> Word32 -> Word32 -> Ptr Word32 -> Ptr (Ptr Word32) -> IO Word32
hb_ot_layout_table_get_script_tags Ptr FaceT
face' Word32
tableTag Word32
startOffset Ptr Word32
scriptCount Ptr (Ptr Word32)
scriptTags
    Word32
scriptCount' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
scriptCount
    Ptr Word32
scriptTags' <- Ptr (Ptr Word32) -> IO (Ptr Word32)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr Word32)
scriptTags
    [Word32]
scriptTags'' <- (Word32 -> Ptr Word32 -> IO [Word32]
forall a b. (Integral a, Storable b) => a -> Ptr b -> IO [b]
unpackStorableArrayWithLength Word32
scriptCount') Ptr Word32
scriptTags'
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
scriptTags'
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
scriptCount
    Ptr (Ptr Word32) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Word32)
scriptTags
    (Word32, [Word32]) -> IO (Word32, [Word32])
forall (m :: * -> *) a. Monad m => a -> m a
return (Word32
result, [Word32]
scriptTags'')


-- function ot_layout_table_get_lookup_count
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#hb_face_t to work upon"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "table_tag"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "HB_OT_TAG_GSUB or HB_OT_TAG_GPOS"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_layout_table_get_lookup_count" hb_ot_layout_table_get_lookup_count :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Word32 ->                               -- table_tag : TBasicType TUInt32
    IO Word32

-- | Fetches the total number of lookups enumerated in the specified
-- face\'s GSUB table or GPOS table.
-- 
-- /Since: 0.9.22/
otLayoutTableGetLookupCount ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: t'GI.HarfBuzz.Structs.FaceT.FaceT' to work upon
    -> Word32
    -- ^ /@tableTag@/: HB_OT_TAG_GSUB or HB_OT_TAG_GPOS
    -> m Word32
otLayoutTableGetLookupCount :: FaceT -> Word32 -> m Word32
otLayoutTableGetLookupCount FaceT
face Word32
tableTag = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
    Ptr FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Word32
result <- Ptr FaceT -> Word32 -> IO Word32
hb_ot_layout_table_get_lookup_count Ptr FaceT
face' Word32
tableTag
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result


-- function ot_layout_table_get_feature_tags
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#hb_face_t to work upon"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "table_tag"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "HB_OT_TAG_GSUB or HB_OT_TAG_GPOS"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "start_offset"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "offset of the first feature tag to retrieve"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "feature_count"
--           , argType = TBasicType TUInt
--           , direction = DirectionOut
--           , mayBeNull = True
--           , 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 = "feature_tags"
--           , argType = TCArray False (-1) 3 (TBasicType TUInt32)
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Array of feature tags found in the table"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "feature_count"
--              , argType = TBasicType TUInt
--              , direction = DirectionOut
--              , mayBeNull = True
--              , 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 "hb_ot_layout_table_get_feature_tags" hb_ot_layout_table_get_feature_tags :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Word32 ->                               -- table_tag : TBasicType TUInt32
    Word32 ->                               -- start_offset : TBasicType TUInt
    Ptr Word32 ->                           -- feature_count : TBasicType TUInt
    Ptr (Ptr Word32) ->                     -- feature_tags : TCArray False (-1) 3 (TBasicType TUInt32)
    IO Word32

-- | Fetches a list of all feature tags in the given face\'s GSUB or GPOS table.
otLayoutTableGetFeatureTags ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: t'GI.HarfBuzz.Structs.FaceT.FaceT' to work upon
    -> Word32
    -- ^ /@tableTag@/: HB_OT_TAG_GSUB or HB_OT_TAG_GPOS
    -> Word32
    -- ^ /@startOffset@/: offset of the first feature tag to retrieve
    -> m ((Word32, [Word32]))
otLayoutTableGetFeatureTags :: FaceT -> Word32 -> Word32 -> m (Word32, [Word32])
otLayoutTableGetFeatureTags FaceT
face Word32
tableTag Word32
startOffset = IO (Word32, [Word32]) -> m (Word32, [Word32])
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 FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Ptr Word32
featureCount <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
    Ptr (Ptr Word32)
featureTags <- IO (Ptr (Ptr Word32))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr Word32))
    Word32
result <- Ptr FaceT
-> Word32 -> Word32 -> Ptr Word32 -> Ptr (Ptr Word32) -> IO Word32
hb_ot_layout_table_get_feature_tags Ptr FaceT
face' Word32
tableTag Word32
startOffset Ptr Word32
featureCount Ptr (Ptr Word32)
featureTags
    Word32
featureCount' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
featureCount
    Ptr Word32
featureTags' <- Ptr (Ptr Word32) -> IO (Ptr Word32)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr Word32)
featureTags
    [Word32]
featureTags'' <- (Word32 -> Ptr Word32 -> IO [Word32]
forall a b. (Integral a, Storable b) => a -> Ptr b -> IO [b]
unpackStorableArrayWithLength Word32
featureCount') Ptr Word32
featureTags'
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
featureTags'
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
featureCount
    Ptr (Ptr Word32) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Word32)
featureTags
    (Word32, [Word32]) -> IO (Word32, [Word32])
forall (m :: * -> *) a. Monad m => a -> m a
return (Word32
result, [Word32]
featureTags'')


-- function ot_layout_table_find_script
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#hb_face_t to work upon"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "table_tag"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "HB_OT_TAG_GSUB or HB_OT_TAG_GPOS"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "script_tag"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#hb_tag_t of the script tag requested"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "script_index"
--           , argType = TBasicType TUInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The index of the requested script tag"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_layout_table_find_script" hb_ot_layout_table_find_script :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Word32 ->                               -- table_tag : TBasicType TUInt32
    Word32 ->                               -- script_tag : TBasicType TUInt32
    Ptr Word32 ->                           -- script_index : TBasicType TUInt
    IO Int32

-- | Fetches the index if a given script tag in the specified face\'s GSUB table
-- or GPOS table.
otLayoutTableFindScript ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: t'GI.HarfBuzz.Structs.FaceT.FaceT' to work upon
    -> Word32
    -- ^ /@tableTag@/: HB_OT_TAG_GSUB or HB_OT_TAG_GPOS
    -> Word32
    -- ^ /@scriptTag@/: @/hb_tag_t/@ of the script tag requested
    -> m ((Int32, Word32))
    -- ^ __Returns:__ true if the script is found, false otherwise
otLayoutTableFindScript :: FaceT -> Word32 -> Word32 -> m (Int32, Word32)
otLayoutTableFindScript FaceT
face Word32
tableTag Word32
scriptTag = IO (Int32, Word32) -> m (Int32, Word32)
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 FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Ptr Word32
scriptIndex <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
    Int32
result <- Ptr FaceT -> Word32 -> Word32 -> Ptr Word32 -> IO Int32
hb_ot_layout_table_find_script Ptr FaceT
face' Word32
tableTag Word32
scriptTag Ptr Word32
scriptIndex
    Word32
scriptIndex' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
scriptIndex
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
scriptIndex
    (Int32, Word32) -> IO (Int32, Word32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
result, Word32
scriptIndex')


-- function ot_layout_table_find_feature_variations
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#hb_face_t to work upon"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "table_tag"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "HB_OT_TAG_GSUB or HB_OT_TAG_GPOS"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "coords"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The variation coordinates to query"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "num_coords"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The number of variation coorinates"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "variations_index"
--           , argType = TBasicType TUInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "The array of feature variations found for the query"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_layout_table_find_feature_variations" hb_ot_layout_table_find_feature_variations :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Word32 ->                               -- table_tag : TBasicType TUInt32
    Int32 ->                                -- coords : TBasicType TInt
    Word32 ->                               -- num_coords : TBasicType TUInt
    Ptr Word32 ->                           -- variations_index : TBasicType TUInt
    IO Int32

-- | Fetches a list of feature variations in the specified face\'s GSUB table
-- or GPOS table, at the specified variation coordinates.
otLayoutTableFindFeatureVariations ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: t'GI.HarfBuzz.Structs.FaceT.FaceT' to work upon
    -> Word32
    -- ^ /@tableTag@/: HB_OT_TAG_GSUB or HB_OT_TAG_GPOS
    -> Int32
    -- ^ /@coords@/: The variation coordinates to query
    -> Word32
    -- ^ /@numCoords@/: The number of variation coorinates
    -> m ((Int32, Word32))
otLayoutTableFindFeatureVariations :: FaceT -> Word32 -> Int32 -> Word32 -> m (Int32, Word32)
otLayoutTableFindFeatureVariations FaceT
face Word32
tableTag Int32
coords Word32
numCoords = IO (Int32, Word32) -> m (Int32, Word32)
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 FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Ptr Word32
variationsIndex <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
    Int32
result <- Ptr FaceT -> Word32 -> Int32 -> Word32 -> Ptr Word32 -> IO Int32
hb_ot_layout_table_find_feature_variations Ptr FaceT
face' Word32
tableTag Int32
coords Word32
numCoords Ptr Word32
variationsIndex
    Word32
variationsIndex' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
variationsIndex
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
variationsIndex
    (Int32, Word32) -> IO (Int32, Word32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
result, Word32
variationsIndex')


-- function ot_layout_table_choose_script
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#hb_face_t to work upon"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "table_tag"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "HB_OT_TAG_GSUB or HB_OT_TAG_GPOS"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "script_tags"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Array of #hb_tag_t script tags"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "script_index"
--           , argType = TBasicType TUInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The index of the requested script tag"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "chosen_script"
--           , argType = TBasicType TUInt32
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#hb_tag_t of the script tag requested"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_layout_table_choose_script" hb_ot_layout_table_choose_script :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Word32 ->                               -- table_tag : TBasicType TUInt32
    Word32 ->                               -- script_tags : TBasicType TUInt32
    Ptr Word32 ->                           -- script_index : TBasicType TUInt
    Ptr Word32 ->                           -- chosen_script : TBasicType TUInt32
    IO Int32

-- | Deprecated since 2.0.0
otLayoutTableChooseScript ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: t'GI.HarfBuzz.Structs.FaceT.FaceT' to work upon
    -> Word32
    -- ^ /@tableTag@/: HB_OT_TAG_GSUB or HB_OT_TAG_GPOS
    -> Word32
    -- ^ /@scriptTags@/: Array of @/hb_tag_t/@ script tags
    -> m ((Int32, Word32, Word32))
otLayoutTableChooseScript :: FaceT -> Word32 -> Word32 -> m (Int32, Word32, Word32)
otLayoutTableChooseScript FaceT
face Word32
tableTag Word32
scriptTags = IO (Int32, Word32, Word32) -> m (Int32, Word32, Word32)
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 FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Ptr Word32
scriptIndex <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
    Ptr Word32
chosenScript <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
    Int32
result <- Ptr FaceT
-> Word32 -> Word32 -> Ptr Word32 -> Ptr Word32 -> IO Int32
hb_ot_layout_table_choose_script Ptr FaceT
face' Word32
tableTag Word32
scriptTags Ptr Word32
scriptIndex Ptr Word32
chosenScript
    Word32
scriptIndex' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
scriptIndex
    Word32
chosenScript' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
chosenScript
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
scriptIndex
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
chosenScript
    (Int32, Word32, Word32) -> IO (Int32, Word32, Word32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
result, Word32
scriptIndex', Word32
chosenScript')


-- function ot_layout_script_select_language
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#hb_face_t to work upon"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "table_tag"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "HB_OT_TAG_GSUB or HB_OT_TAG_GPOS"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "script_index"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The index of the requested script tag"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "language_count"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "The number of languages in the specified script"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "language_tags"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The array of language tags"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "language_index"
--           , argType = TBasicType TUInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The index of the requested language"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_layout_script_select_language" hb_ot_layout_script_select_language :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Word32 ->                               -- table_tag : TBasicType TUInt32
    Word32 ->                               -- script_index : TBasicType TUInt
    Word32 ->                               -- language_count : TBasicType TUInt
    Word32 ->                               -- language_tags : TBasicType TUInt32
    Ptr Word32 ->                           -- language_index : TBasicType TUInt
    IO Int32

-- | Fetches the index of a given language tag in the specified face\'s GSUB table
-- or GPOS table, underneath the specified script index.
-- 
-- /Since: 2.0.0/
otLayoutScriptSelectLanguage ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: t'GI.HarfBuzz.Structs.FaceT.FaceT' to work upon
    -> Word32
    -- ^ /@tableTag@/: HB_OT_TAG_GSUB or HB_OT_TAG_GPOS
    -> Word32
    -- ^ /@scriptIndex@/: The index of the requested script tag
    -> Word32
    -- ^ /@languageCount@/: The number of languages in the specified script
    -> Word32
    -- ^ /@languageTags@/: The array of language tags
    -> m ((Int32, Word32))
    -- ^ __Returns:__ true if the language tag is found, false otherwise
otLayoutScriptSelectLanguage :: FaceT -> Word32 -> Word32 -> Word32 -> Word32 -> m (Int32, Word32)
otLayoutScriptSelectLanguage FaceT
face Word32
tableTag Word32
scriptIndex Word32
languageCount Word32
languageTags = IO (Int32, Word32) -> m (Int32, Word32)
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 FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Ptr Word32
languageIndex <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
    Int32
result <- Ptr FaceT
-> Word32 -> Word32 -> Word32 -> Word32 -> Ptr Word32 -> IO Int32
hb_ot_layout_script_select_language Ptr FaceT
face' Word32
tableTag Word32
scriptIndex Word32
languageCount Word32
languageTags Ptr Word32
languageIndex
    Word32
languageIndex' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
languageIndex
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
languageIndex
    (Int32, Word32) -> IO (Int32, Word32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
result, Word32
languageIndex')


-- function ot_layout_script_get_language_tags
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#hb_face_t to work upon"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "table_tag"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "HB_OT_TAG_GSUB or HB_OT_TAG_GPOS"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "script_index"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The index of the requested script tag"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "start_offset"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "offset of the first language tag to retrieve"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "language_count"
--           , argType = TBasicType TUInt
--           , direction = DirectionOut
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "Input = the maximum number of language tags to return;\n                 Output = the actual number of language tags returned (may be zero)"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "language_tags"
--           , argType = TCArray False (-1) 4 (TBasicType TUInt32)
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Array of language tags found in the table"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "language_count"
--              , argType = TBasicType TUInt
--              , direction = DirectionOut
--              , mayBeNull = True
--              , argDoc =
--                  Documentation
--                    { rawDocText =
--                        Just
--                          "Input = the maximum number of language tags to return;\n                 Output = the actual number of language 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 "hb_ot_layout_script_get_language_tags" hb_ot_layout_script_get_language_tags :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Word32 ->                               -- table_tag : TBasicType TUInt32
    Word32 ->                               -- script_index : TBasicType TUInt
    Word32 ->                               -- start_offset : TBasicType TUInt
    Ptr Word32 ->                           -- language_count : TBasicType TUInt
    Ptr (Ptr Word32) ->                     -- language_tags : TCArray False (-1) 4 (TBasicType TUInt32)
    IO Word32

-- | Fetches a list of language tags in the given face\'s GSUB or GPOS table, underneath
-- the specified script index. The list returned will begin at the offset provided.
otLayoutScriptGetLanguageTags ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: t'GI.HarfBuzz.Structs.FaceT.FaceT' to work upon
    -> Word32
    -- ^ /@tableTag@/: HB_OT_TAG_GSUB or HB_OT_TAG_GPOS
    -> Word32
    -- ^ /@scriptIndex@/: The index of the requested script tag
    -> Word32
    -- ^ /@startOffset@/: offset of the first language tag to retrieve
    -> m ((Word32, [Word32]))
otLayoutScriptGetLanguageTags :: FaceT -> Word32 -> Word32 -> Word32 -> m (Word32, [Word32])
otLayoutScriptGetLanguageTags FaceT
face Word32
tableTag Word32
scriptIndex Word32
startOffset = IO (Word32, [Word32]) -> m (Word32, [Word32])
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 FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Ptr Word32
languageCount <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
    Ptr (Ptr Word32)
languageTags <- IO (Ptr (Ptr Word32))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr Word32))
    Word32
result <- Ptr FaceT
-> Word32
-> Word32
-> Word32
-> Ptr Word32
-> Ptr (Ptr Word32)
-> IO Word32
hb_ot_layout_script_get_language_tags Ptr FaceT
face' Word32
tableTag Word32
scriptIndex Word32
startOffset Ptr Word32
languageCount Ptr (Ptr Word32)
languageTags
    Word32
languageCount' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
languageCount
    Ptr Word32
languageTags' <- Ptr (Ptr Word32) -> IO (Ptr Word32)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr Word32)
languageTags
    [Word32]
languageTags'' <- (Word32 -> Ptr Word32 -> IO [Word32]
forall a b. (Integral a, Storable b) => a -> Ptr b -> IO [b]
unpackStorableArrayWithLength Word32
languageCount') Ptr Word32
languageTags'
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
languageTags'
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
languageCount
    Ptr (Ptr Word32) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Word32)
languageTags
    (Word32, [Word32]) -> IO (Word32, [Word32])
forall (m :: * -> *) a. Monad m => a -> m a
return (Word32
result, [Word32]
languageTags'')


-- function ot_layout_script_find_language
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#hb_face_t to work upon"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "table_tag"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "HB_OT_TAG_GSUB or HB_OT_TAG_GPOS"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "script_index"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The index of the requested script tag"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "language_tag"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The #hb_tag_t of the requested language"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "language_index"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The index of the requested language"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_layout_script_find_language" hb_ot_layout_script_find_language :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Word32 ->                               -- table_tag : TBasicType TUInt32
    Word32 ->                               -- script_index : TBasicType TUInt
    Word32 ->                               -- language_tag : TBasicType TUInt32
    Word32 ->                               -- language_index : TBasicType TUInt
    IO Int32

{-# DEPRECATED otLayoutScriptFindLanguage ["??"] #-}
-- | Fetches the index of a given language tag in the specified face\'s GSUB table
-- or GPOS table, underneath the specified script tag.
otLayoutScriptFindLanguage ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: t'GI.HarfBuzz.Structs.FaceT.FaceT' to work upon
    -> Word32
    -- ^ /@tableTag@/: HB_OT_TAG_GSUB or HB_OT_TAG_GPOS
    -> Word32
    -- ^ /@scriptIndex@/: The index of the requested script tag
    -> Word32
    -- ^ /@languageTag@/: The @/hb_tag_t/@ of the requested language
    -> Word32
    -- ^ /@languageIndex@/: The index of the requested language
    -> m Int32
    -- ^ __Returns:__ true if the language tag is found, false otherwise
otLayoutScriptFindLanguage :: FaceT -> Word32 -> Word32 -> Word32 -> Word32 -> m Int32
otLayoutScriptFindLanguage FaceT
face Word32
tableTag Word32
scriptIndex Word32
languageTag Word32
languageIndex = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Int32
result <- Ptr FaceT -> Word32 -> Word32 -> Word32 -> Word32 -> IO Int32
hb_ot_layout_script_find_language Ptr FaceT
face' Word32
tableTag Word32
scriptIndex Word32
languageTag Word32
languageIndex
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function ot_layout_lookups_substitute_closure
-- XXX Could not generate function ot_layout_lookups_substitute_closure

-- Not implemented: Don't know how to allocate "glyphs" of type TInterface (Name {namespace = "HarfBuzz", name = "set_t"})

-- function ot_layout_lookup_would_substitute
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#hb_face_t to work upon"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "lookup_index"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The index of the lookup to query"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "glyphs"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "The sequence of glyphs to query for substitution"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "glyphs_length"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The length of the glyph sequence"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "zero_context"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "#hb_bool_t indicating whether substitutions should be context-free"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_layout_lookup_would_substitute" hb_ot_layout_lookup_would_substitute :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Word32 ->                               -- lookup_index : TBasicType TUInt
    Word32 ->                               -- glyphs : TBasicType TUInt32
    Word32 ->                               -- glyphs_length : TBasicType TUInt
    Int32 ->                                -- zero_context : TBasicType TInt
    IO Int32

-- | Tests whether a specified lookup in the specified face would
-- trigger a substitution on the given glyph sequence.
-- 
-- /Since: 0.9.7/
otLayoutLookupWouldSubstitute ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: t'GI.HarfBuzz.Structs.FaceT.FaceT' to work upon
    -> Word32
    -- ^ /@lookupIndex@/: The index of the lookup to query
    -> Word32
    -- ^ /@glyphs@/: The sequence of glyphs to query for substitution
    -> Word32
    -- ^ /@glyphsLength@/: The length of the glyph sequence
    -> Int32
    -- ^ /@zeroContext@/: @/hb_bool_t/@ indicating whether substitutions should be context-free
    -> m Int32
    -- ^ __Returns:__ true if a substitution would be triggered, false otherwise
otLayoutLookupWouldSubstitute :: FaceT -> Word32 -> Word32 -> Word32 -> Int32 -> m Int32
otLayoutLookupWouldSubstitute FaceT
face Word32
lookupIndex Word32
glyphs Word32
glyphsLength Int32
zeroContext = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Int32
result <- Ptr FaceT -> Word32 -> Word32 -> Word32 -> Int32 -> IO Int32
hb_ot_layout_lookup_would_substitute Ptr FaceT
face' Word32
lookupIndex Word32
glyphs Word32
glyphsLength Int32
zeroContext
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function ot_layout_lookup_substitute_closure
-- XXX Could not generate function ot_layout_lookup_substitute_closure

-- Not implemented: Don't know how to allocate "glyphs" of type TInterface (Name {namespace = "HarfBuzz", name = "set_t"})

-- function ot_layout_lookup_collect_glyphs
-- XXX Could not generate function ot_layout_lookup_collect_glyphs

-- Not implemented: Don't know how to allocate "glyphs_before" of type TInterface (Name {namespace = "HarfBuzz", name = "set_t"})

-- function ot_layout_language_get_required_feature_index
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#hb_face_t to work upon"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "table_tag"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "HB_OT_TAG_GSUB or HB_OT_TAG_GPOS"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "script_index"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The index of the requested script tag"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "language_index"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The index of the requested language tag"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "feature_index"
--           , argType = TBasicType TUInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The index of the requested feature"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_layout_language_get_required_feature_index" hb_ot_layout_language_get_required_feature_index :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Word32 ->                               -- table_tag : TBasicType TUInt32
    Word32 ->                               -- script_index : TBasicType TUInt
    Word32 ->                               -- language_index : TBasicType TUInt
    Ptr Word32 ->                           -- feature_index : TBasicType TUInt
    IO Int32

-- | Fetches the index of a requested feature in the given face\'s GSUB or GPOS table,
-- underneath the specified script and language.
otLayoutLanguageGetRequiredFeatureIndex ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: t'GI.HarfBuzz.Structs.FaceT.FaceT' to work upon
    -> Word32
    -- ^ /@tableTag@/: HB_OT_TAG_GSUB or HB_OT_TAG_GPOS
    -> Word32
    -- ^ /@scriptIndex@/: The index of the requested script tag
    -> Word32
    -- ^ /@languageIndex@/: The index of the requested language tag
    -> m ((Int32, Word32))
    -- ^ __Returns:__ true if the feature is found, false otherwise
otLayoutLanguageGetRequiredFeatureIndex :: FaceT -> Word32 -> Word32 -> Word32 -> m (Int32, Word32)
otLayoutLanguageGetRequiredFeatureIndex FaceT
face Word32
tableTag Word32
scriptIndex Word32
languageIndex = IO (Int32, Word32) -> m (Int32, Word32)
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 FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Ptr Word32
featureIndex <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
    Int32
result <- Ptr FaceT -> Word32 -> Word32 -> Word32 -> Ptr Word32 -> IO Int32
hb_ot_layout_language_get_required_feature_index Ptr FaceT
face' Word32
tableTag Word32
scriptIndex Word32
languageIndex Ptr Word32
featureIndex
    Word32
featureIndex' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
featureIndex
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
featureIndex
    (Int32, Word32) -> IO (Int32, Word32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
result, Word32
featureIndex')


-- function ot_layout_language_get_required_feature
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#hb_face_t to work upon"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "table_tag"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "HB_OT_TAG_GSUB or HB_OT_TAG_GPOS"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "script_index"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The index of the requested script tag"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "language_index"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The index of the requested language tag"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "feature_index"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The index of the requested feature"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "feature_tag"
--           , argType = TBasicType TUInt32
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The #hb_tag_t of the requested feature"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_layout_language_get_required_feature" hb_ot_layout_language_get_required_feature :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Word32 ->                               -- table_tag : TBasicType TUInt32
    Word32 ->                               -- script_index : TBasicType TUInt
    Word32 ->                               -- language_index : TBasicType TUInt
    Word32 ->                               -- feature_index : TBasicType TUInt
    Ptr Word32 ->                           -- feature_tag : TBasicType TUInt32
    IO Int32

-- | Fetches the tag of a requested feature index in the given face\'s GSUB or GPOS table,
-- underneath the specified script and language.
-- 
-- /Since: 0.9.30/
otLayoutLanguageGetRequiredFeature ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: t'GI.HarfBuzz.Structs.FaceT.FaceT' to work upon
    -> Word32
    -- ^ /@tableTag@/: HB_OT_TAG_GSUB or HB_OT_TAG_GPOS
    -> Word32
    -- ^ /@scriptIndex@/: The index of the requested script tag
    -> Word32
    -- ^ /@languageIndex@/: The index of the requested language tag
    -> Word32
    -- ^ /@featureIndex@/: The index of the requested feature
    -> m ((Int32, Word32))
    -- ^ __Returns:__ true if the feature is found, false otherwise
otLayoutLanguageGetRequiredFeature :: FaceT -> Word32 -> Word32 -> Word32 -> Word32 -> m (Int32, Word32)
otLayoutLanguageGetRequiredFeature FaceT
face Word32
tableTag Word32
scriptIndex Word32
languageIndex Word32
featureIndex = IO (Int32, Word32) -> m (Int32, Word32)
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 FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Ptr Word32
featureTag <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
    Int32
result <- Ptr FaceT
-> Word32 -> Word32 -> Word32 -> Word32 -> Ptr Word32 -> IO Int32
hb_ot_layout_language_get_required_feature Ptr FaceT
face' Word32
tableTag Word32
scriptIndex Word32
languageIndex Word32
featureIndex Ptr Word32
featureTag
    Word32
featureTag' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
featureTag
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
featureTag
    (Int32, Word32) -> IO (Int32, Word32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
result, Word32
featureTag')


-- function ot_layout_language_get_feature_tags
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#hb_face_t to work upon"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "table_tag"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "HB_OT_TAG_GSUB or HB_OT_TAG_GPOS"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "script_index"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The index of the requested script tag"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "language_index"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The index of the requested language tag"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "start_offset"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "offset of the first feature tag to retrieve"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "feature_count"
--           , argType = TBasicType TUInt
--           , direction = DirectionOut
--           , mayBeNull = True
--           , 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 = "feature_tags"
--           , argType = TCArray False (-1) 5 (TBasicType TUInt32)
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "The array of #hb_tag_t feature tags found for the query"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "feature_count"
--              , argType = TBasicType TUInt
--              , direction = DirectionOut
--              , mayBeNull = True
--              , 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 "hb_ot_layout_language_get_feature_tags" hb_ot_layout_language_get_feature_tags :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Word32 ->                               -- table_tag : TBasicType TUInt32
    Word32 ->                               -- script_index : TBasicType TUInt
    Word32 ->                               -- language_index : TBasicType TUInt
    Word32 ->                               -- start_offset : TBasicType TUInt
    Ptr Word32 ->                           -- feature_count : TBasicType TUInt
    Ptr (Ptr Word32) ->                     -- feature_tags : TCArray False (-1) 5 (TBasicType TUInt32)
    IO Word32

-- | Fetches a list of all features in the specified face\'s GSUB table
-- or GPOS table, underneath the specified script and language. The list
-- returned will begin at the offset provided.
otLayoutLanguageGetFeatureTags ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: t'GI.HarfBuzz.Structs.FaceT.FaceT' to work upon
    -> Word32
    -- ^ /@tableTag@/: HB_OT_TAG_GSUB or HB_OT_TAG_GPOS
    -> Word32
    -- ^ /@scriptIndex@/: The index of the requested script tag
    -> Word32
    -- ^ /@languageIndex@/: The index of the requested language tag
    -> Word32
    -- ^ /@startOffset@/: offset of the first feature tag to retrieve
    -> m ((Word32, [Word32]))
otLayoutLanguageGetFeatureTags :: FaceT
-> Word32 -> Word32 -> Word32 -> Word32 -> m (Word32, [Word32])
otLayoutLanguageGetFeatureTags FaceT
face Word32
tableTag Word32
scriptIndex Word32
languageIndex Word32
startOffset = IO (Word32, [Word32]) -> m (Word32, [Word32])
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 FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Ptr Word32
featureCount <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
    Ptr (Ptr Word32)
featureTags <- IO (Ptr (Ptr Word32))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr Word32))
    Word32
result <- Ptr FaceT
-> Word32
-> Word32
-> Word32
-> Word32
-> Ptr Word32
-> Ptr (Ptr Word32)
-> IO Word32
hb_ot_layout_language_get_feature_tags Ptr FaceT
face' Word32
tableTag Word32
scriptIndex Word32
languageIndex Word32
startOffset Ptr Word32
featureCount Ptr (Ptr Word32)
featureTags
    Word32
featureCount' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
featureCount
    Ptr Word32
featureTags' <- Ptr (Ptr Word32) -> IO (Ptr Word32)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr Word32)
featureTags
    [Word32]
featureTags'' <- (Word32 -> Ptr Word32 -> IO [Word32]
forall a b. (Integral a, Storable b) => a -> Ptr b -> IO [b]
unpackStorableArrayWithLength Word32
featureCount') Ptr Word32
featureTags'
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
featureTags'
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
featureCount
    Ptr (Ptr Word32) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Word32)
featureTags
    (Word32, [Word32]) -> IO (Word32, [Word32])
forall (m :: * -> *) a. Monad m => a -> m a
return (Word32
result, [Word32]
featureTags'')


-- function ot_layout_language_get_feature_indexes
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#hb_face_t to work upon"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "table_tag"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "HB_OT_TAG_GSUB or HB_OT_TAG_GPOS"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "script_index"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The index of the requested script tag"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "language_index"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The index of the requested language tag"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "start_offset"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "offset of the first feature tag to retrieve"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "feature_count"
--           , argType = TBasicType TUInt
--           , direction = DirectionOut
--           , mayBeNull = True
--           , 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 = "feature_indexes"
--           , argType = TCArray False (-1) 5 (TBasicType TUInt)
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "The array of feature indexes found for the query"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "feature_count"
--              , argType = TBasicType TUInt
--              , direction = DirectionOut
--              , mayBeNull = True
--              , 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 "hb_ot_layout_language_get_feature_indexes" hb_ot_layout_language_get_feature_indexes :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Word32 ->                               -- table_tag : TBasicType TUInt32
    Word32 ->                               -- script_index : TBasicType TUInt
    Word32 ->                               -- language_index : TBasicType TUInt
    Word32 ->                               -- start_offset : TBasicType TUInt
    Ptr Word32 ->                           -- feature_count : TBasicType TUInt
    Ptr (Ptr Word32) ->                     -- feature_indexes : TCArray False (-1) 5 (TBasicType TUInt)
    IO Word32

-- | Fetches a list of all features in the specified face\'s GSUB table
-- or GPOS table, underneath the specified script and language. The list
-- returned will begin at the offset provided.
otLayoutLanguageGetFeatureIndexes ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: t'GI.HarfBuzz.Structs.FaceT.FaceT' to work upon
    -> Word32
    -- ^ /@tableTag@/: HB_OT_TAG_GSUB or HB_OT_TAG_GPOS
    -> Word32
    -- ^ /@scriptIndex@/: The index of the requested script tag
    -> Word32
    -- ^ /@languageIndex@/: The index of the requested language tag
    -> Word32
    -- ^ /@startOffset@/: offset of the first feature tag to retrieve
    -> m ((Word32, [Word32]))
otLayoutLanguageGetFeatureIndexes :: FaceT
-> Word32 -> Word32 -> Word32 -> Word32 -> m (Word32, [Word32])
otLayoutLanguageGetFeatureIndexes FaceT
face Word32
tableTag Word32
scriptIndex Word32
languageIndex Word32
startOffset = IO (Word32, [Word32]) -> m (Word32, [Word32])
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 FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Ptr Word32
featureCount <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
    Ptr (Ptr Word32)
featureIndexes <- IO (Ptr (Ptr Word32))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr Word32))
    Word32
result <- Ptr FaceT
-> Word32
-> Word32
-> Word32
-> Word32
-> Ptr Word32
-> Ptr (Ptr Word32)
-> IO Word32
hb_ot_layout_language_get_feature_indexes Ptr FaceT
face' Word32
tableTag Word32
scriptIndex Word32
languageIndex Word32
startOffset Ptr Word32
featureCount Ptr (Ptr Word32)
featureIndexes
    Word32
featureCount' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
featureCount
    Ptr Word32
featureIndexes' <- Ptr (Ptr Word32) -> IO (Ptr Word32)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr Word32)
featureIndexes
    [Word32]
featureIndexes'' <- (Word32 -> Ptr Word32 -> IO [Word32]
forall a b. (Integral a, Storable b) => a -> Ptr b -> IO [b]
unpackStorableArrayWithLength Word32
featureCount') Ptr Word32
featureIndexes'
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
featureIndexes'
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
featureCount
    Ptr (Ptr Word32) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Word32)
featureIndexes
    (Word32, [Word32]) -> IO (Word32, [Word32])
forall (m :: * -> *) a. Monad m => a -> m a
return (Word32
result, [Word32]
featureIndexes'')


-- function ot_layout_language_find_feature
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#hb_face_t to work upon"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "table_tag"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "HB_OT_TAG_GSUB or HB_OT_TAG_GPOS"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "script_index"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The index of the requested script tag"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "language_index"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The index of the requested language tag"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "feature_tag"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#hb_tag_t of the feature tag requested"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "feature_index"
--           , argType = TBasicType TUInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The index of the requested feature"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_layout_language_find_feature" hb_ot_layout_language_find_feature :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Word32 ->                               -- table_tag : TBasicType TUInt32
    Word32 ->                               -- script_index : TBasicType TUInt
    Word32 ->                               -- language_index : TBasicType TUInt
    Word32 ->                               -- feature_tag : TBasicType TUInt32
    Ptr Word32 ->                           -- feature_index : TBasicType TUInt
    IO Int32

-- | Fetches the index of a given feature tag in the specified face\'s GSUB table
-- or GPOS table, underneath the specified script and language.
otLayoutLanguageFindFeature ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: t'GI.HarfBuzz.Structs.FaceT.FaceT' to work upon
    -> Word32
    -- ^ /@tableTag@/: HB_OT_TAG_GSUB or HB_OT_TAG_GPOS
    -> Word32
    -- ^ /@scriptIndex@/: The index of the requested script tag
    -> Word32
    -- ^ /@languageIndex@/: The index of the requested language tag
    -> Word32
    -- ^ /@featureTag@/: @/hb_tag_t/@ of the feature tag requested
    -> m ((Int32, Word32))
    -- ^ __Returns:__ true if the feature is found, false otherwise
otLayoutLanguageFindFeature :: FaceT -> Word32 -> Word32 -> Word32 -> Word32 -> m (Int32, Word32)
otLayoutLanguageFindFeature FaceT
face Word32
tableTag Word32
scriptIndex Word32
languageIndex Word32
featureTag = IO (Int32, Word32) -> m (Int32, Word32)
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 FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Ptr Word32
featureIndex <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
    Int32
result <- Ptr FaceT
-> Word32 -> Word32 -> Word32 -> Word32 -> Ptr Word32 -> IO Int32
hb_ot_layout_language_find_feature Ptr FaceT
face' Word32
tableTag Word32
scriptIndex Word32
languageIndex Word32
featureTag Ptr Word32
featureIndex
    Word32
featureIndex' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
featureIndex
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
featureIndex
    (Int32, Word32) -> IO (Int32, Word32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
result, Word32
featureIndex')


-- function ot_layout_has_substitution
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#hb_face_t to work upon"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_layout_has_substitution" hb_ot_layout_has_substitution :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    IO Int32

-- | Tests whether the specified face includes any GSUB substitutions.
otLayoutHasSubstitution ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: t'GI.HarfBuzz.Structs.FaceT.FaceT' to work upon
    -> m Int32
    -- ^ __Returns:__ true if data found, false otherwise
otLayoutHasSubstitution :: FaceT -> m Int32
otLayoutHasSubstitution FaceT
face = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Int32
result <- Ptr FaceT -> IO Int32
hb_ot_layout_has_substitution Ptr FaceT
face'
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function ot_layout_has_positioning
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#hb_face_t to work upon"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_layout_has_positioning" hb_ot_layout_has_positioning :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    IO Int32

-- | /No description available in the introspection data./
otLayoutHasPositioning ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: t'GI.HarfBuzz.Structs.FaceT.FaceT' to work upon
    -> m Int32
    -- ^ __Returns:__ true if the face has GPOS data, false otherwise
otLayoutHasPositioning :: FaceT -> m Int32
otLayoutHasPositioning FaceT
face = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Int32
result <- Ptr FaceT -> IO Int32
hb_ot_layout_has_positioning Ptr FaceT
face'
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function ot_layout_has_glyph_classes
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#hb_face_t to work upon"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_layout_has_glyph_classes" hb_ot_layout_has_glyph_classes :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    IO Int32

-- | Tests whether a face has any glyph classes defined in its GDEF table.
otLayoutHasGlyphClasses ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: t'GI.HarfBuzz.Structs.FaceT.FaceT' to work upon
    -> m Int32
    -- ^ __Returns:__ true if data found, false otherwise
otLayoutHasGlyphClasses :: FaceT -> m Int32
otLayoutHasGlyphClasses FaceT
face = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Int32
result <- Ptr FaceT -> IO Int32
hb_ot_layout_has_glyph_classes Ptr FaceT
face'
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function ot_layout_get_size_params
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#hb_face_t to work upon"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "design_size"
--           , argType = TBasicType TUInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The design size of the face"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "subfamily_id"
--           , argType = TBasicType TUInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "The identifier of the face within the font subfamily"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "subfamily_name_id"
--           , argType = TBasicType TUInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "The \8216name\8217 table name ID of the face within the font subfamily"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "range_start"
--           , argType = TBasicType TUInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "The minimum size of the recommended size range for the face"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "range_end"
--           , argType = TBasicType TUInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "The maximum size of the recommended size range for the face"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_layout_get_size_params" hb_ot_layout_get_size_params :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Ptr Word32 ->                           -- design_size : TBasicType TUInt
    Ptr Word32 ->                           -- subfamily_id : TBasicType TUInt
    Ptr Word32 ->                           -- subfamily_name_id : TBasicType TUInt
    Ptr Word32 ->                           -- range_start : TBasicType TUInt
    Ptr Word32 ->                           -- range_end : TBasicType TUInt
    IO Int32

-- | Fetches optical-size feature data (i.e., the @size@ feature from GPOS). Note that
-- the subfamily_id and the subfamily name string (accessible via the subfamily_name_id)
-- as used here are defined as pertaining only to fonts within a font family that differ
-- specifically in their respective size ranges; other ways to differentiate fonts within
-- a subfamily are not covered by the @size@ feature.
-- 
-- For more information on this distinction, see the @size@ documentation at
-- https:\/\/docs.microsoft.com\/en-us\/typography\/opentype\/spec\/features_pt@/tag/@-39size39
-- 
-- /Since: 0.9.10/
otLayoutGetSizeParams ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: t'GI.HarfBuzz.Structs.FaceT.FaceT' to work upon
    -> m ((Int32, Word32, Word32, Word32, Word32, Word32))
    -- ^ __Returns:__ true if data found, false otherwise
otLayoutGetSizeParams :: FaceT -> m (Int32, Word32, Word32, Word32, Word32, Word32)
otLayoutGetSizeParams FaceT
face = IO (Int32, Word32, Word32, Word32, Word32, Word32)
-> m (Int32, Word32, Word32, Word32, Word32, Word32)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Int32, Word32, Word32, Word32, Word32, Word32)
 -> m (Int32, Word32, Word32, Word32, Word32, Word32))
-> IO (Int32, Word32, Word32, Word32, Word32, Word32)
-> m (Int32, Word32, Word32, Word32, Word32, Word32)
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 Word32
designSize <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
    Ptr Word32
subfamilyId <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
    Ptr Word32
subfamilyNameId <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
    Ptr Word32
rangeStart <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
    Ptr Word32
rangeEnd <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
    Int32
result <- Ptr FaceT
-> Ptr Word32
-> Ptr Word32
-> Ptr Word32
-> Ptr Word32
-> Ptr Word32
-> IO Int32
hb_ot_layout_get_size_params Ptr FaceT
face' Ptr Word32
designSize Ptr Word32
subfamilyId Ptr Word32
subfamilyNameId Ptr Word32
rangeStart Ptr Word32
rangeEnd
    Word32
designSize' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
designSize
    Word32
subfamilyId' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
subfamilyId
    Word32
subfamilyNameId' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
subfamilyNameId
    Word32
rangeStart' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
rangeStart
    Word32
rangeEnd' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
rangeEnd
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
designSize
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
subfamilyId
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
subfamilyNameId
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
rangeStart
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
rangeEnd
    (Int32, Word32, Word32, Word32, Word32, Word32)
-> IO (Int32, Word32, Word32, Word32, Word32, Word32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
result, Word32
designSize', Word32
subfamilyId', Word32
subfamilyNameId', Word32
rangeStart', Word32
rangeEnd')


-- function ot_layout_get_ligature_carets
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The #hb_font_t to work on"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "direction"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "direction_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The #hb_direction_t text direction to use"
--                 , 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 #hb_codepoint_t code point to query"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "start_offset"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "offset of the first caret position to retrieve"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "caret_count"
--           , argType = TBasicType TUInt
--           , direction = DirectionOut
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "Input = the maximum number of caret positions to return;\n              Output = the actual number of caret positions returned (may be zero)"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "caret_array"
--           , argType = TCArray False (-1) 4 (TBasicType TInt32)
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "The array of caret positions found for the query"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "caret_count"
--              , argType = TBasicType TUInt
--              , direction = DirectionOut
--              , mayBeNull = True
--              , argDoc =
--                  Documentation
--                    { rawDocText =
--                        Just
--                          "Input = the maximum number of caret positions to return;\n              Output = the actual number of caret positions 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 "hb_ot_layout_get_ligature_carets" hb_ot_layout_get_ligature_carets :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    CUInt ->                                -- direction : TInterface (Name {namespace = "HarfBuzz", name = "direction_t"})
    Word32 ->                               -- glyph : TBasicType TUInt32
    Word32 ->                               -- start_offset : TBasicType TUInt
    Ptr Word32 ->                           -- caret_count : TBasicType TUInt
    Ptr (Ptr Int32) ->                      -- caret_array : TCArray False (-1) 4 (TBasicType TInt32)
    IO Word32

-- | Fetches a list of the caret positions defined for a ligature glyph in the GDEF
-- table of the font. The list returned will begin at the offset provided.
otLayoutGetLigatureCarets ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: The t'GI.HarfBuzz.Structs.FontT.FontT' to work on
    -> HarfBuzz.Enums.DirectionT
    -- ^ /@direction@/: The t'GI.HarfBuzz.Enums.DirectionT' text direction to use
    -> Word32
    -- ^ /@glyph@/: The @/hb_codepoint_t/@ code point to query
    -> Word32
    -- ^ /@startOffset@/: offset of the first caret position to retrieve
    -> m ((Word32, [Int32]))
otLayoutGetLigatureCarets :: FontT -> DirectionT -> Word32 -> Word32 -> m (Word32, [Int32])
otLayoutGetLigatureCarets FontT
font DirectionT
direction Word32
glyph Word32
startOffset = IO (Word32, [Int32]) -> m (Word32, [Int32])
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Word32, [Int32]) -> m (Word32, [Int32]))
-> IO (Word32, [Int32]) -> m (Word32, [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
    let direction' :: CUInt
direction' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (DirectionT -> Int) -> DirectionT -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. DirectionT -> Int
forall a. Enum a => a -> Int
fromEnum) DirectionT
direction
    Ptr Word32
caretCount <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
    Ptr (Ptr Int32)
caretArray <- IO (Ptr (Ptr Int32))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr Int32))
    Word32
result <- Ptr FontT
-> CUInt
-> Word32
-> Word32
-> Ptr Word32
-> Ptr (Ptr Int32)
-> IO Word32
hb_ot_layout_get_ligature_carets Ptr FontT
font' CUInt
direction' Word32
glyph Word32
startOffset Ptr Word32
caretCount Ptr (Ptr Int32)
caretArray
    Word32
caretCount' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
caretCount
    Ptr Int32
caretArray' <- Ptr (Ptr Int32) -> IO (Ptr Int32)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr Int32)
caretArray
    [Int32]
caretArray'' <- (Word32 -> Ptr Int32 -> IO [Int32]
forall a b. (Integral a, Storable b) => a -> Ptr b -> IO [b]
unpackStorableArrayWithLength Word32
caretCount') Ptr Int32
caretArray'
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
caretArray'
    FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
caretCount
    Ptr (Ptr Int32) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Int32)
caretArray
    (Word32, [Int32]) -> IO (Word32, [Int32])
forall (m :: * -> *) a. Monad m => a -> m a
return (Word32
result, [Int32]
caretArray'')


-- function ot_layout_get_glyphs_in_class
-- XXX Could not generate function ot_layout_get_glyphs_in_class

-- Not implemented: Don't know how to allocate "glyphs" of type TInterface (Name {namespace = "HarfBuzz", name = "set_t"})

-- function ot_layout_get_glyph_class
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The #hb_face_t to work on"
--                 , 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 #hb_codepoint_t code point to query"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface
--                  Name { namespace = "HarfBuzz" , name = "ot_layout_glyph_class_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_layout_get_glyph_class" hb_ot_layout_get_glyph_class :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Word32 ->                               -- glyph : TBasicType TUInt32
    IO CUInt

-- | Fetches the GDEF class of the requested glyph in the specified face.
-- 
-- /Since: 0.9.7/
otLayoutGetGlyphClass ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: The t'GI.HarfBuzz.Structs.FaceT.FaceT' to work on
    -> Word32
    -- ^ /@glyph@/: The @/hb_codepoint_t/@ code point to query
    -> m HarfBuzz.Enums.OtLayoutGlyphClassT
    -- ^ __Returns:__ The t'GI.HarfBuzz.Enums.OtLayoutGlyphClassT' glyph class of the given code
    -- point in the GDEF table of the face.
otLayoutGetGlyphClass :: FaceT -> Word32 -> m OtLayoutGlyphClassT
otLayoutGetGlyphClass FaceT
face Word32
glyph = IO OtLayoutGlyphClassT -> m OtLayoutGlyphClassT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO OtLayoutGlyphClassT -> m OtLayoutGlyphClassT)
-> IO OtLayoutGlyphClassT -> m OtLayoutGlyphClassT
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
    CUInt
result <- Ptr FaceT -> Word32 -> IO CUInt
hb_ot_layout_get_glyph_class Ptr FaceT
face' Word32
glyph
    let result' :: OtLayoutGlyphClassT
result' = (Int -> OtLayoutGlyphClassT
forall a. Enum a => Int -> a
toEnum (Int -> OtLayoutGlyphClassT)
-> (CUInt -> Int) -> CUInt -> OtLayoutGlyphClassT
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    OtLayoutGlyphClassT -> IO OtLayoutGlyphClassT
forall (m :: * -> *) a. Monad m => a -> m a
return OtLayoutGlyphClassT
result'


-- function ot_layout_get_baseline
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a font" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "baseline_tag"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "ot_layout_baseline_tag_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a baseline tag" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "direction"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "direction_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "text direction." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "script_tag"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "script tag." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "language_tag"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "language tag." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "coord"
--           , argType = TBasicType TInt32
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "baseline value if found."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_layout_get_baseline" hb_ot_layout_get_baseline :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    CUInt ->                                -- baseline_tag : TInterface (Name {namespace = "HarfBuzz", name = "ot_layout_baseline_tag_t"})
    CUInt ->                                -- direction : TInterface (Name {namespace = "HarfBuzz", name = "direction_t"})
    Word32 ->                               -- script_tag : TBasicType TUInt32
    Word32 ->                               -- language_tag : TBasicType TUInt32
    Ptr Int32 ->                            -- coord : TBasicType TInt32
    IO Int32

-- | Fetches a baseline value from the face.
-- 
-- /Since: 2.6.0/
otLayoutGetBaseline ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: a font
    -> HarfBuzz.Enums.OtLayoutBaselineTagT
    -- ^ /@baselineTag@/: a baseline tag
    -> HarfBuzz.Enums.DirectionT
    -- ^ /@direction@/: text direction.
    -> Word32
    -- ^ /@scriptTag@/: script tag.
    -> Word32
    -- ^ /@languageTag@/: language tag.
    -> m ((Int32, Int32))
    -- ^ __Returns:__ if found baseline value in the the font.
otLayoutGetBaseline :: FontT
-> OtLayoutBaselineTagT
-> DirectionT
-> Word32
-> Word32
-> m (Int32, Int32)
otLayoutGetBaseline FontT
font OtLayoutBaselineTagT
baselineTag DirectionT
direction Word32
scriptTag Word32
languageTag = IO (Int32, Int32) -> m (Int32, Int32)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Int32, Int32) -> m (Int32, Int32))
-> IO (Int32, Int32) -> m (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
    let baselineTag' :: CUInt
baselineTag' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (OtLayoutBaselineTagT -> Int) -> OtLayoutBaselineTagT -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. OtLayoutBaselineTagT -> Int
forall a. Enum a => a -> Int
fromEnum) OtLayoutBaselineTagT
baselineTag
    let direction' :: CUInt
direction' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (DirectionT -> Int) -> DirectionT -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. DirectionT -> Int
forall a. Enum a => a -> Int
fromEnum) DirectionT
direction
    Ptr Int32
coord <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Int32
result <- Ptr FontT
-> CUInt -> CUInt -> Word32 -> Word32 -> Ptr Int32 -> IO Int32
hb_ot_layout_get_baseline Ptr FontT
font' CUInt
baselineTag' CUInt
direction' Word32
scriptTag Word32
languageTag Ptr Int32
coord
    Int32
coord' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
coord
    FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
coord
    (Int32, Int32) -> IO (Int32, Int32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
result, Int32
coord')


-- function ot_layout_get_attach_points
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The #hb_face_t to work on"
--                 , 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 #hb_codepoint_t code point to query"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "start_offset"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "offset of the first attachment point to retrieve"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "point_count"
--           , argType = TBasicType TUInt
--           , direction = DirectionOut
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "Input = the maximum number of attachment points to return;\n              Output = the actual number of attachment points returned (may be zero)"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "point_array"
--           , argType = TCArray False (-1) 3 (TBasicType TUInt)
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "The array of attachment points found for the query"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "point_count"
--              , argType = TBasicType TUInt
--              , direction = DirectionOut
--              , mayBeNull = True
--              , argDoc =
--                  Documentation
--                    { rawDocText =
--                        Just
--                          "Input = the maximum number of attachment points to return;\n              Output = the actual number of attachment points 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 "hb_ot_layout_get_attach_points" hb_ot_layout_get_attach_points :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Word32 ->                               -- glyph : TBasicType TUInt32
    Word32 ->                               -- start_offset : TBasicType TUInt
    Ptr Word32 ->                           -- point_count : TBasicType TUInt
    Ptr (Ptr Word32) ->                     -- point_array : TCArray False (-1) 3 (TBasicType TUInt)
    IO Word32

-- | Fetches a list of all attachment points for the specified glyph in the GDEF
-- table of the face. The list returned will begin at the offset provided.
-- 
-- Useful if the client program wishes to cache the list.
otLayoutGetAttachPoints ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: The t'GI.HarfBuzz.Structs.FaceT.FaceT' to work on
    -> Word32
    -- ^ /@glyph@/: The @/hb_codepoint_t/@ code point to query
    -> Word32
    -- ^ /@startOffset@/: offset of the first attachment point to retrieve
    -> m ((Word32, [Word32]))
otLayoutGetAttachPoints :: FaceT -> Word32 -> Word32 -> m (Word32, [Word32])
otLayoutGetAttachPoints FaceT
face Word32
glyph Word32
startOffset = IO (Word32, [Word32]) -> m (Word32, [Word32])
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 FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Ptr Word32
pointCount <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
    Ptr (Ptr Word32)
pointArray <- IO (Ptr (Ptr Word32))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr Word32))
    Word32
result <- Ptr FaceT
-> Word32 -> Word32 -> Ptr Word32 -> Ptr (Ptr Word32) -> IO Word32
hb_ot_layout_get_attach_points Ptr FaceT
face' Word32
glyph Word32
startOffset Ptr Word32
pointCount Ptr (Ptr Word32)
pointArray
    Word32
pointCount' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
pointCount
    Ptr Word32
pointArray' <- Ptr (Ptr Word32) -> IO (Ptr Word32)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr Word32)
pointArray
    [Word32]
pointArray'' <- (Word32 -> Ptr Word32 -> IO [Word32]
forall a b. (Integral a, Storable b) => a -> Ptr b -> IO [b]
unpackStorableArrayWithLength Word32
pointCount') Ptr Word32
pointArray'
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
pointArray'
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
pointCount
    Ptr (Ptr Word32) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Word32)
pointArray
    (Word32, [Word32]) -> IO (Word32, [Word32])
forall (m :: * -> *) a. Monad m => a -> m a
return (Word32
result, [Word32]
pointArray'')


-- function ot_layout_feature_with_variations_get_lookups
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#hb_face_t to work upon"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "table_tag"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "HB_OT_TAG_GSUB or HB_OT_TAG_GPOS"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "feature_index"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The index of the feature to query"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "variations_index"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The index of the feature variation to query"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "start_offset"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "offset of the first lookup to retrieve"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "lookup_count"
--           , argType = TBasicType TUInt
--           , direction = DirectionOut
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "Input = the maximum number of lookups to return;\n               Output = the actual number of lookups returned (may be zero)"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "lookup_indexes"
--           , argType = TCArray False (-1) 5 (TBasicType TUInt)
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The array of lookups found for the query"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "lookup_count"
--              , argType = TBasicType TUInt
--              , direction = DirectionOut
--              , mayBeNull = True
--              , argDoc =
--                  Documentation
--                    { rawDocText =
--                        Just
--                          "Input = the maximum number of lookups to return;\n               Output = the actual number of lookups 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 "hb_ot_layout_feature_with_variations_get_lookups" hb_ot_layout_feature_with_variations_get_lookups :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Word32 ->                               -- table_tag : TBasicType TUInt32
    Word32 ->                               -- feature_index : TBasicType TUInt
    Word32 ->                               -- variations_index : TBasicType TUInt
    Word32 ->                               -- start_offset : TBasicType TUInt
    Ptr Word32 ->                           -- lookup_count : TBasicType TUInt
    Ptr (Ptr Word32) ->                     -- lookup_indexes : TCArray False (-1) 5 (TBasicType TUInt)
    IO Word32

-- | Fetches a list of all lookups enumerated for the specified feature, in
-- the specified face\'s GSUB table or GPOS table, enabled at the specified
-- variations index. The list returned will begin at the offset provided.
otLayoutFeatureWithVariationsGetLookups ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: t'GI.HarfBuzz.Structs.FaceT.FaceT' to work upon
    -> Word32
    -- ^ /@tableTag@/: HB_OT_TAG_GSUB or HB_OT_TAG_GPOS
    -> Word32
    -- ^ /@featureIndex@/: The index of the feature to query
    -> Word32
    -- ^ /@variationsIndex@/: The index of the feature variation to query
    -> Word32
    -- ^ /@startOffset@/: offset of the first lookup to retrieve
    -> m ((Word32, [Word32]))
otLayoutFeatureWithVariationsGetLookups :: FaceT
-> Word32 -> Word32 -> Word32 -> Word32 -> m (Word32, [Word32])
otLayoutFeatureWithVariationsGetLookups FaceT
face Word32
tableTag Word32
featureIndex Word32
variationsIndex Word32
startOffset = IO (Word32, [Word32]) -> m (Word32, [Word32])
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 FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Ptr Word32
lookupCount <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
    Ptr (Ptr Word32)
lookupIndexes <- IO (Ptr (Ptr Word32))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr Word32))
    Word32
result <- Ptr FaceT
-> Word32
-> Word32
-> Word32
-> Word32
-> Ptr Word32
-> Ptr (Ptr Word32)
-> IO Word32
hb_ot_layout_feature_with_variations_get_lookups Ptr FaceT
face' Word32
tableTag Word32
featureIndex Word32
variationsIndex Word32
startOffset Ptr Word32
lookupCount Ptr (Ptr Word32)
lookupIndexes
    Word32
lookupCount' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
lookupCount
    Ptr Word32
lookupIndexes' <- Ptr (Ptr Word32) -> IO (Ptr Word32)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr Word32)
lookupIndexes
    [Word32]
lookupIndexes'' <- (Word32 -> Ptr Word32 -> IO [Word32]
forall a b. (Integral a, Storable b) => a -> Ptr b -> IO [b]
unpackStorableArrayWithLength Word32
lookupCount') Ptr Word32
lookupIndexes'
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
lookupIndexes'
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
lookupCount
    Ptr (Ptr Word32) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Word32)
lookupIndexes
    (Word32, [Word32]) -> IO (Word32, [Word32])
forall (m :: * -> *) a. Monad m => a -> m a
return (Word32
result, [Word32]
lookupIndexes'')


-- function ot_layout_feature_get_name_ids
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#hb_face_t to work upon"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "table_tag"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "table tag to query, \"GSUB\" or \"GPOS\"."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "feature_index"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "index of feature to query."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "label_id"
--           , argType = TBasicType TUInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "The \8216name\8217 table name ID that specifies a string\n           for a user-interface label for this feature. (May be NULL.)"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "tooltip_id"
--           , argType = TBasicType TUInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "The \8216name\8217 table name ID that specifies a string\n             that an application can use for tooltip text for this\n             feature. (May be NULL.)"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "sample_id"
--           , argType = TBasicType TUInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "The \8216name\8217 table name ID that specifies sample text\n            that illustrates the effect of this feature. (May be NULL.)"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "num_named_parameters"
--           , argType = TBasicType TUInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Number of named parameters. (May be zero.)"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "first_param_id"
--           , argType = TBasicType TUInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "The first \8216name\8217 table name ID used to specify\n                 strings for user-interface labels for the feature\n                 parameters. (Must be zero if numParameters is zero.)"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_layout_feature_get_name_ids" hb_ot_layout_feature_get_name_ids :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Word32 ->                               -- table_tag : TBasicType TUInt32
    Word32 ->                               -- feature_index : TBasicType TUInt
    Ptr Word32 ->                           -- label_id : TBasicType TUInt
    Ptr Word32 ->                           -- tooltip_id : TBasicType TUInt
    Ptr Word32 ->                           -- sample_id : TBasicType TUInt
    Ptr Word32 ->                           -- num_named_parameters : TBasicType TUInt
    Ptr Word32 ->                           -- first_param_id : TBasicType TUInt
    IO Int32

-- | Fetches name indices from feature parameters for \"Stylistic Set\" (\'ssXX\') or
-- \"Character Variant\" (\'cvXX\') features.
-- 
-- /Since: 2.0.0/
otLayoutFeatureGetNameIds ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: t'GI.HarfBuzz.Structs.FaceT.FaceT' to work upon
    -> Word32
    -- ^ /@tableTag@/: table tag to query, \"GSUB\" or \"GPOS\".
    -> Word32
    -- ^ /@featureIndex@/: index of feature to query.
    -> m ((Int32, Word32, Word32, Word32, Word32, Word32))
    -- ^ __Returns:__ true if data found, false otherwise
otLayoutFeatureGetNameIds :: FaceT
-> Word32
-> Word32
-> m (Int32, Word32, Word32, Word32, Word32, Word32)
otLayoutFeatureGetNameIds FaceT
face Word32
tableTag Word32
featureIndex = IO (Int32, Word32, Word32, Word32, Word32, Word32)
-> m (Int32, Word32, Word32, Word32, Word32, Word32)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Int32, Word32, Word32, Word32, Word32, Word32)
 -> m (Int32, Word32, Word32, Word32, Word32, Word32))
-> IO (Int32, Word32, Word32, Word32, Word32, Word32)
-> m (Int32, Word32, Word32, Word32, Word32, Word32)
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 Word32
labelId <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
    Ptr Word32
tooltipId <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
    Ptr Word32
sampleId <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
    Ptr Word32
numNamedParameters <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
    Ptr Word32
firstParamId <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
    Int32
result <- Ptr FaceT
-> Word32
-> Word32
-> Ptr Word32
-> Ptr Word32
-> Ptr Word32
-> Ptr Word32
-> Ptr Word32
-> IO Int32
hb_ot_layout_feature_get_name_ids Ptr FaceT
face' Word32
tableTag Word32
featureIndex Ptr Word32
labelId Ptr Word32
tooltipId Ptr Word32
sampleId Ptr Word32
numNamedParameters Ptr Word32
firstParamId
    Word32
labelId' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
labelId
    Word32
tooltipId' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
tooltipId
    Word32
sampleId' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
sampleId
    Word32
numNamedParameters' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
numNamedParameters
    Word32
firstParamId' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
firstParamId
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
labelId
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
tooltipId
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
sampleId
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
numNamedParameters
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
firstParamId
    (Int32, Word32, Word32, Word32, Word32, Word32)
-> IO (Int32, Word32, Word32, Word32, Word32, Word32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
result, Word32
labelId', Word32
tooltipId', Word32
sampleId', Word32
numNamedParameters', Word32
firstParamId')


-- function ot_layout_feature_get_lookups
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#hb_face_t to work upon"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "table_tag"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "HB_OT_TAG_GSUB or HB_OT_TAG_GPOS"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "feature_index"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The index of the requested feature"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "start_offset"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "offset of the first lookup to retrieve"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "lookup_count"
--           , argType = TBasicType TUInt
--           , direction = DirectionOut
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "Input = the maximum number of lookups to return;\n               Output = the actual number of lookups returned (may be zero)"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "lookup_indexes"
--           , argType = TCArray False (-1) 4 (TBasicType TUInt)
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "The array of lookup indexes found for the query"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "lookup_count"
--              , argType = TBasicType TUInt
--              , direction = DirectionOut
--              , mayBeNull = True
--              , argDoc =
--                  Documentation
--                    { rawDocText =
--                        Just
--                          "Input = the maximum number of lookups to return;\n               Output = the actual number of lookups 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 "hb_ot_layout_feature_get_lookups" hb_ot_layout_feature_get_lookups :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Word32 ->                               -- table_tag : TBasicType TUInt32
    Word32 ->                               -- feature_index : TBasicType TUInt
    Word32 ->                               -- start_offset : TBasicType TUInt
    Ptr Word32 ->                           -- lookup_count : TBasicType TUInt
    Ptr (Ptr Word32) ->                     -- lookup_indexes : TCArray False (-1) 4 (TBasicType TUInt)
    IO Word32

-- | Fetches a list of all lookups enumerated for the specified feature, in
-- the specified face\'s GSUB table or GPOS table. The list returned will
-- begin at the offset provided.
-- 
-- /Since: 0.9.7/
otLayoutFeatureGetLookups ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: t'GI.HarfBuzz.Structs.FaceT.FaceT' to work upon
    -> Word32
    -- ^ /@tableTag@/: HB_OT_TAG_GSUB or HB_OT_TAG_GPOS
    -> Word32
    -- ^ /@featureIndex@/: The index of the requested feature
    -> Word32
    -- ^ /@startOffset@/: offset of the first lookup to retrieve
    -> m ((Word32, [Word32]))
otLayoutFeatureGetLookups :: FaceT -> Word32 -> Word32 -> Word32 -> m (Word32, [Word32])
otLayoutFeatureGetLookups FaceT
face Word32
tableTag Word32
featureIndex Word32
startOffset = IO (Word32, [Word32]) -> m (Word32, [Word32])
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 FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Ptr Word32
lookupCount <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
    Ptr (Ptr Word32)
lookupIndexes <- IO (Ptr (Ptr Word32))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr Word32))
    Word32
result <- Ptr FaceT
-> Word32
-> Word32
-> Word32
-> Ptr Word32
-> Ptr (Ptr Word32)
-> IO Word32
hb_ot_layout_feature_get_lookups Ptr FaceT
face' Word32
tableTag Word32
featureIndex Word32
startOffset Ptr Word32
lookupCount Ptr (Ptr Word32)
lookupIndexes
    Word32
lookupCount' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
lookupCount
    Ptr Word32
lookupIndexes' <- Ptr (Ptr Word32) -> IO (Ptr Word32)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr Word32)
lookupIndexes
    [Word32]
lookupIndexes'' <- (Word32 -> Ptr Word32 -> IO [Word32]
forall a b. (Integral a, Storable b) => a -> Ptr b -> IO [b]
unpackStorableArrayWithLength Word32
lookupCount') Ptr Word32
lookupIndexes'
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
lookupIndexes'
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
lookupCount
    Ptr (Ptr Word32) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Word32)
lookupIndexes
    (Word32, [Word32]) -> IO (Word32, [Word32])
forall (m :: * -> *) a. Monad m => a -> m a
return (Word32
result, [Word32]
lookupIndexes'')


-- function ot_layout_feature_get_characters
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#hb_face_t to work upon"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "table_tag"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "table tag to query, \"GSUB\" or \"GPOS\"."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "feature_index"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "index of feature to query."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "start_offset"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "offset of the first character to retrieve"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "char_count"
--           , argType = TBasicType TUInt
--           , direction = DirectionOut
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "Input = the maximum number of characters to return;\n             Output = the actual number of characters returned (may be zero)"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "characters"
--           , argType = TCArray False (-1) 4 (TBasicType TUInt32)
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "A buffer pointer.\n             The Unicode codepoints of the characters for which this feature provides\n              glyph variants."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = True
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "char_count"
--              , argType = TBasicType TUInt
--              , direction = DirectionOut
--              , mayBeNull = True
--              , argDoc =
--                  Documentation
--                    { rawDocText =
--                        Just
--                          "Input = the maximum number of characters to return;\n             Output = the actual number of characters 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 "hb_ot_layout_feature_get_characters" hb_ot_layout_feature_get_characters :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Word32 ->                               -- table_tag : TBasicType TUInt32
    Word32 ->                               -- feature_index : TBasicType TUInt
    Word32 ->                               -- start_offset : TBasicType TUInt
    Word32 ->                               -- char_count : TBasicType TUInt
    Ptr Word32 ->                           -- characters : TCArray False (-1) 4 (TBasicType TUInt32)
    IO Word32

-- | Fetches a list of the characters defined as having a variant under the specified
-- \"Character Variant\" (\"cvXX\") feature tag.
-- 
-- \<note>Note: If the char_count output value is equal to its input value, then there
--       is a chance there were more characters defined under the feature tag than were
--       returned. This function can be called with incrementally larger start_offset
--       until the char_count output value is lower than its input value, or the size
--       of the characters array can be increased.\<\/note>
-- 
-- /Since: 2.0.0/
otLayoutFeatureGetCharacters ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: t'GI.HarfBuzz.Structs.FaceT.FaceT' to work upon
    -> Word32
    -- ^ /@tableTag@/: table tag to query, \"GSUB\" or \"GPOS\".
    -> Word32
    -- ^ /@featureIndex@/: index of feature to query.
    -> Word32
    -- ^ /@startOffset@/: offset of the first character to retrieve
    -> [Word32]
    -- ^ /@characters@/: A buffer pointer.
    --              The Unicode codepoints of the characters for which this feature provides
    --               glyph variants.
    -> m ((Word32, [Word32]))
    -- ^ __Returns:__ Number of total sample characters in the cvXX feature.
otLayoutFeatureGetCharacters :: FaceT
-> Word32 -> Word32 -> Word32 -> [Word32] -> m (Word32, [Word32])
otLayoutFeatureGetCharacters FaceT
face Word32
tableTag Word32
featureIndex Word32
startOffset [Word32]
characters = IO (Word32, [Word32]) -> m (Word32, [Word32])
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
    let charCount :: Word32
charCount = Int -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Word32) -> Int -> Word32
forall a b. (a -> b) -> a -> b
$ [Word32] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [Word32]
characters
    Ptr FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Ptr Word32
characters' <- [Word32] -> IO (Ptr Word32)
forall a. Storable a => [a] -> IO (Ptr a)
packStorableArray [Word32]
characters
    Word32
result <- Ptr FaceT
-> Word32 -> Word32 -> Word32 -> Word32 -> Ptr Word32 -> IO Word32
hb_ot_layout_feature_get_characters Ptr FaceT
face' Word32
tableTag Word32
featureIndex Word32
startOffset Word32
charCount Ptr Word32
characters'
    [Word32]
characters'' <- (Word32 -> Ptr Word32 -> IO [Word32]
forall a b. (Integral a, Storable b) => a -> Ptr b -> IO [b]
unpackStorableArrayWithLength Word32
charCount) Ptr Word32
characters'
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
characters'
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    (Word32, [Word32]) -> IO (Word32, [Word32])
forall (m :: * -> *) a. Monad m => a -> m a
return (Word32
result, [Word32]
characters'')


-- function ot_layout_collect_lookups
-- XXX Could not generate function ot_layout_collect_lookups

-- Not implemented: Don't know how to allocate "lookup_indexes" of type TInterface (Name {namespace = "HarfBuzz", name = "set_t"})

-- function ot_layout_collect_features
-- XXX Could not generate function ot_layout_collect_features

-- Not implemented: Don't know how to allocate "feature_indexes" of type TInterface (Name {namespace = "HarfBuzz", name = "set_t"})

-- function ot_font_set_funcs
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_font_set_funcs" hb_ot_font_set_funcs :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.28/
otFontSetFuncs ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -> m ()
otFontSetFuncs :: FontT -> m ()
otFontSetFuncs FontT
font = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
    Ptr FontT -> IO ()
hb_ot_font_set_funcs Ptr FontT
font'
    FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function ot_color_palette_get_name_id
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#hb_face_t to work upon"
--                 , 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 index of the color palette"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_color_palette_get_name_id" hb_ot_color_palette_get_name_id :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Word32 ->                               -- palette_index : TBasicType TUInt
    IO Word32

-- | Fetches the @name@ table Name ID that provides display names for
-- a @CPAL@ color palette.
-- 
-- Palette display names can be generic (e.g., \"Default\") or provide
-- specific, themed names (e.g., \"Spring\", \"Summer\", \"Fall\", and \"Winter\").
-- 
-- /Since: 2.1.0/
otColorPaletteGetNameId ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: t'GI.HarfBuzz.Structs.FaceT.FaceT' to work upon
    -> Word32
    -- ^ /@paletteIndex@/: The index of the color palette
    -> m Word32
    -- ^ __Returns:__ the Named ID found for the palette.
    -- If the requested palette has no name the result is @/HB_OT_NAME_ID_INVALID/@.
otColorPaletteGetNameId :: FaceT -> Word32 -> m Word32
otColorPaletteGetNameId FaceT
face Word32
paletteIndex = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
    Ptr FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Word32
result <- Ptr FaceT -> Word32 -> IO Word32
hb_ot_color_palette_get_name_id Ptr FaceT
face' Word32
paletteIndex
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result


-- function ot_color_palette_get_flags
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#hb_face_t to work upon"
--                 , 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 index of the color palette"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface
--                  Name
--                    { namespace = "HarfBuzz" , name = "ot_color_palette_flags_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_color_palette_get_flags" hb_ot_color_palette_get_flags :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Word32 ->                               -- palette_index : TBasicType TUInt
    IO CUInt

-- | Fetches the flags defined for a color palette.
-- 
-- /Since: 2.1.0/
otColorPaletteGetFlags ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: t'GI.HarfBuzz.Structs.FaceT.FaceT' to work upon
    -> Word32
    -- ^ /@paletteIndex@/: The index of the color palette
    -> m [HarfBuzz.Flags.OtColorPaletteFlagsT]
    -- ^ __Returns:__ the t'GI.HarfBuzz.Flags.OtColorPaletteFlagsT' of the requested color palette
otColorPaletteGetFlags :: FaceT -> Word32 -> m [OtColorPaletteFlagsT]
otColorPaletteGetFlags FaceT
face Word32
paletteIndex = IO [OtColorPaletteFlagsT] -> m [OtColorPaletteFlagsT]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [OtColorPaletteFlagsT] -> m [OtColorPaletteFlagsT])
-> IO [OtColorPaletteFlagsT] -> m [OtColorPaletteFlagsT]
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
    CUInt
result <- Ptr FaceT -> Word32 -> IO CUInt
hb_ot_color_palette_get_flags Ptr FaceT
face' Word32
paletteIndex
    let result' :: [OtColorPaletteFlagsT]
result' = CUInt -> [OtColorPaletteFlagsT]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
result
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    [OtColorPaletteFlagsT] -> IO [OtColorPaletteFlagsT]
forall (m :: * -> *) a. Monad m => a -> m a
return [OtColorPaletteFlagsT]
result'


-- function ot_color_palette_get_count
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#hb_face_t to work upon"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_color_palette_get_count" hb_ot_color_palette_get_count :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    IO Word32

-- | Fetches the number of color palettes in a face.
-- 
-- /Since: 2.1.0/
otColorPaletteGetCount ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: t'GI.HarfBuzz.Structs.FaceT.FaceT' to work upon
    -> m Word32
    -- ^ __Returns:__ the number of palettes found
otColorPaletteGetCount :: FaceT -> m Word32
otColorPaletteGetCount FaceT
face = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
    Ptr FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Word32
result <- Ptr FaceT -> IO Word32
hb_ot_color_palette_get_count Ptr FaceT
face'
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result


-- function ot_color_palette_get_colors
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#hb_face_t to work upon"
--                 , 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 index of the color palette to query"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "start_offset"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "offset of the first color to retrieve"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "color_count"
--           , argType = TBasicType TUInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "Input = the maximum number of colors to return;\n              Output = the actual number of colors returned (may be zero)"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "colors"
--           , argType = TCArray False (-1) 3 (TBasicType TUInt32)
--           , direction = DirectionOut
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The array of #hb_color_t records found"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "color_count"
--              , argType = TBasicType TUInt
--              , direction = DirectionOut
--              , mayBeNull = False
--              , argDoc =
--                  Documentation
--                    { rawDocText =
--                        Just
--                          "Input = the maximum number of colors to return;\n              Output = the actual number of colors 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 "hb_ot_color_palette_get_colors" hb_ot_color_palette_get_colors :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Word32 ->                               -- palette_index : TBasicType TUInt
    Word32 ->                               -- start_offset : TBasicType TUInt
    Ptr Word32 ->                           -- color_count : TBasicType TUInt
    Ptr (Ptr Word32) ->                     -- colors : TCArray False (-1) 3 (TBasicType TUInt32)
    IO Word32

-- | Fetches a list of the colors in a color palette.
-- 
-- After calling this function, /@colors@/ will be filled with the palette
-- colors. If /@colors@/ is NULL, the function will just return the number
-- of total colors without storing any actual colors; this can be used
-- for allocating a buffer of suitable size before calling
-- 'GI.HarfBuzz.Functions.otColorPaletteGetColors' a second time.
-- 
-- /Since: 2.1.0/
otColorPaletteGetColors ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: t'GI.HarfBuzz.Structs.FaceT.FaceT' to work upon
    -> Word32
    -- ^ /@paletteIndex@/: the index of the color palette to query
    -> Word32
    -- ^ /@startOffset@/: offset of the first color to retrieve
    -> m ((Word32, Maybe [Word32]))
    -- ^ __Returns:__ the total number of colors in the palette
otColorPaletteGetColors :: FaceT -> Word32 -> Word32 -> m (Word32, Maybe [Word32])
otColorPaletteGetColors FaceT
face Word32
paletteIndex Word32
startOffset = IO (Word32, Maybe [Word32]) -> m (Word32, Maybe [Word32])
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Word32, Maybe [Word32]) -> m (Word32, Maybe [Word32]))
-> IO (Word32, Maybe [Word32]) -> m (Word32, Maybe [Word32])
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 Word32
colorCount <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
    Ptr (Ptr Word32)
colors <- IO (Ptr (Ptr Word32))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr Word32))
    Word32
result <- Ptr FaceT
-> Word32 -> Word32 -> Ptr Word32 -> Ptr (Ptr Word32) -> IO Word32
hb_ot_color_palette_get_colors Ptr FaceT
face' Word32
paletteIndex Word32
startOffset Ptr Word32
colorCount Ptr (Ptr Word32)
colors
    Word32
colorCount' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
colorCount
    Ptr Word32
colors' <- Ptr (Ptr Word32) -> IO (Ptr Word32)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr Word32)
colors
    Maybe [Word32]
maybeColors' <- Ptr Word32 -> (Ptr Word32 -> IO [Word32]) -> IO (Maybe [Word32])
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Word32
colors' ((Ptr Word32 -> IO [Word32]) -> IO (Maybe [Word32]))
-> (Ptr Word32 -> IO [Word32]) -> IO (Maybe [Word32])
forall a b. (a -> b) -> a -> b
$ \Ptr Word32
colors'' -> do
        [Word32]
colors''' <- (Word32 -> Ptr Word32 -> IO [Word32]
forall a b. (Integral a, Storable b) => a -> Ptr b -> IO [b]
unpackStorableArrayWithLength Word32
colorCount') Ptr Word32
colors''
        Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
colors''
        [Word32] -> IO [Word32]
forall (m :: * -> *) a. Monad m => a -> m a
return [Word32]
colors'''
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
colorCount
    Ptr (Ptr Word32) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Word32)
colors
    (Word32, Maybe [Word32]) -> IO (Word32, Maybe [Word32])
forall (m :: * -> *) a. Monad m => a -> m a
return (Word32
result, Maybe [Word32]
maybeColors')


-- function ot_color_palette_color_get_name_id
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#hb_face_t to work upon"
--                 , 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 index of the color"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_color_palette_color_get_name_id" hb_ot_color_palette_color_get_name_id :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Word32 ->                               -- color_index : TBasicType TUInt
    IO Word32

-- | Fetches the @name@ table Name ID that provides display names for
-- the specificed color in a face\'s @CPAL@ color palette.
-- 
-- Display names can be generic (e.g., \"Background\") or specific
-- (e.g., \"Eye color\").
-- 
-- /Since: 2.1.0/
otColorPaletteColorGetNameId ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: t'GI.HarfBuzz.Structs.FaceT.FaceT' to work upon
    -> Word32
    -- ^ /@colorIndex@/: The index of the color
    -> m Word32
    -- ^ __Returns:__ the Name ID found for the color.
otColorPaletteColorGetNameId :: FaceT -> Word32 -> m Word32
otColorPaletteColorGetNameId FaceT
face Word32
colorIndex = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
    Ptr FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Word32
result <- Ptr FaceT -> Word32 -> IO Word32
hb_ot_color_palette_color_get_name_id Ptr FaceT
face' Word32
colorIndex
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result


-- function ot_color_has_svg
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#hb_face_t to work upon."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_color_has_svg" hb_ot_color_has_svg :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    IO Int32

-- | Tests whether a face includes any @SVG@ glyph images.
-- 
-- /Since: 2.1.0/
otColorHasSvg ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: t'GI.HarfBuzz.Structs.FaceT.FaceT' to work upon.
    -> m Int32
    -- ^ __Returns:__ true if data found, false otherwise.
otColorHasSvg :: FaceT -> m Int32
otColorHasSvg FaceT
face = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Int32
result <- Ptr FaceT -> IO Int32
hb_ot_color_has_svg Ptr FaceT
face'
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function ot_color_has_png
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#hb_face_t to work upon"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_color_has_png" hb_ot_color_has_png :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    IO Int32

-- | Tests whether a face has PNG glyph images (either in @CBDT@ or @sbix@ tables).
-- 
-- /Since: 2.1.0/
otColorHasPng ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: t'GI.HarfBuzz.Structs.FaceT.FaceT' to work upon
    -> m Int32
    -- ^ __Returns:__ true if data found, false otherwise
otColorHasPng :: FaceT -> m Int32
otColorHasPng FaceT
face = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Int32
result <- Ptr FaceT -> IO Int32
hb_ot_color_has_png Ptr FaceT
face'
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function ot_color_has_palettes
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#hb_face_t to work upon"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_color_has_palettes" hb_ot_color_has_palettes :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    IO Int32

-- | Tests whether a face includes a @CPAL@ color-palette table.
-- 
-- /Since: 2.1.0/
otColorHasPalettes ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: t'GI.HarfBuzz.Structs.FaceT.FaceT' to work upon
    -> m Int32
    -- ^ __Returns:__ true if data found, false otherwise
otColorHasPalettes :: FaceT -> m Int32
otColorHasPalettes FaceT
face = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Int32
result <- Ptr FaceT -> IO Int32
hb_ot_color_has_palettes Ptr FaceT
face'
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function ot_color_has_layers
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#hb_face_t to work upon"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_color_has_layers" hb_ot_color_has_layers :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    IO Int32

-- | Tests whether a face includes any @COLR@ color layers.
-- 
-- /Since: 2.1.0/
otColorHasLayers ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: t'GI.HarfBuzz.Structs.FaceT.FaceT' to work upon
    -> m Int32
    -- ^ __Returns:__ true if data found, false otherwise
otColorHasLayers :: FaceT -> m Int32
otColorHasLayers FaceT
face = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Int32
result <- Ptr FaceT -> IO Int32
hb_ot_color_has_layers Ptr FaceT
face'
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function ot_color_glyph_reference_svg
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#hb_face_t to work upon"
--                 , 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 "a svg glyph index" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "HarfBuzz" , name = "blob_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_color_glyph_reference_svg" hb_ot_color_glyph_reference_svg :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Word32 ->                               -- glyph : TBasicType TUInt32
    IO (Ptr HarfBuzz.BlobT.BlobT)

-- | Fetches the SVG document for a glyph. The blob may be either plain text or gzip-encoded.
-- 
-- /Since: 2.1.0/
otColorGlyphReferenceSvg ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: t'GI.HarfBuzz.Structs.FaceT.FaceT' to work upon
    -> Word32
    -- ^ /@glyph@/: a svg glyph index
    -> m HarfBuzz.BlobT.BlobT
    -- ^ __Returns:__ An t'GI.HarfBuzz.Structs.BlobT.BlobT' containing the SVG document of the glyph, if available
otColorGlyphReferenceSvg :: FaceT -> Word32 -> m BlobT
otColorGlyphReferenceSvg FaceT
face Word32
glyph = IO BlobT -> m BlobT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO BlobT -> m BlobT) -> IO BlobT -> m BlobT
forall a b. (a -> b) -> a -> b
$ do
    Ptr FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Ptr BlobT
result <- Ptr FaceT -> Word32 -> IO (Ptr BlobT)
hb_ot_color_glyph_reference_svg Ptr FaceT
face' Word32
glyph
    Text -> Ptr BlobT -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"otColorGlyphReferenceSvg" Ptr BlobT
result
    BlobT
result' <- ((ManagedPtr BlobT -> BlobT) -> Ptr BlobT -> IO BlobT
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr BlobT -> BlobT
HarfBuzz.BlobT.BlobT) Ptr BlobT
result
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    BlobT -> IO BlobT
forall (m :: * -> *) a. Monad m => a -> m a
return BlobT
result'


-- function ot_color_glyph_reference_png
-- 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 = "glyph"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a glyph index" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "HarfBuzz" , name = "blob_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_ot_color_glyph_reference_png" hb_ot_color_glyph_reference_png :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    Word32 ->                               -- glyph : TBasicType TUInt32
    IO (Ptr HarfBuzz.BlobT.BlobT)

-- | Fetches the PNG image for a glyph. This function takes a font object, not a face object,
-- as input. To get an optimally sized PNG blob, the UPEM value must be set on the /@font@/
-- object. If UPEM is unset, the blob returned will be the largest PNG available.
-- 
-- /Since: 2.1.0/
otColorGlyphReferencePng ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: t'GI.HarfBuzz.Structs.FontT.FontT' to work upon
    -> Word32
    -- ^ /@glyph@/: a glyph index
    -> m HarfBuzz.BlobT.BlobT
    -- ^ __Returns:__ An t'GI.HarfBuzz.Structs.BlobT.BlobT' containing the PNG image for the glyph, if available
otColorGlyphReferencePng :: FontT -> Word32 -> m BlobT
otColorGlyphReferencePng FontT
font Word32
glyph = IO BlobT -> m BlobT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO BlobT -> m BlobT) -> IO BlobT -> m BlobT
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
    Ptr BlobT
result <- Ptr FontT -> Word32 -> IO (Ptr BlobT)
hb_ot_color_glyph_reference_png Ptr FontT
font' Word32
glyph
    Text -> Ptr BlobT -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"otColorGlyphReferencePng" 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
    FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
    BlobT -> IO BlobT
forall (m :: * -> *) a. Monad m => a -> m a
return BlobT
result'


-- function ot_color_glyph_get_layers
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#hb_face_t to work upon"
--                 , 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 index to query"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "start_offset"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "offset of the first layer to retrieve"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "layer_count"
--           , argType = TBasicType TUInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "Input = the maximum number of layers to return;\n        Output = the actual number of layers returned (may be zero)"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "layers"
--           , argType =
--               TCArray
--                 False
--                 (-1)
--                 3
--                 (TInterface
--                    Name { namespace = "HarfBuzz" , name = "ot_color_layer_t" })
--           , direction = DirectionOut
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The array of layers found"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = True
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "layer_count"
--              , argType = TBasicType TUInt
--              , direction = DirectionOut
--              , mayBeNull = False
--              , argDoc =
--                  Documentation
--                    { rawDocText =
--                        Just
--                          "Input = the maximum number of layers to return;\n        Output = the actual number of layers 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 "hb_ot_color_glyph_get_layers" hb_ot_color_glyph_get_layers :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Word32 ->                               -- glyph : TBasicType TUInt32
    Word32 ->                               -- start_offset : TBasicType TUInt
    Word32 ->                               -- layer_count : TBasicType TUInt
    Ptr HarfBuzz.OtColorLayerT.OtColorLayerT -> -- layers : TCArray False (-1) 3 (TInterface (Name {namespace = "HarfBuzz", name = "ot_color_layer_t"}))
    IO Word32

-- | Fetches a list of all color layers for the specified glyph index in the specified
-- face. The list returned will begin at the offset provided.
-- 
-- /Since: 2.1.0/
otColorGlyphGetLayers ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: t'GI.HarfBuzz.Structs.FaceT.FaceT' to work upon
    -> Word32
    -- ^ /@glyph@/: The glyph index to query
    -> Word32
    -- ^ /@startOffset@/: offset of the first layer to retrieve
    -> Maybe ([HarfBuzz.OtColorLayerT.OtColorLayerT])
    -- ^ /@layers@/: The array of layers found
    -> m ((Word32, Maybe [HarfBuzz.OtColorLayerT.OtColorLayerT]))
    -- ^ __Returns:__ Total number of layers available for the glyph index queried
otColorGlyphGetLayers :: FaceT
-> Word32
-> Word32
-> Maybe [OtColorLayerT]
-> m (Word32, Maybe [OtColorLayerT])
otColorGlyphGetLayers FaceT
face Word32
glyph Word32
startOffset Maybe [OtColorLayerT]
layers = IO (Word32, Maybe [OtColorLayerT])
-> m (Word32, Maybe [OtColorLayerT])
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Word32, Maybe [OtColorLayerT])
 -> m (Word32, Maybe [OtColorLayerT]))
-> IO (Word32, Maybe [OtColorLayerT])
-> m (Word32, Maybe [OtColorLayerT])
forall a b. (a -> b) -> a -> b
$ do
    let layerCount :: Word32
layerCount = case Maybe [OtColorLayerT]
layers of
            Maybe [OtColorLayerT]
Nothing -> Word32
0
            Just [OtColorLayerT]
jLayers -> Int -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Word32) -> Int -> Word32
forall a b. (a -> b) -> a -> b
$ [OtColorLayerT] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [OtColorLayerT]
jLayers
    Ptr FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Ptr OtColorLayerT
maybeLayers <- case Maybe [OtColorLayerT]
layers of
        Maybe [OtColorLayerT]
Nothing -> Ptr OtColorLayerT -> IO (Ptr OtColorLayerT)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr OtColorLayerT
forall a. Ptr a
nullPtr
        Just [OtColorLayerT]
jLayers -> do
            [Ptr OtColorLayerT]
jLayers' <- (OtColorLayerT -> IO (Ptr OtColorLayerT))
-> [OtColorLayerT] -> IO [Ptr OtColorLayerT]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM OtColorLayerT -> IO (Ptr OtColorLayerT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr [OtColorLayerT]
jLayers
            Ptr OtColorLayerT
jLayers'' <- Int -> [Ptr OtColorLayerT] -> IO (Ptr OtColorLayerT)
forall a. Int -> [Ptr a] -> IO (Ptr a)
packBlockArray Int
8 [Ptr OtColorLayerT]
jLayers'
            Ptr OtColorLayerT -> IO (Ptr OtColorLayerT)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr OtColorLayerT
jLayers''
    Word32
result <- Ptr FaceT
-> Word32 -> Word32 -> Word32 -> Ptr OtColorLayerT -> IO Word32
hb_ot_color_glyph_get_layers Ptr FaceT
face' Word32
glyph Word32
startOffset Word32
layerCount Ptr OtColorLayerT
maybeLayers
    Maybe [OtColorLayerT]
maybeMaybeLayers <- Ptr OtColorLayerT
-> (Ptr OtColorLayerT -> IO [OtColorLayerT])
-> IO (Maybe [OtColorLayerT])
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr OtColorLayerT
maybeLayers ((Ptr OtColorLayerT -> IO [OtColorLayerT])
 -> IO (Maybe [OtColorLayerT]))
-> (Ptr OtColorLayerT -> IO [OtColorLayerT])
-> IO (Maybe [OtColorLayerT])
forall a b. (a -> b) -> a -> b
$ \Ptr OtColorLayerT
maybeLayers' -> do
        [Ptr OtColorLayerT]
maybeLayers'' <- (Int -> Word32 -> Ptr OtColorLayerT -> IO [Ptr OtColorLayerT]
forall a b. Integral a => Int -> a -> Ptr b -> IO [Ptr b]
unpackBlockArrayWithLength Int
8 Word32
layerCount) Ptr OtColorLayerT
maybeLayers'
        [OtColorLayerT]
maybeLayers''' <- (Ptr OtColorLayerT -> IO OtColorLayerT)
-> [Ptr OtColorLayerT] -> IO [OtColorLayerT]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((ManagedPtr OtColorLayerT -> OtColorLayerT)
-> Ptr OtColorLayerT -> IO OtColorLayerT
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapPtr ManagedPtr OtColorLayerT -> OtColorLayerT
HarfBuzz.OtColorLayerT.OtColorLayerT) [Ptr OtColorLayerT]
maybeLayers''
        Ptr OtColorLayerT -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr OtColorLayerT
maybeLayers'
        [OtColorLayerT] -> IO [OtColorLayerT]
forall (m :: * -> *) a. Monad m => a -> m a
return [OtColorLayerT]
maybeLayers'''
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    Maybe [OtColorLayerT] -> ([OtColorLayerT] -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe [OtColorLayerT]
layers ((OtColorLayerT -> IO ()) -> [OtColorLayerT] -> IO ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ OtColorLayerT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr)
    (Word32, Maybe [OtColorLayerT])
-> IO (Word32, Maybe [OtColorLayerT])
forall (m :: * -> *) a. Monad m => a -> m a
return (Word32
result, Maybe [OtColorLayerT]
maybeMaybeLayers)


-- function map_set
-- Args: [ Arg
--           { argCName = "map"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "map_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a map." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "key"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "value"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_map_set" hb_map_set :: 
    Ptr HarfBuzz.MapT.MapT ->               -- map : TInterface (Name {namespace = "HarfBuzz", name = "map_t"})
    Word32 ->                               -- key : TBasicType TUInt32
    Word32 ->                               -- value : TBasicType TUInt32
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 1.7.7/
mapSet ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.MapT.MapT
    -- ^ /@map@/: a map.
    -> Word32
    -> Word32
    -> m ()
mapSet :: MapT -> Word32 -> Word32 -> m ()
mapSet MapT
map_ Word32
key Word32
value = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr MapT
map_' <- MapT -> IO (Ptr MapT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr MapT
map_
    Ptr MapT -> Word32 -> Word32 -> IO ()
hb_map_set Ptr MapT
map_' Word32
key Word32
value
    MapT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr MapT
map_
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function map_is_empty
-- Args: [ Arg
--           { argCName = "map"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "map_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a map." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_map_is_empty" hb_map_is_empty :: 
    Ptr HarfBuzz.MapT.MapT ->               -- map : TInterface (Name {namespace = "HarfBuzz", name = "map_t"})
    IO Int32

-- | /No description available in the introspection data./
-- 
-- /Since: 1.7.7/
mapIsEmpty ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.MapT.MapT
    -- ^ /@map@/: a map.
    -> m Int32
mapIsEmpty :: MapT -> m Int32
mapIsEmpty MapT
map_ = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr MapT
map_' <- MapT -> IO (Ptr MapT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr MapT
map_
    Int32
result <- Ptr MapT -> IO Int32
hb_map_is_empty Ptr MapT
map_'
    MapT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr MapT
map_
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function map_has
-- Args: [ Arg
--           { argCName = "map"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "map_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a map." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "key"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_map_has" hb_map_has :: 
    Ptr HarfBuzz.MapT.MapT ->               -- map : TInterface (Name {namespace = "HarfBuzz", name = "map_t"})
    Word32 ->                               -- key : TBasicType TUInt32
    IO Int32

-- | /No description available in the introspection data./
-- 
-- /Since: 1.7.7/
mapHas ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.MapT.MapT
    -- ^ /@map@/: a map.
    -> Word32
    -> m Int32
mapHas :: MapT -> Word32 -> m Int32
mapHas MapT
map_ Word32
key = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr MapT
map_' <- MapT -> IO (Ptr MapT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr MapT
map_
    Int32
result <- Ptr MapT -> Word32 -> IO Int32
hb_map_has Ptr MapT
map_' Word32
key
    MapT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr MapT
map_
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function map_get_population
-- Args: [ Arg
--           { argCName = "map"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "map_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a map." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_map_get_population" hb_map_get_population :: 
    Ptr HarfBuzz.MapT.MapT ->               -- map : TInterface (Name {namespace = "HarfBuzz", name = "map_t"})
    IO Word32

-- | /No description available in the introspection data./
-- 
-- /Since: 1.7.7/
mapGetPopulation ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.MapT.MapT
    -- ^ /@map@/: a map.
    -> m Word32
mapGetPopulation :: MapT -> m Word32
mapGetPopulation MapT
map_ = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
    Ptr MapT
map_' <- MapT -> IO (Ptr MapT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr MapT
map_
    Word32
result <- Ptr MapT -> IO Word32
hb_map_get_population Ptr MapT
map_'
    MapT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr MapT
map_
    Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result


-- function map_get_empty
-- Args: []
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "HarfBuzz" , name = "map_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_map_get_empty" hb_map_get_empty :: 
    IO (Ptr HarfBuzz.MapT.MapT)

-- | /No description available in the introspection data./
-- 
-- /Since: 1.7.7/
mapGetEmpty ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m HarfBuzz.MapT.MapT
mapGetEmpty :: m MapT
mapGetEmpty  = IO MapT -> m MapT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO MapT -> m MapT) -> IO MapT -> m MapT
forall a b. (a -> b) -> a -> b
$ do
    Ptr MapT
result <- IO (Ptr MapT)
hb_map_get_empty
    Text -> Ptr MapT -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"mapGetEmpty" Ptr MapT
result
    MapT
result' <- ((ManagedPtr MapT -> MapT) -> Ptr MapT -> IO MapT
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr MapT -> MapT
HarfBuzz.MapT.MapT) Ptr MapT
result
    MapT -> IO MapT
forall (m :: * -> *) a. Monad m => a -> m a
return MapT
result'


-- function map_get
-- Args: [ Arg
--           { argCName = "map"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "map_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a map." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "key"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt32)
-- throws : False
-- Skip return : False

foreign import ccall "hb_map_get" hb_map_get :: 
    Ptr HarfBuzz.MapT.MapT ->               -- map : TInterface (Name {namespace = "HarfBuzz", name = "map_t"})
    Word32 ->                               -- key : TBasicType TUInt32
    IO Word32

-- | /No description available in the introspection data./
-- 
-- /Since: 1.7.7/
mapGet ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.MapT.MapT
    -- ^ /@map@/: a map.
    -> Word32
    -> m Word32
mapGet :: MapT -> Word32 -> m Word32
mapGet MapT
map_ Word32
key = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
    Ptr MapT
map_' <- MapT -> IO (Ptr MapT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr MapT
map_
    Word32
result <- Ptr MapT -> Word32 -> IO Word32
hb_map_get Ptr MapT
map_' Word32
key
    MapT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr MapT
map_
    Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result


-- function map_del
-- Args: [ Arg
--           { argCName = "map"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "map_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a map." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "key"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_map_del" hb_map_del :: 
    Ptr HarfBuzz.MapT.MapT ->               -- map : TInterface (Name {namespace = "HarfBuzz", name = "map_t"})
    Word32 ->                               -- key : TBasicType TUInt32
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 1.7.7/
mapDel ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.MapT.MapT
    -- ^ /@map@/: a map.
    -> Word32
    -> m ()
mapDel :: MapT -> Word32 -> m ()
mapDel MapT
map_ Word32
key = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr MapT
map_' <- MapT -> IO (Ptr MapT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr MapT
map_
    Ptr MapT -> Word32 -> IO ()
hb_map_del Ptr MapT
map_' Word32
key
    MapT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr MapT
map_
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function map_create
-- Args: []
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "HarfBuzz" , name = "map_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_map_create" hb_map_create :: 
    IO (Ptr HarfBuzz.MapT.MapT)

-- | /No description available in the introspection data./
-- 
-- /Since: 1.7.7/
mapCreate ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m HarfBuzz.MapT.MapT
mapCreate :: m MapT
mapCreate  = IO MapT -> m MapT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO MapT -> m MapT) -> IO MapT -> m MapT
forall a b. (a -> b) -> a -> b
$ do
    Ptr MapT
result <- IO (Ptr MapT)
hb_map_create
    Text -> Ptr MapT -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"mapCreate" Ptr MapT
result
    MapT
result' <- ((ManagedPtr MapT -> MapT) -> Ptr MapT -> IO MapT
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr MapT -> MapT
HarfBuzz.MapT.MapT) Ptr MapT
result
    MapT -> IO MapT
forall (m :: * -> *) a. Monad m => a -> m a
return MapT
result'


-- function map_clear
-- Args: [ Arg
--           { argCName = "map"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "map_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a map." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_map_clear" hb_map_clear :: 
    Ptr HarfBuzz.MapT.MapT ->               -- map : TInterface (Name {namespace = "HarfBuzz", name = "map_t"})
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 1.7.7/
mapClear ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.MapT.MapT
    -- ^ /@map@/: a map.
    -> m ()
mapClear :: MapT -> m ()
mapClear MapT
map_ = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr MapT
map_' <- MapT -> IO (Ptr MapT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr MapT
map_
    Ptr MapT -> IO ()
hb_map_clear Ptr MapT
map_'
    MapT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr MapT
map_
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function map_allocation_successful
-- Args: [ Arg
--           { argCName = "map"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "map_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a map." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_map_allocation_successful" hb_map_allocation_successful :: 
    Ptr HarfBuzz.MapT.MapT ->               -- map : TInterface (Name {namespace = "HarfBuzz", name = "map_t"})
    IO Int32

-- | /No description available in the introspection data./
-- 
-- /Since: 1.7.7/
mapAllocationSuccessful ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.MapT.MapT
    -- ^ /@map@/: a map.
    -> m Int32
mapAllocationSuccessful :: MapT -> m Int32
mapAllocationSuccessful MapT
map_ = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr MapT
map_' <- MapT -> IO (Ptr MapT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr MapT
map_
    Int32
result <- Ptr MapT -> IO Int32
hb_map_allocation_successful Ptr MapT
map_'
    MapT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr MapT
map_
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function language_to_string
-- Args: [ Arg
--           { argCName = "language"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "language_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #hb_language_t to convert."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "hb_language_to_string" hb_language_to_string :: 
    Ptr HarfBuzz.LanguageT.LanguageT ->     -- language : TInterface (Name {namespace = "HarfBuzz", name = "language_t"})
    IO CString

-- | See 'GI.HarfBuzz.Functions.languageFromString'.
-- 
-- /Since: 0.9.2/
languageToString ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.LanguageT.LanguageT
    -- ^ /@language@/: an t'GI.HarfBuzz.Structs.LanguageT.LanguageT' to convert.
    -> m T.Text
    -- ^ __Returns:__ 
    -- A 'P.Nothing'-terminated string representing the /@language@/. Must not be freed by
    -- the caller.
languageToString :: LanguageT -> m Text
languageToString LanguageT
language = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
    Ptr LanguageT
language' <- LanguageT -> IO (Ptr LanguageT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr LanguageT
language
    CString
result <- Ptr LanguageT -> IO CString
hb_language_to_string Ptr LanguageT
language'
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"languageToString" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    LanguageT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr LanguageT
language
    Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'


-- function language_get_default
-- Args: []
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "HarfBuzz" , name = "language_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_language_get_default" hb_language_get_default :: 
    IO (Ptr HarfBuzz.LanguageT.LanguageT)

-- | Get default language from current locale.
-- 
-- Note that the first time this function is called, it calls
-- \"setlocale (LC_CTYPE, nullptr)\" to fetch current locale.  The underlying
-- setlocale function is, in many implementations, NOT threadsafe.  To avoid
-- problems, call this function once before multiple threads can call it.
-- This function is only used from 'GI.HarfBuzz.Functions.bufferGuessSegmentProperties' by
-- HarfBuzz itself.
-- 
-- /Since: 0.9.2/
languageGetDefault ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m HarfBuzz.LanguageT.LanguageT
languageGetDefault :: m LanguageT
languageGetDefault  = IO LanguageT -> m LanguageT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO LanguageT -> m LanguageT) -> IO LanguageT -> m LanguageT
forall a b. (a -> b) -> a -> b
$ do
    Ptr LanguageT
result <- IO (Ptr LanguageT)
hb_language_get_default
    Text -> Ptr LanguageT -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"languageGetDefault" Ptr LanguageT
result
    LanguageT
result' <- ((ManagedPtr LanguageT -> LanguageT)
-> Ptr LanguageT -> IO LanguageT
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr LanguageT -> LanguageT
HarfBuzz.LanguageT.LanguageT) Ptr LanguageT
result
    LanguageT -> IO LanguageT
forall (m :: * -> *) a. Monad m => a -> m a
return LanguageT
result'


-- function language_from_string
-- Args: [ Arg
--           { argCName = "str"
--           , argType = TCArray False (-1) 1 (TBasicType TUInt8)
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "a string representing\n      a BCP\160\&47 language tag"
--                 , 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 "length of the @str, or -1 if it is %NULL-terminated."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "len"
--              , argType = TBasicType TInt
--              , direction = DirectionIn
--              , mayBeNull = False
--              , argDoc =
--                  Documentation
--                    { rawDocText =
--                        Just "length of the @str, or -1 if it is %NULL-terminated."
--                    , sinceVersion = Nothing
--                    }
--              , argScope = ScopeTypeInvalid
--              , argClosure = -1
--              , argDestroy = -1
--              , argCallerAllocates = False
--              , transfer = TransferNothing
--              }
--          ]
-- returnType: Just
--               (TInterface Name { namespace = "HarfBuzz" , name = "language_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_language_from_string" hb_language_from_string :: 
    Ptr Word8 ->                            -- str : TCArray False (-1) 1 (TBasicType TUInt8)
    Int32 ->                                -- len : TBasicType TInt
    IO (Ptr HarfBuzz.LanguageT.LanguageT)

-- | Converts /@str@/ representing a BCP 47 language tag to the corresponding
-- t'GI.HarfBuzz.Structs.LanguageT.LanguageT'.
-- 
-- /Since: 0.9.2/
languageFromString ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    ByteString
    -- ^ /@str@/: a string representing
    --       a BCP 47 language tag
    -> m HarfBuzz.LanguageT.LanguageT
    -- ^ __Returns:__ 
    -- The t'GI.HarfBuzz.Structs.LanguageT.LanguageT' corresponding to the BCP 47 language tag.
languageFromString :: ByteString -> m LanguageT
languageFromString ByteString
str = IO LanguageT -> m LanguageT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO LanguageT -> m LanguageT) -> IO LanguageT -> m LanguageT
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
$ ByteString -> Int
B.length ByteString
str
    Ptr Word8
str' <- ByteString -> IO (Ptr Word8)
packByteString ByteString
str
    Ptr LanguageT
result <- Ptr Word8 -> Int32 -> IO (Ptr LanguageT)
hb_language_from_string Ptr Word8
str' Int32
len
    Text -> Ptr LanguageT -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"languageFromString" Ptr LanguageT
result
    LanguageT
result' <- ((ManagedPtr LanguageT -> LanguageT)
-> Ptr LanguageT -> IO LanguageT
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr LanguageT -> LanguageT
HarfBuzz.LanguageT.LanguageT) Ptr LanguageT
result
    Ptr Word8 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word8
str'
    LanguageT -> IO LanguageT
forall (m :: * -> *) a. Monad m => a -> m a
return LanguageT
result'


-- function glyph_info_get_glyph_flags
-- Args: [ Arg
--           { argCName = "info"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "glyph_info_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #hb_glyph_info_t."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface
--                  Name { namespace = "HarfBuzz" , name = "glyph_flags_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_glyph_info_get_glyph_flags" hb_glyph_info_get_glyph_flags :: 
    Ptr HarfBuzz.GlyphInfoT.GlyphInfoT ->   -- info : TInterface (Name {namespace = "HarfBuzz", name = "glyph_info_t"})
    IO CUInt

-- | Returns glyph flags encoded within a t'GI.HarfBuzz.Structs.GlyphInfoT.GlyphInfoT'.
-- 
-- /Since: 1.5.0/
glyphInfoGetGlyphFlags ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.GlyphInfoT.GlyphInfoT
    -- ^ /@info@/: a t'GI.HarfBuzz.Structs.GlyphInfoT.GlyphInfoT'.
    -> m [HarfBuzz.Flags.GlyphFlagsT]
    -- ^ __Returns:__ The t'GI.HarfBuzz.Flags.GlyphFlagsT' encoded within /@info@/.
glyphInfoGetGlyphFlags :: GlyphInfoT -> m [GlyphFlagsT]
glyphInfoGetGlyphFlags GlyphInfoT
info = IO [GlyphFlagsT] -> m [GlyphFlagsT]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [GlyphFlagsT] -> m [GlyphFlagsT])
-> IO [GlyphFlagsT] -> m [GlyphFlagsT]
forall a b. (a -> b) -> a -> b
$ do
    Ptr GlyphInfoT
info' <- GlyphInfoT -> IO (Ptr GlyphInfoT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GlyphInfoT
info
    CUInt
result <- Ptr GlyphInfoT -> IO CUInt
hb_glyph_info_get_glyph_flags Ptr GlyphInfoT
info'
    let result' :: [GlyphFlagsT]
result' = CUInt -> [GlyphFlagsT]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
result
    GlyphInfoT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GlyphInfoT
info
    [GlyphFlagsT] -> IO [GlyphFlagsT]
forall (m :: * -> *) a. Monad m => a -> m a
return [GlyphFlagsT]
result'


-- function glib_script_to_script
-- Args: [ Arg
--           { argCName = "script"
--           , argType =
--               TInterface Name { namespace = "GLib" , name = "UnicodeScript" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "HarfBuzz" , name = "script_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_glib_script_to_script" hb_glib_script_to_script :: 
    CInt ->                                 -- script : TInterface (Name {namespace = "GLib", name = "UnicodeScript"})
    IO CUInt

-- | /No description available in the introspection data./
glibScriptToScript ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GLib.Enums.UnicodeScript
    -> m HarfBuzz.Enums.ScriptT
glibScriptToScript :: UnicodeScript -> m ScriptT
glibScriptToScript UnicodeScript
script = IO ScriptT -> m ScriptT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ScriptT -> m ScriptT) -> IO ScriptT -> m ScriptT
forall a b. (a -> b) -> a -> b
$ do
    let script' :: CInt
script' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (UnicodeScript -> Int) -> UnicodeScript -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. UnicodeScript -> Int
forall a. Enum a => a -> Int
fromEnum) UnicodeScript
script
    CUInt
result <- CInt -> IO CUInt
hb_glib_script_to_script CInt
script'
    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
    ScriptT -> IO ScriptT
forall (m :: * -> *) a. Monad m => a -> m a
return ScriptT
result'


-- function glib_script_from_script
-- Args: [ Arg
--           { argCName = "script"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "script_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "GLib" , name = "UnicodeScript" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_glib_script_from_script" hb_glib_script_from_script :: 
    CUInt ->                                -- script : TInterface (Name {namespace = "HarfBuzz", name = "script_t"})
    IO CInt

-- | /No description available in the introspection data./
glibScriptFromScript ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.Enums.ScriptT
    -> m GLib.Enums.UnicodeScript
glibScriptFromScript :: ScriptT -> m UnicodeScript
glibScriptFromScript ScriptT
script = IO UnicodeScript -> m UnicodeScript
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO UnicodeScript -> m UnicodeScript)
-> IO UnicodeScript -> m UnicodeScript
forall a b. (a -> b) -> a -> b
$ do
    let script' :: CUInt
script' = (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
script
    CInt
result <- CUInt -> IO CInt
hb_glib_script_from_script CUInt
script'
    let result' :: UnicodeScript
result' = (Int -> UnicodeScript
forall a. Enum a => Int -> a
toEnum (Int -> UnicodeScript) -> (CInt -> Int) -> CInt -> UnicodeScript
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CInt
result
    UnicodeScript -> IO UnicodeScript
forall (m :: * -> *) a. Monad m => a -> m a
return UnicodeScript
result'


-- function glib_get_unicode_funcs
-- Args: []
-- Lengths: []
-- returnType: Just
--               (TInterface
--                  Name { namespace = "HarfBuzz" , name = "unicode_funcs_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_glib_get_unicode_funcs" hb_glib_get_unicode_funcs :: 
    IO (Ptr HarfBuzz.UnicodeFuncsT.UnicodeFuncsT)

-- | /No description available in the introspection data./
glibGetUnicodeFuncs ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m HarfBuzz.UnicodeFuncsT.UnicodeFuncsT
glibGetUnicodeFuncs :: m UnicodeFuncsT
glibGetUnicodeFuncs  = IO UnicodeFuncsT -> m UnicodeFuncsT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO UnicodeFuncsT -> m UnicodeFuncsT)
-> IO UnicodeFuncsT -> m UnicodeFuncsT
forall a b. (a -> b) -> a -> b
$ do
    Ptr UnicodeFuncsT
result <- IO (Ptr UnicodeFuncsT)
hb_glib_get_unicode_funcs
    Text -> Ptr UnicodeFuncsT -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"glibGetUnicodeFuncs" Ptr UnicodeFuncsT
result
    UnicodeFuncsT
result' <- ((ManagedPtr UnicodeFuncsT -> UnicodeFuncsT)
-> Ptr UnicodeFuncsT -> IO UnicodeFuncsT
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr UnicodeFuncsT -> UnicodeFuncsT
HarfBuzz.UnicodeFuncsT.UnicodeFuncsT) Ptr UnicodeFuncsT
result
    UnicodeFuncsT -> IO UnicodeFuncsT
forall (m :: * -> *) a. Monad m => a -> m a
return UnicodeFuncsT
result'


-- function glib_blob_create
-- Args: [ Arg
--           { argCName = "gbytes"
--           , argType = TInterface Name { namespace = "GLib" , name = "Bytes" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "HarfBuzz" , name = "blob_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_glib_blob_create" hb_glib_blob_create :: 
    Ptr GLib.Bytes.Bytes ->                 -- gbytes : TInterface (Name {namespace = "GLib", name = "Bytes"})
    IO (Ptr HarfBuzz.BlobT.BlobT)

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.38/
glibBlobCreate ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GLib.Bytes.Bytes
    -> m HarfBuzz.BlobT.BlobT
glibBlobCreate :: Bytes -> m BlobT
glibBlobCreate Bytes
gbytes = IO BlobT -> m BlobT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO BlobT -> m BlobT) -> IO BlobT -> m BlobT
forall a b. (a -> b) -> a -> b
$ do
    Ptr Bytes
gbytes' <- Bytes -> IO (Ptr Bytes)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Bytes
gbytes
    Ptr BlobT
result <- Ptr Bytes -> IO (Ptr BlobT)
hb_glib_blob_create Ptr Bytes
gbytes'
    Text -> Ptr BlobT -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"glibBlobCreate" 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
    Bytes -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Bytes
gbytes
    BlobT -> IO BlobT
forall (m :: * -> *) a. Monad m => a -> m a
return BlobT
result'


-- function ft_font_set_load_flags
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "load_flags"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_ft_font_set_load_flags" hb_ft_font_set_load_flags :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    Int32 ->                                -- load_flags : TBasicType TInt
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 1.0.5/
ftFontSetLoadFlags ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -> Int32
    -> m ()
ftFontSetLoadFlags :: FontT -> Int32 -> m ()
ftFontSetLoadFlags FontT
font Int32
loadFlags = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
    Ptr FontT -> Int32 -> IO ()
hb_ft_font_set_load_flags Ptr FontT
font' Int32
loadFlags
    FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function ft_font_set_funcs
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_ft_font_set_funcs" hb_ft_font_set_funcs :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    IO ()

-- | /No description available in the introspection data./
ftFontSetFuncs ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -> m ()
ftFontSetFuncs :: FontT -> m ()
ftFontSetFuncs FontT
font = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
    Ptr FontT -> IO ()
hb_ft_font_set_funcs Ptr FontT
font'
    FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function ft_font_get_load_flags
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_ft_font_get_load_flags" hb_ft_font_get_load_flags :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    IO Int32

-- | /No description available in the introspection data./
-- 
-- /Since: 1.0.5/
ftFontGetLoadFlags ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -> m Int32
ftFontGetLoadFlags :: FontT -> m Int32
ftFontGetLoadFlags FontT
font = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
    Int32
result <- Ptr FontT -> IO Int32
hb_ft_font_get_load_flags Ptr FontT
font'
    FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function ft_font_changed
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_ft_font_changed" hb_ft_font_changed :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    IO ()

-- | /No description available in the introspection data./
ftFontChanged ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -> m ()
ftFontChanged :: FontT -> m ()
ftFontChanged FontT
font = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
    Ptr FontT -> IO ()
hb_ft_font_changed Ptr FontT
font'
    FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function font_subtract_glyph_origin_for_direction
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a font." , 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 = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "direction"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "direction_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , 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 = Nothing , 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 = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_subtract_glyph_origin_for_direction" hb_font_subtract_glyph_origin_for_direction :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    Word32 ->                               -- glyph : TBasicType TUInt32
    CUInt ->                                -- direction : TInterface (Name {namespace = "HarfBuzz", name = "direction_t"})
    Ptr Int32 ->                            -- x : TBasicType TInt32
    Ptr Int32 ->                            -- y : TBasicType TInt32
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
fontSubtractGlyphOriginForDirection ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: a font.
    -> Word32
    -> HarfBuzz.Enums.DirectionT
    -> m ((Int32, Int32))
fontSubtractGlyphOriginForDirection :: FontT -> Word32 -> DirectionT -> m (Int32, Int32)
fontSubtractGlyphOriginForDirection FontT
font Word32
glyph DirectionT
direction = IO (Int32, Int32) -> m (Int32, Int32)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Int32, Int32) -> m (Int32, Int32))
-> IO (Int32, Int32) -> m (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
    let direction' :: CUInt
direction' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (DirectionT -> Int) -> DirectionT -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. DirectionT -> Int
forall a. Enum a => a -> Int
fromEnum) DirectionT
direction
    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)
    Ptr FontT -> Word32 -> CUInt -> Ptr Int32 -> Ptr Int32 -> IO ()
hb_font_subtract_glyph_origin_for_direction Ptr FontT
font' Word32
glyph CUInt
direction' Ptr Int32
x Ptr Int32
y
    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) -> IO (Int32, Int32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
x', Int32
y')


-- function font_set_variations
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "variations"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "variation_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "variations_length"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_set_variations" hb_font_set_variations :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    Ptr HarfBuzz.VariationT.VariationT ->   -- variations : TInterface (Name {namespace = "HarfBuzz", name = "variation_t"})
    Word32 ->                               -- variations_length : TBasicType TUInt
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 1.4.2/
fontSetVariations ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -> HarfBuzz.VariationT.VariationT
    -> Word32
    -> m ()
fontSetVariations :: FontT -> VariationT -> Word32 -> m ()
fontSetVariations FontT
font VariationT
variations Word32
variationsLength = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
    Ptr VariationT
variations' <- VariationT -> IO (Ptr VariationT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VariationT
variations
    Ptr FontT -> Ptr VariationT -> Word32 -> IO ()
hb_font_set_variations Ptr FontT
font' Ptr VariationT
variations' Word32
variationsLength
    FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
    VariationT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr VariationT
variations
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function font_set_var_named_instance
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a font." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "instance_index"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "named instance index."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_set_var_named_instance" hb_font_set_var_named_instance :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    Word32 ->                               -- instance_index : TBasicType TUInt
    IO ()

-- | Sets design coords of a font from a named instance index.
-- 
-- /Since: 2.6.0/
fontSetVarNamedInstance ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: a font.
    -> Word32
    -- ^ /@instanceIndex@/: named instance index.
    -> m ()
fontSetVarNamedInstance :: FontT -> Word32 -> m ()
fontSetVarNamedInstance FontT
font Word32
instanceIndex = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
    Ptr FontT -> Word32 -> IO ()
hb_font_set_var_named_instance Ptr FontT
font' Word32
instanceIndex
    FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function font_set_var_coords_normalized
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "coords"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "coords_length"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_set_var_coords_normalized" hb_font_set_var_coords_normalized :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    Int32 ->                                -- coords : TBasicType TInt
    Word32 ->                               -- coords_length : TBasicType TUInt
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 1.4.2/
fontSetVarCoordsNormalized ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -> Int32
    -> Word32
    -> m ()
fontSetVarCoordsNormalized :: FontT -> Int32 -> Word32 -> m ()
fontSetVarCoordsNormalized FontT
font Int32
coords Word32
coordsLength = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
    Ptr FontT -> Int32 -> Word32 -> IO ()
hb_font_set_var_coords_normalized Ptr FontT
font' Int32
coords Word32
coordsLength
    FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function font_set_var_coords_design
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "coords"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "coords_length"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_set_var_coords_design" hb_font_set_var_coords_design :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    CFloat ->                               -- coords : TBasicType TFloat
    Word32 ->                               -- coords_length : TBasicType TUInt
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 1.4.2/
fontSetVarCoordsDesign ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -> Float
    -> Word32
    -> m ()
fontSetVarCoordsDesign :: FontT -> Float -> Word32 -> m ()
fontSetVarCoordsDesign FontT
font Float
coords Word32
coordsLength = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
    let coords' :: CFloat
coords' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
coords
    Ptr FontT -> CFloat -> Word32 -> IO ()
hb_font_set_var_coords_design Ptr FontT
font' CFloat
coords' Word32
coordsLength
    FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function font_set_scale
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a font." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "x_scale"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "y_scale"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_set_scale" hb_font_set_scale :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    Int32 ->                                -- x_scale : TBasicType TInt
    Int32 ->                                -- y_scale : TBasicType TInt
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
fontSetScale ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: a font.
    -> Int32
    -> Int32
    -> m ()
fontSetScale :: FontT -> Int32 -> Int32 -> m ()
fontSetScale FontT
font Int32
xScale Int32
yScale = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
    Ptr FontT -> Int32 -> Int32 -> IO ()
hb_font_set_scale Ptr FontT
font' Int32
xScale Int32
yScale
    FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function font_set_ptem
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a font." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "ptem"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "font size in points."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_set_ptem" hb_font_set_ptem :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    CFloat ->                               -- ptem : TBasicType TFloat
    IO ()

-- | Sets \"point size\" of the font.  Set to 0 to unset.
-- 
-- There are 72 points in an inch.
-- 
-- /Since: 1.6.0/
fontSetPtem ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: a font.
    -> Float
    -- ^ /@ptem@/: font size in points.
    -> m ()
fontSetPtem :: FontT -> Float -> m ()
fontSetPtem FontT
font Float
ptem = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
    let ptem' :: CFloat
ptem' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
ptem
    Ptr FontT -> CFloat -> IO ()
hb_font_set_ptem Ptr FontT
font' CFloat
ptem'
    FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function font_set_ppem
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a font." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "x_ppem"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "y_ppem"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_set_ppem" hb_font_set_ppem :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    Word32 ->                               -- x_ppem : TBasicType TUInt
    Word32 ->                               -- y_ppem : TBasicType TUInt
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
fontSetPpem ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: a font.
    -> Word32
    -> Word32
    -> m ()
fontSetPpem :: FontT -> Word32 -> Word32 -> m ()
fontSetPpem FontT
font Word32
xPpem Word32
yPpem = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
    Ptr FontT -> Word32 -> Word32 -> IO ()
hb_font_set_ppem Ptr FontT
font' Word32
xPpem Word32
yPpem
    FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function font_set_parent
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a font." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "parent"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "new parent." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_set_parent" hb_font_set_parent :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    Ptr HarfBuzz.FontT.FontT ->             -- parent : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    IO ()

-- | Sets parent font of /@font@/.
-- 
-- /Since: 1.0.5/
fontSetParent ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: a font.
    -> HarfBuzz.FontT.FontT
    -- ^ /@parent@/: new parent.
    -> m ()
fontSetParent :: FontT -> FontT -> m ()
fontSetParent FontT
font FontT
parent = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
    Ptr FontT
parent' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
parent
    Ptr FontT -> Ptr FontT -> IO ()
hb_font_set_parent Ptr FontT
font' Ptr FontT
parent'
    FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
    FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
parent
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function font_set_funcs_data
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a font." , 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 = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "destroy"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "destroy_func_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_set_funcs_data" hb_font_set_funcs_data :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    Ptr () ->                               -- font_data : TBasicType TPtr
    FunPtr HarfBuzz.Callbacks.C_DestroyFuncT -> -- destroy : TInterface (Name {namespace = "HarfBuzz", name = "destroy_func_t"})
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
fontSetFuncsData ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: a font.
    -> Ptr ()
    -> HarfBuzz.Callbacks.DestroyFuncT
    -> m ()
fontSetFuncsData :: FontT -> Ptr () -> IO () -> m ()
fontSetFuncsData FontT
font Ptr ()
fontData IO ()
destroy = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
    FunPtr C_DestroyFuncT
destroy' <- C_DestroyFuncT -> IO (FunPtr C_DestroyFuncT)
HarfBuzz.Callbacks.mk_DestroyFuncT (Maybe (Ptr (FunPtr C_DestroyFuncT))
-> C_DestroyFuncT -> C_DestroyFuncT
HarfBuzz.Callbacks.wrap_DestroyFuncT Maybe (Ptr (FunPtr C_DestroyFuncT))
forall a. Maybe a
Nothing (IO () -> C_DestroyFuncT
HarfBuzz.Callbacks.drop_closures_DestroyFuncT IO ()
destroy))
    Ptr FontT -> Ptr () -> FunPtr C_DestroyFuncT -> IO ()
hb_font_set_funcs_data Ptr FontT
font' Ptr ()
fontData FunPtr C_DestroyFuncT
destroy'
    FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function font_set_funcs
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a font." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "klass"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_funcs_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "font_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "destroy"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "destroy_func_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_set_funcs" hb_font_set_funcs :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    Ptr HarfBuzz.FontFuncsT.FontFuncsT ->   -- klass : TInterface (Name {namespace = "HarfBuzz", name = "font_funcs_t"})
    Ptr () ->                               -- font_data : TBasicType TPtr
    FunPtr HarfBuzz.Callbacks.C_DestroyFuncT -> -- destroy : TInterface (Name {namespace = "HarfBuzz", name = "destroy_func_t"})
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
fontSetFuncs ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: a font.
    -> HarfBuzz.FontFuncsT.FontFuncsT
    -> Ptr ()
    -> HarfBuzz.Callbacks.DestroyFuncT
    -> m ()
fontSetFuncs :: FontT -> FontFuncsT -> Ptr () -> IO () -> m ()
fontSetFuncs FontT
font FontFuncsT
klass Ptr ()
fontData IO ()
destroy = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
    Ptr FontFuncsT
klass' <- FontFuncsT -> IO (Ptr FontFuncsT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontFuncsT
klass
    FunPtr C_DestroyFuncT
destroy' <- C_DestroyFuncT -> IO (FunPtr C_DestroyFuncT)
HarfBuzz.Callbacks.mk_DestroyFuncT (Maybe (Ptr (FunPtr C_DestroyFuncT))
-> C_DestroyFuncT -> C_DestroyFuncT
HarfBuzz.Callbacks.wrap_DestroyFuncT Maybe (Ptr (FunPtr C_DestroyFuncT))
forall a. Maybe a
Nothing (IO () -> C_DestroyFuncT
HarfBuzz.Callbacks.drop_closures_DestroyFuncT IO ()
destroy))
    Ptr FontT
-> Ptr FontFuncsT -> Ptr () -> FunPtr C_DestroyFuncT -> IO ()
hb_font_set_funcs Ptr FontT
font' Ptr FontFuncsT
klass' Ptr ()
fontData FunPtr C_DestroyFuncT
destroy'
    FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
    FontFuncsT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontFuncsT
klass
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function font_set_face
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a font." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "new face." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_set_face" hb_font_set_face :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    IO ()

-- | Sets font-face of /@font@/.
-- 
-- /Since: 1.4.3/
fontSetFace ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: a font.
    -> HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: new face.
    -> m ()
fontSetFace :: FontT -> FaceT -> m ()
fontSetFace FontT
font FaceT
face = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
    Ptr FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Ptr FontT -> Ptr FaceT -> IO ()
hb_font_set_face Ptr FontT
font' Ptr FaceT
face'
    FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function font_make_immutable
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a font." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_make_immutable" hb_font_make_immutable :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
fontMakeImmutable ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: a font.
    -> m ()
fontMakeImmutable :: FontT -> m ()
fontMakeImmutable FontT
font = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
    Ptr FontT -> IO ()
hb_font_make_immutable Ptr FontT
font'
    FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function font_is_immutable
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a font." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_is_immutable" hb_font_is_immutable :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    IO Int32

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
fontIsImmutable ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: a font.
    -> m Int32
fontIsImmutable :: FontT -> m Int32
fontIsImmutable FontT
font = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
    Int32
result <- Ptr FontT -> IO Int32
hb_font_is_immutable Ptr FontT
font'
    FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function font_glyph_to_string
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a font." , 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 = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "s"
--           , argType = TCArray False (-1) 3 (TBasicType TUTF8)
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "size"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "size"
--              , argType = TBasicType TUInt
--              , direction = DirectionIn
--              , mayBeNull = False
--              , argDoc =
--                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--              , argScope = ScopeTypeInvalid
--              , argClosure = -1
--              , argDestroy = -1
--              , argCallerAllocates = False
--              , transfer = TransferNothing
--              }
--          ]
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_glyph_to_string" hb_font_glyph_to_string :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    Word32 ->                               -- glyph : TBasicType TUInt32
    Ptr CString ->                          -- s : TCArray False (-1) 3 (TBasicType TUTF8)
    Word32 ->                               -- size : TBasicType TUInt
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
fontGlyphToString ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: a font.
    -> Word32
    -> [T.Text]
    -> m ()
fontGlyphToString :: FontT -> Word32 -> [Text] -> m ()
fontGlyphToString FontT
font Word32
glyph [Text]
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    let size :: Word32
size = Int -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Word32) -> Int -> Word32
forall a b. (a -> b) -> a -> b
$ [Text] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [Text]
s
    Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
    Ptr CString
s' <- [Text] -> IO (Ptr CString)
packUTF8CArray [Text]
s
    Ptr FontT -> Word32 -> Ptr CString -> Word32 -> IO ()
hb_font_glyph_to_string Ptr FontT
font' Word32
glyph Ptr CString
s' Word32
size
    FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
    (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
s'
    Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
s'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function font_glyph_from_string
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a font." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "s"
--           , argType = TCArray False (-1) 2 (TBasicType TUInt8)
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , 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 = Nothing , 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 = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "len"
--              , argType = TBasicType TInt
--              , direction = DirectionIn
--              , mayBeNull = False
--              , argDoc =
--                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--              , argScope = ScopeTypeInvalid
--              , argClosure = -1
--              , argDestroy = -1
--              , argCallerAllocates = False
--              , transfer = TransferNothing
--              }
--          ]
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_glyph_from_string" hb_font_glyph_from_string :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    Ptr Word8 ->                            -- s : TCArray False (-1) 2 (TBasicType TUInt8)
    Int32 ->                                -- len : TBasicType TInt
    Ptr Word32 ->                           -- glyph : TBasicType TUInt32
    IO Int32

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
fontGlyphFromString ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: a font.
    -> ByteString
    -> m ((Int32, Word32))
fontGlyphFromString :: FontT -> ByteString -> m (Int32, Word32)
fontGlyphFromString FontT
font ByteString
s = IO (Int32, Word32) -> m (Int32, Word32)
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
$ ByteString -> Int
B.length ByteString
s
    Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
    Ptr Word8
s' <- ByteString -> IO (Ptr Word8)
packByteString ByteString
s
    Ptr Word32
glyph <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
    Int32
result <- Ptr FontT -> Ptr Word8 -> Int32 -> Ptr Word32 -> IO Int32
hb_font_glyph_from_string Ptr FontT
font' Ptr Word8
s' Int32
len Ptr Word32
glyph
    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 Word8 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word8
s'
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
glyph
    (Int32, Word32) -> IO (Int32, Word32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
result, Word32
glyph')


-- function font_get_variation_glyph
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a font." , 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 = Nothing , 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 = Nothing , 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 = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_get_variation_glyph" hb_font_get_variation_glyph :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    Word32 ->                               -- unicode : TBasicType TUInt32
    Word32 ->                               -- variation_selector : TBasicType TUInt32
    Ptr Word32 ->                           -- glyph : TBasicType TUInt32
    IO Int32

-- | /No description available in the introspection data./
-- 
-- /Since: 1.2.3/
fontGetVariationGlyph ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: a font.
    -> Word32
    -> Word32
    -> m ((Int32, Word32))
fontGetVariationGlyph :: FontT -> Word32 -> Word32 -> m (Int32, Word32)
fontGetVariationGlyph FontT
font Word32
unicode Word32
variationSelector = IO (Int32, Word32) -> m (Int32, Word32)
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 <- Ptr FontT -> Word32 -> Word32 -> Ptr Word32 -> IO Int32
hb_font_get_variation_glyph Ptr FontT
font' Word32
unicode Word32
variationSelector Ptr Word32
glyph
    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 (m :: * -> *) a. Monad m => a -> m a
return (Int32
result, Word32
glyph')


-- function font_get_var_coords_normalized
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "length"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_get_var_coords_normalized" hb_font_get_var_coords_normalized :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    Word32 ->                               -- length : TBasicType TUInt
    IO Int32

-- | Return value is valid as long as variation coordinates of the font
-- are not modified.
-- 
-- /Since: 1.4.2/
fontGetVarCoordsNormalized ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -> Word32
    -> m Int32
fontGetVarCoordsNormalized :: FontT -> Word32 -> m Int32
fontGetVarCoordsNormalized FontT
font Word32
length_ = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
    Int32
result <- Ptr FontT -> Word32 -> IO Int32
hb_font_get_var_coords_normalized Ptr FontT
font' Word32
length_
    FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function font_get_v_extents
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a font." , 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 = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = True
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_get_v_extents" hb_font_get_v_extents :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    Ptr HarfBuzz.FontExtentsT.FontExtentsT -> -- extents : TInterface (Name {namespace = "HarfBuzz", name = "font_extents_t"})
    IO Int32

-- | /No description available in the introspection data./
-- 
-- /Since: 1.1.3/
fontGetVExtents ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: a font.
    -> m ((Int32, HarfBuzz.FontExtentsT.FontExtentsT))
fontGetVExtents :: FontT -> m (Int32, FontExtentsT)
fontGetVExtents FontT
font = IO (Int32, FontExtentsT) -> m (Int32, FontExtentsT)
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 <- Ptr FontT -> Ptr FontExtentsT -> IO Int32
hb_font_get_v_extents Ptr FontT
font' Ptr FontExtentsT
extents
    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 (m :: * -> *) a. Monad m => a -> m a
return (Int32
result, FontExtentsT
extents')


-- function font_get_scale
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a font." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "x_scale"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "y_scale"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_get_scale" hb_font_get_scale :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    Ptr Int32 ->                            -- x_scale : TBasicType TInt
    Ptr Int32 ->                            -- y_scale : TBasicType TInt
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
fontGetScale ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: a font.
    -> m ((Int32, Int32))
fontGetScale :: FontT -> m (Int32, Int32)
fontGetScale FontT
font = IO (Int32, Int32) -> m (Int32, Int32)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Int32, Int32) -> m (Int32, Int32))
-> IO (Int32, Int32) -> m (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
xScale <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr Int32
yScale <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr FontT -> Ptr Int32 -> Ptr Int32 -> IO ()
hb_font_get_scale Ptr FontT
font' Ptr Int32
xScale Ptr Int32
yScale
    Int32
xScale' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
xScale
    Int32
yScale' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
yScale
    FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
xScale
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
yScale
    (Int32, Int32) -> IO (Int32, Int32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
xScale', Int32
yScale')


-- function font_get_ptem
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a font." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TFloat)
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_get_ptem" hb_font_get_ptem :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    IO CFloat

-- | Gets the \"point size\" of the font.  A value of 0 means unset.
-- 
-- /Since: 0.9.2/
fontGetPtem ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: a font.
    -> m Float
    -- ^ __Returns:__ Point size.
fontGetPtem :: FontT -> m Float
fontGetPtem FontT
font = IO Float -> m Float
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Float -> m Float) -> IO Float -> m Float
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
    CFloat
result <- Ptr FontT -> IO CFloat
hb_font_get_ptem Ptr FontT
font'
    let result' :: Float
result' = CFloat -> Float
forall a b. (Real a, Fractional b) => a -> b
realToFrac CFloat
result
    FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
    Float -> IO Float
forall (m :: * -> *) a. Monad m => a -> m a
return Float
result'


-- function font_get_ppem
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a font." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "x_ppem"
--           , argType = TBasicType TUInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "y_ppem"
--           , argType = TBasicType TUInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_get_ppem" hb_font_get_ppem :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    Ptr Word32 ->                           -- x_ppem : TBasicType TUInt
    Ptr Word32 ->                           -- y_ppem : TBasicType TUInt
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
fontGetPpem ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: a font.
    -> m ((Word32, Word32))
fontGetPpem :: FontT -> m (Word32, Word32)
fontGetPpem FontT
font = IO (Word32, Word32) -> m (Word32, Word32)
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
xPpem <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
    Ptr Word32
yPpem <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
    Ptr FontT -> Ptr Word32 -> Ptr Word32 -> IO ()
hb_font_get_ppem Ptr FontT
font' Ptr Word32
xPpem Ptr Word32
yPpem
    Word32
xPpem' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
xPpem
    Word32
yPpem' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
yPpem
    FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
xPpem
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
yPpem
    (Word32, Word32) -> IO (Word32, Word32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Word32
xPpem', Word32
yPpem')


-- function font_get_parent
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a font." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "HarfBuzz" , name = "font_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_get_parent" hb_font_get_parent :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    IO (Ptr HarfBuzz.FontT.FontT)

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
fontGetParent ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: a font.
    -> m HarfBuzz.FontT.FontT
fontGetParent :: FontT -> m FontT
fontGetParent FontT
font = IO FontT -> m FontT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FontT -> m FontT) -> IO FontT -> m FontT
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 FontT
result <- Ptr FontT -> IO (Ptr FontT)
hb_font_get_parent Ptr FontT
font'
    Text -> Ptr FontT -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"fontGetParent" Ptr FontT
result
    FontT
result' <- ((ManagedPtr FontT -> FontT) -> Ptr FontT -> IO FontT
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr FontT -> FontT
HarfBuzz.FontT.FontT) Ptr FontT
result
    FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
    FontT -> IO FontT
forall (m :: * -> *) a. Monad m => a -> m a
return FontT
result'


-- function font_get_nominal_glyphs
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a font." , 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 = Nothing , 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 = Nothing , 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 = Nothing , 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 = Nothing , 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 = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_get_nominal_glyphs" hb_font_get_nominal_glyphs :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    Word32 ->                               -- count : TBasicType TUInt
    Word32 ->                               -- first_unicode : TBasicType TUInt32
    Word32 ->                               -- unicode_stride : TBasicType TUInt
    Word32 ->                               -- first_glyph : TBasicType TUInt32
    Word32 ->                               -- glyph_stride : TBasicType TUInt
    IO Word32

-- | /No description available in the introspection data./
-- 
-- /Since: 2.6.3/
fontGetNominalGlyphs ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: a font.
    -> Word32
    -> Word32
    -> Word32
    -> Word32
    -> Word32
    -> m Word32
fontGetNominalGlyphs :: FontT -> Word32 -> Word32 -> Word32 -> Word32 -> Word32 -> m Word32
fontGetNominalGlyphs FontT
font Word32
count Word32
firstUnicode Word32
unicodeStride Word32
firstGlyph Word32
glyphStride = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
    Word32
result <- Ptr FontT
-> Word32 -> Word32 -> Word32 -> Word32 -> Word32 -> IO Word32
hb_font_get_nominal_glyphs Ptr FontT
font' Word32
count Word32
firstUnicode Word32
unicodeStride Word32
firstGlyph Word32
glyphStride
    FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
    Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result


-- function font_get_nominal_glyph
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a font." , 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 = Nothing , 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 = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_get_nominal_glyph" hb_font_get_nominal_glyph :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    Word32 ->                               -- unicode : TBasicType TUInt32
    Ptr Word32 ->                           -- glyph : TBasicType TUInt32
    IO Int32

-- | /No description available in the introspection data./
-- 
-- /Since: 1.2.3/
fontGetNominalGlyph ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: a font.
    -> Word32
    -> m ((Int32, Word32))
fontGetNominalGlyph :: FontT -> Word32 -> m (Int32, Word32)
fontGetNominalGlyph FontT
font Word32
unicode = IO (Int32, Word32) -> m (Int32, Word32)
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 <- Ptr FontT -> Word32 -> Ptr Word32 -> IO Int32
hb_font_get_nominal_glyph Ptr FontT
font' Word32
unicode Ptr Word32
glyph
    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 (m :: * -> *) a. Monad m => a -> m a
return (Int32
result, Word32
glyph')


-- function font_get_h_extents
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a font." , 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 = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = True
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_get_h_extents" hb_font_get_h_extents :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    Ptr HarfBuzz.FontExtentsT.FontExtentsT -> -- extents : TInterface (Name {namespace = "HarfBuzz", name = "font_extents_t"})
    IO Int32

-- | /No description available in the introspection data./
-- 
-- /Since: 1.1.3/
fontGetHExtents ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: a font.
    -> m ((Int32, HarfBuzz.FontExtentsT.FontExtentsT))
fontGetHExtents :: FontT -> m (Int32, FontExtentsT)
fontGetHExtents FontT
font = IO (Int32, FontExtentsT) -> m (Int32, FontExtentsT)
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 <- Ptr FontT -> Ptr FontExtentsT -> IO Int32
hb_font_get_h_extents Ptr FontT
font' Ptr FontExtentsT
extents
    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 (m :: * -> *) a. Monad m => a -> m a
return (Int32
result, FontExtentsT
extents')


-- function font_get_glyph_v_origin
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a font." , 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 = Nothing , 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 = Nothing , 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 = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_get_glyph_v_origin" hb_font_get_glyph_v_origin :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    Word32 ->                               -- glyph : TBasicType TUInt32
    Ptr Int32 ->                            -- x : TBasicType TInt32
    Ptr Int32 ->                            -- y : TBasicType TInt32
    IO Int32

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
fontGetGlyphVOrigin ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: a font.
    -> Word32
    -> m ((Int32, Int32, Int32))
fontGetGlyphVOrigin :: FontT -> Word32 -> m (Int32, Int32, Int32)
fontGetGlyphVOrigin FontT
font Word32
glyph = IO (Int32, Int32, Int32) -> m (Int32, Int32, Int32)
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 <- Ptr FontT -> Word32 -> Ptr Int32 -> Ptr Int32 -> IO Int32
hb_font_get_glyph_v_origin Ptr FontT
font' Word32
glyph Ptr Int32
x Ptr Int32
y
    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 (m :: * -> *) a. Monad m => a -> m a
return (Int32
result, Int32
x', Int32
y')


-- function font_get_glyph_v_kerning
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a font." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "top_glyph"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "bottom_glyph"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt32)
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_get_glyph_v_kerning" hb_font_get_glyph_v_kerning :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    Word32 ->                               -- top_glyph : TBasicType TUInt32
    Word32 ->                               -- bottom_glyph : TBasicType TUInt32
    IO Int32

{-# DEPRECATED fontGetGlyphVKerning ["(Since version 2.0.0)"] #-}
-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
fontGetGlyphVKerning ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: a font.
    -> Word32
    -> Word32
    -> m Int32
fontGetGlyphVKerning :: FontT -> Word32 -> Word32 -> m Int32
fontGetGlyphVKerning FontT
font Word32
topGlyph Word32
bottomGlyph = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
    Int32
result <- Ptr FontT -> Word32 -> Word32 -> IO Int32
hb_font_get_glyph_v_kerning Ptr FontT
font' Word32
topGlyph Word32
bottomGlyph
    FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function font_get_glyph_v_advances
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a font." , 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 = Nothing , 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 = Nothing , 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 = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "first_advance"
--           , argType = TBasicType TInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "advance_stride"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_get_glyph_v_advances" hb_font_get_glyph_v_advances :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    Word32 ->                               -- count : TBasicType TUInt
    Word32 ->                               -- first_glyph : TBasicType TUInt32
    Word32 ->                               -- glyph_stride : TBasicType TUInt
    Int32 ->                                -- first_advance : TBasicType TInt32
    Word32 ->                               -- advance_stride : TBasicType TUInt
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 1.8.6/
fontGetGlyphVAdvances ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: a font.
    -> Word32
    -> Word32
    -> Word32
    -> Int32
    -> Word32
    -> m ()
fontGetGlyphVAdvances :: FontT -> Word32 -> Word32 -> Word32 -> Int32 -> Word32 -> m ()
fontGetGlyphVAdvances FontT
font Word32
count Word32
firstGlyph Word32
glyphStride Int32
firstAdvance Word32
advanceStride = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
    Ptr FontT -> Word32 -> Word32 -> Word32 -> Int32 -> Word32 -> IO ()
hb_font_get_glyph_v_advances Ptr FontT
font' Word32
count Word32
firstGlyph Word32
glyphStride Int32
firstAdvance Word32
advanceStride
    FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function font_get_glyph_v_advance
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a font." , 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 = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt32)
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_get_glyph_v_advance" hb_font_get_glyph_v_advance :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    Word32 ->                               -- glyph : TBasicType TUInt32
    IO Int32

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
fontGetGlyphVAdvance ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: a font.
    -> Word32
    -> m Int32
fontGetGlyphVAdvance :: FontT -> Word32 -> m Int32
fontGetGlyphVAdvance FontT
font Word32
glyph = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
    Int32
result <- Ptr FontT -> Word32 -> IO Int32
hb_font_get_glyph_v_advance Ptr FontT
font' Word32
glyph
    FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function font_get_glyph_origin_for_direction
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a font." , 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 = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "direction"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "direction_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , 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 = Nothing , 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 = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_get_glyph_origin_for_direction" hb_font_get_glyph_origin_for_direction :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    Word32 ->                               -- glyph : TBasicType TUInt32
    CUInt ->                                -- direction : TInterface (Name {namespace = "HarfBuzz", name = "direction_t"})
    Ptr Int32 ->                            -- x : TBasicType TInt32
    Ptr Int32 ->                            -- y : TBasicType TInt32
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
fontGetGlyphOriginForDirection ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: a font.
    -> Word32
    -> HarfBuzz.Enums.DirectionT
    -> m ((Int32, Int32))
fontGetGlyphOriginForDirection :: FontT -> Word32 -> DirectionT -> m (Int32, Int32)
fontGetGlyphOriginForDirection FontT
font Word32
glyph DirectionT
direction = IO (Int32, Int32) -> m (Int32, Int32)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Int32, Int32) -> m (Int32, Int32))
-> IO (Int32, Int32) -> m (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
    let direction' :: CUInt
direction' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (DirectionT -> Int) -> DirectionT -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. DirectionT -> Int
forall a. Enum a => a -> Int
fromEnum) DirectionT
direction
    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)
    Ptr FontT -> Word32 -> CUInt -> Ptr Int32 -> Ptr Int32 -> IO ()
hb_font_get_glyph_origin_for_direction Ptr FontT
font' Word32
glyph CUInt
direction' Ptr Int32
x Ptr Int32
y
    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) -> IO (Int32, Int32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
x', Int32
y')


-- function font_get_glyph_name
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a font." , 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 = Nothing , 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 = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "size"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "size"
--              , argType = TBasicType TUInt
--              , direction = DirectionIn
--              , mayBeNull = False
--              , argDoc =
--                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--              , argScope = ScopeTypeInvalid
--              , argClosure = -1
--              , argDestroy = -1
--              , argCallerAllocates = False
--              , transfer = TransferNothing
--              }
--          ]
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_get_glyph_name" hb_font_get_glyph_name :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    Word32 ->                               -- glyph : TBasicType TUInt32
    Ptr CString ->                          -- name : TCArray False (-1) 3 (TBasicType TUTF8)
    Word32 ->                               -- size : TBasicType TUInt
    IO Int32

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
fontGetGlyphName ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: a font.
    -> Word32
    -> [T.Text]
    -> m Int32
fontGetGlyphName :: FontT -> Word32 -> [Text] -> m Int32
fontGetGlyphName FontT
font Word32
glyph [Text]
name = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    let size :: Word32
size = Int -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Word32) -> Int -> Word32
forall a b. (a -> b) -> a -> b
$ [Text] -> 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
    Int32
result <- Ptr FontT -> Word32 -> Ptr CString -> Word32 -> IO Int32
hb_font_get_glyph_name Ptr FontT
font' Word32
glyph Ptr CString
name' Word32
size
    FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
    (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'
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function font_get_glyph_kerning_for_direction
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a font." , 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 = Nothing , 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 = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "direction"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "direction_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , 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 = Nothing , 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 = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_get_glyph_kerning_for_direction" hb_font_get_glyph_kerning_for_direction :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    Word32 ->                               -- first_glyph : TBasicType TUInt32
    Word32 ->                               -- second_glyph : TBasicType TUInt32
    CUInt ->                                -- direction : TInterface (Name {namespace = "HarfBuzz", name = "direction_t"})
    Ptr Int32 ->                            -- x : TBasicType TInt32
    Ptr Int32 ->                            -- y : TBasicType TInt32
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
fontGetGlyphKerningForDirection ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: a font.
    -> Word32
    -> Word32
    -> HarfBuzz.Enums.DirectionT
    -> m ((Int32, Int32))
fontGetGlyphKerningForDirection :: FontT -> Word32 -> Word32 -> DirectionT -> m (Int32, Int32)
fontGetGlyphKerningForDirection FontT
font Word32
firstGlyph Word32
secondGlyph DirectionT
direction = IO (Int32, Int32) -> m (Int32, Int32)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Int32, Int32) -> m (Int32, Int32))
-> IO (Int32, Int32) -> m (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
    let direction' :: CUInt
direction' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (DirectionT -> Int) -> DirectionT -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. DirectionT -> Int
forall a. Enum a => a -> Int
fromEnum) DirectionT
direction
    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)
    Ptr FontT
-> Word32 -> Word32 -> CUInt -> Ptr Int32 -> Ptr Int32 -> IO ()
hb_font_get_glyph_kerning_for_direction Ptr FontT
font' Word32
firstGlyph Word32
secondGlyph CUInt
direction' Ptr Int32
x Ptr Int32
y
    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) -> IO (Int32, Int32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
x', Int32
y')


-- function font_get_glyph_h_origin
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a font." , 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 = Nothing , 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 = Nothing , 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 = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_get_glyph_h_origin" hb_font_get_glyph_h_origin :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    Word32 ->                               -- glyph : TBasicType TUInt32
    Ptr Int32 ->                            -- x : TBasicType TInt32
    Ptr Int32 ->                            -- y : TBasicType TInt32
    IO Int32

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
fontGetGlyphHOrigin ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: a font.
    -> Word32
    -> m ((Int32, Int32, Int32))
fontGetGlyphHOrigin :: FontT -> Word32 -> m (Int32, Int32, Int32)
fontGetGlyphHOrigin FontT
font Word32
glyph = IO (Int32, Int32, Int32) -> m (Int32, Int32, Int32)
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 <- Ptr FontT -> Word32 -> Ptr Int32 -> Ptr Int32 -> IO Int32
hb_font_get_glyph_h_origin Ptr FontT
font' Word32
glyph Ptr Int32
x Ptr Int32
y
    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 (m :: * -> *) a. Monad m => a -> m a
return (Int32
result, Int32
x', Int32
y')


-- function font_get_glyph_h_kerning
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a font." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "left_glyph"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "right_glyph"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt32)
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_get_glyph_h_kerning" hb_font_get_glyph_h_kerning :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    Word32 ->                               -- left_glyph : TBasicType TUInt32
    Word32 ->                               -- right_glyph : TBasicType TUInt32
    IO Int32

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
fontGetGlyphHKerning ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: a font.
    -> Word32
    -> Word32
    -> m Int32
fontGetGlyphHKerning :: FontT -> Word32 -> Word32 -> m Int32
fontGetGlyphHKerning FontT
font Word32
leftGlyph Word32
rightGlyph = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
    Int32
result <- Ptr FontT -> Word32 -> Word32 -> IO Int32
hb_font_get_glyph_h_kerning Ptr FontT
font' Word32
leftGlyph Word32
rightGlyph
    FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function font_get_glyph_h_advances
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a font." , 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 = Nothing , 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 = Nothing , 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 = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "first_advance"
--           , argType = TBasicType TInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "advance_stride"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_get_glyph_h_advances" hb_font_get_glyph_h_advances :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    Word32 ->                               -- count : TBasicType TUInt
    Word32 ->                               -- first_glyph : TBasicType TUInt32
    Word32 ->                               -- glyph_stride : TBasicType TUInt
    Int32 ->                                -- first_advance : TBasicType TInt32
    Word32 ->                               -- advance_stride : TBasicType TUInt
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 1.8.6/
fontGetGlyphHAdvances ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: a font.
    -> Word32
    -> Word32
    -> Word32
    -> Int32
    -> Word32
    -> m ()
fontGetGlyphHAdvances :: FontT -> Word32 -> Word32 -> Word32 -> Int32 -> Word32 -> m ()
fontGetGlyphHAdvances FontT
font Word32
count Word32
firstGlyph Word32
glyphStride Int32
firstAdvance Word32
advanceStride = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
    Ptr FontT -> Word32 -> Word32 -> Word32 -> Int32 -> Word32 -> IO ()
hb_font_get_glyph_h_advances Ptr FontT
font' Word32
count Word32
firstGlyph Word32
glyphStride Int32
firstAdvance Word32
advanceStride
    FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function font_get_glyph_h_advance
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a font." , 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 = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt32)
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_get_glyph_h_advance" hb_font_get_glyph_h_advance :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    Word32 ->                               -- glyph : TBasicType TUInt32
    IO Int32

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
fontGetGlyphHAdvance ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: a font.
    -> Word32
    -> m Int32
fontGetGlyphHAdvance :: FontT -> Word32 -> m Int32
fontGetGlyphHAdvance FontT
font Word32
glyph = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
    Int32
result <- Ptr FontT -> Word32 -> IO Int32
hb_font_get_glyph_h_advance Ptr FontT
font' Word32
glyph
    FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function font_get_glyph_from_name
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a font." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "name"
--           , argType = TCArray False (-1) 2 (TBasicType TUTF8)
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , 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 = Nothing , 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 = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "len"
--              , argType = TBasicType TInt
--              , direction = DirectionIn
--              , mayBeNull = False
--              , argDoc =
--                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--              , argScope = ScopeTypeInvalid
--              , argClosure = -1
--              , argDestroy = -1
--              , argCallerAllocates = False
--              , transfer = TransferNothing
--              }
--          ]
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_get_glyph_from_name" hb_font_get_glyph_from_name :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    Ptr CString ->                          -- name : TCArray False (-1) 2 (TBasicType TUTF8)
    Int32 ->                                -- len : TBasicType TInt
    Ptr Word32 ->                           -- glyph : TBasicType TUInt32
    IO Int32

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
fontGetGlyphFromName ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: a font.
    -> [T.Text]
    -> m ((Int32, Word32))
fontGetGlyphFromName :: FontT -> [Text] -> m (Int32, Word32)
fontGetGlyphFromName FontT
font [Text]
name = IO (Int32, Word32) -> m (Int32, Word32)
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 (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 <- Ptr FontT -> Ptr CString -> Int32 -> Ptr Word32 -> IO Int32
hb_font_get_glyph_from_name Ptr FontT
font' Ptr CString
name' Int32
len Ptr Word32
glyph
    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 (m :: * -> *) a. Monad m => a -> m a
return (Int32
result, Word32
glyph')


-- function font_get_glyph_extents_for_origin
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a font." , 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 = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "direction"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "direction_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , 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 = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = True
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_get_glyph_extents_for_origin" hb_font_get_glyph_extents_for_origin :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    Word32 ->                               -- glyph : TBasicType TUInt32
    CUInt ->                                -- direction : TInterface (Name {namespace = "HarfBuzz", name = "direction_t"})
    Ptr HarfBuzz.GlyphExtentsT.GlyphExtentsT -> -- extents : TInterface (Name {namespace = "HarfBuzz", name = "glyph_extents_t"})
    IO Int32

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
fontGetGlyphExtentsForOrigin ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: a font.
    -> Word32
    -> HarfBuzz.Enums.DirectionT
    -> m ((Int32, HarfBuzz.GlyphExtentsT.GlyphExtentsT))
fontGetGlyphExtentsForOrigin :: FontT -> Word32 -> DirectionT -> m (Int32, GlyphExtentsT)
fontGetGlyphExtentsForOrigin FontT
font Word32
glyph DirectionT
direction = IO (Int32, GlyphExtentsT) -> m (Int32, GlyphExtentsT)
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
    let direction' :: CUInt
direction' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (DirectionT -> Int) -> DirectionT -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. DirectionT -> Int
forall a. Enum a => a -> Int
fromEnum) DirectionT
direction
    Ptr GlyphExtentsT
extents <- Int -> IO (Ptr GlyphExtentsT)
forall a. Int -> IO (Ptr a)
SP.callocBytes Int
16 :: IO (Ptr HarfBuzz.GlyphExtentsT.GlyphExtentsT)
    Int32
result <- Ptr FontT -> Word32 -> CUInt -> Ptr GlyphExtentsT -> IO Int32
hb_font_get_glyph_extents_for_origin Ptr FontT
font' Word32
glyph CUInt
direction' Ptr GlyphExtentsT
extents
    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 (m :: * -> *) a. Monad m => a -> m a
return (Int32
result, GlyphExtentsT
extents')


-- function font_get_glyph_extents
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a font." , 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 = Nothing , 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 = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = True
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_get_glyph_extents" hb_font_get_glyph_extents :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    Word32 ->                               -- glyph : TBasicType TUInt32
    Ptr HarfBuzz.GlyphExtentsT.GlyphExtentsT -> -- extents : TInterface (Name {namespace = "HarfBuzz", name = "glyph_extents_t"})
    IO Int32

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
fontGetGlyphExtents ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: a font.
    -> Word32
    -> m ((Int32, HarfBuzz.GlyphExtentsT.GlyphExtentsT))
fontGetGlyphExtents :: FontT -> Word32 -> m (Int32, GlyphExtentsT)
fontGetGlyphExtents FontT
font Word32
glyph = IO (Int32, GlyphExtentsT) -> m (Int32, GlyphExtentsT)
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 <- Ptr FontT -> Word32 -> Ptr GlyphExtentsT -> IO Int32
hb_font_get_glyph_extents Ptr FontT
font' Word32
glyph Ptr GlyphExtentsT
extents
    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 (m :: * -> *) a. Monad m => a -> m a
return (Int32
result, GlyphExtentsT
extents')


-- function font_get_glyph_contour_point_for_origin
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a font." , 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 = Nothing , 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 = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "direction"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "direction_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , 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 = Nothing , 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 = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_get_glyph_contour_point_for_origin" hb_font_get_glyph_contour_point_for_origin :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    Word32 ->                               -- glyph : TBasicType TUInt32
    Word32 ->                               -- point_index : TBasicType TUInt
    CUInt ->                                -- direction : TInterface (Name {namespace = "HarfBuzz", name = "direction_t"})
    Ptr Int32 ->                            -- x : TBasicType TInt32
    Ptr Int32 ->                            -- y : TBasicType TInt32
    IO Int32

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
fontGetGlyphContourPointForOrigin ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: a font.
    -> Word32
    -> Word32
    -> HarfBuzz.Enums.DirectionT
    -> m ((Int32, Int32, Int32))
fontGetGlyphContourPointForOrigin :: FontT -> Word32 -> Word32 -> DirectionT -> m (Int32, Int32, Int32)
fontGetGlyphContourPointForOrigin FontT
font Word32
glyph Word32
pointIndex DirectionT
direction = IO (Int32, Int32, Int32) -> m (Int32, Int32, Int32)
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
    let direction' :: CUInt
direction' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (DirectionT -> Int) -> DirectionT -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. DirectionT -> Int
forall a. Enum a => a -> Int
fromEnum) DirectionT
direction
    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 <- Ptr FontT
-> Word32 -> Word32 -> CUInt -> Ptr Int32 -> Ptr Int32 -> IO Int32
hb_font_get_glyph_contour_point_for_origin Ptr FontT
font' Word32
glyph Word32
pointIndex CUInt
direction' Ptr Int32
x Ptr Int32
y
    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 (m :: * -> *) a. Monad m => a -> m a
return (Int32
result, Int32
x', Int32
y')


-- function font_get_glyph_contour_point
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a font." , 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 = Nothing , 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 = Nothing , 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 = Nothing , 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 = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_get_glyph_contour_point" hb_font_get_glyph_contour_point :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    Word32 ->                               -- glyph : TBasicType TUInt32
    Word32 ->                               -- point_index : TBasicType TUInt
    Ptr Int32 ->                            -- x : TBasicType TInt32
    Ptr Int32 ->                            -- y : TBasicType TInt32
    IO Int32

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
fontGetGlyphContourPoint ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: a font.
    -> Word32
    -> Word32
    -> m ((Int32, Int32, Int32))
fontGetGlyphContourPoint :: FontT -> Word32 -> Word32 -> m (Int32, Int32, Int32)
fontGetGlyphContourPoint FontT
font Word32
glyph Word32
pointIndex = IO (Int32, Int32, Int32) -> m (Int32, Int32, Int32)
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 <- Ptr FontT -> Word32 -> Word32 -> Ptr Int32 -> Ptr Int32 -> IO Int32
hb_font_get_glyph_contour_point Ptr FontT
font' Word32
glyph Word32
pointIndex Ptr Int32
x Ptr Int32
y
    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 (m :: * -> *) a. Monad m => a -> m a
return (Int32
result, Int32
x', Int32
y')


-- function font_get_glyph_advances_for_direction
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a font." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "direction"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "direction_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , 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 = Nothing , 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 = Nothing , 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 = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "first_advance"
--           , argType = TBasicType TInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "advance_stride"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_get_glyph_advances_for_direction" hb_font_get_glyph_advances_for_direction :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    CUInt ->                                -- direction : TInterface (Name {namespace = "HarfBuzz", name = "direction_t"})
    Word32 ->                               -- count : TBasicType TUInt
    Word32 ->                               -- first_glyph : TBasicType TUInt32
    Word32 ->                               -- glyph_stride : TBasicType TUInt
    Int32 ->                                -- first_advance : TBasicType TInt32
    Word32 ->                               -- advance_stride : TBasicType TUInt
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 1.8.6/
fontGetGlyphAdvancesForDirection ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: a font.
    -> HarfBuzz.Enums.DirectionT
    -> Word32
    -> Word32
    -> Word32
    -> Int32
    -> Word32
    -> m ()
fontGetGlyphAdvancesForDirection :: FontT
-> DirectionT
-> Word32
-> Word32
-> Word32
-> Int32
-> Word32
-> m ()
fontGetGlyphAdvancesForDirection FontT
font DirectionT
direction Word32
count Word32
firstGlyph Word32
glyphStride Int32
firstAdvance Word32
advanceStride = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
    let direction' :: CUInt
direction' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (DirectionT -> Int) -> DirectionT -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. DirectionT -> Int
forall a. Enum a => a -> Int
fromEnum) DirectionT
direction
    Ptr FontT
-> CUInt -> Word32 -> Word32 -> Word32 -> Int32 -> Word32 -> IO ()
hb_font_get_glyph_advances_for_direction Ptr FontT
font' CUInt
direction' Word32
count Word32
firstGlyph Word32
glyphStride Int32
firstAdvance Word32
advanceStride
    FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function font_get_glyph_advance_for_direction
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a font." , 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 = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "direction"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "direction_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , 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 = Nothing , 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 = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_get_glyph_advance_for_direction" hb_font_get_glyph_advance_for_direction :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    Word32 ->                               -- glyph : TBasicType TUInt32
    CUInt ->                                -- direction : TInterface (Name {namespace = "HarfBuzz", name = "direction_t"})
    Ptr Int32 ->                            -- x : TBasicType TInt32
    Ptr Int32 ->                            -- y : TBasicType TInt32
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
fontGetGlyphAdvanceForDirection ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: a font.
    -> Word32
    -> HarfBuzz.Enums.DirectionT
    -> m ((Int32, Int32))
fontGetGlyphAdvanceForDirection :: FontT -> Word32 -> DirectionT -> m (Int32, Int32)
fontGetGlyphAdvanceForDirection FontT
font Word32
glyph DirectionT
direction = IO (Int32, Int32) -> m (Int32, Int32)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Int32, Int32) -> m (Int32, Int32))
-> IO (Int32, Int32) -> m (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
    let direction' :: CUInt
direction' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (DirectionT -> Int) -> DirectionT -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. DirectionT -> Int
forall a. Enum a => a -> Int
fromEnum) DirectionT
direction
    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)
    Ptr FontT -> Word32 -> CUInt -> Ptr Int32 -> Ptr Int32 -> IO ()
hb_font_get_glyph_advance_for_direction Ptr FontT
font' Word32
glyph CUInt
direction' Ptr Int32
x Ptr Int32
y
    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) -> IO (Int32, Int32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
x', Int32
y')


-- function font_get_glyph
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a font." , 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 = Nothing , 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 = Nothing , 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 = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_get_glyph" hb_font_get_glyph :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    Word32 ->                               -- unicode : TBasicType TUInt32
    Word32 ->                               -- variation_selector : TBasicType TUInt32
    Ptr Word32 ->                           -- glyph : TBasicType TUInt32
    IO Int32

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
fontGetGlyph ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: a font.
    -> Word32
    -> Word32
    -> m ((Int32, Word32))
fontGetGlyph :: FontT -> Word32 -> Word32 -> m (Int32, Word32)
fontGetGlyph FontT
font Word32
unicode Word32
variationSelector = IO (Int32, Word32) -> m (Int32, Word32)
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 <- Ptr FontT -> Word32 -> Word32 -> Ptr Word32 -> IO Int32
hb_font_get_glyph Ptr FontT
font' Word32
unicode Word32
variationSelector Ptr Word32
glyph
    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 (m :: * -> *) a. Monad m => a -> m a
return (Int32
result, Word32
glyph')


-- function font_get_face
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a font." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "HarfBuzz" , name = "face_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_get_face" hb_font_get_face :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    IO (Ptr HarfBuzz.FaceT.FaceT)

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
fontGetFace ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: a font.
    -> m HarfBuzz.FaceT.FaceT
fontGetFace :: FontT -> m FaceT
fontGetFace FontT
font = IO FaceT -> m FaceT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FaceT -> m FaceT) -> IO FaceT -> m FaceT
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 FaceT
result <- Ptr FontT -> IO (Ptr FaceT)
hb_font_get_face Ptr FontT
font'
    Text -> Ptr FaceT -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"fontGetFace" Ptr FaceT
result
    FaceT
result' <- ((ManagedPtr FaceT -> FaceT) -> Ptr FaceT -> IO FaceT
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr FaceT -> FaceT
HarfBuzz.FaceT.FaceT) Ptr FaceT
result
    FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
font
    FaceT -> IO FaceT
forall (m :: * -> *) a. Monad m => a -> m a
return FaceT
result'


-- function font_get_extents_for_direction
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a font." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "direction"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "direction_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , 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 = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = True
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_get_extents_for_direction" hb_font_get_extents_for_direction :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    CUInt ->                                -- direction : TInterface (Name {namespace = "HarfBuzz", name = "direction_t"})
    Ptr HarfBuzz.FontExtentsT.FontExtentsT -> -- extents : TInterface (Name {namespace = "HarfBuzz", name = "font_extents_t"})
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 1.1.3/
fontGetExtentsForDirection ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: a font.
    -> HarfBuzz.Enums.DirectionT
    -> m (HarfBuzz.FontExtentsT.FontExtentsT)
fontGetExtentsForDirection :: FontT -> DirectionT -> m FontExtentsT
fontGetExtentsForDirection FontT
font DirectionT
direction = IO FontExtentsT -> m FontExtentsT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FontExtentsT -> m FontExtentsT)
-> IO FontExtentsT -> m 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
    let direction' :: CUInt
direction' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (DirectionT -> Int) -> DirectionT -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. DirectionT -> Int
forall a. Enum a => a -> Int
fromEnum) DirectionT
direction
    Ptr FontExtentsT
extents <- Int -> IO (Ptr FontExtentsT)
forall a. Int -> IO (Ptr a)
SP.callocBytes Int
48 :: IO (Ptr HarfBuzz.FontExtentsT.FontExtentsT)
    Ptr FontT -> CUInt -> Ptr FontExtentsT -> IO ()
hb_font_get_extents_for_direction Ptr FontT
font' CUInt
direction' Ptr FontExtentsT
extents
    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
    FontExtentsT -> IO FontExtentsT
forall (m :: * -> *) a. Monad m => a -> m a
return FontExtentsT
extents'


-- function font_get_empty
-- Args: []
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "HarfBuzz" , name = "font_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_get_empty" hb_font_get_empty :: 
    IO (Ptr HarfBuzz.FontT.FontT)

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
fontGetEmpty ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m HarfBuzz.FontT.FontT
fontGetEmpty :: m FontT
fontGetEmpty  = IO FontT -> m FontT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FontT -> m FontT) -> IO FontT -> m FontT
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontT
result <- IO (Ptr FontT)
hb_font_get_empty
    Text -> Ptr FontT -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"fontGetEmpty" Ptr FontT
result
    FontT
result' <- ((ManagedPtr FontT -> FontT) -> Ptr FontT -> IO FontT
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr FontT -> FontT
HarfBuzz.FontT.FontT) Ptr FontT
result
    FontT -> IO FontT
forall (m :: * -> *) a. Monad m => a -> m a
return FontT
result'


-- function font_funcs_set_variation_glyph_func
-- Args: [ Arg
--           { argCName = "ffuncs"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_funcs_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "font functions." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "func"
--           , argType =
--               TInterface
--                 Name
--                   { namespace = "HarfBuzz"
--                   , name = "font_get_variation_glyph_func_t"
--                   }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = 2
--           , argDestroy = 3
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "destroy"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "destroy_func_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_funcs_set_variation_glyph_func" hb_font_funcs_set_variation_glyph_func :: 
    Ptr HarfBuzz.FontFuncsT.FontFuncsT ->   -- ffuncs : TInterface (Name {namespace = "HarfBuzz", name = "font_funcs_t"})
    FunPtr HarfBuzz.Callbacks.C_FontGetVariationGlyphFuncT -> -- func : TInterface (Name {namespace = "HarfBuzz", name = "font_get_variation_glyph_func_t"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    FunPtr HarfBuzz.Callbacks.C_DestroyFuncT -> -- destroy : TInterface (Name {namespace = "HarfBuzz", name = "destroy_func_t"})
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 1.2.3/
fontFuncsSetVariationGlyphFunc ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontFuncsT.FontFuncsT
    -- ^ /@ffuncs@/: font functions.
    -> HarfBuzz.Callbacks.FontGetVariationGlyphFuncT
    -> m ()
fontFuncsSetVariationGlyphFunc :: FontFuncsT -> FontGetVariationGlyphFuncT -> m ()
fontFuncsSetVariationGlyphFunc FontFuncsT
ffuncs FontGetVariationGlyphFuncT
func = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontFuncsT
ffuncs' <- FontFuncsT -> IO (Ptr FontFuncsT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontFuncsT
ffuncs
    FunPtr C_FontGetVariationGlyphFuncT
func' <- C_FontGetVariationGlyphFuncT
-> IO (FunPtr C_FontGetVariationGlyphFuncT)
HarfBuzz.Callbacks.mk_FontGetVariationGlyphFuncT (Maybe (Ptr (FunPtr C_FontGetVariationGlyphFuncT))
-> FontGetVariationGlyphFuncT_WithClosures
-> C_FontGetVariationGlyphFuncT
HarfBuzz.Callbacks.wrap_FontGetVariationGlyphFuncT Maybe (Ptr (FunPtr C_FontGetVariationGlyphFuncT))
forall a. Maybe a
Nothing (FontGetVariationGlyphFuncT
-> FontGetVariationGlyphFuncT_WithClosures
HarfBuzz.Callbacks.drop_closures_FontGetVariationGlyphFuncT FontGetVariationGlyphFuncT
func))
    let userData :: Ptr ()
userData = FunPtr C_FontGetVariationGlyphFuncT -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_FontGetVariationGlyphFuncT
func'
    let destroy :: FunPtr (Ptr a -> IO ())
destroy = FunPtr (Ptr a -> IO ())
forall a. FunPtr (Ptr a -> IO ())
safeFreeFunPtrPtr
    Ptr FontFuncsT
-> FunPtr C_FontGetVariationGlyphFuncT
-> Ptr ()
-> FunPtr C_DestroyFuncT
-> IO ()
hb_font_funcs_set_variation_glyph_func Ptr FontFuncsT
ffuncs' FunPtr C_FontGetVariationGlyphFuncT
func' Ptr ()
userData FunPtr C_DestroyFuncT
forall a. FunPtr (Ptr a -> IO ())
destroy
    FontFuncsT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontFuncsT
ffuncs
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function font_funcs_set_nominal_glyphs_func
-- Args: [ Arg
--           { argCName = "ffuncs"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_funcs_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "font functions." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "func"
--           , argType =
--               TInterface
--                 Name
--                   { namespace = "HarfBuzz"
--                   , name = "font_get_nominal_glyphs_func_t"
--                   }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = 2
--           , argDestroy = 3
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "destroy"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "destroy_func_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_funcs_set_nominal_glyphs_func" hb_font_funcs_set_nominal_glyphs_func :: 
    Ptr HarfBuzz.FontFuncsT.FontFuncsT ->   -- ffuncs : TInterface (Name {namespace = "HarfBuzz", name = "font_funcs_t"})
    FunPtr HarfBuzz.Callbacks.C_FontGetNominalGlyphsFuncT -> -- func : TInterface (Name {namespace = "HarfBuzz", name = "font_get_nominal_glyphs_func_t"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    FunPtr HarfBuzz.Callbacks.C_DestroyFuncT -> -- destroy : TInterface (Name {namespace = "HarfBuzz", name = "destroy_func_t"})
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 2.0.0/
fontFuncsSetNominalGlyphsFunc ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontFuncsT.FontFuncsT
    -- ^ /@ffuncs@/: font functions.
    -> HarfBuzz.Callbacks.FontGetNominalGlyphsFuncT
    -> m ()
fontFuncsSetNominalGlyphsFunc :: FontFuncsT -> FontGetNominalGlyphsFuncT -> m ()
fontFuncsSetNominalGlyphsFunc FontFuncsT
ffuncs FontGetNominalGlyphsFuncT
func = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontFuncsT
ffuncs' <- FontFuncsT -> IO (Ptr FontFuncsT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontFuncsT
ffuncs
    FunPtr C_FontGetNominalGlyphsFuncT
func' <- C_FontGetNominalGlyphsFuncT
-> IO (FunPtr C_FontGetNominalGlyphsFuncT)
HarfBuzz.Callbacks.mk_FontGetNominalGlyphsFuncT (Maybe (Ptr (FunPtr C_FontGetNominalGlyphsFuncT))
-> FontGetNominalGlyphsFuncT_WithClosures
-> C_FontGetNominalGlyphsFuncT
HarfBuzz.Callbacks.wrap_FontGetNominalGlyphsFuncT Maybe (Ptr (FunPtr C_FontGetNominalGlyphsFuncT))
forall a. Maybe a
Nothing (FontGetNominalGlyphsFuncT -> FontGetNominalGlyphsFuncT_WithClosures
HarfBuzz.Callbacks.drop_closures_FontGetNominalGlyphsFuncT FontGetNominalGlyphsFuncT
func))
    let userData :: Ptr ()
userData = FunPtr C_FontGetNominalGlyphsFuncT -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_FontGetNominalGlyphsFuncT
func'
    let destroy :: FunPtr (Ptr a -> IO ())
destroy = FunPtr (Ptr a -> IO ())
forall a. FunPtr (Ptr a -> IO ())
safeFreeFunPtrPtr
    Ptr FontFuncsT
-> FunPtr C_FontGetNominalGlyphsFuncT
-> Ptr ()
-> FunPtr C_DestroyFuncT
-> IO ()
hb_font_funcs_set_nominal_glyphs_func Ptr FontFuncsT
ffuncs' FunPtr C_FontGetNominalGlyphsFuncT
func' Ptr ()
userData FunPtr C_DestroyFuncT
forall a. FunPtr (Ptr a -> IO ())
destroy
    FontFuncsT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontFuncsT
ffuncs
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function font_funcs_set_nominal_glyph_func
-- Args: [ Arg
--           { argCName = "ffuncs"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_funcs_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "font functions." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "func"
--           , argType =
--               TInterface
--                 Name
--                   { namespace = "HarfBuzz" , name = "font_get_nominal_glyph_func_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = 2
--           , argDestroy = 3
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "destroy"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "destroy_func_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_funcs_set_nominal_glyph_func" hb_font_funcs_set_nominal_glyph_func :: 
    Ptr HarfBuzz.FontFuncsT.FontFuncsT ->   -- ffuncs : TInterface (Name {namespace = "HarfBuzz", name = "font_funcs_t"})
    FunPtr HarfBuzz.Callbacks.C_FontGetNominalGlyphFuncT -> -- func : TInterface (Name {namespace = "HarfBuzz", name = "font_get_nominal_glyph_func_t"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    FunPtr HarfBuzz.Callbacks.C_DestroyFuncT -> -- destroy : TInterface (Name {namespace = "HarfBuzz", name = "destroy_func_t"})
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 1.2.3/
fontFuncsSetNominalGlyphFunc ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontFuncsT.FontFuncsT
    -- ^ /@ffuncs@/: font functions.
    -> HarfBuzz.Callbacks.FontGetNominalGlyphFuncT
    -> m ()
fontFuncsSetNominalGlyphFunc :: FontFuncsT -> FontGetNominalGlyphFuncT -> m ()
fontFuncsSetNominalGlyphFunc FontFuncsT
ffuncs FontGetNominalGlyphFuncT
func = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontFuncsT
ffuncs' <- FontFuncsT -> IO (Ptr FontFuncsT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontFuncsT
ffuncs
    FunPtr C_FontGetNominalGlyphFuncT
func' <- C_FontGetNominalGlyphFuncT
-> IO (FunPtr C_FontGetNominalGlyphFuncT)
HarfBuzz.Callbacks.mk_FontGetNominalGlyphFuncT (Maybe (Ptr (FunPtr C_FontGetNominalGlyphFuncT))
-> FontGetNominalGlyphFuncT_WithClosures
-> C_FontGetNominalGlyphFuncT
HarfBuzz.Callbacks.wrap_FontGetNominalGlyphFuncT Maybe (Ptr (FunPtr C_FontGetNominalGlyphFuncT))
forall a. Maybe a
Nothing (FontGetNominalGlyphFuncT -> FontGetNominalGlyphFuncT_WithClosures
HarfBuzz.Callbacks.drop_closures_FontGetNominalGlyphFuncT FontGetNominalGlyphFuncT
func))
    let userData :: Ptr ()
userData = FunPtr C_FontGetNominalGlyphFuncT -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_FontGetNominalGlyphFuncT
func'
    let destroy :: FunPtr (Ptr a -> IO ())
destroy = FunPtr (Ptr a -> IO ())
forall a. FunPtr (Ptr a -> IO ())
safeFreeFunPtrPtr
    Ptr FontFuncsT
-> FunPtr C_FontGetNominalGlyphFuncT
-> Ptr ()
-> FunPtr C_DestroyFuncT
-> IO ()
hb_font_funcs_set_nominal_glyph_func Ptr FontFuncsT
ffuncs' FunPtr C_FontGetNominalGlyphFuncT
func' Ptr ()
userData FunPtr C_DestroyFuncT
forall a. FunPtr (Ptr a -> IO ())
destroy
    FontFuncsT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontFuncsT
ffuncs
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function font_funcs_set_glyph_v_origin_func
-- Args: [ Arg
--           { argCName = "ffuncs"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_funcs_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "font functions." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "func"
--           , argType =
--               TInterface
--                 Name
--                   { namespace = "HarfBuzz" , name = "font_get_glyph_origin_func_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = 2
--           , argDestroy = 3
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "destroy"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "destroy_func_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_funcs_set_glyph_v_origin_func" hb_font_funcs_set_glyph_v_origin_func :: 
    Ptr HarfBuzz.FontFuncsT.FontFuncsT ->   -- ffuncs : TInterface (Name {namespace = "HarfBuzz", name = "font_funcs_t"})
    FunPtr HarfBuzz.Callbacks.C_FontGetGlyphOriginFuncT -> -- func : TInterface (Name {namespace = "HarfBuzz", name = "font_get_glyph_origin_func_t"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    FunPtr HarfBuzz.Callbacks.C_DestroyFuncT -> -- destroy : TInterface (Name {namespace = "HarfBuzz", name = "destroy_func_t"})
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
fontFuncsSetGlyphVOriginFunc ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontFuncsT.FontFuncsT
    -- ^ /@ffuncs@/: font functions.
    -> HarfBuzz.Callbacks.FontGetGlyphOriginFuncT
    -> m ()
fontFuncsSetGlyphVOriginFunc :: FontFuncsT -> FontGetGlyphOriginFuncT -> m ()
fontFuncsSetGlyphVOriginFunc FontFuncsT
ffuncs FontGetGlyphOriginFuncT
func = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontFuncsT
ffuncs' <- FontFuncsT -> IO (Ptr FontFuncsT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontFuncsT
ffuncs
    FunPtr C_FontGetGlyphOriginFuncT
func' <- C_FontGetGlyphOriginFuncT -> IO (FunPtr C_FontGetGlyphOriginFuncT)
HarfBuzz.Callbacks.mk_FontGetGlyphOriginFuncT (Maybe (Ptr (FunPtr C_FontGetGlyphOriginFuncT))
-> FontGetGlyphOriginFuncT_WithClosures
-> C_FontGetGlyphOriginFuncT
HarfBuzz.Callbacks.wrap_FontGetGlyphOriginFuncT Maybe (Ptr (FunPtr C_FontGetGlyphOriginFuncT))
forall a. Maybe a
Nothing (FontGetGlyphOriginFuncT -> FontGetGlyphOriginFuncT_WithClosures
HarfBuzz.Callbacks.drop_closures_FontGetGlyphOriginFuncT FontGetGlyphOriginFuncT
func))
    let userData :: Ptr ()
userData = FunPtr C_FontGetGlyphOriginFuncT -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_FontGetGlyphOriginFuncT
func'
    let destroy :: FunPtr (Ptr a -> IO ())
destroy = FunPtr (Ptr a -> IO ())
forall a. FunPtr (Ptr a -> IO ())
safeFreeFunPtrPtr
    Ptr FontFuncsT
-> FunPtr C_FontGetGlyphOriginFuncT
-> Ptr ()
-> FunPtr C_DestroyFuncT
-> IO ()
hb_font_funcs_set_glyph_v_origin_func Ptr FontFuncsT
ffuncs' FunPtr C_FontGetGlyphOriginFuncT
func' Ptr ()
userData FunPtr C_DestroyFuncT
forall a. FunPtr (Ptr a -> IO ())
destroy
    FontFuncsT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontFuncsT
ffuncs
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function font_funcs_set_glyph_v_kerning_func
-- Args: [ Arg
--           { argCName = "ffuncs"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_funcs_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "font functions." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "func"
--           , argType =
--               TInterface
--                 Name
--                   { namespace = "HarfBuzz" , name = "font_get_glyph_kerning_func_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = 2
--           , argDestroy = 3
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "destroy"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "destroy_func_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_funcs_set_glyph_v_kerning_func" hb_font_funcs_set_glyph_v_kerning_func :: 
    Ptr HarfBuzz.FontFuncsT.FontFuncsT ->   -- ffuncs : TInterface (Name {namespace = "HarfBuzz", name = "font_funcs_t"})
    FunPtr HarfBuzz.Callbacks.C_FontGetGlyphKerningFuncT -> -- func : TInterface (Name {namespace = "HarfBuzz", name = "font_get_glyph_kerning_func_t"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    FunPtr HarfBuzz.Callbacks.C_DestroyFuncT -> -- destroy : TInterface (Name {namespace = "HarfBuzz", name = "destroy_func_t"})
    IO ()

{-# DEPRECATED fontFuncsSetGlyphVKerningFunc ["(Since version 2.0.0)"] #-}
-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
fontFuncsSetGlyphVKerningFunc ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontFuncsT.FontFuncsT
    -- ^ /@ffuncs@/: font functions.
    -> HarfBuzz.Callbacks.FontGetGlyphKerningFuncT
    -> m ()
fontFuncsSetGlyphVKerningFunc :: FontFuncsT -> FontGetNominalGlyphFuncT -> m ()
fontFuncsSetGlyphVKerningFunc FontFuncsT
ffuncs FontGetNominalGlyphFuncT
func = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontFuncsT
ffuncs' <- FontFuncsT -> IO (Ptr FontFuncsT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontFuncsT
ffuncs
    FunPtr C_FontGetNominalGlyphFuncT
func' <- C_FontGetNominalGlyphFuncT
-> IO (FunPtr C_FontGetNominalGlyphFuncT)
HarfBuzz.Callbacks.mk_FontGetGlyphKerningFuncT (Maybe (Ptr (FunPtr C_FontGetNominalGlyphFuncT))
-> FontGetNominalGlyphFuncT_WithClosures
-> C_FontGetNominalGlyphFuncT
HarfBuzz.Callbacks.wrap_FontGetGlyphKerningFuncT Maybe (Ptr (FunPtr C_FontGetNominalGlyphFuncT))
forall a. Maybe a
Nothing (FontGetNominalGlyphFuncT -> FontGetNominalGlyphFuncT_WithClosures
HarfBuzz.Callbacks.drop_closures_FontGetGlyphKerningFuncT FontGetNominalGlyphFuncT
func))
    let userData :: Ptr ()
userData = FunPtr C_FontGetNominalGlyphFuncT -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_FontGetNominalGlyphFuncT
func'
    let destroy :: FunPtr (Ptr a -> IO ())
destroy = FunPtr (Ptr a -> IO ())
forall a. FunPtr (Ptr a -> IO ())
safeFreeFunPtrPtr
    Ptr FontFuncsT
-> FunPtr C_FontGetNominalGlyphFuncT
-> Ptr ()
-> FunPtr C_DestroyFuncT
-> IO ()
hb_font_funcs_set_glyph_v_kerning_func Ptr FontFuncsT
ffuncs' FunPtr C_FontGetNominalGlyphFuncT
func' Ptr ()
userData FunPtr C_DestroyFuncT
forall a. FunPtr (Ptr a -> IO ())
destroy
    FontFuncsT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontFuncsT
ffuncs
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function font_funcs_set_glyph_v_advances_func
-- Args: [ Arg
--           { argCName = "ffuncs"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_funcs_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "font functions." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "func"
--           , argType =
--               TInterface
--                 Name
--                   { namespace = "HarfBuzz"
--                   , name = "font_get_glyph_advances_func_t"
--                   }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = 2
--           , argDestroy = 3
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "destroy"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "destroy_func_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_funcs_set_glyph_v_advances_func" hb_font_funcs_set_glyph_v_advances_func :: 
    Ptr HarfBuzz.FontFuncsT.FontFuncsT ->   -- ffuncs : TInterface (Name {namespace = "HarfBuzz", name = "font_funcs_t"})
    FunPtr HarfBuzz.Callbacks.C_FontGetGlyphAdvancesFuncT -> -- func : TInterface (Name {namespace = "HarfBuzz", name = "font_get_glyph_advances_func_t"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    FunPtr HarfBuzz.Callbacks.C_DestroyFuncT -> -- destroy : TInterface (Name {namespace = "HarfBuzz", name = "destroy_func_t"})
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 1.8.6/
fontFuncsSetGlyphVAdvancesFunc ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontFuncsT.FontFuncsT
    -- ^ /@ffuncs@/: font functions.
    -> HarfBuzz.Callbacks.FontGetGlyphAdvancesFuncT
    -> m ()
fontFuncsSetGlyphVAdvancesFunc :: FontFuncsT -> FontGetGlyphAdvancesFuncT -> m ()
fontFuncsSetGlyphVAdvancesFunc FontFuncsT
ffuncs FontGetGlyphAdvancesFuncT
func = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontFuncsT
ffuncs' <- FontFuncsT -> IO (Ptr FontFuncsT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontFuncsT
ffuncs
    FunPtr C_FontGetGlyphAdvancesFuncT
func' <- C_FontGetGlyphAdvancesFuncT
-> IO (FunPtr C_FontGetGlyphAdvancesFuncT)
HarfBuzz.Callbacks.mk_FontGetGlyphAdvancesFuncT (Maybe (Ptr (FunPtr C_FontGetGlyphAdvancesFuncT))
-> FontGetGlyphAdvancesFuncT_WithClosures
-> C_FontGetGlyphAdvancesFuncT
HarfBuzz.Callbacks.wrap_FontGetGlyphAdvancesFuncT Maybe (Ptr (FunPtr C_FontGetGlyphAdvancesFuncT))
forall a. Maybe a
Nothing (FontGetGlyphAdvancesFuncT -> FontGetGlyphAdvancesFuncT_WithClosures
HarfBuzz.Callbacks.drop_closures_FontGetGlyphAdvancesFuncT FontGetGlyphAdvancesFuncT
func))
    let userData :: Ptr ()
userData = FunPtr C_FontGetGlyphAdvancesFuncT -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_FontGetGlyphAdvancesFuncT
func'
    let destroy :: FunPtr (Ptr a -> IO ())
destroy = FunPtr (Ptr a -> IO ())
forall a. FunPtr (Ptr a -> IO ())
safeFreeFunPtrPtr
    Ptr FontFuncsT
-> FunPtr C_FontGetGlyphAdvancesFuncT
-> Ptr ()
-> FunPtr C_DestroyFuncT
-> IO ()
hb_font_funcs_set_glyph_v_advances_func Ptr FontFuncsT
ffuncs' FunPtr C_FontGetGlyphAdvancesFuncT
func' Ptr ()
userData FunPtr C_DestroyFuncT
forall a. FunPtr (Ptr a -> IO ())
destroy
    FontFuncsT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontFuncsT
ffuncs
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function font_funcs_set_glyph_v_advance_func
-- Args: [ Arg
--           { argCName = "ffuncs"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_funcs_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "font functions." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "func"
--           , argType =
--               TInterface
--                 Name
--                   { namespace = "HarfBuzz" , name = "font_get_glyph_advance_func_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = 2
--           , argDestroy = 3
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "destroy"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "destroy_func_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_funcs_set_glyph_v_advance_func" hb_font_funcs_set_glyph_v_advance_func :: 
    Ptr HarfBuzz.FontFuncsT.FontFuncsT ->   -- ffuncs : TInterface (Name {namespace = "HarfBuzz", name = "font_funcs_t"})
    FunPtr HarfBuzz.Callbacks.C_FontGetGlyphAdvanceFuncT -> -- func : TInterface (Name {namespace = "HarfBuzz", name = "font_get_glyph_advance_func_t"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    FunPtr HarfBuzz.Callbacks.C_DestroyFuncT -> -- destroy : TInterface (Name {namespace = "HarfBuzz", name = "destroy_func_t"})
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
fontFuncsSetGlyphVAdvanceFunc ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontFuncsT.FontFuncsT
    -- ^ /@ffuncs@/: font functions.
    -> HarfBuzz.Callbacks.FontGetGlyphAdvanceFuncT
    -> m ()
fontFuncsSetGlyphVAdvanceFunc :: FontFuncsT -> FontGetGlyphAdvanceFuncT -> m ()
fontFuncsSetGlyphVAdvanceFunc FontFuncsT
ffuncs FontGetGlyphAdvanceFuncT
func = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontFuncsT
ffuncs' <- FontFuncsT -> IO (Ptr FontFuncsT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontFuncsT
ffuncs
    FunPtr C_FontGetGlyphAdvanceFuncT
func' <- C_FontGetGlyphAdvanceFuncT
-> IO (FunPtr C_FontGetGlyphAdvanceFuncT)
HarfBuzz.Callbacks.mk_FontGetGlyphAdvanceFuncT (Maybe (Ptr (FunPtr C_FontGetGlyphAdvanceFuncT))
-> FontGetGlyphAdvanceFuncT_WithClosures
-> C_FontGetGlyphAdvanceFuncT
HarfBuzz.Callbacks.wrap_FontGetGlyphAdvanceFuncT Maybe (Ptr (FunPtr C_FontGetGlyphAdvanceFuncT))
forall a. Maybe a
Nothing (FontGetGlyphAdvanceFuncT -> FontGetGlyphAdvanceFuncT_WithClosures
HarfBuzz.Callbacks.drop_closures_FontGetGlyphAdvanceFuncT FontGetGlyphAdvanceFuncT
func))
    let userData :: Ptr ()
userData = FunPtr C_FontGetGlyphAdvanceFuncT -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_FontGetGlyphAdvanceFuncT
func'
    let destroy :: FunPtr (Ptr a -> IO ())
destroy = FunPtr (Ptr a -> IO ())
forall a. FunPtr (Ptr a -> IO ())
safeFreeFunPtrPtr
    Ptr FontFuncsT
-> FunPtr C_FontGetGlyphAdvanceFuncT
-> Ptr ()
-> FunPtr C_DestroyFuncT
-> IO ()
hb_font_funcs_set_glyph_v_advance_func Ptr FontFuncsT
ffuncs' FunPtr C_FontGetGlyphAdvanceFuncT
func' Ptr ()
userData FunPtr C_DestroyFuncT
forall a. FunPtr (Ptr a -> IO ())
destroy
    FontFuncsT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontFuncsT
ffuncs
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function font_funcs_set_glyph_name_func
-- Args: [ Arg
--           { argCName = "ffuncs"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_funcs_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "font functions." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "func"
--           , argType =
--               TInterface
--                 Name
--                   { namespace = "HarfBuzz" , name = "font_get_glyph_name_func_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = 2
--           , argDestroy = 3
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "destroy"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "destroy_func_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_funcs_set_glyph_name_func" hb_font_funcs_set_glyph_name_func :: 
    Ptr HarfBuzz.FontFuncsT.FontFuncsT ->   -- ffuncs : TInterface (Name {namespace = "HarfBuzz", name = "font_funcs_t"})
    FunPtr HarfBuzz.Callbacks.C_FontGetGlyphNameFuncT -> -- func : TInterface (Name {namespace = "HarfBuzz", name = "font_get_glyph_name_func_t"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    FunPtr HarfBuzz.Callbacks.C_DestroyFuncT -> -- destroy : TInterface (Name {namespace = "HarfBuzz", name = "destroy_func_t"})
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
fontFuncsSetGlyphNameFunc ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontFuncsT.FontFuncsT
    -- ^ /@ffuncs@/: font functions.
    -> HarfBuzz.Callbacks.FontGetGlyphNameFuncT
    -> m ()
fontFuncsSetGlyphNameFunc :: FontFuncsT -> FontGetGlyphNameFuncT -> m ()
fontFuncsSetGlyphNameFunc FontFuncsT
ffuncs FontGetGlyphNameFuncT
func = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontFuncsT
ffuncs' <- FontFuncsT -> IO (Ptr FontFuncsT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontFuncsT
ffuncs
    FunPtr C_FontGetGlyphNameFuncT
func' <- C_FontGetGlyphNameFuncT -> IO (FunPtr C_FontGetGlyphNameFuncT)
HarfBuzz.Callbacks.mk_FontGetGlyphNameFuncT (Maybe (Ptr (FunPtr C_FontGetGlyphNameFuncT))
-> FontGetGlyphNameFuncT_WithClosures -> C_FontGetGlyphNameFuncT
HarfBuzz.Callbacks.wrap_FontGetGlyphNameFuncT Maybe (Ptr (FunPtr C_FontGetGlyphNameFuncT))
forall a. Maybe a
Nothing (FontGetGlyphNameFuncT -> FontGetGlyphNameFuncT_WithClosures
HarfBuzz.Callbacks.drop_closures_FontGetGlyphNameFuncT FontGetGlyphNameFuncT
func))
    let userData :: Ptr ()
userData = FunPtr C_FontGetGlyphNameFuncT -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_FontGetGlyphNameFuncT
func'
    let destroy :: FunPtr (Ptr a -> IO ())
destroy = FunPtr (Ptr a -> IO ())
forall a. FunPtr (Ptr a -> IO ())
safeFreeFunPtrPtr
    Ptr FontFuncsT
-> FunPtr C_FontGetGlyphNameFuncT
-> Ptr ()
-> FunPtr C_DestroyFuncT
-> IO ()
hb_font_funcs_set_glyph_name_func Ptr FontFuncsT
ffuncs' FunPtr C_FontGetGlyphNameFuncT
func' Ptr ()
userData FunPtr C_DestroyFuncT
forall a. FunPtr (Ptr a -> IO ())
destroy
    FontFuncsT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontFuncsT
ffuncs
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function font_funcs_set_glyph_h_origin_func
-- Args: [ Arg
--           { argCName = "ffuncs"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_funcs_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "font functions." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "func"
--           , argType =
--               TInterface
--                 Name
--                   { namespace = "HarfBuzz" , name = "font_get_glyph_origin_func_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = 2
--           , argDestroy = 3
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "destroy"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "destroy_func_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_funcs_set_glyph_h_origin_func" hb_font_funcs_set_glyph_h_origin_func :: 
    Ptr HarfBuzz.FontFuncsT.FontFuncsT ->   -- ffuncs : TInterface (Name {namespace = "HarfBuzz", name = "font_funcs_t"})
    FunPtr HarfBuzz.Callbacks.C_FontGetGlyphOriginFuncT -> -- func : TInterface (Name {namespace = "HarfBuzz", name = "font_get_glyph_origin_func_t"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    FunPtr HarfBuzz.Callbacks.C_DestroyFuncT -> -- destroy : TInterface (Name {namespace = "HarfBuzz", name = "destroy_func_t"})
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
fontFuncsSetGlyphHOriginFunc ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontFuncsT.FontFuncsT
    -- ^ /@ffuncs@/: font functions.
    -> HarfBuzz.Callbacks.FontGetGlyphOriginFuncT
    -> m ()
fontFuncsSetGlyphHOriginFunc :: FontFuncsT -> FontGetGlyphOriginFuncT -> m ()
fontFuncsSetGlyphHOriginFunc FontFuncsT
ffuncs FontGetGlyphOriginFuncT
func = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontFuncsT
ffuncs' <- FontFuncsT -> IO (Ptr FontFuncsT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontFuncsT
ffuncs
    FunPtr C_FontGetGlyphOriginFuncT
func' <- C_FontGetGlyphOriginFuncT -> IO (FunPtr C_FontGetGlyphOriginFuncT)
HarfBuzz.Callbacks.mk_FontGetGlyphOriginFuncT (Maybe (Ptr (FunPtr C_FontGetGlyphOriginFuncT))
-> FontGetGlyphOriginFuncT_WithClosures
-> C_FontGetGlyphOriginFuncT
HarfBuzz.Callbacks.wrap_FontGetGlyphOriginFuncT Maybe (Ptr (FunPtr C_FontGetGlyphOriginFuncT))
forall a. Maybe a
Nothing (FontGetGlyphOriginFuncT -> FontGetGlyphOriginFuncT_WithClosures
HarfBuzz.Callbacks.drop_closures_FontGetGlyphOriginFuncT FontGetGlyphOriginFuncT
func))
    let userData :: Ptr ()
userData = FunPtr C_FontGetGlyphOriginFuncT -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_FontGetGlyphOriginFuncT
func'
    let destroy :: FunPtr (Ptr a -> IO ())
destroy = FunPtr (Ptr a -> IO ())
forall a. FunPtr (Ptr a -> IO ())
safeFreeFunPtrPtr
    Ptr FontFuncsT
-> FunPtr C_FontGetGlyphOriginFuncT
-> Ptr ()
-> FunPtr C_DestroyFuncT
-> IO ()
hb_font_funcs_set_glyph_h_origin_func Ptr FontFuncsT
ffuncs' FunPtr C_FontGetGlyphOriginFuncT
func' Ptr ()
userData FunPtr C_DestroyFuncT
forall a. FunPtr (Ptr a -> IO ())
destroy
    FontFuncsT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontFuncsT
ffuncs
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function font_funcs_set_glyph_h_kerning_func
-- Args: [ Arg
--           { argCName = "ffuncs"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_funcs_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "font functions." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "func"
--           , argType =
--               TInterface
--                 Name
--                   { namespace = "HarfBuzz" , name = "font_get_glyph_kerning_func_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = 2
--           , argDestroy = 3
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "destroy"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "destroy_func_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_funcs_set_glyph_h_kerning_func" hb_font_funcs_set_glyph_h_kerning_func :: 
    Ptr HarfBuzz.FontFuncsT.FontFuncsT ->   -- ffuncs : TInterface (Name {namespace = "HarfBuzz", name = "font_funcs_t"})
    FunPtr HarfBuzz.Callbacks.C_FontGetGlyphKerningFuncT -> -- func : TInterface (Name {namespace = "HarfBuzz", name = "font_get_glyph_kerning_func_t"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    FunPtr HarfBuzz.Callbacks.C_DestroyFuncT -> -- destroy : TInterface (Name {namespace = "HarfBuzz", name = "destroy_func_t"})
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
fontFuncsSetGlyphHKerningFunc ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontFuncsT.FontFuncsT
    -- ^ /@ffuncs@/: font functions.
    -> HarfBuzz.Callbacks.FontGetGlyphKerningFuncT
    -> m ()
fontFuncsSetGlyphHKerningFunc :: FontFuncsT -> FontGetNominalGlyphFuncT -> m ()
fontFuncsSetGlyphHKerningFunc FontFuncsT
ffuncs FontGetNominalGlyphFuncT
func = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontFuncsT
ffuncs' <- FontFuncsT -> IO (Ptr FontFuncsT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontFuncsT
ffuncs
    FunPtr C_FontGetNominalGlyphFuncT
func' <- C_FontGetNominalGlyphFuncT
-> IO (FunPtr C_FontGetNominalGlyphFuncT)
HarfBuzz.Callbacks.mk_FontGetGlyphKerningFuncT (Maybe (Ptr (FunPtr C_FontGetNominalGlyphFuncT))
-> FontGetNominalGlyphFuncT_WithClosures
-> C_FontGetNominalGlyphFuncT
HarfBuzz.Callbacks.wrap_FontGetGlyphKerningFuncT Maybe (Ptr (FunPtr C_FontGetNominalGlyphFuncT))
forall a. Maybe a
Nothing (FontGetNominalGlyphFuncT -> FontGetNominalGlyphFuncT_WithClosures
HarfBuzz.Callbacks.drop_closures_FontGetGlyphKerningFuncT FontGetNominalGlyphFuncT
func))
    let userData :: Ptr ()
userData = FunPtr C_FontGetNominalGlyphFuncT -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_FontGetNominalGlyphFuncT
func'
    let destroy :: FunPtr (Ptr a -> IO ())
destroy = FunPtr (Ptr a -> IO ())
forall a. FunPtr (Ptr a -> IO ())
safeFreeFunPtrPtr
    Ptr FontFuncsT
-> FunPtr C_FontGetNominalGlyphFuncT
-> Ptr ()
-> FunPtr C_DestroyFuncT
-> IO ()
hb_font_funcs_set_glyph_h_kerning_func Ptr FontFuncsT
ffuncs' FunPtr C_FontGetNominalGlyphFuncT
func' Ptr ()
userData FunPtr C_DestroyFuncT
forall a. FunPtr (Ptr a -> IO ())
destroy
    FontFuncsT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontFuncsT
ffuncs
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function font_funcs_set_glyph_h_advances_func
-- Args: [ Arg
--           { argCName = "ffuncs"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_funcs_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "font functions." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "func"
--           , argType =
--               TInterface
--                 Name
--                   { namespace = "HarfBuzz"
--                   , name = "font_get_glyph_advances_func_t"
--                   }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = 2
--           , argDestroy = 3
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "destroy"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "destroy_func_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_funcs_set_glyph_h_advances_func" hb_font_funcs_set_glyph_h_advances_func :: 
    Ptr HarfBuzz.FontFuncsT.FontFuncsT ->   -- ffuncs : TInterface (Name {namespace = "HarfBuzz", name = "font_funcs_t"})
    FunPtr HarfBuzz.Callbacks.C_FontGetGlyphAdvancesFuncT -> -- func : TInterface (Name {namespace = "HarfBuzz", name = "font_get_glyph_advances_func_t"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    FunPtr HarfBuzz.Callbacks.C_DestroyFuncT -> -- destroy : TInterface (Name {namespace = "HarfBuzz", name = "destroy_func_t"})
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 1.8.6/
fontFuncsSetGlyphHAdvancesFunc ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontFuncsT.FontFuncsT
    -- ^ /@ffuncs@/: font functions.
    -> HarfBuzz.Callbacks.FontGetGlyphAdvancesFuncT
    -> m ()
fontFuncsSetGlyphHAdvancesFunc :: FontFuncsT -> FontGetGlyphAdvancesFuncT -> m ()
fontFuncsSetGlyphHAdvancesFunc FontFuncsT
ffuncs FontGetGlyphAdvancesFuncT
func = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontFuncsT
ffuncs' <- FontFuncsT -> IO (Ptr FontFuncsT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontFuncsT
ffuncs
    FunPtr C_FontGetGlyphAdvancesFuncT
func' <- C_FontGetGlyphAdvancesFuncT
-> IO (FunPtr C_FontGetGlyphAdvancesFuncT)
HarfBuzz.Callbacks.mk_FontGetGlyphAdvancesFuncT (Maybe (Ptr (FunPtr C_FontGetGlyphAdvancesFuncT))
-> FontGetGlyphAdvancesFuncT_WithClosures
-> C_FontGetGlyphAdvancesFuncT
HarfBuzz.Callbacks.wrap_FontGetGlyphAdvancesFuncT Maybe (Ptr (FunPtr C_FontGetGlyphAdvancesFuncT))
forall a. Maybe a
Nothing (FontGetGlyphAdvancesFuncT -> FontGetGlyphAdvancesFuncT_WithClosures
HarfBuzz.Callbacks.drop_closures_FontGetGlyphAdvancesFuncT FontGetGlyphAdvancesFuncT
func))
    let userData :: Ptr ()
userData = FunPtr C_FontGetGlyphAdvancesFuncT -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_FontGetGlyphAdvancesFuncT
func'
    let destroy :: FunPtr (Ptr a -> IO ())
destroy = FunPtr (Ptr a -> IO ())
forall a. FunPtr (Ptr a -> IO ())
safeFreeFunPtrPtr
    Ptr FontFuncsT
-> FunPtr C_FontGetGlyphAdvancesFuncT
-> Ptr ()
-> FunPtr C_DestroyFuncT
-> IO ()
hb_font_funcs_set_glyph_h_advances_func Ptr FontFuncsT
ffuncs' FunPtr C_FontGetGlyphAdvancesFuncT
func' Ptr ()
userData FunPtr C_DestroyFuncT
forall a. FunPtr (Ptr a -> IO ())
destroy
    FontFuncsT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontFuncsT
ffuncs
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function font_funcs_set_glyph_h_advance_func
-- Args: [ Arg
--           { argCName = "ffuncs"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_funcs_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "font functions." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "func"
--           , argType =
--               TInterface
--                 Name
--                   { namespace = "HarfBuzz" , name = "font_get_glyph_advance_func_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = 2
--           , argDestroy = 3
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "destroy"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "destroy_func_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_funcs_set_glyph_h_advance_func" hb_font_funcs_set_glyph_h_advance_func :: 
    Ptr HarfBuzz.FontFuncsT.FontFuncsT ->   -- ffuncs : TInterface (Name {namespace = "HarfBuzz", name = "font_funcs_t"})
    FunPtr HarfBuzz.Callbacks.C_FontGetGlyphAdvanceFuncT -> -- func : TInterface (Name {namespace = "HarfBuzz", name = "font_get_glyph_advance_func_t"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    FunPtr HarfBuzz.Callbacks.C_DestroyFuncT -> -- destroy : TInterface (Name {namespace = "HarfBuzz", name = "destroy_func_t"})
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
fontFuncsSetGlyphHAdvanceFunc ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontFuncsT.FontFuncsT
    -- ^ /@ffuncs@/: font functions.
    -> HarfBuzz.Callbacks.FontGetGlyphAdvanceFuncT
    -> m ()
fontFuncsSetGlyphHAdvanceFunc :: FontFuncsT -> FontGetGlyphAdvanceFuncT -> m ()
fontFuncsSetGlyphHAdvanceFunc FontFuncsT
ffuncs FontGetGlyphAdvanceFuncT
func = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontFuncsT
ffuncs' <- FontFuncsT -> IO (Ptr FontFuncsT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontFuncsT
ffuncs
    FunPtr C_FontGetGlyphAdvanceFuncT
func' <- C_FontGetGlyphAdvanceFuncT
-> IO (FunPtr C_FontGetGlyphAdvanceFuncT)
HarfBuzz.Callbacks.mk_FontGetGlyphAdvanceFuncT (Maybe (Ptr (FunPtr C_FontGetGlyphAdvanceFuncT))
-> FontGetGlyphAdvanceFuncT_WithClosures
-> C_FontGetGlyphAdvanceFuncT
HarfBuzz.Callbacks.wrap_FontGetGlyphAdvanceFuncT Maybe (Ptr (FunPtr C_FontGetGlyphAdvanceFuncT))
forall a. Maybe a
Nothing (FontGetGlyphAdvanceFuncT -> FontGetGlyphAdvanceFuncT_WithClosures
HarfBuzz.Callbacks.drop_closures_FontGetGlyphAdvanceFuncT FontGetGlyphAdvanceFuncT
func))
    let userData :: Ptr ()
userData = FunPtr C_FontGetGlyphAdvanceFuncT -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_FontGetGlyphAdvanceFuncT
func'
    let destroy :: FunPtr (Ptr a -> IO ())
destroy = FunPtr (Ptr a -> IO ())
forall a. FunPtr (Ptr a -> IO ())
safeFreeFunPtrPtr
    Ptr FontFuncsT
-> FunPtr C_FontGetGlyphAdvanceFuncT
-> Ptr ()
-> FunPtr C_DestroyFuncT
-> IO ()
hb_font_funcs_set_glyph_h_advance_func Ptr FontFuncsT
ffuncs' FunPtr C_FontGetGlyphAdvanceFuncT
func' Ptr ()
userData FunPtr C_DestroyFuncT
forall a. FunPtr (Ptr a -> IO ())
destroy
    FontFuncsT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontFuncsT
ffuncs
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function font_funcs_set_glyph_func
-- Args: [ Arg
--           { argCName = "ffuncs"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_funcs_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "font functions." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "func"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "font_get_glyph_func_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "callback function." , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = 2
--           , argDestroy = 3
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "data to pass to @func."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "destroy"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "destroy_func_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "function to call when @user_data is not needed anymore."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeNotified
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_funcs_set_glyph_func" hb_font_funcs_set_glyph_func :: 
    Ptr HarfBuzz.FontFuncsT.FontFuncsT ->   -- ffuncs : TInterface (Name {namespace = "HarfBuzz", name = "font_funcs_t"})
    FunPtr HarfBuzz.Callbacks.C_FontGetGlyphFuncT -> -- func : TInterface (Name {namespace = "HarfBuzz", name = "font_get_glyph_func_t"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    FunPtr HarfBuzz.Callbacks.C_DestroyFuncT -> -- destroy : TInterface (Name {namespace = "HarfBuzz", name = "destroy_func_t"})
    IO ()

{-# DEPRECATED fontFuncsSetGlyphFunc ["(Since version 1.2.3)"] #-}
-- | Deprecated.  Use 'GI.HarfBuzz.Functions.fontFuncsSetNominalGlyphFunc' and
-- 'GI.HarfBuzz.Functions.fontFuncsSetVariationGlyphFunc' instead.
-- 
-- /Since: 0.9.2/
fontFuncsSetGlyphFunc ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontFuncsT.FontFuncsT
    -- ^ /@ffuncs@/: font functions.
    -> HarfBuzz.Callbacks.FontGetGlyphFuncT
    -- ^ /@func@/: callback function.
    -> m ()
fontFuncsSetGlyphFunc :: FontFuncsT -> FontGetVariationGlyphFuncT -> m ()
fontFuncsSetGlyphFunc FontFuncsT
ffuncs FontGetVariationGlyphFuncT
func = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontFuncsT
ffuncs' <- FontFuncsT -> IO (Ptr FontFuncsT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontFuncsT
ffuncs
    FunPtr C_FontGetVariationGlyphFuncT
func' <- C_FontGetVariationGlyphFuncT
-> IO (FunPtr C_FontGetVariationGlyphFuncT)
HarfBuzz.Callbacks.mk_FontGetGlyphFuncT (Maybe (Ptr (FunPtr C_FontGetVariationGlyphFuncT))
-> FontGetVariationGlyphFuncT_WithClosures
-> C_FontGetVariationGlyphFuncT
HarfBuzz.Callbacks.wrap_FontGetGlyphFuncT Maybe (Ptr (FunPtr C_FontGetVariationGlyphFuncT))
forall a. Maybe a
Nothing (FontGetVariationGlyphFuncT
-> FontGetVariationGlyphFuncT_WithClosures
HarfBuzz.Callbacks.drop_closures_FontGetGlyphFuncT FontGetVariationGlyphFuncT
func))
    let userData :: Ptr ()
userData = FunPtr C_FontGetVariationGlyphFuncT -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_FontGetVariationGlyphFuncT
func'
    let destroy :: FunPtr (Ptr a -> IO ())
destroy = FunPtr (Ptr a -> IO ())
forall a. FunPtr (Ptr a -> IO ())
safeFreeFunPtrPtr
    Ptr FontFuncsT
-> FunPtr C_FontGetVariationGlyphFuncT
-> Ptr ()
-> FunPtr C_DestroyFuncT
-> IO ()
hb_font_funcs_set_glyph_func Ptr FontFuncsT
ffuncs' FunPtr C_FontGetVariationGlyphFuncT
func' Ptr ()
userData FunPtr C_DestroyFuncT
forall a. FunPtr (Ptr a -> IO ())
destroy
    FontFuncsT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontFuncsT
ffuncs
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function font_funcs_set_glyph_from_name_func
-- Args: [ Arg
--           { argCName = "ffuncs"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_funcs_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "font functions." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "func"
--           , argType =
--               TInterface
--                 Name
--                   { namespace = "HarfBuzz"
--                   , name = "font_get_glyph_from_name_func_t"
--                   }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = 2
--           , argDestroy = 3
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "destroy"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "destroy_func_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_funcs_set_glyph_from_name_func" hb_font_funcs_set_glyph_from_name_func :: 
    Ptr HarfBuzz.FontFuncsT.FontFuncsT ->   -- ffuncs : TInterface (Name {namespace = "HarfBuzz", name = "font_funcs_t"})
    FunPtr HarfBuzz.Callbacks.C_FontGetGlyphFromNameFuncT -> -- func : TInterface (Name {namespace = "HarfBuzz", name = "font_get_glyph_from_name_func_t"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    FunPtr HarfBuzz.Callbacks.C_DestroyFuncT -> -- destroy : TInterface (Name {namespace = "HarfBuzz", name = "destroy_func_t"})
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
fontFuncsSetGlyphFromNameFunc ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontFuncsT.FontFuncsT
    -- ^ /@ffuncs@/: font functions.
    -> HarfBuzz.Callbacks.FontGetGlyphFromNameFuncT
    -> m ()
fontFuncsSetGlyphFromNameFunc :: FontFuncsT -> FontGetGlyphFromNameFuncT -> m ()
fontFuncsSetGlyphFromNameFunc FontFuncsT
ffuncs FontGetGlyphFromNameFuncT
func = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontFuncsT
ffuncs' <- FontFuncsT -> IO (Ptr FontFuncsT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontFuncsT
ffuncs
    FunPtr C_FontGetGlyphFromNameFuncT
func' <- C_FontGetGlyphFromNameFuncT
-> IO (FunPtr C_FontGetGlyphFromNameFuncT)
HarfBuzz.Callbacks.mk_FontGetGlyphFromNameFuncT (Maybe (Ptr (FunPtr C_FontGetGlyphFromNameFuncT))
-> FontGetGlyphFromNameFuncT_WithClosures
-> C_FontGetGlyphFromNameFuncT
HarfBuzz.Callbacks.wrap_FontGetGlyphFromNameFuncT Maybe (Ptr (FunPtr C_FontGetGlyphFromNameFuncT))
forall a. Maybe a
Nothing (FontGetGlyphFromNameFuncT -> FontGetGlyphFromNameFuncT_WithClosures
HarfBuzz.Callbacks.drop_closures_FontGetGlyphFromNameFuncT FontGetGlyphFromNameFuncT
func))
    let userData :: Ptr ()
userData = FunPtr C_FontGetGlyphFromNameFuncT -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_FontGetGlyphFromNameFuncT
func'
    let destroy :: FunPtr (Ptr a -> IO ())
destroy = FunPtr (Ptr a -> IO ())
forall a. FunPtr (Ptr a -> IO ())
safeFreeFunPtrPtr
    Ptr FontFuncsT
-> FunPtr C_FontGetGlyphFromNameFuncT
-> Ptr ()
-> FunPtr C_DestroyFuncT
-> IO ()
hb_font_funcs_set_glyph_from_name_func Ptr FontFuncsT
ffuncs' FunPtr C_FontGetGlyphFromNameFuncT
func' Ptr ()
userData FunPtr C_DestroyFuncT
forall a. FunPtr (Ptr a -> IO ())
destroy
    FontFuncsT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontFuncsT
ffuncs
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function font_funcs_set_glyph_extents_func
-- Args: [ Arg
--           { argCName = "ffuncs"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_funcs_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "font functions." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "func"
--           , argType =
--               TInterface
--                 Name
--                   { namespace = "HarfBuzz" , name = "font_get_glyph_extents_func_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = 2
--           , argDestroy = 3
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "destroy"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "destroy_func_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_funcs_set_glyph_extents_func" hb_font_funcs_set_glyph_extents_func :: 
    Ptr HarfBuzz.FontFuncsT.FontFuncsT ->   -- ffuncs : TInterface (Name {namespace = "HarfBuzz", name = "font_funcs_t"})
    FunPtr HarfBuzz.Callbacks.C_FontGetGlyphExtentsFuncT -> -- func : TInterface (Name {namespace = "HarfBuzz", name = "font_get_glyph_extents_func_t"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    FunPtr HarfBuzz.Callbacks.C_DestroyFuncT -> -- destroy : TInterface (Name {namespace = "HarfBuzz", name = "destroy_func_t"})
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
fontFuncsSetGlyphExtentsFunc ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontFuncsT.FontFuncsT
    -- ^ /@ffuncs@/: font functions.
    -> HarfBuzz.Callbacks.FontGetGlyphExtentsFuncT
    -> m ()
fontFuncsSetGlyphExtentsFunc :: FontFuncsT -> FontGetGlyphExtentsFuncT -> m ()
fontFuncsSetGlyphExtentsFunc FontFuncsT
ffuncs FontGetGlyphExtentsFuncT
func = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontFuncsT
ffuncs' <- FontFuncsT -> IO (Ptr FontFuncsT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontFuncsT
ffuncs
    FunPtr C_FontGetGlyphExtentsFuncT
func' <- C_FontGetGlyphExtentsFuncT
-> IO (FunPtr C_FontGetGlyphExtentsFuncT)
HarfBuzz.Callbacks.mk_FontGetGlyphExtentsFuncT (Maybe (Ptr (FunPtr C_FontGetGlyphExtentsFuncT))
-> FontGetGlyphExtentsFuncT_WithClosures
-> C_FontGetGlyphExtentsFuncT
HarfBuzz.Callbacks.wrap_FontGetGlyphExtentsFuncT Maybe (Ptr (FunPtr C_FontGetGlyphExtentsFuncT))
forall a. Maybe a
Nothing (FontGetGlyphExtentsFuncT -> FontGetGlyphExtentsFuncT_WithClosures
HarfBuzz.Callbacks.drop_closures_FontGetGlyphExtentsFuncT FontGetGlyphExtentsFuncT
func))
    let userData :: Ptr ()
userData = FunPtr C_FontGetGlyphExtentsFuncT -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_FontGetGlyphExtentsFuncT
func'
    let destroy :: FunPtr (Ptr a -> IO ())
destroy = FunPtr (Ptr a -> IO ())
forall a. FunPtr (Ptr a -> IO ())
safeFreeFunPtrPtr
    Ptr FontFuncsT
-> FunPtr C_FontGetGlyphExtentsFuncT
-> Ptr ()
-> FunPtr C_DestroyFuncT
-> IO ()
hb_font_funcs_set_glyph_extents_func Ptr FontFuncsT
ffuncs' FunPtr C_FontGetGlyphExtentsFuncT
func' Ptr ()
userData FunPtr C_DestroyFuncT
forall a. FunPtr (Ptr a -> IO ())
destroy
    FontFuncsT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontFuncsT
ffuncs
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function font_funcs_set_glyph_contour_point_func
-- Args: [ Arg
--           { argCName = "ffuncs"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_funcs_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "font functions." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "func"
--           , argType =
--               TInterface
--                 Name
--                   { namespace = "HarfBuzz"
--                   , name = "font_get_glyph_contour_point_func_t"
--                   }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = 2
--           , argDestroy = 3
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "destroy"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "destroy_func_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_funcs_set_glyph_contour_point_func" hb_font_funcs_set_glyph_contour_point_func :: 
    Ptr HarfBuzz.FontFuncsT.FontFuncsT ->   -- ffuncs : TInterface (Name {namespace = "HarfBuzz", name = "font_funcs_t"})
    FunPtr HarfBuzz.Callbacks.C_FontGetGlyphContourPointFuncT -> -- func : TInterface (Name {namespace = "HarfBuzz", name = "font_get_glyph_contour_point_func_t"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    FunPtr HarfBuzz.Callbacks.C_DestroyFuncT -> -- destroy : TInterface (Name {namespace = "HarfBuzz", name = "destroy_func_t"})
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
fontFuncsSetGlyphContourPointFunc ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontFuncsT.FontFuncsT
    -- ^ /@ffuncs@/: font functions.
    -> HarfBuzz.Callbacks.FontGetGlyphContourPointFuncT
    -> m ()
fontFuncsSetGlyphContourPointFunc :: FontFuncsT -> FontGetGlyphContourPointFuncT -> m ()
fontFuncsSetGlyphContourPointFunc FontFuncsT
ffuncs FontGetGlyphContourPointFuncT
func = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontFuncsT
ffuncs' <- FontFuncsT -> IO (Ptr FontFuncsT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontFuncsT
ffuncs
    FunPtr C_FontGetGlyphContourPointFuncT
func' <- C_FontGetGlyphContourPointFuncT
-> IO (FunPtr C_FontGetGlyphContourPointFuncT)
HarfBuzz.Callbacks.mk_FontGetGlyphContourPointFuncT (Maybe (Ptr (FunPtr C_FontGetGlyphContourPointFuncT))
-> FontGetGlyphContourPointFuncT_WithClosures
-> C_FontGetGlyphContourPointFuncT
HarfBuzz.Callbacks.wrap_FontGetGlyphContourPointFuncT Maybe (Ptr (FunPtr C_FontGetGlyphContourPointFuncT))
forall a. Maybe a
Nothing (FontGetGlyphContourPointFuncT
-> FontGetGlyphContourPointFuncT_WithClosures
HarfBuzz.Callbacks.drop_closures_FontGetGlyphContourPointFuncT FontGetGlyphContourPointFuncT
func))
    let userData :: Ptr ()
userData = FunPtr C_FontGetGlyphContourPointFuncT -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_FontGetGlyphContourPointFuncT
func'
    let destroy :: FunPtr (Ptr a -> IO ())
destroy = FunPtr (Ptr a -> IO ())
forall a. FunPtr (Ptr a -> IO ())
safeFreeFunPtrPtr
    Ptr FontFuncsT
-> FunPtr C_FontGetGlyphContourPointFuncT
-> Ptr ()
-> FunPtr C_DestroyFuncT
-> IO ()
hb_font_funcs_set_glyph_contour_point_func Ptr FontFuncsT
ffuncs' FunPtr C_FontGetGlyphContourPointFuncT
func' Ptr ()
userData FunPtr C_DestroyFuncT
forall a. FunPtr (Ptr a -> IO ())
destroy
    FontFuncsT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontFuncsT
ffuncs
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function font_funcs_set_font_v_extents_func
-- Args: [ Arg
--           { argCName = "ffuncs"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_funcs_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "font functions." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "func"
--           , argType =
--               TInterface
--                 Name
--                   { namespace = "HarfBuzz" , name = "font_get_font_extents_func_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = 2
--           , argDestroy = 3
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "destroy"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "destroy_func_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_funcs_set_font_v_extents_func" hb_font_funcs_set_font_v_extents_func :: 
    Ptr HarfBuzz.FontFuncsT.FontFuncsT ->   -- ffuncs : TInterface (Name {namespace = "HarfBuzz", name = "font_funcs_t"})
    FunPtr HarfBuzz.Callbacks.C_FontGetFontExtentsFuncT -> -- func : TInterface (Name {namespace = "HarfBuzz", name = "font_get_font_extents_func_t"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    FunPtr HarfBuzz.Callbacks.C_DestroyFuncT -> -- destroy : TInterface (Name {namespace = "HarfBuzz", name = "destroy_func_t"})
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 1.1.2/
fontFuncsSetFontVExtentsFunc ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontFuncsT.FontFuncsT
    -- ^ /@ffuncs@/: font functions.
    -> HarfBuzz.Callbacks.FontGetFontExtentsFuncT
    -> m ()
fontFuncsSetFontVExtentsFunc :: FontFuncsT -> FontGetFontExtentsFuncT -> m ()
fontFuncsSetFontVExtentsFunc FontFuncsT
ffuncs FontGetFontExtentsFuncT
func = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontFuncsT
ffuncs' <- FontFuncsT -> IO (Ptr FontFuncsT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontFuncsT
ffuncs
    FunPtr C_FontGetFontExtentsFuncT
func' <- C_FontGetFontExtentsFuncT -> IO (FunPtr C_FontGetFontExtentsFuncT)
HarfBuzz.Callbacks.mk_FontGetFontExtentsFuncT (Maybe (Ptr (FunPtr C_FontGetFontExtentsFuncT))
-> FontGetFontExtentsFuncT_WithClosures
-> C_FontGetFontExtentsFuncT
HarfBuzz.Callbacks.wrap_FontGetFontExtentsFuncT Maybe (Ptr (FunPtr C_FontGetFontExtentsFuncT))
forall a. Maybe a
Nothing (FontGetFontExtentsFuncT -> FontGetFontExtentsFuncT_WithClosures
HarfBuzz.Callbacks.drop_closures_FontGetFontExtentsFuncT FontGetFontExtentsFuncT
func))
    let userData :: Ptr ()
userData = FunPtr C_FontGetFontExtentsFuncT -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_FontGetFontExtentsFuncT
func'
    let destroy :: FunPtr (Ptr a -> IO ())
destroy = FunPtr (Ptr a -> IO ())
forall a. FunPtr (Ptr a -> IO ())
safeFreeFunPtrPtr
    Ptr FontFuncsT
-> FunPtr C_FontGetFontExtentsFuncT
-> Ptr ()
-> FunPtr C_DestroyFuncT
-> IO ()
hb_font_funcs_set_font_v_extents_func Ptr FontFuncsT
ffuncs' FunPtr C_FontGetFontExtentsFuncT
func' Ptr ()
userData FunPtr C_DestroyFuncT
forall a. FunPtr (Ptr a -> IO ())
destroy
    FontFuncsT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontFuncsT
ffuncs
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function font_funcs_set_font_h_extents_func
-- Args: [ Arg
--           { argCName = "ffuncs"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_funcs_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "font functions." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "func"
--           , argType =
--               TInterface
--                 Name
--                   { namespace = "HarfBuzz" , name = "font_get_font_extents_func_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = 2
--           , argDestroy = 3
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "destroy"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "destroy_func_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_funcs_set_font_h_extents_func" hb_font_funcs_set_font_h_extents_func :: 
    Ptr HarfBuzz.FontFuncsT.FontFuncsT ->   -- ffuncs : TInterface (Name {namespace = "HarfBuzz", name = "font_funcs_t"})
    FunPtr HarfBuzz.Callbacks.C_FontGetFontExtentsFuncT -> -- func : TInterface (Name {namespace = "HarfBuzz", name = "font_get_font_extents_func_t"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    FunPtr HarfBuzz.Callbacks.C_DestroyFuncT -> -- destroy : TInterface (Name {namespace = "HarfBuzz", name = "destroy_func_t"})
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 1.1.2/
fontFuncsSetFontHExtentsFunc ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontFuncsT.FontFuncsT
    -- ^ /@ffuncs@/: font functions.
    -> HarfBuzz.Callbacks.FontGetFontExtentsFuncT
    -> m ()
fontFuncsSetFontHExtentsFunc :: FontFuncsT -> FontGetFontExtentsFuncT -> m ()
fontFuncsSetFontHExtentsFunc FontFuncsT
ffuncs FontGetFontExtentsFuncT
func = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontFuncsT
ffuncs' <- FontFuncsT -> IO (Ptr FontFuncsT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontFuncsT
ffuncs
    FunPtr C_FontGetFontExtentsFuncT
func' <- C_FontGetFontExtentsFuncT -> IO (FunPtr C_FontGetFontExtentsFuncT)
HarfBuzz.Callbacks.mk_FontGetFontExtentsFuncT (Maybe (Ptr (FunPtr C_FontGetFontExtentsFuncT))
-> FontGetFontExtentsFuncT_WithClosures
-> C_FontGetFontExtentsFuncT
HarfBuzz.Callbacks.wrap_FontGetFontExtentsFuncT Maybe (Ptr (FunPtr C_FontGetFontExtentsFuncT))
forall a. Maybe a
Nothing (FontGetFontExtentsFuncT -> FontGetFontExtentsFuncT_WithClosures
HarfBuzz.Callbacks.drop_closures_FontGetFontExtentsFuncT FontGetFontExtentsFuncT
func))
    let userData :: Ptr ()
userData = FunPtr C_FontGetFontExtentsFuncT -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_FontGetFontExtentsFuncT
func'
    let destroy :: FunPtr (Ptr a -> IO ())
destroy = FunPtr (Ptr a -> IO ())
forall a. FunPtr (Ptr a -> IO ())
safeFreeFunPtrPtr
    Ptr FontFuncsT
-> FunPtr C_FontGetFontExtentsFuncT
-> Ptr ()
-> FunPtr C_DestroyFuncT
-> IO ()
hb_font_funcs_set_font_h_extents_func Ptr FontFuncsT
ffuncs' FunPtr C_FontGetFontExtentsFuncT
func' Ptr ()
userData FunPtr C_DestroyFuncT
forall a. FunPtr (Ptr a -> IO ())
destroy
    FontFuncsT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontFuncsT
ffuncs
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function font_funcs_make_immutable
-- Args: [ Arg
--           { argCName = "ffuncs"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_funcs_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "font functions." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_funcs_make_immutable" hb_font_funcs_make_immutable :: 
    Ptr HarfBuzz.FontFuncsT.FontFuncsT ->   -- ffuncs : TInterface (Name {namespace = "HarfBuzz", name = "font_funcs_t"})
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
fontFuncsMakeImmutable ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontFuncsT.FontFuncsT
    -- ^ /@ffuncs@/: font functions.
    -> m ()
fontFuncsMakeImmutable :: FontFuncsT -> m ()
fontFuncsMakeImmutable FontFuncsT
ffuncs = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontFuncsT
ffuncs' <- FontFuncsT -> IO (Ptr FontFuncsT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontFuncsT
ffuncs
    Ptr FontFuncsT -> IO ()
hb_font_funcs_make_immutable Ptr FontFuncsT
ffuncs'
    FontFuncsT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontFuncsT
ffuncs
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function font_funcs_is_immutable
-- Args: [ Arg
--           { argCName = "ffuncs"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_funcs_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "font functions." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_funcs_is_immutable" hb_font_funcs_is_immutable :: 
    Ptr HarfBuzz.FontFuncsT.FontFuncsT ->   -- ffuncs : TInterface (Name {namespace = "HarfBuzz", name = "font_funcs_t"})
    IO Int32

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
fontFuncsIsImmutable ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontFuncsT.FontFuncsT
    -- ^ /@ffuncs@/: font functions.
    -> m Int32
fontFuncsIsImmutable :: FontFuncsT -> m Int32
fontFuncsIsImmutable FontFuncsT
ffuncs = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontFuncsT
ffuncs' <- FontFuncsT -> IO (Ptr FontFuncsT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontFuncsT
ffuncs
    Int32
result <- Ptr FontFuncsT -> IO Int32
hb_font_funcs_is_immutable Ptr FontFuncsT
ffuncs'
    FontFuncsT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontFuncsT
ffuncs
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function font_funcs_get_empty
-- Args: []
-- Lengths: []
-- returnType: Just
--               (TInterface
--                  Name { namespace = "HarfBuzz" , name = "font_funcs_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_funcs_get_empty" hb_font_funcs_get_empty :: 
    IO (Ptr HarfBuzz.FontFuncsT.FontFuncsT)

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
fontFuncsGetEmpty ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m HarfBuzz.FontFuncsT.FontFuncsT
fontFuncsGetEmpty :: m FontFuncsT
fontFuncsGetEmpty  = IO FontFuncsT -> m FontFuncsT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FontFuncsT -> m FontFuncsT) -> IO FontFuncsT -> m FontFuncsT
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontFuncsT
result <- IO (Ptr FontFuncsT)
hb_font_funcs_get_empty
    Text -> Ptr FontFuncsT -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"fontFuncsGetEmpty" Ptr FontFuncsT
result
    FontFuncsT
result' <- ((ManagedPtr FontFuncsT -> FontFuncsT)
-> Ptr FontFuncsT -> IO FontFuncsT
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr FontFuncsT -> FontFuncsT
HarfBuzz.FontFuncsT.FontFuncsT) Ptr FontFuncsT
result
    FontFuncsT -> IO FontFuncsT
forall (m :: * -> *) a. Monad m => a -> m a
return FontFuncsT
result'


-- function font_funcs_create
-- Args: []
-- Lengths: []
-- returnType: Just
--               (TInterface
--                  Name { namespace = "HarfBuzz" , name = "font_funcs_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_funcs_create" hb_font_funcs_create :: 
    IO (Ptr HarfBuzz.FontFuncsT.FontFuncsT)

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
fontFuncsCreate ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m HarfBuzz.FontFuncsT.FontFuncsT
fontFuncsCreate :: m FontFuncsT
fontFuncsCreate  = IO FontFuncsT -> m FontFuncsT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FontFuncsT -> m FontFuncsT) -> IO FontFuncsT -> m FontFuncsT
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontFuncsT
result <- IO (Ptr FontFuncsT)
hb_font_funcs_create
    Text -> Ptr FontFuncsT -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"fontFuncsCreate" Ptr FontFuncsT
result
    FontFuncsT
result' <- ((ManagedPtr FontFuncsT -> FontFuncsT)
-> Ptr FontFuncsT -> IO FontFuncsT
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr FontFuncsT -> FontFuncsT
HarfBuzz.FontFuncsT.FontFuncsT) Ptr FontFuncsT
result
    FontFuncsT -> IO FontFuncsT
forall (m :: * -> *) a. Monad m => a -> m a
return FontFuncsT
result'


-- function font_create_sub_font
-- Args: [ Arg
--           { argCName = "parent"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "parent font." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "HarfBuzz" , name = "font_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_create_sub_font" hb_font_create_sub_font :: 
    Ptr HarfBuzz.FontT.FontT ->             -- parent : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    IO (Ptr HarfBuzz.FontT.FontT)

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
fontCreateSubFont ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@parent@/: parent font.
    -> m HarfBuzz.FontT.FontT
fontCreateSubFont :: FontT -> m FontT
fontCreateSubFont FontT
parent = IO FontT -> m FontT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FontT -> m FontT) -> IO FontT -> m FontT
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontT
parent' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
parent
    Ptr FontT
result <- Ptr FontT -> IO (Ptr FontT)
hb_font_create_sub_font Ptr FontT
parent'
    Text -> Ptr FontT -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"fontCreateSubFont" Ptr FontT
result
    FontT
result' <- ((ManagedPtr FontT -> FontT) -> Ptr FontT -> IO FontT
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr FontT -> FontT
HarfBuzz.FontT.FontT) Ptr FontT
result
    FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontT
parent
    FontT -> IO FontT
forall (m :: * -> *) a. Monad m => a -> m a
return FontT
result'


-- function font_create
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a face." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "HarfBuzz" , name = "font_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_create" hb_font_create :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    IO (Ptr HarfBuzz.FontT.FontT)

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
fontCreate ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: a face.
    -> m HarfBuzz.FontT.FontT
fontCreate :: FaceT -> m FontT
fontCreate FaceT
face = IO FontT -> m FontT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FontT -> m FontT) -> IO FontT -> m FontT
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 FontT
result <- Ptr FaceT -> IO (Ptr FontT)
hb_font_create Ptr FaceT
face'
    Text -> Ptr FontT -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"fontCreate" Ptr FontT
result
    FontT
result' <- ((ManagedPtr FontT -> FontT) -> Ptr FontT -> IO FontT
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr FontT -> FontT
HarfBuzz.FontT.FontT) Ptr FontT
result
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    FontT -> IO FontT
forall (m :: * -> *) a. Monad m => a -> m a
return FontT
result'


-- function font_add_glyph_origin_for_direction
-- Args: [ Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a font." , 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 = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "direction"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "direction_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , 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 = Nothing , 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 = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_font_add_glyph_origin_for_direction" hb_font_add_glyph_origin_for_direction :: 
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    Word32 ->                               -- glyph : TBasicType TUInt32
    CUInt ->                                -- direction : TInterface (Name {namespace = "HarfBuzz", name = "direction_t"})
    Ptr Int32 ->                            -- x : TBasicType TInt32
    Ptr Int32 ->                            -- y : TBasicType TInt32
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
fontAddGlyphOriginForDirection ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FontT.FontT
    -- ^ /@font@/: a font.
    -> Word32
    -> HarfBuzz.Enums.DirectionT
    -> m ((Int32, Int32))
fontAddGlyphOriginForDirection :: FontT -> Word32 -> DirectionT -> m (Int32, Int32)
fontAddGlyphOriginForDirection FontT
font Word32
glyph DirectionT
direction = IO (Int32, Int32) -> m (Int32, Int32)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Int32, Int32) -> m (Int32, Int32))
-> IO (Int32, Int32) -> m (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
    let direction' :: CUInt
direction' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (DirectionT -> Int) -> DirectionT -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. DirectionT -> Int
forall a. Enum a => a -> Int
fromEnum) DirectionT
direction
    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)
    Ptr FontT -> Word32 -> CUInt -> Ptr Int32 -> Ptr Int32 -> IO ()
hb_font_add_glyph_origin_for_direction Ptr FontT
font' Word32
glyph CUInt
direction' Ptr Int32
x Ptr Int32
y
    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) -> IO (Int32, Int32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
x', Int32
y')


-- function feature_to_string
-- Args: [ Arg
--           { argCName = "feature"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "feature_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #hb_feature_t to convert"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "buf"
--           , argType = TCArray False (-1) 2 (TBasicType TUTF8)
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "output string" , 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 "the allocated size of @buf"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "size"
--              , argType = TBasicType TUInt
--              , direction = DirectionOut
--              , mayBeNull = False
--              , argDoc =
--                  Documentation
--                    { rawDocText = Just "the allocated size of @buf"
--                    , sinceVersion = Nothing
--                    }
--              , argScope = ScopeTypeInvalid
--              , argClosure = -1
--              , argDestroy = -1
--              , argCallerAllocates = False
--              , transfer = TransferEverything
--              }
--          ]
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_feature_to_string" hb_feature_to_string :: 
    Ptr HarfBuzz.FeatureT.FeatureT ->       -- feature : TInterface (Name {namespace = "HarfBuzz", name = "feature_t"})
    Ptr (Ptr CString) ->                    -- buf : TCArray False (-1) 2 (TBasicType TUTF8)
    Ptr Word32 ->                           -- size : TBasicType TUInt
    IO ()

-- | Converts a t'GI.HarfBuzz.Structs.FeatureT.FeatureT' into a 'P.Nothing'-terminated string in the format
-- understood by 'GI.HarfBuzz.Functions.featureFromString'. The client in responsible for
-- allocating big enough size for /@buf@/, 128 bytes is more than enough.
-- 
-- /Since: 0.9.5/
featureToString ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FeatureT.FeatureT
    -- ^ /@feature@/: an t'GI.HarfBuzz.Structs.FeatureT.FeatureT' to convert
    -> m ([T.Text])
featureToString :: FeatureT -> m [Text]
featureToString FeatureT
feature = IO [Text] -> m [Text]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Text] -> m [Text]) -> IO [Text] -> m [Text]
forall a b. (a -> b) -> a -> b
$ do
    Ptr FeatureT
feature' <- FeatureT -> IO (Ptr FeatureT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FeatureT
feature
    Ptr (Ptr CString)
buf <- 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)
    Ptr FeatureT -> Ptr (Ptr CString) -> Ptr Word32 -> IO ()
hb_feature_to_string Ptr FeatureT
feature' Ptr (Ptr CString)
buf Ptr Word32
size
    Word32
size' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
size
    Ptr CString
buf' <- Ptr (Ptr CString) -> IO (Ptr CString)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr CString)
buf
    [Text]
buf'' <- (Word32 -> Ptr CString -> IO [Text]
forall a.
(HasCallStack, Integral a) =>
a -> Ptr CString -> IO [Text]
unpackUTF8CArrayWithLength Word32
size') Ptr CString
buf'
    (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
buf'
    Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
buf'
    FeatureT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FeatureT
feature
    Ptr (Ptr CString) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr CString)
buf
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
size
    [Text] -> IO [Text]
forall (m :: * -> *) a. Monad m => a -> m a
return [Text]
buf''


-- function feature_from_string
-- Args: [ Arg
--           { argCName = "str"
--           , argType = TCArray False (-1) 1 (TBasicType TUInt8)
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a string to parse" , 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 "length of @str, or -1 if string is %NULL terminated"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "feature"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "feature_t" }
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the #hb_feature_t to initialize with the parsed values"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = True
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "len"
--              , argType = TBasicType TInt
--              , direction = DirectionIn
--              , mayBeNull = False
--              , argDoc =
--                  Documentation
--                    { rawDocText =
--                        Just "length of @str, or -1 if string is %NULL terminated"
--                    , sinceVersion = Nothing
--                    }
--              , argScope = ScopeTypeInvalid
--              , argClosure = -1
--              , argDestroy = -1
--              , argCallerAllocates = False
--              , transfer = TransferNothing
--              }
--          ]
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_feature_from_string" hb_feature_from_string :: 
    Ptr Word8 ->                            -- str : TCArray False (-1) 1 (TBasicType TUInt8)
    Int32 ->                                -- len : TBasicType TInt
    Ptr HarfBuzz.FeatureT.FeatureT ->       -- feature : TInterface (Name {namespace = "HarfBuzz", name = "feature_t"})
    IO Int32

-- | Parses a string into a t'GI.HarfBuzz.Structs.FeatureT.FeatureT'.
-- 
-- The format for specifying feature strings follows. All valid CSS
-- font-feature-settings values other than \'normal\' and the global values are
-- also accepted, though not documented below. CSS string escapes are not
-- supported.
-- 
-- The range indices refer to the positions between Unicode characters. The
-- position before the first character is always 0.
-- 
-- The format is Python-esque.  Here is how it all works:
-- 
-- \<informaltable pgwide=\'1\' align=\'left\' frame=\'none\'>
-- \<tgroup cols=\'5\'>
-- \<thead>
-- \<row>\<entry>Syntax\<\/entry>    \<entry>Value\<\/entry> \<entry>Start\<\/entry> \<entry>End\<\/entry>\<\/row>
-- \<\/thead>
-- \<tbody>
-- \<row>\<entry>Setting value:\<\/entry>\<\/row>
-- \<row>\<entry>kern\<\/entry>      \<entry>1\<\/entry>     \<entry>0\<\/entry>      \<entry>∞\<\/entry>   \<entry>Turn feature on\<\/entry>\<\/row>
-- \<row>\<entry>+kern\<\/entry>     \<entry>1\<\/entry>     \<entry>0\<\/entry>      \<entry>∞\<\/entry>   \<entry>Turn feature on\<\/entry>\<\/row>
-- \<row>\<entry>-kern\<\/entry>     \<entry>0\<\/entry>     \<entry>0\<\/entry>      \<entry>∞\<\/entry>   \<entry>Turn feature off\<\/entry>\<\/row>
-- \<row>\<entry>kern=0\<\/entry>    \<entry>0\<\/entry>     \<entry>0\<\/entry>      \<entry>∞\<\/entry>   \<entry>Turn feature off\<\/entry>\<\/row>
-- \<row>\<entry>kern=1\<\/entry>    \<entry>1\<\/entry>     \<entry>0\<\/entry>      \<entry>∞\<\/entry>   \<entry>Turn feature on\<\/entry>\<\/row>
-- \<row>\<entry>aalt=2\<\/entry>    \<entry>2\<\/entry>     \<entry>0\<\/entry>      \<entry>∞\<\/entry>   \<entry>Choose 2nd alternate\<\/entry>\<\/row>
-- \<row>\<entry>Setting index:\<\/entry>\<\/row>
-- \<row>\<entry>kern[]\<\/entry>    \<entry>1\<\/entry>     \<entry>0\<\/entry>      \<entry>∞\<\/entry>   \<entry>Turn feature on\<\/entry>\<\/row>
-- \<row>\<entry>kern[:]\<\/entry>   \<entry>1\<\/entry>     \<entry>0\<\/entry>      \<entry>∞\<\/entry>   \<entry>Turn feature on\<\/entry>\<\/row>
-- \<row>\<entry>kern[5:]\<\/entry>  \<entry>1\<\/entry>     \<entry>5\<\/entry>      \<entry>∞\<\/entry>   \<entry>Turn feature on, partial\<\/entry>\<\/row>
-- \<row>\<entry>kern[:5]\<\/entry>  \<entry>1\<\/entry>     \<entry>0\<\/entry>      \<entry>5\<\/entry>   \<entry>Turn feature on, partial\<\/entry>\<\/row>
-- \<row>\<entry>kern[3:5]\<\/entry> \<entry>1\<\/entry>     \<entry>3\<\/entry>      \<entry>5\<\/entry>   \<entry>Turn feature on, range\<\/entry>\<\/row>
-- \<row>\<entry>kern[3]\<\/entry>   \<entry>1\<\/entry>     \<entry>3\<\/entry>      \<entry>3+1\<\/entry> \<entry>Turn feature on, single char\<\/entry>\<\/row>
-- \<row>\<entry>Mixing it all:\<\/entry>\<\/row>
-- \<row>\<entry>aalt[3:5]=2\<\/entry> \<entry>2\<\/entry>   \<entry>3\<\/entry>      \<entry>5\<\/entry>   \<entry>Turn 2nd alternate on for range\<\/entry>\<\/row>
-- \<\/tbody>
-- \<\/tgroup>
-- \<\/informaltable>
-- 
-- /Since: 0.9.5/
featureFromString ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    ByteString
    -- ^ /@str@/: a string to parse
    -> m ((Int32, HarfBuzz.FeatureT.FeatureT))
    -- ^ __Returns:__ @/true/@ if /@str@/ is successfully parsed, @/false/@ otherwise.
featureFromString :: ByteString -> m (Int32, FeatureT)
featureFromString ByteString
str = IO (Int32, FeatureT) -> m (Int32, FeatureT)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Int32, FeatureT) -> m (Int32, FeatureT))
-> IO (Int32, FeatureT) -> m (Int32, FeatureT)
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
$ ByteString -> Int
B.length ByteString
str
    Ptr Word8
str' <- ByteString -> IO (Ptr Word8)
packByteString ByteString
str
    Ptr FeatureT
feature <- Int -> IO (Ptr FeatureT)
forall a. GBoxed a => Int -> IO (Ptr a)
SP.callocBoxedBytes Int
16 :: IO (Ptr HarfBuzz.FeatureT.FeatureT)
    Int32
result <- Ptr Word8 -> Int32 -> Ptr FeatureT -> IO Int32
hb_feature_from_string Ptr Word8
str' Int32
len Ptr FeatureT
feature
    FeatureT
feature' <- ((ManagedPtr FeatureT -> FeatureT) -> Ptr FeatureT -> IO FeatureT
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr FeatureT -> FeatureT
HarfBuzz.FeatureT.FeatureT) Ptr FeatureT
feature
    Ptr Word8 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word8
str'
    (Int32, FeatureT) -> IO (Int32, FeatureT)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
result, FeatureT
feature')


-- function face_set_upem
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a face." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "upem"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_face_set_upem" hb_face_set_upem :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Word32 ->                               -- upem : TBasicType TUInt
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
faceSetUpem ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: a face.
    -> Word32
    -> m ()
faceSetUpem :: FaceT -> Word32 -> m ()
faceSetUpem FaceT
face Word32
upem = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Ptr FaceT -> Word32 -> IO ()
hb_face_set_upem Ptr FaceT
face' Word32
upem
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function face_set_index
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a face." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "index"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_face_set_index" hb_face_set_index :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Word32 ->                               -- index : TBasicType TUInt
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
faceSetIndex ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: a face.
    -> Word32
    -> m ()
faceSetIndex :: FaceT -> Word32 -> m ()
faceSetIndex FaceT
face Word32
index = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Ptr FaceT -> Word32 -> IO ()
hb_face_set_index Ptr FaceT
face' Word32
index
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function face_set_glyph_count
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a face." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "glyph_count"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_face_set_glyph_count" hb_face_set_glyph_count :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Word32 ->                               -- glyph_count : TBasicType TUInt
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.7/
faceSetGlyphCount ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: a face.
    -> Word32
    -> m ()
faceSetGlyphCount :: FaceT -> Word32 -> m ()
faceSetGlyphCount FaceT
face Word32
glyphCount = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Ptr FaceT -> Word32 -> IO ()
hb_face_set_glyph_count Ptr FaceT
face' Word32
glyphCount
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function face_reference_table
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a face." , 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 = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "HarfBuzz" , name = "blob_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_face_reference_table" hb_face_reference_table :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Word32 ->                               -- tag : TBasicType TUInt32
    IO (Ptr HarfBuzz.BlobT.BlobT)

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
faceReferenceTable ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: a face.
    -> Word32
    -> m HarfBuzz.BlobT.BlobT
faceReferenceTable :: FaceT -> Word32 -> m BlobT
faceReferenceTable FaceT
face Word32
tag = IO BlobT -> m BlobT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO BlobT -> m BlobT) -> IO BlobT -> m BlobT
forall a b. (a -> b) -> a -> b
$ do
    Ptr FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Ptr BlobT
result <- Ptr FaceT -> Word32 -> IO (Ptr BlobT)
hb_face_reference_table Ptr FaceT
face' Word32
tag
    Text -> Ptr BlobT -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"faceReferenceTable" Ptr BlobT
result
    BlobT
result' <- ((ManagedPtr BlobT -> BlobT) -> Ptr BlobT -> IO BlobT
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr BlobT -> BlobT
HarfBuzz.BlobT.BlobT) Ptr BlobT
result
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    BlobT -> IO BlobT
forall (m :: * -> *) a. Monad m => a -> m a
return BlobT
result'


-- function face_reference_blob
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a face." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "HarfBuzz" , name = "blob_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_face_reference_blob" hb_face_reference_blob :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    IO (Ptr HarfBuzz.BlobT.BlobT)

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
faceReferenceBlob ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: a face.
    -> m HarfBuzz.BlobT.BlobT
faceReferenceBlob :: FaceT -> m BlobT
faceReferenceBlob FaceT
face = IO BlobT -> m BlobT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO BlobT -> m BlobT) -> IO BlobT -> m BlobT
forall a b. (a -> b) -> a -> b
$ do
    Ptr FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Ptr BlobT
result <- Ptr FaceT -> IO (Ptr BlobT)
hb_face_reference_blob Ptr FaceT
face'
    Text -> Ptr BlobT -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"faceReferenceBlob" Ptr BlobT
result
    BlobT
result' <- ((ManagedPtr BlobT -> BlobT) -> Ptr BlobT -> IO BlobT
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr BlobT -> BlobT
HarfBuzz.BlobT.BlobT) Ptr BlobT
result
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    BlobT -> IO BlobT
forall (m :: * -> *) a. Monad m => a -> m a
return BlobT
result'


-- function face_make_immutable
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a face." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_face_make_immutable" hb_face_make_immutable :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
faceMakeImmutable ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: a face.
    -> m ()
faceMakeImmutable :: FaceT -> m ()
faceMakeImmutable FaceT
face = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Ptr FaceT -> IO ()
hb_face_make_immutable Ptr FaceT
face'
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function face_is_immutable
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a face." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_face_is_immutable" hb_face_is_immutable :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    IO Int32

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
faceIsImmutable ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: a face.
    -> m Int32
faceIsImmutable :: FaceT -> m Int32
faceIsImmutable FaceT
face = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Int32
result <- Ptr FaceT -> IO Int32
hb_face_is_immutable Ptr FaceT
face'
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function face_get_upem
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a face." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_face_get_upem" hb_face_get_upem :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    IO Word32

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
faceGetUpem ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: a face.
    -> m Word32
faceGetUpem :: FaceT -> m Word32
faceGetUpem FaceT
face = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
    Ptr FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Word32
result <- Ptr FaceT -> IO Word32
hb_face_get_upem Ptr FaceT
face'
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result


-- function face_get_table_tags
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a face." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "start_offset"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "index of first tag to return."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "table_count"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "input length of @table_tags array, output number of items written."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "table_tags"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "array to write tags into."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_face_get_table_tags" hb_face_get_table_tags :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Word32 ->                               -- start_offset : TBasicType TUInt
    Word32 ->                               -- table_count : TBasicType TUInt
    Word32 ->                               -- table_tags : TBasicType TUInt32
    IO Word32

-- | Retrieves table tags for a face, if possible.
-- 
-- /Since: 1.6.0/
faceGetTableTags ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: a face.
    -> Word32
    -- ^ /@startOffset@/: index of first tag to return.
    -> Word32
    -- ^ /@tableCount@/: input length of /@tableTags@/ array, output number of items written.
    -> Word32
    -- ^ /@tableTags@/: array to write tags into.
    -> m Word32
    -- ^ __Returns:__ total number of tables, or 0 if not possible to list.
faceGetTableTags :: FaceT -> Word32 -> Word32 -> Word32 -> m Word32
faceGetTableTags FaceT
face Word32
startOffset Word32
tableCount Word32
tableTags = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
    Ptr FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Word32
result <- Ptr FaceT -> Word32 -> Word32 -> Word32 -> IO Word32
hb_face_get_table_tags Ptr FaceT
face' Word32
startOffset Word32
tableCount Word32
tableTags
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result


-- function face_get_index
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a face." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_face_get_index" hb_face_get_index :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    IO Word32

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
faceGetIndex ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: a face.
    -> m Word32
faceGetIndex :: FaceT -> m Word32
faceGetIndex FaceT
face = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
    Ptr FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Word32
result <- Ptr FaceT -> IO Word32
hb_face_get_index Ptr FaceT
face'
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result


-- function face_get_glyph_count
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a face." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_face_get_glyph_count" hb_face_get_glyph_count :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    IO Word32

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.7/
faceGetGlyphCount ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: a face.
    -> m Word32
faceGetGlyphCount :: FaceT -> m Word32
faceGetGlyphCount FaceT
face = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
    Ptr FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Word32
result <- Ptr FaceT -> IO Word32
hb_face_get_glyph_count Ptr FaceT
face'
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result


-- function face_get_empty
-- Args: []
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "HarfBuzz" , name = "face_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_face_get_empty" hb_face_get_empty :: 
    IO (Ptr HarfBuzz.FaceT.FaceT)

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
faceGetEmpty ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m HarfBuzz.FaceT.FaceT
faceGetEmpty :: m FaceT
faceGetEmpty  = IO FaceT -> m FaceT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FaceT -> m FaceT) -> IO FaceT -> m FaceT
forall a b. (a -> b) -> a -> b
$ do
    Ptr FaceT
result <- IO (Ptr FaceT)
hb_face_get_empty
    Text -> Ptr FaceT -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"faceGetEmpty" Ptr FaceT
result
    FaceT
result' <- ((ManagedPtr FaceT -> FaceT) -> Ptr FaceT -> IO FaceT
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr FaceT -> FaceT
HarfBuzz.FaceT.FaceT) Ptr FaceT
result
    FaceT -> IO FaceT
forall (m :: * -> *) a. Monad m => a -> m a
return FaceT
result'


-- function face_create_for_tables
-- Args: [ Arg
--           { argCName = "reference_table_func"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "reference_table_func_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = 1
--           , argDestroy = 2
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "destroy"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "destroy_func_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "HarfBuzz" , name = "face_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_face_create_for_tables" hb_face_create_for_tables :: 
    FunPtr HarfBuzz.Callbacks.C_ReferenceTableFuncT -> -- reference_table_func : TInterface (Name {namespace = "HarfBuzz", name = "reference_table_func_t"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    FunPtr HarfBuzz.Callbacks.C_DestroyFuncT -> -- destroy : TInterface (Name {namespace = "HarfBuzz", name = "destroy_func_t"})
    IO (Ptr HarfBuzz.FaceT.FaceT)

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
faceCreateForTables ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.Callbacks.ReferenceTableFuncT
    -> m HarfBuzz.FaceT.FaceT
faceCreateForTables :: ReferenceTableFuncT -> m FaceT
faceCreateForTables ReferenceTableFuncT
referenceTableFunc = IO FaceT -> m FaceT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FaceT -> m FaceT) -> IO FaceT -> m FaceT
forall a b. (a -> b) -> a -> b
$ do
    FunPtr C_ReferenceTableFuncT
referenceTableFunc' <- C_ReferenceTableFuncT -> IO (FunPtr C_ReferenceTableFuncT)
HarfBuzz.Callbacks.mk_ReferenceTableFuncT (Maybe (Ptr (FunPtr C_ReferenceTableFuncT))
-> ReferenceTableFuncT_WithClosures -> C_ReferenceTableFuncT
HarfBuzz.Callbacks.wrap_ReferenceTableFuncT Maybe (Ptr (FunPtr C_ReferenceTableFuncT))
forall a. Maybe a
Nothing (ReferenceTableFuncT -> ReferenceTableFuncT_WithClosures
HarfBuzz.Callbacks.drop_closures_ReferenceTableFuncT ReferenceTableFuncT
referenceTableFunc))
    let userData :: Ptr ()
userData = FunPtr C_ReferenceTableFuncT -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_ReferenceTableFuncT
referenceTableFunc'
    let destroy :: FunPtr (Ptr a -> IO ())
destroy = FunPtr (Ptr a -> IO ())
forall a. FunPtr (Ptr a -> IO ())
safeFreeFunPtrPtr
    Ptr FaceT
result <- FunPtr C_ReferenceTableFuncT
-> Ptr () -> FunPtr C_DestroyFuncT -> IO (Ptr FaceT)
hb_face_create_for_tables FunPtr C_ReferenceTableFuncT
referenceTableFunc' Ptr ()
userData FunPtr C_DestroyFuncT
forall a. FunPtr (Ptr a -> IO ())
destroy
    Text -> Ptr FaceT -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"faceCreateForTables" Ptr FaceT
result
    FaceT
result' <- ((ManagedPtr FaceT -> FaceT) -> Ptr FaceT -> IO FaceT
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr FaceT -> FaceT
HarfBuzz.FaceT.FaceT) Ptr FaceT
result
    FaceT -> IO FaceT
forall (m :: * -> *) a. Monad m => a -> m a
return FaceT
result'


-- function face_create
-- Args: [ Arg
--           { argCName = "blob"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "blob_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "index"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "HarfBuzz" , name = "face_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_face_create" hb_face_create :: 
    Ptr HarfBuzz.BlobT.BlobT ->             -- blob : TInterface (Name {namespace = "HarfBuzz", name = "blob_t"})
    Word32 ->                               -- index : TBasicType TUInt
    IO (Ptr HarfBuzz.FaceT.FaceT)

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
faceCreate ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.BlobT.BlobT
    -> Word32
    -> m HarfBuzz.FaceT.FaceT
faceCreate :: BlobT -> Word32 -> m FaceT
faceCreate BlobT
blob Word32
index = IO FaceT -> m FaceT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FaceT -> m FaceT) -> IO FaceT -> m FaceT
forall a b. (a -> b) -> a -> b
$ do
    Ptr BlobT
blob' <- BlobT -> IO (Ptr BlobT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BlobT
blob
    Ptr FaceT
result <- Ptr BlobT -> Word32 -> IO (Ptr FaceT)
hb_face_create Ptr BlobT
blob' Word32
index
    Text -> Ptr FaceT -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"faceCreate" Ptr FaceT
result
    FaceT
result' <- ((ManagedPtr FaceT -> FaceT) -> Ptr FaceT -> IO FaceT
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr FaceT -> FaceT
HarfBuzz.FaceT.FaceT) Ptr FaceT
result
    BlobT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BlobT
blob
    FaceT -> IO FaceT
forall (m :: * -> *) a. Monad m => a -> m a
return FaceT
result'


-- function face_count
-- Args: [ Arg
--           { argCName = "blob"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "blob_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a blob." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_face_count" hb_face_count :: 
    Ptr HarfBuzz.BlobT.BlobT ->             -- blob : TInterface (Name {namespace = "HarfBuzz", name = "blob_t"})
    IO Word32

-- | Get number of faces in a blob.
-- 
-- /Since: 1.7.7/
faceCount ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.BlobT.BlobT
    -- ^ /@blob@/: a blob.
    -> m Word32
    -- ^ __Returns:__ Number of faces in /@blob@/
faceCount :: BlobT -> m Word32
faceCount BlobT
blob = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
    Ptr BlobT
blob' <- BlobT -> IO (Ptr BlobT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BlobT
blob
    Word32
result <- Ptr BlobT -> IO Word32
hb_face_count Ptr BlobT
blob'
    BlobT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BlobT
blob
    Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result


-- function face_collect_variation_unicodes
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "font face." , 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 = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "out"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "set_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "set to add Unicode characters for @variation_selector covered by @face to."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_face_collect_variation_unicodes" hb_face_collect_variation_unicodes :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Word32 ->                               -- variation_selector : TBasicType TUInt32
    Ptr HarfBuzz.SetT.SetT ->               -- out : TInterface (Name {namespace = "HarfBuzz", name = "set_t"})
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 1.9.0/
faceCollectVariationUnicodes ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: font face.
    -> Word32
    -> HarfBuzz.SetT.SetT
    -- ^ /@out@/: set to add Unicode characters for /@variationSelector@/ covered by /@face@/ to.
    -> m ()
faceCollectVariationUnicodes :: FaceT -> Word32 -> SetT -> m ()
faceCollectVariationUnicodes FaceT
face Word32
variationSelector SetT
out = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Ptr SetT
out' <- SetT -> IO (Ptr SetT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr SetT
out
    Ptr FaceT -> Word32 -> Ptr SetT -> IO ()
hb_face_collect_variation_unicodes Ptr FaceT
face' Word32
variationSelector Ptr SetT
out'
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    SetT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr SetT
out
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function face_collect_variation_selectors
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "font face." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "out"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "set_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "set to add Variation Selector characters covered by @face to."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_face_collect_variation_selectors" hb_face_collect_variation_selectors :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Ptr HarfBuzz.SetT.SetT ->               -- out : TInterface (Name {namespace = "HarfBuzz", name = "set_t"})
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 1.9.0/
faceCollectVariationSelectors ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: font face.
    -> HarfBuzz.SetT.SetT
    -- ^ /@out@/: set to add Variation Selector characters covered by /@face@/ to.
    -> m ()
faceCollectVariationSelectors :: FaceT -> SetT -> m ()
faceCollectVariationSelectors FaceT
face SetT
out = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Ptr SetT
out' <- SetT -> IO (Ptr SetT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr SetT
out
    Ptr FaceT -> Ptr SetT -> IO ()
hb_face_collect_variation_selectors Ptr FaceT
face' Ptr SetT
out'
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    SetT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr SetT
out
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function face_collect_unicodes
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "font face." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "out"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "set_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "set to add Unicode characters covered by @face to."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_face_collect_unicodes" hb_face_collect_unicodes :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Ptr HarfBuzz.SetT.SetT ->               -- out : TInterface (Name {namespace = "HarfBuzz", name = "set_t"})
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 1.9.0/
faceCollectUnicodes ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -- ^ /@face@/: font face.
    -> HarfBuzz.SetT.SetT
    -- ^ /@out@/: set to add Unicode characters covered by /@face@/ to.
    -> m ()
faceCollectUnicodes :: FaceT -> SetT -> m ()
faceCollectUnicodes FaceT
face SetT
out = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Ptr SetT
out' <- SetT -> IO (Ptr SetT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr SetT
out
    Ptr FaceT -> Ptr SetT -> IO ()
hb_face_collect_unicodes Ptr FaceT
face' Ptr SetT
out'
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    SetT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr SetT
out
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function face_builder_create
-- Args: []
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "HarfBuzz" , name = "face_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_face_builder_create" hb_face_builder_create :: 
    IO (Ptr HarfBuzz.FaceT.FaceT)

-- | Creates a t'GI.HarfBuzz.Structs.FaceT.FaceT' that can be used with 'GI.HarfBuzz.Functions.faceBuilderAddTable'.
-- After tables are added to the face, it can be compiled to a binary
-- font file by calling 'GI.HarfBuzz.Functions.faceReferenceBlob'.
-- 
-- /Since: 1.9.0/
faceBuilderCreate ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m HarfBuzz.FaceT.FaceT
    -- ^ __Returns:__ New face.
faceBuilderCreate :: m FaceT
faceBuilderCreate  = IO FaceT -> m FaceT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FaceT -> m FaceT) -> IO FaceT -> m FaceT
forall a b. (a -> b) -> a -> b
$ do
    Ptr FaceT
result <- IO (Ptr FaceT)
hb_face_builder_create
    Text -> Ptr FaceT -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"faceBuilderCreate" Ptr FaceT
result
    FaceT
result' <- ((ManagedPtr FaceT -> FaceT) -> Ptr FaceT -> IO FaceT
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr FaceT -> FaceT
HarfBuzz.FaceT.FaceT) Ptr FaceT
result
    FaceT -> IO FaceT
forall (m :: * -> *) a. Monad m => a -> m a
return FaceT
result'


-- function face_builder_add_table
-- Args: [ Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "face_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , 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 = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "blob"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "blob_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_face_builder_add_table" hb_face_builder_add_table :: 
    Ptr HarfBuzz.FaceT.FaceT ->             -- face : TInterface (Name {namespace = "HarfBuzz", name = "face_t"})
    Word32 ->                               -- tag : TBasicType TUInt32
    Ptr HarfBuzz.BlobT.BlobT ->             -- blob : TInterface (Name {namespace = "HarfBuzz", name = "blob_t"})
    IO Int32

-- | Add table for /@tag@/ with data provided by /@blob@/ to the face.  /@face@/ must
-- be created using 'GI.HarfBuzz.Functions.faceBuilderCreate'.
-- 
-- /Since: 1.9.0/
faceBuilderAddTable ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.FaceT.FaceT
    -> Word32
    -> HarfBuzz.BlobT.BlobT
    -> m Int32
faceBuilderAddTable :: FaceT -> Word32 -> BlobT -> m Int32
faceBuilderAddTable FaceT
face Word32
tag BlobT
blob = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr FaceT
face' <- FaceT -> IO (Ptr FaceT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FaceT
face
    Ptr BlobT
blob' <- BlobT -> IO (Ptr BlobT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BlobT
blob
    Int32
result <- Ptr FaceT -> Word32 -> Ptr BlobT -> IO Int32
hb_face_builder_add_table Ptr FaceT
face' Word32
tag Ptr BlobT
blob'
    FaceT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FaceT
face
    BlobT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BlobT
blob
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function direction_to_string
-- Args: [ Arg
--           { argCName = "direction"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "direction_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "hb_direction_to_string" hb_direction_to_string :: 
    CUInt ->                                -- direction : TInterface (Name {namespace = "HarfBuzz", name = "direction_t"})
    IO CString

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
directionToString ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.Enums.DirectionT
    -> m T.Text
directionToString :: DirectionT -> m Text
directionToString DirectionT
direction = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
    let direction' :: CUInt
direction' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (DirectionT -> Int) -> DirectionT -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. DirectionT -> Int
forall a. Enum a => a -> Int
fromEnum) DirectionT
direction
    CString
result <- CUInt -> IO CString
hb_direction_to_string CUInt
direction'
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"directionToString" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'


-- function direction_from_string
-- Args: [ Arg
--           { argCName = "str"
--           , argType = TCArray False (-1) 1 (TBasicType TUInt8)
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , 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 = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "len"
--              , argType = TBasicType TInt
--              , direction = DirectionIn
--              , mayBeNull = False
--              , argDoc =
--                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--              , argScope = ScopeTypeInvalid
--              , argClosure = -1
--              , argDestroy = -1
--              , argCallerAllocates = False
--              , transfer = TransferNothing
--              }
--          ]
-- returnType: Just
--               (TInterface Name { namespace = "HarfBuzz" , name = "direction_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_direction_from_string" hb_direction_from_string :: 
    Ptr Word8 ->                            -- str : TCArray False (-1) 1 (TBasicType TUInt8)
    Int32 ->                                -- len : TBasicType TInt
    IO CUInt

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
directionFromString ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    ByteString
    -> m HarfBuzz.Enums.DirectionT
directionFromString :: ByteString -> m DirectionT
directionFromString ByteString
str = IO DirectionT -> m DirectionT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DirectionT -> m DirectionT) -> IO DirectionT -> m DirectionT
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
$ ByteString -> Int
B.length ByteString
str
    Ptr Word8
str' <- ByteString -> IO (Ptr Word8)
packByteString ByteString
str
    CUInt
result <- Ptr Word8 -> Int32 -> IO CUInt
hb_direction_from_string Ptr Word8
str' Int32
len
    let result' :: DirectionT
result' = (Int -> DirectionT
forall a. Enum a => Int -> a
toEnum (Int -> DirectionT) -> (CUInt -> Int) -> CUInt -> DirectionT
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
    Ptr Word8 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word8
str'
    DirectionT -> IO DirectionT
forall (m :: * -> *) a. Monad m => a -> m a
return DirectionT
result'


-- function color_get_red
-- Args: [ Arg
--           { argCName = "color"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt8)
-- throws : False
-- Skip return : False

foreign import ccall "hb_color_get_red" hb_color_get_red :: 
    Word32 ->                               -- color : TBasicType TUInt32
    IO Word8

-- | color: a @/hb_color_t/@ we are interested in its channels.
-- 
-- /Since: 2.1.0/
colorGetRed ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Word32
    -> m Word8
    -- ^ __Returns:__ Red channel value of the given color
colorGetRed :: Word32 -> m Word8
colorGetRed Word32
color = IO Word8 -> m Word8
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word8 -> m Word8) -> IO Word8 -> m Word8
forall a b. (a -> b) -> a -> b
$ do
    Word8
result <- Word32 -> IO Word8
hb_color_get_red Word32
color
    Word8 -> IO Word8
forall (m :: * -> *) a. Monad m => a -> m a
return Word8
result


-- function color_get_green
-- Args: [ Arg
--           { argCName = "color"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt8)
-- throws : False
-- Skip return : False

foreign import ccall "hb_color_get_green" hb_color_get_green :: 
    Word32 ->                               -- color : TBasicType TUInt32
    IO Word8

-- | color: a @/hb_color_t/@ we are interested in its channels.
-- 
-- /Since: 2.1.0/
colorGetGreen ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Word32
    -> m Word8
    -- ^ __Returns:__ Green channel value of the given color
colorGetGreen :: Word32 -> m Word8
colorGetGreen Word32
color = IO Word8 -> m Word8
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word8 -> m Word8) -> IO Word8 -> m Word8
forall a b. (a -> b) -> a -> b
$ do
    Word8
result <- Word32 -> IO Word8
hb_color_get_green Word32
color
    Word8 -> IO Word8
forall (m :: * -> *) a. Monad m => a -> m a
return Word8
result


-- function color_get_blue
-- Args: [ Arg
--           { argCName = "color"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt8)
-- throws : False
-- Skip return : False

foreign import ccall "hb_color_get_blue" hb_color_get_blue :: 
    Word32 ->                               -- color : TBasicType TUInt32
    IO Word8

-- | color: a @/hb_color_t/@ we are interested in its channels.
-- 
-- /Since: 2.1.0/
colorGetBlue ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Word32
    -> m Word8
    -- ^ __Returns:__ Blue channel value of the given color
colorGetBlue :: Word32 -> m Word8
colorGetBlue Word32
color = IO Word8 -> m Word8
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word8 -> m Word8) -> IO Word8 -> m Word8
forall a b. (a -> b) -> a -> b
$ do
    Word8
result <- Word32 -> IO Word8
hb_color_get_blue Word32
color
    Word8 -> IO Word8
forall (m :: * -> *) a. Monad m => a -> m a
return Word8
result


-- function color_get_alpha
-- Args: [ Arg
--           { argCName = "color"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt8)
-- throws : False
-- Skip return : False

foreign import ccall "hb_color_get_alpha" hb_color_get_alpha :: 
    Word32 ->                               -- color : TBasicType TUInt32
    IO Word8

-- | color: a @/hb_color_t/@ we are interested in its channels.
-- 
-- /Since: 2.1.0/
colorGetAlpha ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Word32
    -> m Word8
    -- ^ __Returns:__ Alpha channel value of the given color
colorGetAlpha :: Word32 -> m Word8
colorGetAlpha Word32
color = IO Word8 -> m Word8
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word8 -> m Word8) -> IO Word8 -> m Word8
forall a b. (a -> b) -> a -> b
$ do
    Word8
result <- Word32 -> IO Word8
hb_color_get_alpha Word32
color
    Word8 -> IO Word8
forall (m :: * -> *) a. Monad m => a -> m a
return Word8
result


-- function buffer_set_unicode_funcs
-- Args: [ Arg
--           { argCName = "buffer"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "buffer_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #hb_buffer_t." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "unicode_funcs"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "unicode_funcs_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_buffer_set_unicode_funcs" hb_buffer_set_unicode_funcs :: 
    Ptr HarfBuzz.BufferT.BufferT ->         -- buffer : TInterface (Name {namespace = "HarfBuzz", name = "buffer_t"})
    Ptr HarfBuzz.UnicodeFuncsT.UnicodeFuncsT -> -- unicode_funcs : TInterface (Name {namespace = "HarfBuzz", name = "unicode_funcs_t"})
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
bufferSetUnicodeFuncs ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.BufferT.BufferT
    -- ^ /@buffer@/: an t'GI.HarfBuzz.Structs.BufferT.BufferT'.
    -> HarfBuzz.UnicodeFuncsT.UnicodeFuncsT
    -> m ()
bufferSetUnicodeFuncs :: BufferT -> UnicodeFuncsT -> m ()
bufferSetUnicodeFuncs BufferT
buffer UnicodeFuncsT
unicodeFuncs = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr BufferT
buffer' <- BufferT -> IO (Ptr BufferT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BufferT
buffer
    Ptr UnicodeFuncsT
unicodeFuncs' <- UnicodeFuncsT -> IO (Ptr UnicodeFuncsT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr UnicodeFuncsT
unicodeFuncs
    Ptr BufferT -> Ptr UnicodeFuncsT -> IO ()
hb_buffer_set_unicode_funcs Ptr BufferT
buffer' Ptr UnicodeFuncsT
unicodeFuncs'
    BufferT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BufferT
buffer
    UnicodeFuncsT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr UnicodeFuncsT
unicodeFuncs
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function buffer_set_segment_properties
-- Args: [ Arg
--           { argCName = "buffer"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "buffer_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #hb_buffer_t." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "props"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "segment_properties_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #hb_segment_properties_t to use."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_buffer_set_segment_properties" hb_buffer_set_segment_properties :: 
    Ptr HarfBuzz.BufferT.BufferT ->         -- buffer : TInterface (Name {namespace = "HarfBuzz", name = "buffer_t"})
    Ptr HarfBuzz.SegmentPropertiesT.SegmentPropertiesT -> -- props : TInterface (Name {namespace = "HarfBuzz", name = "segment_properties_t"})
    IO ()

-- | Sets the segment properties of the buffer, a shortcut for calling
-- 'GI.HarfBuzz.Functions.bufferSetDirection', 'GI.HarfBuzz.Functions.bufferSetScript' and
-- 'GI.HarfBuzz.Functions.bufferSetLanguage' individually.
-- 
-- /Since: 0.9.7/
bufferSetSegmentProperties ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.BufferT.BufferT
    -- ^ /@buffer@/: an t'GI.HarfBuzz.Structs.BufferT.BufferT'.
    -> HarfBuzz.SegmentPropertiesT.SegmentPropertiesT
    -- ^ /@props@/: an t'GI.HarfBuzz.Structs.SegmentPropertiesT.SegmentPropertiesT' to use.
    -> m ()
bufferSetSegmentProperties :: BufferT -> SegmentPropertiesT -> m ()
bufferSetSegmentProperties BufferT
buffer SegmentPropertiesT
props = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr BufferT
buffer' <- BufferT -> IO (Ptr BufferT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BufferT
buffer
    Ptr SegmentPropertiesT
props' <- SegmentPropertiesT -> IO (Ptr SegmentPropertiesT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr SegmentPropertiesT
props
    Ptr BufferT -> Ptr SegmentPropertiesT -> IO ()
hb_buffer_set_segment_properties Ptr BufferT
buffer' Ptr SegmentPropertiesT
props'
    BufferT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BufferT
buffer
    SegmentPropertiesT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr SegmentPropertiesT
props
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function buffer_set_script
-- Args: [ Arg
--           { argCName = "buffer"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "buffer_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #hb_buffer_t." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "script"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "script_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #hb_script_t to set."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_buffer_set_script" hb_buffer_set_script :: 
    Ptr HarfBuzz.BufferT.BufferT ->         -- buffer : TInterface (Name {namespace = "HarfBuzz", name = "buffer_t"})
    CUInt ->                                -- script : TInterface (Name {namespace = "HarfBuzz", name = "script_t"})
    IO ()

-- | Sets the script of /@buffer@/ to /@script@/.
-- 
-- Script is crucial for choosing the proper shaping behaviour for scripts that
-- require it (e.g. Arabic) and the which OpenType features defined in the font
-- to be applied.
-- 
-- You can pass one of the predefined t'GI.HarfBuzz.Enums.ScriptT' values, or use
-- 'GI.HarfBuzz.Functions.scriptFromString' or 'GI.HarfBuzz.Functions.scriptFromIso15924Tag' to get the
-- corresponding script from an ISO 15924 script tag.
-- 
-- /Since: 0.9.2/
bufferSetScript ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.BufferT.BufferT
    -- ^ /@buffer@/: an t'GI.HarfBuzz.Structs.BufferT.BufferT'.
    -> HarfBuzz.Enums.ScriptT
    -- ^ /@script@/: an t'GI.HarfBuzz.Enums.ScriptT' to set.
    -> m ()
bufferSetScript :: BufferT -> ScriptT -> m ()
bufferSetScript BufferT
buffer ScriptT
script = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr BufferT
buffer' <- BufferT -> IO (Ptr BufferT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BufferT
buffer
    let script' :: CUInt
script' = (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
script
    Ptr BufferT -> CUInt -> IO ()
hb_buffer_set_script Ptr BufferT
buffer' CUInt
script'
    BufferT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BufferT
buffer
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function buffer_set_replacement_codepoint
-- Args: [ Arg
--           { argCName = "buffer"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "buffer_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #hb_buffer_t." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "replacement"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the replacement #hb_codepoint_t"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_buffer_set_replacement_codepoint" hb_buffer_set_replacement_codepoint :: 
    Ptr HarfBuzz.BufferT.BufferT ->         -- buffer : TInterface (Name {namespace = "HarfBuzz", name = "buffer_t"})
    Word32 ->                               -- replacement : TBasicType TUInt32
    IO ()

-- | Sets the @/hb_codepoint_t/@ that replaces invalid entries for a given encoding
-- when adding text to /@buffer@/.
-- 
-- Default is 'GI.HarfBuzz.Constants.BUFFER_REPLACEMENT_CODEPOINT_DEFAULT'.
-- 
-- /Since: 0.9.31/
bufferSetReplacementCodepoint ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.BufferT.BufferT
    -- ^ /@buffer@/: an t'GI.HarfBuzz.Structs.BufferT.BufferT'.
    -> Word32
    -- ^ /@replacement@/: the replacement @/hb_codepoint_t/@
    -> m ()
bufferSetReplacementCodepoint :: BufferT -> Word32 -> m ()
bufferSetReplacementCodepoint BufferT
buffer Word32
replacement = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr BufferT
buffer' <- BufferT -> IO (Ptr BufferT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BufferT
buffer
    Ptr BufferT -> Word32 -> IO ()
hb_buffer_set_replacement_codepoint Ptr BufferT
buffer' Word32
replacement
    BufferT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BufferT
buffer
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function buffer_set_message_func
-- Args: [ Arg
--           { argCName = "buffer"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "buffer_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #hb_buffer_t." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "func"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "buffer_message_func_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = 2
--           , argDestroy = 3
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "destroy"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "destroy_func_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_buffer_set_message_func" hb_buffer_set_message_func :: 
    Ptr HarfBuzz.BufferT.BufferT ->         -- buffer : TInterface (Name {namespace = "HarfBuzz", name = "buffer_t"})
    FunPtr HarfBuzz.Callbacks.C_BufferMessageFuncT -> -- func : TInterface (Name {namespace = "HarfBuzz", name = "buffer_message_func_t"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    FunPtr HarfBuzz.Callbacks.C_DestroyFuncT -> -- destroy : TInterface (Name {namespace = "HarfBuzz", name = "destroy_func_t"})
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 1.1.3/
bufferSetMessageFunc ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.BufferT.BufferT
    -- ^ /@buffer@/: an t'GI.HarfBuzz.Structs.BufferT.BufferT'.
    -> HarfBuzz.Callbacks.BufferMessageFuncT
    -> m ()
bufferSetMessageFunc :: BufferT -> BufferMessageFuncT -> m ()
bufferSetMessageFunc BufferT
buffer BufferMessageFuncT
func = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr BufferT
buffer' <- BufferT -> IO (Ptr BufferT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BufferT
buffer
    FunPtr C_BufferMessageFuncT
func' <- C_BufferMessageFuncT -> IO (FunPtr C_BufferMessageFuncT)
HarfBuzz.Callbacks.mk_BufferMessageFuncT (Maybe (Ptr (FunPtr C_BufferMessageFuncT))
-> BufferMessageFuncT_WithClosures -> C_BufferMessageFuncT
HarfBuzz.Callbacks.wrap_BufferMessageFuncT Maybe (Ptr (FunPtr C_BufferMessageFuncT))
forall a. Maybe a
Nothing (BufferMessageFuncT -> BufferMessageFuncT_WithClosures
HarfBuzz.Callbacks.drop_closures_BufferMessageFuncT BufferMessageFuncT
func))
    let userData :: Ptr ()
userData = FunPtr C_BufferMessageFuncT -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_BufferMessageFuncT
func'
    let destroy :: FunPtr (Ptr a -> IO ())
destroy = FunPtr (Ptr a -> IO ())
forall a. FunPtr (Ptr a -> IO ())
safeFreeFunPtrPtr
    Ptr BufferT
-> FunPtr C_BufferMessageFuncT
-> Ptr ()
-> FunPtr C_DestroyFuncT
-> IO ()
hb_buffer_set_message_func Ptr BufferT
buffer' FunPtr C_BufferMessageFuncT
func' Ptr ()
userData FunPtr C_DestroyFuncT
forall a. FunPtr (Ptr a -> IO ())
destroy
    BufferT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BufferT
buffer
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function buffer_set_length
-- Args: [ Arg
--           { argCName = "buffer"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "buffer_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #hb_buffer_t." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "length"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the new length of @buffer."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_buffer_set_length" hb_buffer_set_length :: 
    Ptr HarfBuzz.BufferT.BufferT ->         -- buffer : TInterface (Name {namespace = "HarfBuzz", name = "buffer_t"})
    Word32 ->                               -- length : TBasicType TUInt
    IO Int32

-- | Similar to 'GI.HarfBuzz.Functions.bufferPreAllocate', but clears any new items added at the
-- end.
-- 
-- /Since: 0.9.2/
bufferSetLength ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.BufferT.BufferT
    -- ^ /@buffer@/: an t'GI.HarfBuzz.Structs.BufferT.BufferT'.
    -> Word32
    -- ^ /@length@/: the new length of /@buffer@/.
    -> m Int32
    -- ^ __Returns:__ @/true/@ if /@buffer@/ memory allocation succeeded, @/false/@ otherwise.
bufferSetLength :: BufferT -> Word32 -> m Int32
bufferSetLength BufferT
buffer Word32
length_ = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr BufferT
buffer' <- BufferT -> IO (Ptr BufferT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BufferT
buffer
    Int32
result <- Ptr BufferT -> Word32 -> IO Int32
hb_buffer_set_length Ptr BufferT
buffer' Word32
length_
    BufferT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BufferT
buffer
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function buffer_set_language
-- Args: [ Arg
--           { argCName = "buffer"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "buffer_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #hb_buffer_t." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "language"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "language_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an hb_language_t to set."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_buffer_set_language" hb_buffer_set_language :: 
    Ptr HarfBuzz.BufferT.BufferT ->         -- buffer : TInterface (Name {namespace = "HarfBuzz", name = "buffer_t"})
    Ptr HarfBuzz.LanguageT.LanguageT ->     -- language : TInterface (Name {namespace = "HarfBuzz", name = "language_t"})
    IO ()

-- | Sets the language of /@buffer@/ to /@language@/.
-- 
-- Languages are crucial for selecting which OpenType feature to apply to the
-- buffer which can result in applying language-specific behaviour. Languages
-- are orthogonal to the scripts, and though they are related, they are
-- different concepts and should not be confused with each other.
-- 
-- Use 'GI.HarfBuzz.Functions.languageFromString' to convert from BCP 47 language tags to
-- t'GI.HarfBuzz.Structs.LanguageT.LanguageT'.
-- 
-- /Since: 0.9.2/
bufferSetLanguage ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.BufferT.BufferT
    -- ^ /@buffer@/: an t'GI.HarfBuzz.Structs.BufferT.BufferT'.
    -> HarfBuzz.LanguageT.LanguageT
    -- ^ /@language@/: an hb_language_t to set.
    -> m ()
bufferSetLanguage :: BufferT -> LanguageT -> m ()
bufferSetLanguage BufferT
buffer LanguageT
language = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr BufferT
buffer' <- BufferT -> IO (Ptr BufferT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BufferT
buffer
    Ptr LanguageT
language' <- LanguageT -> IO (Ptr LanguageT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr LanguageT
language
    Ptr BufferT -> Ptr LanguageT -> IO ()
hb_buffer_set_language Ptr BufferT
buffer' Ptr LanguageT
language'
    BufferT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BufferT
buffer
    LanguageT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr LanguageT
language
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function buffer_set_invisible_glyph
-- Args: [ Arg
--           { argCName = "buffer"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "buffer_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #hb_buffer_t." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "invisible"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the invisible #hb_codepoint_t"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_buffer_set_invisible_glyph" hb_buffer_set_invisible_glyph :: 
    Ptr HarfBuzz.BufferT.BufferT ->         -- buffer : TInterface (Name {namespace = "HarfBuzz", name = "buffer_t"})
    Word32 ->                               -- invisible : TBasicType TUInt32
    IO ()

-- | Sets the @/hb_codepoint_t/@ that replaces invisible characters in
-- the shaping result.  If set to zero (default), the glyph for the
-- U+0020 SPACE character is used.  Otherwise, this value is used
-- verbatim.
-- 
-- /Since: 2.0.0/
bufferSetInvisibleGlyph ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.BufferT.BufferT
    -- ^ /@buffer@/: an t'GI.HarfBuzz.Structs.BufferT.BufferT'.
    -> Word32
    -- ^ /@invisible@/: the invisible @/hb_codepoint_t/@
    -> m ()
bufferSetInvisibleGlyph :: BufferT -> Word32 -> m ()
bufferSetInvisibleGlyph BufferT
buffer Word32
invisible = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr BufferT
buffer' <- BufferT -> IO (Ptr BufferT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BufferT
buffer
    Ptr BufferT -> Word32 -> IO ()
hb_buffer_set_invisible_glyph Ptr BufferT
buffer' Word32
invisible
    BufferT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BufferT
buffer
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function buffer_set_flags
-- Args: [ Arg
--           { argCName = "buffer"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "buffer_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #hb_buffer_t." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "flags"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "buffer_flags_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the buffer flags to set."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_buffer_set_flags" hb_buffer_set_flags :: 
    Ptr HarfBuzz.BufferT.BufferT ->         -- buffer : TInterface (Name {namespace = "HarfBuzz", name = "buffer_t"})
    CUInt ->                                -- flags : TInterface (Name {namespace = "HarfBuzz", name = "buffer_flags_t"})
    IO ()

-- | Sets /@buffer@/ flags to /@flags@/. See t'GI.HarfBuzz.Flags.BufferFlagsT'.
-- 
-- /Since: 0.9.7/
bufferSetFlags ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.BufferT.BufferT
    -- ^ /@buffer@/: an t'GI.HarfBuzz.Structs.BufferT.BufferT'.
    -> [HarfBuzz.Flags.BufferFlagsT]
    -- ^ /@flags@/: the buffer flags to set.
    -> m ()
bufferSetFlags :: BufferT -> [BufferFlagsT] -> m ()
bufferSetFlags BufferT
buffer [BufferFlagsT]
flags = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr BufferT
buffer' <- BufferT -> IO (Ptr BufferT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BufferT
buffer
    let flags' :: CUInt
flags' = [BufferFlagsT] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [BufferFlagsT]
flags
    Ptr BufferT -> CUInt -> IO ()
hb_buffer_set_flags Ptr BufferT
buffer' CUInt
flags'
    BufferT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BufferT
buffer
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function buffer_set_direction
-- Args: [ Arg
--           { argCName = "buffer"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "buffer_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #hb_buffer_t." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "direction"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "direction_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the #hb_direction_t of the @buffer"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_buffer_set_direction" hb_buffer_set_direction :: 
    Ptr HarfBuzz.BufferT.BufferT ->         -- buffer : TInterface (Name {namespace = "HarfBuzz", name = "buffer_t"})
    CUInt ->                                -- direction : TInterface (Name {namespace = "HarfBuzz", name = "direction_t"})
    IO ()

-- | Set the text flow direction of the buffer. No shaping can happen without
-- setting /@buffer@/ direction, and it controls the visual direction for the
-- output glyphs; for RTL direction the glyphs will be reversed. Many layout
-- features depend on the proper setting of the direction, for example,
-- reversing RTL text before shaping, then shaping with LTR direction is not
-- the same as keeping the text in logical order and shaping with RTL
-- direction.
-- 
-- /Since: 0.9.2/
bufferSetDirection ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.BufferT.BufferT
    -- ^ /@buffer@/: an t'GI.HarfBuzz.Structs.BufferT.BufferT'.
    -> HarfBuzz.Enums.DirectionT
    -- ^ /@direction@/: the t'GI.HarfBuzz.Enums.DirectionT' of the /@buffer@/
    -> m ()
bufferSetDirection :: BufferT -> DirectionT -> m ()
bufferSetDirection BufferT
buffer DirectionT
direction = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr BufferT
buffer' <- BufferT -> IO (Ptr BufferT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BufferT
buffer
    let direction' :: CUInt
direction' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (DirectionT -> Int) -> DirectionT -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. DirectionT -> Int
forall a. Enum a => a -> Int
fromEnum) DirectionT
direction
    Ptr BufferT -> CUInt -> IO ()
hb_buffer_set_direction Ptr BufferT
buffer' CUInt
direction'
    BufferT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BufferT
buffer
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function buffer_set_content_type
-- Args: [ Arg
--           { argCName = "buffer"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "buffer_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #hb_buffer_t." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "content_type"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "buffer_content_type_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the type of buffer contents to set"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_buffer_set_content_type" hb_buffer_set_content_type :: 
    Ptr HarfBuzz.BufferT.BufferT ->         -- buffer : TInterface (Name {namespace = "HarfBuzz", name = "buffer_t"})
    CUInt ->                                -- content_type : TInterface (Name {namespace = "HarfBuzz", name = "buffer_content_type_t"})
    IO ()

-- | Sets the type of /@buffer@/ contents, buffers are either empty, contain
-- characters (before shaping) or glyphs (the result of shaping).
-- 
-- /Since: 0.9.5/
bufferSetContentType ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.BufferT.BufferT
    -- ^ /@buffer@/: an t'GI.HarfBuzz.Structs.BufferT.BufferT'.
    -> HarfBuzz.Enums.BufferContentTypeT
    -- ^ /@contentType@/: the type of buffer contents to set
    -> m ()
bufferSetContentType :: BufferT -> BufferContentTypeT -> m ()
bufferSetContentType BufferT
buffer BufferContentTypeT
contentType = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr BufferT
buffer' <- BufferT -> IO (Ptr BufferT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BufferT
buffer
    let contentType' :: CUInt
contentType' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (BufferContentTypeT -> Int) -> BufferContentTypeT -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BufferContentTypeT -> Int
forall a. Enum a => a -> Int
fromEnum) BufferContentTypeT
contentType
    Ptr BufferT -> CUInt -> IO ()
hb_buffer_set_content_type Ptr BufferT
buffer' CUInt
contentType'
    BufferT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BufferT
buffer
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function buffer_set_cluster_level
-- Args: [ Arg
--           { argCName = "buffer"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "buffer_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #hb_buffer_t." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "cluster_level"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "buffer_cluster_level_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_buffer_set_cluster_level" hb_buffer_set_cluster_level :: 
    Ptr HarfBuzz.BufferT.BufferT ->         -- buffer : TInterface (Name {namespace = "HarfBuzz", name = "buffer_t"})
    CUInt ->                                -- cluster_level : TInterface (Name {namespace = "HarfBuzz", name = "buffer_cluster_level_t"})
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.42/
bufferSetClusterLevel ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.BufferT.BufferT
    -- ^ /@buffer@/: an t'GI.HarfBuzz.Structs.BufferT.BufferT'.
    -> HarfBuzz.Enums.BufferClusterLevelT
    -> m ()
bufferSetClusterLevel :: BufferT -> BufferClusterLevelT -> m ()
bufferSetClusterLevel BufferT
buffer BufferClusterLevelT
clusterLevel = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr BufferT
buffer' <- BufferT -> IO (Ptr BufferT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BufferT
buffer
    let clusterLevel' :: CUInt
clusterLevel' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (BufferClusterLevelT -> Int) -> BufferClusterLevelT -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BufferClusterLevelT -> Int
forall a. Enum a => a -> Int
fromEnum) BufferClusterLevelT
clusterLevel
    Ptr BufferT -> CUInt -> IO ()
hb_buffer_set_cluster_level Ptr BufferT
buffer' CUInt
clusterLevel'
    BufferT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BufferT
buffer
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function buffer_serialize_list_formats
-- Args: []
-- Lengths: []
-- returnType: Just (TCArray True (-1) (-1) (TBasicType TUTF8))
-- throws : False
-- Skip return : False

foreign import ccall "hb_buffer_serialize_list_formats" hb_buffer_serialize_list_formats :: 
    IO (Ptr CString)

-- | Returns a list of supported buffer serialization formats.
-- 
-- /Since: 0.9.7/
bufferSerializeListFormats ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m [T.Text]
    -- ^ __Returns:__ 
    -- A string array of buffer serialization formats. Should not be freed.
bufferSerializeListFormats :: m [Text]
bufferSerializeListFormats  = IO [Text] -> m [Text]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Text] -> m [Text]) -> IO [Text] -> m [Text]
forall a b. (a -> b) -> a -> b
$ do
    Ptr CString
result <- IO (Ptr CString)
hb_buffer_serialize_list_formats
    Text -> Ptr CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"bufferSerializeListFormats" Ptr CString
result
    [Text]
result' <- HasCallStack => Ptr CString -> IO [Text]
Ptr CString -> IO [Text]
unpackZeroTerminatedUTF8CArray Ptr CString
result
    [Text] -> IO [Text]
forall (m :: * -> *) a. Monad m => a -> m a
return [Text]
result'


-- function buffer_serialize_glyphs
-- Args: [ Arg
--           { argCName = "buffer"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "buffer_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #hb_buffer_t buffer."
--                 , 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 first item in @buffer to serialize."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "end"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the last item in @buffer to serialize."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "buf"
--           , argType = TCArray False (-1) 4 (TBasicType TUInt8)
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "output string to\n      write serialized buffer into."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "buf_size"
--           , argType = TBasicType TUInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the size of @buf." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "buf_consumed"
--           , argType = TBasicType TUInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "if not %NULL, will be set to the number of byes written into @buf."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "the #hb_font_t used to shape this buffer, needed to\n       read glyph names and extents. If %NULL, and empty font will be used."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "format"
--           , argType =
--               TInterface
--                 Name
--                   { namespace = "HarfBuzz" , name = "buffer_serialize_format_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "the #hb_buffer_serialize_format_t to use for formatting the output."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "flags"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "buffer_serialize_flags_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "the #hb_buffer_serialize_flags_t that control what glyph properties\n        to serialize."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "buf_size"
--              , argType = TBasicType TUInt
--              , direction = DirectionOut
--              , mayBeNull = False
--              , argDoc =
--                  Documentation
--                    { rawDocText = Just "the size of @buf." , sinceVersion = Nothing }
--              , argScope = ScopeTypeInvalid
--              , argClosure = -1
--              , argDestroy = -1
--              , argCallerAllocates = False
--              , transfer = TransferEverything
--              }
--          ]
-- returnType: Just (TBasicType TUInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_buffer_serialize_glyphs" hb_buffer_serialize_glyphs :: 
    Ptr HarfBuzz.BufferT.BufferT ->         -- buffer : TInterface (Name {namespace = "HarfBuzz", name = "buffer_t"})
    Word32 ->                               -- start : TBasicType TUInt
    Word32 ->                               -- end : TBasicType TUInt
    Ptr (Ptr Word8) ->                      -- buf : TCArray False (-1) 4 (TBasicType TUInt8)
    Ptr Word32 ->                           -- buf_size : TBasicType TUInt
    Ptr Word32 ->                           -- buf_consumed : TBasicType TUInt
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    CUInt ->                                -- format : TInterface (Name {namespace = "HarfBuzz", name = "buffer_serialize_format_t"})
    CUInt ->                                -- flags : TInterface (Name {namespace = "HarfBuzz", name = "buffer_serialize_flags_t"})
    IO Word32

-- | Serializes /@buffer@/ into a textual representation of its glyph content,
-- useful for showing the contents of the buffer, for example during debugging.
-- There are currently two supported serialization formats:
-- 
-- == text
-- A human-readable, plain text format.
-- The serialized glyphs will look something like:
-- 
-- \`\`@
-- [uni0651=0\@518,0+0|uni0628=0+1897]
-- @\`@
-- - The serialized glyphs are delimited with @[@ and @]@.
-- - Glyphs are separated with @|@
-- - Each glyph starts with glyph name, or glyph index if
--   #HB_BUFFER_SERIALIZE_FLAG_NO_GLYPH_NAMES flag is set. Then,
--   - If #HB_BUFFER_SERIALIZE_FLAG_NO_CLUSTERS is not set, @=@ then #hb_glyph_info_t.cluster.
--   - If #HB_BUFFER_SERIALIZE_FLAG_NO_POSITIONS is not set, the #hb_glyph_position_t in the format:
--     - If both #hb_glyph_position_t.x_offset and #hb_glyph_position_t.y_offset are not 0, @/@xOffset@/,y_offset@. Then,
--     - @+x_advance@, then @,y_advance@ if #hb_glyph_position_t.y_advance is not 0. Then,
--   - If #HB_BUFFER_SERIALIZE_FLAG_GLYPH_EXTENTS is set, the
--     #hb_glyph_extents_t in the format
--     @&lt;x_bearing,y_bearing,width,height&gt;\`
-- 
-- == json
-- TODO.
-- 
-- /Since: 0.9.7/
bufferSerializeGlyphs ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.BufferT.BufferT
    -- ^ /@buffer@/: an t'GI.HarfBuzz.Structs.BufferT.BufferT' buffer.
    -> Word32
    -- ^ /@start@/: the first item in /@buffer@/ to serialize.
    -> Word32
    -- ^ /@end@/: the last item in /@buffer@/ to serialize.
    -> Maybe (HarfBuzz.FontT.FontT)
    -- ^ /@font@/: the t'GI.HarfBuzz.Structs.FontT.FontT' used to shape this buffer, needed to
    --        read glyph names and extents. If 'P.Nothing', and empty font will be used.
    -> HarfBuzz.Enums.BufferSerializeFormatT
    -- ^ /@format@/: the t'GI.HarfBuzz.Enums.BufferSerializeFormatT' to use for formatting the output.
    -> [HarfBuzz.Flags.BufferSerializeFlagsT]
    -- ^ /@flags@/: the t'GI.HarfBuzz.Flags.BufferSerializeFlagsT' that control what glyph properties
    --         to serialize.
    -> m ((Word32, ByteString, Word32))
    -- ^ __Returns:__ The number of serialized items.
bufferSerializeGlyphs :: BufferT
-> Word32
-> Word32
-> Maybe FontT
-> BufferSerializeFormatT
-> [BufferSerializeFlagsT]
-> m (Word32, ByteString, Word32)
bufferSerializeGlyphs BufferT
buffer Word32
start Word32
end Maybe FontT
font BufferSerializeFormatT
format [BufferSerializeFlagsT]
flags = IO (Word32, ByteString, Word32) -> m (Word32, ByteString, Word32)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Word32, ByteString, Word32) -> m (Word32, ByteString, Word32))
-> IO (Word32, ByteString, Word32)
-> m (Word32, ByteString, Word32)
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 (Ptr Word8)
buf <- IO (Ptr (Ptr Word8))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr Word8))
    Ptr Word32
bufSize <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
    Ptr Word32
bufConsumed <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
    Ptr FontT
maybeFont <- case Maybe FontT
font of
        Maybe FontT
Nothing -> Ptr FontT -> IO (Ptr FontT)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr FontT
forall a. Ptr a
nullPtr
        Just FontT
jFont -> do
            Ptr FontT
jFont' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
jFont
            Ptr FontT -> IO (Ptr FontT)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr FontT
jFont'
    let format' :: CUInt
format' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (BufferSerializeFormatT -> Int)
-> BufferSerializeFormatT
-> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BufferSerializeFormatT -> Int
forall a. Enum a => a -> Int
fromEnum) BufferSerializeFormatT
format
    let flags' :: CUInt
flags' = [BufferSerializeFlagsT] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [BufferSerializeFlagsT]
flags
    Word32
result <- Ptr BufferT
-> Word32
-> Word32
-> Ptr (Ptr Word8)
-> Ptr Word32
-> Ptr Word32
-> Ptr FontT
-> CUInt
-> CUInt
-> IO Word32
hb_buffer_serialize_glyphs Ptr BufferT
buffer' Word32
start Word32
end Ptr (Ptr Word8)
buf Ptr Word32
bufSize Ptr Word32
bufConsumed Ptr FontT
maybeFont CUInt
format' CUInt
flags'
    Word32
bufSize' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
bufSize
    Ptr Word8
buf' <- Ptr (Ptr Word8) -> IO (Ptr Word8)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr Word8)
buf
    ByteString
buf'' <- (Word32 -> Ptr Word8 -> IO ByteString
forall a. Integral a => a -> Ptr Word8 -> IO ByteString
unpackByteStringWithLength Word32
bufSize') Ptr Word8
buf'
    Ptr Word8 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word8
buf'
    Word32
bufConsumed' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
bufConsumed
    BufferT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BufferT
buffer
    Maybe FontT -> (FontT -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe FontT
font FontT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    Ptr (Ptr Word8) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Word8)
buf
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
bufSize
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
bufConsumed
    (Word32, ByteString, Word32) -> IO (Word32, ByteString, Word32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Word32
result, ByteString
buf'', Word32
bufConsumed')


-- function buffer_serialize_format_to_string
-- Args: [ Arg
--           { argCName = "format"
--           , argType =
--               TInterface
--                 Name
--                   { namespace = "HarfBuzz" , name = "buffer_serialize_format_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #hb_buffer_serialize_format_t to convert."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "hb_buffer_serialize_format_to_string" hb_buffer_serialize_format_to_string :: 
    CUInt ->                                -- format : TInterface (Name {namespace = "HarfBuzz", name = "buffer_serialize_format_t"})
    IO CString

-- | Converts /@format@/ to the string corresponding it, or 'P.Nothing' if it is not a valid
-- t'GI.HarfBuzz.Enums.BufferSerializeFormatT'.
-- 
-- /Since: 0.9.7/
bufferSerializeFormatToString ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.Enums.BufferSerializeFormatT
    -- ^ /@format@/: an t'GI.HarfBuzz.Enums.BufferSerializeFormatT' to convert.
    -> m T.Text
    -- ^ __Returns:__ 
    -- A 'P.Nothing' terminated string corresponding to /@format@/. Should not be freed.
bufferSerializeFormatToString :: BufferSerializeFormatT -> m Text
bufferSerializeFormatToString BufferSerializeFormatT
format = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
    let format' :: CUInt
format' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (BufferSerializeFormatT -> Int)
-> BufferSerializeFormatT
-> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BufferSerializeFormatT -> Int
forall a. Enum a => a -> Int
fromEnum) BufferSerializeFormatT
format
    CString
result <- CUInt -> IO CString
hb_buffer_serialize_format_to_string CUInt
format'
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"bufferSerializeFormatToString" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'


-- function buffer_serialize_format_from_string
-- Args: [ Arg
--           { argCName = "str"
--           , argType = TCArray False (-1) 1 (TBasicType TUInt8)
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a string to parse" , 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 "length of @str, or -1 if string is %NULL terminated"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "len"
--              , argType = TBasicType TInt
--              , direction = DirectionIn
--              , mayBeNull = False
--              , argDoc =
--                  Documentation
--                    { rawDocText =
--                        Just "length of @str, or -1 if string is %NULL terminated"
--                    , sinceVersion = Nothing
--                    }
--              , argScope = ScopeTypeInvalid
--              , argClosure = -1
--              , argDestroy = -1
--              , argCallerAllocates = False
--              , transfer = TransferNothing
--              }
--          ]
-- returnType: Just
--               (TInterface
--                  Name
--                    { namespace = "HarfBuzz" , name = "buffer_serialize_format_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_buffer_serialize_format_from_string" hb_buffer_serialize_format_from_string :: 
    Ptr Word8 ->                            -- str : TCArray False (-1) 1 (TBasicType TUInt8)
    Int32 ->                                -- len : TBasicType TInt
    IO CUInt

-- | Parses a string into an t'GI.HarfBuzz.Enums.BufferSerializeFormatT'. Does not check if
-- /@str@/ is a valid buffer serialization format, use
-- 'GI.HarfBuzz.Functions.bufferSerializeListFormats' to get the list of supported formats.
-- 
-- /Since: 0.9.7/
bufferSerializeFormatFromString ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    ByteString
    -- ^ /@str@/: a string to parse
    -> m HarfBuzz.Enums.BufferSerializeFormatT
    -- ^ __Returns:__ The parsed t'GI.HarfBuzz.Enums.BufferSerializeFormatT'.
bufferSerializeFormatFromString :: ByteString -> m BufferSerializeFormatT
bufferSerializeFormatFromString ByteString
str = IO BufferSerializeFormatT -> m BufferSerializeFormatT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO BufferSerializeFormatT -> m BufferSerializeFormatT)
-> IO BufferSerializeFormatT -> m BufferSerializeFormatT
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
$ ByteString -> Int
B.length ByteString
str
    Ptr Word8
str' <- ByteString -> IO (Ptr Word8)
packByteString ByteString
str
    CUInt
result <- Ptr Word8 -> Int32 -> IO CUInt
hb_buffer_serialize_format_from_string Ptr Word8
str' Int32
len
    let result' :: BufferSerializeFormatT
result' = (Int -> BufferSerializeFormatT
forall a. Enum a => Int -> a
toEnum (Int -> BufferSerializeFormatT)
-> (CUInt -> Int) -> CUInt -> BufferSerializeFormatT
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
    Ptr Word8 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word8
str'
    BufferSerializeFormatT -> IO BufferSerializeFormatT
forall (m :: * -> *) a. Monad m => a -> m a
return BufferSerializeFormatT
result'


-- function buffer_reverse_range
-- Args: [ Arg
--           { argCName = "buffer"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "buffer_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #hb_buffer_t." , 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 "start index." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "end"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "end index." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_buffer_reverse_range" hb_buffer_reverse_range :: 
    Ptr HarfBuzz.BufferT.BufferT ->         -- buffer : TInterface (Name {namespace = "HarfBuzz", name = "buffer_t"})
    Word32 ->                               -- start : TBasicType TUInt
    Word32 ->                               -- end : TBasicType TUInt
    IO ()

-- | Reverses buffer contents between start to end.
-- 
-- /Since: 0.9.41/
bufferReverseRange ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.BufferT.BufferT
    -- ^ /@buffer@/: an t'GI.HarfBuzz.Structs.BufferT.BufferT'.
    -> Word32
    -- ^ /@start@/: start index.
    -> Word32
    -- ^ /@end@/: end index.
    -> m ()
bufferReverseRange :: BufferT -> Word32 -> Word32 -> m ()
bufferReverseRange BufferT
buffer Word32
start Word32
end = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr BufferT
buffer' <- BufferT -> IO (Ptr BufferT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BufferT
buffer
    Ptr BufferT -> Word32 -> Word32 -> IO ()
hb_buffer_reverse_range Ptr BufferT
buffer' Word32
start Word32
end
    BufferT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BufferT
buffer
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function buffer_reverse_clusters
-- Args: [ Arg
--           { argCName = "buffer"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "buffer_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #hb_buffer_t." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_buffer_reverse_clusters" hb_buffer_reverse_clusters :: 
    Ptr HarfBuzz.BufferT.BufferT ->         -- buffer : TInterface (Name {namespace = "HarfBuzz", name = "buffer_t"})
    IO ()

-- | Reverses buffer clusters.  That is, the buffer contents are
-- reversed, then each cluster (consecutive items having the
-- same cluster number) are reversed again.
-- 
-- /Since: 0.9.2/
bufferReverseClusters ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.BufferT.BufferT
    -- ^ /@buffer@/: an t'GI.HarfBuzz.Structs.BufferT.BufferT'.
    -> m ()
bufferReverseClusters :: BufferT -> m ()
bufferReverseClusters BufferT
buffer = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr BufferT
buffer' <- BufferT -> IO (Ptr BufferT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BufferT
buffer
    Ptr BufferT -> IO ()
hb_buffer_reverse_clusters Ptr BufferT
buffer'
    BufferT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BufferT
buffer
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function buffer_reverse
-- Args: [ Arg
--           { argCName = "buffer"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "buffer_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #hb_buffer_t." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_buffer_reverse" hb_buffer_reverse :: 
    Ptr HarfBuzz.BufferT.BufferT ->         -- buffer : TInterface (Name {namespace = "HarfBuzz", name = "buffer_t"})
    IO ()

-- | Reverses buffer contents.
-- 
-- /Since: 0.9.2/
bufferReverse ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.BufferT.BufferT
    -- ^ /@buffer@/: an t'GI.HarfBuzz.Structs.BufferT.BufferT'.
    -> m ()
bufferReverse :: BufferT -> m ()
bufferReverse BufferT
buffer = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr BufferT
buffer' <- BufferT -> IO (Ptr BufferT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BufferT
buffer
    Ptr BufferT -> IO ()
hb_buffer_reverse Ptr BufferT
buffer'
    BufferT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BufferT
buffer
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function buffer_reset
-- Args: [ Arg
--           { argCName = "buffer"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "buffer_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #hb_buffer_t." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_buffer_reset" hb_buffer_reset :: 
    Ptr HarfBuzz.BufferT.BufferT ->         -- buffer : TInterface (Name {namespace = "HarfBuzz", name = "buffer_t"})
    IO ()

-- | Resets the buffer to its initial status, as if it was just newly created
-- with 'GI.HarfBuzz.Functions.bufferCreate'.
-- 
-- /Since: 0.9.2/
bufferReset ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.BufferT.BufferT
    -- ^ /@buffer@/: an t'GI.HarfBuzz.Structs.BufferT.BufferT'.
    -> m ()
bufferReset :: BufferT -> m ()
bufferReset BufferT
buffer = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr BufferT
buffer' <- BufferT -> IO (Ptr BufferT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BufferT
buffer
    Ptr BufferT -> IO ()
hb_buffer_reset Ptr BufferT
buffer'
    BufferT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BufferT
buffer
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function buffer_pre_allocate
-- Args: [ Arg
--           { argCName = "buffer"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "buffer_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #hb_buffer_t." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "size"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "number of items to pre allocate."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_buffer_pre_allocate" hb_buffer_pre_allocate :: 
    Ptr HarfBuzz.BufferT.BufferT ->         -- buffer : TInterface (Name {namespace = "HarfBuzz", name = "buffer_t"})
    Word32 ->                               -- size : TBasicType TUInt
    IO Int32

-- | Pre allocates memory for /@buffer@/ to fit at least /@size@/ number of items.
-- 
-- /Since: 0.9.2/
bufferPreAllocate ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.BufferT.BufferT
    -- ^ /@buffer@/: an t'GI.HarfBuzz.Structs.BufferT.BufferT'.
    -> Word32
    -- ^ /@size@/: number of items to pre allocate.
    -> m Int32
    -- ^ __Returns:__ @/true/@ if /@buffer@/ memory allocation succeeded, @/false/@ otherwise.
bufferPreAllocate :: BufferT -> Word32 -> m Int32
bufferPreAllocate BufferT
buffer Word32
size = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr BufferT
buffer' <- BufferT -> IO (Ptr BufferT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BufferT
buffer
    Int32
result <- Ptr BufferT -> Word32 -> IO Int32
hb_buffer_pre_allocate Ptr BufferT
buffer' Word32
size
    BufferT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BufferT
buffer
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function buffer_normalize_glyphs
-- Args: [ Arg
--           { argCName = "buffer"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "buffer_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #hb_buffer_t." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_buffer_normalize_glyphs" hb_buffer_normalize_glyphs :: 
    Ptr HarfBuzz.BufferT.BufferT ->         -- buffer : TInterface (Name {namespace = "HarfBuzz", name = "buffer_t"})
    IO ()

-- | Reorders a glyph buffer to have canonical in-cluster glyph order \/ position.
-- The resulting clusters should behave identical to pre-reordering clusters.
-- 
-- \<note>This has nothing to do with Unicode normalization.\<\/note>
-- 
-- /Since: 0.9.2/
bufferNormalizeGlyphs ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.BufferT.BufferT
    -- ^ /@buffer@/: an t'GI.HarfBuzz.Structs.BufferT.BufferT'.
    -> m ()
bufferNormalizeGlyphs :: BufferT -> m ()
bufferNormalizeGlyphs BufferT
buffer = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr BufferT
buffer' <- BufferT -> IO (Ptr BufferT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BufferT
buffer
    Ptr BufferT -> IO ()
hb_buffer_normalize_glyphs Ptr BufferT
buffer'
    BufferT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BufferT
buffer
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function buffer_guess_segment_properties
-- Args: [ Arg
--           { argCName = "buffer"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "buffer_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #hb_buffer_t." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_buffer_guess_segment_properties" hb_buffer_guess_segment_properties :: 
    Ptr HarfBuzz.BufferT.BufferT ->         -- buffer : TInterface (Name {namespace = "HarfBuzz", name = "buffer_t"})
    IO ()

-- | Sets unset buffer segment properties based on buffer Unicode
-- contents.  If buffer is not empty, it must have content type
-- 'GI.HarfBuzz.Enums.BufferContentTypeTUnicode'.
-- 
-- If buffer script is not set (ie. is 'GI.HarfBuzz.Enums.ScriptTInvalid'), it
-- will be set to the Unicode script of the first character in
-- the buffer that has a script other than 'GI.HarfBuzz.Enums.ScriptTCommon',
-- 'GI.HarfBuzz.Enums.ScriptTInherited', and 'GI.HarfBuzz.Enums.ScriptTUnknown'.
-- 
-- Next, if buffer direction is not set (ie. is 'GI.HarfBuzz.Enums.DirectionTInvalid'),
-- it will be set to the natural horizontal direction of the
-- buffer script as returned by 'GI.HarfBuzz.Functions.scriptGetHorizontalDirection'.
-- If 'GI.HarfBuzz.Functions.scriptGetHorizontalDirection' returns 'GI.HarfBuzz.Enums.DirectionTInvalid',
-- then 'GI.HarfBuzz.Enums.DirectionTLtr' is used.
-- 
-- Finally, if buffer language is not set (ie. is 'GI.HarfBuzz.Constants.LANGUAGE_INVALID'),
-- it will be set to the process\'s default language as returned by
-- 'GI.HarfBuzz.Functions.languageGetDefault'.  This may change in the future by
-- taking buffer script into consideration when choosing a language.
-- Note that 'GI.HarfBuzz.Functions.languageGetDefault' is NOT threadsafe the first time
-- it is called.  See documentation for that function for details.
-- 
-- /Since: 0.9.7/
bufferGuessSegmentProperties ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.BufferT.BufferT
    -- ^ /@buffer@/: an t'GI.HarfBuzz.Structs.BufferT.BufferT'.
    -> m ()
bufferGuessSegmentProperties :: BufferT -> m ()
bufferGuessSegmentProperties BufferT
buffer = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr BufferT
buffer' <- BufferT -> IO (Ptr BufferT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BufferT
buffer
    Ptr BufferT -> IO ()
hb_buffer_guess_segment_properties Ptr BufferT
buffer'
    BufferT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BufferT
buffer
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function buffer_get_unicode_funcs
-- Args: [ Arg
--           { argCName = "buffer"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "buffer_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #hb_buffer_t." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface
--                  Name { namespace = "HarfBuzz" , name = "unicode_funcs_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_buffer_get_unicode_funcs" hb_buffer_get_unicode_funcs :: 
    Ptr HarfBuzz.BufferT.BufferT ->         -- buffer : TInterface (Name {namespace = "HarfBuzz", name = "buffer_t"})
    IO (Ptr HarfBuzz.UnicodeFuncsT.UnicodeFuncsT)

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
bufferGetUnicodeFuncs ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.BufferT.BufferT
    -- ^ /@buffer@/: an t'GI.HarfBuzz.Structs.BufferT.BufferT'.
    -> m HarfBuzz.UnicodeFuncsT.UnicodeFuncsT
bufferGetUnicodeFuncs :: BufferT -> m UnicodeFuncsT
bufferGetUnicodeFuncs BufferT
buffer = IO UnicodeFuncsT -> m UnicodeFuncsT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO UnicodeFuncsT -> m UnicodeFuncsT)
-> IO UnicodeFuncsT -> m UnicodeFuncsT
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 UnicodeFuncsT
result <- Ptr BufferT -> IO (Ptr UnicodeFuncsT)
hb_buffer_get_unicode_funcs Ptr BufferT
buffer'
    Text -> Ptr UnicodeFuncsT -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"bufferGetUnicodeFuncs" Ptr UnicodeFuncsT
result
    UnicodeFuncsT
result' <- ((ManagedPtr UnicodeFuncsT -> UnicodeFuncsT)
-> Ptr UnicodeFuncsT -> IO UnicodeFuncsT
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr UnicodeFuncsT -> UnicodeFuncsT
HarfBuzz.UnicodeFuncsT.UnicodeFuncsT) Ptr UnicodeFuncsT
result
    BufferT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BufferT
buffer
    UnicodeFuncsT -> IO UnicodeFuncsT
forall (m :: * -> *) a. Monad m => a -> m a
return UnicodeFuncsT
result'


-- function buffer_get_segment_properties
-- Args: [ Arg
--           { argCName = "buffer"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "buffer_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #hb_buffer_t." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "props"
--           , argType =
--               TInterface
--                 Name { namespace = "HarfBuzz" , name = "segment_properties_t" }
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the output #hb_segment_properties_t."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = True
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_buffer_get_segment_properties" hb_buffer_get_segment_properties :: 
    Ptr HarfBuzz.BufferT.BufferT ->         -- buffer : TInterface (Name {namespace = "HarfBuzz", name = "buffer_t"})
    Ptr HarfBuzz.SegmentPropertiesT.SegmentPropertiesT -> -- props : TInterface (Name {namespace = "HarfBuzz", name = "segment_properties_t"})
    IO ()

-- | Sets /@props@/ to the t'GI.HarfBuzz.Structs.SegmentPropertiesT.SegmentPropertiesT' of /@buffer@/.
-- 
-- /Since: 0.9.7/
bufferGetSegmentProperties ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.BufferT.BufferT
    -- ^ /@buffer@/: an t'GI.HarfBuzz.Structs.BufferT.BufferT'.
    -> m (HarfBuzz.SegmentPropertiesT.SegmentPropertiesT)
bufferGetSegmentProperties :: BufferT -> m SegmentPropertiesT
bufferGetSegmentProperties BufferT
buffer = IO SegmentPropertiesT -> m SegmentPropertiesT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SegmentPropertiesT -> m SegmentPropertiesT)
-> IO SegmentPropertiesT -> m SegmentPropertiesT
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 SegmentPropertiesT
props <- Int -> IO (Ptr SegmentPropertiesT)
forall a. GBoxed a => Int -> IO (Ptr a)
SP.callocBoxedBytes Int
32 :: IO (Ptr HarfBuzz.SegmentPropertiesT.SegmentPropertiesT)
    Ptr BufferT -> Ptr SegmentPropertiesT -> IO ()
hb_buffer_get_segment_properties Ptr BufferT
buffer' Ptr SegmentPropertiesT
props
    SegmentPropertiesT
props' <- ((ManagedPtr SegmentPropertiesT -> SegmentPropertiesT)
-> Ptr SegmentPropertiesT -> IO SegmentPropertiesT
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr SegmentPropertiesT -> SegmentPropertiesT
HarfBuzz.SegmentPropertiesT.SegmentPropertiesT) Ptr SegmentPropertiesT
props
    BufferT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BufferT
buffer
    SegmentPropertiesT -> IO SegmentPropertiesT
forall (m :: * -> *) a. Monad m => a -> m a
return SegmentPropertiesT
props'


-- function buffer_get_script
-- Args: [ Arg
--           { argCName = "buffer"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "buffer_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #hb_buffer_t." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "HarfBuzz" , name = "script_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_buffer_get_script" hb_buffer_get_script :: 
    Ptr HarfBuzz.BufferT.BufferT ->         -- buffer : TInterface (Name {namespace = "HarfBuzz", name = "buffer_t"})
    IO CUInt

-- | See 'GI.HarfBuzz.Functions.bufferSetScript'.
-- 
-- /Since: 0.9.2/
bufferGetScript ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.BufferT.BufferT
    -- ^ /@buffer@/: an t'GI.HarfBuzz.Structs.BufferT.BufferT'.
    -> m HarfBuzz.Enums.ScriptT
    -- ^ __Returns:__ The t'GI.HarfBuzz.Enums.ScriptT' of the /@buffer@/.
bufferGetScript :: BufferT -> m ScriptT
bufferGetScript BufferT
buffer = IO ScriptT -> m ScriptT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ScriptT -> m ScriptT) -> IO ScriptT -> m ScriptT
forall a b. (a -> b) -> a -> b
$ do
    Ptr BufferT
buffer' <- BufferT -> IO (Ptr BufferT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BufferT
buffer
    CUInt
result <- Ptr BufferT -> IO CUInt
hb_buffer_get_script Ptr BufferT
buffer'
    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
    BufferT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BufferT
buffer
    ScriptT -> IO ScriptT
forall (m :: * -> *) a. Monad m => a -> m a
return ScriptT
result'


-- function buffer_get_replacement_codepoint
-- Args: [ Arg
--           { argCName = "buffer"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "buffer_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #hb_buffer_t." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt32)
-- throws : False
-- Skip return : False

foreign import ccall "hb_buffer_get_replacement_codepoint" hb_buffer_get_replacement_codepoint :: 
    Ptr HarfBuzz.BufferT.BufferT ->         -- buffer : TInterface (Name {namespace = "HarfBuzz", name = "buffer_t"})
    IO Word32

-- | See 'GI.HarfBuzz.Functions.bufferSetReplacementCodepoint'.
-- 
-- /Since: 0.9.31/
bufferGetReplacementCodepoint ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.BufferT.BufferT
    -- ^ /@buffer@/: an t'GI.HarfBuzz.Structs.BufferT.BufferT'.
    -> m Word32
    -- ^ __Returns:__ The /@buffer@/ replacement @/hb_codepoint_t/@.
bufferGetReplacementCodepoint :: BufferT -> m Word32
bufferGetReplacementCodepoint BufferT
buffer = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
    Ptr BufferT
buffer' <- BufferT -> IO (Ptr BufferT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BufferT
buffer
    Word32
result <- Ptr BufferT -> IO Word32
hb_buffer_get_replacement_codepoint Ptr BufferT
buffer'
    BufferT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BufferT
buffer
    Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result


-- function buffer_get_length
-- Args: [ Arg
--           { argCName = "buffer"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "buffer_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #hb_buffer_t." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_buffer_get_length" hb_buffer_get_length :: 
    Ptr HarfBuzz.BufferT.BufferT ->         -- buffer : TInterface (Name {namespace = "HarfBuzz", name = "buffer_t"})
    IO Word32

-- | Returns the number of items in the buffer.
-- 
-- /Since: 0.9.2/
bufferGetLength ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.BufferT.BufferT
    -- ^ /@buffer@/: an t'GI.HarfBuzz.Structs.BufferT.BufferT'.
    -> m Word32
    -- ^ __Returns:__ The /@buffer@/ length.
    -- The value valid as long as buffer has not been modified.
bufferGetLength :: BufferT -> m Word32
bufferGetLength BufferT
buffer = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
    Ptr BufferT
buffer' <- BufferT -> IO (Ptr BufferT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BufferT
buffer
    Word32
result <- Ptr BufferT -> IO Word32
hb_buffer_get_length Ptr BufferT
buffer'
    BufferT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BufferT
buffer
    Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result


-- function buffer_get_language
-- Args: [ Arg
--           { argCName = "buffer"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "buffer_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #hb_buffer_t." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "HarfBuzz" , name = "language_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_buffer_get_language" hb_buffer_get_language :: 
    Ptr HarfBuzz.BufferT.BufferT ->         -- buffer : TInterface (Name {namespace = "HarfBuzz", name = "buffer_t"})
    IO (Ptr HarfBuzz.LanguageT.LanguageT)

-- | See 'GI.HarfBuzz.Functions.bufferSetLanguage'.
-- 
-- /Since: 0.9.2/
bufferGetLanguage ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.BufferT.BufferT
    -- ^ /@buffer@/: an t'GI.HarfBuzz.Structs.BufferT.BufferT'.
    -> m HarfBuzz.LanguageT.LanguageT
    -- ^ __Returns:__ 
    -- The t'GI.HarfBuzz.Structs.LanguageT.LanguageT' of the buffer. Must not be freed by the caller.
bufferGetLanguage :: BufferT -> m LanguageT
bufferGetLanguage BufferT
buffer = IO LanguageT -> m LanguageT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO LanguageT -> m LanguageT) -> IO LanguageT -> m LanguageT
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 LanguageT
result <- Ptr BufferT -> IO (Ptr LanguageT)
hb_buffer_get_language Ptr BufferT
buffer'
    Text -> Ptr LanguageT -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"bufferGetLanguage" Ptr LanguageT
result
    LanguageT
result' <- ((ManagedPtr LanguageT -> LanguageT)
-> Ptr LanguageT -> IO LanguageT
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr LanguageT -> LanguageT
HarfBuzz.LanguageT.LanguageT) Ptr LanguageT
result
    BufferT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BufferT
buffer
    LanguageT -> IO LanguageT
forall (m :: * -> *) a. Monad m => a -> m a
return LanguageT
result'


-- function buffer_get_invisible_glyph
-- Args: [ Arg
--           { argCName = "buffer"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "buffer_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #hb_buffer_t." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt32)
-- throws : False
-- Skip return : False

foreign import ccall "hb_buffer_get_invisible_glyph" hb_buffer_get_invisible_glyph :: 
    Ptr HarfBuzz.BufferT.BufferT ->         -- buffer : TInterface (Name {namespace = "HarfBuzz", name = "buffer_t"})
    IO Word32

-- | See 'GI.HarfBuzz.Functions.bufferSetInvisibleGlyph'.
-- 
-- /Since: 2.0.0/
bufferGetInvisibleGlyph ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.BufferT.BufferT
    -- ^ /@buffer@/: an t'GI.HarfBuzz.Structs.BufferT.BufferT'.
    -> m Word32
    -- ^ __Returns:__ The /@buffer@/ invisible @/hb_codepoint_t/@.
bufferGetInvisibleGlyph :: BufferT -> m Word32
bufferGetInvisibleGlyph BufferT
buffer = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
    Ptr BufferT
buffer' <- BufferT -> IO (Ptr BufferT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BufferT
buffer
    Word32
result <- Ptr BufferT -> IO Word32
hb_buffer_get_invisible_glyph Ptr BufferT
buffer'
    BufferT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BufferT
buffer
    Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result


-- function buffer_get_glyph_positions
-- Args: [ Arg
--           { argCName = "buffer"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "buffer_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #hb_buffer_t." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "length"
--           , argType = TBasicType TUInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "output length." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "length"
--              , argType = TBasicType TUInt
--              , direction = DirectionOut
--              , mayBeNull = False
--              , argDoc =
--                  Documentation
--                    { rawDocText = Just "output length." , sinceVersion = Nothing }
--              , argScope = ScopeTypeInvalid
--              , argClosure = -1
--              , argDestroy = -1
--              , argCallerAllocates = False
--              , transfer = TransferEverything
--              }
--          ]
-- returnType: Just
--               (TCArray
--                  False
--                  (-1)
--                  1
--                  (TInterface
--                     Name { namespace = "HarfBuzz" , name = "glyph_position_t" }))
-- throws : False
-- Skip return : False

foreign import ccall "hb_buffer_get_glyph_positions" hb_buffer_get_glyph_positions :: 
    Ptr HarfBuzz.BufferT.BufferT ->         -- buffer : TInterface (Name {namespace = "HarfBuzz", name = "buffer_t"})
    Ptr Word32 ->                           -- length : TBasicType TUInt
    IO (Ptr HarfBuzz.GlyphPositionT.GlyphPositionT)

-- | Returns /@buffer@/ glyph position array.  Returned pointer
-- is valid as long as /@buffer@/ contents are not modified.
-- 
-- /Since: 0.9.2/
bufferGetGlyphPositions ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.BufferT.BufferT
    -- ^ /@buffer@/: an t'GI.HarfBuzz.Structs.BufferT.BufferT'.
    -> m [HarfBuzz.GlyphPositionT.GlyphPositionT]
    -- ^ __Returns:__ 
    -- The /@buffer@/ glyph position array.
    -- The value valid as long as buffer has not been modified.
bufferGetGlyphPositions :: BufferT -> m [GlyphPositionT]
bufferGetGlyphPositions BufferT
buffer = IO [GlyphPositionT] -> m [GlyphPositionT]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [GlyphPositionT] -> m [GlyphPositionT])
-> IO [GlyphPositionT] -> m [GlyphPositionT]
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 Word32
length_ <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
    Ptr GlyphPositionT
result <- Ptr BufferT -> Ptr Word32 -> IO (Ptr GlyphPositionT)
hb_buffer_get_glyph_positions Ptr BufferT
buffer' Ptr Word32
length_
    Word32
length_' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
length_
    Text -> Ptr GlyphPositionT -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"bufferGetGlyphPositions" Ptr GlyphPositionT
result
    [Ptr GlyphPositionT]
result' <- (Int -> Word32 -> Ptr GlyphPositionT -> IO [Ptr GlyphPositionT]
forall a b.
(Integral a, GBoxed b) =>
Int -> a -> Ptr b -> IO [Ptr b]
unpackBoxedArrayWithLength Int
20 Word32
length_') Ptr GlyphPositionT
result
    [GlyphPositionT]
result'' <- (Ptr GlyphPositionT -> IO GlyphPositionT)
-> [Ptr GlyphPositionT] -> IO [GlyphPositionT]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((ManagedPtr GlyphPositionT -> GlyphPositionT)
-> Ptr GlyphPositionT -> IO GlyphPositionT
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr GlyphPositionT -> GlyphPositionT
HarfBuzz.GlyphPositionT.GlyphPositionT) [Ptr GlyphPositionT]
result'
    BufferT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BufferT
buffer
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
length_
    [GlyphPositionT] -> IO [GlyphPositionT]
forall (m :: * -> *) a. Monad m => a -> m a
return [GlyphPositionT]
result''


-- function buffer_get_glyph_infos
-- Args: [ Arg
--           { argCName = "buffer"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "buffer_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #hb_buffer_t." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "length"
--           , argType = TBasicType TUInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "output array length."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "length"
--              , argType = TBasicType TUInt
--              , direction = DirectionOut
--              , mayBeNull = False
--              , argDoc =
--                  Documentation
--                    { rawDocText = Just "output array length."
--                    , sinceVersion = Nothing
--                    }
--              , argScope = ScopeTypeInvalid
--              , argClosure = -1
--              , argDestroy = -1
--              , argCallerAllocates = False
--              , transfer = TransferEverything
--              }
--          ]
-- returnType: Just
--               (TCArray
--                  False
--                  (-1)
--                  1
--                  (TInterface
--                     Name { namespace = "HarfBuzz" , name = "glyph_info_t" }))
-- throws : False
-- Skip return : False

foreign import ccall "hb_buffer_get_glyph_infos" hb_buffer_get_glyph_infos :: 
    Ptr HarfBuzz.BufferT.BufferT ->         -- buffer : TInterface (Name {namespace = "HarfBuzz", name = "buffer_t"})
    Ptr Word32 ->                           -- length : TBasicType TUInt
    IO (Ptr HarfBuzz.GlyphInfoT.GlyphInfoT)

-- | Returns /@buffer@/ glyph information array.  Returned pointer
-- is valid as long as /@buffer@/ contents are not modified.
-- 
-- /Since: 0.9.2/
bufferGetGlyphInfos ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.BufferT.BufferT
    -- ^ /@buffer@/: an t'GI.HarfBuzz.Structs.BufferT.BufferT'.
    -> m [HarfBuzz.GlyphInfoT.GlyphInfoT]
    -- ^ __Returns:__ 
    -- The /@buffer@/ glyph information array.
    -- The value valid as long as buffer has not been modified.
bufferGetGlyphInfos :: BufferT -> m [GlyphInfoT]
bufferGetGlyphInfos BufferT
buffer = IO [GlyphInfoT] -> m [GlyphInfoT]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [GlyphInfoT] -> m [GlyphInfoT])
-> IO [GlyphInfoT] -> m [GlyphInfoT]
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 Word32
length_ <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
    Ptr GlyphInfoT
result <- Ptr BufferT -> Ptr Word32 -> IO (Ptr GlyphInfoT)
hb_buffer_get_glyph_infos Ptr BufferT
buffer' Ptr Word32
length_
    Word32
length_' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
length_
    Text -> Ptr GlyphInfoT -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"bufferGetGlyphInfos" Ptr GlyphInfoT
result
    [Ptr GlyphInfoT]
result' <- (Int -> Word32 -> Ptr GlyphInfoT -> IO [Ptr GlyphInfoT]
forall a b.
(Integral a, GBoxed b) =>
Int -> a -> Ptr b -> IO [Ptr b]
unpackBoxedArrayWithLength Int
20 Word32
length_') Ptr GlyphInfoT
result
    [GlyphInfoT]
result'' <- (Ptr GlyphInfoT -> IO GlyphInfoT)
-> [Ptr GlyphInfoT] -> IO [GlyphInfoT]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((ManagedPtr GlyphInfoT -> GlyphInfoT)
-> Ptr GlyphInfoT -> IO GlyphInfoT
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr GlyphInfoT -> GlyphInfoT
HarfBuzz.GlyphInfoT.GlyphInfoT) [Ptr GlyphInfoT]
result'
    BufferT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BufferT
buffer
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
length_
    [GlyphInfoT] -> IO [GlyphInfoT]
forall (m :: * -> *) a. Monad m => a -> m a
return [GlyphInfoT]
result''


-- function buffer_get_flags
-- Args: [ Arg
--           { argCName = "buffer"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "buffer_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #hb_buffer_t." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface
--                  Name { namespace = "HarfBuzz" , name = "buffer_flags_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_buffer_get_flags" hb_buffer_get_flags :: 
    Ptr HarfBuzz.BufferT.BufferT ->         -- buffer : TInterface (Name {namespace = "HarfBuzz", name = "buffer_t"})
    IO CUInt

-- | See 'GI.HarfBuzz.Functions.bufferSetFlags'.
-- 
-- /Since: 0.9.7/
bufferGetFlags ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.BufferT.BufferT
    -- ^ /@buffer@/: an t'GI.HarfBuzz.Structs.BufferT.BufferT'.
    -> m [HarfBuzz.Flags.BufferFlagsT]
    -- ^ __Returns:__ The /@buffer@/ flags.
bufferGetFlags :: BufferT -> m [BufferFlagsT]
bufferGetFlags BufferT
buffer = IO [BufferFlagsT] -> m [BufferFlagsT]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [BufferFlagsT] -> m [BufferFlagsT])
-> IO [BufferFlagsT] -> m [BufferFlagsT]
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
    CUInt
result <- Ptr BufferT -> IO CUInt
hb_buffer_get_flags Ptr BufferT
buffer'
    let result' :: [BufferFlagsT]
result' = CUInt -> [BufferFlagsT]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
result
    BufferT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BufferT
buffer
    [BufferFlagsT] -> IO [BufferFlagsT]
forall (m :: * -> *) a. Monad m => a -> m a
return [BufferFlagsT]
result'


-- function buffer_get_empty
-- Args: []
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "HarfBuzz" , name = "buffer_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_buffer_get_empty" hb_buffer_get_empty :: 
    IO (Ptr HarfBuzz.BufferT.BufferT)

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
bufferGetEmpty ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m HarfBuzz.BufferT.BufferT
bufferGetEmpty :: m BufferT
bufferGetEmpty  = IO BufferT -> m BufferT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO BufferT -> m BufferT) -> IO BufferT -> m BufferT
forall a b. (a -> b) -> a -> b
$ do
    Ptr BufferT
result <- IO (Ptr BufferT)
hb_buffer_get_empty
    Text -> Ptr BufferT -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"bufferGetEmpty" Ptr BufferT
result
    BufferT
result' <- ((ManagedPtr BufferT -> BufferT) -> Ptr BufferT -> IO BufferT
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr BufferT -> BufferT
HarfBuzz.BufferT.BufferT) Ptr BufferT
result
    BufferT -> IO BufferT
forall (m :: * -> *) a. Monad m => a -> m a
return BufferT
result'


-- function buffer_get_direction
-- Args: [ Arg
--           { argCName = "buffer"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "buffer_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #hb_buffer_t." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "HarfBuzz" , name = "direction_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_buffer_get_direction" hb_buffer_get_direction :: 
    Ptr HarfBuzz.BufferT.BufferT ->         -- buffer : TInterface (Name {namespace = "HarfBuzz", name = "buffer_t"})
    IO CUInt

-- | See 'GI.HarfBuzz.Functions.bufferSetDirection'
-- 
-- /Since: 0.9.2/
bufferGetDirection ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.BufferT.BufferT
    -- ^ /@buffer@/: an t'GI.HarfBuzz.Structs.BufferT.BufferT'.
    -> m HarfBuzz.Enums.DirectionT
    -- ^ __Returns:__ The direction of the /@buffer@/.
bufferGetDirection :: BufferT -> m DirectionT
bufferGetDirection BufferT
buffer = IO DirectionT -> m DirectionT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DirectionT -> m DirectionT) -> IO DirectionT -> m DirectionT
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
    CUInt
result <- Ptr BufferT -> IO CUInt
hb_buffer_get_direction Ptr BufferT
buffer'
    let result' :: DirectionT
result' = (Int -> DirectionT
forall a. Enum a => Int -> a
toEnum (Int -> DirectionT) -> (CUInt -> Int) -> CUInt -> DirectionT
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
    BufferT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BufferT
buffer
    DirectionT -> IO DirectionT
forall (m :: * -> *) a. Monad m => a -> m a
return DirectionT
result'


-- function buffer_get_content_type
-- Args: [ Arg
--           { argCName = "buffer"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "buffer_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #hb_buffer_t." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface
--                  Name { namespace = "HarfBuzz" , name = "buffer_content_type_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_buffer_get_content_type" hb_buffer_get_content_type :: 
    Ptr HarfBuzz.BufferT.BufferT ->         -- buffer : TInterface (Name {namespace = "HarfBuzz", name = "buffer_t"})
    IO CUInt

-- | see 'GI.HarfBuzz.Functions.bufferSetContentType'.
-- 
-- /Since: 0.9.5/
bufferGetContentType ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.BufferT.BufferT
    -- ^ /@buffer@/: an t'GI.HarfBuzz.Structs.BufferT.BufferT'.
    -> m HarfBuzz.Enums.BufferContentTypeT
    -- ^ __Returns:__ The type of /@buffer@/ contents.
bufferGetContentType :: BufferT -> m BufferContentTypeT
bufferGetContentType BufferT
buffer = IO BufferContentTypeT -> m BufferContentTypeT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO BufferContentTypeT -> m BufferContentTypeT)
-> IO BufferContentTypeT -> m BufferContentTypeT
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
    CUInt
result <- Ptr BufferT -> IO CUInt
hb_buffer_get_content_type Ptr BufferT
buffer'
    let result' :: BufferContentTypeT
result' = (Int -> BufferContentTypeT
forall a. Enum a => Int -> a
toEnum (Int -> BufferContentTypeT)
-> (CUInt -> Int) -> CUInt -> BufferContentTypeT
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
    BufferT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BufferT
buffer
    BufferContentTypeT -> IO BufferContentTypeT
forall (m :: * -> *) a. Monad m => a -> m a
return BufferContentTypeT
result'


-- function buffer_get_cluster_level
-- Args: [ Arg
--           { argCName = "buffer"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "buffer_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #hb_buffer_t." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface
--                  Name { namespace = "HarfBuzz" , name = "buffer_cluster_level_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_buffer_get_cluster_level" hb_buffer_get_cluster_level :: 
    Ptr HarfBuzz.BufferT.BufferT ->         -- buffer : TInterface (Name {namespace = "HarfBuzz", name = "buffer_t"})
    IO CUInt

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.42/
bufferGetClusterLevel ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.BufferT.BufferT
    -- ^ /@buffer@/: an t'GI.HarfBuzz.Structs.BufferT.BufferT'.
    -> m HarfBuzz.Enums.BufferClusterLevelT
bufferGetClusterLevel :: BufferT -> m BufferClusterLevelT
bufferGetClusterLevel BufferT
buffer = IO BufferClusterLevelT -> m BufferClusterLevelT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO BufferClusterLevelT -> m BufferClusterLevelT)
-> IO BufferClusterLevelT -> m BufferClusterLevelT
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
    CUInt
result <- Ptr BufferT -> IO CUInt
hb_buffer_get_cluster_level Ptr BufferT
buffer'
    let result' :: BufferClusterLevelT
result' = (Int -> BufferClusterLevelT
forall a. Enum a => Int -> a
toEnum (Int -> BufferClusterLevelT)
-> (CUInt -> Int) -> CUInt -> BufferClusterLevelT
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
    BufferT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BufferT
buffer
    BufferClusterLevelT -> IO BufferClusterLevelT
forall (m :: * -> *) a. Monad m => a -> m a
return BufferClusterLevelT
result'


-- function buffer_diff
-- Args: [ Arg
--           { argCName = "buffer"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "buffer_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a buffer." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "reference"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "buffer_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "other buffer to compare to."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "dottedcircle_glyph"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "glyph id of U+25CC DOTTED CIRCLE, or (hb_codepont_t) -1."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "position_fuzz"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "allowed absolute difference in position values."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface
--                  Name { namespace = "HarfBuzz" , name = "buffer_diff_flags_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_buffer_diff" hb_buffer_diff :: 
    Ptr HarfBuzz.BufferT.BufferT ->         -- buffer : TInterface (Name {namespace = "HarfBuzz", name = "buffer_t"})
    Ptr HarfBuzz.BufferT.BufferT ->         -- reference : TInterface (Name {namespace = "HarfBuzz", name = "buffer_t"})
    Word32 ->                               -- dottedcircle_glyph : TBasicType TUInt32
    Word32 ->                               -- position_fuzz : TBasicType TUInt
    IO CUInt

-- | If dottedcircle_glyph is (hb_codepoint_t) -1 then 'GI.HarfBuzz.Flags.BufferDiffFlagsTDottedCirclePresent'
-- and 'GI.HarfBuzz.Flags.BufferDiffFlagsTNotdefPresent' are never returned.  This should be used by most
-- callers if just comparing two buffers is needed.
-- 
-- /Since: 1.5.0/
bufferDiff ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.BufferT.BufferT
    -- ^ /@buffer@/: a buffer.
    -> HarfBuzz.BufferT.BufferT
    -- ^ /@reference@/: other buffer to compare to.
    -> Word32
    -- ^ /@dottedcircleGlyph@/: glyph id of U+25CC DOTTED CIRCLE, or (hb_codepont_t) -1.
    -> Word32
    -- ^ /@positionFuzz@/: allowed absolute difference in position values.
    -> m [HarfBuzz.Flags.BufferDiffFlagsT]
bufferDiff :: BufferT -> BufferT -> Word32 -> Word32 -> m [BufferDiffFlagsT]
bufferDiff BufferT
buffer BufferT
reference Word32
dottedcircleGlyph Word32
positionFuzz = IO [BufferDiffFlagsT] -> m [BufferDiffFlagsT]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [BufferDiffFlagsT] -> m [BufferDiffFlagsT])
-> IO [BufferDiffFlagsT] -> m [BufferDiffFlagsT]
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 BufferT
reference' <- BufferT -> IO (Ptr BufferT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BufferT
reference
    CUInt
result <- Ptr BufferT -> Ptr BufferT -> Word32 -> Word32 -> IO CUInt
hb_buffer_diff Ptr BufferT
buffer' Ptr BufferT
reference' Word32
dottedcircleGlyph Word32
positionFuzz
    let result' :: [BufferDiffFlagsT]
result' = CUInt -> [BufferDiffFlagsT]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
result
    BufferT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BufferT
buffer
    BufferT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BufferT
reference
    [BufferDiffFlagsT] -> IO [BufferDiffFlagsT]
forall (m :: * -> *) a. Monad m => a -> m a
return [BufferDiffFlagsT]
result'


-- function buffer_deserialize_glyphs
-- Args: [ Arg
--           { argCName = "buffer"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "buffer_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #hb_buffer_t buffer."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "buf"
--           , argType = TCArray False (-1) 2 (TBasicType TUTF8)
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "buf_len"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "end_ptr"
--           , argType = TBasicType TUTF8
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "font"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "font_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "format"
--           , argType =
--               TInterface
--                 Name
--                   { namespace = "HarfBuzz" , name = "buffer_serialize_format_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "buf_len"
--              , argType = TBasicType TInt
--              , direction = DirectionIn
--              , mayBeNull = False
--              , argDoc =
--                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--              , argScope = ScopeTypeInvalid
--              , argClosure = -1
--              , argDestroy = -1
--              , argCallerAllocates = False
--              , transfer = TransferNothing
--              }
--          ]
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_buffer_deserialize_glyphs" hb_buffer_deserialize_glyphs :: 
    Ptr HarfBuzz.BufferT.BufferT ->         -- buffer : TInterface (Name {namespace = "HarfBuzz", name = "buffer_t"})
    Ptr CString ->                          -- buf : TCArray False (-1) 2 (TBasicType TUTF8)
    Int32 ->                                -- buf_len : TBasicType TInt
    Ptr CString ->                          -- end_ptr : TBasicType TUTF8
    Ptr HarfBuzz.FontT.FontT ->             -- font : TInterface (Name {namespace = "HarfBuzz", name = "font_t"})
    CUInt ->                                -- format : TInterface (Name {namespace = "HarfBuzz", name = "buffer_serialize_format_t"})
    IO Int32

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.7/
bufferDeserializeGlyphs ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.BufferT.BufferT
    -- ^ /@buffer@/: an t'GI.HarfBuzz.Structs.BufferT.BufferT' buffer.
    -> [T.Text]
    -> HarfBuzz.FontT.FontT
    -> HarfBuzz.Enums.BufferSerializeFormatT
    -> m ((Int32, T.Text))
bufferDeserializeGlyphs :: BufferT
-> [Text] -> FontT -> BufferSerializeFormatT -> m (Int32, Text)
bufferDeserializeGlyphs BufferT
buffer [Text]
buf FontT
font BufferSerializeFormatT
format = IO (Int32, Text) -> m (Int32, Text)
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
    let bufLen :: Int32
bufLen = 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 (t :: * -> *) a. Foldable t => t a -> Int
P.length [Text]
buf
    Ptr BufferT
buffer' <- BufferT -> IO (Ptr BufferT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BufferT
buffer
    Ptr CString
buf' <- [Text] -> IO (Ptr CString)
packUTF8CArray [Text]
buf
    Ptr CString
endPtr <- IO (Ptr CString)
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr CString)
    Ptr FontT
font' <- FontT -> IO (Ptr FontT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontT
font
    let format' :: CUInt
format' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (BufferSerializeFormatT -> Int)
-> BufferSerializeFormatT
-> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BufferSerializeFormatT -> Int
forall a. Enum a => a -> Int
fromEnum) BufferSerializeFormatT
format
    Int32
result <- Ptr BufferT
-> Ptr CString
-> Int32
-> Ptr CString
-> Ptr FontT
-> CUInt
-> IO Int32
hb_buffer_deserialize_glyphs Ptr BufferT
buffer' Ptr CString
buf' Int32
bufLen Ptr CString
endPtr Ptr FontT
font' CUInt
format'
    CString
endPtr' <- Ptr CString -> IO CString
forall a. Storable a => Ptr a -> IO a
peek Ptr CString
endPtr
    Text
endPtr'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
endPtr'
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
endPtr'
    BufferT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BufferT
buffer
    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
bufLen) CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
buf'
    Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
buf'
    Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
endPtr
    (Int32, Text) -> IO (Int32, Text)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
result, Text
endPtr'')


-- function buffer_create
-- Args: []
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "HarfBuzz" , name = "buffer_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_buffer_create" hb_buffer_create :: 
    IO (Ptr HarfBuzz.BufferT.BufferT)

-- | Creates a new t'GI.HarfBuzz.Structs.BufferT.BufferT' with all properties to defaults.
-- 
-- /Since: 0.9.2/
bufferCreate ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m HarfBuzz.BufferT.BufferT
    -- ^ __Returns:__ 
    -- A newly allocated t'GI.HarfBuzz.Structs.BufferT.BufferT' with a reference count of 1. The initial
    -- reference count should be released with @/hb_buffer_destroy()/@ when you are done
    -- using the t'GI.HarfBuzz.Structs.BufferT.BufferT'. This function never returns 'P.Nothing'. If memory cannot
    -- be allocated, a special t'GI.HarfBuzz.Structs.BufferT.BufferT' object will be returned on which
    -- 'GI.HarfBuzz.Functions.bufferAllocationSuccessful' returns @/false/@.
bufferCreate :: m BufferT
bufferCreate  = IO BufferT -> m BufferT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO BufferT -> m BufferT) -> IO BufferT -> m BufferT
forall a b. (a -> b) -> a -> b
$ do
    Ptr BufferT
result <- IO (Ptr BufferT)
hb_buffer_create
    Text -> Ptr BufferT -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"bufferCreate" Ptr BufferT
result
    BufferT
result' <- ((ManagedPtr BufferT -> BufferT) -> Ptr BufferT -> IO BufferT
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr BufferT -> BufferT
HarfBuzz.BufferT.BufferT) Ptr BufferT
result
    BufferT -> IO BufferT
forall (m :: * -> *) a. Monad m => a -> m a
return BufferT
result'


-- function buffer_clear_contents
-- Args: [ Arg
--           { argCName = "buffer"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "buffer_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #hb_buffer_t." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_buffer_clear_contents" hb_buffer_clear_contents :: 
    Ptr HarfBuzz.BufferT.BufferT ->         -- buffer : TInterface (Name {namespace = "HarfBuzz", name = "buffer_t"})
    IO ()

-- | Similar to 'GI.HarfBuzz.Functions.bufferReset', but does not clear the Unicode functions and
-- the replacement code point.
-- 
-- /Since: 0.9.11/
bufferClearContents ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.BufferT.BufferT
    -- ^ /@buffer@/: an t'GI.HarfBuzz.Structs.BufferT.BufferT'.
    -> m ()
bufferClearContents :: BufferT -> m ()
bufferClearContents BufferT
buffer = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr BufferT
buffer' <- BufferT -> IO (Ptr BufferT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BufferT
buffer
    Ptr BufferT -> IO ()
hb_buffer_clear_contents Ptr BufferT
buffer'
    BufferT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BufferT
buffer
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function buffer_append
-- Args: [ Arg
--           { argCName = "buffer"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "buffer_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #hb_buffer_t." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "source"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "buffer_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "source #hb_buffer_t."
--                 , 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
--                       "start index into source buffer to copy.  Use 0 to copy from start of buffer."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "end"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "end index into source buffer to copy.  Use (unsigned int) -1 to copy to end of buffer."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_buffer_append" hb_buffer_append :: 
    Ptr HarfBuzz.BufferT.BufferT ->         -- buffer : TInterface (Name {namespace = "HarfBuzz", name = "buffer_t"})
    Ptr HarfBuzz.BufferT.BufferT ->         -- source : TInterface (Name {namespace = "HarfBuzz", name = "buffer_t"})
    Word32 ->                               -- start : TBasicType TUInt
    Word32 ->                               -- end : TBasicType TUInt
    IO ()

-- | Append (part of) contents of another buffer to this buffer.
-- 
-- /Since: 1.5.0/
bufferAppend ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.BufferT.BufferT
    -- ^ /@buffer@/: an t'GI.HarfBuzz.Structs.BufferT.BufferT'.
    -> HarfBuzz.BufferT.BufferT
    -- ^ /@source@/: source t'GI.HarfBuzz.Structs.BufferT.BufferT'.
    -> Word32
    -- ^ /@start@/: start index into source buffer to copy.  Use 0 to copy from start of buffer.
    -> Word32
    -- ^ /@end@/: end index into source buffer to copy.  Use (unsigned int) -1 to copy to end of buffer.
    -> m ()
bufferAppend :: BufferT -> BufferT -> Word32 -> Word32 -> m ()
bufferAppend BufferT
buffer BufferT
source Word32
start Word32
end = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr BufferT
buffer' <- BufferT -> IO (Ptr BufferT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BufferT
buffer
    Ptr BufferT
source' <- BufferT -> IO (Ptr BufferT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BufferT
source
    Ptr BufferT -> Ptr BufferT -> Word32 -> Word32 -> IO ()
hb_buffer_append Ptr BufferT
buffer' Ptr BufferT
source' Word32
start Word32
end
    BufferT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BufferT
buffer
    BufferT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BufferT
source
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function buffer_allocation_successful
-- Args: [ Arg
--           { argCName = "buffer"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "buffer_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #hb_buffer_t." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_buffer_allocation_successful" hb_buffer_allocation_successful :: 
    Ptr HarfBuzz.BufferT.BufferT ->         -- buffer : TInterface (Name {namespace = "HarfBuzz", name = "buffer_t"})
    IO Int32

-- | Check if allocating memory for the buffer succeeded.
-- 
-- /Since: 0.9.2/
bufferAllocationSuccessful ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.BufferT.BufferT
    -- ^ /@buffer@/: an t'GI.HarfBuzz.Structs.BufferT.BufferT'.
    -> m Int32
    -- ^ __Returns:__ @/true/@ if /@buffer@/ memory allocation succeeded, @/false/@ otherwise.
bufferAllocationSuccessful :: BufferT -> m Int32
bufferAllocationSuccessful BufferT
buffer = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr BufferT
buffer' <- BufferT -> IO (Ptr BufferT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BufferT
buffer
    Int32
result <- Ptr BufferT -> IO Int32
hb_buffer_allocation_successful Ptr BufferT
buffer'
    BufferT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BufferT
buffer
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function buffer_add_utf8
-- Args: [ Arg
--           { argCName = "buffer"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "buffer_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #hb_buffer_t." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "text"
--           , argType = TCArray False (-1) 2 (TBasicType TUInt8)
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "an array of UTF-8\n              characters to append."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "text_length"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the length of the @text, or -1 if it is %NULL terminated."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "item_offset"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the offset of the first character to add to the @buffer."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "item_length"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "the number of characters to add to the @buffer, or -1 for the\n              end of @text (assuming it is %NULL terminated)."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "text_length"
--              , argType = TBasicType TInt
--              , direction = DirectionIn
--              , mayBeNull = False
--              , argDoc =
--                  Documentation
--                    { rawDocText =
--                        Just "the length of the @text, or -1 if it is %NULL terminated."
--                    , sinceVersion = Nothing
--                    }
--              , argScope = ScopeTypeInvalid
--              , argClosure = -1
--              , argDestroy = -1
--              , argCallerAllocates = False
--              , transfer = TransferNothing
--              }
--          ]
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_buffer_add_utf8" hb_buffer_add_utf8 :: 
    Ptr HarfBuzz.BufferT.BufferT ->         -- buffer : TInterface (Name {namespace = "HarfBuzz", name = "buffer_t"})
    Ptr Word8 ->                            -- text : TCArray False (-1) 2 (TBasicType TUInt8)
    Int32 ->                                -- text_length : TBasicType TInt
    Word32 ->                               -- item_offset : TBasicType TUInt
    Int32 ->                                -- item_length : TBasicType TInt
    IO ()

-- | See 'GI.HarfBuzz.Functions.bufferAddCodepoints'.
-- 
-- Replaces invalid UTF-8 characters with the /@buffer@/ replacement code point,
-- see 'GI.HarfBuzz.Functions.bufferSetReplacementCodepoint'.
-- 
-- /Since: 0.9.2/
bufferAddUtf8 ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.BufferT.BufferT
    -- ^ /@buffer@/: an t'GI.HarfBuzz.Structs.BufferT.BufferT'.
    -> ByteString
    -- ^ /@text@/: an array of UTF-8
    --               characters to append.
    -> Word32
    -- ^ /@itemOffset@/: the offset of the first character to add to the /@buffer@/.
    -> Int32
    -- ^ /@itemLength@/: the number of characters to add to the /@buffer@/, or -1 for the
    --               end of /@text@/ (assuming it is 'P.Nothing' terminated).
    -> m ()
bufferAddUtf8 :: BufferT -> ByteString -> Word32 -> Int32 -> m ()
bufferAddUtf8 BufferT
buffer ByteString
text Word32
itemOffset Int32
itemLength = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    let textLength :: Int32
textLength = Int -> Int32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Int32) -> Int -> Int32
forall a b. (a -> b) -> a -> b
$ ByteString -> Int
B.length ByteString
text
    Ptr BufferT
buffer' <- BufferT -> IO (Ptr BufferT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BufferT
buffer
    Ptr Word8
text' <- ByteString -> IO (Ptr Word8)
packByteString ByteString
text
    Ptr BufferT -> Ptr Word8 -> Int32 -> Word32 -> Int32 -> IO ()
hb_buffer_add_utf8 Ptr BufferT
buffer' Ptr Word8
text' Int32
textLength Word32
itemOffset Int32
itemLength
    BufferT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BufferT
buffer
    Ptr Word8 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word8
text'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function buffer_add_utf32
-- Args: [ Arg
--           { argCName = "buffer"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "buffer_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #hb_buffer_t." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "text"
--           , argType = TCArray False (-1) 2 (TBasicType TUInt32)
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an array of UTF-32 characters to append."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "text_length"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the length of the @text, or -1 if it is %NULL terminated."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "item_offset"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the offset of the first character to add to the @buffer."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "item_length"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "the number of characters to add to the @buffer, or -1 for the\n              end of @text (assuming it is %NULL terminated)."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "text_length"
--              , argType = TBasicType TInt
--              , direction = DirectionIn
--              , mayBeNull = False
--              , argDoc =
--                  Documentation
--                    { rawDocText =
--                        Just "the length of the @text, or -1 if it is %NULL terminated."
--                    , sinceVersion = Nothing
--                    }
--              , argScope = ScopeTypeInvalid
--              , argClosure = -1
--              , argDestroy = -1
--              , argCallerAllocates = False
--              , transfer = TransferNothing
--              }
--          ]
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_buffer_add_utf32" hb_buffer_add_utf32 :: 
    Ptr HarfBuzz.BufferT.BufferT ->         -- buffer : TInterface (Name {namespace = "HarfBuzz", name = "buffer_t"})
    Ptr Word32 ->                           -- text : TCArray False (-1) 2 (TBasicType TUInt32)
    Int32 ->                                -- text_length : TBasicType TInt
    Word32 ->                               -- item_offset : TBasicType TUInt
    Int32 ->                                -- item_length : TBasicType TInt
    IO ()

-- | See 'GI.HarfBuzz.Functions.bufferAddCodepoints'.
-- 
-- Replaces invalid UTF-32 characters with the /@buffer@/ replacement code point,
-- see 'GI.HarfBuzz.Functions.bufferSetReplacementCodepoint'.
-- 
-- /Since: 0.9.2/
bufferAddUtf32 ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.BufferT.BufferT
    -- ^ /@buffer@/: an t'GI.HarfBuzz.Structs.BufferT.BufferT'.
    -> [Word32]
    -- ^ /@text@/: an array of UTF-32 characters to append.
    -> Word32
    -- ^ /@itemOffset@/: the offset of the first character to add to the /@buffer@/.
    -> Int32
    -- ^ /@itemLength@/: the number of characters to add to the /@buffer@/, or -1 for the
    --               end of /@text@/ (assuming it is 'P.Nothing' terminated).
    -> m ()
bufferAddUtf32 :: BufferT -> [Word32] -> Word32 -> Int32 -> m ()
bufferAddUtf32 BufferT
buffer [Word32]
text Word32
itemOffset Int32
itemLength = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    let textLength :: Int32
textLength = Int -> Int32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Int32) -> Int -> Int32
forall a b. (a -> b) -> a -> b
$ [Word32] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [Word32]
text
    Ptr BufferT
buffer' <- BufferT -> IO (Ptr BufferT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BufferT
buffer
    Ptr Word32
text' <- [Word32] -> IO (Ptr Word32)
forall a. Storable a => [a] -> IO (Ptr a)
packStorableArray [Word32]
text
    Ptr BufferT -> Ptr Word32 -> Int32 -> Word32 -> Int32 -> IO ()
hb_buffer_add_utf32 Ptr BufferT
buffer' Ptr Word32
text' Int32
textLength Word32
itemOffset Int32
itemLength
    BufferT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BufferT
buffer
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
text'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function buffer_add_utf16
-- Args: [ Arg
--           { argCName = "buffer"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "buffer_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #hb_buffer_t." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "text"
--           , argType = TCArray False (-1) 2 (TBasicType TUInt16)
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an array of UTF-16 characters to append."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "text_length"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the length of the @text, or -1 if it is %NULL terminated."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "item_offset"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the offset of the first character to add to the @buffer."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "item_length"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "the number of characters to add to the @buffer, or -1 for the\n              end of @text (assuming it is %NULL terminated)."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "text_length"
--              , argType = TBasicType TInt
--              , direction = DirectionIn
--              , mayBeNull = False
--              , argDoc =
--                  Documentation
--                    { rawDocText =
--                        Just "the length of the @text, or -1 if it is %NULL terminated."
--                    , sinceVersion = Nothing
--                    }
--              , argScope = ScopeTypeInvalid
--              , argClosure = -1
--              , argDestroy = -1
--              , argCallerAllocates = False
--              , transfer = TransferNothing
--              }
--          ]
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_buffer_add_utf16" hb_buffer_add_utf16 :: 
    Ptr HarfBuzz.BufferT.BufferT ->         -- buffer : TInterface (Name {namespace = "HarfBuzz", name = "buffer_t"})
    Ptr Word16 ->                           -- text : TCArray False (-1) 2 (TBasicType TUInt16)
    Int32 ->                                -- text_length : TBasicType TInt
    Word32 ->                               -- item_offset : TBasicType TUInt
    Int32 ->                                -- item_length : TBasicType TInt
    IO ()

-- | See 'GI.HarfBuzz.Functions.bufferAddCodepoints'.
-- 
-- Replaces invalid UTF-16 characters with the /@buffer@/ replacement code point,
-- see 'GI.HarfBuzz.Functions.bufferSetReplacementCodepoint'.
-- 
-- /Since: 0.9.2/
bufferAddUtf16 ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.BufferT.BufferT
    -- ^ /@buffer@/: an t'GI.HarfBuzz.Structs.BufferT.BufferT'.
    -> [Word16]
    -- ^ /@text@/: an array of UTF-16 characters to append.
    -> Word32
    -- ^ /@itemOffset@/: the offset of the first character to add to the /@buffer@/.
    -> Int32
    -- ^ /@itemLength@/: the number of characters to add to the /@buffer@/, or -1 for the
    --               end of /@text@/ (assuming it is 'P.Nothing' terminated).
    -> m ()
bufferAddUtf16 :: BufferT -> [Word16] -> Word32 -> Int32 -> m ()
bufferAddUtf16 BufferT
buffer [Word16]
text Word32
itemOffset Int32
itemLength = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    let textLength :: Int32
textLength = Int -> Int32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Int32) -> Int -> Int32
forall a b. (a -> b) -> a -> b
$ [Word16] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [Word16]
text
    Ptr BufferT
buffer' <- BufferT -> IO (Ptr BufferT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BufferT
buffer
    Ptr Word16
text' <- [Word16] -> IO (Ptr Word16)
forall a. Storable a => [a] -> IO (Ptr a)
packStorableArray [Word16]
text
    Ptr BufferT -> Ptr Word16 -> Int32 -> Word32 -> Int32 -> IO ()
hb_buffer_add_utf16 Ptr BufferT
buffer' Ptr Word16
text' Int32
textLength Word32
itemOffset Int32
itemLength
    BufferT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BufferT
buffer
    Ptr Word16 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word16
text'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function buffer_add_latin1
-- Args: [ Arg
--           { argCName = "buffer"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "buffer_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #hb_buffer_t." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "text"
--           , argType = TCArray False (-1) 2 (TBasicType TUInt8)
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "an array of UTF-8\n              characters to append."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "text_length"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the length of the @text, or -1 if it is %NULL terminated."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "item_offset"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the offset of the first character to add to the @buffer."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "item_length"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "the number of characters to add to the @buffer, or -1 for the\n              end of @text (assuming it is %NULL terminated)."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "text_length"
--              , argType = TBasicType TInt
--              , direction = DirectionIn
--              , mayBeNull = False
--              , argDoc =
--                  Documentation
--                    { rawDocText =
--                        Just "the length of the @text, or -1 if it is %NULL terminated."
--                    , sinceVersion = Nothing
--                    }
--              , argScope = ScopeTypeInvalid
--              , argClosure = -1
--              , argDestroy = -1
--              , argCallerAllocates = False
--              , transfer = TransferNothing
--              }
--          ]
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_buffer_add_latin1" hb_buffer_add_latin1 :: 
    Ptr HarfBuzz.BufferT.BufferT ->         -- buffer : TInterface (Name {namespace = "HarfBuzz", name = "buffer_t"})
    Ptr Word8 ->                            -- text : TCArray False (-1) 2 (TBasicType TUInt8)
    Int32 ->                                -- text_length : TBasicType TInt
    Word32 ->                               -- item_offset : TBasicType TUInt
    Int32 ->                                -- item_length : TBasicType TInt
    IO ()

-- | Similar to 'GI.HarfBuzz.Functions.bufferAddCodepoints', but allows only access to first 256
-- Unicode code points that can fit in 8-bit strings.
-- 
-- \<note>Has nothing to do with non-Unicode Latin-1 encoding.\<\/note>
-- 
-- /Since: 0.9.39/
bufferAddLatin1 ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.BufferT.BufferT
    -- ^ /@buffer@/: an t'GI.HarfBuzz.Structs.BufferT.BufferT'.
    -> ByteString
    -- ^ /@text@/: an array of UTF-8
    --               characters to append.
    -> Word32
    -- ^ /@itemOffset@/: the offset of the first character to add to the /@buffer@/.
    -> Int32
    -- ^ /@itemLength@/: the number of characters to add to the /@buffer@/, or -1 for the
    --               end of /@text@/ (assuming it is 'P.Nothing' terminated).
    -> m ()
bufferAddLatin1 :: BufferT -> ByteString -> Word32 -> Int32 -> m ()
bufferAddLatin1 BufferT
buffer ByteString
text Word32
itemOffset Int32
itemLength = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    let textLength :: Int32
textLength = Int -> Int32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Int32) -> Int -> Int32
forall a b. (a -> b) -> a -> b
$ ByteString -> Int
B.length ByteString
text
    Ptr BufferT
buffer' <- BufferT -> IO (Ptr BufferT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BufferT
buffer
    Ptr Word8
text' <- ByteString -> IO (Ptr Word8)
packByteString ByteString
text
    Ptr BufferT -> Ptr Word8 -> Int32 -> Word32 -> Int32 -> IO ()
hb_buffer_add_latin1 Ptr BufferT
buffer' Ptr Word8
text' Int32
textLength Word32
itemOffset Int32
itemLength
    BufferT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BufferT
buffer
    Ptr Word8 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word8
text'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function buffer_add_codepoints
-- Args: [ Arg
--           { argCName = "buffer"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "buffer_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #hb_buffer_t to append characters to."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "text"
--           , argType = TCArray False (-1) 2 (TBasicType TUInt32)
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an array of Unicode code points to append."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "text_length"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the length of the @text, or -1 if it is %NULL terminated."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "item_offset"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the offset of the first code point to add to the @buffer."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "item_length"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "the number of code points to add to the @buffer, or -1 for the\n              end of @text (assuming it is %NULL terminated)."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "text_length"
--              , argType = TBasicType TInt
--              , direction = DirectionIn
--              , mayBeNull = False
--              , argDoc =
--                  Documentation
--                    { rawDocText =
--                        Just "the length of the @text, or -1 if it is %NULL terminated."
--                    , sinceVersion = Nothing
--                    }
--              , argScope = ScopeTypeInvalid
--              , argClosure = -1
--              , argDestroy = -1
--              , argCallerAllocates = False
--              , transfer = TransferNothing
--              }
--          ]
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_buffer_add_codepoints" hb_buffer_add_codepoints :: 
    Ptr HarfBuzz.BufferT.BufferT ->         -- buffer : TInterface (Name {namespace = "HarfBuzz", name = "buffer_t"})
    Ptr Word32 ->                           -- text : TCArray False (-1) 2 (TBasicType TUInt32)
    Int32 ->                                -- text_length : TBasicType TInt
    Word32 ->                               -- item_offset : TBasicType TUInt
    Int32 ->                                -- item_length : TBasicType TInt
    IO ()

-- | Appends characters from /@text@/ array to /@buffer@/. The /@itemOffset@/ is the
-- position of the first character from /@text@/ that will be appended, and
-- /@itemLength@/ is the number of character. When shaping part of a larger text
-- (e.g. a run of text from a paragraph), instead of passing just the substring
-- corresponding to the run, it is preferable to pass the whole
-- paragraph and specify the run start and length as /@itemOffset@/ and
-- /@itemLength@/, respectively, to give HarfBuzz the full context to be able,
-- for example, to do cross-run Arabic shaping or properly handle combining
-- marks at stat of run.
-- 
-- This function does not check the validity of /@text@/, it is up to the caller
-- to ensure it contains a valid Unicode code points.
-- 
-- /Since: 0.9.31/
bufferAddCodepoints ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.BufferT.BufferT
    -- ^ /@buffer@/: a t'GI.HarfBuzz.Structs.BufferT.BufferT' to append characters to.
    -> [Word32]
    -- ^ /@text@/: an array of Unicode code points to append.
    -> Word32
    -- ^ /@itemOffset@/: the offset of the first code point to add to the /@buffer@/.
    -> Int32
    -- ^ /@itemLength@/: the number of code points to add to the /@buffer@/, or -1 for the
    --               end of /@text@/ (assuming it is 'P.Nothing' terminated).
    -> m ()
bufferAddCodepoints :: BufferT -> [Word32] -> Word32 -> Int32 -> m ()
bufferAddCodepoints BufferT
buffer [Word32]
text Word32
itemOffset Int32
itemLength = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    let textLength :: Int32
textLength = Int -> Int32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Int32) -> Int -> Int32
forall a b. (a -> b) -> a -> b
$ [Word32] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [Word32]
text
    Ptr BufferT
buffer' <- BufferT -> IO (Ptr BufferT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BufferT
buffer
    Ptr Word32
text' <- [Word32] -> IO (Ptr Word32)
forall a. Storable a => [a] -> IO (Ptr a)
packStorableArray [Word32]
text
    Ptr BufferT -> Ptr Word32 -> Int32 -> Word32 -> Int32 -> IO ()
hb_buffer_add_codepoints Ptr BufferT
buffer' Ptr Word32
text' Int32
textLength Word32
itemOffset Int32
itemLength
    BufferT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BufferT
buffer
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
text'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function buffer_add
-- Args: [ Arg
--           { argCName = "buffer"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "buffer_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #hb_buffer_t." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "codepoint"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a Unicode code point."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "cluster"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the cluster value of @codepoint."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_buffer_add" hb_buffer_add :: 
    Ptr HarfBuzz.BufferT.BufferT ->         -- buffer : TInterface (Name {namespace = "HarfBuzz", name = "buffer_t"})
    Word32 ->                               -- codepoint : TBasicType TUInt32
    Word32 ->                               -- cluster : TBasicType TUInt
    IO ()

-- | Appends a character with the Unicode value of /@codepoint@/ to /@buffer@/, and
-- gives it the initial cluster value of /@cluster@/. Clusters can be any thing
-- the client wants, they are usually used to refer to the index of the
-- character in the input text stream and are output in
-- t'GI.HarfBuzz.Structs.GlyphInfoT.GlyphInfoT'.@/cluster/@ field.
-- 
-- This function does not check the validity of /@codepoint@/, it is up to the
-- caller to ensure it is a valid Unicode code point.
-- 
-- /Since: 0.9.7/
bufferAdd ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.BufferT.BufferT
    -- ^ /@buffer@/: an t'GI.HarfBuzz.Structs.BufferT.BufferT'.
    -> Word32
    -- ^ /@codepoint@/: a Unicode code point.
    -> Word32
    -- ^ /@cluster@/: the cluster value of /@codepoint@/.
    -> m ()
bufferAdd :: BufferT -> Word32 -> Word32 -> m ()
bufferAdd BufferT
buffer Word32
codepoint Word32
cluster = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr BufferT
buffer' <- BufferT -> IO (Ptr BufferT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BufferT
buffer
    Ptr BufferT -> Word32 -> Word32 -> IO ()
hb_buffer_add Ptr BufferT
buffer' Word32
codepoint Word32
cluster
    BufferT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BufferT
buffer
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function blob_make_immutable
-- Args: [ Arg
--           { argCName = "blob"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "blob_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a blob." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hb_blob_make_immutable" hb_blob_make_immutable :: 
    Ptr HarfBuzz.BlobT.BlobT ->             -- blob : TInterface (Name {namespace = "HarfBuzz", name = "blob_t"})
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
blobMakeImmutable ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.BlobT.BlobT
    -- ^ /@blob@/: a blob.
    -> m ()
blobMakeImmutable :: BlobT -> m ()
blobMakeImmutable BlobT
blob = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr BlobT
blob' <- BlobT -> IO (Ptr BlobT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BlobT
blob
    Ptr BlobT -> IO ()
hb_blob_make_immutable Ptr BlobT
blob'
    BlobT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BlobT
blob
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function blob_is_immutable
-- Args: [ Arg
--           { argCName = "blob"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "blob_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a blob." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_blob_is_immutable" hb_blob_is_immutable :: 
    Ptr HarfBuzz.BlobT.BlobT ->             -- blob : TInterface (Name {namespace = "HarfBuzz", name = "blob_t"})
    IO Int32

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
blobIsImmutable ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.BlobT.BlobT
    -- ^ /@blob@/: a blob.
    -> m Int32
    -- ^ __Returns:__ TODO
blobIsImmutable :: BlobT -> m Int32
blobIsImmutable BlobT
blob = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr BlobT
blob' <- BlobT -> IO (Ptr BlobT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BlobT
blob
    Int32
result <- Ptr BlobT -> IO Int32
hb_blob_is_immutable Ptr BlobT
blob'
    BlobT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BlobT
blob
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function blob_get_length
-- Args: [ Arg
--           { argCName = "blob"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "blob_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a blob." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt)
-- throws : False
-- Skip return : False

foreign import ccall "hb_blob_get_length" hb_blob_get_length :: 
    Ptr HarfBuzz.BlobT.BlobT ->             -- blob : TInterface (Name {namespace = "HarfBuzz", name = "blob_t"})
    IO Word32

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
blobGetLength ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.BlobT.BlobT
    -- ^ /@blob@/: a blob.
    -> m Word32
    -- ^ __Returns:__ the length of blob data in bytes.
blobGetLength :: BlobT -> m Word32
blobGetLength BlobT
blob = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
    Ptr BlobT
blob' <- BlobT -> IO (Ptr BlobT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BlobT
blob
    Word32
result <- Ptr BlobT -> IO Word32
hb_blob_get_length Ptr BlobT
blob'
    BlobT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BlobT
blob
    Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result


-- function blob_get_empty
-- Args: []
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "HarfBuzz" , name = "blob_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_blob_get_empty" hb_blob_get_empty :: 
    IO (Ptr HarfBuzz.BlobT.BlobT)

-- | Returns the singleton empty blob.
-- 
-- See TODO:link object types for more information.
-- 
-- /Since: 0.9.2/
blobGetEmpty ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m HarfBuzz.BlobT.BlobT
    -- ^ __Returns:__ the empty blob.
blobGetEmpty :: m BlobT
blobGetEmpty  = IO BlobT -> m BlobT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO BlobT -> m BlobT) -> IO BlobT -> m BlobT
forall a b. (a -> b) -> a -> b
$ do
    Ptr BlobT
result <- IO (Ptr BlobT)
hb_blob_get_empty
    Text -> Ptr BlobT -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"blobGetEmpty" 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
    BlobT -> IO BlobT
forall (m :: * -> *) a. Monad m => a -> m a
return BlobT
result'


-- function blob_get_data_writable
-- Args: [ Arg
--           { argCName = "blob"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "blob_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a blob." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "length"
--           , argType = TBasicType TUInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "output length of the writable data."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "length"
--              , argType = TBasicType TUInt
--              , direction = DirectionOut
--              , mayBeNull = False
--              , argDoc =
--                  Documentation
--                    { rawDocText = Just "output length of the writable data."
--                    , sinceVersion = Nothing
--                    }
--              , argScope = ScopeTypeInvalid
--              , argClosure = -1
--              , argDestroy = -1
--              , argCallerAllocates = False
--              , transfer = TransferEverything
--              }
--          ]
-- returnType: Just (TCArray False (-1) 1 (TBasicType TUTF8))
-- throws : False
-- Skip return : False

foreign import ccall "hb_blob_get_data_writable" hb_blob_get_data_writable :: 
    Ptr HarfBuzz.BlobT.BlobT ->             -- blob : TInterface (Name {namespace = "HarfBuzz", name = "blob_t"})
    Ptr Word32 ->                           -- length : TBasicType TUInt
    IO (Ptr CString)

-- | Tries to make blob data writable (possibly copying it) and
-- return pointer to data.
-- 
-- Fails if blob has been made immutable, or if memory allocation
-- fails.
-- 
-- /Since: 0.9.2/
blobGetDataWritable ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.BlobT.BlobT
    -- ^ /@blob@/: a blob.
    -> m [T.Text]
    -- ^ __Returns:__ Writable blob data,
    -- or 'P.Nothing' if failed.
blobGetDataWritable :: BlobT -> m [Text]
blobGetDataWritable BlobT
blob = IO [Text] -> m [Text]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Text] -> m [Text]) -> IO [Text] -> m [Text]
forall a b. (a -> b) -> a -> b
$ do
    Ptr BlobT
blob' <- BlobT -> IO (Ptr BlobT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BlobT
blob
    Ptr Word32
length_ <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
    Ptr CString
result <- Ptr BlobT -> Ptr Word32 -> IO (Ptr CString)
hb_blob_get_data_writable Ptr BlobT
blob' Ptr Word32
length_
    Word32
length_' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
length_
    Text -> Ptr CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"blobGetDataWritable" Ptr CString
result
    [Text]
result' <- (Word32 -> Ptr CString -> IO [Text]
forall a.
(HasCallStack, Integral a) =>
a -> Ptr CString -> IO [Text]
unpackUTF8CArrayWithLength Word32
length_') Ptr CString
result
    BlobT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BlobT
blob
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
length_
    [Text] -> IO [Text]
forall (m :: * -> *) a. Monad m => a -> m a
return [Text]
result'


-- function blob_get_data
-- Args: [ Arg
--           { argCName = "blob"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "blob_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a blob." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "length"
--           , argType = TBasicType TUInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "length"
--              , argType = TBasicType TUInt
--              , direction = DirectionOut
--              , mayBeNull = False
--              , argDoc =
--                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--              , argScope = ScopeTypeInvalid
--              , argClosure = -1
--              , argDestroy = -1
--              , argCallerAllocates = False
--              , transfer = TransferEverything
--              }
--          ]
-- returnType: Just (TCArray False (-1) 1 (TBasicType TUTF8))
-- throws : False
-- Skip return : False

foreign import ccall "hb_blob_get_data" hb_blob_get_data :: 
    Ptr HarfBuzz.BlobT.BlobT ->             -- blob : TInterface (Name {namespace = "HarfBuzz", name = "blob_t"})
    Ptr Word32 ->                           -- length : TBasicType TUInt
    IO (Ptr CString)

-- | /No description available in the introspection data./
-- 
-- /Since: 0.9.2/
blobGetData ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.BlobT.BlobT
    -- ^ /@blob@/: a blob.
    -> m [T.Text]
blobGetData :: BlobT -> m [Text]
blobGetData BlobT
blob = IO [Text] -> m [Text]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Text] -> m [Text]) -> IO [Text] -> m [Text]
forall a b. (a -> b) -> a -> b
$ do
    Ptr BlobT
blob' <- BlobT -> IO (Ptr BlobT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BlobT
blob
    Ptr Word32
length_ <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
    Ptr CString
result <- Ptr BlobT -> Ptr Word32 -> IO (Ptr CString)
hb_blob_get_data Ptr BlobT
blob' Ptr Word32
length_
    Word32
length_' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
length_
    Text -> Ptr CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"blobGetData" Ptr CString
result
    [Text]
result' <- (Word32 -> Ptr CString -> IO [Text]
forall a.
(HasCallStack, Integral a) =>
a -> Ptr CString -> IO [Text]
unpackUTF8CArrayWithLength Word32
length_') Ptr CString
result
    BlobT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BlobT
blob
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
length_
    [Text] -> IO [Text]
forall (m :: * -> *) a. Monad m => a -> m a
return [Text]
result'


-- function blob_create_sub_blob
-- Args: [ Arg
--           { argCName = "parent"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "blob_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Parent blob." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "offset"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "Start offset of sub-blob within @parent, in bytes."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "length"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Length of sub-blob."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "HarfBuzz" , name = "blob_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_blob_create_sub_blob" hb_blob_create_sub_blob :: 
    Ptr HarfBuzz.BlobT.BlobT ->             -- parent : TInterface (Name {namespace = "HarfBuzz", name = "blob_t"})
    Word32 ->                               -- offset : TBasicType TUInt
    Word32 ->                               -- length : TBasicType TUInt
    IO (Ptr HarfBuzz.BlobT.BlobT)

-- | Returns a blob that represents a range of bytes in /@parent@/.  The new
-- blob is always created with 'GI.HarfBuzz.Enums.MemoryModeTReadonly', meaning that it
-- will never modify data in the parent blob.  The parent data is not
-- expected to be modified, and will result in undefined behavior if it
-- is.
-- 
-- Makes /@parent@/ immutable.
-- 
-- /Since: 0.9.2/
blobCreateSubBlob ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.BlobT.BlobT
    -- ^ /@parent@/: Parent blob.
    -> Word32
    -- ^ /@offset@/: Start offset of sub-blob within /@parent@/, in bytes.
    -> Word32
    -- ^ /@length@/: Length of sub-blob.
    -> m HarfBuzz.BlobT.BlobT
    -- ^ __Returns:__ New blob, or the empty blob if something failed or if
    -- /@length@/ is zero or /@offset@/ is beyond the end of /@parent@/\'s data.  Destroy
    -- with @/hb_blob_destroy()/@.
blobCreateSubBlob :: BlobT -> Word32 -> Word32 -> m BlobT
blobCreateSubBlob BlobT
parent Word32
offset Word32
length_ = IO BlobT -> m BlobT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO BlobT -> m BlobT) -> IO BlobT -> m BlobT
forall a b. (a -> b) -> a -> b
$ do
    Ptr BlobT
parent' <- BlobT -> IO (Ptr BlobT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BlobT
parent
    Ptr BlobT
result <- Ptr BlobT -> Word32 -> Word32 -> IO (Ptr BlobT)
hb_blob_create_sub_blob Ptr BlobT
parent' Word32
offset Word32
length_
    Text -> Ptr BlobT -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"blobCreateSubBlob" 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
    BlobT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BlobT
parent
    BlobT -> IO BlobT
forall (m :: * -> *) a. Monad m => a -> m a
return BlobT
result'


-- function blob_create_from_file
-- Args: [ Arg
--           { argCName = "file_name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "font filename." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "HarfBuzz" , name = "blob_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_blob_create_from_file" hb_blob_create_from_file :: 
    CString ->                              -- file_name : TBasicType TUTF8
    IO (Ptr HarfBuzz.BlobT.BlobT)

-- | /No description available in the introspection data./
-- 
-- /Since: 1.7.7/
blobCreateFromFile ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    T.Text
    -- ^ /@fileName@/: font filename.
    -> m HarfBuzz.BlobT.BlobT
    -- ^ __Returns:__ A hb_blob_t pointer with the content of the file
blobCreateFromFile :: Text -> m BlobT
blobCreateFromFile Text
fileName = IO BlobT -> m BlobT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO BlobT -> m BlobT) -> IO BlobT -> m BlobT
forall a b. (a -> b) -> a -> b
$ do
    CString
fileName' <- Text -> IO CString
textToCString Text
fileName
    Ptr BlobT
result <- CString -> IO (Ptr BlobT)
hb_blob_create_from_file CString
fileName'
    Text -> Ptr BlobT -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"blobCreateFromFile" 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
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
fileName'
    BlobT -> IO BlobT
forall (m :: * -> *) a. Monad m => a -> m a
return BlobT
result'


-- function blob_copy_writable_or_fail
-- Args: [ Arg
--           { argCName = "blob"
--           , argType =
--               TInterface Name { namespace = "HarfBuzz" , name = "blob_t" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A blob." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "HarfBuzz" , name = "blob_t" })
-- throws : False
-- Skip return : False

foreign import ccall "hb_blob_copy_writable_or_fail" hb_blob_copy_writable_or_fail :: 
    Ptr HarfBuzz.BlobT.BlobT ->             -- blob : TInterface (Name {namespace = "HarfBuzz", name = "blob_t"})
    IO (Ptr HarfBuzz.BlobT.BlobT)

-- | Makes a writable copy of /@blob@/.
-- 
-- /Since: 1.8.0/
blobCopyWritableOrFail ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    HarfBuzz.BlobT.BlobT
    -- ^ /@blob@/: A blob.
    -> m HarfBuzz.BlobT.BlobT
    -- ^ __Returns:__ New blob, or nullptr if allocation failed.
blobCopyWritableOrFail :: BlobT -> m BlobT
blobCopyWritableOrFail BlobT
blob = IO BlobT -> m BlobT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO BlobT -> m BlobT) -> IO BlobT -> m BlobT
forall a b. (a -> b) -> a -> b
$ do
    Ptr BlobT
blob' <- BlobT -> IO (Ptr BlobT)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BlobT
blob
    Ptr BlobT
result <- Ptr BlobT -> IO (Ptr BlobT)
hb_blob_copy_writable_or_fail Ptr BlobT
blob'
    Text -> Ptr BlobT -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"blobCopyWritableOrFail" 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
    BlobT -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BlobT
blob
    BlobT -> IO BlobT
forall (m :: * -> *) a. Monad m => a -> m a
return BlobT
result'