module GI.Poppler.Objects.AnnotFileAttachment
(
AnnotFileAttachment(..) ,
AnnotFileAttachmentK ,
toAnnotFileAttachment ,
noAnnotFileAttachment ,
annotFileAttachmentGetAttachment ,
annotFileAttachmentGetName ,
) 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 AnnotFileAttachment = AnnotFileAttachment (ForeignPtr AnnotFileAttachment)
foreign import ccall "poppler_annot_file_attachment_get_type"
c_poppler_annot_file_attachment_get_type :: IO GType
type instance ParentTypes AnnotFileAttachment = AnnotFileAttachmentParentTypes
type AnnotFileAttachmentParentTypes = '[AnnotMarkup, Annot, GObject.Object]
instance GObject AnnotFileAttachment where
gobjectIsInitiallyUnowned _ = False
gobjectType _ = c_poppler_annot_file_attachment_get_type
class GObject o => AnnotFileAttachmentK o
instance (GObject o, IsDescendantOf AnnotFileAttachment o) => AnnotFileAttachmentK o
toAnnotFileAttachment :: AnnotFileAttachmentK o => o -> IO AnnotFileAttachment
toAnnotFileAttachment = unsafeCastTo AnnotFileAttachment
noAnnotFileAttachment :: Maybe AnnotFileAttachment
noAnnotFileAttachment = Nothing
type instance AttributeList AnnotFileAttachment = AnnotFileAttachmentAttributeList
type AnnotFileAttachmentAttributeList = ('[ ] :: [(Symbol, *)])
type instance SignalList AnnotFileAttachment = AnnotFileAttachmentSignalList
type AnnotFileAttachmentSignalList = ('[ '("notify", GObject.ObjectNotifySignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)])
foreign import ccall "poppler_annot_file_attachment_get_attachment" poppler_annot_file_attachment_get_attachment ::
Ptr AnnotFileAttachment ->
IO (Ptr Attachment)
annotFileAttachmentGetAttachment ::
(MonadIO m, AnnotFileAttachmentK a) =>
a ->
m Attachment
annotFileAttachmentGetAttachment _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- poppler_annot_file_attachment_get_attachment _obj'
checkUnexpectedReturnNULL "poppler_annot_file_attachment_get_attachment" result
result' <- (wrapObject Attachment) result
touchManagedPtr _obj
return result'
foreign import ccall "poppler_annot_file_attachment_get_name" poppler_annot_file_attachment_get_name ::
Ptr AnnotFileAttachment ->
IO CString
annotFileAttachmentGetName ::
(MonadIO m, AnnotFileAttachmentK a) =>
a ->
m T.Text
annotFileAttachmentGetName _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- poppler_annot_file_attachment_get_name _obj'
checkUnexpectedReturnNULL "poppler_annot_file_attachment_get_name" result
result' <- cstringToText result
freeMem result
touchManagedPtr _obj
return result'