* do not add a KStandardAction manually to actionCollection()
[kdenetwork.git] / krfb / events.h
blobf341e8fba6e1a45015ca8eaa9bc1995f9d0a1c34
1 /* This file is part of the KDE project
2 Copyright (C) 2007 Alessandro Praduroux <pradu@pradu.it>
3 (C) 2001-2003 by Tim Jansen <tim@tjansen.de>
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
9 */
11 #ifndef EVENTS_H
12 #define EVENTS_H
14 #include <QDesktopWidget>
15 #include <QEvent>
16 #include <QString>
18 #include <X11/Xlib.h>
20 class ConnectionController;
22 class QCursor;
24 class VNCEvent {
25 public:
26 virtual void exec() = 0;
27 virtual ~VNCEvent();
30 class KeyboardEvent : public VNCEvent {
31 bool down;
32 KeySym keySym;
34 static Display *dpy;
35 static signed char modifiers[0x100];
36 static KeyCode keycodes[0x100], leftShiftCode, rightShiftCode, altGrCode;
37 static const int LEFTSHIFT;
38 static const int RIGHTSHIFT;
39 static const int ALTGR;
40 static char ModifierState;
41 static bool initDone;
43 static void tweakModifiers(signed char mod, bool down);
44 public:
45 static void initKeycodes();
47 KeyboardEvent(bool d, KeySym k);
48 virtual void exec();
51 class PointerEvent : public VNCEvent {
52 int button_mask, x, y;
54 static bool initialized;
55 static Display *dpy;
56 static int buttonMask;
57 public:
58 PointerEvent(int b, int _x, int _y);
59 virtual void exec();
62 class ClipboardEvent : public VNCEvent {
63 ConnectionController *controller;
64 QString text;
65 public:
66 ClipboardEvent(ConnectionController *c, const QString &text);
67 virtual void exec();
70 #endif