[pygtk] pygobject C API for MainContext and friends

Bryan Silverthorn bcs26 at cornell.edu
Fri Jan 11 00:34:42 WST 2008


The pygtk / pygobject C API, ie

http://faq.pygtk.org/index.py?req=show&file=faq23.015.htp

works fine for C extensions that interact with pygtk using
GObject-derived types. Some of the glib types that pygobject wraps,
though, such as GMainContext, GPollFD, etc, aren't derived from
GObject. Extensions can't interact with the pygtk wrappers for these
types unless the relevant parts of their API are also exposed (eg,
pyg_main_context_new() needs to be a part of the pygobject C API).

There's some precedent; pyg_option_group_new() and
pyg_param_spec_new() are exposed, for example. (Although I don't see a
way to retrieve the GOptionGroup* wrapped by a PyGOptionGroup?)

I need this functionality, so I could potentially contribute a patch
to expose at least the relevant functions for GMainContext and
friends. Thoughts?

----
Bryan Silverthorn


More information about the pygtk mailing list