4#ifndef OHOSPLATFORMWINDOW_H
5#define OHOSPLATFORMWINDOW_H
7#include <QtCore/private/qohoscommon_p.h>
8#include <QtCore/qglobal.h>
9#include <QtCore/qobject.h>
10#include <QtCore/qrect.h>
11#include <QtGui/qpa/qplatformwindow_p.h>
15#include <qohosdisplayinfo.h>
16#include <qohosinternalwindowid_p.h>
17#include <qohoswindowproperty.h>
18#include <qpa/qplatformwindow.h>
19#include <render/qohossurface.h>
24class QOhosPlatformBackingStore;
59 template<
typename T,
const QOhosPropertyDescriptor<T> *propertyPtr>
62 template<
typename T,
const QOhosPropertyDescriptor<T> *propertyPtr>
66 QWindow *targetWindow, QObject *surfaceConsumerContext,
67 std::function<
void(
std::optional<
void *>)> surfaceConsumer);
78 void setParent(
const QPlatformWindow *newParent)
override;
87 if (isForeignWindow())
90 return window()->surfaceType() == QSurface::RasterSurface;
141 Qt::WindowFlags previousWindowFlags,
142 Qt::WindowFlags currentWindowFlags);
144 Qt::WindowStates oldWindowState, Qt::WindowStates currentWindowState);
159 void sendExposeUpdate();
161 QPlatformWindow *m_parent {
nullptr};
164 bool m_exposed =
false;
165 QRect m_lastRequestedWindowFrameGeometry;
166 std::optional<QSize> m_optLastReportedWindowSize;
169template<
typename T,
const QOhosPropertyDescriptor<T> *propertyPtr>
172 if (windowOrWidget ==
nullptr)
173 qOhosReportFatalErrorAndAbort(
"%s: windowOrWidget is null", Q_FUNC_INFO);
175 if (!windowOrWidget->isWindowType() && !windowOrWidget->isWidgetType()) {
176 qOhosReportFatalErrorAndAbort(
177 "%s: Invalid object - expected either window or widget, got %s",
179 windowOrWidget->metaObject()->className());
182 setQOhosPropertyOnQObject<T, propertyPtr>(windowOrWidget, propertyValue);
185template<
typename T,
const QOhosPropertyDescriptor<T> *propertyPtr>
188 return tryGetQOhosPropertyFromQObject<T, propertyPtr>(windowOrWidget);
bool sendEvent(WindowSystemEvent *event) override
Combined button and popup list for selecting options.
@ ForwardToGuiApplication
QOhosView * mapQWindowToViewOrNull(QWindow *window)
std::shared_ptr< QWindowSystemEventHandler > makeApplicationStateTracker()