2 * Copyright (c) 1987, Oracle and/or its affiliates. All rights reserved.
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice (including the next
12 * paragraph) shall be included in all copies or substantial portions of the
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21 * DEALINGS IN THE SOFTWARE.
25 * This version of fbcmap.c is implemented in terms of mi functions.
26 * These functions used to be in fbcmap.c and depended upon the symbol
27 * XFree86Server being defined.
30 #ifdef HAVE_DIX_CONFIG_H
31 #include <dix-config.h>
39 fbListInstalledColormaps(ScreenPtr pScreen
, Colormap
* pmaps
)
41 return miListInstalledColormaps(pScreen
, pmaps
);
45 fbInstallColormap(ColormapPtr pmap
)
47 miInstallColormap(pmap
);
51 fbUninstallColormap(ColormapPtr pmap
)
53 miUninstallColormap(pmap
);
57 fbResolveColor(unsigned short *pred
,
58 unsigned short *pgreen
, unsigned short *pblue
, VisualPtr pVisual
)
60 miResolveColor(pred
, pgreen
, pblue
, pVisual
);
64 fbInitializeColormap(ColormapPtr pmap
)
66 return miInitializeColormap(pmap
);
70 fbExpandDirectColors(ColormapPtr pmap
,
71 int ndef
, xColorItem
* indefs
, xColorItem
* outdefs
)
73 return miExpandDirectColors(pmap
, ndef
, indefs
, outdefs
);
77 fbCreateDefColormap(ScreenPtr pScreen
)
79 return miCreateDefColormap(pScreen
);
83 fbClearVisualTypes(void)
89 fbSetVisualTypes(int depth
, int visuals
, int bitsPerRGB
)
91 return miSetVisualTypes(depth
, visuals
, bitsPerRGB
, -1);
95 fbSetVisualTypesAndMasks(int depth
, int visuals
, int bitsPerRGB
,
96 Pixel redMask
, Pixel greenMask
, Pixel blueMask
)
98 return miSetVisualTypesAndMasks(depth
, visuals
, bitsPerRGB
, -1,
99 redMask
, greenMask
, blueMask
);
103 * Given a list of formats for a screen, create a list
104 * of visuals and depths for the screen which coorespond to
105 * the set which can be used with this version of fb.
108 fbInitVisuals(VisualPtr
* visualp
,
113 VisualID
* defaultVisp
, unsigned long sizes
, int bitsPerRGB
)
115 return miInitVisuals(visualp
, depthp
, nvisualp
, ndepthp
, rootDepthp
,
116 defaultVisp
, sizes
, bitsPerRGB
, -1);