* tui-hooks.c (tui_event_loop): New function.