FreeBSD Manual Pages
XmtRegisterColor(3) Library Functions Manual XmtRegisterColor(3) NAME XmtRegisterColor(), XmtVaRegisterColors(), XmtRegisterColors(), XmtReg- isterPixel(), 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 registered. symbolic_name 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 times. color_name 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 names. num For XmtRegisterColors(), the number of elements in the col- ors array. display For XmtRegisterPixel(), the X display on which pixel is defined. colormap For XmtRegisterPixel(), the colormap in which pixel is defined. 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. foreground For XmtRegisterStandardColors(), a foreground color to be registered 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 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. SEE ALSO Chapter 4, Using Color, XmtColorTableGetParent(), XmtColorTableSetParent(), XmtCreateColorTable(), XmtDestroyColorTable(), XmtLookupColorName(). Xmt Motif Tools XmtRegisterColor(3)
NAME | SYNOPSIS | ARGUMENTS | DESCRIPTION | SEE ALSO
Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=XmtRegisterColor&sektion=3&manpath=FreeBSD+13.0-RELEASE+and+Ports>