f78b12e570284aa8291f4ca1add24937fd107403vboxsync/*
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * Copyright 2002-2004 Red Hat Inc., Durham, North Carolina.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync *
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * All Rights Reserved.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync *
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * Permission is hereby granted, free of charge, to any person obtaining
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * a copy of this software and associated documentation files (the
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * "Software"), to deal in the Software without restriction, including
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * without limitation on the rights to use, copy, modify, merge,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * publish, distribute, sublicense, and/or sell copies of the Software,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * and to permit persons to whom the Software is furnished to do so,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * subject to the following conditions:
f78b12e570284aa8291f4ca1add24937fd107403vboxsync *
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * The above copyright notice and this permission notice (including the
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * next paragraph) shall be included in all copies or substantial
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * portions of the Software.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync *
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * SOFTWARE.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/*
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * Authors:
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * Kevin E. Martin <kem@redhat.com>
f78b12e570284aa8291f4ca1add24937fd107403vboxsync *
f78b12e570284aa8291f4ca1add24937fd107403vboxsync */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/** \file
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * Header file for colormap support. \see dmxcmap.c. */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#ifndef DMXCMAP_H
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define DMXCMAP_H
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#include "colormapst.h"
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/** Colormap private area. */
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef struct _dmxColormapPriv {
f78b12e570284aa8291f4ca1add24937fd107403vboxsync Colormap cmap;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync} dmxColormapPrivRec, *dmxColormapPrivPtr;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern Bool dmxCreateColormap(ColormapPtr pColormap);
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern void dmxDestroyColormap(ColormapPtr pColormap);
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern void dmxInstallColormap(ColormapPtr pColormap);
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern void dmxStoreColors(ColormapPtr pColormap, int ndef, xColorItem *pdef);
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern Bool dmxCreateDefColormap(ScreenPtr pScreen);
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern Bool dmxBECreateColormap(ColormapPtr pColormap);
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern Bool dmxBEFreeColormap(ColormapPtr pColormap);
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/** Set colormap private structure. */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define DMX_SET_COLORMAP_PRIV(_pCMap, _pCMapPriv) \
f78b12e570284aa8291f4ca1add24937fd107403vboxsync dixSetPrivate(&(_pCMap)->devPrivates, dmxColormapPrivateKey, _pCMapPriv)
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/** Get colormap private structure. */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define DMX_GET_COLORMAP_PRIV(_pCMap) (dmxColormapPrivPtr) \
f78b12e570284aa8291f4ca1add24937fd107403vboxsync dixLookupPrivate(&(_pCMap)->devPrivates, dmxColormapPrivateKey)
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#endif /* DMXCMAP_H */