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

FreeBSD Manual Pages


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

       XmtRegisterColor(), XmtVaRegisterColors(), XmtRegisterColors(), XmtReg-
       isterPixel(), XmtRegisterStandardColors() - define symbolic color names
       in a color table.

       #include	<Xmt/Color.h>

       void XmtRegisterColor(XmtColorTable table, String symbolic_name,	String

       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;


	    table  The XmtColorTable in	which the color	or colors  are	to  be

		   The	symbolic name of the color to be registered.  For Xmt-
		   VaRegisterColors(), this is part of a NULL terminated vari-
		   able-length argument	list and may be	repeated any number of

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

	    colors For	XmtRegisterColors(),  an  array	of XmtColorPair	struc-
		   tures that define symbolic names and	their associated color

	    num	   For XmtRegisterColors(), the	number of elements in the col-
		   ors array.

		   For XmtRegisterPixel(), the X display  on  which  pixel  is

		   For	XmtRegisterPixel(),  the  colormap  in	which pixel is

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

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

		   For	XmtRegisterStandardColors(),  a	foreground color to be
		   registered in table.

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

       These  functions	all provide ways of defining symbolic names for	actual
       color names in an XmtColorTable.	 XmtRegisterColor() is the simplest-it
       associates 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
       argument	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 hex-
       idecimal	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
       colorTable 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.

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

Xmt				  Motif	Tools		   XmtRegisterColor(3)


Want to link to this manual page? Use this URL:

home | help