1848b8605Smrg 2848b8605Smrg/************************************************************************** 3848b8605Smrg 4848b8605SmrgCopyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. 5848b8605SmrgAll Rights Reserved. 6848b8605Smrg 7848b8605SmrgPermission is hereby granted, free of charge, to any person obtaining a 8848b8605Smrgcopy of this software and associated documentation files (the 9848b8605Smrg"Software"), to deal in the Software without restriction, including 10848b8605Smrgwithout limitation the rights to use, copy, modify, merge, publish, 11848b8605Smrgdistribute, sub license, and/or sell copies of the Software, and to 12848b8605Smrgpermit persons to whom the Software is furnished to do so, subject to 13848b8605Smrgthe following conditions: 14848b8605Smrg 15848b8605SmrgThe above copyright notice and this permission notice (including the 16848b8605Smrgnext paragraph) shall be included in all copies or substantial portions 17848b8605Smrgof the Software. 18848b8605Smrg 19848b8605SmrgTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20848b8605SmrgOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21848b8605SmrgMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 22848b8605SmrgIN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR 23848b8605SmrgANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24848b8605SmrgTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25848b8605SmrgSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26848b8605Smrg 27848b8605Smrg**************************************************************************/ 28848b8605Smrg 29848b8605Smrg/* 30848b8605Smrg * Authors: 31848b8605Smrg * Kevin E. Martin <kevin@precisioninsight.com> 32848b8605Smrg * 33848b8605Smrg * When we're building the XMesa driver for stand-alone Mesa we 34848b8605Smrg * include this file when building the xm_*.c files. 35848b8605Smrg * We need to define some types and macros differently when building 36848b8605Smrg * in the Xserver vs. stand-alone Mesa. 37848b8605Smrg */ 38848b8605Smrg 39848b8605Smrg#ifndef _XMESA_X_H_ 40848b8605Smrg#define _XMESA_X_H_ 41848b8605Smrg 42848b8605Smrgtypedef Display XMesaDisplay; 43848b8605Smrgtypedef Pixmap XMesaPixmap; 44848b8605Smrgtypedef Colormap XMesaColormap; 45848b8605Smrgtypedef Drawable XMesaDrawable; 46848b8605Smrgtypedef Window XMesaWindow; 47848b8605Smrgtypedef GC XMesaGC; 48848b8605Smrgtypedef XVisualInfo *XMesaVisualInfo; 49848b8605Smrgtypedef XImage XMesaImage; 50848b8605Smrgtypedef XPoint XMesaPoint; 51848b8605Smrgtypedef XColor XMesaColor; 52848b8605Smrg 53848b8605Smrg#define XMesaDestroyImage XDestroyImage 54848b8605Smrg 55848b8605Smrg#define XMesaPutPixel XPutPixel 56848b8605Smrg#define XMesaGetPixel XGetPixel 57848b8605Smrg 58848b8605Smrg#define XMesaSetForeground XSetForeground 59848b8605Smrg#define XMesaSetBackground XSetBackground 60848b8605Smrg#define XMesaSetPlaneMask XSetPlaneMask 61848b8605Smrg#define XMesaSetFunction XSetFunction 62848b8605Smrg#define XMesaSetFillStyle XSetFillStyle 63848b8605Smrg#define XMesaSetTile XSetTile 64848b8605Smrg 65848b8605Smrg#define XMesaDrawPoint XDrawPoint 66848b8605Smrg#define XMesaDrawPoints XDrawPoints 67848b8605Smrg#define XMesaDrawLine XDrawLine 68848b8605Smrg#define XMesaFillRectangle XFillRectangle 69848b8605Smrg#define XMesaGetImage XGetImage 70848b8605Smrg#define XMesaPutImage XPutImage 71848b8605Smrg#define XMesaCopyArea XCopyArea 72848b8605Smrg 73848b8605Smrg#define XMesaCreatePixmap XCreatePixmap 74848b8605Smrg#define XMesaFreePixmap XFreePixmap 75848b8605Smrg#define XMesaFreeGC XFreeGC 76848b8605Smrg 77848b8605Smrg#define GET_COLORMAP_SIZE(__v) __v->visinfo->colormap_size 78848b8605Smrg#define GET_REDMASK(__v) __v->mesa_visual.redMask 79848b8605Smrg#define GET_GREENMASK(__v) __v->mesa_visual.greenMask 80848b8605Smrg#define GET_BLUEMASK(__v) __v->mesa_visual.blueMask 81848b8605Smrg#define GET_VISUAL_DEPTH(__v) __v->visinfo->depth 82848b8605Smrg#define GET_BLACK_PIXEL(__v) BlackPixel(__v->display, __v->screen) 83848b8605Smrg#define CHECK_BYTE_ORDER(__v) host_byte_order()==ImageByteOrder(__v->display) 84848b8605Smrg 85848b8605Smrg#endif 86