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 |
- newtype Attachment = Attachment (ManagedPtr Attachment)
- class GObject o => IsAttachment o
- toAttachment :: IsAttachment o => o -> IO Attachment
- noAttachment :: Maybe Attachment
- data AttachmentSaveMethodInfo
- attachmentSave :: (HasCallStack, MonadIO m, IsAttachment a) => a -> Text -> m ()
- data AttachmentSaveToCallbackMethodInfo
- attachmentSaveToCallback :: (HasCallStack, MonadIO m, IsAttachment a) => a -> FunPtr C_AttachmentSaveFunc -> m ()
Exported types
newtype Attachment Source #
GObject Attachment Source # | |
IsObject Attachment Source # | |
IsAttachment Attachment Source # | |
((~) * info (ResolveAttachmentMethod t Attachment), MethodInfo * info Attachment p) => IsLabel t (Attachment -> p) Source # | |
((~) * info (ResolveAttachmentMethod t Attachment), MethodInfo * info Attachment p) => IsLabelProxy t (Attachment -> p) Source # | |
HasAttributeList * Attachment Source # | |
type AttributeList Attachment Source # | |
type SignalList Attachment Source # | |
class GObject o => IsAttachment o Source #
toAttachment :: IsAttachment o => o -> IO Attachment Source #
Methods
save
data AttachmentSaveMethodInfo Source #
((~) * signature (Text -> m ()), MonadIO m, IsAttachment a) => MethodInfo * AttachmentSaveMethodInfo a signature Source # | |
:: (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
data AttachmentSaveToCallbackMethodInfo Source #
((~) * signature (FunPtr C_AttachmentSaveFunc -> m ()), MonadIO m, IsAttachment a) => MethodInfo * AttachmentSaveToCallbackMethodInfo a signature Source # | |
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.