Imported Upstream version 1.15.1
[deb_xorg-server.git] / hw / xnest / Color.h
CommitLineData
a09e091a
JB
1/*
2
3Copyright 1993 by Davor Matic
4
5Permission to use, copy, modify, distribute, and sell this software
6and its documentation for any purpose is hereby granted without fee,
7provided that the above copyright notice appear in all copies and that
8both that copyright notice and this permission notice appear in
9supporting documentation. Davor Matic makes no representations about
10the suitability of this software for any purpose. It is provided "as
11is" without express or implied warranty.
12
13*/
14
15#ifndef XNESTCOLOR_H
16#define XNESTCOLOR_H
17
18#define DUMB_WINDOW_MANAGERS
19
20#define MAXCMAPS 1
21#define MINCMAPS 1
22
23typedef struct {
24 Colormap colormap;
25} xnestPrivColormap;
26
27typedef struct {
28 int numCmapIDs;
29 Colormap *cmapIDs;
30 int numWindows;
31 Window *windows;
32 int index;
33} xnestInstalledColormapWindows;
34
35extern DevPrivateKeyRec xnestColormapPrivateKeyRec;
36
37#define xnestColormapPriv(pCmap) \
38 ((xnestPrivColormap *) dixLookupPrivate(&(pCmap)->devPrivates, &xnestColormapPrivateKeyRec))
39
40#define xnestColormap(pCmap) (xnestColormapPriv(pCmap)->colormap)
41
42#define xnestPixel(pixel) (pixel)
43
44Bool xnestCreateColormap(ColormapPtr pCmap);
45void xnestDestroyColormap(ColormapPtr pCmap);
46void xnestSetInstalledColormapWindows(ScreenPtr pScreen);
47void xnestSetScreenSaverColormapWindow(ScreenPtr pScreen);
48void xnestDirectInstallColormaps(ScreenPtr pScreen);
49void xnestDirectUninstallColormaps(ScreenPtr pScreen);
50void xnestInstallColormap(ColormapPtr pCmap);
51void xnestUninstallColormap(ColormapPtr pCmap);
52int xnestListInstalledColormaps(ScreenPtr pScreen, Colormap * pCmapIDs);
53void xnestStoreColors(ColormapPtr pCmap, int nColors, xColorItem * pColors);
54void xnestResolveColor(unsigned short *pRed, unsigned short *pGreen,
55 unsigned short *pBlue, VisualPtr pVisual);
56Bool xnestCreateDefaultColormap(ScreenPtr pScreen);
57
58#endif /* XNESTCOLOR_H */