Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qtx11extras_p.h
Go to the documentation of this file.
1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QTX11EXTRAS_P_H
5#define QTX11EXTRAS_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtGui/qtguiglobal.h>
19#include <QtCore/private/qglobal_p.h>
20
21#include <xcb/xcb.h>
22
23typedef struct _XDisplay Display;
24
26
27class Q_GUI_EXPORT QX11Info
28{
29public:
31 PeekDefault = 0,
32 PeekFromCachedIndex = 1
33 };
34 Q_DECLARE_FLAGS(PeekOptions, PeekOption)
35
36 static bool isPlatformX11();
37
38 static int appDpiX(int screen=-1);
39 static int appDpiY(int screen=-1);
40
41 static quint32 appRootWindow(int screen=-1);
42 static int appScreen();
43
44 static quint32 appTime();
45 static quint32 appUserTime();
46
47 static void setAppTime(quint32 time);
48 static void setAppUserTime(quint32 time);
49
50 static quint32 getTimestamp();
51
52 static QByteArray nextStartupId();
53 static void setNextStartupId(const QByteArray &id);
54
55 static Display *display();
56 static xcb_connection_t *connection();
57
58 static bool isCompositingManagerRunning(int screen = -1);
59
60 static qint32 generatePeekerId();
61 static bool removePeekerId(qint32 peekerId);
62 typedef bool (*PeekerCallback)(xcb_generic_event_t *event, void *peekerData);
63 static bool peekEventQueue(PeekerCallback peeker, void *peekerData = nullptr,
64 PeekOptions option = PeekDefault, qint32 peekerId = -1);
65
66private:
67 QX11Info();
68};
69
70Q_DECLARE_OPERATORS_FOR_FLAGS(QX11Info::PeekOptions)
71
73
74#endif // QTX11EXTRAS_P_H
75
\inmodule QtCore
Definition qbytearray.h:57
\inmodule QtGui
PeekOption
An enum to tune the behavior of QX11Info::peekEventQueue().
struct wl_display * display
Definition linuxdmabuf.h:41
Combined button and popup list for selecting options.
DBusConnection * connection
#define Q_DECLARE_FLAGS(Flags, Enum)
Definition qflags.h:174
#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags)
Definition qflags.h:194
struct _cl_event * event
GLuint GLenum option
QScreen * screen
[1]
Definition main.cpp:29
struct _XDisplay Display
unsigned int quint32
Definition qtypes.h:50
int qint32
Definition qtypes.h:49