gi-poppler-0.18.17: GI/Poppler/Structs/PageTransition.hs
{- |
Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License : LGPL-2.1
Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)
A 'GI.Poppler.Structs.PageTransition.PageTransition' structures describes a visual transition
to use when moving between pages during a presentation
-}
#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.Poppler.Structs.PageTransition
(
-- * Exported types
PageTransition(..) ,
newZeroPageTransition ,
noPageTransition ,
-- * Methods
-- ** copy #method:copy#
#if ENABLE_OVERLOADING
PageTransitionCopyMethodInfo ,
#endif
pageTransitionCopy ,
-- ** free #method:free#
#if ENABLE_OVERLOADING
PageTransitionFreeMethodInfo ,
#endif
pageTransitionFree ,
-- ** new #method:new#
pageTransitionNew ,
-- * Properties
-- ** alignment #attr:alignment#
{- | the dimension in which the transition effect shall occur.
Only for @/POPPLER_PAGE_TRANSITION_SPLIT/@ and @/POPPLER_PAGE_TRANSITION_BLINDS/@ transition types
-}
getPageTransitionAlignment ,
#if ENABLE_OVERLOADING
pageTransition_alignment ,
#endif
setPageTransitionAlignment ,
-- ** angle #attr:angle#
{- | the direction in which the specified transition effect shall moves,
expressed in degrees counterclockwise starting from a left-to-right direction.
Only for @/POPPLER_PAGE_TRANSITION_WIPE/@, @/POPPLER_PAGE_TRANSITION_GLITTER/@, @/POPPLER_PAGE_TRANSITION_FLY/@,
@/POPPLER_PAGE_TRANSITION_COVER/@, @/POPPLER_PAGE_TRANSITION_UNCOVER/@ and @/POPPLER_PAGE_TRANSITION_PUSH/@
transition types
-}
getPageTransitionAngle ,
#if ENABLE_OVERLOADING
pageTransition_angle ,
#endif
setPageTransitionAngle ,
-- ** direction #attr:direction#
{- | the direction of motion for the transition effect.
Only for @/POPPLER_PAGE_TRANSITION_SPLIT/@, @/POPPLER_PAGE_TRANSITION_BOX/@ and @/POPPLER_PAGE_TRANSITION_FLY/@
transition types
-}
getPageTransitionDirection ,
#if ENABLE_OVERLOADING
pageTransition_direction ,
#endif
setPageTransitionDirection ,
-- ** duration #attr:duration#
{- | the duration of the transition effect
-}
getPageTransitionDuration ,
#if ENABLE_OVERLOADING
pageTransition_duration ,
#endif
setPageTransitionDuration ,
-- ** durationReal #attr:durationReal#
{- | /No description available in the introspection data./
-}
getPageTransitionDurationReal ,
#if ENABLE_OVERLOADING
pageTransition_durationReal ,
#endif
setPageTransitionDurationReal ,
-- ** rectangular #attr:rectangular#
{- | whether the area that will be flown is rectangular and opaque.
Only for @/POPPLER_PAGE_TRANSITION_FLY/@ transition type
-}
getPageTransitionRectangular ,
#if ENABLE_OVERLOADING
pageTransition_rectangular ,
#endif
setPageTransitionRectangular ,
-- ** scale #attr:scale#
{- | the starting or ending scale at which the changes shall be drawn.
Only for @/POPPLER_PAGE_TRANSITION_FLY/@ transition type
-}
getPageTransitionScale ,
#if ENABLE_OVERLOADING
pageTransition_scale ,
#endif
setPageTransitionScale ,
-- ** type #attr:type#
{- | the type of transtition
-}
getPageTransitionType ,
#if ENABLE_OVERLOADING
pageTransition_type ,
#endif
setPageTransitionType ,
) 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.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.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 {-# SOURCE #-} qualified GI.Poppler.Enums as Poppler.Enums
-- | Memory-managed wrapper type.
newtype PageTransition = PageTransition (ManagedPtr PageTransition)
foreign import ccall "poppler_page_transition_get_type" c_poppler_page_transition_get_type ::
IO GType
instance BoxedObject PageTransition where
boxedType _ = c_poppler_page_transition_get_type
-- | Construct a `PageTransition` struct initialized to zero.
newZeroPageTransition :: MonadIO m => m PageTransition
newZeroPageTransition = liftIO $ callocBoxedBytes 48 >>= wrapBoxed PageTransition
instance tag ~ 'AttrSet => Constructible PageTransition tag where
new _ attrs = do
o <- newZeroPageTransition
GI.Attributes.set o attrs
return o
-- | A convenience alias for `Nothing` :: `Maybe` `PageTransition`.
noPageTransition :: Maybe PageTransition
noPageTransition = Nothing
{- |
Get the value of the “@type@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.get' pageTransition #type
@
-}
getPageTransitionType :: MonadIO m => PageTransition -> m Poppler.Enums.PageTransitionType
getPageTransitionType s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 0) :: IO CUInt
let val' = (toEnum . fromIntegral) val
return val'
{- |
Set the value of the “@type@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.set' pageTransition [ #type 'Data.GI.Base.Attributes.:=' value ]
@
-}
setPageTransitionType :: MonadIO m => PageTransition -> Poppler.Enums.PageTransitionType -> m ()
setPageTransitionType s val = liftIO $ withManagedPtr s $ \ptr -> do
let val' = (fromIntegral . fromEnum) val
poke (ptr `plusPtr` 0) (val' :: CUInt)
#if ENABLE_OVERLOADING
data PageTransitionTypeFieldInfo
instance AttrInfo PageTransitionTypeFieldInfo where
type AttrAllowedOps PageTransitionTypeFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint PageTransitionTypeFieldInfo = (~) Poppler.Enums.PageTransitionType
type AttrBaseTypeConstraint PageTransitionTypeFieldInfo = (~) PageTransition
type AttrGetType PageTransitionTypeFieldInfo = Poppler.Enums.PageTransitionType
type AttrLabel PageTransitionTypeFieldInfo = "type"
type AttrOrigin PageTransitionTypeFieldInfo = PageTransition
attrGet _ = getPageTransitionType
attrSet _ = setPageTransitionType
attrConstruct = undefined
attrClear _ = undefined
pageTransition_type :: AttrLabelProxy "type"
pageTransition_type = AttrLabelProxy
#endif
{- |
Get the value of the “@alignment@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.get' pageTransition #alignment
@
-}
getPageTransitionAlignment :: MonadIO m => PageTransition -> m Poppler.Enums.PageTransitionAlignment
getPageTransitionAlignment s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 4) :: IO CUInt
let val' = (toEnum . fromIntegral) val
return val'
{- |
Set the value of the “@alignment@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.set' pageTransition [ #alignment 'Data.GI.Base.Attributes.:=' value ]
@
-}
setPageTransitionAlignment :: MonadIO m => PageTransition -> Poppler.Enums.PageTransitionAlignment -> m ()
setPageTransitionAlignment s val = liftIO $ withManagedPtr s $ \ptr -> do
let val' = (fromIntegral . fromEnum) val
poke (ptr `plusPtr` 4) (val' :: CUInt)
#if ENABLE_OVERLOADING
data PageTransitionAlignmentFieldInfo
instance AttrInfo PageTransitionAlignmentFieldInfo where
type AttrAllowedOps PageTransitionAlignmentFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint PageTransitionAlignmentFieldInfo = (~) Poppler.Enums.PageTransitionAlignment
type AttrBaseTypeConstraint PageTransitionAlignmentFieldInfo = (~) PageTransition
type AttrGetType PageTransitionAlignmentFieldInfo = Poppler.Enums.PageTransitionAlignment
type AttrLabel PageTransitionAlignmentFieldInfo = "alignment"
type AttrOrigin PageTransitionAlignmentFieldInfo = PageTransition
attrGet _ = getPageTransitionAlignment
attrSet _ = setPageTransitionAlignment
attrConstruct = undefined
attrClear _ = undefined
pageTransition_alignment :: AttrLabelProxy "alignment"
pageTransition_alignment = AttrLabelProxy
#endif
{- |
Get the value of the “@direction@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.get' pageTransition #direction
@
-}
getPageTransitionDirection :: MonadIO m => PageTransition -> m Poppler.Enums.PageTransitionDirection
getPageTransitionDirection s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 8) :: IO CUInt
let val' = (toEnum . fromIntegral) val
return val'
{- |
Set the value of the “@direction@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.set' pageTransition [ #direction 'Data.GI.Base.Attributes.:=' value ]
@
-}
setPageTransitionDirection :: MonadIO m => PageTransition -> Poppler.Enums.PageTransitionDirection -> m ()
setPageTransitionDirection s val = liftIO $ withManagedPtr s $ \ptr -> do
let val' = (fromIntegral . fromEnum) val
poke (ptr `plusPtr` 8) (val' :: CUInt)
#if ENABLE_OVERLOADING
data PageTransitionDirectionFieldInfo
instance AttrInfo PageTransitionDirectionFieldInfo where
type AttrAllowedOps PageTransitionDirectionFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint PageTransitionDirectionFieldInfo = (~) Poppler.Enums.PageTransitionDirection
type AttrBaseTypeConstraint PageTransitionDirectionFieldInfo = (~) PageTransition
type AttrGetType PageTransitionDirectionFieldInfo = Poppler.Enums.PageTransitionDirection
type AttrLabel PageTransitionDirectionFieldInfo = "direction"
type AttrOrigin PageTransitionDirectionFieldInfo = PageTransition
attrGet _ = getPageTransitionDirection
attrSet _ = setPageTransitionDirection
attrConstruct = undefined
attrClear _ = undefined
pageTransition_direction :: AttrLabelProxy "direction"
pageTransition_direction = AttrLabelProxy
#endif
{- |
Get the value of the “@duration@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.get' pageTransition #duration
@
-}
getPageTransitionDuration :: MonadIO m => PageTransition -> m Int32
getPageTransitionDuration s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 12) :: IO Int32
return val
{- |
Set the value of the “@duration@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.set' pageTransition [ #duration 'Data.GI.Base.Attributes.:=' value ]
@
-}
setPageTransitionDuration :: MonadIO m => PageTransition -> Int32 -> m ()
setPageTransitionDuration s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 12) (val :: Int32)
#if ENABLE_OVERLOADING
data PageTransitionDurationFieldInfo
instance AttrInfo PageTransitionDurationFieldInfo where
type AttrAllowedOps PageTransitionDurationFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint PageTransitionDurationFieldInfo = (~) Int32
type AttrBaseTypeConstraint PageTransitionDurationFieldInfo = (~) PageTransition
type AttrGetType PageTransitionDurationFieldInfo = Int32
type AttrLabel PageTransitionDurationFieldInfo = "duration"
type AttrOrigin PageTransitionDurationFieldInfo = PageTransition
attrGet _ = getPageTransitionDuration
attrSet _ = setPageTransitionDuration
attrConstruct = undefined
attrClear _ = undefined
pageTransition_duration :: AttrLabelProxy "duration"
pageTransition_duration = AttrLabelProxy
#endif
{- |
Get the value of the “@angle@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.get' pageTransition #angle
@
-}
getPageTransitionAngle :: MonadIO m => PageTransition -> m Int32
getPageTransitionAngle s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 16) :: IO Int32
return val
{- |
Set the value of the “@angle@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.set' pageTransition [ #angle 'Data.GI.Base.Attributes.:=' value ]
@
-}
setPageTransitionAngle :: MonadIO m => PageTransition -> Int32 -> m ()
setPageTransitionAngle s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 16) (val :: Int32)
#if ENABLE_OVERLOADING
data PageTransitionAngleFieldInfo
instance AttrInfo PageTransitionAngleFieldInfo where
type AttrAllowedOps PageTransitionAngleFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint PageTransitionAngleFieldInfo = (~) Int32
type AttrBaseTypeConstraint PageTransitionAngleFieldInfo = (~) PageTransition
type AttrGetType PageTransitionAngleFieldInfo = Int32
type AttrLabel PageTransitionAngleFieldInfo = "angle"
type AttrOrigin PageTransitionAngleFieldInfo = PageTransition
attrGet _ = getPageTransitionAngle
attrSet _ = setPageTransitionAngle
attrConstruct = undefined
attrClear _ = undefined
pageTransition_angle :: AttrLabelProxy "angle"
pageTransition_angle = AttrLabelProxy
#endif
{- |
Get the value of the “@scale@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.get' pageTransition #scale
@
-}
getPageTransitionScale :: MonadIO m => PageTransition -> m Double
getPageTransitionScale s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 24) :: IO CDouble
let val' = realToFrac val
return val'
{- |
Set the value of the “@scale@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.set' pageTransition [ #scale 'Data.GI.Base.Attributes.:=' value ]
@
-}
setPageTransitionScale :: MonadIO m => PageTransition -> Double -> m ()
setPageTransitionScale s val = liftIO $ withManagedPtr s $ \ptr -> do
let val' = realToFrac val
poke (ptr `plusPtr` 24) (val' :: CDouble)
#if ENABLE_OVERLOADING
data PageTransitionScaleFieldInfo
instance AttrInfo PageTransitionScaleFieldInfo where
type AttrAllowedOps PageTransitionScaleFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint PageTransitionScaleFieldInfo = (~) Double
type AttrBaseTypeConstraint PageTransitionScaleFieldInfo = (~) PageTransition
type AttrGetType PageTransitionScaleFieldInfo = Double
type AttrLabel PageTransitionScaleFieldInfo = "scale"
type AttrOrigin PageTransitionScaleFieldInfo = PageTransition
attrGet _ = getPageTransitionScale
attrSet _ = setPageTransitionScale
attrConstruct = undefined
attrClear _ = undefined
pageTransition_scale :: AttrLabelProxy "scale"
pageTransition_scale = AttrLabelProxy
#endif
{- |
Get the value of the “@rectangular@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.get' pageTransition #rectangular
@
-}
getPageTransitionRectangular :: MonadIO m => PageTransition -> m Bool
getPageTransitionRectangular s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 32) :: IO CInt
let val' = (/= 0) val
return val'
{- |
Set the value of the “@rectangular@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.set' pageTransition [ #rectangular 'Data.GI.Base.Attributes.:=' value ]
@
-}
setPageTransitionRectangular :: MonadIO m => PageTransition -> Bool -> m ()
setPageTransitionRectangular s val = liftIO $ withManagedPtr s $ \ptr -> do
let val' = (fromIntegral . fromEnum) val
poke (ptr `plusPtr` 32) (val' :: CInt)
#if ENABLE_OVERLOADING
data PageTransitionRectangularFieldInfo
instance AttrInfo PageTransitionRectangularFieldInfo where
type AttrAllowedOps PageTransitionRectangularFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint PageTransitionRectangularFieldInfo = (~) Bool
type AttrBaseTypeConstraint PageTransitionRectangularFieldInfo = (~) PageTransition
type AttrGetType PageTransitionRectangularFieldInfo = Bool
type AttrLabel PageTransitionRectangularFieldInfo = "rectangular"
type AttrOrigin PageTransitionRectangularFieldInfo = PageTransition
attrGet _ = getPageTransitionRectangular
attrSet _ = setPageTransitionRectangular
attrConstruct = undefined
attrClear _ = undefined
pageTransition_rectangular :: AttrLabelProxy "rectangular"
pageTransition_rectangular = AttrLabelProxy
#endif
{- |
Get the value of the “@duration_real@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.get' pageTransition #durationReal
@
-}
getPageTransitionDurationReal :: MonadIO m => PageTransition -> m Double
getPageTransitionDurationReal s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 40) :: IO CDouble
let val' = realToFrac val
return val'
{- |
Set the value of the “@duration_real@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.set' pageTransition [ #durationReal 'Data.GI.Base.Attributes.:=' value ]
@
-}
setPageTransitionDurationReal :: MonadIO m => PageTransition -> Double -> m ()
setPageTransitionDurationReal s val = liftIO $ withManagedPtr s $ \ptr -> do
let val' = realToFrac val
poke (ptr `plusPtr` 40) (val' :: CDouble)
#if ENABLE_OVERLOADING
data PageTransitionDurationRealFieldInfo
instance AttrInfo PageTransitionDurationRealFieldInfo where
type AttrAllowedOps PageTransitionDurationRealFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint PageTransitionDurationRealFieldInfo = (~) Double
type AttrBaseTypeConstraint PageTransitionDurationRealFieldInfo = (~) PageTransition
type AttrGetType PageTransitionDurationRealFieldInfo = Double
type AttrLabel PageTransitionDurationRealFieldInfo = "duration_real"
type AttrOrigin PageTransitionDurationRealFieldInfo = PageTransition
attrGet _ = getPageTransitionDurationReal
attrSet _ = setPageTransitionDurationReal
attrConstruct = undefined
attrClear _ = undefined
pageTransition_durationReal :: AttrLabelProxy "durationReal"
pageTransition_durationReal = AttrLabelProxy
#endif
#if ENABLE_OVERLOADING
instance O.HasAttributeList PageTransition
type instance O.AttributeList PageTransition = PageTransitionAttributeList
type PageTransitionAttributeList = ('[ '("type", PageTransitionTypeFieldInfo), '("alignment", PageTransitionAlignmentFieldInfo), '("direction", PageTransitionDirectionFieldInfo), '("duration", PageTransitionDurationFieldInfo), '("angle", PageTransitionAngleFieldInfo), '("scale", PageTransitionScaleFieldInfo), '("rectangular", PageTransitionRectangularFieldInfo), '("durationReal", PageTransitionDurationRealFieldInfo)] :: [(Symbol, *)])
#endif
-- method PageTransition::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "Poppler", name = "PageTransition"}))
-- throws : False
-- Skip return : False
foreign import ccall "poppler_page_transition_new" poppler_page_transition_new ::
IO (Ptr PageTransition)
{- |
Creates a new 'GI.Poppler.Structs.PageTransition.PageTransition'
-}
pageTransitionNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
m PageTransition
{- ^ __Returns:__ a new 'GI.Poppler.Structs.PageTransition.PageTransition', use 'GI.Poppler.Structs.PageTransition.pageTransitionFree' to free it -}
pageTransitionNew = liftIO $ do
result <- poppler_page_transition_new
checkUnexpectedReturnNULL "pageTransitionNew" result
result' <- (wrapBoxed PageTransition) result
return result'
#if ENABLE_OVERLOADING
#endif
-- method PageTransition::copy
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "transition", argType = TInterface (Name {namespace = "Poppler", name = "PageTransition"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PopplerPageTransition to copy", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "Poppler", name = "PageTransition"}))
-- throws : False
-- Skip return : False
foreign import ccall "poppler_page_transition_copy" poppler_page_transition_copy ::
Ptr PageTransition -> -- transition : TInterface (Name {namespace = "Poppler", name = "PageTransition"})
IO (Ptr PageTransition)
{- |
Creates a copy of /@transition@/
-}
pageTransitionCopy ::
(B.CallStack.HasCallStack, MonadIO m) =>
PageTransition
{- ^ /@transition@/: a 'GI.Poppler.Structs.PageTransition.PageTransition' to copy -}
-> m PageTransition
{- ^ __Returns:__ a new allocated copy of /@transition@/ -}
pageTransitionCopy transition = liftIO $ do
transition' <- unsafeManagedPtrGetPtr transition
result <- poppler_page_transition_copy transition'
checkUnexpectedReturnNULL "pageTransitionCopy" result
result' <- (wrapBoxed PageTransition) result
touchManagedPtr transition
return result'
#if ENABLE_OVERLOADING
data PageTransitionCopyMethodInfo
instance (signature ~ (m PageTransition), MonadIO m) => O.MethodInfo PageTransitionCopyMethodInfo PageTransition signature where
overloadedMethod _ = pageTransitionCopy
#endif
-- method PageTransition::free
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "transition", argType = TInterface (Name {namespace = "Poppler", name = "PageTransition"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PopplerPageTransition", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False
foreign import ccall "poppler_page_transition_free" poppler_page_transition_free ::
Ptr PageTransition -> -- transition : TInterface (Name {namespace = "Poppler", name = "PageTransition"})
IO ()
{- |
Frees the given 'GI.Poppler.Structs.PageTransition.PageTransition'
-}
pageTransitionFree ::
(B.CallStack.HasCallStack, MonadIO m) =>
PageTransition
{- ^ /@transition@/: a 'GI.Poppler.Structs.PageTransition.PageTransition' -}
-> m ()
pageTransitionFree transition = liftIO $ do
transition' <- unsafeManagedPtrGetPtr transition
poppler_page_transition_free transition'
touchManagedPtr transition
return ()
#if ENABLE_OVERLOADING
data PageTransitionFreeMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.MethodInfo PageTransitionFreeMethodInfo PageTransition signature where
overloadedMethod _ = pageTransitionFree
#endif
#if ENABLE_OVERLOADING
type family ResolvePageTransitionMethod (t :: Symbol) (o :: *) :: * where
ResolvePageTransitionMethod "copy" o = PageTransitionCopyMethodInfo
ResolvePageTransitionMethod "free" o = PageTransitionFreeMethodInfo
ResolvePageTransitionMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolvePageTransitionMethod t PageTransition, O.MethodInfo info PageTransition p) => OL.IsLabel t (PageTransition -> 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