API: Events: Implement the 'redraw:win_end' event