midbestr.h 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /******************************************************************************
  2. *
  3. * Copyright (c) 1994, 1995 Hewlett-Packard Company
  4. *
  5. * Permission is hereby granted, free of charge, to any person obtaining
  6. * a copy of this software and associated documentation files (the
  7. * "Software"), to deal in the Software without restriction, including
  8. * without limitation the rights to use, copy, modify, merge, publish,
  9. * distribute, sublicense, and/or sell copies of the Software, and to
  10. * permit persons to whom the Software is furnished to do so, subject to
  11. * the following conditions:
  12. *
  13. * The above copyright notice and this permission notice shall be included
  14. * in all copies or substantial portions of the Software.
  15. *
  16. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  17. * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  18. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  19. * IN NO EVENT SHALL HEWLETT-PACKARD COMPANY BE LIABLE FOR ANY CLAIM,
  20. * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  21. * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
  22. * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  23. *
  24. * Except as contained in this notice, the name of the Hewlett-Packard
  25. * Company shall not be used in advertising or otherwise to promote the
  26. * sale, use or other dealings in this Software without prior written
  27. * authorization from the Hewlett-Packard Company.
  28. *
  29. * Header file for users of machine-independent DBE code
  30. *
  31. *****************************************************************************/
  32. #ifdef HAVE_DIX_CONFIG_H
  33. #include <dix-config.h>
  34. #endif
  35. #ifndef MIDBE_STRUCT_H
  36. #define MIDBE_STRUCT_H
  37. /* DEFINES */
  38. #define MI_DBE_WINDOW_PRIV_PRIV(pDbeWindowPriv) \
  39. (((miDbeWindowPrivPrivIndex < 0) || (!pDbeWindowPriv)) ? \
  40. NULL : \
  41. ((MiDbeWindowPrivPrivPtr) \
  42. ((pDbeWindowPriv)->devPrivates[miDbeWindowPrivPrivIndex].ptr)))
  43. #define MI_DBE_WINDOW_PRIV_PRIV_FROM_WINDOW(pWin)\
  44. MI_DBE_WINDOW_PRIV_PRIV(DBE_WINDOW_PRIV(pWin))
  45. #define MI_DBE_SCREEN_PRIV_PRIV(pDbeScreenPriv) \
  46. (((miDbeScreenPrivPrivIndex < 0) || (!pDbeScreenPriv)) ? \
  47. NULL : \
  48. ((MiDbeScreenPrivPrivPtr) \
  49. ((pDbeScreenPriv)->devPrivates[miDbeScreenPrivPrivIndex].ptr)))
  50. /* TYPEDEFS */
  51. typedef struct _MiDbeWindowPrivPrivRec {
  52. /* Place machine-specific fields in here.
  53. * Since this is mi code, we do not really have machine-specific fields.
  54. */
  55. /* Pointer to a drawable that contains the contents of the back buffer.
  56. */
  57. PixmapPtr pBackBuffer;
  58. /* Pointer to a drawable that contains the contents of the front buffer.
  59. * This pointer is only used for the XdbeUntouched swap action. For that
  60. * swap action, we need to copy the front buffer (window) contents into
  61. * this drawable, copy the contents of current back buffer drawable (the
  62. * back buffer) into the window, swap the front and back drawable pointers,
  63. * and then swap the drawable/resource associations in the resource
  64. * database.
  65. */
  66. PixmapPtr pFrontBuffer;
  67. /* Pointer back to our window private with which we are associated. */
  68. DbeWindowPrivPtr pDbeWindowPriv;
  69. } MiDbeWindowPrivPrivRec, *MiDbeWindowPrivPrivPtr;
  70. typedef struct _MiDbeScreenPrivPrivRec {
  71. /* Place machine-specific fields in here.
  72. * Since this is mi code, we do not really have machine-specific fields.
  73. */
  74. /* Pointer back to our screen private with which we are associated. */
  75. DbeScreenPrivPtr pDbeScreenPriv;
  76. } MiDbeScreenPrivPrivRec, *MiDbeScreenPrivPrivPtr;
  77. #endif /* MIDBE_STRUCT_H */