


XmSetColorCalculation(3X)			    XmSetColorCalculation(3X)
OSF/Motif							    OSF/Motif



NAME
  XXmmSSeettCCoolloorrCCaallccuullaattiioonn	- A function to	set the	procedure used for default
  color	calculation

SYNOPSIS


  ##iinncclluuddee <<XXmm//XXmm..hh>>
  XXmmCCoolloorrPPrroocc XXmmSSeettCCoolloorrCCaallccuullaattiioonn ((_c_o_l_o_r__p_r_o_c))
       XXmmCCoolloorrPPrroocc_c_o_l_o_r__p_r_o_c;;

DESCRIPTION
  XXmmSSeettCCoolloorrCCaallccuullaattiioonn	sets the procedure to calculate	default	colors.	 This
  procedure is used to calculate the foreground, top shadow, bottom shadow,
  and select colors on the basis of a given background color.  If called with
  an argument of NULL, it restores the default procedure used to calculate
  colors.

  _c_o_l_o_r__p_r_o_c
	 Specifies the procedure to use	for color calculation.

  Following is a description of	the XXmmCCoolloorrPPrroocc	type used by XXmmSSeettCCoolloorrCCaallccuu--
  llaattiioonn:

  vvooiidd ((**_c_o_l_o_r__p_r_o_c)) ((_b_a_c_k_g_r_o_u_n_d__c_o_l_o_r,	_f_o_r_e_g_r_o_u_n_d__c_o_l_o_r,
	    _s_e_l_e_c_t__c_o_l_o_r, _t_o_p__s_h_a_d_o_w__c_o_l_o_r, _b_o_t_t_o_m__s_h_a_d_o_w__c_o_l_o_r))
       XXCCoolloorr	 *_b_a_c_k_g_r_o_u_n_d__c_o_l_o_r;;
       XXCCoolloorr	 *_f_o_r_e_g_r_o_u_n_d__c_o_l_o_r;;
       XXCCoolloorr	 *_s_e_l_e_c_t__c_o_l_o_r;;
       XXCCoolloorr	 *_t_o_p__s_h_a_d_o_w__c_o_l_o_r;;
       XXCCoolloorr	 *_b_o_t_t_o_m__s_h_a_d_o_w__c_o_l_o_r;;

  Specifies the	procedure used to calculate default colors.  The procedure is
  passed a pointer to an XXCCoolloorr	structure representing the background color.
  The _p_i_x_e_l, _r_e_d, _g_r_e_e_n, and _b_l_u_e members of this structure are	filled in
  with values that are valid for the current colormap.

  The procedure	is passed pointers to XXCCoolloorr structures	representing the
  foreground, select, top shadow, and bottom shadow colors to be calculated.
  The procedure	calculates and fills in	the _r_e_d, _g_r_e_e_n,	and _b_l_u_e members of
  these	structures.  The procedure should not allocate color cells for any of
  these	colors.

  _b_a_c_k_g_r_o_u_n_d__c_o_l_o_r
	 Specifies the background color.

  _f_o_r_e_g_r_o_u_n_d__c_o_l_o_r
	 Specifies the foreground color	to be calculated.

  _s_e_l_e_c_t__c_o_l_o_r
	 Specifies the select color to be calculated.

  _t_o_p__s_h_a_d_o_w__c_o_l_o_r
	 Specifies the top shadow color	to be calculated.

  _b_o_t_t_o_m__s_h_a_d_o_w__c_o_l_o_r
	 Specifies the bottom shadow color to be calculated.

RETURN VALUE
  Returns the color calculation	procedure that was used	at the time this rou-
  tine was called.

RELATED	INFORMATION
  XXmmCChhaannggeeCCoolloorr((33XX)), XXmmGGeettCCoolloorrss((33XX)), and XXmmGGeettCCoolloorrCCaallccuullaattiioonn((33XX)).




























































