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