module GI.Poppler.Structs.FontsIter
(
FontsIter(..) ,
noFontsIter ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
FontsIterCopyMethodInfo ,
#endif
fontsIterCopy ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
FontsIterFreeMethodInfo ,
#endif
fontsIterFree ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
FontsIterGetEncodingMethodInfo ,
#endif
fontsIterGetEncoding ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
FontsIterGetFileNameMethodInfo ,
#endif
fontsIterGetFileName ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
FontsIterGetFontTypeMethodInfo ,
#endif
fontsIterGetFontType ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
FontsIterGetFullNameMethodInfo ,
#endif
fontsIterGetFullName ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
FontsIterGetNameMethodInfo ,
#endif
fontsIterGetName ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
FontsIterGetSubstituteNameMethodInfo ,
#endif
fontsIterGetSubstituteName ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
FontsIterIsEmbeddedMethodInfo ,
#endif
fontsIterIsEmbedded ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
FontsIterIsSubsetMethodInfo ,
#endif
fontsIterIsSubset ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
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.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
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 GI.Poppler.Enums as Poppler.Enums
newtype FontsIter = FontsIter (ManagedPtr 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
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
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 iter = liftIO $ do
iter' <- unsafeManagedPtrGetPtr iter
result <- poppler_fonts_iter_copy iter'
checkUnexpectedReturnNULL "fontsIterCopy" result
result' <- (wrapBoxed FontsIter) result
touchManagedPtr iter
return result'
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data FontsIterCopyMethodInfo
instance (signature ~ (m FontsIter), MonadIO m) => O.MethodInfo FontsIterCopyMethodInfo FontsIter signature where
overloadedMethod _ = 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 iter = liftIO $ do
iter' <- unsafeManagedPtrGetPtr iter
poppler_fonts_iter_free iter'
touchManagedPtr iter
return ()
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data FontsIterFreeMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.MethodInfo FontsIterFreeMethodInfo FontsIter signature where
overloadedMethod _ = 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 iter = liftIO $ do
iter' <- unsafeManagedPtrGetPtr iter
result <- poppler_fonts_iter_get_encoding iter'
checkUnexpectedReturnNULL "fontsIterGetEncoding" result
result' <- cstringToText result
touchManagedPtr iter
return result'
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data FontsIterGetEncodingMethodInfo
instance (signature ~ (m T.Text), MonadIO m) => O.MethodInfo FontsIterGetEncodingMethodInfo FontsIter signature where
overloadedMethod _ = 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 iter = liftIO $ do
iter' <- unsafeManagedPtrGetPtr iter
result <- poppler_fonts_iter_get_file_name iter'
checkUnexpectedReturnNULL "fontsIterGetFileName" result
result' <- cstringToText result
touchManagedPtr iter
return result'
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data FontsIterGetFileNameMethodInfo
instance (signature ~ (m T.Text), MonadIO m) => O.MethodInfo FontsIterGetFileNameMethodInfo FontsIter signature where
overloadedMethod _ = 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 iter = liftIO $ do
iter' <- unsafeManagedPtrGetPtr iter
result <- poppler_fonts_iter_get_font_type iter'
let result' = (toEnum . fromIntegral) result
touchManagedPtr iter
return result'
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data FontsIterGetFontTypeMethodInfo
instance (signature ~ (m Poppler.Enums.FontType), MonadIO m) => O.MethodInfo FontsIterGetFontTypeMethodInfo FontsIter signature where
overloadedMethod _ = 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 iter = liftIO $ do
iter' <- unsafeManagedPtrGetPtr iter
result <- poppler_fonts_iter_get_full_name iter'
checkUnexpectedReturnNULL "fontsIterGetFullName" result
result' <- cstringToText result
touchManagedPtr iter
return result'
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data FontsIterGetFullNameMethodInfo
instance (signature ~ (m T.Text), MonadIO m) => O.MethodInfo FontsIterGetFullNameMethodInfo FontsIter signature where
overloadedMethod _ = 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 iter = liftIO $ do
iter' <- unsafeManagedPtrGetPtr iter
result <- poppler_fonts_iter_get_name iter'
checkUnexpectedReturnNULL "fontsIterGetName" result
result' <- cstringToText result
touchManagedPtr iter
return result'
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data FontsIterGetNameMethodInfo
instance (signature ~ (m T.Text), MonadIO m) => O.MethodInfo FontsIterGetNameMethodInfo FontsIter signature where
overloadedMethod _ = 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 iter = liftIO $ do
iter' <- unsafeManagedPtrGetPtr iter
result <- poppler_fonts_iter_get_substitute_name iter'
checkUnexpectedReturnNULL "fontsIterGetSubstituteName" result
result' <- cstringToText result
touchManagedPtr iter
return result'
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data FontsIterGetSubstituteNameMethodInfo
instance (signature ~ (m T.Text), MonadIO m) => O.MethodInfo FontsIterGetSubstituteNameMethodInfo FontsIter signature where
overloadedMethod _ = 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 iter = liftIO $ do
iter' <- unsafeManagedPtrGetPtr iter
result <- poppler_fonts_iter_is_embedded iter'
let result' = (/= 0) result
touchManagedPtr iter
return result'
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data FontsIterIsEmbeddedMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo FontsIterIsEmbeddedMethodInfo FontsIter signature where
overloadedMethod _ = 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 iter = liftIO $ do
iter' <- unsafeManagedPtrGetPtr iter
result <- poppler_fonts_iter_is_subset iter'
let result' = (/= 0) result
touchManagedPtr iter
return result'
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data FontsIterIsSubsetMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo FontsIterIsSubsetMethodInfo FontsIter signature where
overloadedMethod _ = 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 iter = liftIO $ do
iter' <- unsafeManagedPtrGetPtr iter
result <- poppler_fonts_iter_next iter'
let result' = (/= 0) result
touchManagedPtr iter
return result'
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data FontsIterNextMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo FontsIterNextMethodInfo FontsIter signature where
overloadedMethod _ = fontsIterNext
#endif
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
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.MethodInfo info FontsIter p) => O.IsLabelProxy t (FontsIter -> p) where
fromLabelProxy _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#if MIN_VERSION_base(4,9,0)
instance (info ~ ResolveFontsIterMethod t FontsIter, O.MethodInfo info FontsIter p) => O.IsLabel t (FontsIter -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#else
fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
#endif
#endif