1706f2543Smrg
2706f2543Smrg/*
3706f2543Smrg * Copyright (c) 1998-2001 by The XFree86 Project, Inc.
4706f2543Smrg *
5706f2543Smrg * Permission is hereby granted, free of charge, to any person obtaining a
6706f2543Smrg * copy of this software and associated documentation files (the "Software"),
7706f2543Smrg * to deal in the Software without restriction, including without limitation
8706f2543Smrg * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9706f2543Smrg * and/or sell copies of the Software, and to permit persons to whom the
10706f2543Smrg * Software is furnished to do so, subject to the following conditions:
11706f2543Smrg *
12706f2543Smrg * The above copyright notice and this permission notice shall be included in
13706f2543Smrg * all copies or substantial portions of the Software.
14706f2543Smrg *
15706f2543Smrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16706f2543Smrg * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17706f2543Smrg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
18706f2543Smrg * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
19706f2543Smrg * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
20706f2543Smrg * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
21706f2543Smrg * OTHER DEALINGS IN THE SOFTWARE.
22706f2543Smrg *
23706f2543Smrg * Except as contained in this notice, the name of the copyright holder(s)
24706f2543Smrg * and author(s) shall not be used in advertising or otherwise to promote
25706f2543Smrg * the sale, use or other dealings in this Software without prior written
26706f2543Smrg * authorization from the copyright holder(s) and author(s).
27706f2543Smrg */
28706f2543Smrg
29706f2543Smrg#ifndef _XF86CMAP_H
30706f2543Smrg#define _XF86CMAP_H
31706f2543Smrg
32706f2543Smrg#include "xf86str.h"
33706f2543Smrg#include "colormapst.h"
34706f2543Smrg
35706f2543Smrg#define CMAP_PALETTED_TRUECOLOR		0x0000001
36706f2543Smrg#define CMAP_RELOAD_ON_MODE_SWITCH	0x0000002
37706f2543Smrg#define CMAP_LOAD_EVEN_IF_OFFSCREEN	0x0000004
38706f2543Smrg
39706f2543Smrgextern _X_EXPORT Bool xf86HandleColormaps(
40706f2543Smrg    ScreenPtr pScreen,
41706f2543Smrg    int maxCol,
42706f2543Smrg    int sigRGBbits,
43706f2543Smrg    xf86LoadPaletteProc *loadPalette,
44706f2543Smrg    xf86SetOverscanProc *setOverscan,
45706f2543Smrg    unsigned int flags
46706f2543Smrg);
47706f2543Smrg
48706f2543Smrgextern _X_EXPORT Bool xf86ColormapAllocatePrivates(
49706f2543Smrg    ScrnInfoPtr pScrn
50706f2543Smrg);
51706f2543Smrg
52706f2543Smrgextern _X_EXPORT int
53706f2543Smrgxf86ChangeGamma(
54706f2543Smrg   ScreenPtr pScreen,
55706f2543Smrg   Gamma newGamma
56706f2543Smrg);
57706f2543Smrg
58706f2543Smrgextern _X_EXPORT int
59706f2543Smrgxf86ChangeGammaRamp(
60706f2543Smrg   ScreenPtr pScreen,
61706f2543Smrg   int size,
62706f2543Smrg   unsigned short *red,
63706f2543Smrg   unsigned short *green,
64706f2543Smrg   unsigned short *blue
65706f2543Smrg);
66706f2543Smrg
67706f2543Smrgextern _X_EXPORT int xf86GetGammaRampSize(ScreenPtr pScreen);
68706f2543Smrg
69706f2543Smrgextern _X_EXPORT int
70706f2543Smrgxf86GetGammaRamp(
71706f2543Smrg   ScreenPtr pScreen,
72706f2543Smrg   int size,
73706f2543Smrg   unsigned short *red,
74706f2543Smrg   unsigned short *green,
75706f2543Smrg   unsigned short *blue
76706f2543Smrg);
77706f2543Smrg
78706f2543Smrg#endif /* _XF86CMAP_H */
79706f2543Smrg
80