I'd like to follow Owen's suggestion in some mailing list I don't remember of using inheritance to represent cairo contexts enhanced with some more methods, some provided by pango, some by gdk. Thus we would have the following inheritance chain: cairo.Context <--- pango.CairoContext <--- gtk.gdk.CairoContext To help support this goal, it would be nice to allow PycairoContext_FromContext to create all these objects, by receiving the type of cairo context to create as argument.
Created attachment 2803 [details] [review] patch
The patch has been applied, I changed the type to parameter 2 since I think the type is more important that the base object which is optional. I also added a type parameter to PycairoSurface_FromSurface since it allows the removal of 4 other subclass constructor functions and a simplified C API.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.