NAME
xcballoccolor - Allocate a color SYNOPSIS
#include
Request function xcballoccolorcookiet xcballoccolor(xcbconnectiont *conn, xcbcolormapt cmap, uint16t red, uint16t green, uint16t blue); Reply datastructure typedef struct xcballoccolorreplyt { uint8t responsetype; uint8t pad0; uint16t sequence; uint32t length; uint16t red; uint16t green; uint16t blue; uint8t pad1[2]; uint32t pixel; } xcballoccolorreplyt; Reply function xcballoccolorreplyt *xcballoccolorreply(xcbconnectiont *conn, xcballoccolorcookiet cookie, xcbgenericerrort **e); REQUEST ARGUMENTS conn The XCB connection to X11. cmap TODO red The red value of your color. green The green value of your color. blue The blue value of your color. REPLY FIELDS responsetype The type of this reply, in this case XCBALLOCCOLOR. This field is also present in the xcbgenericreplyt and can be used to tell replies apart from each other. sequence The sequence number of the last request processed by the X11 server. length The length of the reply, in words (a word is 4 bytes). red TODO: NOT YET DOCUMENTED. green TODO: NOT YET DOCUMENTED. blue TODO: NOT YET DOCUMENTED. pixel TODO: NOT YET DOCUMENTED. DESCRIPTION Allocates a read-only colormap entry corresponding to the closest RGB value supported by the hardware. If you are using TrueColor, you can take a shortcut and directly calculate the color pixel value to avoid
the round trip. But, for example, on 16-bit color setups (VNC), you can easily get the closest supported RGB value to the RGB value you are specifying. RETURN VALUE Returns an xcballoccolorcookiet. Errors have to be handled when calling the reply function xcballoccolorreply. If you want to handle errors in the event loop instead, use xcbal‐
loccolorunchecked. See xcb-requests(3) for details. ERRORS xcbcolormaperrort The specified colormap cmap does not exist. SEE ALSO
xcb-requests(3) AUTHOR Generated from xproto.xml. Contact xcb@lists.freedesktop.org for cor‐ rections and improvements. X Version 11 libxcb 1.13 xcballoccolor(3)