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.

SDisplayCoreWMHooks.h 2.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /* Copyright (C) 2002-2005 RealVNC Ltd. All Rights Reserved.
  2. *
  3. * This is free software; you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License as published by
  5. * the Free Software Foundation; either version 2 of the License, or
  6. * (at your option) any later version.
  7. *
  8. * This software is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU General Public License
  14. * along with this software; if not, write to the Free Software
  15. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
  16. * USA.
  17. */
  18. // -=- SDisplayCoreWMHooks.h
  19. //
  20. // SDisplayCore implementation that uses WMHooks to capture changes to
  21. // the display.
  22. // Whenever changes are detected, the SDisplay's updateEvent is signalled,
  23. // so that it can perform housekeeping tasks (like ensuring the currently
  24. // active desktop is the correct one), before flushing changes from the
  25. // Core to the VNC Server. The SDisplay will clip the changes before they
  26. // reach the VNC Server.
  27. #ifndef __RFB_SDISPLAY_CORE_WMHOOKS_H__
  28. #define __RFB_SDISPLAY_CORE_WMHOOKS_H__
  29. #include <rfb_win32/SDisplayCorePolling.h>
  30. #include <rfb_win32/WMHooks.h>
  31. #include <rfb_win32/WMPoller.h>
  32. namespace rfb {
  33. namespace win32 {
  34. class SDisplayCoreWMHooks : public SDisplayCorePolling {
  35. public:
  36. SDisplayCoreWMHooks(SDisplay* display, UpdateTracker* ut);
  37. ~SDisplayCoreWMHooks();
  38. // - Called by SDisplay to flush updates to the specified tracker
  39. virtual void flushUpdates();
  40. virtual const char* methodName() const { return "VNC Hooks"; }
  41. protected:
  42. // - MsgWindow overrides
  43. // processMessage is used to service the cursor & polling timers
  44. virtual LRESULT processMessage(UINT msg, WPARAM wParam, LPARAM lParam);
  45. // - Hooking subcomponents used to track the desktop state
  46. WMHooks hooks;
  47. WMPoller poller;
  48. IntervalTimer cursorTimer;
  49. IntervalTimer consolePollTimer;
  50. bool pollConsoles;
  51. static const unsigned int consolePollTimerId;
  52. static const unsigned int cursorTimerId;
  53. };
  54. };
  55. };
  56. #endif