wx-0.10.1: wxHaskell is a portable and native GUI library for Haskell.Source codeContentsIndex
Graphics.UI.WX.Media
Contents
Media
Sound
Images
Bitmaps
Description
Synopsis
class Media w where
play :: w -> IO ()
stop :: w -> IO ()
type Wave a = Sound a
sound :: FilePath -> Sound ()
playLoop :: Sound a -> IO ()
playWait :: Sound a -> IO ()
image :: FilePath -> Image ()
bitmap :: FilePath -> Bitmap ()
bitmapFromImage :: Image a -> IO (Bitmap ())
Media
class Media w whereSource
Abstract layer between MediaCtrl and Sound. This class intends to avoid breaking backward-compatibility.
Methods
play :: w -> IO ()Source
If use this method with Sound, play a sound fragment asynchronously. If use this method with MediaCtrl, play media that is loaded by mediaCtrlLoad.
stop :: w -> IO ()Source
Sound
type Wave a = Sound aSource
Define Wave type synonym for people who are familiar with wxWidgets 2.4.x or lower name.
sound :: FilePath -> Sound ()Source
Return a managed sound object. The file path points to a valid sound file, normally a .wav.
playLoop :: Sound a -> IO ()Source
Play a sound fragment repeatedly (and asynchronously).
playWait :: Sound a -> IO ()Source
Play a sound fragment synchronously (i.e. wait till completion).
Images
image :: FilePath -> Image ()Source

Return a managed image. Images are platform independent representations of pictures, using an array of rgb pixels. See Graphics.UI.WXCore.Image for lowlevel pixel manipulation. The file path should point to a valid image file, like .jpg, .bmp, .xpm, or .png, for example.

Instances: Sized.

Bitmaps
bitmap :: FilePath -> Bitmap ()Source

Return a managed bitmap object. Bitmaps are abstract images used for drawing to a device context. The file path should point to a valid bitmap file, normally a .ico, .bmp, .xpm, or .png, but any file format supported by |Image| is correctly loaded.

Instances: Sized.

bitmapFromImage :: Image a -> IO (Bitmap ())Source
Create a bitmap from an image with the same color depth.
Produced by Haddock version 2.1.0