| Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
|---|---|
| License | LGPL-2.1 |
| Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
| Safe Haskell | None |
| Language | Haskell2010 |
GI.Poppler.Objects.Attachment
Description
- newtype Attachment = Attachment (ManagedPtr Attachment)
- class GObject o => IsAttachment o
- toAttachment :: (MonadIO m, IsAttachment o) => o -> m Attachment
- noAttachment :: Maybe Attachment
- attachmentSave :: (HasCallStack, MonadIO m, IsAttachment a) => a -> Text -> m ()
- attachmentSaveToCallback :: (HasCallStack, MonadIO m, IsAttachment a) => a -> FunPtr C_AttachmentSaveFunc -> m ()
Exported types
class GObject o => IsAttachment o Source #
Instances
toAttachment :: (MonadIO m, IsAttachment o) => o -> m Attachment Source #
Methods
save
Arguments
| :: (HasCallStack, MonadIO m, IsAttachment a) | |
| => a |
|
| -> Text |
|
| -> m () | (Can throw |
Saves attachment to a file indicated by filename. If error is set, False
will be returned. Possible errors include those in the G_FILE_ERROR domain
and whatever the save function generates.
saveToCallback
attachmentSaveToCallback Source #
Arguments
| :: (HasCallStack, MonadIO m, IsAttachment a) | |
| => a |
|
| -> FunPtr C_AttachmentSaveFunc |
|
| -> m () | (Can throw |
Saves attachment by feeding the produced data to saveFunc. Can be used
when you want to store the attachment to something other than a file, such as
an in-memory buffer or a socket. If error is set, False will be
returned. Possible errors include those in the G_FILE_ERROR domain and
whatever the save function generates.