Lines Matching defs:vinfo

179     XVisualInfo vtemp, *vinfo;
204 vinfo = XGetVisualInfo(dpy, VisualIDMask, &vtemp, &nvis);
208 vinfo = PickCorrectVisual(dpy, vinfo, nvis, grayRamp->colormap);
210 if (vinfo == NULL) return 0;
224 if ((vinfo->class == StaticGray || vinfo->class == GrayScale) &&
241 grayRamp->colormap = XCreateColormap(dpy, drawable, vinfo->visual,
247 gotCube = GetColorCubeFromProperty(dpy, vinfo, colorCube,
250 gotRamp = GetGrayRampFromProperty(dpy, vinfo, grayRamp,
257 GetDatabaseValues(dpy, vinfo, colorCube, grayRamp);
264 AllocateColorCube(dpy, vinfo, colorCube, &pixels);
274 AllocateGrayRamp(dpy, vinfo, grayRamp, colorCube, &pixels);
290 p = XCreatePixmap(dpy, RootWindow(dpy, vinfo->screen), 1, 1, 1);
292 colorCube->visualid = vinfo->visualid;
294 DefineProperty(dpy, colorCube, vinfo, propCube, nPropCube,
298 grayRamp->visualid = vinfo->visualid;
300 DefineProperty(dpy, grayRamp, vinfo, propRamp, nPropRamp,
301 (vinfo->class == GrayScale ? XA_RGB_GRAY_MAP :
328 XFree((void *) vinfo);
398 XVisualInfo *vinfo)
400 unsigned long max = 1 << vinfo->depth;
414 XVisualInfo *vinfo)
416 unsigned long max = 1 << vinfo->depth;
429 XVisualInfo *vinfo,
438 gotCube = XGetRGBColormaps(dpy, RootWindow(dpy, vinfo->screen), cube,
446 c->visualid == vinfo->visualid &&
447 ValidCube(c, vinfo)) {
468 XVisualInfo *vinfo,
478 if (vinfo->class == GrayScale) grayAtom = XA_RGB_GRAY_MAP;
481 gotRamp = XGetRGBColormaps(dpy, RootWindow(dpy, vinfo->screen), ramp,
489 c->visualid == vinfo->visualid &&
490 ValidRamp(c, vinfo)) {
507 XVisualInfo *vinfo,
516 switch (vinfo->class) {
526 if (vinfo->depth >= 24) depth = "24.";
527 else if (vinfo->depth >= 12) depth = "12.";
528 else if (vinfo->depth >= 8) depth = "8.";
529 else if (vinfo->depth >= 4) depth = "4.";
530 else if (vinfo->depth >= 2) depth = "2.";
540 if (colorCube == NULL && vinfo->class == TrueColor) {
548 switch (vinfo->class) {
556 ColorValuesFromMask(vinfo->red_mask, &colorCube->red_max,
558 ColorValuesFromMask(vinfo->green_mask, &colorCube->green_max,
560 ColorValuesFromMask(vinfo->blue_mask, &colorCube->blue_max,
567 ColorValuesFromMask(vinfo->red_mask, &max,
569 ColorValuesFromMask(vinfo->green_mask, &max,
571 ColorValuesFromMask(vinfo->blue_mask, &max,
609 FindStaticColorCube(dpy, vinfo, colorCube);
614 switch (vinfo->class) {
634 FindStaticGrayRamp(dpy, vinfo, grayRamp, colorCube);
856 XVisualInfo *vinfo,
862 entries = 1 << vinfo->depth;
1084 XVisualInfo *vinfo,
1092 entries = 1 << vinfo->depth;
1199 XVisualInfo *vinfo,
1210 if (vinfo->class == TrueColor || vinfo->class == StaticColor) return;
1212 if (vinfo->class == DirectColor) {
1213 if ((i = shiftdown(vinfo->red_mask)) > colorCube->red_max)
1215 if ((i = shiftdown(vinfo->green_mask)) > colorCube->green_max)
1217 if ((i = shiftdown(vinfo->blue_mask)) > colorCube->blue_max)
1227 delta = lowbit(vinfo->red_mask) + lowbit(vinfo->green_mask) +
1228 lowbit(vinfo->blue_mask);
1237 pixels->pixels = (unsigned long *) calloc(vinfo->colormap_size,
1244 if (!AllocateColormap(dpy, colorCube, vinfo, &count, pixels,
1258 if (vinfo->class == PseudoColor) {
1288 XVisualInfo *vinfo,
1299 if (vinfo->class != PseudoColor && vinfo->class != GrayScale &&
1300 vinfo->class != DirectColor) return;
1302 if (vinfo->class == DirectColor) {
1303 delta = lowbit(vinfo->red_mask) + lowbit(vinfo->green_mask) +
1304 lowbit(vinfo->blue_mask);
1324 pixels->pixels = (unsigned long *) calloc(vinfo->colormap_size,
1332 if (!AllocateColormap(dpy, grayRamp, vinfo, &count, pixels,
1382 XVisualInfo *vinfo,
1394 npixels = vinfo->colormap_size;
1403 if (map->blue_max == 0 || vinfo->class == DirectColor) total = 2;
1407 top = vinfo->colormap_size - 1;
1446 if (((map->blue_max == 0 || vinfo->class == DirectColor) &&
1448 ShrinkMapToFit(map, count, vinfo);
1534 XVisualInfo *vinfo)
1537 else if (vinfo->class == DirectColor) {
1568 XVisualInfo *vinfo,
1577 XSetRGBColormaps(dpy, RootWindow(dpy, vinfo->screen), map, 1, atom);
1587 if (vinfo->visual == DefaultVisual(dpy, vinfo->screen) &&
1588 map->colormap == DefaultColormap(dpy, vinfo->screen)) {
1599 XSetRGBColormaps(dpy, RootWindow(dpy, vinfo->screen), copy, nProp+1, atom);