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