11ab64890Smrg
21ab64890Smrg/*
31ab64890Smrg * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc.
41ab64890Smrg * 	All Rights Reserved
561b2299dSmrg *
61ab64890Smrg * This file is a component of an X Window System-specific implementation
71ab64890Smrg * of Xcms based on the TekColor Color Management System.  Permission is
81ab64890Smrg * hereby granted to use, copy, modify, sell, and otherwise distribute this
91ab64890Smrg * software and its documentation for any purpose and without fee, provided
101ab64890Smrg * that this copyright, permission, and disclaimer notice is reproduced in
111ab64890Smrg * all copies of this software and in supporting documentation.  TekColor
121ab64890Smrg * is a trademark of Tektronix, Inc.
1361b2299dSmrg *
141ab64890Smrg * Tektronix makes no representation about the suitability of this software
151ab64890Smrg * for any purpose.  It is provided "as is" and with all faults.
1661b2299dSmrg *
171ab64890Smrg * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE,
181ab64890Smrg * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
191ab64890Smrg * PARTICULAR PURPOSE.  IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY
201ab64890Smrg * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
211ab64890Smrg * RESULTING FROM LOSS OF USE, DATA, OR PROFITS, WHETHER IN AN ACTION OF
221ab64890Smrg * CONTRACT, NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
231ab64890Smrg * CONNECTION WITH THE USE OR THE PERFORMANCE OF THIS SOFTWARE.
241ab64890Smrg *
251ab64890Smrg *
261ab64890Smrg *	NAME
271ab64890Smrg *		XcmsQBlue.c - Query Blue
281ab64890Smrg *
291ab64890Smrg *	DESCRIPTION
301ab64890Smrg *		Routine to obtain a color specification for full
311ab64890Smrg *		blue intensity and zero red and green intensities.
321ab64890Smrg *
331ab64890Smrg *
341ab64890Smrg */
351ab64890Smrg
361ab64890Smrg#ifdef HAVE_CONFIG_H
371ab64890Smrg#include <config.h>
381ab64890Smrg#endif
391ab64890Smrg#include "Xlibint.h"
401ab64890Smrg#include "Xcms.h"
411ab64890Smrg
421ab64890Smrg
431ab64890Smrg
441ab64890Smrg/************************************************************************
451ab64890Smrg *									*
461ab64890Smrg *			PUBLIC INTERFACES				*
471ab64890Smrg *									*
481ab64890Smrg ************************************************************************/
491ab64890Smrg
501ab64890Smrg/*
511ab64890Smrg *	NAME
521ab64890Smrg *		XcmsQueryBlue
531ab64890Smrg *
541ab64890Smrg *	SYNOPSIS
551ab64890Smrg */
561ab64890Smrg
571ab64890SmrgStatus
581ab64890SmrgXcmsQueryBlue(
591ab64890Smrg    XcmsCCC ccc,
601ab64890Smrg    XcmsColorFormat target_format,
611ab64890Smrg    XcmsColor *pColor_ret)
621ab64890Smrg/*
631ab64890Smrg *	DESCRIPTION
641ab64890Smrg *		Returns the color specification in the target format for
651ab64890Smrg *		full intensity blue and zero intensity red and green.
661ab64890Smrg *
671ab64890Smrg *	RETURNS
681ab64890Smrg *		Returns XcmsSuccess, if failed; otherwise XcmsFailure
691ab64890Smrg *
701ab64890Smrg */
711ab64890Smrg{
721ab64890Smrg    XcmsColor tmp;
731ab64890Smrg
741ab64890Smrg    tmp.format = XcmsRGBiFormat;
751ab64890Smrg    tmp.pixel = 0;
761ab64890Smrg    tmp.spec.RGBi.red = 0.0;
771ab64890Smrg    tmp.spec.RGBi.green = 0.0;
781ab64890Smrg    tmp.spec.RGBi.blue = 1.0;
791ab64890Smrg    if (XcmsConvertColors(ccc, &tmp, 1, target_format, NULL) != XcmsSuccess) {
801ab64890Smrg	return(XcmsFailure);
811ab64890Smrg    }
821ab64890Smrg    memcpy((char *)pColor_ret, (char *)&tmp, sizeof(XcmsColor));
831ab64890Smrg    return(XcmsSuccess);
841ab64890Smrg}
85