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;
58 template<
typename T,
const QOhosPropertyDescriptor<T> *propertyPtr>
61 template<
typename T,
const QOhosPropertyDescriptor<T> *propertyPtr>
65 QWindow *targetWindow, QObject *surfaceConsumerContext,
66 std::function<
void(
std::optional<
void *>)> surfaceConsumer);
77 void setParent(
const QPlatformWindow *newParent)
override;
86 if (isForeignWindow())
89 return window()->surfaceType() == QSurface::RasterSurface;
137 Qt::WindowFlags previousWindowFlags,
138 Qt::WindowFlags currentWindowFlags);
140 Qt::WindowStates oldWindowState, Qt::WindowStates currentWindowState);
154 void sendExposeUpdate();
156 QPlatformWindow *m_parent {
nullptr};
159 bool m_exposed =
false;
160 QRect m_lastRequestedWindowFrameGeometry;
163template<
typename T,
const QOhosPropertyDescriptor<T> *propertyPtr>
166 if (windowOrWidget ==
nullptr)
167 qOhosReportFatalErrorAndAbort(
"%s: windowOrWidget is null", Q_FUNC_INFO);
169 if (!windowOrWidget->isWindowType() && !windowOrWidget->isWidgetType()) {
170 qOhosReportFatalErrorAndAbort(
171 "%s: Invalid object - expected either window or widget, got %s",
173 windowOrWidget->metaObject()->className());
176 setQOhosPropertyOnQObject<T, propertyPtr>(windowOrWidget, propertyValue);
179template<
typename T,
const QOhosPropertyDescriptor<T> *propertyPtr>
182 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()