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 677388 - foreign: Register cairo.Path and cairo.FontOptions foreign structs
foreign: Register cairo.Path and cairo.FontOptions foreign structs
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: introspection
unspecified
Other All
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2012-06-04 13:42 UTC by Bastian Winkler
Modified: 2012-06-05 13:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
foreign: Register cairo.Path and cairo.FontOptions foreign structs (3.49 KB, patch)
2012-06-04 13:42 UTC, Bastian Winkler
none Details | Review
foreign: Register cairo.Path and cairo.FontOptions foreign structs (3.51 KB, patch)
2012-06-05 11:35 UTC, Bastian Winkler
none Details | Review

Description Bastian Winkler 2012-06-04 13:42:06 UTC
They are rarely used, but they are used at least by Gdk, PangoCairo and
Clutter.
Comment 1 Bastian Winkler 2012-06-04 13:42:08 UTC
Created attachment 215546 [details] [review]
foreign: Register cairo.Path and cairo.FontOptions foreign structs
Comment 2 Martin Pitt 2012-06-05 08:38:47 UTC
Thanks Bastian. Do you have a small example script or even a test case to demonstrate these?
Comment 3 Bastian Winkler 2012-06-05 11:32:45 UTC
thanks for asking, I just found a mistake.
cairo_font_options_from_arg() needs to copy the font_options
I'll update the patch

however, a simple example would be

>>> from gi.repository import Gtk
>>> window = Gtk.Window()
>>> screen = window.get_screen()
>>> options = screen.get_font_options()

for cairo.Path there is no real-world test case, as nobody but Clutter.Path uses this API (only as a in-arg, which should work). maybe I find something for demonstration...
Comment 4 Bastian Winkler 2012-06-05 11:35:37 UTC
Created attachment 215634 [details] [review]
foreign: Register cairo.Path and cairo.FontOptions foreign structs

Fixed cairo_font_options_from_arg()
Comment 5 Martin Pitt 2012-06-05 13:51:44 UTC
Thanks! I added a minimal test case for FontOptions, and made a note about cairo.Path.

http://git.gnome.org/browse/pygobject/commit/?id=b21f66d2a399b8c9a36a1758107b7bdff0ec8eaa