[Xcb] dealing with colors

Jean-Loup Defaisse jloupdef at gmail.com
Wed Aug 6 15:19:11 PDT 2008

Hello everyone,

I started few days ago a gui creation with Xlib, but i found xcb yesterday
and decided try it. I modified my code quiet easily (it wasn't really long)
except for the color. How should i replace
    XAllocColor(WinInf->dpy, WinInf->cmap, &c);
    XSetForeground(WinInf->dpy, WinInf->gc, c.pixel);

I tried by using xcb_alloc_color but i didn't succeed (all my drawings were

Any idee?
Else, is there a simple example just drawing colored points in an empty

thanks in advance!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/xcb/attachments/20080807/500ba82c/attachment.html 

More information about the Xcb mailing list