gi-poppler-0.0.30.12: GI/Poppler/Structs/FontsIter.hs
{- |
Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License : LGPL-2.1
Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)
-}
module GI.Poppler.Structs.FontsIter
(
-- * Exported types
FontsIter(..) ,
noFontsIter ,
-- * Methods
-- ** fontsIterCopy
fontsIterCopy ,
-- ** fontsIterFree
fontsIterFree ,
-- ** fontsIterGetEncoding
fontsIterGetEncoding ,
-- ** fontsIterGetFileName
fontsIterGetFileName ,
-- ** fontsIterGetFontType
fontsIterGetFontType ,
-- ** fontsIterGetFullName
fontsIterGetFullName ,
-- ** fontsIterGetName
fontsIterGetName ,
-- ** fontsIterGetSubstituteName
fontsIterGetSubstituteName ,
-- ** fontsIterIsEmbedded
fontsIterIsEmbedded ,
-- ** fontsIterIsSubset
fontsIterIsSubset ,
-- ** fontsIterNext
fontsIterNext ,
) where
import Prelude ()
import Data.GI.Base.ShortPrelude
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import GI.Poppler.Types
import GI.Poppler.Callbacks
newtype FontsIter = FontsIter (ForeignPtr FontsIter)
foreign import ccall "poppler_fonts_iter_get_type" c_poppler_fonts_iter_get_type ::
IO GType
instance BoxedObject FontsIter where
boxedType _ = c_poppler_fonts_iter_get_type
noFontsIter :: Maybe FontsIter
noFontsIter = Nothing
-- method FontsIter::copy
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "FontsIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "FontsIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Poppler" "FontsIter"
-- throws : False
-- Skip return : False
foreign import ccall "poppler_fonts_iter_copy" poppler_fonts_iter_copy ::
Ptr FontsIter -> -- _obj : TInterface "Poppler" "FontsIter"
IO (Ptr FontsIter)
fontsIterCopy ::
(MonadIO m) =>
FontsIter -> -- _obj
m FontsIter
fontsIterCopy _obj = liftIO $ do
let _obj' = unsafeManagedPtrGetPtr _obj
result <- poppler_fonts_iter_copy _obj'
checkUnexpectedReturnNULL "poppler_fonts_iter_copy" result
result' <- (wrapBoxed FontsIter) result
touchManagedPtr _obj
return result'
-- method FontsIter::free
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "FontsIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "FontsIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "poppler_fonts_iter_free" poppler_fonts_iter_free ::
Ptr FontsIter -> -- _obj : TInterface "Poppler" "FontsIter"
IO ()
fontsIterFree ::
(MonadIO m) =>
FontsIter -> -- _obj
m ()
fontsIterFree _obj = liftIO $ do
let _obj' = unsafeManagedPtrGetPtr _obj
poppler_fonts_iter_free _obj'
touchManagedPtr _obj
return ()
-- method FontsIter::get_encoding
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "FontsIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "FontsIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "poppler_fonts_iter_get_encoding" poppler_fonts_iter_get_encoding ::
Ptr FontsIter -> -- _obj : TInterface "Poppler" "FontsIter"
IO CString
fontsIterGetEncoding ::
(MonadIO m) =>
FontsIter -> -- _obj
m T.Text
fontsIterGetEncoding _obj = liftIO $ do
let _obj' = unsafeManagedPtrGetPtr _obj
result <- poppler_fonts_iter_get_encoding _obj'
checkUnexpectedReturnNULL "poppler_fonts_iter_get_encoding" result
result' <- cstringToText result
touchManagedPtr _obj
return result'
-- method FontsIter::get_file_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "FontsIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "FontsIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "poppler_fonts_iter_get_file_name" poppler_fonts_iter_get_file_name ::
Ptr FontsIter -> -- _obj : TInterface "Poppler" "FontsIter"
IO CString
fontsIterGetFileName ::
(MonadIO m) =>
FontsIter -> -- _obj
m T.Text
fontsIterGetFileName _obj = liftIO $ do
let _obj' = unsafeManagedPtrGetPtr _obj
result <- poppler_fonts_iter_get_file_name _obj'
checkUnexpectedReturnNULL "poppler_fonts_iter_get_file_name" result
result' <- cstringToText result
touchManagedPtr _obj
return result'
-- method FontsIter::get_font_type
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "FontsIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "FontsIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Poppler" "FontType"
-- throws : False
-- Skip return : False
foreign import ccall "poppler_fonts_iter_get_font_type" poppler_fonts_iter_get_font_type ::
Ptr FontsIter -> -- _obj : TInterface "Poppler" "FontsIter"
IO CUInt
fontsIterGetFontType ::
(MonadIO m) =>
FontsIter -> -- _obj
m FontType
fontsIterGetFontType _obj = liftIO $ do
let _obj' = unsafeManagedPtrGetPtr _obj
result <- poppler_fonts_iter_get_font_type _obj'
let result' = (toEnum . fromIntegral) result
touchManagedPtr _obj
return result'
-- method FontsIter::get_full_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "FontsIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "FontsIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "poppler_fonts_iter_get_full_name" poppler_fonts_iter_get_full_name ::
Ptr FontsIter -> -- _obj : TInterface "Poppler" "FontsIter"
IO CString
fontsIterGetFullName ::
(MonadIO m) =>
FontsIter -> -- _obj
m T.Text
fontsIterGetFullName _obj = liftIO $ do
let _obj' = unsafeManagedPtrGetPtr _obj
result <- poppler_fonts_iter_get_full_name _obj'
checkUnexpectedReturnNULL "poppler_fonts_iter_get_full_name" result
result' <- cstringToText result
touchManagedPtr _obj
return result'
-- method FontsIter::get_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "FontsIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "FontsIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "poppler_fonts_iter_get_name" poppler_fonts_iter_get_name ::
Ptr FontsIter -> -- _obj : TInterface "Poppler" "FontsIter"
IO CString
fontsIterGetName ::
(MonadIO m) =>
FontsIter -> -- _obj
m T.Text
fontsIterGetName _obj = liftIO $ do
let _obj' = unsafeManagedPtrGetPtr _obj
result <- poppler_fonts_iter_get_name _obj'
checkUnexpectedReturnNULL "poppler_fonts_iter_get_name" result
result' <- cstringToText result
touchManagedPtr _obj
return result'
-- method FontsIter::get_substitute_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "FontsIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "FontsIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "poppler_fonts_iter_get_substitute_name" poppler_fonts_iter_get_substitute_name ::
Ptr FontsIter -> -- _obj : TInterface "Poppler" "FontsIter"
IO CString
fontsIterGetSubstituteName ::
(MonadIO m) =>
FontsIter -> -- _obj
m T.Text
fontsIterGetSubstituteName _obj = liftIO $ do
let _obj' = unsafeManagedPtrGetPtr _obj
result <- poppler_fonts_iter_get_substitute_name _obj'
checkUnexpectedReturnNULL "poppler_fonts_iter_get_substitute_name" result
result' <- cstringToText result
touchManagedPtr _obj
return result'
-- method FontsIter::is_embedded
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "FontsIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "FontsIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False
foreign import ccall "poppler_fonts_iter_is_embedded" poppler_fonts_iter_is_embedded ::
Ptr FontsIter -> -- _obj : TInterface "Poppler" "FontsIter"
IO CInt
fontsIterIsEmbedded ::
(MonadIO m) =>
FontsIter -> -- _obj
m Bool
fontsIterIsEmbedded _obj = liftIO $ do
let _obj' = unsafeManagedPtrGetPtr _obj
result <- poppler_fonts_iter_is_embedded _obj'
let result' = (/= 0) result
touchManagedPtr _obj
return result'
-- method FontsIter::is_subset
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "FontsIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "FontsIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False
foreign import ccall "poppler_fonts_iter_is_subset" poppler_fonts_iter_is_subset ::
Ptr FontsIter -> -- _obj : TInterface "Poppler" "FontsIter"
IO CInt
fontsIterIsSubset ::
(MonadIO m) =>
FontsIter -> -- _obj
m Bool
fontsIterIsSubset _obj = liftIO $ do
let _obj' = unsafeManagedPtrGetPtr _obj
result <- poppler_fonts_iter_is_subset _obj'
let result' = (/= 0) result
touchManagedPtr _obj
return result'
-- method FontsIter::next
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "FontsIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "FontsIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False
foreign import ccall "poppler_fonts_iter_next" poppler_fonts_iter_next ::
Ptr FontsIter -> -- _obj : TInterface "Poppler" "FontsIter"
IO CInt
fontsIterNext ::
(MonadIO m) =>
FontsIter -> -- _obj
m Bool
fontsIterNext _obj = liftIO $ do
let _obj' = unsafeManagedPtrGetPtr _obj
result <- poppler_fonts_iter_next _obj'
let result' = (/= 0) result
touchManagedPtr _obj
return result'