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

  1.  
  2.  
  3.  
  4. XcmsQueryColor(3X11)      XLIB FUNCTIONS     XcmsQueryColor(3X11)
  5.  
  6.  
  7. NNAAMMEE
  8.        XcmsQueryColor, XcmsQueryColors, XcmsLookupColor - obtain
  9.        color values
  10.  
  11. SSYYNNTTAAXX
  12.        Status XcmsQueryColor(_d_i_s_p_l_a_y, _c_o_l_o_r_m_a_p, _c_o_l_o_r___i_n___o_u_t,
  13.        _r_e_s_u_l_t___f_o_r_m_a_t)
  14.          Display *_d_i_s_p_l_a_y;
  15.          Colormap _c_o_l_o_r_m_a_p;
  16.          XcmsColor *_c_o_l_o_r___i_n___o_u_t;
  17.          XcmsColorFormat _r_e_s_u_l_t___f_o_r_m_a_t;
  18.  
  19.        Status XcmsQueryColors(_d_i_s_p_l_a_y, _c_o_l_o_r_m_a_p, _c_o_l_o_r_s___i_n___o_u_t,
  20.        _n_c_o_l_o_r_s, _r_e_s_u_l_t___f_o_r_m_a_t)
  21.          Display *_d_i_s_p_l_a_y;
  22.          Colormap _c_o_l_o_r_m_a_p;
  23.          XcmsColor _c_o_l_o_r_s___i_n___o_u_t[];
  24.          unsigned int _n_c_o_l_o_r_s;
  25.          XcmsColorFormat _r_e_s_u_l_t___f_o_r_m_a_t;
  26.  
  27.        Status XcmsLookupColor(_d_i_s_p_l_a_y, _c_o_l_o_r_m_a_p, _c_o_l_o_r___s_t_r_i_n_g,
  28.        _c_o_l_o_r___e_x_a_c_t___r_e_t_u_r_n, _c_o_l_o_r___s_c_r_e_e_n___r_e_t_u_r_n,
  29.                _r_e_s_u_l_t___f_o_r_m_a_t)
  30.          Display *_d_i_s_p_l_a_y;
  31.          Colormap _c_o_l_o_r_m_a_p;
  32.          char *_c_o_l_o_r___s_t_r_i_n_g;
  33.          XcmsColor *_c_o_l_o_r___e_x_a_c_t___r_e_t_u_r_n, *_c_o_l_o_r___s_c_r_e_e_n___r_e_t_u_r_n;
  34.          XcmsColorFormat _r_e_s_u_l_t___f_o_r_m_a_t;
  35.  
  36. AARRGGUUMMEENNTTSS
  37.        _d_i_s_p_l_a_y     Specifies the connection to the X server.
  38.  
  39.        _c_o_l_o_r_m_a_p     Specifies the colormap.
  40.  
  41.        _c_o_l_o_r___e_x_a_c_t___r_e_t_u_r_n
  42.          Returns the color specification parsed from the
  43.          color string or parsed from the corresponding
  44.          string found in a color-name database.
  45.  
  46.        _c_o_l_o_r___i_n___o_u_t
  47.          Specifies the pixel member that indicates the
  48.          color cell to query.  The color specification
  49.          stored for the color cell is returned in this
  50.          _X_c_m_s_C_o_l_o_r structure.
  51.  
  52.        _c_o_l_o_r___s_c_r_e_e_n___r_e_t_u_r_n
  53.          Returns the color that can be reproduced on the
  54.          screen.
  55.  
  56.        _c_o_l_o_r___s_t_r_i_n_g
  57.          Specifies the color string.
  58.  
  59.        _r_e_s_u_l_t___f_o_r_m_a_t
  60.          Specifies the color format for the returned
  61.  
  62.  
  63.  
  64. X Version 11           Release 6.1                1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. XcmsQueryColor(3X11)      XLIB FUNCTIONS     XcmsQueryColor(3X11)
  71.  
  72.  
  73.          color specifications (color_screen_return and
  74.          color_exact_return arguments).     If the format is
  75.          _X_c_m_s_U_n_d_e_f_i_n_e_d_F_o_r_m_a_t and the color string con-
  76.          tains a numerical color specification, the spec-
  77.          ification is returned in the format used in that
  78.          numerical color specification.     If the format is
  79.          _X_c_m_s_U_n_d_e_f_i_n_e_d_F_o_r_m_a_t and the color string con-
  80.          tains a color name, the specification is
  81.          returned in the format used to store the color
  82.          in the database.
  83.  
  84.        _n_c_o_l_o_r_s     Specifies the number of _X_c_m_s_C_o_l_o_r structures in
  85.          the color-specification array.
  86.  
  87. DDEESSCCRRIIPPTTIIOONN
  88.        The _X_c_m_s_Q_u_e_r_y_C_o_l_o_r function obtains the RGB value for the
  89.        pixel value in the pixel member of the specified _X_c_m_s_C_o_l_o_r
  90.        structure and then converts the value to the target format
  91.        as specified by the result_format argument.  If the pixel
  92.        is not a valid index in the specified colormap, a _B_a_d_V_a_l_u_e
  93.        error results.  The _X_c_m_s_Q_u_e_r_y_C_o_l_o_r_s function obtains the
  94.        RGB values for pixel values in the pixel members of _X_c_m_s_-
  95.        _C_o_l_o_r structures and then converts the values to the tar-
  96.        get format as specified by the result_format argument.  If
  97.        a pixel is not a valid index into the specified colormap,
  98.        a _B_a_d_V_a_l_u_e error results.  If more than one pixel is in
  99.        error, the one that gets reported is arbitrary.
  100.  
  101.        _X_c_m_s_Q_u_e_r_y_C_o_l_o_r and _X_c_m_s_Q_u_e_r_y_C_o_l_o_r_s can generate _B_a_d_C_o_l_o_r
  102.        and _B_a_d_V_a_l_u_e errors.
  103.  
  104.        The _X_c_m_s_L_o_o_k_u_p_C_o_l_o_r function looks up the string name of a
  105.        color with respect to the screen associated with the spec-
  106.        ified colormap.    It returns both the exact color values
  107.        and the closest values provided by the screen with respect
  108.        to the visual type of the specified colormap.  The values
  109.        are returned in the format specified by result_format.  If
  110.        the color name is not in the Host Portable Character
  111.        Encoding, the result is implementation-dependent.  Use of
  112.        uppercase or lowercase does not matter.    _X_c_m_s_L_o_o_k_u_p_C_o_l_o_r
  113.        returns _X_c_m_s_S_u_c_c_e_s_s or _X_c_m_s_S_u_c_c_e_s_s_W_i_t_h_C_o_m_p_r_e_s_s_i_o_n if the
  114.        name is resolved; otherwise, it returns _X_c_m_s_F_a_i_l_u_r_e.  If
  115.        _X_c_m_s_S_u_c_c_e_s_s_W_i_t_h_C_o_m_p_r_e_s_s_i_o_n is returned, the color specifi-
  116.        cation returned in color_screen_return is the result of
  117.        gamut compression.
  118.  
  119. DDIIAAGGNNOOSSTTIICCSS
  120.        _B_a_d_C_o_l_o_r     A value for a Colormap argument does not name a
  121.          defined Colormap.
  122.  
  123.        _B_a_d_V_a_l_u_e     Some numeric value falls outside the range of
  124.          values accepted by the request.  Unless a spe-
  125.          cific range is specified for an argument, the
  126.          full range defined by the argument's type is
  127.  
  128.  
  129.  
  130. X Version 11           Release 6.1                2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. XcmsQueryColor(3X11)      XLIB FUNCTIONS     XcmsQueryColor(3X11)
  137.  
  138.  
  139.          accepted.  Any argument defined as a set of
  140.          alternatives can generate this error.
  141.  
  142. SSEEEE AALLSSOO
  143.        XcmsAllocColor(3X11), XcmsStoreColor(3X11), XQuery-
  144.        Color(3X11)
  145.        _X_l_i_b _- _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e
  146.  
  147.  
  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.