| Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
|---|---|
| License | LGPL-2.1 |
| Maintainer | Iñaki García Etxebarria (inaki@blueleaf.cc) |
| Safe Haskell | None |
| Language | Haskell2010 |
GI.Poppler.Objects.Media
Description
No description available in the introspection data.
Synopsis
- newtype Media = Media (ManagedPtr Media)
- class (GObject o, IsDescendantOf Media o) => IsMedia o
- toMedia :: (MonadIO m, IsMedia o) => o -> m Media
- noMedia :: Maybe Media
- mediaGetFilename :: (HasCallStack, MonadIO m, IsMedia a) => a -> m Text
- mediaGetMimeType :: (HasCallStack, MonadIO m, IsMedia a) => a -> m Text
- mediaIsEmbedded :: (HasCallStack, MonadIO m, IsMedia a) => a -> m Bool
- mediaSave :: (HasCallStack, MonadIO m, IsMedia a) => a -> Text -> m ()
- mediaSaveToCallback :: (HasCallStack, MonadIO m, IsMedia a) => a -> FunPtr C_MediaSaveFunc -> m ()
Exported types
Memory-managed wrapper type.
Constructors
| Media (ManagedPtr Media) |
Instances
| GObject Media Source # | |
Defined in GI.Poppler.Objects.Media Methods gobjectType :: IO GType # | |
| HasParentTypes Media Source # | |
Defined in GI.Poppler.Objects.Media | |
| type ParentTypes Media Source # | |
Defined in GI.Poppler.Objects.Media | |
class (GObject o, IsDescendantOf Media o) => IsMedia o Source #
Instances
| (GObject o, IsDescendantOf Media o) => IsMedia o Source # | |
Defined in GI.Poppler.Objects.Media | |
Methods
getFilename
Arguments
| :: (HasCallStack, MonadIO m, IsMedia a) | |
| => a |
|
| -> m Text | Returns: a filename, return value is owned by |
Returns the media clip filename, in case of non-embedded media. filename might be a local relative or absolute path or a URI
Since: 0.14
getMimeType
Arguments
| :: (HasCallStack, MonadIO m, IsMedia a) | |
| => a |
|
| -> m Text | Returns: the mime-type, return value is owned by |
Returns the media clip mime-type
Since: 0.14
isEmbedded
Arguments
| :: (HasCallStack, MonadIO m, IsMedia a) | |
| => a |
|
| -> m Bool |
Whether the media clip is embedded in the PDF. If the result is True, the embedded stream
can be saved with mediaSave or mediaSaveToCallback function.
If the result is False, the media clip filename can be retrieved with
mediaGetFilename function.
Since: 0.14
save
Arguments
| :: (HasCallStack, MonadIO m, IsMedia a) | |
| => a |
|
| -> Text |
|
| -> m () | (Can throw |
Saves embedded stream of popplerMedia 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.
Since: 0.14
saveToCallback
Arguments
| :: (HasCallStack, MonadIO m, IsMedia a) | |
| => a |
|
| -> FunPtr C_MediaSaveFunc |
|
| -> m () | (Can throw |
Saves embedded stream of popplerMedia by feeding the produced data to saveFunc. Can be used
when you want to store the media clip stream 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.
Since: 0.14