8#include <qpa/qplatformnativeinterface.h>
9#include <qpa/qplatformwindow.h>
10#include <qpa/qplatformscreen_p.h>
11#include <qpa/qplatformscreen.h>
16#include <QtCore/qdebug.h>
26 auto *qxcbScreen =
dynamic_cast<QNativeInterface::Private::QXcbScreen *
>(
screen->
handle());
27 if (qxcbScreen && qxcbScreen->virtualDesktopNumber() == virtualDesktopNumber)
213 typedef void (*SetAppTimeFunc)(
QScreen *, xcb_timestamp_t);
219 qWarning(
"Internal error: QPA plugin doesn't implement setAppTime");
234 typedef void (*SetAppUserTimeFunc)(
QScreen *, xcb_timestamp_t);
240 qWarning(
"Internal error: QPA plugin doesn't implement setAppUserTime");
297 typedef void (*SetStartupIdFunc)(
const char*);
300 func(
id.constData());
302 qWarning(
"Internal error: QPA plugin doesn't implement setStartupId");
336 return reinterpret_cast<xcb_connection_t *
>(
connection);
355 qWarning() <<
"isCompositingManagerRunning: Could not find screen number" <<
screen;
380 GeneratePeekerIdFunc generatepeekerid =
reinterpret_cast<GeneratePeekerIdFunc
>(
382 if (!generatepeekerid) {
383 qWarning(
"Internal error: QPA plugin doesn't implement generatePeekerId");
387 return generatepeekerid();
406 typedef bool (*RemovePeekerIdFunc)(
qint32);
407 RemovePeekerIdFunc
removePeekerId =
reinterpret_cast<RemovePeekerIdFunc
>(
410 qWarning(
"Internal error: QPA plugin doesn't implement removePeekerId");
497 if (!peeker || !
qApp)
504 PeekEventQueueFunc peekeventqueue =
reinterpret_cast<PeekEventQueueFunc
>(
506 if (!peekeventqueue) {
507 qWarning(
"Internal error: QPA plugin doesn't implement peekEventQueue");
511 return peekeventqueue(peeker, peekerData,
option, peekerId);
QScreen * primaryScreen
the primary (or default) screen of the application.
QString platformName
The name of the underlying platform plugin.
static QList< QScreen * > screens()
Returns a list of all the screens associated with the windowing system the application is connected t...
The QScreen class is used to query screen properties. \inmodule QtGui.
qreal logicalDotsPerInchY
the number of logical dots or pixels per inch in the vertical direction
qreal logicalDotsPerInchX
the number of logical dots or pixels per inch in the horizontal direction
QPlatformScreen * handle() const
Get the platform screen handle.
static void setAppTime(quint32 time)
Sets the X11 time to the value specified by time.
static xcb_connection_t * connection()
Returns the default XCB connection for the application.
static bool isCompositingManagerRunning(int screen=-1)
Returns true if there is a compositing manager running for the connection attached to screen.
static quint32 appTime()
Returns the X11 time.
static quint32 appUserTime()
Returns the X11 user time.
static int appDpiY(int screen=-1)
Returns the vertical resolution of the given screen in terms of the number of dots per inch.
static quint32 getTimestamp()
Fetches the current X11 time stamp from the X Server.
static Display * display()
Returns the default display for the application.
static int appDpiX(int screen=-1)
Returns the horizontal resolution of the given screen in terms of the number of dots per inch.
static bool isPlatformX11()
Returns true if the application is currently running on X11.
static void setAppUserTime(quint32 time)
Sets the X11 user time as specified by time.
bool(* PeekerCallback)(xcb_generic_event_t *event, void *peekerData)
Typedef for a pointer to a function with the following signature:
static void setNextStartupId(const QByteArray &id)
Sets the next startup ID to id.
static quint32 appRootWindow(int screen=-1)
Returns a handle for the applications root window on the given screen.
static bool removePeekerId(qint32 peekerId)
Removes peekerId, which was earlier obtained via generatePeekerId().
static int appScreen()
Returns the number of the screen where the application is being displayed.
static QByteArray nextStartupId()
Returns the startup ID that will be used for the next window to be shown by this process.
static qint32 generatePeekerId()
Returns a new peeker id or -1 if some internal error has occurred.
static bool peekEventQueue(PeekerCallback peeker, void *peekerData=nullptr, PeekOptions option=PeekDefault, qint32 peekerId=-1)
Peek into the buffered XCB event queue.
struct wl_display * display
Combined button and popup list for selecting options.
#define QByteArrayLiteral(str)
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char const char return DBusMessage return DBusMessage const char return DBusMessage dbus_bool_t return DBusMessage dbus_uint32_t return DBusMessage void
int qRound(qfloat16 d) noexcept