summaryrefslogtreecommitdiff
path: root/src/x11extras/qx11info_x11.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/x11extras/qx11info_x11.h')
-rw-r--r--src/x11extras/qx11info_x11.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/x11extras/qx11info_x11.h b/src/x11extras/qx11info_x11.h
index ab72686..c0bfbf8 100644
--- a/src/x11extras/qx11info_x11.h
+++ b/src/x11extras/qx11info_x11.h
@@ -43,14 +43,21 @@
#include <QtCore/qnamespace.h>
#include "QtX11Extras/qtx11extrasglobal.h"
+#include <xcb/xcb.h>
+
typedef struct _XDisplay Display;
-struct xcb_connection_t;
QT_BEGIN_NAMESPACE
class Q_X11EXTRAS_EXPORT QX11Info
{
public:
+ enum PeekOption {
+ PeekDefault = 0,
+ PeekFromCachedIndex = 1
+ };
+ Q_DECLARE_FLAGS(PeekOptions, PeekOption)
+
static bool isPlatformX11();
static int appDpiX(int screen=-1);
@@ -75,10 +82,18 @@ public:
static bool isCompositingManagerRunning(int screen = -1);
+ static qint32 generatePeekerId();
+ static bool removePeekerId(qint32 peekerId);
+ typedef bool (*PeekerCallback)(xcb_generic_event_t *event, void *peekerData);
+ static bool peekEventQueue(PeekerCallback peeker, void *peekerData = nullptr,
+ PeekOptions option = PeekDefault, qint32 peekerId = -1);
+
private:
QX11Info();
};
+Q_DECLARE_OPERATORS_FOR_FLAGS(QX11Info::PeekOptions)
+
QT_END_NAMESPACE
#endif // QX11INFO_X11_H