module Main where import Prelude hiding (flip) import Foreign.ForeignPtr import Graphics.UI.SDL.Types import Graphics.UI.SDL.General import Graphics.UI.SDL.WindowManagement import Graphics.UI.SDL.Video import Graphics.UI.SDL.Time instance Show (ForeignPtr a) where showsPrec p f = showsPrec p (unsafeForeignPtrToPtr f) main = withInit [InitEverything] $ do -- withInit calls quit for us. screen <- setVideoMode 640 480 32 [SWSurface] hello <- loadBMP "hello.bmp" print screen print hello blitSurface hello Nothing screen Nothing flip screen delay 2000