IupMainLoop
Executes the user interaction until a callback returns IUP_CLOSE, IupExitLoop is called, or hiding the last visible dialog.
Parameters/Return
int IupMainLoop(void); [in C] iup.MainLoop() -> ret: number [in Lua]
Returns IUP_NOERROR always.
Notes
When this function is called, it will interrupt the program execution until a callback returns IUP_CLOSE, IupExitLoop is called, or there are no visible dialogs.
A second call to IupMainLoop will have a platform-dependent behavior. In the Motif driver can be called several times but a IUP_CLOSE must occur for each call. In the Win32 driver one IUP_CLOSE will end all calls. If there are no visible dialogs all calls will end in both drivers.
If IupMainLoop is called without any visible dialogs and no active timers, the application will hang and will not be possible to close the main loop. The process will have to be interrupted by the system.
When the last visible dialog is hidden the IupExitLoop function is called. To avoid that set LOCKLOOP=YES before hiding the last dialog.
See Also
IupOpen, IupClose, IupLoopStep, Guide/System Control, IDLE_ACTION, LOCKLOOP.