Changeset View
Changeset View
Standalone View
Standalone View
krfb/events.h
- This file was copied to events/x11/x11events.h, events/x11/x11eventsplugin.cpp, events/x11/x11eventsplugin.h, events/xdp/xdpevents.h, events/xdp/xdpeventsplugin.cpp, events/xdp/xdpeventsplugin.h, krfb/eventsplugin.cpp, krfb/eventsplugin.h.
Show All 19 Lines | 1 | /* | |||
---|---|---|---|---|---|
20 | along with this program; see the file COPYING. If not, write to | 20 | along with this program; see the file COPYING. If not, write to | ||
21 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 21 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
22 | Boston, MA 02110-1301, USA. | 22 | Boston, MA 02110-1301, USA. | ||
23 | */ | 23 | */ | ||
24 | 24 | | |||
25 | #ifndef EVENTS_H | 25 | #ifndef EVENTS_H | ||
26 | #define EVENTS_H | 26 | #define EVENTS_H | ||
27 | 27 | | |||
28 | #include "framebuffer.h" | ||||
28 | #include "rfb.h" | 29 | #include "rfb.h" | ||
30 | #include "krfbprivate_export.h" | ||||
29 | 31 | | |||
30 | class EventHandler | 32 | #include <QObject> | ||
33 | | ||||
34 | class KRFBPRIVATE_EXPORT EventHandler : public QObject | ||||
31 | { | 35 | { | ||
36 | Q_OBJECT | ||||
32 | public: | 37 | public: | ||
33 | static void handleKeyboard(bool down, rfbKeySym key); | 38 | explicit EventHandler(QObject *parent = nullptr); | ||
34 | static void handlePointer(int buttonMask, int x, int y); | 39 | virtual ~EventHandler() = default; | ||
40 | virtual void handleKeyboard(bool down, rfbKeySym key) = 0; | ||||
41 | virtual void handlePointer(int buttonMask, int x, int y) = 0; | ||||
42 | | ||||
43 | void setFrameBufferPlugin(const QSharedPointer<FrameBuffer> &frameBuffer); | ||||
44 | QSharedPointer<FrameBuffer> frameBuffer(); | ||||
45 | private: | ||||
46 | // Used to track framebuffer plugin which we need for xdp event plugin | ||||
47 | QSharedPointer<FrameBuffer> fb; | ||||
35 | }; | 48 | }; | ||
36 | 49 | | |||
37 | #endif | 50 | #endif |