After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 305844 - Make pygtk depend on pycairo; add gdkcairo.h functions
Make pygtk depend on pycairo; add gdkcairo.h functions
Status: RESOLVED FIXED
Product: pygtk
Classification: Bindings
Component: gtk
Git Master
Other All
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2005-05-29 18:03 UTC by Gustavo Carneiro
Modified: 2005-06-06 22:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add gdkcairo.h functions; Make cairo_t type available in codegen (7.92 KB, patch)
2005-05-29 18:05 UTC, Gustavo Carneiro
none Details | Review
more or less the same, but cairo stuff is optional (compiled in if gtk 2.7 and pycairo are installed) (6.67 KB, patch)
2005-05-31 22:09 UTC, Gustavo Carneiro
none Details | Review
patch updated to new pycairo cvs api; adds pangocairo module, including example ported from C (11.12 KB, patch)
2005-06-04 13:13 UTC, Gustavo Carneiro
none 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 (36.75 KB, patch)
2005-06-04 15:47 UTC, Gustavo Carneiro
accepted-commit_now Details | Review

Description Gustavo Carneiro 2005-05-29 18:03:22 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.
Comment 1 Gustavo Carneiro 2005-05-29 18:05:37 UTC
Created attachment 47008 [details] [review]
Add gdkcairo.h functions; Make cairo_t type available in codegen
Comment 2 Gustavo Carneiro 2005-05-31 22:09:34 UTC
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)
Comment 3 Gustavo Carneiro 2005-06-04 13:13:46 UTC
Created attachment 47233 [details] [review]
patch updated to new pycairo cvs api; adds pangocairo module, including example ported from C
Comment 4 Gustavo Carneiro 2005-06-04 13:29:14 UTC
Sorry, I forgot to add the pangocairo module files.  I'm working on gdk stuff;
I'll post a full and corrected patch later...
Comment 5 Gustavo Carneiro 2005-06-04 15:47:31 UTC
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 6 Johan (not receiving bugmail) Dahlin 2005-06-06 21:19:46 UTC
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.
Comment 7 Gustavo Carneiro 2005-06-06 21:23:02 UTC
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.
Comment 8 Gustavo Carneiro 2005-06-06 22:32:04 UTC
OK.  Committed (using new pycairo macro).