API: Refactor: Add helper macros for dealing with API type casts
API: Events: Implement the 'redraw:tabs' event
API: Events: Implement the 'redraw:insert_line' event
API: Events: Implement the 'redraw:delete_line' event
API: Events: Implement the 'redraw:update_line' event