I’m at LGM this year, and so far it’s rocking pretty hard. The number one question people have asked is “how do I get the screen profile for a window“. I figured this should be easy to get using colord, and then spent a few minutes working on some proof-of-concept code. This ballooned into a couple of hours doing it properly asynchronously and making it work correctly on multihead, and the result was a few hundred lines of complicated code with quite a few exit points. I don’t want people to add 300 lines of boilerplate to their project just to map a GtkWindow to a .icc filename.
So I’m now shipping an additional optional colord-gtk helper library in colord that allow you to use one async function to get the profile a given widget should use. There’s a demo available here.
The alternative is of course to read the X11 _ICC_PROFILE atom, but that does not support multi-head, and really won’t work when we move to Wayland. It’s also not a lot of fun grabbing lots of binary data from the xserver in a GUI program. In the long term future we’ll be doing full screen color management in shaders, with full toolkit support using Wayland, but that’s a few years from being reality. If you’ve got any ideas or have comments about the API, let us know on the mailing list. Thanks.
The alternative is of course to read the X11 _ICC_PROFILE atom, but that does not support multi-head
http://wiki.inkscape.org/wiki/index.php/Release_notes/0.46#XICC_Support
Sure, and I think inskcape might be the *only* program that does it correctly — it’s just hugely complicated to get right — it doesn’t help that the monitor index isn’t actually defined anywhere… Using a DBus call means we can get all the Changed notifications when the user does things like change the display profile default and that kind of thing. GIMP does a half arsed version of version 0.2, although fails hard if you move the window across the head or the display profile is changed.
I’m impressed you found some time to do some programming during LGM/Linuxwochen, I didn’t even get around to reading the blogs! (I’m catching up now. ;-))