Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
XmtRegisterColor(3)	    Library Functions Manual	     XmtRegisterColor(3)

NAME
     XmtRegisterColor(),  XmtVaRegisterColors(),  XmtRegisterColors(), XmtRegis-
     terPixel(), XmtRegisterStandardColors() - define symbolic color names in  a
     color table.

SYNOPSIS
     #include <Xmt/Color.h>

     void XmtRegisterColor(XmtColorTable table, String symbolic_name, String
		    color_name)

     void XmtVaRegisterColors(XmtColorTable table, { String symbolic_name,
		    String color_name, } NULL)

     void XmtRegisterColors(XmtColorTable table, XmtColorPair *colors, Cardinal
		    num)

     void XmtRegisterPixel(XmtColorTable table, String symbolic_name, Display
		    *display, Colormap colormap, Pixel pixel)

     void XmtRegisterStandardColors(XmtColorTable table, Widget w, Pixel
		    foreground, Pixel background)

     typedef struct { String symbolic_name;
		    String color_name;
     } XmtColorPair;

ARGUMENTS
     INPUTS

	  table  The XmtColorTable in which the color or colors are to be regis-
		 tered.

	  symbolic_name
		 The symbolic name of the color to be registered.  For XmtVaReg-
		 isterColors(),  this  is  part  of  a NULL terminated variable-
		 length argument list and may be repeated any number of times.

	  color_name
		 The color name to be associated with  the  symbolic  name.  For
		 XmtVaRegisterColors(),  this is part of a NULL-terminated vari-
		 able-length argument list and may be  repeated  any  number  of
		 times.

	  colors For  XmtRegisterColors(),  an	array of XmtColorPair structures
		 that define symbolic names and their associated color names.

	  num	 For XmtRegisterColors(), the number of elements in  the  colors
		 array.

	  displayFor  XmtRegisterPixel(),  the	X  display on which pixel is de-
		 fined.

	  colormap
		 For XmtRegisterPixel(), the colormap in which pixel is defined.

	  pixel  For XmtRegisterPixel(), the pixel value that is  to  be  regis-
		 tered with symbolic_name.

	  w	 For  XmtRegisterStandardColors(), any widget in the application
		 that specifies a display and colormap for which the  foreground
		 and background pixels are valid.

	  foreground
		 For  XmtRegisterStandardColors(), a foreground color to be reg-
		 istered in table.

	  background
		 For XmtRegisterStandardColors(), a background color to be  used
		 to register the other ``standard'' colors in table.

DESCRIPTION
     These  functions  all  provide  ways  of defining symbolic names for actual
     color names in an XmtColorTable.  XmtRegisterColor() is the simplest-it as-
     sociates symbolic_name with color_name in table.

     XmtVaRegisterColors() is like XmtRegisterColor(), except  that  it  uses  a
     NULL-terminated  variable-length  argument  list to associate any number of
     symbolic_name and color_name pairs in table.

     XmtRegisterColors() is a variation on  XmtVaRegisterColors()  that  uses  a
     counted array of XmtColorPair structures instead of a variable-length argu-
     ment list of symbolic_name/color_name pairs.

     XmtRegisterPixel()  defines  a symbolic name for an already allocated pixel
     value. Note that it requires Display * and Colormap  arguments  to  specify
     where the pixel is valid. The pixel value is registered by querying the RGB
     components  of  the  color  and converting these to a hexidecimal RGB color
     specification.

     XmtRegisterStandardColors() registers a  number  of  ``standard''	symbolic
     colors  based  on	the  specified	foreground  and background colors. These
     ``standard'' colors are the same ones that appear by default  in  the  col-
     orTable application resource. They are listed in the table.

		   |
     Symbolic name | Color Registered
     --------------+--------------------------------------------------------------------
     foreground    | the specified foreground color
     background    | the specified background color
     top_shadow    | a lighter shade of the background; for shadows
     bottom_shadow | a darker shade of the background; for shadows
     select	   | a slightly darker shade of the background; for armed buttons, etc.

SEE ALSO
     Chapter 4, Using Color,
     XmtColorTableGetParent(), XmtColorTableSetParent(), XmtCreateColorTable(),
     XmtDestroyColorTable(), XmtLookupColorName().

Xmt				   Motif Tools		     XmtRegisterColor(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=XmtRegisterColor&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help