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.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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. */
  27. #ifndef _XMESA_X_H_
  28. #define _XMESA_X_H_
  29. typedef Display XMesaDisplay;
  30. typedef Pixmap XMesaPixmap;
  31. typedef Colormap XMesaColormap;
  32. typedef Drawable XMesaDrawable;
  33. typedef Window XMesaWindow;
  34. typedef GC XMesaGC;
  35. typedef XVisualInfo *XMesaVisualInfo;
  36. typedef XImage XMesaImage;
  37. typedef XPoint XMesaPoint;
  38. typedef XColor XMesaColor;
  39. #define XMesaDestroyImage XDestroyImage
  40. #define XMesaPutPixel XPutPixel
  41. #define XMesaGetPixel XGetPixel
  42. #define XMesaSetForeground XSetForeground
  43. #define XMesaSetBackground XSetBackground
  44. #define XMesaSetPlaneMask XSetPlaneMask
  45. #define XMesaSetFunction XSetFunction
  46. #define XMesaSetDashes XSetDashes
  47. #define XMesaSetLineAttributes XSetLineAttributes
  48. #define XMesaSetFillStyle XSetFillStyle
  49. #define XMesaSetTile XSetTile
  50. #define XMesaSetStipple XSetStipple
  51. #define XMesaDrawPoint XDrawPoint
  52. #define XMesaDrawPoints XDrawPoints
  53. #define XMesaDrawLine XDrawLine
  54. #define XMesaFillRectangle XFillRectangle
  55. #define XMesaPutImage XPutImage
  56. #define XMesaCopyArea XCopyArea
  57. #define XMesaFillPolygon XFillPolygon
  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->visinfo->red_mask
  63. #define GET_GREENMASK(__v) __v->visinfo->green_mask
  64. #define GET_BLUEMASK(__v) __v->visinfo->blue_mask
  65. #if defined(__cplusplus) || defined(c_plusplus)
  66. #define GET_VISUAL_CLASS(__v) __v->visinfo->c_class
  67. #else
  68. #define GET_VISUAL_CLASS(__v) __v->visinfo->class
  69. #endif
  70. #define GET_VISUAL_DEPTH(__v) __v->visinfo->depth
  71. #define GET_BLACK_PIXEL(__v) BlackPixel(__v->display, __v->visinfo->screen)
  72. #define CHECK_BYTE_ORDER(__v) host_byte_order()==ImageByteOrder(__v->display)
  73. #define CHECK_FOR_HPCR(__v) XInternAtom(__v->display, "_HP_RGB_SMOOTH_MAP_LIST", True)
  74. #endif