home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-bin / x11r6.1 / man / cat3 / xcmsstorecolors.0 < prev    next >
Encoding:
Text File  |  1996-10-17  |  6.4 KB  |  199 lines

  1.  
  2.  
  3.  
  4. XcmsStoreColor(3X11)      XLIB FUNCTIONS     XcmsStoreColor(3X11)
  5.  
  6.  
  7. NNAAMMEE
  8.        XcmsStoreColor, XcmsStoreColors - set colors
  9.  
  10. SSYYNNTTAAXX
  11.        Status XcmsStoreColor(_d_i_s_p_l_a_y, _c_o_l_o_r_m_a_p, _c_o_l_o_r)
  12.          Display *_d_i_s_p_l_a_y;
  13.          Colormap _c_o_l_o_r_m_a_p;
  14.          XcmsColor *_c_o_l_o_r;
  15.  
  16.        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,
  17.        _c_o_m_p_r_e_s_s_i_o_n___f_l_a_g_s___r_e_t_u_r_n)
  18.          Display *_d_i_s_p_l_a_y;
  19.          Colormap _c_o_l_o_r_m_a_p;
  20.          XcmsColor _c_o_l_o_r_s[];
  21.          int _n_c_o_l_o_r_s;
  22.          Bool _c_o_m_p_r_e_s_s_i_o_n___f_l_a_g_s___r_e_t_u_r_n[];
  23.  
  24. AARRGGUUMMEENNTTSS
  25.        _d_i_s_p_l_a_y     Specifies the connection to the X server.
  26.  
  27.        _c_o_l_o_r     Specifies the color cell and the color to store.
  28.          Values specified in this _X_c_m_s_C_o_l_o_r structure
  29.          remain unchanged on return.
  30.  
  31.        _c_o_l_o_r_s     Specifies the color specification array of _X_c_m_s_-
  32.          _C_o_l_o_r structures, each specifying a color cell
  33.          and the color to store in that cell.  Values
  34.          specified in the array remain unchanged upon
  35.          return.
  36.  
  37.        _c_o_l_o_r_m_a_p     Specifies the colormap.
  38.  
  39.        _c_o_m_p_r_e_s_s_i_o_n___f_l_a_g_s___r_e_t_u_r_n
  40.          Returns an array of Boolean values indicating
  41.          compression status.  If a non-NULL pointer is
  42.          supplied, each element of the array is set to
  43.          _T_r_u_e if the corresponding color was compressed
  44.          and _F_a_l_s_e otherwise.  Pass NULL if the compres-
  45.          sion status is not useful.
  46.  
  47.        _n_c_o_l_o_r_s     Specifies the number of _X_c_m_s_C_o_l_o_r structures in
  48.          the color-specification array.
  49.  
  50. DDEESSCCRRIIPPTTIIOONN
  51.        The _X_c_m_s_S_t_o_r_e_C_o_l_o_r function converts the color specified
  52.        in the _X_c_m_s_C_o_l_o_r structure into RGB values.  It then uses
  53.        this RGB specification in an _X_C_o_l_o_r structure, whose three
  54.        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
  55.        _X_S_t_o_r_e_C_o_l_o_r to change the color cell specified by the
  56.        pixel member of the _X_c_m_s_C_o_l_o_r structure.     This pixel value
  57.        must be a valid index for the specified colormap, and the
  58.        color cell specified by the pixel value must be a
  59.        read/write cell.     If the pixel value is not a valid index,
  60.        a _B_a_d_V_a_l_u_e error results.  If the color cell is
  61.  
  62.  
  63.  
  64. X Version 11           Release 6.1                1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. XcmsStoreColor(3X11)      XLIB FUNCTIONS     XcmsStoreColor(3X11)
  71.  
  72.  
  73.        unallocated or is allocated read-only, a _B_a_d_A_c_c_e_s_s error
  74.        results.     If the colormap is an installed map for its
  75.        screen, the changes are visible immediately.
  76.  
  77.        Note that _X_S_t_o_r_e_C_o_l_o_r has no return value; therefore, an
  78.        _X_c_m_s_S_u_c_c_e_s_s return value from this function indicates that
  79.        the conversion to RGB succeeded and the call to _X_S_t_o_r_e_-
  80.        _C_o_l_o_r was made.    To obtain the actual color stored, use
  81.        _X_c_m_s_Q_u_e_r_y_C_o_l_o_r.    Because of the screen's hardware limita-
  82.        tions or gamut compression, the color stored in the col-
  83.        ormap may not be identical to the color specified.
  84.  
  85.        _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_-
  86.        _V_a_l_u_e errors.
  87.  
  88.        The _X_c_m_s_S_t_o_r_e_C_o_l_o_r_s function converts the colors specified
  89.        in the array of _X_c_m_s_C_o_l_o_r structures into RGB values and
  90.        then uses these RGB specifications in _X_C_o_l_o_r structures,
  91.        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
  92.        a call to _X_S_t_o_r_e_C_o_l_o_r_s to change the color cells specified
  93.        by the pixel member of the corresponding _X_c_m_s_C_o_l_o_r struc-
  94.        ture.  Each pixel value must be a valid index for the
  95.        specified colormap, and the color cell specified by each
  96.        pixel value must be a read/write cell.  If a pixel value
  97.        is not a valid index, a _B_a_d_V_a_l_u_e error results.    If a
  98.        color cell is unallocated or is allocated read-only, a
  99.        _B_a_d_A_c_c_e_s_s error results.     If more than one pixel is in
  100.        error, the one that gets reported is arbitrary.    If the
  101.        colormap is an installed map for its screen, the changes
  102.        are visible immediately.
  103.  
  104.        Note that _X_S_t_o_r_e_C_o_l_o_r_s has no return value; therefore, an
  105.        _X_c_m_s_S_u_c_c_e_s_s return value from this function indicates that
  106.        conversions to RGB succeeded and the call to _X_S_t_o_r_e_C_o_l_o_r_s
  107.        was made.  To obtain the actual colors stored, use
  108.        _X_c_m_s_Q_u_e_r_y_C_o_l_o_r_s.     Because of the screen's hardware limita-
  109.        tions or gamut compression, the colors stored in the col-
  110.        ormap may not be identical to the colors specified.
  111.  
  112.  
  113.        _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_-
  114.        _V_a_l_u_e errors.
  115.  
  116. DDIIAAGGNNOOSSTTIICCSS
  117.        _B_a_d_A_c_c_e_s_s A client attempted to free a color map entry
  118.          that it did not already allocate.
  119.  
  120.        _B_a_d_A_c_c_e_s_s A client attempted to store into a read-only
  121.          color map entry.
  122.  
  123.        _B_a_d_C_o_l_o_r     A value for a Colormap argument does not name a
  124.          defined Colormap.
  125.  
  126.        _B_a_d_V_a_l_u_e     Some numeric value falls outside the range of
  127.  
  128.  
  129.  
  130. X Version 11           Release 6.1                2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. XcmsStoreColor(3X11)      XLIB FUNCTIONS     XcmsStoreColor(3X11)
  137.  
  138.  
  139.          values accepted by the request.  Unless a spe-
  140.          cific range is specified for an argument, the
  141.          full range defined by the argument's type is
  142.          accepted.  Any argument defined as a set of
  143.          alternatives can generate this error.
  144.  
  145. SSEEEE AALLSSOO
  146.        XcmsAllocColor(3X11), XcmsQueryColor(3X11)
  147.        _X_l_i_b _- _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196. X Version 11           Release 6.1                3
  197.  
  198.  
  199.