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