window: add support for timers
window: use references for keyboard and mouse callbacks