GNOME Bugzilla – Bug 305844
Make pygtk depend on pycairo; add gdkcairo.h functions
Last modified: 2005-06-06 22:32:04 UTC
We should add a new dependency of pygtk: pycairo. Since gtk+ 2.7 depends on cairo, it is only logical that pygtk requires pycairo to handle the cairo_t type.
Created attachment 47008 [details] [review] Add gdkcairo.h functions; Make cairo_t type available in codegen
Created attachment 47082 [details] [review] more or less the same, but cairo stuff is optional (compiled in if gtk 2.7 and pycairo are installed)
Created attachment 47233 [details] [review] patch updated to new pycairo cvs api; adds pangocairo module, including example ported from C
Sorry, I forgot to add the pangocairo module files. I'm working on gdk stuff; I'll post a full and corrected patch later...
Created attachment 47236 [details] [review] full patch ready: adds gtk.gdk.CairoContext object, gtk.gdk.Drawable.cairo_create() method, and modifies examples/gtk/widget.py to optionally work with cairo
Comment on attachment 47236 [details] [review] full patch ready: adds gtk.gdk.CairoContext object, gtk.gdk.Drawable.cairo_create() method, and modifies examples/gtk/widget.py to optionally work with cairo >+extern Pycairo_CAPI_t *Pycairo_CAPI; >+#ifndef pycairo_context_get >+# define pycairo_context_get(obj) (((PycairoContext *)obj)->ctx) >+#endif Can't this go upstream? >+ pypango_layout_line_type = g_type_from_name("PangoLayoutLine"); Kinda ugly. Please commit the body extension for the code generator. I prefer it should be separated from the rest. (version control system wise) Looks good enough I suppose.
pycairo_context_get is upstream already, with a different name: https://bugs.freedesktop.org/show_bug.cgi?id=3469 I'll update the code to use the new macro. >+ pypango_layout_line_type = g_type_from_name("PangoLayoutLine"); -> Hopefully if bug 305975 is closed, this will no longer be a problem.
OK. Committed (using new pycairo macro).