1 2/************************************************************************** 3 4Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. 5All Rights Reserved. 6 7Permission is hereby granted, free of charge, to any person obtaining a 8copy of this software and associated documentation files (the 9"Software"), to deal in the Software without restriction, including 10without limitation the rights to use, copy, modify, merge, publish, 11distribute, sub license, and/or sell copies of the Software, and to 12permit persons to whom the Software is furnished to do so, subject to 13the following conditions: 14 15The above copyright notice and this permission notice (including the 16next paragraph) shall be included in all copies or substantial portions 17of the Software. 18 19THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 22IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR 23ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 27**************************************************************************/ 28 29/* 30 * Authors: 31 * Kevin E. Martin <kevin@precisioninsight.com> 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 42typedef Display XMesaDisplay; 43typedef Pixmap XMesaPixmap; 44typedef Colormap XMesaColormap; 45typedef Drawable XMesaDrawable; 46typedef Window XMesaWindow; 47typedef GC XMesaGC; 48typedef XVisualInfo *XMesaVisualInfo; 49typedef XImage XMesaImage; 50typedef XPoint XMesaPoint; 51typedef 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->screen) 83#define CHECK_BYTE_ORDER(__v) host_byte_order()==ImageByteOrder(__v->display) 84 85#endif 86