From 255abc1e5a3397bf14e9854388881cd80f0bd2e3 Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Fri, 4 Aug 2017 12:10:12 +0200 Subject: 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 --- src/plugins/platforms/xcb/qxcbnativeinterface.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src/plugins/platforms/xcb/qxcbnativeinterface.h') 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 #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(); -- cgit v1.2.3