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