summaryrefslogtreecommitdiffstats
path: root/GLDriver.hs
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2010-02-22 18:27:18 +0100
committerMatthias Schiffer <matthias@gamezock.de>2010-02-22 18:27:18 +0100
commit465bf683453c869e9b81c87661540c5e28438b1c (patch)
treefdb837f5790ebebc9ca601684acaadeab742a9e3 /GLDriver.hs
parent62fe58cb55a279c285980a313d4355d91e93601c (diff)
downloadhtanks-465bf683453c869e9b81c87661540c5e28438b1c.tar
htanks-465bf683453c869e9b81c87661540c5e28438b1c.zip
Added simple main loop
Diffstat (limited to 'GLDriver.hs')
-rw-r--r--GLDriver.hs12
1 files changed, 9 insertions, 3 deletions
diff --git a/GLDriver.hs b/GLDriver.hs
index e527d09..45ce982 100644
--- a/GLDriver.hs
+++ b/GLDriver.hs
@@ -1,14 +1,15 @@
-{-# LANGUAGE ExistentialQuantification #-}
+{-# LANGUAGE ExistentialQuantification, DeriveDataTypeable #-}
-module GLDriver ( GLDriver(..)
+module GLDriver ( Driver(..)
, Event
, SomeEvent(..)
+ , QuitEvent
) where
import Data.Typeable
-class GLDriver a where
+class Driver a where
initialized :: a -> Bool
initGL :: a -> IO a
@@ -23,3 +24,8 @@ data SomeEvent = forall a. Event a => SomeEvent a
fromEvent :: Event a => SomeEvent -> Maybe a
fromEvent (SomeEvent a) = cast a
+
+
+data QuitEvent = QuitEvent deriving Typeable
+
+instance Event QuitEvent \ No newline at end of file