summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwindowsysteminterface_p.h
diff options
context:
space:
mode:
authorGiulio Camuffo <giulio.camuffo@jollamobile.com>2015-04-22 13:39:39 +0300
committerGiulio Camuffo <giulio.camuffo@jollamobile.com>2015-05-12 07:17:25 +0000
commit1f03520a20eb8d2a7236075c71b354b21a32b2a2 (patch)
treed24ce08112717cd14b09b1d38f06c0fe49e2f821 /src/gui/kernel/qwindowsysteminterface_p.h
parent5891f90846738e732b88e0eebfc4fa1eeae7e2c0 (diff)
Add a way to filter window system events
This change introduces the class QWindowSystemEventHandler which can be used to hook into QWindowSystemInterfacePrivate to filter and dispatch window system events. One use case is to intercept key events from the underlying system in QtCompositor and feed them into the xkbcommon state, and to modify the events based on the resulting state. Change-Id: I829eb7d960420135990fb0f6db54c14eea3e8e48 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Diffstat (limited to 'src/gui/kernel/qwindowsysteminterface_p.h')
-rw-r--r--src/gui/kernel/qwindowsysteminterface_p.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gui/kernel/qwindowsysteminterface_p.h b/src/gui/kernel/qwindowsysteminterface_p.h
index 8841ba95c8..7160971305 100644
--- a/src/gui/kernel/qwindowsysteminterface_p.h
+++ b/src/gui/kernel/qwindowsysteminterface_p.h
@@ -54,6 +54,8 @@
QT_BEGIN_NAMESPACE
+class QWindowSystemEventHandler;
+
class Q_GUI_EXPORT QWindowSystemInterfacePrivate {
public:
enum EventType {
@@ -487,6 +489,17 @@ public:
static QMutex flushEventMutex;
static QList<QTouchEvent::TouchPoint> convertTouchPoints(const QList<QWindowSystemInterface::TouchPoint> &points, QEvent::Type *type);
+
+ static void installWindowSystemEventHandler(QWindowSystemEventHandler *handler);
+ static void removeWindowSystemEventhandler(QWindowSystemEventHandler *handler);
+ static QWindowSystemEventHandler *eventHandler;
+};
+
+class Q_GUI_EXPORT QWindowSystemEventHandler
+{
+public:
+ virtual ~QWindowSystemEventHandler();
+ virtual bool sendEvent(QWindowSystemInterfacePrivate::WindowSystemEvent *event);
};
QT_END_NAMESPACE