int main_iteration_do(int block)
Run one iteration in the mainloop. If block is true, wait for an event before returning.