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;
140 Qt::WindowFlags previousWindowFlags,
141 Qt::WindowFlags currentWindowFlags);
143 Qt::WindowStates oldWindowState, Qt::WindowStates currentWindowState);
158 void sendExposeUpdate();
160 QPlatformWindow *m_parent {
nullptr};
163 bool m_exposed =
false;
164 QRect m_lastRequestedWindowFrameGeometry;
167template<
typename T,
const QOhosPropertyDescriptor<T> *propertyPtr>
170 if (windowOrWidget ==
nullptr)
171 qOhosReportFatalErrorAndAbort(
"%s: windowOrWidget is null", Q_FUNC_INFO);
173 if (!windowOrWidget->isWindowType() && !windowOrWidget->isWidgetType()) {
174 qOhosReportFatalErrorAndAbort(
175 "%s: Invalid object - expected either window or widget, got %s",
177 windowOrWidget->metaObject()->className());
180 setQOhosPropertyOnQObject<T, propertyPtr>(windowOrWidget, propertyValue);
183template<
typename T,
const QOhosPropertyDescriptor<T> *propertyPtr>
186 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()