2 /**************************************************************************
4 Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
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:
15 The above copyright notice and this permission notice (including the
16 next paragraph) shall be included in all copies or substantial portions
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.
27 **************************************************************************/
31 * Kevin E. Martin <kevin@precisioninsight.com>
33 * $Header: /cvsroot/mesa3d/Mesa/include/GL/xmesa_x.h,v 1.2 2000/02/25 20:31:11 brianp Exp $
39 typedef Display XMesaDisplay;
40 typedef Pixmap XMesaPixmap;
41 typedef Colormap XMesaColormap;
42 typedef Drawable XMesaDrawable;
43 typedef Window XMesaWindow;
45 typedef XVisualInfo *XMesaVisualInfo;
46 typedef XImage XMesaImage;
47 typedef XPoint XMesaPoint;
48 typedef XColor XMesaColor;
50 #define XMesaDestroyImage XDestroyImage
52 #define XMesaPutPixel XPutPixel
53 #define XMesaGetPixel XGetPixel
55 #define XMesaSetForeground XSetForeground
56 #define XMesaSetBackground XSetBackground
57 #define XMesaSetPlaneMask XSetPlaneMask
58 #define XMesaSetFunction XSetFunction
59 #define XMesaSetDashes XSetDashes
60 #define XMesaSetLineAttributes XSetLineAttributes
61 #define XMesaSetFillStyle XSetFillStyle
62 #define XMesaSetTile XSetTile
63 #define XMesaSetStipple XSetStipple
65 #define XMesaDrawPoint XDrawPoint
66 #define XMesaDrawPoints XDrawPoints
67 #define XMesaDrawLine XDrawLine
68 #define XMesaFillRectangle XFillRectangle
69 #define XMesaPutImage XPutImage
70 #define XMesaCopyArea XCopyArea
71 #define XMesaFillPolygon XFillPolygon
73 #define XMesaCreatePixmap XCreatePixmap
74 #define XMesaFreePixmap XFreePixmap
75 #define XMesaFreeGC XFreeGC
77 #define GET_COLORMAP_SIZE(__v) __v->visinfo->colormap_size
78 #define GET_REDMASK(__v) __v->visinfo->red_mask
79 #define GET_GREENMASK(__v) __v->visinfo->green_mask
80 #define GET_BLUEMASK(__v) __v->visinfo->blue_mask
81 #if defined(__cplusplus) || defined(c_plusplus)
82 #define GET_VISUAL_CLASS(__v) __v->visinfo->c_class
84 #define GET_VISUAL_CLASS(__v) __v->visinfo->class
86 #define GET_VISUAL_DEPTH(__v) __v->visinfo->depth
87 #define GET_BLACK_PIXEL(__v) BlackPixel(__v->display, __v->visinfo->screen)
88 #define CHECK_BYTE_ORDER(__v) host_byte_order()==ImageByteOrder(__v->display)
89 #define CHECK_FOR_HPCR(__v) XInternAtom(__v->display, "_HP_RGB_SMOOTH_MAP_LIST", True)