{- |
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.AnnotMarkup
    ( 

-- * Exported types
    AnnotMarkup(..)                         ,
    AnnotMarkupK                            ,
    toAnnotMarkup                           ,
    noAnnotMarkup                           ,


 -- * Methods
-- ** annotMarkupGetDate
    annotMarkupGetDate                      ,


-- ** annotMarkupGetExternalData
    annotMarkupGetExternalData              ,


-- ** annotMarkupGetLabel
    annotMarkupGetLabel                     ,


-- ** annotMarkupGetOpacity
    annotMarkupGetOpacity                   ,


-- ** annotMarkupGetPopupIsOpen
    annotMarkupGetPopupIsOpen               ,


-- ** annotMarkupGetPopupRectangle
    annotMarkupGetPopupRectangle            ,


-- ** annotMarkupGetReplyTo
    annotMarkupGetReplyTo                   ,


-- ** annotMarkupGetSubject
    annotMarkupGetSubject                   ,


-- ** annotMarkupHasPopup
    annotMarkupHasPopup                     ,


-- ** annotMarkupSetLabel
    annotMarkupSetLabel                     ,


-- ** annotMarkupSetOpacity
    annotMarkupSetOpacity                   ,


-- ** annotMarkupSetPopup
    annotMarkupSetPopup                     ,


-- ** annotMarkupSetPopupIsOpen
    annotMarkupSetPopupIsOpen               ,


-- ** annotMarkupSetPopupRectangle
    annotMarkupSetPopupRectangle            ,




    ) 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.GLib as GLib
import qualified GI.GObject as GObject

newtype AnnotMarkup = AnnotMarkup (ForeignPtr AnnotMarkup)
foreign import ccall "poppler_annot_markup_get_type"
    c_poppler_annot_markup_get_type :: IO GType

type instance ParentTypes AnnotMarkup = AnnotMarkupParentTypes
type AnnotMarkupParentTypes = '[Annot, GObject.Object]

instance GObject AnnotMarkup where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_poppler_annot_markup_get_type
    

class GObject o => AnnotMarkupK o
instance (GObject o, IsDescendantOf AnnotMarkup o) => AnnotMarkupK o

toAnnotMarkup :: AnnotMarkupK o => o -> IO AnnotMarkup
toAnnotMarkup = unsafeCastTo AnnotMarkup

noAnnotMarkup :: Maybe AnnotMarkup
noAnnotMarkup = Nothing

type instance AttributeList AnnotMarkup = AnnotMarkupAttributeList
type AnnotMarkupAttributeList = ('[ ] :: [(Symbol, *)])

type instance SignalList AnnotMarkup = AnnotMarkupSignalList
type AnnotMarkupSignalList = ('[ '("notify", GObject.ObjectNotifySignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)])

-- method AnnotMarkup::get_date
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "AnnotMarkup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "AnnotMarkup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "GLib" "Date"
-- throws : False
-- Skip return : False

foreign import ccall "poppler_annot_markup_get_date" poppler_annot_markup_get_date :: 
    Ptr AnnotMarkup ->                      -- _obj : TInterface "Poppler" "AnnotMarkup"
    IO (Ptr GLib.Date)


annotMarkupGetDate ::
    (MonadIO m, AnnotMarkupK a) =>
    a ->                                    -- _obj
    m GLib.Date
annotMarkupGetDate _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- poppler_annot_markup_get_date _obj'
    checkUnexpectedReturnNULL "poppler_annot_markup_get_date" result
    result' <- (wrapBoxed GLib.Date) result
    touchManagedPtr _obj
    return result'

-- method AnnotMarkup::get_external_data
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "AnnotMarkup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "AnnotMarkup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Poppler" "AnnotExternalDataType"
-- throws : False
-- Skip return : False

foreign import ccall "poppler_annot_markup_get_external_data" poppler_annot_markup_get_external_data :: 
    Ptr AnnotMarkup ->                      -- _obj : TInterface "Poppler" "AnnotMarkup"
    IO CUInt


annotMarkupGetExternalData ::
    (MonadIO m, AnnotMarkupK a) =>
    a ->                                    -- _obj
    m AnnotExternalDataType
annotMarkupGetExternalData _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- poppler_annot_markup_get_external_data _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method AnnotMarkup::get_label
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "AnnotMarkup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "AnnotMarkup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "poppler_annot_markup_get_label" poppler_annot_markup_get_label :: 
    Ptr AnnotMarkup ->                      -- _obj : TInterface "Poppler" "AnnotMarkup"
    IO CString


annotMarkupGetLabel ::
    (MonadIO m, AnnotMarkupK a) =>
    a ->                                    -- _obj
    m T.Text
annotMarkupGetLabel _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- poppler_annot_markup_get_label _obj'
    checkUnexpectedReturnNULL "poppler_annot_markup_get_label" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr _obj
    return result'

-- method AnnotMarkup::get_opacity
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "AnnotMarkup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "AnnotMarkup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False

foreign import ccall "poppler_annot_markup_get_opacity" poppler_annot_markup_get_opacity :: 
    Ptr AnnotMarkup ->                      -- _obj : TInterface "Poppler" "AnnotMarkup"
    IO CDouble


annotMarkupGetOpacity ::
    (MonadIO m, AnnotMarkupK a) =>
    a ->                                    -- _obj
    m Double
annotMarkupGetOpacity _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- poppler_annot_markup_get_opacity _obj'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- method AnnotMarkup::get_popup_is_open
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "AnnotMarkup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "AnnotMarkup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "poppler_annot_markup_get_popup_is_open" poppler_annot_markup_get_popup_is_open :: 
    Ptr AnnotMarkup ->                      -- _obj : TInterface "Poppler" "AnnotMarkup"
    IO CInt


annotMarkupGetPopupIsOpen ::
    (MonadIO m, AnnotMarkupK a) =>
    a ->                                    -- _obj
    m Bool
annotMarkupGetPopupIsOpen _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- poppler_annot_markup_get_popup_is_open _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method AnnotMarkup::get_popup_rectangle
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "AnnotMarkup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "poppler_rect", argType = TInterface "Poppler" "Rectangle", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "AnnotMarkup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "poppler_annot_markup_get_popup_rectangle" poppler_annot_markup_get_popup_rectangle :: 
    Ptr AnnotMarkup ->                      -- _obj : TInterface "Poppler" "AnnotMarkup"
    Ptr Rectangle ->                        -- poppler_rect : TInterface "Poppler" "Rectangle"
    IO CInt


annotMarkupGetPopupRectangle ::
    (MonadIO m, AnnotMarkupK a) =>
    a ->                                    -- _obj
    m (Bool,Rectangle)
annotMarkupGetPopupRectangle _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    poppler_rect <- callocBoxedBytes 32 :: IO (Ptr Rectangle)
    result <- poppler_annot_markup_get_popup_rectangle _obj' poppler_rect
    let result' = (/= 0) result
    poppler_rect' <- (wrapBoxed Rectangle) poppler_rect
    touchManagedPtr _obj
    return (result', poppler_rect')

-- method AnnotMarkup::get_reply_to
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "AnnotMarkup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "AnnotMarkup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Poppler" "AnnotMarkupReplyType"
-- throws : False
-- Skip return : False

foreign import ccall "poppler_annot_markup_get_reply_to" poppler_annot_markup_get_reply_to :: 
    Ptr AnnotMarkup ->                      -- _obj : TInterface "Poppler" "AnnotMarkup"
    IO CUInt


annotMarkupGetReplyTo ::
    (MonadIO m, AnnotMarkupK a) =>
    a ->                                    -- _obj
    m AnnotMarkupReplyType
annotMarkupGetReplyTo _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- poppler_annot_markup_get_reply_to _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method AnnotMarkup::get_subject
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "AnnotMarkup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "AnnotMarkup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "poppler_annot_markup_get_subject" poppler_annot_markup_get_subject :: 
    Ptr AnnotMarkup ->                      -- _obj : TInterface "Poppler" "AnnotMarkup"
    IO CString


annotMarkupGetSubject ::
    (MonadIO m, AnnotMarkupK a) =>
    a ->                                    -- _obj
    m T.Text
annotMarkupGetSubject _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- poppler_annot_markup_get_subject _obj'
    checkUnexpectedReturnNULL "poppler_annot_markup_get_subject" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr _obj
    return result'

-- method AnnotMarkup::has_popup
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "AnnotMarkup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "AnnotMarkup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "poppler_annot_markup_has_popup" poppler_annot_markup_has_popup :: 
    Ptr AnnotMarkup ->                      -- _obj : TInterface "Poppler" "AnnotMarkup"
    IO CInt


annotMarkupHasPopup ::
    (MonadIO m, AnnotMarkupK a) =>
    a ->                                    -- _obj
    m Bool
annotMarkupHasPopup _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- poppler_annot_markup_has_popup _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method AnnotMarkup::set_label
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "AnnotMarkup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "AnnotMarkup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "poppler_annot_markup_set_label" poppler_annot_markup_set_label :: 
    Ptr AnnotMarkup ->                      -- _obj : TInterface "Poppler" "AnnotMarkup"
    CString ->                              -- label : TBasicType TUTF8
    IO ()


annotMarkupSetLabel ::
    (MonadIO m, AnnotMarkupK a) =>
    a ->                                    -- _obj
    Maybe (T.Text) ->                       -- label
    m ()
annotMarkupSetLabel _obj label = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeLabel <- case label of
        Nothing -> return nullPtr
        Just jLabel -> do
            jLabel' <- textToCString jLabel
            return jLabel'
    poppler_annot_markup_set_label _obj' maybeLabel
    touchManagedPtr _obj
    freeMem maybeLabel
    return ()

-- method AnnotMarkup::set_opacity
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "AnnotMarkup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "opacity", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "AnnotMarkup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "opacity", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "poppler_annot_markup_set_opacity" poppler_annot_markup_set_opacity :: 
    Ptr AnnotMarkup ->                      -- _obj : TInterface "Poppler" "AnnotMarkup"
    CDouble ->                              -- opacity : TBasicType TDouble
    IO ()


annotMarkupSetOpacity ::
    (MonadIO m, AnnotMarkupK a) =>
    a ->                                    -- _obj
    Double ->                               -- opacity
    m ()
annotMarkupSetOpacity _obj opacity = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let opacity' = realToFrac opacity
    poppler_annot_markup_set_opacity _obj' opacity'
    touchManagedPtr _obj
    return ()

-- method AnnotMarkup::set_popup
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "AnnotMarkup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "popup_rect", argType = TInterface "Poppler" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "AnnotMarkup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "popup_rect", argType = TInterface "Poppler" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "poppler_annot_markup_set_popup" poppler_annot_markup_set_popup :: 
    Ptr AnnotMarkup ->                      -- _obj : TInterface "Poppler" "AnnotMarkup"
    Ptr Rectangle ->                        -- popup_rect : TInterface "Poppler" "Rectangle"
    IO ()


annotMarkupSetPopup ::
    (MonadIO m, AnnotMarkupK a) =>
    a ->                                    -- _obj
    Rectangle ->                            -- popup_rect
    m ()
annotMarkupSetPopup _obj popup_rect = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let popup_rect' = unsafeManagedPtrGetPtr popup_rect
    poppler_annot_markup_set_popup _obj' popup_rect'
    touchManagedPtr _obj
    touchManagedPtr popup_rect
    return ()

-- method AnnotMarkup::set_popup_is_open
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "AnnotMarkup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "is_open", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "AnnotMarkup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "is_open", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "poppler_annot_markup_set_popup_is_open" poppler_annot_markup_set_popup_is_open :: 
    Ptr AnnotMarkup ->                      -- _obj : TInterface "Poppler" "AnnotMarkup"
    CInt ->                                 -- is_open : TBasicType TBoolean
    IO ()


annotMarkupSetPopupIsOpen ::
    (MonadIO m, AnnotMarkupK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- is_open
    m ()
annotMarkupSetPopupIsOpen _obj is_open = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let is_open' = (fromIntegral . fromEnum) is_open
    poppler_annot_markup_set_popup_is_open _obj' is_open'
    touchManagedPtr _obj
    return ()

-- method AnnotMarkup::set_popup_rectangle
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "AnnotMarkup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "poppler_rect", argType = TInterface "Poppler" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "AnnotMarkup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "poppler_rect", argType = TInterface "Poppler" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "poppler_annot_markup_set_popup_rectangle" poppler_annot_markup_set_popup_rectangle :: 
    Ptr AnnotMarkup ->                      -- _obj : TInterface "Poppler" "AnnotMarkup"
    Ptr Rectangle ->                        -- poppler_rect : TInterface "Poppler" "Rectangle"
    IO ()


annotMarkupSetPopupRectangle ::
    (MonadIO m, AnnotMarkupK a) =>
    a ->                                    -- _obj
    Rectangle ->                            -- poppler_rect
    m ()
annotMarkupSetPopupRectangle _obj poppler_rect = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let poppler_rect' = unsafeManagedPtrGetPtr poppler_rect
    poppler_annot_markup_set_popup_rectangle _obj' poppler_rect'
    touchManagedPtr _obj
    touchManagedPtr poppler_rect
    return ()