summaryrefslogtreecommitdiffstats
path: root/src/GLDriver.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/GLDriver.hs')
-rw-r--r--src/GLDriver.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/GLDriver.hs b/src/GLDriver.hs
index 7340075..3d344ef 100644
--- a/src/GLDriver.hs
+++ b/src/GLDriver.hs
@@ -24,6 +24,8 @@ class Driver a where
swapBuffers :: a -> IO ()
+ usleep :: a -> Integer -> IO ()
+
nextEvent :: a -> IO (a, Maybe SomeEvent)
data SomeDriver = forall d. Driver d => SomeDriver d
@@ -34,6 +36,7 @@ instance Driver SomeDriver where
deinitGL (SomeDriver d) = deinitGL d
swapBuffers (SomeDriver d) = swapBuffers d
nextEvent (SomeDriver d) = nextEvent d >>= \(gl, ev) -> return (SomeDriver gl, ev)
+ usleep (SomeDriver d) = usleep d
class (Typeable a, Show a) => Event a