First import
[xorg_rtime.git] / xorg-server-1.4 / fb / fbcmap_mi.c
blob58bcae3aaad13c89a18a747ac609dfdec865590a
1 /************************************************************
2 Copyright 1987 by Sun Microsystems, Inc. Mountain View, CA.
4 All Rights Reserved
6 Permission to use, copy, modify, and distribute this
7 software and its documentation for any purpose and without
8 fee is hereby granted, provided that the above copyright no-
9 tice appear in all copies and that both that copyright no-
10 tice and this permission notice appear in supporting docu-
11 mentation, and that the names of Sun or X Consortium
12 not be used in advertising or publicity pertaining to
13 distribution of the software without specific prior
14 written permission. Sun and X Consortium make no
15 representations about the suitability of this software for
16 any purpose. It is provided "as is" without any express or
17 implied warranty.
19 SUN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
20 INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FIT-
21 NESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SUN BE LI-
22 ABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
23 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
24 PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
25 OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
26 THE USE OR PERFORMANCE OF THIS SOFTWARE.
28 ********************************************************/
31 /**
32 * This version of fbcmap.c is implemented in terms of mi functions.
33 * These functions used to be in fbcmap.c and depended upon the symbol
34 * XFree86Server being defined.
38 #ifdef HAVE_DIX_CONFIG_H
39 #include <dix-config.h>
40 #endif
42 #include <X11/X.h>
43 #include "fb.h"
44 #include "micmap.h"
46 int
47 fbListInstalledColormaps(ScreenPtr pScreen, Colormap *pmaps)
49 return miListInstalledColormaps(pScreen, pmaps);
52 void
53 fbInstallColormap(ColormapPtr pmap)
55 miInstallColormap(pmap);
58 void
59 fbUninstallColormap(ColormapPtr pmap)
61 miUninstallColormap(pmap);
64 void
65 fbResolveColor(unsigned short *pred,
66 unsigned short *pgreen,
67 unsigned short *pblue,
68 VisualPtr pVisual)
70 miResolveColor(pred, pgreen, pblue, pVisual);
73 Bool
74 fbInitializeColormap(ColormapPtr pmap)
76 return miInitializeColormap(pmap);
79 int
80 fbExpandDirectColors (ColormapPtr pmap,
81 int ndef,
82 xColorItem *indefs,
83 xColorItem *outdefs)
85 return miExpandDirectColors(pmap, ndef, indefs, outdefs);
88 Bool
89 fbCreateDefColormap(ScreenPtr pScreen)
91 return miCreateDefColormap(pScreen);
94 void
95 fbClearVisualTypes(void)
97 miClearVisualTypes();
100 Bool
101 fbSetVisualTypes (int depth, int visuals, int bitsPerRGB)
103 return miSetVisualTypes(depth, visuals, bitsPerRGB, -1);
107 * Given a list of formats for a screen, create a list
108 * of visuals and depths for the screen which coorespond to
109 * the set which can be used with this version of fb.
111 Bool
112 fbInitVisuals (VisualPtr *visualp,
113 DepthPtr *depthp,
114 int *nvisualp,
115 int *ndepthp,
116 int *rootDepthp,
117 VisualID *defaultVisp,
118 unsigned long sizes,
119 int bitsPerRGB)
121 return miInitVisuals(visualp, depthp, nvisualp, ndepthp, rootDepthp,
122 defaultVisp, sizes, bitsPerRGB, -1);