Add Application type

- move sdlError() from widget.go to application.go