PageRenderTime 22ms CodeModel.GetById 19ms RepoModel.GetById 1ms app.codeStats 0ms

/Mesa-6.5.1/include/GL/xmesa_x.h

#
C++ Header | 85 lines | 39 code | 11 blank | 35 comment | 0 complexity | b2674f3f2c8ac64749c25c25dc0aa71a MD5 | raw file
Possible License(s): LGPL-2.0
  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 XMesaDrawLine XDrawLine
  55. #define XMesaFillRectangle XFillRectangle
  56. #define XMesaPutImage XPutImage
  57. #define XMesaCopyArea XCopyArea
  58. #define XMesaCreatePixmap XCreatePixmap
  59. #define XMesaFreePixmap XFreePixmap
  60. #define XMesaFreeGC XFreeGC
  61. #define GET_COLORMAP_SIZE(__v) __v->visinfo->colormap_size
  62. #define GET_REDMASK(__v) __v->mesa_visual.redMask
  63. #define GET_GREENMASK(__v) __v->mesa_visual.greenMask
  64. #define GET_BLUEMASK(__v) __v->mesa_visual.blueMask
  65. #define GET_VISUAL_DEPTH(__v) __v->visinfo->depth
  66. #define GET_BLACK_PIXEL(__v) BlackPixel(__v->display, __v->mesa_visual.screen)
  67. #define CHECK_BYTE_ORDER(__v) host_byte_order()==ImageByteOrder(__v->display)
  68. #define CHECK_FOR_HPCR(__v) XInternAtom(__v->display, "_HP_RGB_SMOOTH_MAP_LIST", True)
  69. #endif