home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / evbl0627.zip / everblue_20010627.zip / x11 / Xcms_QuCols.c < prev    next >
C/C++ Source or Header  |  1999-11-02  |  3KB  |  78 lines

  1. /* $XConsortium: QuCols.c,v 1.4 91/05/13 23:28:26 rws Exp $" */
  2.  
  3. /*
  4.  * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc.
  5.  *     All Rights Reserved
  6.  * 
  7.  * This file is a component of an X Window System-specific implementation
  8.  * of Xcms based on the TekColor Color Management System.  Permission is
  9.  * hereby granted to use, copy, modify, sell, and otherwise distribute this
  10.  * software and its documentation for any purpose and without fee, provided
  11.  * that this copyright, permission, and disclaimer notice is reproduced in
  12.  * all copies of this software and in supporting documentation.  TekColor
  13.  * is a trademark of Tektronix, Inc.
  14.  * 
  15.  * Tektronix makes no representation about the suitability of this software
  16.  * for any purpose.  It is provided "as is" and with all faults.
  17.  * 
  18.  * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE,
  19.  * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
  20.  * PARTICULAR PURPOSE.  IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY
  21.  * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
  22.  * RESULTING FROM LOSS OF USE, DATA, OR PROFITS, WHETHER IN AN ACTION OF
  23.  * CONTRACT, NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  24.  * CONNECTION WITH THE USE OR THE PERFORMANCE OF THIS SOFTWARE.
  25.  *
  26.  *
  27.  *    NAME
  28.  *        XcmsQuCol.c
  29.  *
  30.  *    DESCRIPTION
  31.  *        Source for XcmsQueryColors
  32.  *
  33.  *
  34.  */
  35.  
  36. #include "Xlib_private.h"
  37. #include "Xcmsint.h"
  38.  
  39.  
  40. /************************************************************************
  41.  *                                    *
  42.  *            PUBLIC ROUTINES                    *
  43.  *                                    *
  44.  ************************************************************************/
  45. /*
  46.  *    NAME
  47.  *        XcmsQueryColors - Query Colors
  48.  *
  49.  *    SYNOPSIS
  50.  */
  51. Status
  52. XcmsQueryColors(dpy, colormap, pXcmsColors_in_out, nColors, result_format)
  53.     Display *dpy;
  54.     Colormap colormap;
  55.     XcmsColor *pXcmsColors_in_out;
  56.     unsigned int nColors;
  57.     XcmsColorFormat result_format;
  58. /*
  59.  *    DESCRIPTION
  60.  *        This routine uses XQueryColors to obtain the X RGB values
  61.  *        stored in the specified colormap for the specified pixels.
  62.  *        The X RGB values are then converted to the target format as
  63.  *        specified by the format component of the XcmsColor structure.
  64.  *
  65.  *    RETURNS
  66.  *        XcmsFailure if failed;
  67.  *        XcmsSuccess if it succeeded.
  68.  *
  69.  *        Returns the color specifications of the colors stored in the
  70.  *        specified pixels.
  71.  */
  72. {
  73.     DBUG_ENTER("XcmsQueryColors")
  74.     int result = _XcmsSetGetColors (XQueryColors, dpy, colormap,
  75.         pXcmsColors_in_out, nColors, result_format, (Bool *) NULL);
  76.     DBUG_RETURN(result);
  77. }
  78.