pub fn set_event_handler(mainloop: &mut Mainloop)