gi-poppler-0.18.29: Poppler bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Poppler.Objects.Media

Description

No description available in the introspection data.

Synopsis

Exported types

newtype Media Source #

Memory-managed wrapper type.

Constructors

Media (ManagedPtr Media) 

Instances

Instances details
Eq Media Source # 
Instance details

Defined in GI.Poppler.Objects.Media

Methods

(==) :: Media -> Media -> Bool #

(/=) :: Media -> Media -> Bool #

GObject Media Source # 
Instance details

Defined in GI.Poppler.Objects.Media

ManagedPtrNewtype Media Source # 
Instance details

Defined in GI.Poppler.Objects.Media

Methods

toManagedPtr :: Media -> ManagedPtr Media

TypedObject Media Source # 
Instance details

Defined in GI.Poppler.Objects.Media

Methods

glibType :: IO GType

HasParentTypes Media Source # 
Instance details

Defined in GI.Poppler.Objects.Media

IsGValue (Maybe Media) Source #

Convert Media to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Poppler.Objects.Media

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe Media -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe Media)

type ParentTypes Media Source # 
Instance details

Defined in GI.Poppler.Objects.Media

type ParentTypes Media = '[Object]

class (GObject o, IsDescendantOf Media o) => IsMedia o Source #

Type class for types which can be safely cast to Media, for instance with toMedia.

Instances

Instances details
(GObject o, IsDescendantOf Media o) => IsMedia o Source # 
Instance details

Defined in GI.Poppler.Objects.Media

toMedia :: (MonadIO m, IsMedia o) => o -> m Media Source #

Cast to Media, for types for which this is known to be safe. For general casts, use castTo.

Methods

getAutoPlay

mediaGetAutoPlay Source #

Arguments

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

popplerMedia: a Media

-> m Bool

Returns: True if media should auto-play, False otherwise

Returns the auto-play parameter.

Since: 20.04.0

getFilename

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

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

getRepeatCount

mediaGetRepeatCount Source #

Arguments

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

popplerMedia: a Media

-> m Float

Returns: Repeat count parameter (float)

Returns the repeat count parameter.

Since: 20.04.0

getShowControls

mediaGetShowControls Source #

Arguments

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

popplerMedia: a Media

-> m Bool

Returns: True if media should show controls, False otherwise

Returns the show controls parameter.

Since: 20.04.0

isEmbedded

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

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

saveToFd

mediaSaveToFd Source #

Arguments

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

popplerMedia: a Media

-> Int32

fd: a valid file descriptor open for writing

-> m ()

(Can throw GError)

Saves embedded stream of popplerMedia to a file referred to by fd. If error is set, False will be returned. Possible errors include those in the G_FILE_ERROR domain and whatever the save function generates. Note that this function takes ownership of fd; you must not operate on it again, nor close it.

Since: 21.12.0