Imported Upstream version 1.15.1
[deb_xorg-server.git] / hw / xnest / Color.h
1 /*
2
3 Copyright 1993 by Davor Matic
4
5 Permission to use, copy, modify, distribute, and sell this software
6 and its documentation for any purpose is hereby granted without fee,
7 provided that the above copyright notice appear in all copies and that
8 both that copyright notice and this permission notice appear in
9 supporting documentation. Davor Matic makes no representations about
10 the suitability of this software for any purpose. It is provided "as
11 is" 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
23 typedef struct {
24 Colormap colormap;
25 } xnestPrivColormap;
26
27 typedef struct {
28 int numCmapIDs;
29 Colormap *cmapIDs;
30 int numWindows;
31 Window *windows;
32 int index;
33 } xnestInstalledColormapWindows;
34
35 extern 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
44 Bool xnestCreateColormap(ColormapPtr pCmap);
45 void xnestDestroyColormap(ColormapPtr pCmap);
46 void xnestSetInstalledColormapWindows(ScreenPtr pScreen);
47 void xnestSetScreenSaverColormapWindow(ScreenPtr pScreen);
48 void xnestDirectInstallColormaps(ScreenPtr pScreen);
49 void xnestDirectUninstallColormaps(ScreenPtr pScreen);
50 void xnestInstallColormap(ColormapPtr pCmap);
51 void xnestUninstallColormap(ColormapPtr pCmap);
52 int xnestListInstalledColormaps(ScreenPtr pScreen, Colormap * pCmapIDs);
53 void xnestStoreColors(ColormapPtr pCmap, int nColors, xColorItem * pColors);
54 void xnestResolveColor(unsigned short *pRed, unsigned short *pGreen,
55 unsigned short *pBlue, VisualPtr pVisual);
56 Bool xnestCreateDefaultColormap(ScreenPtr pScreen);
57
58 #endif /* XNESTCOLOR_H */