~ubuntu-branches/ubuntu/intrepid/xserver-xgl/intrepid

« back to all changes in this revision

Viewing changes to afb/afbcmap.c

  • Committer: Bazaar Package Importer
  • Author(s): Matthew Garrett
  • Date: 2006-02-13 14:21:43 UTC
  • Revision ID: james.westby@ubuntu.com-20060213142143-mad6z9xzem7hzxz9
Tags: upstream-7.0.0
ImportĀ upstreamĀ versionĀ 7.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $XFree86: xc/programs/Xserver/afb/afbcmap.c,v 3.0 1996/08/18 01:45:30 dawes Exp $ */
 
2
/* $XConsortium: afbcmap.c,v 4.19 94/04/17 20:28:46 dpw Exp $ */
 
3
/************************************************************
 
4
Copyright 1987 by Sun Microsystems, Inc. Mountain View, CA.
 
5
 
 
6
                    All Rights Reserved
 
7
 
 
8
Permission  to  use,  copy,  modify,  and  distribute   this
 
9
software  and  its documentation for any purpose and without
 
10
fee is hereby granted, provided that the above copyright no-
 
11
tice  appear  in all copies and that both that copyright no-
 
12
tice and this permission notice appear in  supporting  docu-
 
13
mentation,  and  that the names of Sun or X Consortium
 
14
not be used in advertising or publicity pertaining to
 
15
distribution  of  the software  without specific prior
 
16
written permission. Sun and X Consortium make no
 
17
representations about the suitability of this software for
 
18
any purpose. It is provided "as is" without any express or
 
19
implied warranty.
 
20
 
 
21
SUN DISCLAIMS ALL WARRANTIES WITH REGARD TO  THIS  SOFTWARE,
 
22
INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FIT-
 
23
NESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SUN BE  LI-
 
24
ABLE  FOR  ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
 
25
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,  DATA  OR
 
26
PROFITS,  WHETHER  IN  AN  ACTION OF CONTRACT, NEGLIGENCE OR
 
27
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION  WITH
 
28
THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
29
 
 
30
********************************************************/
 
31
 
 
32
#ifdef HAVE_DIX_CONFIG_H
 
33
#include <dix-config.h>
 
34
#endif
 
35
 
 
36
#include <X11/X.h>
 
37
#include <X11/Xproto.h>
 
38
#include "scrnintstr.h"
 
39
#include "colormapst.h"
 
40
#include "resource.h"
 
41
#include "micmap.h"
 
42
 
 
43
int
 
44
afbListInstalledColormaps(pScreen, pmaps)
 
45
        ScreenPtr               pScreen;
 
46
        Colormap                *pmaps;
 
47
{
 
48
        return miListInstalledColormaps(pScreen, pmaps);
 
49
}
 
50
 
 
51
 
 
52
void
 
53
afbInstallColormap(pmap)
 
54
        ColormapPtr             pmap;
 
55
{
 
56
        miInstallColormap(pmap);
 
57
}
 
58
 
 
59
void
 
60
afbUninstallColormap(pmap)
 
61
        ColormapPtr             pmap;
 
62
{
 
63
        miUninstallColormap(pmap);
 
64
}
 
65
 
 
66
void
 
67
afbResolveColor(pred, pgreen, pblue, pVisual)
 
68
        unsigned short          *pred, *pgreen, *pblue;
 
69
        register VisualPtr              pVisual;
 
70
{
 
71
        miResolveColor(pred, pgreen, pblue, pVisual);
 
72
}
 
73
 
 
74
Bool
 
75
afbInitializeColormap(pmap)
 
76
        register ColormapPtr            pmap;
 
77
{
 
78
        return miInitializeColormap(pmap);
 
79
}
 
80
 
 
81
int
 
82
afbExpandDirectColors(pmap, ndef, indefs, outdefs)
 
83
        ColormapPtr             pmap;
 
84
        int                             ndef;
 
85
        xColorItem              *indefs, *outdefs;
 
86
{
 
87
        return miExpandDirectColors(pmap, ndef, indefs, outdefs);
 
88
}
 
89
 
 
90
Bool
 
91
afbCreateDefColormap(pScreen)
 
92
        ScreenPtr pScreen;
 
93
{
 
94
        return miCreateDefColormap(pScreen);
 
95
}
 
96
 
 
97
Bool
 
98
afbSetVisualTypes(depth, visuals, bitsPerRGB)
 
99
        int depth;
 
100
        int visuals;
 
101
        int bitsPerRGB;
 
102
{
 
103
        return miSetVisualTypes(depth, visuals, bitsPerRGB, -1);
 
104
}
 
105
 
 
106
/*
 
107
 * Given a list of formats for a screen, create a list
 
108
 * of visuals and depths for the screen which correspond to
 
109
 * the set which can be used with this version of afb.
 
110
 */
 
111
 
 
112
Bool
 
113
afbInitVisuals(visualp, depthp, nvisualp, ndepthp, rootDepthp, defaultVisp,
 
114
                                         sizes, bitsPerRGB)
 
115
        VisualPtr *visualp;
 
116
        DepthPtr *depthp;
 
117
        int *nvisualp, *ndepthp;
 
118
        int *rootDepthp;
 
119
        VisualID *defaultVisp;
 
120
        unsigned long sizes;
 
121
        int bitsPerRGB;
 
122
{
 
123
        return miInitVisuals(visualp, depthp, nvisualp, ndepthp, rootDepthp,
 
124
                                defaultVisp, sizes, bitsPerRGB, -1);
 
125
}