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.

69 lines
2.2 KiB

  1. //=============================================================================
  2. // Copyright (c) 2000 Microsoft Corporation
  3. //
  4. // dxcursor.hpp
  5. //
  6. // DX Cursor implementation.
  7. //
  8. // Created 01/17/2000 kanqiu (Kan Qiu)
  9. //=============================================================================
  10. #ifndef __DXCURSOR_HPP__
  11. #define __DXCURSOR_HPP__
  12. #include "surface.hpp"
  13. //-----------------------------------------------------------------------------
  14. // CCursor
  15. //-----------------------------------------------------------------------------
  16. class CCursor
  17. {
  18. public:
  19. CCursor(CBaseDevice *pDevice);
  20. ~CCursor();
  21. void Destroy();
  22. HRESULT SetProperties(
  23. UINT xHotSpot,
  24. UINT yHotSpot,
  25. CBaseSurface *pCursorBitmap);
  26. void SetPosition(UINT xScreenSpace,UINT yScreenSpace,DWORD Flags);
  27. BOOL SetVisibility(BOOL bVisible);
  28. HRESULT Hide(HANDLE);
  29. HRESULT Show(HANDLE);
  30. void Flip();
  31. private:
  32. void UpdateRects();
  33. HRESULT CursorInit(
  34. UINT xHotSpot,
  35. UINT yHotSpot,
  36. CBaseSurface *pCursorBitmap);
  37. DWORD m_dwCursorFlags;//cursor flags
  38. HANDLE m_hCursorDdb; //device dependent Cursor image
  39. HANDLE m_hFrontSave; //excluded front buffer
  40. HANDLE m_hBackSave; //excluded back buffer
  41. UINT m_xCursorHotSpot;
  42. UINT m_yCursorHotSpot;
  43. UINT m_xCursor;
  44. UINT m_yCursor;
  45. UINT m_Width;
  46. UINT m_Height;
  47. RECT m_CursorRect;
  48. RECT m_BufferRect;
  49. RECT m_CursorRectSave;
  50. RECT m_BufferRectSave;
  51. CBaseDevice* m_pDevice;
  52. HCURSOR m_hOsCursor;
  53. HCURSOR m_hHWCursor;
  54. POINT m_MonitorOrigin; //(x,y) Monitor Top left
  55. UINT m_SavedMouseTrails;
  56. }; // class CCursor
  57. #define DDRAWI_CURSORISON 0x01
  58. #define DDRAWI_CURSORINIT 0x02
  59. #define DDRAWI_CURSORSAVERECT 0x04
  60. #define DDRAWI_CURSORRECTSAVED 0x08
  61. #endif // __DXCURSOR_HPP__