IupMainLoop

IUP - Portable User Interface

IupMainLoop

Executes the user interaction until a callback returns IUP_CLOSE. Must be called before the IupClose function.

Parameters/Return

int IupMainLoop(void); [in C]
IupMainLoop() -> ret: number [in IupLua3]
iup.MainLoop() -> ret: number [in IupLua5]

Returns IUP_NOERROR or IUP_ERROR.

Notes

If this function is executed at any other moment, it will interrupt the execution until a callback returns IUP_CLOSE. A second execution of IupMainLoop will have a platform-dependent behavior.

Presently, the return value can be ignored, as in all platforms it currently returns IUP_NOERROR.

The message loop will go on only while there is a dialog. At the moment the last dialog is destroyed or hidden, the loop will be ended and IupMainLoop will return the control to the application, except if the Idle callback is defined - in this case, the Idle callback must return IUP_CLOSE for the application to receive the control back.

Motif DriverĀ 

Can be executed several times but a IUP_CLOSE must occur for each execution.

Win32 DriverĀ 

If the function is executed several times, only one IUP_CLOSE will end all executions.

See Also

IupOpen, IupClose, IupLoopStep, Guide / System Control, IDLE_ACTION.