mainLoop -package:gi-glib
Enter the GLUT event processing loop; it will call as necessary any
callbacks that have been registered. This routine should be called at
most once in a GLUT program.
main event loop, and events
A main event loop abstraction.
Checks to see if the main loop is currently being run via mainLoopRun.
Stops a
MainLoop from running. Any calls to mainLoopRun for the
loop will return.
Runs a main loop until
mainLoopQuit is called on the loop. If
this is called for the thread of the loop's
MainContext, it
will process events from the loop, otherwise it will simply wait.
(freeglut only) Process one iteration's worth of events in its
event loop. This allows the application to control its own event loop
and still use the GLUT package.
Return from mainLoop when any window is closed.
Code to run after the listening socket is ready but before entering
the main event loop. Useful for signaling to tests that they can start
running, or to drop permissions after binding to a restricted port.
Default: do nothing.
Since 2.1.0
Code to run after the listening socket is ready but before entering
the main event loop. Useful for signaling to tests that they can start
running, or to drop permissions after binding to a restricted port.
Default: do nothing.
Since 1.3.6
(
freeglut only) Stop the event loop. If
actionOnWindowClose contains
Exit, the application will
exit; otherwise control will return to the function which called
mainLoop.
If the application has two nested calls to
mainLoop and calls
leaveMainLoop, the behaviour is undefined. It may leave only
the inner nested loop or it may leave both loops. If the reader has a
strong preference for one behaviour over the other he should contact
the freeglut Programming Consortium and ask for the code to be fixed.
Deprecated: (Since version 2.36)Use
g_main_context_invoke().
Deprecated: (Since version 2.36)Use
g_main_context_invoke().