1 |
|
---|
2 | /**************************************************************************
|
---|
3 |
|
---|
4 | Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
|
---|
5 | All Rights Reserved.
|
---|
6 |
|
---|
7 | Permission is hereby granted, free of charge, to any person obtaining a
|
---|
8 | copy of this software and associated documentation files (the
|
---|
9 | "Software"), to deal in the Software without restriction, including
|
---|
10 | without limitation the rights to use, copy, modify, merge, publish,
|
---|
11 | distribute, sub license, and/or sell copies of the Software, and to
|
---|
12 | permit persons to whom the Software is furnished to do so, subject to
|
---|
13 | the following conditions:
|
---|
14 |
|
---|
15 | The above copyright notice and this permission notice (including the
|
---|
16 | next paragraph) shall be included in all copies or substantial portions
|
---|
17 | of the Software.
|
---|
18 |
|
---|
19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
---|
20 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
---|
21 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
|
---|
22 | IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
|
---|
23 | ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
---|
24 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
---|
25 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
---|
26 |
|
---|
27 | **************************************************************************/
|
---|
28 |
|
---|
29 | /*
|
---|
30 | * Authors:
|
---|
31 | * Kevin E. Martin <[email protected]>
|
---|
32 | *
|
---|
33 | * When we're building the XMesa driver for stand-alone Mesa we
|
---|
34 | * include this file when building the xm_*.c files.
|
---|
35 | * We need to define some types and macros differently when building
|
---|
36 | * in the Xserver vs. stand-alone Mesa.
|
---|
37 | */
|
---|
38 |
|
---|
39 | #ifndef _XMESA_X_H_
|
---|
40 | #define _XMESA_X_H_
|
---|
41 |
|
---|
42 | typedef Display XMesaDisplay;
|
---|
43 | typedef Pixmap XMesaPixmap;
|
---|
44 | typedef Colormap XMesaColormap;
|
---|
45 | typedef Drawable XMesaDrawable;
|
---|
46 | typedef Window XMesaWindow;
|
---|
47 | typedef GC XMesaGC;
|
---|
48 | typedef XVisualInfo *XMesaVisualInfo;
|
---|
49 | typedef XImage XMesaImage;
|
---|
50 | typedef XPoint XMesaPoint;
|
---|
51 | typedef XColor XMesaColor;
|
---|
52 |
|
---|
53 | #define XMesaDestroyImage XDestroyImage
|
---|
54 |
|
---|
55 | #define XMesaPutPixel XPutPixel
|
---|
56 | #define XMesaGetPixel XGetPixel
|
---|
57 |
|
---|
58 | #define XMesaSetForeground XSetForeground
|
---|
59 | #define XMesaSetBackground XSetBackground
|
---|
60 | #define XMesaSetPlaneMask XSetPlaneMask
|
---|
61 | #define XMesaSetFunction XSetFunction
|
---|
62 | #define XMesaSetFillStyle XSetFillStyle
|
---|
63 | #define XMesaSetTile XSetTile
|
---|
64 |
|
---|
65 | #define XMesaDrawPoint XDrawPoint
|
---|
66 | #define XMesaDrawPoints XDrawPoints
|
---|
67 | #define XMesaDrawLine XDrawLine
|
---|
68 | #define XMesaFillRectangle XFillRectangle
|
---|
69 | #define XMesaGetImage XGetImage
|
---|
70 | #define XMesaPutImage XPutImage
|
---|
71 | #define XMesaCopyArea XCopyArea
|
---|
72 |
|
---|
73 | #define XMesaCreatePixmap XCreatePixmap
|
---|
74 | #define XMesaFreePixmap XFreePixmap
|
---|
75 | #define XMesaFreeGC XFreeGC
|
---|
76 |
|
---|
77 | #define GET_COLORMAP_SIZE(__v) __v->visinfo->colormap_size
|
---|
78 | #define GET_REDMASK(__v) __v->mesa_visual.redMask
|
---|
79 | #define GET_GREENMASK(__v) __v->mesa_visual.greenMask
|
---|
80 | #define GET_BLUEMASK(__v) __v->mesa_visual.blueMask
|
---|
81 | #define GET_VISUAL_DEPTH(__v) __v->visinfo->depth
|
---|
82 | #define GET_BLACK_PIXEL(__v) BlackPixel(__v->display, __v->mesa_visual.screen)
|
---|
83 | #define CHECK_BYTE_ORDER(__v) host_byte_order()==ImageByteOrder(__v->display)
|
---|
84 | #define CHECK_FOR_HPCR(__v) XInternAtom(__v->display, "_HP_RGB_SMOOTH_MAP_LIST", True)
|
---|
85 |
|
---|
86 | #endif
|
---|