Leaked source code of windows server 2003
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.

162 lines
4.3 KiB

  1. /******************************Module*Header*******************************\
  2. * Module Name: exclude.hxx
  3. *
  4. * Handles sprite exclusion.
  5. *
  6. * Created: 13-Sep-1990 16:29:44
  7. * Author: Charles Whitmer [chuckwh]
  8. *
  9. * Copyright (c) 1990-1999 Microsoft Corporation
  10. \**************************************************************************/
  11. class EWNDOBJ;
  12. /*********************************Class************************************\
  13. * DEVEXCLUDEWNDOBJ
  14. *
  15. * Excludes any sprites from the given WNDOBJ area.
  16. *
  17. * 16-Sep-1997 -by- J. Andrew Goossen [andrewgo]
  18. * Wrote it.
  19. \**************************************************************************/
  20. class DEVEXCLUDEWNDOBJ
  21. {
  22. private:
  23. EWNDOBJ* pwo;
  24. public:
  25. DEVEXCLUDEWNDOBJ()
  26. {
  27. pwo = NULL;
  28. }
  29. DEVEXCLUDEWNDOBJ(EWNDOBJ* _pwo)
  30. {
  31. vExclude(_pwo);
  32. }
  33. VOID vExclude(EWNDOBJ* _pwo)
  34. {
  35. pwo = _pwo;
  36. EngControlSprites((WNDOBJ*) pwo, ECS_TEARDOWN);
  37. }
  38. ~DEVEXCLUDEWNDOBJ()
  39. {
  40. if (pwo != NULL)
  41. EngControlSprites((WNDOBJ*) pwo, ECS_REDRAW);
  42. }
  43. };
  44. /*********************************Class************************************\
  45. * DEVEXCLUDERECT
  46. *
  47. * Excludes any sprites from the given rectangular area.
  48. *
  49. * 16-Sep-1997 -by- J. Andrew Goossen [andrewgo]
  50. * Wrote it.
  51. \**************************************************************************/
  52. class DEVEXCLUDERECT
  53. {
  54. private:
  55. BOOL bUnTearDown;
  56. HDEV hdev;
  57. RECTL rcl;
  58. public:
  59. DEVEXCLUDERECT()
  60. {
  61. bUnTearDown = FALSE;
  62. }
  63. DEVEXCLUDERECT(HDEV _hdev, RECTL* _prcl)
  64. {
  65. vExclude(_hdev, _prcl);
  66. }
  67. VOID vExclude(HDEV _hdev, RECTL* _prcl)
  68. {
  69. hdev = _hdev;
  70. rcl = *_prcl;
  71. bUnTearDown = bSpTearDownSprites(hdev, _prcl, FALSE);
  72. }
  73. ~DEVEXCLUDERECT()
  74. {
  75. if (bUnTearDown)
  76. vSpUnTearDownSprites(hdev, &rcl, FALSE);
  77. }
  78. };
  79. /*********************************Class************************************\
  80. * DEVEXCLUDEOBJ
  81. *
  82. * Excludes the cursor from the given area.
  83. *
  84. * History:
  85. * Thu 14-Apr-1994 -by- Patrick Haluptzok [patrickh]
  86. * Optimize / make Async pointers work
  87. *
  88. * Mon 24-Aug-1992 -by- Patrick Haluptzok [patrickh]
  89. * destructor inline for common case, support for Drag Rect exclusion.
  90. *
  91. * Wed 06-May-1992 17:04:37 -by- Charles Whitmer [chuckwh]
  92. * Rewrote for new pointer scheme.
  93. *
  94. * Mon 09-Sep-1991 -by- Patrick Haluptzok [patrickh]
  95. * Change constructors to allow conditional initialization.
  96. *
  97. * Thu 13-Sep-1990 16:30:14 -by- Charles Whitmer [chuckwh]
  98. * Wrote some stubs.
  99. \**************************************************************************/
  100. #define REDRAW_CURSOR 0x0001
  101. #define REDRAW_DRAGRECT 0x0002
  102. #define REDRAW_SPRITES 0x0004
  103. // *** NOTE: DEVEXCLUDEOBJ is obsolete. ***
  104. class DEVEXCLUDEOBJ /* dxo */
  105. {
  106. public:
  107. // vExclude -- Excludes the pointer.
  108. VOID vExclude(HDEV,RECTL *,ECLIPOBJ *) {}
  109. // vExclude2 -- Like vExclude, but also checks against an offset ECLIPOBJ.
  110. VOID vExclude2(HDEV,RECTL *,ECLIPOBJ *,POINTL *) {}
  111. VOID vExcludeDC(XDCOBJ dco, RECTL *prcl) {}
  112. VOID vExcludeDC_CLIP(XDCOBJ dco, RECTL *prcl, ECLIPOBJ *pco) {}
  113. VOID vExcludeDC_CLIP2(XDCOBJ dco,RECTL *prcl,ECLIPOBJ *pco,POINTL *pptl) {}
  114. // Constructor -- Allows vExclude to be called optionally.
  115. DEVEXCLUDEOBJ() {}
  116. // Constructor -- Maybe take down the pointer.
  117. DEVEXCLUDEOBJ(XDCOBJ dco,RECTL *prcl) {}
  118. DEVEXCLUDEOBJ(XDCOBJ dco,RECTL *prcl,ECLIPOBJ *pco) {}
  119. DEVEXCLUDEOBJ(XDCOBJ dco,RECTL *prcl,ECLIPOBJ *pco,POINTL *pptl) {}
  120. // Destructor -- Do cleanup.
  121. VOID vReplaceStuff() {}
  122. VOID vTearDownDragRect(HDEV _hdev, RECTL *prcl) {}
  123. VOID vForceDragRectRedraw(HDEV hdev_, BOOL b) {}
  124. // vDestructor -- manual version of the normal C++ destructor; needed
  125. // by the C-callable OpenGL interface.
  126. VOID vDestructor() {}
  127. ~DEVEXCLUDEOBJ() {}
  128. // vInit -- Initialize.
  129. VOID vInit() {}
  130. };