diff options
Diffstat (limited to 'vncviewer/Viewport.h')
-rw-r--r-- | vncviewer/Viewport.h | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/vncviewer/Viewport.h b/vncviewer/Viewport.h index 41696d9d..8e3f473e 100644 --- a/vncviewer/Viewport.h +++ b/vncviewer/Viewport.h @@ -20,12 +20,13 @@ #ifndef __VIEWPORT_H__ #define __VIEWPORT_H__ -#include <rfb/Rect.h> +#include <core/Rect.h> #include <FL/Fl_Widget.H> #include "EmulateMB.h" #include "Keyboard.h" +#include "ShortcutHandler.h" class Fl_Menu_Button; class Fl_RGB_Image; @@ -39,7 +40,7 @@ class Viewport : public Fl_Widget, protected EmulateMB, protected KeyboardHandler { public: - Viewport(int w, int h, const rfb::PixelFormat& serverPF, CConn* cc_); + Viewport(int w, int h, CConn* cc_); ~Viewport(); // Most efficient format (from Viewport's point of view) @@ -49,8 +50,7 @@ public: void updateWindow(); // New image for the locally rendered cursor - void setCursor(int width, int height, const rfb::Point& hotspot, - const uint8_t* data); + void setCursor(); // Change client LED state void setLEDState(unsigned int state); @@ -71,16 +71,20 @@ public: int handle(int event) override; protected: - void sendPointerEvent(const rfb::Point& pos, uint16_t buttonMask) override; + void sendPointerEvent(const core::Point& pos, + uint16_t buttonMask) override; private: bool hasFocus(); + // Show the currently set (or system) cursor + void showCursor(); + static void handleClipboardChange(int source, void *data); void flushPendingClipboard(); - void handlePointerEvent(const rfb::Point& pos, uint16_t buttonMask); + void handlePointerEvent(const core::Point& pos, uint16_t buttonMask); static void handlePointerTimeout(void *data); void resetKeyboard(); @@ -96,8 +100,6 @@ private: void initContextMenu(); void popupContextMenu(); - void setMenuKey(); - static void handleOptions(void *data); private: @@ -105,10 +107,14 @@ private: PlatformPixelBuffer* frameBuffer; - rfb::Point lastPointerPos; + core::Point lastPointerPos; uint16_t lastButtonMask; Keyboard* keyboard; + ShortcutHandler shortcutHandler; + bool shortcutBypass; + bool shortcutActive; + std::set<int> pressedKeys; bool firstLEDState; @@ -116,15 +122,14 @@ private: int clipboardSource; - uint32_t menuKeySym; - int menuKeyCode, menuKeyFLTK; Fl_Menu_Button *contextMenu; bool menuCtrlKey; bool menuAltKey; Fl_RGB_Image *cursor; - rfb::Point cursorHotspot; + core::Point cursorHotspot; + bool cursorIsBlank; }; #endif |