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