Clone of mesa.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

xmesa_x.h 3.2KB

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