event module contains traits and structs to actually run your game mainloop
and handle top-level state, as well as handle input events such as keyboard
If you don't want to do this, you can write your own mainloop and
get the necessary event machinery by calling
context.sdl_context.event_pump() on your
Context. You can
then call whatever SDL event methods you want on that. This is
not particularly elegant and is not guarenteed to be stable (if,
for instance, we someday get rid of SDL2), but trying to wrap it
up more conveniently really ends up with the exact same interface.
See issue https://github.com/ggez/ggez/issues/117 for
A trait defining event callbacks; your primary interface with
Runs the game's main loop, calling event callbacks on the given state object as events occur.