diff options
Diffstat (limited to 'tvision/include/tv/win32/mouse.h')
-rw-r--r-- | tvision/include/tv/win32/mouse.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/tvision/include/tv/win32/mouse.h b/tvision/include/tv/win32/mouse.h new file mode 100644 index 0000000..a9aebdb --- /dev/null +++ b/tvision/include/tv/win32/mouse.h @@ -0,0 +1,40 @@ +/* Win32 screen routines header. + Copyright (c) 2002 by Salvador E. Tropea (SET) + Covered by the GPL license. */ +// This headers needs windows header +#if defined(TVOS_Win32) && !defined(WIN32MOUSE_HEADER_INCLUDED) +#define WIN32MOUSE_HEADER_INCLUDED + +const unsigned eventMouseQSize=300; + +class THWMouseWin32 : public THWMouse +{ +public: + static void Init(); + static void DeInit(); + + friend class TScreenWin32; + +protected: + THWMouseWin32() {}; + virtual ~THWMouseWin32(); + + static void GetEvent(MouseEventType &me); + static void Resume(); + + // For this driver + // Put a mouse event in the queue + static void putConsoleMouseEvent(MouseEventType &mouse); + // Process a mouse event from Windows + static void HandleMouseEvent(); + + static MouseEventType *evMouseIn; + static MouseEventType *evLastMouseIn; + static MouseEventType *evMouseOut; + static MouseEventType evMouseQueue[eventMouseQSize]; + static unsigned evMouseLength; + static CRITICAL_SECTION lockMouse; +}; + +#endif // WIN32MOUSE_HEADER_INCLUDED + |