Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

xmsetcolorcalculation(3) [redhat man page]

XmSetColorCalculation(library call)									       XmSetColorCalculation(library call)

NAME
XmSetColorCalculation -- A function to set the procedure used for default color calculation SYNOPSIS
#include <Xm/Xm.h> XmColorProc XmSetColorCalculation( XmColorProc color_proc); DESCRIPTION
XmSetColorCalculation sets the procedure to calculate default colors. This procedure is used to calculate the foreground, top shadow, bot- tom shadow, and select colors on the basis of a given background color. If called with an argument of NULL, it restores the default proce- dure used to calculate colors. color_proc Specifies the procedure to use for color calculation. Following is a description of the XmColorProc type used by XmSetColorCalculation: void (*color_proc) (background_color, foreground_color, select_color, top_shadow_color, bottom_shadow_color) XColor *background_color; XColor *foreground_color; XColor *select_color; XColor *top_shadow_color; XColor *bottom_shadow_color; (void) Specifies the procedure used to calculate default colors. The procedure is passed a pointer to an XColor structure representing the back- ground color. The pixel, red, green, and blue members of this structure are filled in with values that are valid for the current colormap. The procedure is passed pointers to XColor structures representing the foreground, select, top shadow, and bottom shadow colors to be cal- culated. The procedure calculates and fills in the red, green, and blue members of these structures. The procedure should not allocate color cells for any of these colors. background_color Specifies the background color. foreground_color Specifies the foreground color to be calculated. select_color Specifies the select color to be calculated. top_shadow_color Specifies the top shadow color to be calculated. bottom_shadow_color Specifies the bottom shadow color to be calculated. RETURN
Returns the color calculation procedure that was used at the time this routine was called. RELATED
XmChangeColor(3), XmGetColors(3), and XmGetColorCalculation(3). XmSetColorCalculation(library call)

Check Out this Related Man Page

XCreatePixmapCursor()													     XCreatePixmapCursor()

Name
  XCreatePixmapCursor - create a cursor from two bitmaps.

Synopsis
  Cursor XCreatePixmapCursor(display, source, mask, foreground_color,
  background_color, x, y)
	Display *display;
	Pixmap source;
	Pixmap mask;
	XColor *foreground_color;
	XColor *background_color;
	unsigned int x, y;

Arguments
  display   Specifies a connection to an X server; returned from XOpenDisplay().

  source    Specifies the shape of the source cursor.  A pixmap of depth 1.

  mask	    Specifies the bits of the cursor that are to be displayed (the mask or stipple).  A pixmap of depth 1.  May be None.

  foreground_color
	    Specifies the red, green, and blue (RGB) values for the foreground.

  background_color
	    Specifies the red, green, and blue (RGB) values for the background.

  x	    Specify the coordinates of the cursor's hotspot relative to the source's origin.  Must be a point within the source.
  y
Returns
  The created cursor.

Description
  XCreatePixmapCursor()  creates  a  cursor  and  returns  a  cursor  ID.  Foreground and background RGB values must be specified using fore-
  ground_color and background_color, even if the server only has a monochrome screen.  The foreground_color is used for the  1	bits  in  the
  source, and the background is used for the 0 bits.  Both source and mask (if specified) must have depth 1, but can have any root.  The mask
  pixmap defines the shape of the cursor; that is, the 1 bits in the mask define which source pixels will be displayed.  If no mask is given,
  all pixels of the source are displayed.  The mask, if present, must be the same size as the source.

  The pixmaps can be freed immediately if no further explicit references to them are to be made.

  For more information on cursors, see Volume One, Chapter 6, Drawing Graphics and Text.

Structures
     typedef struct {
	 unsigned long pixel;
	 unsigned short red, green, blue;
	 char flags;	/* DoRed, DoGreen, DoBlue */
	 char pad;
     } XColor;

Errors
  BadAlloc

  BadMatch  Mask bitmap must be the same size as source bitmap.

  BadPixmap

See Also
  XCreateBitmapFromData(),   XDefineCursor(),  XCreateFontCursor(),  XCreatePixmap(),  XCreatePixmapCursor(),  XFreeCursor(),  XFreePixmap(),
  XQueryBestCursor(), XQueryBestCursor(), XQueryBestSize(), XQueryBestSize(), XReadBitmapFile(), XRecolorCursor(), XUndefineCursor().

Xlib - Pixmaps and Tiles												     XCreatePixmapCursor()
Man Page