{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- /No description available in the introspection data./

#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif

module GI.Poppler.Objects.FontInfo
    ( 

-- * Exported types
    FontInfo(..)                            ,
    IsFontInfo                              ,
    toFontInfo                              ,


 -- * Methods
-- | 
-- 
--  === __Click to display all available methods, including inherited ones__
-- ==== Methods
-- [bindProperty]("GI.GObject.Objects.Object#g:method:bindProperty"), [bindPropertyFull]("GI.GObject.Objects.Object#g:method:bindPropertyFull"), [forceFloating]("GI.GObject.Objects.Object#g:method:forceFloating"), [free]("GI.Poppler.Objects.FontInfo#g:method:free"), [freezeNotify]("GI.GObject.Objects.Object#g:method:freezeNotify"), [getv]("GI.GObject.Objects.Object#g:method:getv"), [isFloating]("GI.GObject.Objects.Object#g:method:isFloating"), [notify]("GI.GObject.Objects.Object#g:method:notify"), [notifyByPspec]("GI.GObject.Objects.Object#g:method:notifyByPspec"), [ref]("GI.GObject.Objects.Object#g:method:ref"), [refSink]("GI.GObject.Objects.Object#g:method:refSink"), [runDispose]("GI.GObject.Objects.Object#g:method:runDispose"), [scan]("GI.Poppler.Objects.FontInfo#g:method:scan"), [stealData]("GI.GObject.Objects.Object#g:method:stealData"), [stealQdata]("GI.GObject.Objects.Object#g:method:stealQdata"), [thawNotify]("GI.GObject.Objects.Object#g:method:thawNotify"), [unref]("GI.GObject.Objects.Object#g:method:unref"), [watchClosure]("GI.GObject.Objects.Object#g:method:watchClosure").
-- 
-- ==== Getters
-- [getData]("GI.GObject.Objects.Object#g:method:getData"), [getProperty]("GI.GObject.Objects.Object#g:method:getProperty"), [getQdata]("GI.GObject.Objects.Object#g:method:getQdata").
-- 
-- ==== Setters
-- [setData]("GI.GObject.Objects.Object#g:method:setData"), [setDataFull]("GI.GObject.Objects.Object#g:method:setDataFull"), [setProperty]("GI.GObject.Objects.Object#g:method:setProperty").

#if defined(ENABLE_OVERLOADING)
    ResolveFontInfoMethod                   ,
#endif

-- ** free #method:free#

#if defined(ENABLE_OVERLOADING)
    FontInfoFreeMethodInfo                  ,
#endif
    fontInfoFree                            ,


-- ** new #method:new#

    fontInfoNew                             ,


-- ** scan #method:scan#

#if defined(ENABLE_OVERLOADING)
    FontInfoScanMethodInfo                  ,
#endif
    fontInfoScan                            ,




    ) 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 GHC.Records as R

import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Poppler.Objects.Document as Poppler.Document
import {-# SOURCE #-} qualified GI.Poppler.Structs.FontsIter as Poppler.FontsIter

-- | Memory-managed wrapper type.
newtype FontInfo = FontInfo (SP.ManagedPtr FontInfo)
    deriving (FontInfo -> FontInfo -> Bool
(FontInfo -> FontInfo -> Bool)
-> (FontInfo -> FontInfo -> Bool) -> Eq FontInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FontInfo -> FontInfo -> Bool
$c/= :: FontInfo -> FontInfo -> Bool
== :: FontInfo -> FontInfo -> Bool
$c== :: FontInfo -> FontInfo -> Bool
Eq)

instance SP.ManagedPtrNewtype FontInfo where
    toManagedPtr :: FontInfo -> ManagedPtr FontInfo
toManagedPtr (FontInfo ManagedPtr FontInfo
p) = ManagedPtr FontInfo
p

foreign import ccall "poppler_font_info_get_type"
    c_poppler_font_info_get_type :: IO B.Types.GType

instance B.Types.TypedObject FontInfo where
    glibType :: IO GType
glibType = IO GType
c_poppler_font_info_get_type

instance B.Types.GObject FontInfo

-- | Type class for types which can be safely cast to `FontInfo`, for instance with `toFontInfo`.
class (SP.GObject o, O.IsDescendantOf FontInfo o) => IsFontInfo o
instance (SP.GObject o, O.IsDescendantOf FontInfo o) => IsFontInfo o

instance O.HasParentTypes FontInfo
type instance O.ParentTypes FontInfo = '[GObject.Object.Object]

-- | Cast to `FontInfo`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.
toFontInfo :: (MIO.MonadIO m, IsFontInfo o) => o -> m FontInfo
toFontInfo :: forall (m :: * -> *) o.
(MonadIO m, IsFontInfo o) =>
o -> m FontInfo
toFontInfo = IO FontInfo -> m FontInfo
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO FontInfo -> m FontInfo)
-> (o -> IO FontInfo) -> o -> m FontInfo
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr FontInfo -> FontInfo) -> o -> IO FontInfo
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
 ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr FontInfo -> FontInfo
FontInfo

-- | Convert 'FontInfo' to and from 'Data.GI.Base.GValue.GValue'. See 'Data.GI.Base.GValue.toGValue' and 'Data.GI.Base.GValue.fromGValue'.
instance B.GValue.IsGValue (Maybe FontInfo) where
    gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_poppler_font_info_get_type
    gvalueSet_ :: Ptr GValue -> Maybe FontInfo -> IO ()
gvalueSet_ Ptr GValue
gv Maybe FontInfo
P.Nothing = Ptr GValue -> Ptr FontInfo -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr FontInfo
forall a. Ptr a
FP.nullPtr :: FP.Ptr FontInfo)
    gvalueSet_ Ptr GValue
gv (P.Just FontInfo
obj) = FontInfo -> (Ptr FontInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr FontInfo
obj (Ptr GValue -> Ptr FontInfo -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
    gvalueGet_ :: Ptr GValue -> IO (Maybe FontInfo)
gvalueGet_ Ptr GValue
gv = do
        Ptr FontInfo
ptr <- Ptr GValue -> IO (Ptr FontInfo)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr FontInfo)
        if Ptr FontInfo
ptr Ptr FontInfo -> Ptr FontInfo -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr FontInfo
forall a. Ptr a
FP.nullPtr
        then FontInfo -> Maybe FontInfo
forall a. a -> Maybe a
P.Just (FontInfo -> Maybe FontInfo) -> IO FontInfo -> IO (Maybe FontInfo)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr FontInfo -> FontInfo) -> Ptr FontInfo -> IO FontInfo
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr FontInfo -> FontInfo
FontInfo Ptr FontInfo
ptr
        else Maybe FontInfo -> IO (Maybe FontInfo)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe FontInfo
forall a. Maybe a
P.Nothing
        
    

#if defined(ENABLE_OVERLOADING)
type family ResolveFontInfoMethod (t :: Symbol) (o :: *) :: * where
    ResolveFontInfoMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveFontInfoMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveFontInfoMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveFontInfoMethod "free" o = FontInfoFreeMethodInfo
    ResolveFontInfoMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveFontInfoMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveFontInfoMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveFontInfoMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveFontInfoMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveFontInfoMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveFontInfoMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveFontInfoMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveFontInfoMethod "scan" o = FontInfoScanMethodInfo
    ResolveFontInfoMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveFontInfoMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveFontInfoMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveFontInfoMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveFontInfoMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveFontInfoMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveFontInfoMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveFontInfoMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveFontInfoMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveFontInfoMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    ResolveFontInfoMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveFontInfoMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveFontInfoMethod t FontInfo, O.OverloadedMethod info FontInfo p) => OL.IsLabel t (FontInfo -> p) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.overloadedMethod @info
#else
    fromLabel _ = O.overloadedMethod @info
#endif

#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveFontInfoMethod t FontInfo, O.OverloadedMethod info FontInfo p, R.HasField t FontInfo p) => R.HasField t FontInfo p where
    getField = O.overloadedMethod @info

#endif

instance (info ~ ResolveFontInfoMethod t FontInfo, O.OverloadedMethodInfo info FontInfo) => OL.IsLabel t (O.MethodProxy info FontInfo) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.MethodProxy
#else
    fromLabel _ = O.MethodProxy
#endif

#endif

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList FontInfo
type instance O.AttributeList FontInfo = FontInfoAttributeList
type FontInfoAttributeList = ('[ ] :: [(Symbol, *)])
#endif

#if defined(ENABLE_OVERLOADING)
#endif

#if defined(ENABLE_OVERLOADING)
type instance O.SignalList FontInfo = FontInfoSignalList
type FontInfoSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])

#endif

-- method FontInfo::new
-- method type : Constructor
-- Args: [ Arg
--           { argCName = "document"
--           , argType =
--               TInterface Name { namespace = "Poppler" , name = "Document" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #PopplerDocument" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "Poppler" , name = "FontInfo" })
-- throws : False
-- Skip return : False

foreign import ccall "poppler_font_info_new" poppler_font_info_new :: 
    Ptr Poppler.Document.Document ->        -- document : TInterface (Name {namespace = "Poppler", name = "Document"})
    IO (Ptr FontInfo)

-- | Creates a new t'GI.Poppler.Objects.FontInfo.FontInfo' object
fontInfoNew ::
    (B.CallStack.HasCallStack, MonadIO m, Poppler.Document.IsDocument a) =>
    a
    -- ^ /@document@/: a t'GI.Poppler.Objects.Document.Document'
    -> m FontInfo
    -- ^ __Returns:__ a new t'GI.Poppler.Objects.FontInfo.FontInfo' instance
fontInfoNew :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDocument a) =>
a -> m FontInfo
fontInfoNew a
document = IO FontInfo -> m FontInfo
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FontInfo -> m FontInfo) -> IO FontInfo -> m FontInfo
forall a b. (a -> b) -> a -> b
$ do
    Ptr Document
document' <- a -> IO (Ptr Document)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
document
    Ptr FontInfo
result <- Ptr Document -> IO (Ptr FontInfo)
poppler_font_info_new Ptr Document
document'
    Text -> Ptr FontInfo -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"fontInfoNew" Ptr FontInfo
result
    FontInfo
result' <- ((ManagedPtr FontInfo -> FontInfo) -> Ptr FontInfo -> IO FontInfo
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr FontInfo -> FontInfo
FontInfo) Ptr FontInfo
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
document
    FontInfo -> IO FontInfo
forall (m :: * -> *) a. Monad m => a -> m a
return FontInfo
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method FontInfo::free
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "font_info"
--           , argType =
--               TInterface Name { namespace = "Poppler" , name = "FontInfo" }
--           , 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 "poppler_font_info_free" poppler_font_info_free :: 
    Ptr FontInfo ->                         -- font_info : TInterface (Name {namespace = "Poppler", name = "FontInfo"})
    IO ()

-- | /No description available in the introspection data./
fontInfoFree ::
    (B.CallStack.HasCallStack, MonadIO m, IsFontInfo a) =>
    a
    -> m ()
fontInfoFree :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFontInfo a) =>
a -> m ()
fontInfoFree a
fontInfo = 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 FontInfo
fontInfo' <- a -> IO (Ptr FontInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
fontInfo
    Ptr FontInfo -> IO ()
poppler_font_info_free Ptr FontInfo
fontInfo'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
fontInfo
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data FontInfoFreeMethodInfo
instance (signature ~ (m ()), MonadIO m, IsFontInfo a) => O.OverloadedMethod FontInfoFreeMethodInfo a signature where
    overloadedMethod = fontInfoFree

instance O.OverloadedMethodInfo FontInfoFreeMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.Poppler.Objects.FontInfo.fontInfoFree",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-poppler-0.18.25/docs/GI-Poppler-Objects-FontInfo.html#v:fontInfoFree"
        }


#endif

-- method FontInfo::scan
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "font_info"
--           , argType =
--               TInterface Name { namespace = "Poppler" , name = "FontInfo" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #PopplerFontInfo" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "n_pages"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "number of pages to scan"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "iter"
--           , argType =
--               TInterface Name { namespace = "Poppler" , name = "FontsIter" }
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "return location for a #PopplerFontsIter"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "poppler_font_info_scan" poppler_font_info_scan :: 
    Ptr FontInfo ->                         -- font_info : TInterface (Name {namespace = "Poppler", name = "FontInfo"})
    Int32 ->                                -- n_pages : TBasicType TInt
    Ptr (Ptr Poppler.FontsIter.FontsIter) -> -- iter : TInterface (Name {namespace = "Poppler", name = "FontsIter"})
    IO CInt

-- | Scans the document associated with /@fontInfo@/ for fonts. At most
-- /@nPages@/ will be scanned starting from the current iterator. /@iter@/ will
-- point to the first font scanned.
-- 
-- Here is a simple example of code to scan fonts in a document
-- 
-- \<informalexample>\<programlisting>
-- font_info = poppler_font_info_new (document);
-- while (poppler_font_info_scan (font_info, 20, &fonts_iter)) {
--         if (!fonts_iter)
--                 continue; \/\<!-- -->* No fonts found in these 20 pages *\<!-- -->\/
--         do {
--                 \/\<!-- -->* Do something with font iter *\<!-- -->\/
--                 g_print (\"Font Name: @/s/@\\n\", poppler_fonts_iter_get_name (fonts_iter));
--         } while (poppler_fonts_iter_next (fonts_iter));
--         poppler_fonts_iter_free (fonts_iter);
-- }
-- \<\/programlisting>\<\/informalexample>
fontInfoScan ::
    (B.CallStack.HasCallStack, MonadIO m, IsFontInfo a) =>
    a
    -- ^ /@fontInfo@/: a t'GI.Poppler.Objects.FontInfo.FontInfo'
    -> Int32
    -- ^ /@nPages@/: number of pages to scan
    -> m ((Bool, Poppler.FontsIter.FontsIter))
    -- ^ __Returns:__ 'P.True', if there are more fonts left to scan
fontInfoScan :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFontInfo a) =>
a -> Int32 -> m (Bool, FontsIter)
fontInfoScan a
fontInfo Int32
nPages = IO (Bool, FontsIter) -> m (Bool, FontsIter)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, FontsIter) -> m (Bool, FontsIter))
-> IO (Bool, FontsIter) -> m (Bool, FontsIter)
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontInfo
fontInfo' <- a -> IO (Ptr FontInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
fontInfo
    Ptr (Ptr FontsIter)
iter <- IO (Ptr (Ptr FontsIter))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr Poppler.FontsIter.FontsIter))
    CInt
result <- Ptr FontInfo -> Int32 -> Ptr (Ptr FontsIter) -> IO CInt
poppler_font_info_scan Ptr FontInfo
fontInfo' Int32
nPages Ptr (Ptr FontsIter)
iter
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    Ptr FontsIter
iter' <- Ptr (Ptr FontsIter) -> IO (Ptr FontsIter)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr FontsIter)
iter
    FontsIter
iter'' <- ((ManagedPtr FontsIter -> FontsIter)
-> Ptr FontsIter -> IO FontsIter
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr FontsIter -> FontsIter
Poppler.FontsIter.FontsIter) Ptr FontsIter
iter'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
fontInfo
    Ptr (Ptr FontsIter) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr FontsIter)
iter
    (Bool, FontsIter) -> IO (Bool, FontsIter)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', FontsIter
iter'')

#if defined(ENABLE_OVERLOADING)
data FontInfoScanMethodInfo
instance (signature ~ (Int32 -> m ((Bool, Poppler.FontsIter.FontsIter))), MonadIO m, IsFontInfo a) => O.OverloadedMethod FontInfoScanMethodInfo a signature where
    overloadedMethod = fontInfoScan

instance O.OverloadedMethodInfo FontInfoScanMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.Poppler.Objects.FontInfo.fontInfoScan",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-poppler-0.18.25/docs/GI-Poppler-Objects-FontInfo.html#v:fontInfoScan"
        }


#endif