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

  1.  
  2.  
  3.  
  4. XcmsAllocColor(3X11)      XLIB FUNCTIONS     XcmsAllocColor(3X11)
  5.  
  6.  
  7. NNAAMMEE
  8.        XcmsAllocColor, XcmsAllocNamedColor - allocate colors
  9.  
  10. SSYYNNTTAAXX
  11.        Status XcmsAllocColor(_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,
  12.        _r_e_s_u_l_t___f_o_r_m_a_t)
  13.          Display *_d_i_s_p_l_a_y;
  14.          Colormap _c_o_l_o_r_m_a_p;
  15.          XcmsColor *_c_o_l_o_r___i_n___o_u_t;
  16.          XcmsColorFormat _r_e_s_u_l_t___f_o_r_m_a_t;
  17.  
  18.        Status XcmsAllocNamedColor(_d_i_s_p_l_a_y, _c_o_l_o_r_m_a_p,
  19.        _c_o_l_o_r___s_t_r_i_n_g, _c_o_l_o_r___s_c_r_e_e_n___r_e_t_u_r_n, _c_o_l_o_r___e_x_a_c_t___r_e_t_u_r_n,
  20.                    _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.          char *_c_o_l_o_r___s_t_r_i_n_g;
  24.          XcmsColor *_c_o_l_o_r___s_c_r_e_e_n___r_e_t_u_r_n;
  25.          XcmsColor *_c_o_l_o_r___e_x_a_c_t___r_e_t_u_r_n;
  26.          XcmsColorFormat _r_e_s_u_l_t___f_o_r_m_a_t;
  27.  
  28. AARRGGUUMMEENNTTSS
  29.        _d_i_s_p_l_a_y     Specifies the connection to the X server.
  30.  
  31.        _c_o_l_o_r_m_a_p     Specifies the colormap.
  32.  
  33.        _c_o_l_o_r___e_x_a_c_t___r_e_t_u_r_n
  34.          Returns the color specification parsed from the
  35.          color string or parsed from the corresponding
  36.          string found in a color-name database.
  37.  
  38.        _c_o_l_o_r___i_n___o_u_t
  39.          Specifies the color to allocate and returns the
  40.          pixel and color that is actually used in the
  41.          colormap.
  42.  
  43.        _c_o_l_o_r___s_c_r_e_e_n___r_e_t_u_r_n
  44.          Returns the pixel value of the color cell and
  45.          color specification that actually is stored for
  46.          that cell.
  47.  
  48.        _c_o_l_o_r___s_t_r_i_n_g
  49.          Specifies the color string whose color defini-
  50.          tion structure is to be returned.
  51.  
  52.        _r_e_s_u_l_t___f_o_r_m_a_t
  53.          Specifies the color format for the returned
  54.          color specification.
  55.  
  56. DDEESSCCRRIIPPTTIIOONN
  57.        The _X_c_m_s_A_l_l_o_c_C_o_l_o_r function is similar to _X_A_l_l_o_c_C_o_l_o_r
  58.        except the color can be specified in any format.     The _X_c_m_-
  59.        _s_A_l_l_o_c_C_o_l_o_r function ultimately calls _X_A_l_l_o_c_C_o_l_o_r to allo-
  60.        cate a read-only color cell (colormap entry) with the
  61.  
  62.  
  63.  
  64. X Version 11           Release 6.1                1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. XcmsAllocColor(3X11)      XLIB FUNCTIONS     XcmsAllocColor(3X11)
  71.  
  72.  
  73.        specified color.     _X_c_m_s_A_l_l_o_c_C_o_l_o_r first converts the color
  74.        specified to an RGB value and then passes this to
  75.        _X_A_l_l_o_c_C_o_l_o_r.  _X_c_m_s_A_l_l_o_c_C_o_l_o_r returns the pixel value of
  76.        the color cell and the color specification actually allo-
  77.        cated.  This returned color specification is the result of
  78.        converting the RGB value returned by _X_A_l_l_o_c_C_o_l_o_r into the
  79.        format specified with the result_format argument.  If
  80.        there is no interest in a returned color specification,
  81.        unnecessary computation can be bypassed if result_format
  82.        is set to _X_c_m_s_R_G_B_F_o_r_m_a_t.     The corresponding colormap cell
  83.        is read-only.  If this routine returns _X_c_m_s_F_a_i_l_u_r_e, the
  84.        color_in_out color specification is left unchanged.
  85.  
  86.        _X_c_m_s_A_l_l_o_c_C_o_l_o_r can generate a _B_a_d_C_o_l_o_r errors.
  87.  
  88.        The _X_c_m_s_A_l_l_o_c_N_a_m_e_d_C_o_l_o_r function is similar to _X_A_l_l_o_c_-
  89.        _N_a_m_e_d_C_o_l_o_r except that the color returned can be in any
  90.        format specified.  This function ultimately calls _X_A_l_l_o_c_-
  91.        _C_o_l_o_r to allocate a read-only color cell with the color
  92.        specified by a color string.  The color string is parsed
  93.        into an _X_c_m_s_C_o_l_o_r structure (see _X_c_m_s_L_o_o_k_u_p_C_o_l_o_r), con-
  94.        verted to an RGB value, and finally passed to _X_A_l_l_o_c_C_o_l_o_r.
  95.        If the color name is not in the Host Portable Character
  96.        Encoding, the result is implementation-dependent.  Use of
  97.        uppercase or lowercase does not matter.
  98.  
  99.        This function returns both the color specification as a
  100.        result of parsing (exact specification) and the actual
  101.        color specification stored (screen specification).  This
  102.        screen specification is the result of converting the RGB
  103.        value returned by _X_A_l_l_o_c_C_o_l_o_r into the format specified in
  104.        result_format.  If there is no interest in a returned
  105.        color specification, unnecessary computation can be
  106.        bypassed if result_format is set to _X_c_m_s_R_G_B_F_o_r_m_a_t.  If
  107.        color_screen_return and color_exact_return point to the
  108.        same structure, the pixel field will be set correctly, but
  109.        the color values are undefined.
  110.  
  111.  
  112.        _X_c_m_s_A_l_l_o_c_N_a_m_e_d_C_o_l_o_r can generate a _B_a_d_C_o_l_o_r errors.
  113.  
  114. DDIIAAGGNNOOSSTTIICCSS
  115.        _B_a_d_C_o_l_o_r     A value for a Colormap argument does not name a
  116.          defined Colormap.
  117.  
  118. SSEEEE AALLSSOO
  119.        XcmsQueryColor(3X11), XcmsStoreColor(3X11)
  120.        _X_l_i_b _- _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130. X Version 11           Release 6.1                2
  131.  
  132.  
  133.