REF XColor A. Schoter, Jul 1991 Revised: Adrian Howard, Jun 1993 COPYRIGHT University of Sussex 1993. All Rights Reserved. >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> <<<<<<<<<<<<<<<<<<<<< >>>>>>>>>>>>>>>>>>>>>> <<<<<<<<<<<<<<<<<<<<< DETAILS OF XCOLOR STRUCTURE >>>>>>>>>>>>>>>>>>>>>> <<<<<<<<<<<<<<<<<<<<< >>>>>>>>>>>>>>>>>>>>>> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< The following details the contents of LIB * XColor which contains the XColor type specification used in functions for the manipulation of colours and colormaps (see REF * XColorcells.) For historical reasons LIB * XColor also contains constants relating to cursors, tiling, and stipples. See REF * XCursors and REF * XTile for more information. CONTENTS - (Use g to access required sections) 1 LIB XColor 1.1 Cursor and Tiling Constants 1.2 The XColor Structure ------------- 1 LIB XColor ------------- To load LIB * XColor do: uses xlib, XColor; The type specification and constants supplied by this library are direct equivalents of the Xlib C type and constants. For information on the C XColor type see section 5.1 'Colormap Functions' in: Xlib - C Language X Interface MIT X Consortium Standard X Version 11, Release 4 Copyright (C) 1985, 1986, 1987, 1988, 1989 Massachusetts Institute of Technology, Cambridge, Massachusetts, and Digital Equipment Corporation, Maynard, Massachusetts. 1.1 Cursor and Tiling Constants -------------------------------- The following constants are defined in LIB * XColor. CursorShape -> 0 [constant macro] TileShape -> 1 [constant macro] StippleShape -> 2 [constant macro] See REF * XCursors and * XTile for the use of these constants. 1.2 The XColor Structure ------------------------- The following types are defined in LIB * XColor. They are created with LIB * NEWC_DEC, see HELP * NEWC_DEC for more information on how to access them. XColor [typespec] The XColor structure is used in functions which manipulate colors and colormaps. See REF * XColorcells for examples. typedef struct { unsigned long pixel; unsigned short red, green, blue; char flags; char pad; } XColor; The pixel field contains the number of the colour cell in the colormap. The red, green, and blue fields indicate the relative levels of red, green, and blue in the image. They are scaled between 0 (off) and 65535 (full on) independent of the bit depth of the display hardware being used. The flags field is used in some functions to indicate which of the red, green, and blue fields is used. It is made up of an inclusive-or of the constants * DoRed, * DoGreen, and * DoBlue. The pad field is ignored by all functions using XColor structures and can take any value. consXColor(pixel, red, green, blue, flags, pad) -> colorptr [procedure] destXColor(colorptr) -> (pixel, red, green, blue, flags, pad)[procedure] initXColor(false or exptrclass) -> colorptr [procedure] isXColor(item) -> bool [procedure] Procedures for constructing and accessing * XColor structures. See HELP * NEWC_DEC and HELP * EXTERNAL for more information on their usage. XColor_key -> key [key] The key of * XColor structures --- C.x/x/pop/ref/XColor --- Copyright University of Sussex 1993. All rights reserved.