emit events for all renderer functions

This is just a first attempt at wrapping the renderer and having a
discussion base. Names probably need to be changed and reusing the Event
object might be possible to improve. Performance needs to be tested.