[Xcb] dealing with colors

Peter Harris peter.harris at hummingbird.com
Thu Aug 7 07:40:48 PDT 2008

Jean-Loup Defaisse wrote:
>  That's why i'm looking to a function corresponding to 
> XSetForeground to select the color i want.

XSetForeground is just a wrapper around XChangeGC. Perhaps you want 
something like this (untested)?

void my_set_foreground(xcb_connection_t *c, xcb_gcontext_t gc,
			const uint32_t color)
     xcb_change_gc(c, gc, XCB_GC_FOREGROUND, &color);

Peter Harris
      Hummingbird Connectivity - A Division of Open Text
Peter Harris                    http://connectivity.hummingbird.com
Research and Development        Phone: +1 905 762 6001
peter.harris at hummingbird.com    Toll Free: 1 877 359 486

More information about the Xcb mailing list