Create GLib.OptionContext from pointer



I call a non-introspectable function through ctypes. The function
returns GOptionContext*.
How can I create a pygobject wrapper (GLib.OptionContext) for it?

I found this answer on SO, but it's for GObject-derived types only:
https://stackoverflow.com/questions/8668333/create-python-object-from-memory-address-using-gi-repository
Also, it seems to use private interfaces (are they supposed to be kept
compatible?).

I can't find anything for GOptionContext*, even using private
interface. Most probably, pyg_option_context_new is what I need, but
it isn't mentioned in any installed header files, and also seems to
not be called/used anywhere at all (full-text search over pygobject
sources).


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]