


XcmsStoreColor(3X11)					 XcmsStoreColor(3X11)
X11R5									X11R5



NAME
  XcmsStoreColor, XcmsStoreColors - set	colors

SYNTAX
  Status XcmsStoreColor(_d_i_s_p_l_a_y, _c_o_l_o_r_m_a_p, _c_o_l_o_r)
	Display	*_d_i_s_p_l_a_y;
	Colormap _c_o_l_o_r_m_a_p;
	XcmsColor *_c_o_l_o_r;

  Status XcmsStoreColors(_d_i_s_p_l_a_y, _c_o_l_o_r_m_a_p, _c_o_l_o_r_s, _n_c_o_l_o_r_s,
  _c_o_m_p_r_e_s_s_i_o_n__f_l_a_g_s__r_e_t_u_r_n)
	Display	*_d_i_s_p_l_a_y;
	Colormap _c_o_l_o_r_m_a_p;
	XcmsColor _c_o_l_o_r_s[];
	int _n_c_o_l_o_r_s;
	Bool _c_o_m_p_r_e_s_s_i_o_n__f_l_a_g_s__r_e_t_u_r_n[];

ARGUMENTS

  _d_i_s_p_l_a_y   Specifies the connection to	the X server.

  _c_o_l_o_r	    Specifies the color	cell and the color to store.  Values speci-
	    fied in this _X_c_m_s_C_o_l_o_r structure remain unchanged upon return.

  _c_o_l_o_r_s    Specifies the color	specification array of _X_c_m_s_C_o_l_o_r structures,
	    each specifying a color cell and the color to store	in that	cell.
	    Values specified in	the array remain unchanged upon	return.

  _c_o_l_o_r_m_a_p  Specifies the colormap.

  _c_o_m_p_r_e_s_s_i_o_n__f_l_a_g_s__r_e_t_u_r_n
	    Specifies an array of Boolean values for returning compression
	    status.  If	a non-NULL pointer is supplied,	each element of	the
	    array is set to _T_r_u_e if the	corresponding color was	compressed,
	    and	_F_a_l_s_e otherwise.  Pass NULL if the compression status is not
	    useful.

  _n_c_o_l_o_r_s   Specifies the number of _X_c_m_s_C_o_l_o_r structures in the	color specif-
	    ication array.

DESCRIPTION
  The _X_c_m_s_S_t_o_r_e_C_o_l_o_r function converts the color specified in the _X_c_m_s_C_o_l_o_r
  structure into RGB values and	then uses this RGB specification in an _X_C_o_l_o_r
  structure, whose three flags (_D_o_R_e_d, _D_o_G_r_e_e_n,	and _D_o_B_l_u_e) are	set, in	a
  call to _X_S_t_o_r_e_C_o_l_o_r to change	the color cell specified by the	pixel member
  of the _X_c_m_s_C_o_l_o_r structure.  This pixel value	must be	a valid	index for the
  specified colormap, and the color cell specified by the pixel	value must be
  a read/write cell.  If the pixel value is not	a valid	index, a _B_a_d_V_a_l_u_e
  error	results.  If the color cell is unallocated or is allocated read-only,
  a _B_a_d_A_c_c_e_s_s error results.  If the colormap is an installed map for its
  screen, the changes are visible immediately.

  Note that _X_S_t_o_r_e_C_o_l_o_r	has no return value; therefore,	a _X_c_m_s_S_u_c_c_e_s_s return
  value	from this function indicates that the conversion to RGB	succeeded and
  the call to _X_S_t_o_r_e_C_o_l_o_r was made.  To	obtain the actual color	stored,	use
  _X_c_m_s_Q_u_e_r_y_C_o_l_o_r.  Due to the screen's hardware	limitations or gamut compres-
  sion,	the color stored in the	colormap may not be identical to the color
  specified.

  _X_c_m_s_S_t_o_r_e_C_o_l_o_r can generate _B_a_d_A_c_c_e_s_s, _B_a_d_C_o_l_o_r, and _B_a_d_V_a_l_u_e	errors.

  The _X_c_m_s_S_t_o_r_e_C_o_l_o_r_s function converts	the colors specified in	the array of
  _X_c_m_s_C_o_l_o_r structures into RGB	values and then	uses these RGB specifications
  in an	_X_C_o_l_o_r structures, whose three flags (_D_o_R_e_d, _D_o_G_r_e_e_n, and _D_o_B_l_u_e) are
  set, in a call to _X_S_t_o_r_e_C_o_l_o_r_s to change the color cells specified by	the
  pixel	member of the corresponding _X_c_m_s_C_o_l_o_r structure.  Each pixel value
  must be a valid index	for the	specified colormap, and	the color cell speci-
  fied by each pixel value must	be a read/write	cell.  If a pixel value	is
  not a	valid index, a _B_a_d_V_a_l_u_e	error results.	If a color cell	is unallo-
  cated	or is allocated	read-only, a _B_a_d_A_c_c_e_s_s error results.  If more than
  one pixel is in error, the one that gets reported is arbitrary.  If the
  colormap is an installed map for its screen, the changes are visible
  immediately.

  Note that _X_S_t_o_r_e_C_o_l_o_r_s has no	return value; therefore, a _X_c_m_s_S_u_c_c_e_s_s return
  value	from this function indicates that conversions to RGB succeeded and
  the call to _X_S_t_o_r_e_C_o_l_o_r_s was made.  To obtain	the actual colors stored, use
  _X_c_m_s_Q_u_e_r_y_C_o_l_o_r_s.  Due	to the screen's	hardware limitations or	gamut
  compression, the colors stored in the	colormap may not be identical to the
  colors specified.

  _X_c_m_s_S_t_o_r_e_C_o_l_o_r_s can generate _B_a_d_A_c_c_e_s_s, _B_a_d_C_o_l_o_r, and	_B_a_d_V_a_l_u_e errors.

DIAGNOSTICS

  _B_a_d_A_c_c_e_s_s A client attempted to free a color map entry that it did not
	    already allocate.

  _B_a_d_A_c_c_e_s_s A client attempted to store	into a read-only color map entry.

  _B_a_d_C_o_l_o_r  A value for	a Colormap argument does not name a defined Colormap.

  _B_a_d_V_a_l_u_e  Some numeric value falls outside the range of values accepted by
	    the	request.  Unless a specific range is specified for an argu-
	    ment, the full range defined by the	argument's type	is accepted.
	    Any	argument defined as a set of alternatives can generate this
	    error.

SEE ALSO
  XcmsAllocColor(3X11),	XcmsQueryColor(3X11)
  _X_l_i_b - _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e	delim off























