Returns a pointer to the next event or zero. Intended to replace the set_callback/handle_events combo. Call this periodically in a timer or on idle processing. When calling, call get_next_event until a NULL pointer occurs. After the call, all previously returned pointers are invalid.