gobject.MainContext — an object representing a set of event sources to be handled
in a gobject.MainLoop
A gobject.MainContextGTK and PyGTK though
others can be added. Each event source is assigned a priority. The default
priority, gobject.PRIORITY_DEFAULT, is 0. Values less
than 0 denote higher priorities. Values greater than 0 denote lower
priorities. Events from high priority sources are always processed before
events from lower priority sources. Single iterations of a gobject.MainContextiteration()
gobject.MainContext()Returns: | a new gobject.MainContext |
Creates a new gobject.MainContext
def iteration()
| if TRUE the call may block
waiting for an event. |
Returns: | TRUE if events were
dispatched. |
The iteration() method runs a single
iteration. This involves:
may_block is TRUE, waiting for a
source to become ready;Note that even when may_block is
TRUE, it is still possible for
iteration() to return FALSE,
since the the wait may be interrupted for other reasons than an event source
becoming ready.