|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T r
Length: 900 (0x384) Types: TextFile Names: »rgb_best.frag«
└─⟦8648bda34⟧ Bits:30007244 EUUGD5_II: X11R5 └─⟦2ca9b63e1⟧ »./contrib-1/contrib-1.00« └─⟦a8392fb20⟧ └─⟦this⟧ »contrib/examples/OReilly/Vol1/basicwin/color/rgb_best.frag«
Display *display; int screen; XStandardColormap best_map_info; /* structure to fill */ unsigned long whitepixel; /* computed pixel value for white */ Colormap colormap; Window window; Status status; XSetWindowAttributes attrib; /* so we can set colormap */ unsigned long attribmask; /* Open Display, etc. */ if (status = XGetStandardColormap(display, RootWindow(display, screen), &best_map_info, XA_RGB_BEST_MAP) == 0); printf("%s: can't get standard colormap", argv[0]); attrib.colormap = best_map_info.colormap; whitepixel = best_map_info.base_pixel + (best_map_info.red_max * best_map_info.red_mult) + (best_map_info.green_max * best_map_info.green_mult) + (best_map_info.blue_max * best_map_info.blue_mult); attrib.background_pixel = whitepixel; attribmask = CWBackPixel | CWColormap; XChangeWindowAttributes(display, window, attribmask, &attrib);