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 705465 - Fix marshalling of CairoSurface to GValue
Fix marshalling of CairoSurface to GValue
Status: RESOLVED FIXED
Product: gjs
Classification: Bindings
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gjs-maint
gjs-maint
Depends on:
Blocks: 705511
 
 
Reported: 2013-08-04 21:41 UTC by Giovanni Campagna
Modified: 2014-01-15 16:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add GType annotations to Cairo structures (8.52 KB, patch)
2013-08-04 21:41 UTC, Giovanni Campagna
committed Details | Review
value: implement marshalling of foreign structures to GValue (3.37 KB, patch)
2013-08-04 21:41 UTC, Giovanni Campagna
none Details | Review
value: implement marshalling of foreign structures to GValue (4.27 KB, patch)
2013-08-07 09:10 UTC, Giovanni Campagna
committed Details | Review

Description Giovanni Campagna 2013-08-04 21:41:42 UTC
In particular to get CairoSurface working as a column in
GtkListStore
Comment 1 Giovanni Campagna 2013-08-04 21:41:44 UTC
Created attachment 250820 [details] [review]
Add GType annotations to Cairo structures

To get GValue marshalling we need to ensure that all
Cairo constructors have correct $gtype properties.
Comment 2 Giovanni Campagna 2013-08-04 21:41:49 UTC
Created attachment 250821 [details] [review]
value: implement marshalling of foreign structures to GValue

Previously when setting a GValue we would require a real boxed
structure, but for foreign types the JS code should never see
them, so allow passing a foreign wrapper instead.
Comment 3 Giovanni Campagna 2013-08-07 09:10:29 UTC
Created attachment 251039 [details] [review]
value: implement marshalling of foreign structures to GValue

Previously when setting a GValue we would require a real boxed
structure, but for foreign types the JS code should never see
them, so allow passing a foreign wrapper instead.

Now with passing tests!
Comment 4 Cosimo Cecchi 2014-01-12 02:52:43 UTC
It would be nice to get these patches reviewed - it would make it possible to support Hi-Dpi with applications using GtkListStore from JS.
Comment 5 Jasper St. Pierre (not reading bugmail) 2014-01-12 16:26:40 UTC
Review of attachment 250820 [details] [review]:

::: modules/cairo-gradient.c
@@ +25,3 @@
 #include <gjs/gjs-module.h>
 #include <gjs/compat.h>
+#include <gi/gtype.h>

Do these really require a gtype.h include? If it's required by jsapi-util.h, can we put it in there instead?
Comment 6 Jasper St. Pierre (not reading bugmail) 2014-01-12 18:44:47 UTC
Review of attachment 251039 [details] [review]:

OK.
Comment 7 Giovanni Campagna 2014-01-15 16:31:34 UTC
Pushed with suggested change.

Attachment 250820 [details] pushed as 9a08cfd - Add GType annotations to Cairo structures
Attachment 251039 [details] pushed as 080797c - value: implement marshalling of foreign structures to GValue