mainLoop
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.
The GMainLoop struct is an opaque data type representing the
main event loop of a GLib or GTK application.
Memory-managed wrapper type.
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.
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.
Note that sources that have already been dispatched when
mainLoopQuit is called will still be executed.
Increases the reference count on a
MainLoop object by one.
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.
Decreases the reference count on a
MainLoop object by one. If
the result is zero, free the loop and free all associated memory.
(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().