From 3bd20fd42ba96ab19ea217d7b224c766d00cc06a Mon Sep 17 00:00:00 2001 From: Johan Dahlin Date: Wed, 12 Jul 2006 23:06:52 +0000 Subject: Import GObject part of John Finlay's PyGTK Reference Manual, copy over * Makefile.am: * configure.ac: * docs/.cvsignore: * docs/Makefile.am: * docs/common.xsl: * docs/devhelp.xsl: * docs/html.xsl: * docs/pdf-style.xsl: * docs/pdf.xsl: * docs/ref-html-style.xsl: * docs/reference/.cvsignore: * docs/reference/pygobject-classes.xml: * docs/reference/pygobject-constants.xml: * docs/reference/pygobject-functions.xml: * docs/reference/pygobject-gboxed.xml: * docs/reference/pygobject-ginterface.xml: * docs/reference/pygobject-gpointer.xml: * docs/reference/pygobject-maincontext.xml: * docs/reference/pygobject-mainloop.xml: * docs/reference/pygobject-ref.xml: * docs/reference/pygobject.xml: Import GObject part of John Finlay's PyGTK Reference Manual, copy over infrastructure from the pygtk-web module. --- docs/reference/pygobject-maincontext.xml | 152 +++++++++++++++++++++++++++++++ 1 file changed, 152 insertions(+) create mode 100644 docs/reference/pygobject-maincontext.xml (limited to 'docs/reference/pygobject-maincontext.xml') diff --git a/docs/reference/pygobject-maincontext.xml b/docs/reference/pygobject-maincontext.xml new file mode 100644 index 0000000..129197a --- /dev/null +++ b/docs/reference/pygobject-maincontext.xml @@ -0,0 +1,152 @@ + + + + + + gobject.MainContext + + an object representing a set of event sources to be handled +in a gobject.MainLoop. + + + + Synopsis + + + gobject.MainContext + + gobject.MainContext + + + iteration + may_block + + + pending + + + + + + + Ancestry + ++-- gobject.MainContext + + + + + + Description + + A gobject.MainContext +represents a set of event sources that can be run in a single thread. File +descriptors (plain files, pipes or sockets) and timeouts are the standard +event sources for GTK 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.MainContext +can be run with the iteration() +method. + + + + + Constructor + + + gobject.MainContext + + + + Returns : + a new gobject.MainContext + object. + + + + Creates a new gobject.MainContext +object. + + + + + Methods + + + gobject.MainContext.iteration + + + iteration + + + + may_block : + 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: + + + + checking to see if any associated event sources are ready +to be processed; + + + then if no events sources are ready and +may_block is TRUE, waiting for a +source to become ready; + + + and finally, dispatching the highest priority events +sources that are 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. + + + + + gobject.MainContext.pending + + + pending + + + + Returns : + TRUE if events are + pending. + + + + The pending() method checks if any +associated sources have pending events. + + + + + + -- cgit