GLFW-task-0.2.0: GLFW utility functions to use together with monad-task.

Safe HaskellSafe-Infered



GLFW helper functions for use with a TaskT monad transformer (from monad-task package).



isKey :: Enum a => a -> Key -> Maybe ()Source

registerTaskCallbacks :: (MonadIO m, MonadTask Event m) => IO (m ())Source

registerTaskCallbacks sets up all event callbacks, and returns a waitEvent equivalent function for task monad, which must be called repeatedly in order to pump events to other task co-routines.

These task co-routines should use watch to select event of interest, and they should be forked prior to the waitEvent call.