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

« back to all changes in this revision

Viewing changes to hw/kdrive/src/knoop.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
/*
 
2
 * Id: knoop.c,v 1.2 1999/11/02 06:16:28 keithp Exp $
 
3
 *
 
4
 * Copyright ļæ½ 1999 Keith Packard
 
5
 *
 
6
 * Permission to use, copy, modify, distribute, and sell this software and its
 
7
 * documentation for any purpose is hereby granted without fee, provided that
 
8
 * the above copyright notice appear in all copies and that both that
 
9
 * copyright notice and this permission notice appear in supporting
 
10
 * documentation, and that the name of Keith Packard not be used in
 
11
 * advertising or publicity pertaining to distribution of the software without
 
12
 * specific, written prior permission.  Keith Packard makes no
 
13
 * representations about the suitability of this software for any purpose.  It
 
14
 * is provided "as is" without express or implied warranty.
 
15
 *
 
16
 * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
 
17
 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
 
18
 * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
 
19
 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
 
20
 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
 
21
 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 
22
 * PERFORMANCE OF THIS SOFTWARE.
 
23
 */
 
24
/* $RCSId: xc/programs/Xserver/hw/kdrive/knoop.c,v 1.1 1999/11/19 13:53:50 hohndel Exp $ */
 
25
 
 
26
/*
 
27
 * GC ops that don't do anything
 
28
 */
 
29
 
 
30
#ifdef HAVE_CONFIG_H
 
31
#include <kdrive-config.h>
 
32
#endif
 
33
#include "kdrive.h"
 
34
#include <gcstruct.h>
 
35
 
 
36
typedef void    (* typeFillSpans)(
 
37
                DrawablePtr /*pDrawable*/,
 
38
                GCPtr /*pGC*/,
 
39
                int /*nInit*/,
 
40
                DDXPointPtr /*pptInit*/,
 
41
                int * /*pwidthInit*/,
 
42
                int /*fSorted*/
 
43
);
 
44
 
 
45
typedef void    (* typeSetSpans)(
 
46
                DrawablePtr /*pDrawable*/,
 
47
                GCPtr /*pGC*/,
 
48
                char * /*psrc*/,
 
49
                DDXPointPtr /*ppt*/,
 
50
                int * /*pwidth*/,
 
51
                int /*nspans*/,
 
52
                int /*fSorted*/
 
53
);
 
54
 
 
55
typedef void    (* typePutImage)(
 
56
                DrawablePtr /*pDrawable*/,
 
57
                GCPtr /*pGC*/,
 
58
                int /*depth*/,
 
59
                int /*x*/,
 
60
                int /*y*/,
 
61
                int /*w*/,
 
62
                int /*h*/,
 
63
                int /*leftPad*/,
 
64
                int /*format*/,
 
65
                char * /*pBits*/
 
66
);
 
67
 
 
68
typedef RegionPtr       (* typeCopyArea)(
 
69
                DrawablePtr /*pSrc*/,
 
70
                DrawablePtr /*pDst*/,
 
71
                GCPtr /*pGC*/,
 
72
                int /*srcx*/,
 
73
                int /*srcy*/,
 
74
                int /*w*/,
 
75
                int /*h*/,
 
76
                int /*dstx*/,
 
77
                int /*dsty*/
 
78
);
 
79
 
 
80
typedef RegionPtr       (* typeCopyPlane)(
 
81
                DrawablePtr /*pSrcDrawable*/,
 
82
                DrawablePtr /*pDstDrawable*/,
 
83
                GCPtr /*pGC*/,
 
84
                int /*srcx*/,
 
85
                int /*srcy*/,
 
86
                int /*width*/,
 
87
                int /*height*/,
 
88
                int /*dstx*/,
 
89
                int /*dsty*/,
 
90
                unsigned long /*bitPlane*/
 
91
);
 
92
typedef void    (* typePolyPoint)(
 
93
                DrawablePtr /*pDrawable*/,
 
94
                GCPtr /*pGC*/,
 
95
                int /*mode*/,
 
96
                int /*npt*/,
 
97
                DDXPointPtr /*pptInit*/
 
98
);
 
99
 
 
100
typedef void    (* typePolylines)(
 
101
                DrawablePtr /*pDrawable*/,
 
102
                GCPtr /*pGC*/,
 
103
                int /*mode*/,
 
104
                int /*npt*/,
 
105
                DDXPointPtr /*pptInit*/
 
106
);
 
107
 
 
108
typedef void    (* typePolySegment)(
 
109
                DrawablePtr /*pDrawable*/,
 
110
                GCPtr /*pGC*/,
 
111
                int /*nseg*/,
 
112
                xSegment * /*pSegs*/
 
113
);
 
114
 
 
115
typedef void    (* typePolyRectangle)(
 
116
                DrawablePtr /*pDrawable*/,
 
117
                GCPtr /*pGC*/,
 
118
                int /*nrects*/,
 
119
                xRectangle * /*pRects*/
 
120
);
 
121
 
 
122
typedef void    (* typePolyArc)(
 
123
                DrawablePtr /*pDrawable*/,
 
124
                GCPtr /*pGC*/,
 
125
                int /*narcs*/,
 
126
                xArc * /*parcs*/
 
127
);
 
128
 
 
129
typedef void    (* typeFillPolygon)(
 
130
                DrawablePtr /*pDrawable*/,
 
131
                GCPtr /*pGC*/,
 
132
                int /*shape*/,
 
133
                int /*mode*/,
 
134
                int /*count*/,
 
135
                DDXPointPtr /*pPts*/
 
136
);
 
137
 
 
138
typedef void    (* typePolyFillRect)(
 
139
                DrawablePtr /*pDrawable*/,
 
140
                GCPtr /*pGC*/,
 
141
                int /*nrectFill*/,
 
142
                xRectangle * /*prectInit*/
 
143
);
 
144
 
 
145
typedef void    (* typePolyFillArc)(
 
146
                DrawablePtr /*pDrawable*/,
 
147
                GCPtr /*pGC*/,
 
148
                int /*narcs*/,
 
149
                xArc * /*parcs*/
 
150
);
 
151
 
 
152
typedef int             (* typePolyText8)(
 
153
                DrawablePtr /*pDrawable*/,
 
154
                GCPtr /*pGC*/,
 
155
                int /*x*/,
 
156
                int /*y*/,
 
157
                int /*count*/,
 
158
                char * /*chars*/
 
159
);
 
160
 
 
161
typedef int             (* typePolyText16)(
 
162
                DrawablePtr /*pDrawable*/,
 
163
                GCPtr /*pGC*/,
 
164
                int /*x*/,
 
165
                int /*y*/,
 
166
                int /*count*/,
 
167
                unsigned short * /*chars*/
 
168
);
 
169
 
 
170
typedef void    (* typeImageText8)(
 
171
                DrawablePtr /*pDrawable*/,
 
172
                GCPtr /*pGC*/,
 
173
                int /*x*/,
 
174
                int /*y*/,
 
175
                int /*count*/,
 
176
                char * /*chars*/
 
177
);
 
178
 
 
179
typedef void    (* typeImageText16)(
 
180
                DrawablePtr /*pDrawable*/,
 
181
                GCPtr /*pGC*/,
 
182
                int /*x*/,
 
183
                int /*y*/,
 
184
                int /*count*/,
 
185
                unsigned short * /*chars*/
 
186
);
 
187
 
 
188
typedef void    (* typeImageGlyphBlt)(
 
189
                DrawablePtr /*pDrawable*/,
 
190
                GCPtr /*pGC*/,
 
191
                int /*x*/,
 
192
                int /*y*/,
 
193
                unsigned int /*nglyph*/,
 
194
                CharInfoPtr * /*ppci*/,
 
195
                pointer /*pglyphBase*/
 
196
);
 
197
 
 
198
typedef void    (* typePolyGlyphBlt)(
 
199
                DrawablePtr /*pDrawable*/,
 
200
                GCPtr /*pGC*/,
 
201
                int /*x*/,
 
202
                int /*y*/,
 
203
                unsigned int /*nglyph*/,
 
204
                CharInfoPtr * /*ppci*/,
 
205
                pointer /*pglyphBase*/
 
206
);
 
207
 
 
208
typedef void    (* typePushPixels)(
 
209
                GCPtr /*pGC*/,
 
210
                PixmapPtr /*pBitMap*/,
 
211
                DrawablePtr /*pDst*/,
 
212
                int /*w*/,
 
213
                int /*h*/,
 
214
                int /*x*/,
 
215
                int /*y*/
 
216
);
 
217
 
 
218
static RegionPtr
 
219
KdNoopCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC,
 
220
            int srcx, int srcy, int width, int height, int dstx, int dsty)
 
221
{
 
222
    return NullRegion;
 
223
}
 
224
 
 
225
static RegionPtr 
 
226
KdNoopCopyPlane(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC,
 
227
                 int srcx, int srcy, int width, int height, 
 
228
                 int dstx, int dsty, unsigned long bitPlane)
 
229
{
 
230
    return NullRegion;
 
231
}
 
232
 
 
233
GCOps   kdNoopOps = {
 
234
    (typeFillSpans)         NoopDDA,    /* fill spans */
 
235
    (typeSetSpans)          NoopDDA,    /* set spans */
 
236
    (typePutImage)          NoopDDA,    /* put image */
 
237
    KdNoopCopyArea,             /* copy area */
 
238
    KdNoopCopyPlane,            /* copy plane */
 
239
    (typePolyPoint)         NoopDDA,    /* poly point */
 
240
    (typePolylines)         NoopDDA,    /* poly lines */
 
241
    (typePolySegment)   NoopDDA,        /* poly segment */
 
242
    (typePolyRectangle) NoopDDA,        /* poly rectangle */
 
243
    (typePolyArc)           NoopDDA,    /* poly arc */
 
244
    (typeFillPolygon)   NoopDDA,        /* fill polygon */
 
245
    (typePolyFillRect)  NoopDDA,        /* poly fillrect */
 
246
    (typePolyFillArc)   NoopDDA,        /* poly fillarc */
 
247
    (typePolyText8)         NoopDDA,    /* text 8 */
 
248
    (typePolyText16)    NoopDDA,        /* text 16 */
 
249
    (typeImageText8)    NoopDDA,        /* itext 8 */
 
250
    (typeImageText16)   NoopDDA,        /* itext 16 */
 
251
    (typePolyGlyphBlt)  NoopDDA,        /* glyph blt */
 
252
    (typeImageGlyphBlt) NoopDDA,        /* iglyph blt */
 
253
    (typePushPixels)    NoopDDA,        /* push pixels */
 
254
#ifdef NEED_LINEHELPER
 
255
    (typeLineHelper) NULL,
 
256
#endif
 
257
};