module Graphics.UI.SDL.MPEG.Types where
import Foreign
import Graphics.UI.SDL
newtype MutexStruct = MkMutexStruct ()
type Mutex = ForeignPtr MutexStruct
newtype MPEGStruct = MkMPEGStruct ()
type MPEG = ForeignPtr MPEGStruct
newtype InfoStruct = MkInfoStruct ()
type Info = ForeignPtr InfoStruct
newtype FilterStruct = MkFilterStruct ()
type Filter = ForeignPtr FilterStruct
newtype AudioSpecStruct = MkAudioSpecStruct ()
type AudioSpec = ForeignPtr AudioSpecStruct
type DisplayCallback = Ptr SurfaceStruct -> Int -> Int -> Int -> Int -> IO ()
data Status = SMPEG_ERROR | SMPEG_STOPPED | SMPEG_PLAYING
deriving (Eq, Ord, Bounded)
instance Enum Status where
toEnum (1) = SMPEG_ERROR
toEnum 0 = SMPEG_STOPPED
toEnum 1 = SMPEG_PLAYING
toEnum _ = error "Status's enum value should be -1, 0 or 1"
fromEnum SMPEG_ERROR = 1
fromEnum SMPEG_STOPPED = 0
fromEnum SMPEG_PLAYING = 1