{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson and Iñaki García Etxebarria
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- /No description available in the introspection data./

#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif

module GI.Poppler.Objects.AnnotFreeText
    ( 

-- * Exported types
    AnnotFreeText(..)                       ,
    IsAnnotFreeText                         ,
    toAnnotFreeText                         ,


 -- * Methods
-- | 
-- 
--  === __Click to display all available methods, including inherited ones__
-- ==== Methods
-- [bindProperty]("GI.GObject.Objects.Object#g:method:bindProperty"), [bindPropertyFull]("GI.GObject.Objects.Object#g:method:bindPropertyFull"), [forceFloating]("GI.GObject.Objects.Object#g:method:forceFloating"), [freezeNotify]("GI.GObject.Objects.Object#g:method:freezeNotify"), [getv]("GI.GObject.Objects.Object#g:method:getv"), [hasPopup]("GI.Poppler.Objects.AnnotMarkup#g:method:hasPopup"), [isFloating]("GI.GObject.Objects.Object#g:method:isFloating"), [notify]("GI.GObject.Objects.Object#g:method:notify"), [notifyByPspec]("GI.GObject.Objects.Object#g:method:notifyByPspec"), [ref]("GI.GObject.Objects.Object#g:method:ref"), [refSink]("GI.GObject.Objects.Object#g:method:refSink"), [runDispose]("GI.GObject.Objects.Object#g:method:runDispose"), [stealData]("GI.GObject.Objects.Object#g:method:stealData"), [stealQdata]("GI.GObject.Objects.Object#g:method:stealQdata"), [thawNotify]("GI.GObject.Objects.Object#g:method:thawNotify"), [unref]("GI.GObject.Objects.Object#g:method:unref"), [watchClosure]("GI.GObject.Objects.Object#g:method:watchClosure").
-- 
-- ==== Getters
-- [getAnnotType]("GI.Poppler.Objects.Annot#g:method:getAnnotType"), [getCalloutLine]("GI.Poppler.Objects.AnnotFreeText#g:method:getCalloutLine"), [getColor]("GI.Poppler.Objects.Annot#g:method:getColor"), [getContents]("GI.Poppler.Objects.Annot#g:method:getContents"), [getData]("GI.GObject.Objects.Object#g:method:getData"), [getDate]("GI.Poppler.Objects.AnnotMarkup#g:method:getDate"), [getExternalData]("GI.Poppler.Objects.AnnotMarkup#g:method:getExternalData"), [getFlags]("GI.Poppler.Objects.Annot#g:method:getFlags"), [getLabel]("GI.Poppler.Objects.AnnotMarkup#g:method:getLabel"), [getModified]("GI.Poppler.Objects.Annot#g:method:getModified"), [getName]("GI.Poppler.Objects.Annot#g:method:getName"), [getOpacity]("GI.Poppler.Objects.AnnotMarkup#g:method:getOpacity"), [getPageIndex]("GI.Poppler.Objects.Annot#g:method:getPageIndex"), [getPopupIsOpen]("GI.Poppler.Objects.AnnotMarkup#g:method:getPopupIsOpen"), [getPopupRectangle]("GI.Poppler.Objects.AnnotMarkup#g:method:getPopupRectangle"), [getProperty]("GI.GObject.Objects.Object#g:method:getProperty"), [getQdata]("GI.GObject.Objects.Object#g:method:getQdata"), [getQuadding]("GI.Poppler.Objects.AnnotFreeText#g:method:getQuadding"), [getRectangle]("GI.Poppler.Objects.Annot#g:method:getRectangle"), [getReplyTo]("GI.Poppler.Objects.AnnotMarkup#g:method:getReplyTo"), [getSubject]("GI.Poppler.Objects.AnnotMarkup#g:method:getSubject").
-- 
-- ==== Setters
-- [setColor]("GI.Poppler.Objects.Annot#g:method:setColor"), [setContents]("GI.Poppler.Objects.Annot#g:method:setContents"), [setData]("GI.GObject.Objects.Object#g:method:setData"), [setDataFull]("GI.GObject.Objects.Object#g:method:setDataFull"), [setFlags]("GI.Poppler.Objects.Annot#g:method:setFlags"), [setLabel]("GI.Poppler.Objects.AnnotMarkup#g:method:setLabel"), [setOpacity]("GI.Poppler.Objects.AnnotMarkup#g:method:setOpacity"), [setPopup]("GI.Poppler.Objects.AnnotMarkup#g:method:setPopup"), [setPopupIsOpen]("GI.Poppler.Objects.AnnotMarkup#g:method:setPopupIsOpen"), [setPopupRectangle]("GI.Poppler.Objects.AnnotMarkup#g:method:setPopupRectangle"), [setProperty]("GI.GObject.Objects.Object#g:method:setProperty"), [setRectangle]("GI.Poppler.Objects.Annot#g:method:setRectangle").

#if defined(ENABLE_OVERLOADING)
    ResolveAnnotFreeTextMethod              ,
#endif

-- ** getCalloutLine #method:getCalloutLine#

#if defined(ENABLE_OVERLOADING)
    AnnotFreeTextGetCalloutLineMethodInfo   ,
#endif
    annotFreeTextGetCalloutLine             ,


-- ** getQuadding #method:getQuadding#

#if defined(ENABLE_OVERLOADING)
    AnnotFreeTextGetQuaddingMethodInfo      ,
#endif
    annotFreeTextGetQuadding                ,




    ) where

import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P

import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R

import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Poppler.Enums as Poppler.Enums
import {-# SOURCE #-} qualified GI.Poppler.Objects.Annot as Poppler.Annot
import {-# SOURCE #-} qualified GI.Poppler.Objects.AnnotMarkup as Poppler.AnnotMarkup
import {-# SOURCE #-} qualified GI.Poppler.Structs.AnnotCalloutLine as Poppler.AnnotCalloutLine

-- | Memory-managed wrapper type.
newtype AnnotFreeText = AnnotFreeText (SP.ManagedPtr AnnotFreeText)
    deriving (AnnotFreeText -> AnnotFreeText -> Bool
(AnnotFreeText -> AnnotFreeText -> Bool)
-> (AnnotFreeText -> AnnotFreeText -> Bool) -> Eq AnnotFreeText
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AnnotFreeText -> AnnotFreeText -> Bool
== :: AnnotFreeText -> AnnotFreeText -> Bool
$c/= :: AnnotFreeText -> AnnotFreeText -> Bool
/= :: AnnotFreeText -> AnnotFreeText -> Bool
Eq)

instance SP.ManagedPtrNewtype AnnotFreeText where
    toManagedPtr :: AnnotFreeText -> ManagedPtr AnnotFreeText
toManagedPtr (AnnotFreeText ManagedPtr AnnotFreeText
p) = ManagedPtr AnnotFreeText
p

foreign import ccall "poppler_annot_free_text_get_type"
    c_poppler_annot_free_text_get_type :: IO B.Types.GType

instance B.Types.TypedObject AnnotFreeText where
    glibType :: IO GType
glibType = IO GType
c_poppler_annot_free_text_get_type

instance B.Types.GObject AnnotFreeText

-- | Type class for types which can be safely cast to `AnnotFreeText`, for instance with `toAnnotFreeText`.
class (SP.GObject o, O.IsDescendantOf AnnotFreeText o) => IsAnnotFreeText o
instance (SP.GObject o, O.IsDescendantOf AnnotFreeText o) => IsAnnotFreeText o

instance O.HasParentTypes AnnotFreeText
type instance O.ParentTypes AnnotFreeText = '[Poppler.AnnotMarkup.AnnotMarkup, Poppler.Annot.Annot, GObject.Object.Object]

-- | Cast to `AnnotFreeText`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.
toAnnotFreeText :: (MIO.MonadIO m, IsAnnotFreeText o) => o -> m AnnotFreeText
toAnnotFreeText :: forall (m :: * -> *) o.
(MonadIO m, IsAnnotFreeText o) =>
o -> m AnnotFreeText
toAnnotFreeText = IO AnnotFreeText -> m AnnotFreeText
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO AnnotFreeText -> m AnnotFreeText)
-> (o -> IO AnnotFreeText) -> o -> m AnnotFreeText
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr AnnotFreeText -> AnnotFreeText)
-> o -> IO AnnotFreeText
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
 ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr AnnotFreeText -> AnnotFreeText
AnnotFreeText

-- | Convert 'AnnotFreeText' to and from 'Data.GI.Base.GValue.GValue'. See 'Data.GI.Base.GValue.toGValue' and 'Data.GI.Base.GValue.fromGValue'.
instance B.GValue.IsGValue (Maybe AnnotFreeText) where
    gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_poppler_annot_free_text_get_type
    gvalueSet_ :: Ptr GValue -> Maybe AnnotFreeText -> IO ()
gvalueSet_ Ptr GValue
gv Maybe AnnotFreeText
P.Nothing = Ptr GValue -> Ptr AnnotFreeText -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr AnnotFreeText
forall a. Ptr a
FP.nullPtr :: FP.Ptr AnnotFreeText)
    gvalueSet_ Ptr GValue
gv (P.Just AnnotFreeText
obj) = AnnotFreeText -> (Ptr AnnotFreeText -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr AnnotFreeText
obj (Ptr GValue -> Ptr AnnotFreeText -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
    gvalueGet_ :: Ptr GValue -> IO (Maybe AnnotFreeText)
gvalueGet_ Ptr GValue
gv = do
        Ptr AnnotFreeText
ptr <- Ptr GValue -> IO (Ptr AnnotFreeText)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr AnnotFreeText)
        if Ptr AnnotFreeText
ptr Ptr AnnotFreeText -> Ptr AnnotFreeText -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr AnnotFreeText
forall a. Ptr a
FP.nullPtr
        then AnnotFreeText -> Maybe AnnotFreeText
forall a. a -> Maybe a
P.Just (AnnotFreeText -> Maybe AnnotFreeText)
-> IO AnnotFreeText -> IO (Maybe AnnotFreeText)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr AnnotFreeText -> AnnotFreeText)
-> Ptr AnnotFreeText -> IO AnnotFreeText
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr AnnotFreeText -> AnnotFreeText
AnnotFreeText Ptr AnnotFreeText
ptr
        else Maybe AnnotFreeText -> IO (Maybe AnnotFreeText)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe AnnotFreeText
forall a. Maybe a
P.Nothing
        
    

#if defined(ENABLE_OVERLOADING)
type family ResolveAnnotFreeTextMethod (t :: Symbol) (o :: *) :: * where
    ResolveAnnotFreeTextMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveAnnotFreeTextMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveAnnotFreeTextMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveAnnotFreeTextMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveAnnotFreeTextMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveAnnotFreeTextMethod "hasPopup" o = Poppler.AnnotMarkup.AnnotMarkupHasPopupMethodInfo
    ResolveAnnotFreeTextMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveAnnotFreeTextMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveAnnotFreeTextMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveAnnotFreeTextMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveAnnotFreeTextMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveAnnotFreeTextMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveAnnotFreeTextMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveAnnotFreeTextMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveAnnotFreeTextMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveAnnotFreeTextMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveAnnotFreeTextMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveAnnotFreeTextMethod "getAnnotType" o = Poppler.Annot.AnnotGetAnnotTypeMethodInfo
    ResolveAnnotFreeTextMethod "getCalloutLine" o = AnnotFreeTextGetCalloutLineMethodInfo
    ResolveAnnotFreeTextMethod "getColor" o = Poppler.Annot.AnnotGetColorMethodInfo
    ResolveAnnotFreeTextMethod "getContents" o = Poppler.Annot.AnnotGetContentsMethodInfo
    ResolveAnnotFreeTextMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveAnnotFreeTextMethod "getDate" o = Poppler.AnnotMarkup.AnnotMarkupGetDateMethodInfo
    ResolveAnnotFreeTextMethod "getExternalData" o = Poppler.AnnotMarkup.AnnotMarkupGetExternalDataMethodInfo
    ResolveAnnotFreeTextMethod "getFlags" o = Poppler.Annot.AnnotGetFlagsMethodInfo
    ResolveAnnotFreeTextMethod "getLabel" o = Poppler.AnnotMarkup.AnnotMarkupGetLabelMethodInfo
    ResolveAnnotFreeTextMethod "getModified" o = Poppler.Annot.AnnotGetModifiedMethodInfo
    ResolveAnnotFreeTextMethod "getName" o = Poppler.Annot.AnnotGetNameMethodInfo
    ResolveAnnotFreeTextMethod "getOpacity" o = Poppler.AnnotMarkup.AnnotMarkupGetOpacityMethodInfo
    ResolveAnnotFreeTextMethod "getPageIndex" o = Poppler.Annot.AnnotGetPageIndexMethodInfo
    ResolveAnnotFreeTextMethod "getPopupIsOpen" o = Poppler.AnnotMarkup.AnnotMarkupGetPopupIsOpenMethodInfo
    ResolveAnnotFreeTextMethod "getPopupRectangle" o = Poppler.AnnotMarkup.AnnotMarkupGetPopupRectangleMethodInfo
    ResolveAnnotFreeTextMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveAnnotFreeTextMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveAnnotFreeTextMethod "getQuadding" o = AnnotFreeTextGetQuaddingMethodInfo
    ResolveAnnotFreeTextMethod "getRectangle" o = Poppler.Annot.AnnotGetRectangleMethodInfo
    ResolveAnnotFreeTextMethod "getReplyTo" o = Poppler.AnnotMarkup.AnnotMarkupGetReplyToMethodInfo
    ResolveAnnotFreeTextMethod "getSubject" o = Poppler.AnnotMarkup.AnnotMarkupGetSubjectMethodInfo
    ResolveAnnotFreeTextMethod "setColor" o = Poppler.Annot.AnnotSetColorMethodInfo
    ResolveAnnotFreeTextMethod "setContents" o = Poppler.Annot.AnnotSetContentsMethodInfo
    ResolveAnnotFreeTextMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveAnnotFreeTextMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    ResolveAnnotFreeTextMethod "setFlags" o = Poppler.Annot.AnnotSetFlagsMethodInfo
    ResolveAnnotFreeTextMethod "setLabel" o = Poppler.AnnotMarkup.AnnotMarkupSetLabelMethodInfo
    ResolveAnnotFreeTextMethod "setOpacity" o = Poppler.AnnotMarkup.AnnotMarkupSetOpacityMethodInfo
    ResolveAnnotFreeTextMethod "setPopup" o = Poppler.AnnotMarkup.AnnotMarkupSetPopupMethodInfo
    ResolveAnnotFreeTextMethod "setPopupIsOpen" o = Poppler.AnnotMarkup.AnnotMarkupSetPopupIsOpenMethodInfo
    ResolveAnnotFreeTextMethod "setPopupRectangle" o = Poppler.AnnotMarkup.AnnotMarkupSetPopupRectangleMethodInfo
    ResolveAnnotFreeTextMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveAnnotFreeTextMethod "setRectangle" o = Poppler.Annot.AnnotSetRectangleMethodInfo
    ResolveAnnotFreeTextMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveAnnotFreeTextMethod t AnnotFreeText, O.OverloadedMethod info AnnotFreeText p) => OL.IsLabel t (AnnotFreeText -> p) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.overloadedMethod @info
#else
    fromLabel _ = O.overloadedMethod @info
#endif

#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveAnnotFreeTextMethod t AnnotFreeText, O.OverloadedMethod info AnnotFreeText p, R.HasField t AnnotFreeText p) => R.HasField t AnnotFreeText p where
    getField = O.overloadedMethod @info

#endif

instance (info ~ ResolveAnnotFreeTextMethod t AnnotFreeText, O.OverloadedMethodInfo info AnnotFreeText) => OL.IsLabel t (O.MethodProxy info AnnotFreeText) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.MethodProxy
#else
    fromLabel _ = O.MethodProxy
#endif

#endif

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList AnnotFreeText
type instance O.AttributeList AnnotFreeText = AnnotFreeTextAttributeList
type AnnotFreeTextAttributeList = ('[ ] :: [(Symbol, *)])
#endif

#if defined(ENABLE_OVERLOADING)
#endif

#if defined(ENABLE_OVERLOADING)
type instance O.SignalList AnnotFreeText = AnnotFreeTextSignalList
type AnnotFreeTextSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])

#endif

-- method AnnotFreeText::get_callout_line
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "poppler_annot"
--           , argType =
--               TInterface Name { namespace = "Poppler" , name = "AnnotFreeText" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #PopplerAnnotFreeText"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface
--                  Name { namespace = "Poppler" , name = "AnnotCalloutLine" })
-- throws : False
-- Skip return : False

foreign import ccall "poppler_annot_free_text_get_callout_line" poppler_annot_free_text_get_callout_line :: 
    Ptr AnnotFreeText ->                    -- poppler_annot : TInterface (Name {namespace = "Poppler", name = "AnnotFreeText"})
    IO (Ptr Poppler.AnnotCalloutLine.AnnotCalloutLine)

-- | Retrieves a t'GI.Poppler.Structs.AnnotCalloutLine.AnnotCalloutLine' of four or six numbers specifying a callout
-- line attached to the /@popplerAnnot@/.
annotFreeTextGetCalloutLine ::
    (B.CallStack.HasCallStack, MonadIO m, IsAnnotFreeText a) =>
    a
    -- ^ /@popplerAnnot@/: a t'GI.Poppler.Objects.AnnotFreeText.AnnotFreeText'
    -> m Poppler.AnnotCalloutLine.AnnotCalloutLine
    -- ^ __Returns:__ a new allocated t'GI.Poppler.Structs.AnnotCalloutLine.AnnotCalloutLine' if the annot has a callout
    --               line, 'P.Nothing' in other case. It must be freed with 'GI.GLib.Functions.free' when
    --               done.
annotFreeTextGetCalloutLine :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAnnotFreeText a) =>
a -> m AnnotCalloutLine
annotFreeTextGetCalloutLine a
popplerAnnot = IO AnnotCalloutLine -> m AnnotCalloutLine
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO AnnotCalloutLine -> m AnnotCalloutLine)
-> IO AnnotCalloutLine -> m AnnotCalloutLine
forall a b. (a -> b) -> a -> b
$ do
    Ptr AnnotFreeText
popplerAnnot' <- a -> IO (Ptr AnnotFreeText)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
popplerAnnot
    Ptr AnnotCalloutLine
result <- Ptr AnnotFreeText -> IO (Ptr AnnotCalloutLine)
poppler_annot_free_text_get_callout_line Ptr AnnotFreeText
popplerAnnot'
    Text -> Ptr AnnotCalloutLine -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"annotFreeTextGetCalloutLine" Ptr AnnotCalloutLine
result
    AnnotCalloutLine
result' <- ((ManagedPtr AnnotCalloutLine -> AnnotCalloutLine)
-> Ptr AnnotCalloutLine -> IO AnnotCalloutLine
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr AnnotCalloutLine -> AnnotCalloutLine
Poppler.AnnotCalloutLine.AnnotCalloutLine) Ptr AnnotCalloutLine
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
popplerAnnot
    AnnotCalloutLine -> IO AnnotCalloutLine
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return AnnotCalloutLine
result'

#if defined(ENABLE_OVERLOADING)
data AnnotFreeTextGetCalloutLineMethodInfo
instance (signature ~ (m Poppler.AnnotCalloutLine.AnnotCalloutLine), MonadIO m, IsAnnotFreeText a) => O.OverloadedMethod AnnotFreeTextGetCalloutLineMethodInfo a signature where
    overloadedMethod = annotFreeTextGetCalloutLine

instance O.OverloadedMethodInfo AnnotFreeTextGetCalloutLineMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Poppler.Objects.AnnotFreeText.annotFreeTextGetCalloutLine",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-poppler-0.18.27/docs/GI-Poppler-Objects-AnnotFreeText.html#v:annotFreeTextGetCalloutLine"
        })


#endif

-- method AnnotFreeText::get_quadding
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "poppler_annot"
--           , argType =
--               TInterface Name { namespace = "Poppler" , name = "AnnotFreeText" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #PopplerAnnotFreeText"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface
--                  Name { namespace = "Poppler" , name = "AnnotFreeTextQuadding" })
-- throws : False
-- Skip return : False

foreign import ccall "poppler_annot_free_text_get_quadding" poppler_annot_free_text_get_quadding :: 
    Ptr AnnotFreeText ->                    -- poppler_annot : TInterface (Name {namespace = "Poppler", name = "AnnotFreeText"})
    IO CUInt

-- | Retrieves the justification of the text of /@popplerAnnot@/.
annotFreeTextGetQuadding ::
    (B.CallStack.HasCallStack, MonadIO m, IsAnnotFreeText a) =>
    a
    -- ^ /@popplerAnnot@/: a t'GI.Poppler.Objects.AnnotFreeText.AnnotFreeText'
    -> m Poppler.Enums.AnnotFreeTextQuadding
    -- ^ __Returns:__ t'GI.Poppler.Enums.AnnotFreeTextQuadding' of /@popplerAnnot@/.
annotFreeTextGetQuadding :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAnnotFreeText a) =>
a -> m AnnotFreeTextQuadding
annotFreeTextGetQuadding a
popplerAnnot = IO AnnotFreeTextQuadding -> m AnnotFreeTextQuadding
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO AnnotFreeTextQuadding -> m AnnotFreeTextQuadding)
-> IO AnnotFreeTextQuadding -> m AnnotFreeTextQuadding
forall a b. (a -> b) -> a -> b
$ do
    Ptr AnnotFreeText
popplerAnnot' <- a -> IO (Ptr AnnotFreeText)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
popplerAnnot
    CUInt
result <- Ptr AnnotFreeText -> IO CUInt
poppler_annot_free_text_get_quadding Ptr AnnotFreeText
popplerAnnot'
    let result' :: AnnotFreeTextQuadding
result' = (Int -> AnnotFreeTextQuadding
forall a. Enum a => Int -> a
toEnum (Int -> AnnotFreeTextQuadding)
-> (CUInt -> Int) -> CUInt -> AnnotFreeTextQuadding
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
popplerAnnot
    AnnotFreeTextQuadding -> IO AnnotFreeTextQuadding
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return AnnotFreeTextQuadding
result'

#if defined(ENABLE_OVERLOADING)
data AnnotFreeTextGetQuaddingMethodInfo
instance (signature ~ (m Poppler.Enums.AnnotFreeTextQuadding), MonadIO m, IsAnnotFreeText a) => O.OverloadedMethod AnnotFreeTextGetQuaddingMethodInfo a signature where
    overloadedMethod = annotFreeTextGetQuadding

instance O.OverloadedMethodInfo AnnotFreeTextGetQuaddingMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Poppler.Objects.AnnotFreeText.annotFreeTextGetQuadding",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-poppler-0.18.27/docs/GI-Poppler-Objects-AnnotFreeText.html#v:annotFreeTextGetQuadding"
        })


#endif