diff options
author | Pierre Ossman <ossman@cendio.se> | 2023-01-30 07:51:51 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2024-08-12 16:32:53 +0200 |
commit | 5c3371d8e7e58fd873699c5309e5a74ed0e9fac4 (patch) | |
tree | ee0440cbd2128bd2c50a5c2aa2fda4a8d063da10 /common/rfb/SDesktop.h | |
parent | 685d85a39d1ecc2b9061805a39fff15f0aeef497 (diff) | |
download | tigervnc-5c3371d8e7e58fd873699c5309e5a74ed0e9fac4.tar.gz tigervnc-5c3371d8e7e58fd873699c5309e5a74ed0e9fac4.zip |
Remove InputHandler interface
The different uses of this interface are not that closely related and
there is no need for them to have a common interface class.
Diffstat (limited to 'common/rfb/SDesktop.h')
-rw-r--r-- | common/rfb/SDesktop.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/common/rfb/SDesktop.h b/common/rfb/SDesktop.h index 94fcaa28..bcdee93c 100644 --- a/common/rfb/SDesktop.h +++ b/common/rfb/SDesktop.h @@ -40,14 +40,13 @@ #include <rfb/PixelBuffer.h> #include <rfb/VNCServer.h> -#include <rfb/InputHandler.h> #include <rfb/screenTypes.h> namespace network { class Socket; } namespace rfb { - class SDesktop : public InputHandler { + class SDesktop { public: // init() is called immediately when the VNCServer gets a reference // to the SDesktop, so that a reverse reference can be set up. @@ -91,10 +90,15 @@ namespace rfb { // signalling that a good time to render new data virtual void frameTick(uint64_t msc) { (void)msc; } - // InputHandler interface - // pointerEvent(), keyEvent() and clientCutText() are called in response to - // the relevant RFB protocol messages from clients. - // See InputHandler for method signatures. + // keyEvent() is called whenever a client sends an event that a + // key was pressed or released. + virtual void keyEvent(uint32_t /*keysym*/, uint32_t /*keycode*/, + bool /*down*/) {}; + + // pointerEvent() is called whenever a client sends an event that + // the pointer moved, or a button was pressed or released. + virtual void pointerEvent(const Point& /*pos*/, + int /*buttonMask*/) {}; // handleClipboardRequest() is called whenever a client requests // the server to send over its clipboard data. It will only be |