12.07.2015 Views

Xlib − C Language X Interface

Xlib − C Language X Interface

Xlib − C Language X Interface

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Xlib</strong> − C LibraryX11, Release 6.7 DRAFTStatus XcmsQueryColors(display, colormap, colors_in_out, ncolors, result_format)Display *display;Colormap colormap;XcmsColor colors_in_out[];unsigned int ncolors;XcmsColorFormat result_format;displaycolormapcolors_in_outncolorsresult_formatSpecifies the connection to the X server.Specifies the colormap.Specifies an array of XcmsColor structures, each pixel member indicating thecolor cell to query. The color specifications for the color cells are returned inthese structures.Specifies the number of XcmsColor structures in the color-specification array.Specifies the color format for the returned color specification.The XcmsQueryColors function obtains the RGB values for pixel values in the pixel membersof XcmsColor structures and then converts the values to the target format as specified by theresult_format argument. If apixel is not a valid index into the specified colormap, a BadValueerror results. If more than one pixel is in error, the one that gets reported is arbitrary.XcmsQueryColors can generate BadColor and BadValue errors.6.8. Color Conversion Context FunctionsThis section describes functions to create, modify, and query Color Conversion Contexts (CCCs).Associated with each colormap is an initial CCC transparently generated by <strong>Xlib</strong>. Therefore,when you specify a colormap as an argument to a function, you are indirectly specifying a CCC.The CCC attributes that can be modified by the X client are:• Client White Point• Gamut compression procedure and client data• White point adjustment procedure and client dataThe initial values for these attributes are implementation specific. The CCC attributes for subsequentlycreated CCCs can be defined by changing the CCC attributes of the default CCC. Thereis a default CCC associated with each screen.6.8.1. Getting and Setting the Color Conversion Context of a ColormapTo obtain the CCC associated with a colormap, use XcmsCCCOfColormap.XcmsCCC XcmsCCCOfColormap(display, colormap)Display *display;Colormap colormap;displaycolormapSpecifies the connection to the X server.Specifies the colormap.The XcmsCCCOfColormap function returns the CCC associated with the specified colormap.Once obtained, the CCC attributes can be queried or modified. Unless the CCC associated with100

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!