{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Poppler.Structs.FontsIter
(
FontsIter(..) ,
#if defined(ENABLE_OVERLOADING)
ResolveFontsIterMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
FontsIterCopyMethodInfo ,
#endif
fontsIterCopy ,
#if defined(ENABLE_OVERLOADING)
FontsIterFreeMethodInfo ,
#endif
fontsIterFree ,
#if defined(ENABLE_OVERLOADING)
FontsIterGetEncodingMethodInfo ,
#endif
fontsIterGetEncoding ,
#if defined(ENABLE_OVERLOADING)
FontsIterGetFileNameMethodInfo ,
#endif
fontsIterGetFileName ,
#if defined(ENABLE_OVERLOADING)
FontsIterGetFontTypeMethodInfo ,
#endif
fontsIterGetFontType ,
#if defined(ENABLE_OVERLOADING)
FontsIterGetFullNameMethodInfo ,
#endif
fontsIterGetFullName ,
#if defined(ENABLE_OVERLOADING)
FontsIterGetNameMethodInfo ,
#endif
fontsIterGetName ,
#if defined(ENABLE_OVERLOADING)
FontsIterGetSubstituteNameMethodInfo ,
#endif
fontsIterGetSubstituteName ,
#if defined(ENABLE_OVERLOADING)
FontsIterIsEmbeddedMethodInfo ,
#endif
fontsIterIsEmbedded ,
#if defined(ENABLE_OVERLOADING)
FontsIterIsSubsetMethodInfo ,
#endif
fontsIterIsSubset ,
#if defined(ENABLE_OVERLOADING)
FontsIterNextMethodInfo ,
#endif
fontsIterNext ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R
import {-# SOURCE #-} qualified GI.Poppler.Enums as Poppler.Enums
newtype FontsIter = FontsIter (SP.ManagedPtr FontsIter)
deriving (FontsIter -> FontsIter -> Bool
(FontsIter -> FontsIter -> Bool)
-> (FontsIter -> FontsIter -> Bool) -> Eq FontsIter
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: FontsIter -> FontsIter -> Bool
== :: FontsIter -> FontsIter -> Bool
$c/= :: FontsIter -> FontsIter -> Bool
/= :: FontsIter -> FontsIter -> Bool
Eq)
instance SP.ManagedPtrNewtype FontsIter where
toManagedPtr :: FontsIter -> ManagedPtr FontsIter
toManagedPtr (FontsIter ManagedPtr FontsIter
p) = ManagedPtr FontsIter
p
foreign import ccall "poppler_fonts_iter_get_type" c_poppler_fonts_iter_get_type ::
IO GType
type instance O.ParentTypes FontsIter = '[]
instance O.HasParentTypes FontsIter
instance B.Types.TypedObject FontsIter where
glibType :: IO GType
glibType = IO GType
c_poppler_fonts_iter_get_type
instance B.Types.GBoxed FontsIter
instance B.GValue.IsGValue (Maybe FontsIter) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_poppler_fonts_iter_get_type
gvalueSet_ :: Ptr GValue -> Maybe FontsIter -> IO ()
gvalueSet_ Ptr GValue
gv Maybe FontsIter
P.Nothing = Ptr GValue -> Ptr FontsIter -> IO ()
forall a. Ptr GValue -> Ptr a -> IO ()
B.GValue.set_boxed Ptr GValue
gv (Ptr FontsIter
forall a. Ptr a
FP.nullPtr :: FP.Ptr FontsIter)
gvalueSet_ Ptr GValue
gv (P.Just FontsIter
obj) = FontsIter -> (Ptr FontsIter -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr FontsIter
obj (Ptr GValue -> Ptr FontsIter -> IO ()
forall a. Ptr GValue -> Ptr a -> IO ()
B.GValue.set_boxed Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe FontsIter)
gvalueGet_ Ptr GValue
gv = do
Ptr FontsIter
ptr <- Ptr GValue -> IO (Ptr FontsIter)
forall b. Ptr GValue -> IO (Ptr b)
B.GValue.get_boxed Ptr GValue
gv :: IO (Ptr FontsIter)
if Ptr FontsIter
ptr Ptr FontsIter -> Ptr FontsIter -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr FontsIter
forall a. Ptr a
FP.nullPtr
then FontsIter -> Maybe FontsIter
forall a. a -> Maybe a
P.Just (FontsIter -> Maybe FontsIter)
-> IO FontsIter -> IO (Maybe FontsIter)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr FontsIter -> FontsIter)
-> Ptr FontsIter -> IO FontsIter
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
B.ManagedPtr.newBoxed ManagedPtr FontsIter -> FontsIter
FontsIter Ptr FontsIter
ptr
else Maybe FontsIter -> IO (Maybe FontsIter)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe FontsIter
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList FontsIter
type instance O.AttributeList FontsIter = FontsIterAttributeList
type FontsIterAttributeList = ('[ ] :: [(Symbol, *)])
#endif
foreign import ccall "poppler_fonts_iter_copy" poppler_fonts_iter_copy ::
Ptr FontsIter ->
IO (Ptr FontsIter)
fontsIterCopy ::
(B.CallStack.HasCallStack, MonadIO m) =>
FontsIter
-> m FontsIter
fontsIterCopy :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FontsIter -> m FontsIter
fontsIterCopy FontsIter
iter = IO FontsIter -> m FontsIter
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FontsIter -> m FontsIter) -> IO FontsIter -> m FontsIter
forall a b. (a -> b) -> a -> b
$ do
Ptr FontsIter
iter' <- FontsIter -> IO (Ptr FontsIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontsIter
iter
Ptr FontsIter
result <- Ptr FontsIter -> IO (Ptr FontsIter)
poppler_fonts_iter_copy Ptr FontsIter
iter'
Text -> Ptr FontsIter -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"fontsIterCopy" Ptr FontsIter
result
FontsIter
result' <- ((ManagedPtr FontsIter -> FontsIter)
-> Ptr FontsIter -> IO FontsIter
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr FontsIter -> FontsIter
FontsIter) Ptr FontsIter
result
FontsIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontsIter
iter
FontsIter -> IO FontsIter
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return FontsIter
result'
#if defined(ENABLE_OVERLOADING)
data FontsIterCopyMethodInfo
instance (signature ~ (m FontsIter), MonadIO m) => O.OverloadedMethod FontsIterCopyMethodInfo FontsIter signature where
overloadedMethod = fontsIterCopy
instance O.OverloadedMethodInfo FontsIterCopyMethodInfo FontsIter where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Poppler.Structs.FontsIter.fontsIterCopy",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-poppler-0.18.27/docs/GI-Poppler-Structs-FontsIter.html#v:fontsIterCopy"
})
#endif
foreign import ccall "poppler_fonts_iter_free" poppler_fonts_iter_free ::
Ptr FontsIter ->
IO ()
fontsIterFree ::
(B.CallStack.HasCallStack, MonadIO m) =>
FontsIter
-> m ()
fontsIterFree :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FontsIter -> m ()
fontsIterFree FontsIter
iter = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr FontsIter
iter' <- FontsIter -> IO (Ptr FontsIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontsIter
iter
Ptr FontsIter -> IO ()
poppler_fonts_iter_free Ptr FontsIter
iter'
FontsIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontsIter
iter
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FontsIterFreeMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.OverloadedMethod FontsIterFreeMethodInfo FontsIter signature where
overloadedMethod = fontsIterFree
instance O.OverloadedMethodInfo FontsIterFreeMethodInfo FontsIter where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Poppler.Structs.FontsIter.fontsIterFree",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-poppler-0.18.27/docs/GI-Poppler-Structs-FontsIter.html#v:fontsIterFree"
})
#endif
foreign import ccall "poppler_fonts_iter_get_encoding" poppler_fonts_iter_get_encoding ::
Ptr FontsIter ->
IO CString
fontsIterGetEncoding ::
(B.CallStack.HasCallStack, MonadIO m) =>
FontsIter
-> m T.Text
fontsIterGetEncoding :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FontsIter -> m Text
fontsIterGetEncoding FontsIter
iter = IO Text -> m Text
forall a. IO a -> m a
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 FontsIter
iter' <- FontsIter -> IO (Ptr FontsIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontsIter
iter
CString
result <- Ptr FontsIter -> IO CString
poppler_fonts_iter_get_encoding Ptr FontsIter
iter'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"fontsIterGetEncoding" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
FontsIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontsIter
iter
Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data FontsIterGetEncodingMethodInfo
instance (signature ~ (m T.Text), MonadIO m) => O.OverloadedMethod FontsIterGetEncodingMethodInfo FontsIter signature where
overloadedMethod = fontsIterGetEncoding
instance O.OverloadedMethodInfo FontsIterGetEncodingMethodInfo FontsIter where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Poppler.Structs.FontsIter.fontsIterGetEncoding",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-poppler-0.18.27/docs/GI-Poppler-Structs-FontsIter.html#v:fontsIterGetEncoding"
})
#endif
foreign import ccall "poppler_fonts_iter_get_file_name" poppler_fonts_iter_get_file_name ::
Ptr FontsIter ->
IO CString
fontsIterGetFileName ::
(B.CallStack.HasCallStack, MonadIO m) =>
FontsIter
-> m T.Text
fontsIterGetFileName :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FontsIter -> m Text
fontsIterGetFileName FontsIter
iter = IO Text -> m Text
forall a. IO a -> m a
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 FontsIter
iter' <- FontsIter -> IO (Ptr FontsIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontsIter
iter
CString
result <- Ptr FontsIter -> IO CString
poppler_fonts_iter_get_file_name Ptr FontsIter
iter'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"fontsIterGetFileName" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
FontsIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontsIter
iter
Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data FontsIterGetFileNameMethodInfo
instance (signature ~ (m T.Text), MonadIO m) => O.OverloadedMethod FontsIterGetFileNameMethodInfo FontsIter signature where
overloadedMethod = fontsIterGetFileName
instance O.OverloadedMethodInfo FontsIterGetFileNameMethodInfo FontsIter where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Poppler.Structs.FontsIter.fontsIterGetFileName",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-poppler-0.18.27/docs/GI-Poppler-Structs-FontsIter.html#v:fontsIterGetFileName"
})
#endif
foreign import ccall "poppler_fonts_iter_get_font_type" poppler_fonts_iter_get_font_type ::
Ptr FontsIter ->
IO CUInt
fontsIterGetFontType ::
(B.CallStack.HasCallStack, MonadIO m) =>
FontsIter
-> m Poppler.Enums.FontType
fontsIterGetFontType :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FontsIter -> m FontType
fontsIterGetFontType FontsIter
iter = IO FontType -> m FontType
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FontType -> m FontType) -> IO FontType -> m FontType
forall a b. (a -> b) -> a -> b
$ do
Ptr FontsIter
iter' <- FontsIter -> IO (Ptr FontsIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontsIter
iter
CUInt
result <- Ptr FontsIter -> IO CUInt
poppler_fonts_iter_get_font_type Ptr FontsIter
iter'
let result' :: FontType
result' = (Int -> FontType
forall a. Enum a => Int -> a
toEnum (Int -> FontType) -> (CUInt -> Int) -> CUInt -> FontType
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
FontsIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontsIter
iter
FontType -> IO FontType
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return FontType
result'
#if defined(ENABLE_OVERLOADING)
data FontsIterGetFontTypeMethodInfo
instance (signature ~ (m Poppler.Enums.FontType), MonadIO m) => O.OverloadedMethod FontsIterGetFontTypeMethodInfo FontsIter signature where
overloadedMethod = fontsIterGetFontType
instance O.OverloadedMethodInfo FontsIterGetFontTypeMethodInfo FontsIter where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Poppler.Structs.FontsIter.fontsIterGetFontType",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-poppler-0.18.27/docs/GI-Poppler-Structs-FontsIter.html#v:fontsIterGetFontType"
})
#endif
foreign import ccall "poppler_fonts_iter_get_full_name" poppler_fonts_iter_get_full_name ::
Ptr FontsIter ->
IO CString
fontsIterGetFullName ::
(B.CallStack.HasCallStack, MonadIO m) =>
FontsIter
-> m T.Text
fontsIterGetFullName :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FontsIter -> m Text
fontsIterGetFullName FontsIter
iter = IO Text -> m Text
forall a. IO a -> m a
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 FontsIter
iter' <- FontsIter -> IO (Ptr FontsIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontsIter
iter
CString
result <- Ptr FontsIter -> IO CString
poppler_fonts_iter_get_full_name Ptr FontsIter
iter'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"fontsIterGetFullName" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
FontsIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontsIter
iter
Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data FontsIterGetFullNameMethodInfo
instance (signature ~ (m T.Text), MonadIO m) => O.OverloadedMethod FontsIterGetFullNameMethodInfo FontsIter signature where
overloadedMethod = fontsIterGetFullName
instance O.OverloadedMethodInfo FontsIterGetFullNameMethodInfo FontsIter where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Poppler.Structs.FontsIter.fontsIterGetFullName",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-poppler-0.18.27/docs/GI-Poppler-Structs-FontsIter.html#v:fontsIterGetFullName"
})
#endif
foreign import ccall "poppler_fonts_iter_get_name" poppler_fonts_iter_get_name ::
Ptr FontsIter ->
IO CString
fontsIterGetName ::
(B.CallStack.HasCallStack, MonadIO m) =>
FontsIter
-> m T.Text
fontsIterGetName :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FontsIter -> m Text
fontsIterGetName FontsIter
iter = IO Text -> m Text
forall a. IO a -> m a
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 FontsIter
iter' <- FontsIter -> IO (Ptr FontsIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontsIter
iter
CString
result <- Ptr FontsIter -> IO CString
poppler_fonts_iter_get_name Ptr FontsIter
iter'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"fontsIterGetName" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
FontsIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontsIter
iter
Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data FontsIterGetNameMethodInfo
instance (signature ~ (m T.Text), MonadIO m) => O.OverloadedMethod FontsIterGetNameMethodInfo FontsIter signature where
overloadedMethod = fontsIterGetName
instance O.OverloadedMethodInfo FontsIterGetNameMethodInfo FontsIter where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Poppler.Structs.FontsIter.fontsIterGetName",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-poppler-0.18.27/docs/GI-Poppler-Structs-FontsIter.html#v:fontsIterGetName"
})
#endif
foreign import ccall "poppler_fonts_iter_get_substitute_name" poppler_fonts_iter_get_substitute_name ::
Ptr FontsIter ->
IO CString
fontsIterGetSubstituteName ::
(B.CallStack.HasCallStack, MonadIO m) =>
FontsIter
-> m T.Text
fontsIterGetSubstituteName :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FontsIter -> m Text
fontsIterGetSubstituteName FontsIter
iter = IO Text -> m Text
forall a. IO a -> m a
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 FontsIter
iter' <- FontsIter -> IO (Ptr FontsIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontsIter
iter
CString
result <- Ptr FontsIter -> IO CString
poppler_fonts_iter_get_substitute_name Ptr FontsIter
iter'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"fontsIterGetSubstituteName" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
FontsIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontsIter
iter
Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data FontsIterGetSubstituteNameMethodInfo
instance (signature ~ (m T.Text), MonadIO m) => O.OverloadedMethod FontsIterGetSubstituteNameMethodInfo FontsIter signature where
overloadedMethod = fontsIterGetSubstituteName
instance O.OverloadedMethodInfo FontsIterGetSubstituteNameMethodInfo FontsIter where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Poppler.Structs.FontsIter.fontsIterGetSubstituteName",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-poppler-0.18.27/docs/GI-Poppler-Structs-FontsIter.html#v:fontsIterGetSubstituteName"
})
#endif
foreign import ccall "poppler_fonts_iter_is_embedded" poppler_fonts_iter_is_embedded ::
Ptr FontsIter ->
IO CInt
fontsIterIsEmbedded ::
(B.CallStack.HasCallStack, MonadIO m) =>
FontsIter
-> m Bool
fontsIterIsEmbedded :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FontsIter -> m Bool
fontsIterIsEmbedded FontsIter
iter = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr FontsIter
iter' <- FontsIter -> IO (Ptr FontsIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontsIter
iter
CInt
result <- Ptr FontsIter -> IO CInt
poppler_fonts_iter_is_embedded Ptr FontsIter
iter'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
FontsIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontsIter
iter
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data FontsIterIsEmbeddedMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.OverloadedMethod FontsIterIsEmbeddedMethodInfo FontsIter signature where
overloadedMethod = fontsIterIsEmbedded
instance O.OverloadedMethodInfo FontsIterIsEmbeddedMethodInfo FontsIter where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Poppler.Structs.FontsIter.fontsIterIsEmbedded",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-poppler-0.18.27/docs/GI-Poppler-Structs-FontsIter.html#v:fontsIterIsEmbedded"
})
#endif
foreign import ccall "poppler_fonts_iter_is_subset" poppler_fonts_iter_is_subset ::
Ptr FontsIter ->
IO CInt
fontsIterIsSubset ::
(B.CallStack.HasCallStack, MonadIO m) =>
FontsIter
-> m Bool
fontsIterIsSubset :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FontsIter -> m Bool
fontsIterIsSubset FontsIter
iter = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr FontsIter
iter' <- FontsIter -> IO (Ptr FontsIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontsIter
iter
CInt
result <- Ptr FontsIter -> IO CInt
poppler_fonts_iter_is_subset Ptr FontsIter
iter'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
FontsIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontsIter
iter
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data FontsIterIsSubsetMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.OverloadedMethod FontsIterIsSubsetMethodInfo FontsIter signature where
overloadedMethod = fontsIterIsSubset
instance O.OverloadedMethodInfo FontsIterIsSubsetMethodInfo FontsIter where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Poppler.Structs.FontsIter.fontsIterIsSubset",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-poppler-0.18.27/docs/GI-Poppler-Structs-FontsIter.html#v:fontsIterIsSubset"
})
#endif
foreign import ccall "poppler_fonts_iter_next" poppler_fonts_iter_next ::
Ptr FontsIter ->
IO CInt
fontsIterNext ::
(B.CallStack.HasCallStack, MonadIO m) =>
FontsIter
-> m Bool
fontsIterNext :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FontsIter -> m Bool
fontsIterNext FontsIter
iter = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr FontsIter
iter' <- FontsIter -> IO (Ptr FontsIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontsIter
iter
CInt
result <- Ptr FontsIter -> IO CInt
poppler_fonts_iter_next Ptr FontsIter
iter'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
FontsIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontsIter
iter
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data FontsIterNextMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.OverloadedMethod FontsIterNextMethodInfo FontsIter signature where
overloadedMethod = fontsIterNext
instance O.OverloadedMethodInfo FontsIterNextMethodInfo FontsIter where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Poppler.Structs.FontsIter.fontsIterNext",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-poppler-0.18.27/docs/GI-Poppler-Structs-FontsIter.html#v:fontsIterNext"
})
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveFontsIterMethod (t :: Symbol) (o :: *) :: * where
ResolveFontsIterMethod "copy" o = FontsIterCopyMethodInfo
ResolveFontsIterMethod "free" o = FontsIterFreeMethodInfo
ResolveFontsIterMethod "isEmbedded" o = FontsIterIsEmbeddedMethodInfo
ResolveFontsIterMethod "isSubset" o = FontsIterIsSubsetMethodInfo
ResolveFontsIterMethod "next" o = FontsIterNextMethodInfo
ResolveFontsIterMethod "getEncoding" o = FontsIterGetEncodingMethodInfo
ResolveFontsIterMethod "getFileName" o = FontsIterGetFileNameMethodInfo
ResolveFontsIterMethod "getFontType" o = FontsIterGetFontTypeMethodInfo
ResolveFontsIterMethod "getFullName" o = FontsIterGetFullNameMethodInfo
ResolveFontsIterMethod "getName" o = FontsIterGetNameMethodInfo
ResolveFontsIterMethod "getSubstituteName" o = FontsIterGetSubstituteNameMethodInfo
ResolveFontsIterMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveFontsIterMethod t FontsIter, O.OverloadedMethod info FontsIter p) => OL.IsLabel t (FontsIter -> 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 ~ ResolveFontsIterMethod t FontsIter, O.OverloadedMethod info FontsIter p, R.HasField t FontsIter p) => R.HasField t FontsIter p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveFontsIterMethod t FontsIter, O.OverloadedMethodInfo info FontsIter) => OL.IsLabel t (O.MethodProxy info FontsIter) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif