gi-poppler-0.18.11: Poppler bindings

CopyrightWill Thompson, Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Poppler.Objects.Media

Contents

Description

 

Synopsis

Exported types

newtype Media Source #

Constructors

Media (ManagedPtr Media) 

Instances

GObject Media Source # 

Methods

gobjectType :: Media -> IO GType #

IsObject Media Source # 
IsMedia Media Source # 
((~) * info (ResolveMediaMethod t Media), MethodInfo * info Media p) => IsLabel t (Media -> p) Source # 

Methods

fromLabel :: Proxy# Symbol t -> Media -> p #

((~) * info (ResolveMediaMethod t Media), MethodInfo * info Media p) => IsLabelProxy t (Media -> p) Source # 

Methods

fromLabelProxy :: Proxy Symbol t -> Media -> p #

HasAttributeList * Media Source # 
type AttributeList Media Source # 
type SignalList Media Source # 

Methods

getFilename

data MediaGetFilenameMethodInfo Source #

Instances

((~) * signature (m Text), MonadIO m, IsMedia a) => MethodInfo * MediaGetFilenameMethodInfo a signature Source # 

mediaGetFilename Source #

Arguments

:: (HasCallStack, MonadIO m, IsMedia a) 
=> a

popplerMedia: a Media

-> m Text

Returns: a filename, return value is owned by Media and should not be freed

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

data MediaGetMimeTypeMethodInfo Source #

Instances

((~) * signature (m Text), MonadIO m, IsMedia a) => MethodInfo * MediaGetMimeTypeMethodInfo a signature Source # 

mediaGetMimeType Source #

Arguments

:: (HasCallStack, MonadIO m, IsMedia a) 
=> a

popplerMedia: a Media

-> m Text

Returns: the mime-type, return value is owned by Media and should not be freed

Returns the media clip mime-type

Since: 0.14

isEmbedded

data MediaIsEmbeddedMethodInfo Source #

Instances

((~) * signature (m Bool), MonadIO m, IsMedia a) => MethodInfo * MediaIsEmbeddedMethodInfo a signature Source # 

mediaIsEmbedded Source #

Arguments

:: (HasCallStack, MonadIO m, IsMedia a) 
=> a

popplerMedia: a Media

-> m Bool

Returns: True if media clip is embedded, False otherwise

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

data MediaSaveMethodInfo Source #

Instances

((~) * signature (Text -> m ()), MonadIO m, IsMedia a) => MethodInfo * MediaSaveMethodInfo a signature Source # 

Methods

overloadedMethod :: MethodProxy MediaSaveMethodInfo a -> signature -> s #

mediaSave Source #

Arguments

:: (HasCallStack, MonadIO m, IsMedia a) 
=> a

popplerMedia: a Media

-> Text

filename: name of file to save

-> m ()

(Can throw GError)

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

mediaSaveToCallback Source #

Arguments

:: (HasCallStack, MonadIO m, IsMedia a) 
=> a

popplerMedia: a Media

-> FunPtr C_MediaSaveFunc

saveFunc: a function that is called to save each block of data that the save routine generates.

-> m ()

(Can throw GError)

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