summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbnativeinterface.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-01-18 15:16:09 +0100
committerQt by Nokia <qt-info@nokia.com>2012-01-20 12:43:52 +0100
commit1ca05bb0c174d505469ac647818afaf537b41f43 (patch)
tree01653a1361ca8ed373e3ab77d46af2a15874bdfe /src/plugins/platforms/xcb/qxcbnativeinterface.cpp
parent8060dd3c42982543b2b5949187fa5b5bb6aeff29 (diff)
Add support for platform plugin specific event filters.
The setEventFilter on the platform native interface allows subscribing to events on the backend by event name. Change-Id: Ib10077fbc69f0207edbae1177e7bbd18c8d0f9ae Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com> Reviewed-by: Michalina Ziemba <michalina.ziemba@nokia.com>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbnativeinterface.cpp')
-rw-r--r--src/plugins/platforms/xcb/qxcbnativeinterface.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp
index 52ff30991e..535d66aa39 100644
--- a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp
+++ b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp
@@ -118,6 +118,18 @@ void *QXcbNativeInterface::nativeResourceForWindow(const QByteArray &resourceStr
return result;
}
+QPlatformNativeInterface::EventFilter QXcbNativeInterface::setEventFilter(const QByteArray &eventType, QPlatformNativeInterface::EventFilter filter)
+{
+ EventFilter oldFilter = m_eventFilters.value(eventType);
+ m_eventFilters.insert(eventType, filter);
+ return oldFilter;
+}
+
+QPlatformNativeInterface::EventFilter QXcbNativeInterface::eventFilterForEventType(const QByteArray& eventType) const
+{
+ return m_eventFilters.value(eventType);
+}
+
QXcbScreen *QXcbNativeInterface::qPlatformScreenForWindow(QWindow *window)
{
QXcbScreen *screen;