Causes the mainloop to call the given function whenever no events with higher priority are to be processed.
The returned number is an unique handle which you should keep saved somewhere for the case you want to remove the idle function.