GNOME Bugzilla – Bug 471757
Codegen is using a pygtk private definition
Last modified: 2012-02-10 08:10:26 UTC
For methods that return a pointer to a GdkRegion codegen is using PYGDK_TYPE_REGION which is defined in pygtk-private.h, class GdkRegionPtrReturn(GBoxedReturn): def write_error_return(self): self.wrapper.write_code("return gdk_region_new();") def write_conversion(self): self.props['typecode'] = 'PYGDK_TYPE_REGION' self.props['typename'] = 'GdkRegion' super(GdkRegionPtrReturn, self).write_conversion() argtypes.matcher.register_reverse_ret("GdkRegion*", GdkRegionPtrReturn) Will it be safe to move it from pygtk-private.h into pygtk.h? Maybe a patch for GTK+ to make it boxed?
A patch for GTK+ would be nice. And I guess moving it to pygtk.h would not be a bad idea; right now 3rd party extensions that encounter GdkRegion* return in virtuals will probably not compile because PYGDK_TYPE_REGION isn't defined. Although defining PYGDK_TYPE_REGION in pygtk.h _right now_ is not possible because of API freeze.
Created attachment 110320 [details] [review] region patch
codegen and the static bindings are obsolete since pygobject 3.0, which is GI only. Thanks!