Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
No description available in the introspection data.
Synopsis
- newtype Attachment = Attachment (ManagedPtr Attachment)
- class (GObject o, IsDescendantOf Attachment o) => IsAttachment o
- toAttachment :: (MonadIO m, IsAttachment o) => o -> m Attachment
- attachmentSave :: (HasCallStack, MonadIO m, IsAttachment a) => a -> Text -> m ()
- attachmentSaveToCallback :: (HasCallStack, MonadIO m, IsAttachment a) => a -> FunPtr C_AttachmentSaveFunc -> m ()
Exported types
newtype Attachment Source #
Memory-managed wrapper type.
Attachment (ManagedPtr Attachment) |
Instances
Eq Attachment Source # | |
Defined in GI.Poppler.Objects.Attachment (==) :: Attachment -> Attachment -> Bool (/=) :: Attachment -> Attachment -> Bool | |
GObject Attachment Source # | |
Defined in GI.Poppler.Objects.Attachment | |
ManagedPtrNewtype Attachment Source # | |
Defined in GI.Poppler.Objects.Attachment toManagedPtr :: Attachment -> ManagedPtr Attachment | |
TypedObject Attachment Source # | |
Defined in GI.Poppler.Objects.Attachment glibType :: IO GType | |
IsGValue Attachment Source # | Convert |
Defined in GI.Poppler.Objects.Attachment toGValue :: Attachment -> IO GValue fromGValue :: GValue -> IO Attachment | |
HasParentTypes Attachment Source # | |
Defined in GI.Poppler.Objects.Attachment | |
type ParentTypes Attachment Source # | |
Defined in GI.Poppler.Objects.Attachment type ParentTypes Attachment = '[Object] |
class (GObject o, IsDescendantOf Attachment o) => IsAttachment o Source #
Type class for types which can be safely cast to Attachment
, for instance with toAttachment
.
Instances
(GObject o, IsDescendantOf Attachment o) => IsAttachment o Source # | |
Defined in GI.Poppler.Objects.Attachment |
toAttachment :: (MonadIO m, IsAttachment o) => o -> m Attachment Source #
Cast to Attachment
, for types for which this is known to be safe. For general casts, use castTo
.
Methods
Overloaded methods
save
:: (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 #
:: (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.