8#include <private/qguiapplication_p.h>
9#include <qpa/qwindowsysteminterface.h>
10#include <QtGui/qwindow.h>
11#include <QtGui/qscreen.h>
12#include <private/qhighdpiscaling_p.h>
13#include <private/qwindow_p.h>
53 return static_cast<QWindow *
>(m_surface);
61 return window()->parent() ?
window()->parent()->handle() :
nullptr;
71 return scr ? scr->
handle() :
nullptr;
173 return window()->isVisible();
227 result +=
p->geometry().topLeft();
259 result -=
p->geometry().topLeft();
297 qWarning(
"This plugin does not support setParent!");
329 return QWindowSystemInterface::handleCloseEvent<QWindowSystemInterface::SynchronousDelivery>(
window());
356 qWarning(
"This plugin does not support setting window opacity");
366 qWarning(
"This plugin does not support setting window masks");
416 qWarning(
"This plugin does not support grabbing the keyboard");
423 qWarning(
"This plugin does not support grabbing the mouse");
453 d->updateTimer.stop();
527 fullTitle += separator;
529 }
else if (fullTitle.
isEmpty()) {
561 if (screenGeometry.
contains(center))
620 if (siblings.
size() > 1) {
622 for (
const QScreen *sibling : siblings) {
623 if (sibling->geometry().contains(referencePoint))
646 int deviceIndependentDefaultHeight)
648 if (
size.width() == 0) {
649 const int minWidth =
w->minimumWidth();
650 size.
setWidth(minWidth > 0 ? minWidth : deviceIndependentDefaultWidth);
652 if (
size.height() == 0) {
653 const int minHeight =
w->minimumHeight();
654 size.setHeight(minHeight > 0 ? minHeight : deviceIndependentDefaultHeight);
673 int defaultWidth,
int defaultHeight,
674 const QScreen **resultingScreenReturn)
676 if (resultingScreenReturn)
677 *resultingScreenReturn =
w->screen();
678 if (!
w->isTopLevel()) {
680 const QSize deviceIndependentSize =
682 defaultWidth, defaultHeight);
687 if (!
position && !wp->resizeAutomatic)
694 if (resultingScreenReturn)
695 *resultingScreenReturn =
screen;
698 if (wp->resizeAutomatic)
704 if (deviceIndependentRect.
height() < (availableDeviceIndependentGeometry.
height() * 8) / 9
705 && deviceIndependentRect.
width()
706 < (availableDeviceIndependentGeometry.
width() * 8) / 9) {
707 const QWindow *tp =
w->transientParent();
714 deviceIndependentRect.
moveCenter(availableDeviceIndependentGeometry.
center());
741 static bool customUpdateIntervalValid =
false;
743 &customUpdateIntervalValid);
744 int updateInterval = customUpdateInterval;
745 if (!customUpdateIntervalValid) {
748 const qreal refreshRate = currentScreen->refreshRate();
749 if (refreshRate > 60.0)
750 updateInterval /= refreshRate / 60.0;
853 return !correctedGeometryF.
isEmpty() && rectF != correctedGeometryF
static bool sendEvent(QObject *receiver, QEvent *event)
Sends event event directly to receiver receiver, using the notify() function.
QString applicationName
the name of this application
static QPoint pos()
Returns the position of the cursor (hot spot) of the primary screen in global screen coordinates.
static QString * displayName
QScreen * primaryScreen
the primary (or default) screen of the application.
static QScreen * screenAt(const QPoint &point)
Returns the screen at point, or \nullptr if outside of any screen.
static qreal factor(C *context)
The QIcon class provides scalable icons in different modes and states.
qsizetype size() const noexcept
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
constexpr bool isEmpty() const noexcept
Returns true if the rectangle is empty, otherwise returns false.
\inmodule QtCore\reentrant
constexpr bool isEmpty() const noexcept
Returns true if the rectangle is empty, otherwise returns false.
bool intersects(const QRect &r) const noexcept
Returns true if this rectangle intersects with the given rectangle (i.e., there is at least one pixel...
constexpr void moveCenter(const QPoint &p) noexcept
Moves the rectangle, leaving the center point at the given position.
constexpr int height() const noexcept
Returns the height of the rectangle.
constexpr QPoint topLeft() const noexcept
Returns the position of the rectangle's top-left corner.
constexpr void setSize(const QSize &s) noexcept
Sets the size of the rectangle to the given size.
bool contains(const QRect &r, bool proper=false) const noexcept
This is an overloaded member function, provided for convenience. It differs from the above function o...
constexpr QSize size() const noexcept
Returns the size of the rectangle.
constexpr int width() const noexcept
Returns the width of the rectangle.
constexpr QPoint center() const noexcept
Returns the center point of the rectangle.
The QRegion class specifies a clip region for a painter.
The QScreen class is used to query screen properties. \inmodule QtGui.
QList< QScreen * > virtualSiblings() const
Get the screen's virtual siblings.
QPlatformScreen * handle() const
Get the platform screen handle.
constexpr QSize boundedTo(const QSize &) const noexcept
Returns a size holding the minimum width and height of this size and the given otherSize.
constexpr QSize expandedTo(const QSize &) const noexcept
Returns a size holding the maximum width and height of this size and the given otherSize.
constexpr void setWidth(int w) noexcept
Sets the width to the given width.
\macro QT_RESTRICTED_CAST_FROM_ASCII
bool endsWith(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the string ends with s; otherwise returns false.
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
bool updateRequestPending
virtual QRectF closestAcceptableGeometry(const QRectF &rect) const
static bool flushWindowSystemEvents(QEventLoop::ProcessEventsFlags flags=QEventLoop::AllEvents)
Make Qt Gui process all events on the event queue immediately.
static bool handleExposeEvent(QWindow *window, const QRegion ®ion)
static void handleWindowActivated(QWindow *window, Qt::FocusReason r=Qt::OtherFocusReason)
T toNativePixels(const T &value, const C *context)
T toNative(const T &value, qreal scaleFactor, QPoint origin=QPoint(0, 0))
T fromNativePixels(const T &value, const C *context)
T fromNative(const T &value, qreal scaleFactor, QPoint origin=QPoint(0, 0))
T toNativeWindowGeometry(const T &value, const C *context)
T fromNativeWindowGeometry(const T &value, const C *context)
Combined button and popup list for selecting options.
GLenum GLuint GLint level
GLfloat GLfloat GLfloat w
[0]
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLenum GLenum GLsizei const GLuint GLboolean enabled
static qreal position(const QQuickItem *item, QQuickAnchors::Anchor anchorLine)
Q_CORE_EXPORT int qEnvironmentVariableIntValue(const char *varName, bool *ok=nullptr) noexcept
Q_GUI_EXPORT QWindowPrivate * qt_window_private(QWindow *window)
static QRect frameGeometry(HWND hwnd, bool topLevel)
QtConcurrent::task([]{ qDebug("Hello, world!");}).spawn(FutureResult void increment(QPromise< int > &promise, int i)
[10]
QNetworkRequest request(url)
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent