DIRECTORY Commander, IO, Rope, X11CommanderOps, Xl, XlPredefinedAtoms, XlRGBColorMaps; X11ColorCommands: CEDAR MONITOR IMPORTS Commander, IO, X11CommanderOps, Xl, XlRGBColorMaps = BEGIN StandardColorMap: TYPE = XlRGBColorMaps.StandardColorMap; PrintStandardColorMaps: Commander.CommandProc = { Inner: X11CommanderOps.ConnectionProc = { PrintMap: PROC [map: StandardColorMap] = { IO.PutF[cmd.out, "colormap: 0x%x visualId: 0x%x\n", IO.card[Xl.ColorMapId[map.colormap]], IO.card[Xl.VisualId[map.visualId]]]; IO.PutF[cmd.out, " redMax: %g redMult: %g\n", IO.card[map.redMax], IO.card[map.redMult]]; IO.PutF[cmd.out, " greenMax: %g greenMult: %g\n", IO.card[map.greenMax], IO.card[map.greenMult]]; IO.PutF[cmd.out, " blueMax: %g blueMult: %g\n", IO.card[map.blueMax], IO.card[map.blueMult]]; IO.PutF[cmd.out, " basePixel: 0x%x killId: 0x%x\n -\n", IO.card[map.basePixel], IO.card[map.killId]]; }; GetPrintMaps: PROC [r: Rope.ROPE, mapKey: Xl.XAtom] = { maps: LIST OF StandardColorMap; IO.PutRope[cmd.out, r]; maps ¬ XlRGBColorMaps.GetRGBColorMaps[c: connection, w: Xl.DefaultRoot[connection], mapKey: mapKey]; IF maps=NIL THEN IO.PutRope[cmd.out, " none\n -\n"] ELSE { FOR l: LIST OF StandardColorMap ¬ maps, l.rest WHILE l#NIL DO PrintMap[l.first]; ENDLOOP; }; }; GetPrintMaps["Best standard color maps:\n", XlPredefinedAtoms.rgbBestMap]; GetPrintMaps["Default standard color maps:\n", XlPredefinedAtoms.rgbDefaultMap]; }; X11CommanderOps.DoWithConnection[Inner]; }; PrintScreen: Commander.CommandProc = { Inner: X11CommanderOps.ConnectionProc = { screen: Xl.Screen ¬ Xl.DefaultScreen[connection]; IO.PutF[cmd.out, " root: 0x%x defaultColorMap: 0x%x \n", IO.card[Xl.WindowId[screen.root]], IO.card[Xl.ColorMapId[screen.defaultColorMap]]]; IO.PutF[cmd.out, " whitePixel: 0x%x blackPixel: 0x%x\n", IO.card[screen.whitePixel], IO.card[screen.blackPixel]]; IO.PutF[cmd.out, " rootDepth: 0x%g rootVisual: 0x%x\n", IO.card[screen.rootDepth], IO.card[Xl.VisualId[screen.rootVisual]]]; IO.PutF[cmd.out, " nDepths: %g screenNumber: %g\n", IO.int[screen.nDepths], IO.int[screen.screenNumber]]; }; X11CommanderOps.DoWithConnection[Inner]; }; Commander.Register["X11PrintStandardColorMaps", PrintStandardColorMaps, "Print color map info"]; Commander.Register["X11PrintScreen", PrintScreen, "Print screen info"]; END. Θ X11ColorCommands.mesa Copyright Σ 1992 by Xerox Corporation. All rights reserved. Created by Christian Jacobi, August 27, 1992 6:42:21 pm PDT Christian Jacobi, October 22, 1993 4:48 pm PDT Κ2•NewlineDelimiter –(cedarcode) style™™Icodešœ Οeœ1™