gi-poppler-0.0.30.12: GI/Poppler/Objects/StructureElement.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.Objects.StructureElement
(
-- * Exported types
StructureElement(..) ,
StructureElementK ,
toStructureElement ,
noStructureElement ,
-- * Methods
-- ** structureElementGetAbbreviation
structureElementGetAbbreviation ,
-- ** structureElementGetActualText
structureElementGetActualText ,
-- ** structureElementGetAltText
structureElementGetAltText ,
-- ** structureElementGetBackgroundColor
structureElementGetBackgroundColor ,
-- ** structureElementGetBaselineShift
structureElementGetBaselineShift ,
-- ** structureElementGetBlockAlign
structureElementGetBlockAlign ,
-- ** structureElementGetBorderColor
structureElementGetBorderColor ,
-- ** structureElementGetBorderStyle
structureElementGetBorderStyle ,
-- ** structureElementGetBorderThickness
structureElementGetBorderThickness ,
-- ** structureElementGetBoundingBox
structureElementGetBoundingBox ,
-- ** structureElementGetColor
structureElementGetColor ,
-- ** structureElementGetColumnCount
structureElementGetColumnCount ,
-- ** structureElementGetColumnGaps
structureElementGetColumnGaps ,
-- ** structureElementGetColumnWidths
structureElementGetColumnWidths ,
-- ** structureElementGetEndIndent
structureElementGetEndIndent ,
-- ** structureElementGetFormDescription
structureElementGetFormDescription ,
-- ** structureElementGetFormRole
structureElementGetFormRole ,
-- ** structureElementGetFormState
structureElementGetFormState ,
-- ** structureElementGetGlyphOrientation
structureElementGetGlyphOrientation ,
-- ** structureElementGetHeight
structureElementGetHeight ,
-- ** structureElementGetId
structureElementGetId ,
-- ** structureElementGetInlineAlign
structureElementGetInlineAlign ,
-- ** structureElementGetKind
structureElementGetKind ,
-- ** structureElementGetLanguage
structureElementGetLanguage ,
-- ** structureElementGetLineHeight
structureElementGetLineHeight ,
-- ** structureElementGetListNumbering
structureElementGetListNumbering ,
-- ** structureElementGetPadding
structureElementGetPadding ,
-- ** structureElementGetPage
structureElementGetPage ,
-- ** structureElementGetPlacement
structureElementGetPlacement ,
-- ** structureElementGetRubyAlign
structureElementGetRubyAlign ,
-- ** structureElementGetRubyPosition
structureElementGetRubyPosition ,
-- ** structureElementGetSpaceAfter
structureElementGetSpaceAfter ,
-- ** structureElementGetSpaceBefore
structureElementGetSpaceBefore ,
-- ** structureElementGetStartIndent
structureElementGetStartIndent ,
-- ** structureElementGetTableBorderStyle
structureElementGetTableBorderStyle ,
-- ** structureElementGetTableColumnSpan
structureElementGetTableColumnSpan ,
-- ** structureElementGetTableHeaders
structureElementGetTableHeaders ,
-- ** structureElementGetTablePadding
structureElementGetTablePadding ,
-- ** structureElementGetTableRowSpan
structureElementGetTableRowSpan ,
-- ** structureElementGetTableScope
structureElementGetTableScope ,
-- ** structureElementGetTableSummary
structureElementGetTableSummary ,
-- ** structureElementGetText
structureElementGetText ,
-- ** structureElementGetTextAlign
structureElementGetTextAlign ,
-- ** structureElementGetTextDecorationColor
structureElementGetTextDecorationColor ,
-- ** structureElementGetTextDecorationThickness
structureElementGetTextDecorationThickness,
-- ** structureElementGetTextDecorationType
structureElementGetTextDecorationType ,
-- ** structureElementGetTextIndent
structureElementGetTextIndent ,
-- ** structureElementGetTextSpans
structureElementGetTextSpans ,
-- ** structureElementGetTitle
structureElementGetTitle ,
-- ** structureElementGetWidth
structureElementGetWidth ,
-- ** structureElementGetWritingMode
structureElementGetWritingMode ,
-- ** structureElementIsBlock
structureElementIsBlock ,
-- ** structureElementIsContent
structureElementIsContent ,
-- ** structureElementIsGrouping
structureElementIsGrouping ,
-- ** structureElementIsInline
structureElementIsInline ,
) 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
import qualified GI.GObject as GObject
newtype StructureElement = StructureElement (ForeignPtr StructureElement)
foreign import ccall "poppler_structure_element_get_type"
c_poppler_structure_element_get_type :: IO GType
type instance ParentTypes StructureElement = StructureElementParentTypes
type StructureElementParentTypes = '[GObject.Object]
instance GObject StructureElement where
gobjectIsInitiallyUnowned _ = False
gobjectType _ = c_poppler_structure_element_get_type
class GObject o => StructureElementK o
instance (GObject o, IsDescendantOf StructureElement o) => StructureElementK o
toStructureElement :: StructureElementK o => o -> IO StructureElement
toStructureElement = unsafeCastTo StructureElement
noStructureElement :: Maybe StructureElement
noStructureElement = Nothing
type instance AttributeList StructureElement = StructureElementAttributeList
type StructureElementAttributeList = ('[ ] :: [(Symbol, *)])
type instance SignalList StructureElement = StructureElementSignalList
type StructureElementSignalList = ('[ '("notify", GObject.ObjectNotifySignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)])
-- method StructureElement::get_abbreviation
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "poppler_structure_element_get_abbreviation" poppler_structure_element_get_abbreviation ::
Ptr StructureElement -> -- _obj : TInterface "Poppler" "StructureElement"
IO CString
structureElementGetAbbreviation ::
(MonadIO m, StructureElementK a) =>
a -> -- _obj
m T.Text
structureElementGetAbbreviation _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- poppler_structure_element_get_abbreviation _obj'
checkUnexpectedReturnNULL "poppler_structure_element_get_abbreviation" result
result' <- cstringToText result
freeMem result
touchManagedPtr _obj
return result'
-- method StructureElement::get_actual_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "poppler_structure_element_get_actual_text" poppler_structure_element_get_actual_text ::
Ptr StructureElement -> -- _obj : TInterface "Poppler" "StructureElement"
IO CString
structureElementGetActualText ::
(MonadIO m, StructureElementK a) =>
a -> -- _obj
m T.Text
structureElementGetActualText _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- poppler_structure_element_get_actual_text _obj'
checkUnexpectedReturnNULL "poppler_structure_element_get_actual_text" result
result' <- cstringToText result
freeMem result
touchManagedPtr _obj
return result'
-- method StructureElement::get_alt_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "poppler_structure_element_get_alt_text" poppler_structure_element_get_alt_text ::
Ptr StructureElement -> -- _obj : TInterface "Poppler" "StructureElement"
IO CString
structureElementGetAltText ::
(MonadIO m, StructureElementK a) =>
a -> -- _obj
m T.Text
structureElementGetAltText _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- poppler_structure_element_get_alt_text _obj'
checkUnexpectedReturnNULL "poppler_structure_element_get_alt_text" result
result' <- cstringToText result
freeMem result
touchManagedPtr _obj
return result'
-- method StructureElement::get_background_color
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color", argType = TInterface "Poppler" "Color", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False
foreign import ccall "poppler_structure_element_get_background_color" poppler_structure_element_get_background_color ::
Ptr StructureElement -> -- _obj : TInterface "Poppler" "StructureElement"
Ptr Color -> -- color : TInterface "Poppler" "Color"
IO CInt
structureElementGetBackgroundColor ::
(MonadIO m, StructureElementK a) =>
a -> -- _obj
m (Bool,Color)
structureElementGetBackgroundColor _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
color <- callocBoxedBytes 6 :: IO (Ptr Color)
result <- poppler_structure_element_get_background_color _obj' color
let result' = (/= 0) result
color' <- (wrapBoxed Color) color
touchManagedPtr _obj
return (result', color')
-- method StructureElement::get_baseline_shift
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False
foreign import ccall "poppler_structure_element_get_baseline_shift" poppler_structure_element_get_baseline_shift ::
Ptr StructureElement -> -- _obj : TInterface "Poppler" "StructureElement"
IO CDouble
structureElementGetBaselineShift ::
(MonadIO m, StructureElementK a) =>
a -> -- _obj
m Double
structureElementGetBaselineShift _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- poppler_structure_element_get_baseline_shift _obj'
let result' = realToFrac result
touchManagedPtr _obj
return result'
-- method StructureElement::get_block_align
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Poppler" "StructureBlockAlign"
-- throws : False
-- Skip return : False
foreign import ccall "poppler_structure_element_get_block_align" poppler_structure_element_get_block_align ::
Ptr StructureElement -> -- _obj : TInterface "Poppler" "StructureElement"
IO CUInt
structureElementGetBlockAlign ::
(MonadIO m, StructureElementK a) =>
a -> -- _obj
m StructureBlockAlign
structureElementGetBlockAlign _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- poppler_structure_element_get_block_align _obj'
let result' = (toEnum . fromIntegral) result
touchManagedPtr _obj
return result'
-- method StructureElement::get_border_color
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "colors", argType = TCArray False 4 (-1) (TInterface "Poppler" "Color"), direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False
foreign import ccall "poppler_structure_element_get_border_color" poppler_structure_element_get_border_color ::
Ptr StructureElement -> -- _obj : TInterface "Poppler" "StructureElement"
Ptr (Ptr Color) -> -- colors : TCArray False 4 (-1) (TInterface "Poppler" "Color")
IO CInt
structureElementGetBorderColor ::
(MonadIO m, StructureElementK a) =>
a -> -- _obj
m (Bool,[Color])
structureElementGetBorderColor _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
colors <- allocMem :: IO (Ptr (Ptr Color))
result <- poppler_structure_element_get_border_color _obj' colors
let result' = (/= 0) result
colors' <- peek colors
colors'' <- (unpackBoxedArrayWithLength 6 4) colors'
colors''' <- mapM (newBoxed Color) colors''
touchManagedPtr _obj
freeMem colors
return (result', colors''')
-- method StructureElement::get_border_style
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "border_styles", argType = TCArray False 4 (-1) (TInterface "Poppler" "StructureBorderStyle"), direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "poppler_structure_element_get_border_style" poppler_structure_element_get_border_style ::
Ptr StructureElement -> -- _obj : TInterface "Poppler" "StructureElement"
Ptr (Ptr CUInt) -> -- border_styles : TCArray False 4 (-1) (TInterface "Poppler" "StructureBorderStyle")
IO ()
structureElementGetBorderStyle ::
(MonadIO m, StructureElementK a) =>
a -> -- _obj
m ([StructureBorderStyle])
structureElementGetBorderStyle _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
border_styles <- allocMem :: IO (Ptr (Ptr CUInt))
poppler_structure_element_get_border_style _obj' border_styles
border_styles' <- peek border_styles
border_styles'' <- (unpackStorableArrayWithLength 4) border_styles'
let border_styles''' = map (toEnum . fromIntegral) border_styles''
freeMem border_styles'
touchManagedPtr _obj
freeMem border_styles
return border_styles'''
-- method StructureElement::get_border_thickness
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "border_thicknesses", argType = TCArray False 4 (-1) (TBasicType TDouble), direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False
foreign import ccall "poppler_structure_element_get_border_thickness" poppler_structure_element_get_border_thickness ::
Ptr StructureElement -> -- _obj : TInterface "Poppler" "StructureElement"
Ptr (Ptr CDouble) -> -- border_thicknesses : TCArray False 4 (-1) (TBasicType TDouble)
IO CInt
structureElementGetBorderThickness ::
(MonadIO m, StructureElementK a) =>
a -> -- _obj
m (Bool,[Double])
structureElementGetBorderThickness _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
border_thicknesses <- allocMem :: IO (Ptr (Ptr CDouble))
result <- poppler_structure_element_get_border_thickness _obj' border_thicknesses
let result' = (/= 0) result
border_thicknesses' <- peek border_thicknesses
border_thicknesses'' <- (unpackMapStorableArrayWithLength realToFrac 4) border_thicknesses'
freeMem border_thicknesses'
touchManagedPtr _obj
freeMem border_thicknesses
return (result', border_thicknesses'')
-- method StructureElement::get_bounding_box
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "bounding_box", argType = TInterface "Poppler" "Rectangle", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False
foreign import ccall "poppler_structure_element_get_bounding_box" poppler_structure_element_get_bounding_box ::
Ptr StructureElement -> -- _obj : TInterface "Poppler" "StructureElement"
Ptr Rectangle -> -- bounding_box : TInterface "Poppler" "Rectangle"
IO CInt
structureElementGetBoundingBox ::
(MonadIO m, StructureElementK a) =>
a -> -- _obj
m (Bool,Rectangle)
structureElementGetBoundingBox _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
bounding_box <- callocBoxedBytes 32 :: IO (Ptr Rectangle)
result <- poppler_structure_element_get_bounding_box _obj' bounding_box
let result' = (/= 0) result
bounding_box' <- (wrapBoxed Rectangle) bounding_box
touchManagedPtr _obj
return (result', bounding_box')
-- method StructureElement::get_color
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color", argType = TInterface "Poppler" "Color", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False
foreign import ccall "poppler_structure_element_get_color" poppler_structure_element_get_color ::
Ptr StructureElement -> -- _obj : TInterface "Poppler" "StructureElement"
Ptr Color -> -- color : TInterface "Poppler" "Color"
IO CInt
structureElementGetColor ::
(MonadIO m, StructureElementK a) =>
a -> -- _obj
m (Bool,Color)
structureElementGetColor _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
color <- callocBoxedBytes 6 :: IO (Ptr Color)
result <- poppler_structure_element_get_color _obj' color
let result' = (/= 0) result
color' <- (wrapBoxed Color) color
touchManagedPtr _obj
return (result', color')
-- method StructureElement::get_column_count
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False
foreign import ccall "poppler_structure_element_get_column_count" poppler_structure_element_get_column_count ::
Ptr StructureElement -> -- _obj : TInterface "Poppler" "StructureElement"
IO Word32
structureElementGetColumnCount ::
(MonadIO m, StructureElementK a) =>
a -> -- _obj
m Word32
structureElementGetColumnCount _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- poppler_structure_element_get_column_count _obj'
touchManagedPtr _obj
return result
-- method StructureElement::get_column_gaps
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_values", argType = TBasicType TUInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : [Arg {argName = "n_values", argType = TBasicType TUInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TCArray False (-1) 1 (TBasicType TDouble)
-- throws : False
-- Skip return : False
foreign import ccall "poppler_structure_element_get_column_gaps" poppler_structure_element_get_column_gaps ::
Ptr StructureElement -> -- _obj : TInterface "Poppler" "StructureElement"
Ptr Word32 -> -- n_values : TBasicType TUInt32
IO (Ptr CDouble)
structureElementGetColumnGaps ::
(MonadIO m, StructureElementK a) =>
a -> -- _obj
m [Double]
structureElementGetColumnGaps _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
n_values <- allocMem :: IO (Ptr Word32)
result <- poppler_structure_element_get_column_gaps _obj' n_values
n_values' <- peek n_values
checkUnexpectedReturnNULL "poppler_structure_element_get_column_gaps" result
result' <- (unpackMapStorableArrayWithLength realToFrac n_values') result
freeMem result
touchManagedPtr _obj
freeMem n_values
return result'
-- method StructureElement::get_column_widths
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_values", argType = TBasicType TUInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : [Arg {argName = "n_values", argType = TBasicType TUInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TCArray False (-1) 1 (TBasicType TDouble)
-- throws : False
-- Skip return : False
foreign import ccall "poppler_structure_element_get_column_widths" poppler_structure_element_get_column_widths ::
Ptr StructureElement -> -- _obj : TInterface "Poppler" "StructureElement"
Ptr Word32 -> -- n_values : TBasicType TUInt32
IO (Ptr CDouble)
structureElementGetColumnWidths ::
(MonadIO m, StructureElementK a) =>
a -> -- _obj
m [Double]
structureElementGetColumnWidths _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
n_values <- allocMem :: IO (Ptr Word32)
result <- poppler_structure_element_get_column_widths _obj' n_values
n_values' <- peek n_values
checkUnexpectedReturnNULL "poppler_structure_element_get_column_widths" result
result' <- (unpackMapStorableArrayWithLength realToFrac n_values') result
freeMem result
touchManagedPtr _obj
freeMem n_values
return result'
-- method StructureElement::get_end_indent
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False
foreign import ccall "poppler_structure_element_get_end_indent" poppler_structure_element_get_end_indent ::
Ptr StructureElement -> -- _obj : TInterface "Poppler" "StructureElement"
IO CDouble
structureElementGetEndIndent ::
(MonadIO m, StructureElementK a) =>
a -> -- _obj
m Double
structureElementGetEndIndent _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- poppler_structure_element_get_end_indent _obj'
let result' = realToFrac result
touchManagedPtr _obj
return result'
-- method StructureElement::get_form_description
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "poppler_structure_element_get_form_description" poppler_structure_element_get_form_description ::
Ptr StructureElement -> -- _obj : TInterface "Poppler" "StructureElement"
IO CString
structureElementGetFormDescription ::
(MonadIO m, StructureElementK a) =>
a -> -- _obj
m T.Text
structureElementGetFormDescription _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- poppler_structure_element_get_form_description _obj'
checkUnexpectedReturnNULL "poppler_structure_element_get_form_description" result
result' <- cstringToText result
freeMem result
touchManagedPtr _obj
return result'
-- method StructureElement::get_form_role
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Poppler" "StructureFormRole"
-- throws : False
-- Skip return : False
foreign import ccall "poppler_structure_element_get_form_role" poppler_structure_element_get_form_role ::
Ptr StructureElement -> -- _obj : TInterface "Poppler" "StructureElement"
IO CUInt
structureElementGetFormRole ::
(MonadIO m, StructureElementK a) =>
a -> -- _obj
m StructureFormRole
structureElementGetFormRole _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- poppler_structure_element_get_form_role _obj'
let result' = (toEnum . fromIntegral) result
touchManagedPtr _obj
return result'
-- method StructureElement::get_form_state
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Poppler" "StructureFormState"
-- throws : False
-- Skip return : False
foreign import ccall "poppler_structure_element_get_form_state" poppler_structure_element_get_form_state ::
Ptr StructureElement -> -- _obj : TInterface "Poppler" "StructureElement"
IO CUInt
structureElementGetFormState ::
(MonadIO m, StructureElementK a) =>
a -> -- _obj
m StructureFormState
structureElementGetFormState _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- poppler_structure_element_get_form_state _obj'
let result' = (toEnum . fromIntegral) result
touchManagedPtr _obj
return result'
-- method StructureElement::get_glyph_orientation
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Poppler" "StructureGlyphOrientation"
-- throws : False
-- Skip return : False
foreign import ccall "poppler_structure_element_get_glyph_orientation" poppler_structure_element_get_glyph_orientation ::
Ptr StructureElement -> -- _obj : TInterface "Poppler" "StructureElement"
IO CUInt
structureElementGetGlyphOrientation ::
(MonadIO m, StructureElementK a) =>
a -> -- _obj
m StructureGlyphOrientation
structureElementGetGlyphOrientation _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- poppler_structure_element_get_glyph_orientation _obj'
let result' = (toEnum . fromIntegral) result
touchManagedPtr _obj
return result'
-- method StructureElement::get_height
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False
foreign import ccall "poppler_structure_element_get_height" poppler_structure_element_get_height ::
Ptr StructureElement -> -- _obj : TInterface "Poppler" "StructureElement"
IO CDouble
structureElementGetHeight ::
(MonadIO m, StructureElementK a) =>
a -> -- _obj
m Double
structureElementGetHeight _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- poppler_structure_element_get_height _obj'
let result' = realToFrac result
touchManagedPtr _obj
return result'
-- method StructureElement::get_id
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "poppler_structure_element_get_id" poppler_structure_element_get_id ::
Ptr StructureElement -> -- _obj : TInterface "Poppler" "StructureElement"
IO CString
structureElementGetId ::
(MonadIO m, StructureElementK a) =>
a -> -- _obj
m T.Text
structureElementGetId _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- poppler_structure_element_get_id _obj'
checkUnexpectedReturnNULL "poppler_structure_element_get_id" result
result' <- cstringToText result
freeMem result
touchManagedPtr _obj
return result'
-- method StructureElement::get_inline_align
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Poppler" "StructureInlineAlign"
-- throws : False
-- Skip return : False
foreign import ccall "poppler_structure_element_get_inline_align" poppler_structure_element_get_inline_align ::
Ptr StructureElement -> -- _obj : TInterface "Poppler" "StructureElement"
IO CUInt
structureElementGetInlineAlign ::
(MonadIO m, StructureElementK a) =>
a -> -- _obj
m StructureInlineAlign
structureElementGetInlineAlign _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- poppler_structure_element_get_inline_align _obj'
let result' = (toEnum . fromIntegral) result
touchManagedPtr _obj
return result'
-- method StructureElement::get_kind
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Poppler" "StructureElementKind"
-- throws : False
-- Skip return : False
foreign import ccall "poppler_structure_element_get_kind" poppler_structure_element_get_kind ::
Ptr StructureElement -> -- _obj : TInterface "Poppler" "StructureElement"
IO CUInt
structureElementGetKind ::
(MonadIO m, StructureElementK a) =>
a -> -- _obj
m StructureElementKind
structureElementGetKind _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- poppler_structure_element_get_kind _obj'
let result' = (toEnum . fromIntegral) result
touchManagedPtr _obj
return result'
-- method StructureElement::get_language
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "poppler_structure_element_get_language" poppler_structure_element_get_language ::
Ptr StructureElement -> -- _obj : TInterface "Poppler" "StructureElement"
IO CString
structureElementGetLanguage ::
(MonadIO m, StructureElementK a) =>
a -> -- _obj
m T.Text
structureElementGetLanguage _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- poppler_structure_element_get_language _obj'
checkUnexpectedReturnNULL "poppler_structure_element_get_language" result
result' <- cstringToText result
freeMem result
touchManagedPtr _obj
return result'
-- method StructureElement::get_line_height
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False
foreign import ccall "poppler_structure_element_get_line_height" poppler_structure_element_get_line_height ::
Ptr StructureElement -> -- _obj : TInterface "Poppler" "StructureElement"
IO CDouble
structureElementGetLineHeight ::
(MonadIO m, StructureElementK a) =>
a -> -- _obj
m Double
structureElementGetLineHeight _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- poppler_structure_element_get_line_height _obj'
let result' = realToFrac result
touchManagedPtr _obj
return result'
-- method StructureElement::get_list_numbering
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Poppler" "StructureListNumbering"
-- throws : False
-- Skip return : False
foreign import ccall "poppler_structure_element_get_list_numbering" poppler_structure_element_get_list_numbering ::
Ptr StructureElement -> -- _obj : TInterface "Poppler" "StructureElement"
IO CUInt
structureElementGetListNumbering ::
(MonadIO m, StructureElementK a) =>
a -> -- _obj
m StructureListNumbering
structureElementGetListNumbering _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- poppler_structure_element_get_list_numbering _obj'
let result' = (toEnum . fromIntegral) result
touchManagedPtr _obj
return result'
-- method StructureElement::get_padding
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "paddings", argType = TCArray False 4 (-1) (TBasicType TDouble), direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "poppler_structure_element_get_padding" poppler_structure_element_get_padding ::
Ptr StructureElement -> -- _obj : TInterface "Poppler" "StructureElement"
Ptr (Ptr CDouble) -> -- paddings : TCArray False 4 (-1) (TBasicType TDouble)
IO ()
structureElementGetPadding ::
(MonadIO m, StructureElementK a) =>
a -> -- _obj
m ([Double])
structureElementGetPadding _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
paddings <- allocMem :: IO (Ptr (Ptr CDouble))
poppler_structure_element_get_padding _obj' paddings
paddings' <- peek paddings
paddings'' <- (unpackMapStorableArrayWithLength realToFrac 4) paddings'
freeMem paddings'
touchManagedPtr _obj
freeMem paddings
return paddings''
-- method StructureElement::get_page
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False
foreign import ccall "poppler_structure_element_get_page" poppler_structure_element_get_page ::
Ptr StructureElement -> -- _obj : TInterface "Poppler" "StructureElement"
IO Int32
structureElementGetPage ::
(MonadIO m, StructureElementK a) =>
a -> -- _obj
m Int32
structureElementGetPage _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- poppler_structure_element_get_page _obj'
touchManagedPtr _obj
return result
-- method StructureElement::get_placement
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Poppler" "StructurePlacement"
-- throws : False
-- Skip return : False
foreign import ccall "poppler_structure_element_get_placement" poppler_structure_element_get_placement ::
Ptr StructureElement -> -- _obj : TInterface "Poppler" "StructureElement"
IO CUInt
structureElementGetPlacement ::
(MonadIO m, StructureElementK a) =>
a -> -- _obj
m StructurePlacement
structureElementGetPlacement _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- poppler_structure_element_get_placement _obj'
let result' = (toEnum . fromIntegral) result
touchManagedPtr _obj
return result'
-- method StructureElement::get_ruby_align
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Poppler" "StructureRubyAlign"
-- throws : False
-- Skip return : False
foreign import ccall "poppler_structure_element_get_ruby_align" poppler_structure_element_get_ruby_align ::
Ptr StructureElement -> -- _obj : TInterface "Poppler" "StructureElement"
IO CUInt
structureElementGetRubyAlign ::
(MonadIO m, StructureElementK a) =>
a -> -- _obj
m StructureRubyAlign
structureElementGetRubyAlign _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- poppler_structure_element_get_ruby_align _obj'
let result' = (toEnum . fromIntegral) result
touchManagedPtr _obj
return result'
-- method StructureElement::get_ruby_position
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Poppler" "StructureRubyPosition"
-- throws : False
-- Skip return : False
foreign import ccall "poppler_structure_element_get_ruby_position" poppler_structure_element_get_ruby_position ::
Ptr StructureElement -> -- _obj : TInterface "Poppler" "StructureElement"
IO CUInt
structureElementGetRubyPosition ::
(MonadIO m, StructureElementK a) =>
a -> -- _obj
m StructureRubyPosition
structureElementGetRubyPosition _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- poppler_structure_element_get_ruby_position _obj'
let result' = (toEnum . fromIntegral) result
touchManagedPtr _obj
return result'
-- method StructureElement::get_space_after
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False
foreign import ccall "poppler_structure_element_get_space_after" poppler_structure_element_get_space_after ::
Ptr StructureElement -> -- _obj : TInterface "Poppler" "StructureElement"
IO CDouble
structureElementGetSpaceAfter ::
(MonadIO m, StructureElementK a) =>
a -> -- _obj
m Double
structureElementGetSpaceAfter _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- poppler_structure_element_get_space_after _obj'
let result' = realToFrac result
touchManagedPtr _obj
return result'
-- method StructureElement::get_space_before
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False
foreign import ccall "poppler_structure_element_get_space_before" poppler_structure_element_get_space_before ::
Ptr StructureElement -> -- _obj : TInterface "Poppler" "StructureElement"
IO CDouble
structureElementGetSpaceBefore ::
(MonadIO m, StructureElementK a) =>
a -> -- _obj
m Double
structureElementGetSpaceBefore _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- poppler_structure_element_get_space_before _obj'
let result' = realToFrac result
touchManagedPtr _obj
return result'
-- method StructureElement::get_start_indent
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False
foreign import ccall "poppler_structure_element_get_start_indent" poppler_structure_element_get_start_indent ::
Ptr StructureElement -> -- _obj : TInterface "Poppler" "StructureElement"
IO CDouble
structureElementGetStartIndent ::
(MonadIO m, StructureElementK a) =>
a -> -- _obj
m Double
structureElementGetStartIndent _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- poppler_structure_element_get_start_indent _obj'
let result' = realToFrac result
touchManagedPtr _obj
return result'
-- method StructureElement::get_table_border_style
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "border_styles", argType = TCArray False 4 (-1) (TInterface "Poppler" "StructureBorderStyle"), direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "poppler_structure_element_get_table_border_style" poppler_structure_element_get_table_border_style ::
Ptr StructureElement -> -- _obj : TInterface "Poppler" "StructureElement"
Ptr (Ptr CUInt) -> -- border_styles : TCArray False 4 (-1) (TInterface "Poppler" "StructureBorderStyle")
IO ()
structureElementGetTableBorderStyle ::
(MonadIO m, StructureElementK a) =>
a -> -- _obj
m ([StructureBorderStyle])
structureElementGetTableBorderStyle _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
border_styles <- allocMem :: IO (Ptr (Ptr CUInt))
poppler_structure_element_get_table_border_style _obj' border_styles
border_styles' <- peek border_styles
border_styles'' <- (unpackStorableArrayWithLength 4) border_styles'
let border_styles''' = map (toEnum . fromIntegral) border_styles''
freeMem border_styles'
touchManagedPtr _obj
freeMem border_styles
return border_styles'''
-- method StructureElement::get_table_column_span
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False
foreign import ccall "poppler_structure_element_get_table_column_span" poppler_structure_element_get_table_column_span ::
Ptr StructureElement -> -- _obj : TInterface "Poppler" "StructureElement"
IO Word32
structureElementGetTableColumnSpan ::
(MonadIO m, StructureElementK a) =>
a -> -- _obj
m Word32
structureElementGetTableColumnSpan _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- poppler_structure_element_get_table_column_span _obj'
touchManagedPtr _obj
return result
-- method StructureElement::get_table_headers
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TCArray True (-1) (-1) (TBasicType TUTF8)
-- throws : False
-- Skip return : False
foreign import ccall "poppler_structure_element_get_table_headers" poppler_structure_element_get_table_headers ::
Ptr StructureElement -> -- _obj : TInterface "Poppler" "StructureElement"
IO (Ptr CString)
structureElementGetTableHeaders ::
(MonadIO m, StructureElementK a) =>
a -> -- _obj
m [T.Text]
structureElementGetTableHeaders _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- poppler_structure_element_get_table_headers _obj'
checkUnexpectedReturnNULL "poppler_structure_element_get_table_headers" result
result' <- unpackZeroTerminatedUTF8CArray result
mapZeroTerminatedCArray freeMem result
freeMem result
touchManagedPtr _obj
return result'
-- method StructureElement::get_table_padding
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "paddings", argType = TCArray False 4 (-1) (TBasicType TDouble), direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "poppler_structure_element_get_table_padding" poppler_structure_element_get_table_padding ::
Ptr StructureElement -> -- _obj : TInterface "Poppler" "StructureElement"
Ptr (Ptr CDouble) -> -- paddings : TCArray False 4 (-1) (TBasicType TDouble)
IO ()
structureElementGetTablePadding ::
(MonadIO m, StructureElementK a) =>
a -> -- _obj
m ([Double])
structureElementGetTablePadding _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
paddings <- allocMem :: IO (Ptr (Ptr CDouble))
poppler_structure_element_get_table_padding _obj' paddings
paddings' <- peek paddings
paddings'' <- (unpackMapStorableArrayWithLength realToFrac 4) paddings'
freeMem paddings'
touchManagedPtr _obj
freeMem paddings
return paddings''
-- method StructureElement::get_table_row_span
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False
foreign import ccall "poppler_structure_element_get_table_row_span" poppler_structure_element_get_table_row_span ::
Ptr StructureElement -> -- _obj : TInterface "Poppler" "StructureElement"
IO Word32
structureElementGetTableRowSpan ::
(MonadIO m, StructureElementK a) =>
a -> -- _obj
m Word32
structureElementGetTableRowSpan _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- poppler_structure_element_get_table_row_span _obj'
touchManagedPtr _obj
return result
-- method StructureElement::get_table_scope
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Poppler" "StructureTableScope"
-- throws : False
-- Skip return : False
foreign import ccall "poppler_structure_element_get_table_scope" poppler_structure_element_get_table_scope ::
Ptr StructureElement -> -- _obj : TInterface "Poppler" "StructureElement"
IO CUInt
structureElementGetTableScope ::
(MonadIO m, StructureElementK a) =>
a -> -- _obj
m StructureTableScope
structureElementGetTableScope _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- poppler_structure_element_get_table_scope _obj'
let result' = (toEnum . fromIntegral) result
touchManagedPtr _obj
return result'
-- method StructureElement::get_table_summary
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "poppler_structure_element_get_table_summary" poppler_structure_element_get_table_summary ::
Ptr StructureElement -> -- _obj : TInterface "Poppler" "StructureElement"
IO CString
structureElementGetTableSummary ::
(MonadIO m, StructureElementK a) =>
a -> -- _obj
m T.Text
structureElementGetTableSummary _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- poppler_structure_element_get_table_summary _obj'
checkUnexpectedReturnNULL "poppler_structure_element_get_table_summary" result
result' <- cstringToText result
freeMem result
touchManagedPtr _obj
return result'
-- method StructureElement::get_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Poppler" "StructureGetTextFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Poppler" "StructureGetTextFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "poppler_structure_element_get_text" poppler_structure_element_get_text ::
Ptr StructureElement -> -- _obj : TInterface "Poppler" "StructureElement"
CUInt -> -- flags : TInterface "Poppler" "StructureGetTextFlags"
IO CString
structureElementGetText ::
(MonadIO m, StructureElementK a) =>
a -> -- _obj
[StructureGetTextFlags] -> -- flags
m T.Text
structureElementGetText _obj flags = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let flags' = gflagsToWord flags
result <- poppler_structure_element_get_text _obj' flags'
checkUnexpectedReturnNULL "poppler_structure_element_get_text" result
result' <- cstringToText result
freeMem result
touchManagedPtr _obj
return result'
-- method StructureElement::get_text_align
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Poppler" "StructureTextAlign"
-- throws : False
-- Skip return : False
foreign import ccall "poppler_structure_element_get_text_align" poppler_structure_element_get_text_align ::
Ptr StructureElement -> -- _obj : TInterface "Poppler" "StructureElement"
IO CUInt
structureElementGetTextAlign ::
(MonadIO m, StructureElementK a) =>
a -> -- _obj
m StructureTextAlign
structureElementGetTextAlign _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- poppler_structure_element_get_text_align _obj'
let result' = (toEnum . fromIntegral) result
touchManagedPtr _obj
return result'
-- method StructureElement::get_text_decoration_color
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color", argType = TInterface "Poppler" "Color", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False
foreign import ccall "poppler_structure_element_get_text_decoration_color" poppler_structure_element_get_text_decoration_color ::
Ptr StructureElement -> -- _obj : TInterface "Poppler" "StructureElement"
Ptr Color -> -- color : TInterface "Poppler" "Color"
IO CInt
structureElementGetTextDecorationColor ::
(MonadIO m, StructureElementK a) =>
a -> -- _obj
m (Bool,Color)
structureElementGetTextDecorationColor _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
color <- callocBoxedBytes 6 :: IO (Ptr Color)
result <- poppler_structure_element_get_text_decoration_color _obj' color
let result' = (/= 0) result
color' <- (wrapBoxed Color) color
touchManagedPtr _obj
return (result', color')
-- method StructureElement::get_text_decoration_thickness
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False
foreign import ccall "poppler_structure_element_get_text_decoration_thickness" poppler_structure_element_get_text_decoration_thickness ::
Ptr StructureElement -> -- _obj : TInterface "Poppler" "StructureElement"
IO CDouble
structureElementGetTextDecorationThickness ::
(MonadIO m, StructureElementK a) =>
a -> -- _obj
m Double
structureElementGetTextDecorationThickness _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- poppler_structure_element_get_text_decoration_thickness _obj'
let result' = realToFrac result
touchManagedPtr _obj
return result'
-- method StructureElement::get_text_decoration_type
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Poppler" "StructureTextDecoration"
-- throws : False
-- Skip return : False
foreign import ccall "poppler_structure_element_get_text_decoration_type" poppler_structure_element_get_text_decoration_type ::
Ptr StructureElement -> -- _obj : TInterface "Poppler" "StructureElement"
IO CUInt
structureElementGetTextDecorationType ::
(MonadIO m, StructureElementK a) =>
a -> -- _obj
m StructureTextDecoration
structureElementGetTextDecorationType _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- poppler_structure_element_get_text_decoration_type _obj'
let result' = (toEnum . fromIntegral) result
touchManagedPtr _obj
return result'
-- method StructureElement::get_text_indent
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False
foreign import ccall "poppler_structure_element_get_text_indent" poppler_structure_element_get_text_indent ::
Ptr StructureElement -> -- _obj : TInterface "Poppler" "StructureElement"
IO CDouble
structureElementGetTextIndent ::
(MonadIO m, StructureElementK a) =>
a -> -- _obj
m Double
structureElementGetTextIndent _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- poppler_structure_element_get_text_indent _obj'
let result' = realToFrac result
touchManagedPtr _obj
return result'
-- method StructureElement::get_text_spans
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_text_spans", argType = TBasicType TUInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : [Arg {argName = "n_text_spans", argType = TBasicType TUInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TCArray False (-1) 1 (TInterface "Poppler" "TextSpan")
-- throws : False
-- Skip return : False
foreign import ccall "poppler_structure_element_get_text_spans" poppler_structure_element_get_text_spans ::
Ptr StructureElement -> -- _obj : TInterface "Poppler" "StructureElement"
Ptr Word32 -> -- n_text_spans : TBasicType TUInt32
IO (Ptr (Ptr TextSpan))
structureElementGetTextSpans ::
(MonadIO m, StructureElementK a) =>
a -> -- _obj
m [TextSpan]
structureElementGetTextSpans _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
n_text_spans <- allocMem :: IO (Ptr Word32)
result <- poppler_structure_element_get_text_spans _obj' n_text_spans
n_text_spans' <- peek n_text_spans
checkUnexpectedReturnNULL "poppler_structure_element_get_text_spans" result
result' <- (unpackPtrArrayWithLength n_text_spans') result
result'' <- mapM (wrapBoxed TextSpan) result'
freeMem result
touchManagedPtr _obj
freeMem n_text_spans
return result''
-- method StructureElement::get_title
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "poppler_structure_element_get_title" poppler_structure_element_get_title ::
Ptr StructureElement -> -- _obj : TInterface "Poppler" "StructureElement"
IO CString
structureElementGetTitle ::
(MonadIO m, StructureElementK a) =>
a -> -- _obj
m T.Text
structureElementGetTitle _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- poppler_structure_element_get_title _obj'
checkUnexpectedReturnNULL "poppler_structure_element_get_title" result
result' <- cstringToText result
freeMem result
touchManagedPtr _obj
return result'
-- method StructureElement::get_width
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False
foreign import ccall "poppler_structure_element_get_width" poppler_structure_element_get_width ::
Ptr StructureElement -> -- _obj : TInterface "Poppler" "StructureElement"
IO CDouble
structureElementGetWidth ::
(MonadIO m, StructureElementK a) =>
a -> -- _obj
m Double
structureElementGetWidth _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- poppler_structure_element_get_width _obj'
let result' = realToFrac result
touchManagedPtr _obj
return result'
-- method StructureElement::get_writing_mode
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Poppler" "StructureWritingMode"
-- throws : False
-- Skip return : False
foreign import ccall "poppler_structure_element_get_writing_mode" poppler_structure_element_get_writing_mode ::
Ptr StructureElement -> -- _obj : TInterface "Poppler" "StructureElement"
IO CUInt
structureElementGetWritingMode ::
(MonadIO m, StructureElementK a) =>
a -> -- _obj
m StructureWritingMode
structureElementGetWritingMode _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- poppler_structure_element_get_writing_mode _obj'
let result' = (toEnum . fromIntegral) result
touchManagedPtr _obj
return result'
-- method StructureElement::is_block
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False
foreign import ccall "poppler_structure_element_is_block" poppler_structure_element_is_block ::
Ptr StructureElement -> -- _obj : TInterface "Poppler" "StructureElement"
IO CInt
structureElementIsBlock ::
(MonadIO m, StructureElementK a) =>
a -> -- _obj
m Bool
structureElementIsBlock _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- poppler_structure_element_is_block _obj'
let result' = (/= 0) result
touchManagedPtr _obj
return result'
-- method StructureElement::is_content
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False
foreign import ccall "poppler_structure_element_is_content" poppler_structure_element_is_content ::
Ptr StructureElement -> -- _obj : TInterface "Poppler" "StructureElement"
IO CInt
structureElementIsContent ::
(MonadIO m, StructureElementK a) =>
a -> -- _obj
m Bool
structureElementIsContent _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- poppler_structure_element_is_content _obj'
let result' = (/= 0) result
touchManagedPtr _obj
return result'
-- method StructureElement::is_grouping
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False
foreign import ccall "poppler_structure_element_is_grouping" poppler_structure_element_is_grouping ::
Ptr StructureElement -> -- _obj : TInterface "Poppler" "StructureElement"
IO CInt
structureElementIsGrouping ::
(MonadIO m, StructureElementK a) =>
a -> -- _obj
m Bool
structureElementIsGrouping _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- poppler_structure_element_is_grouping _obj'
let result' = (/= 0) result
touchManagedPtr _obj
return result'
-- method StructureElement::is_inline
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "StructureElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False
foreign import ccall "poppler_structure_element_is_inline" poppler_structure_element_is_inline ::
Ptr StructureElement -> -- _obj : TInterface "Poppler" "StructureElement"
IO CInt
structureElementIsInline ::
(MonadIO m, StructureElementK a) =>
a -> -- _obj
m Bool
structureElementIsInline _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- poppler_structure_element_is_inline _obj'
let result' = (/= 0) result
touchManagedPtr _obj
return result'