Bug 51210 - ColordGtk introspection is crippled
Summary: ColordGtk introspection is crippled
Status: RESOLVED FIXED
Alias: None
Product: colord
Classification: Unclassified
Component: libcolord (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Richard Hughes
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-18 15:58 UTC by Evan Nemerson
Modified: 2012-06-26 13:11 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
introspection: assorted colord-gtk introspection fixes (1.75 KB, patch)
2012-06-18 16:03 UTC, Evan Nemerson
Details | Splinter Review
Fix Vala binding generation for colord-gtk (1.43 KB, patch)
2012-06-18 16:05 UTC, Evan Nemerson
Details | Splinter Review
Add a Vala version of cd-gtk-demo. (2.26 KB, patch)
2012-06-18 16:07 UTC, Evan Nemerson
Details | Splinter Review

Description Evan Nemerson 2012-06-18 15:58:38 UTC
Currently the introspection support is basically broken.  The C headers expose Colord API (CdColorRGB and CdProfile) but don't #include the relevant headers.  Compilation succeeds because they are just pointers, but g-ir-scanner is hit pretty hard and the resulting GIR is crippled (for example, cd_window_get_profile_finish doesn't make it in).

Fixing it is a bit complicated... the headers get installed, so something like including "../libcolord/cd-color.h" isn't really an option.  <colord.h> doesn't work because it will attempt to <colord/*.h> (instead of *.h).  AFAICT nothing will work both before and after installation.

Splitting libcolord-gtk out as suggested in bug #50529 would make this easy to resolve.
Comment 1 Evan Nemerson 2012-06-18 16:03:39 UTC
Created attachment 63194 [details] [review]
introspection: assorted colord-gtk introspection fixes

This can be applied now (it shouldn't hurt anything), but it doesn't really make much of a difference until after the issue with the headers is resolved.
Comment 2 Evan Nemerson 2012-06-18 16:05:57 UTC
Created attachment 63195 [details] [review]
Fix Vala binding generation for colord-gtk

This will get Vala bindings building against the GIR.  Again, this shouldn't hurt anything, they'll just be a bit limited for now.
Comment 3 Evan Nemerson 2012-06-18 16:07:41 UTC
Created attachment 63196 [details] [review]
Add a Vala version of cd-gtk-demo.

A Vala port of cd-gtk-demo.  Depends on the header issue being resolved, so it should't be committed yet.
Comment 4 Evan Nemerson 2012-06-19 01:13:07 UTC
(In reply to comment #0)
> Compilation succeeds because they are just pointers, but g-ir-scanner is hit

Sorry, don't know why I was thinking this was an issue with dereferencing a pointer to an incomplete type... compilation doesn't fail becuase the C files cheat and include the relevant headers from ../libcolord first.  AFAIK it's not possible to do something similar with g-ir-scanner.
Comment 5 Richard Hughes 2012-06-26 04:18:59 UTC
I've applied all your patches, thanks. I also split colord-gtk out into it's own module, so it should be a lot easier to fix up the remaining issues.

Could you clone https://gitorious.org/colord/colord-gtk and fix up any of the remaining issues you can see for vala? Thanks.
Comment 6 Evan Nemerson 2012-06-26 13:11:00 UTC
Looks good to me, so I'm closing this bug.  Feel free to assign any Vala bugs to me.


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.