sdl: Implement event handling with event definitions from github.com/mewmew/we.