diff options
author | Gatis Paeglis <gatis.paeglis@qt.io> | 2017-08-04 12:10:12 +0200 |
---|---|---|
committer | Gatis Paeglis <gatis.paeglis@qt.io> | 2017-08-11 13:06:38 +0000 |
commit | 255abc1e5a3397bf14e9854388881cd80f0bd2e3 (patch) | |
tree | c0702be550ffce279ae9af34970a904a2fdb3535 /src/plugins/platforms/xcb/qxcbnativeinterface.h | |
parent | a6c4d54eaf467e2db4eef83d737ffcbb263345d0 (diff) |
xcb: add support for peeking into the XCB event queue
This will be used by the Qt X11 Extras module.
Task-number: QTBUG-50358
Change-Id: Ie095cd211c393ea6d78660b4d53cac28b435a3b2
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbnativeinterface.h')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbnativeinterface.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/plugins/platforms/xcb/qxcbnativeinterface.h b/src/plugins/platforms/xcb/qxcbnativeinterface.h index b9f1ebcdc6..fb0db727aa 100644 --- a/src/plugins/platforms/xcb/qxcbnativeinterface.h +++ b/src/plugins/platforms/xcb/qxcbnativeinterface.h @@ -46,12 +46,11 @@ #include <QtCore/QRect> #include "qxcbexport.h" +#include "qxcbconnection.h" QT_BEGIN_NAMESPACE -class QWidget; class QXcbScreen; -class QXcbConnection; class QXcbNativeInterfaceHandler; class Q_XCB_EXPORT QXcbNativeInterface : public QPlatformNativeInterface @@ -74,7 +73,10 @@ public: ScreenAntialiasingEnabled, AtspiBus, CompositingEnabled, - VkSurface + VkSurface, + GeneratePeekerId, + RemovePeekerId, + PeekEventQueue }; QXcbNativeInterface(); @@ -114,6 +116,12 @@ public: static void setAppTime(QScreen *screen, xcb_timestamp_t time); static void setAppUserTime(QScreen *screen, xcb_timestamp_t time); + static qint32 generatePeekerId(); + static bool removePeekerId(qint32 peekerId); + static bool peekEventQueue(QXcbConnection::PeekerCallback peeker, void *peekerData = nullptr, + QXcbConnection::PeekOptions option = QXcbConnection::PeekDefault, + qint32 peekerId = -1); + Q_INVOKABLE bool systemTrayAvailable(const QScreen *screen) const; Q_INVOKABLE void setParentRelativeBackPixmap(QWindow *window); Q_INVOKABLE bool systrayVisualHasAlphaChannel(); |