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.

40 lines
1000 B

7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /* Win32 screen routines header.
  2. Copyright (c) 2002 by Salvador E. Tropea (SET)
  3. Covered by the GPL license. */
  4. // This headers needs windows header
  5. #if defined(TVOS_Win32) && !defined(WIN32MOUSE_HEADER_INCLUDED)
  6. #define WIN32MOUSE_HEADER_INCLUDED
  7. const unsigned eventMouseQSize=300;
  8. class THWMouseWin32 : public THWMouse
  9. {
  10. public:
  11. static void Init();
  12. static void DeInit();
  13. friend class TScreenWin32;
  14. protected:
  15. THWMouseWin32() {};
  16. virtual ~THWMouseWin32();
  17. static void GetEvent(MouseEventType &me);
  18. static void Resume();
  19. // For this driver
  20. // Put a mouse event in the queue
  21. static void putConsoleMouseEvent(MouseEventType &mouse);
  22. // Process a mouse event from Windows
  23. static void HandleMouseEvent();
  24. static MouseEventType *evMouseIn;
  25. static MouseEventType *evLastMouseIn;
  26. static MouseEventType *evMouseOut;
  27. static MouseEventType evMouseQueue[eventMouseQSize];
  28. static unsigned evMouseLength;
  29. static CRITICAL_SECTION lockMouse;
  30. };
  31. #endif // WIN32MOUSE_HEADER_INCLUDED