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>
13#include <qohosdisplayinfo.h>
14#include <qohosinternalwindowid_p.h>
15#include <qohosplugincore.h>
16#include <qohoswindowproperty.h>
17#include <qpa/qplatformwindow.h>
18#include <render/qohossurface.h>
23class QOhosPlatformBackingStore;
71 static void setBrightness(QObject *windowOrWidget,
int brightness);
72 static void setContrast(QObject *windowOrWidget,
int contrast);
73 static void setSaturation(QObject *windowOrWidget,
int saturation);
76 template<
typename T,
const QOhosPropertyDescriptor<T> *propertyPtr>
79 template<
typename T,
const QOhosPropertyDescriptor<T> *propertyPtr>
83 QWindow *targetWindow, QObject *surfaceConsumerContext,
95 void setParent(
const QPlatformWindow *newParent)
override;
105 if (isForeignWindow())
108 return window()->surfaceType() == QSurface::RasterSurface;
156 Qt::WindowFlags previousWindowFlags,
157 Qt::WindowFlags currentWindowFlags);
159 Qt::WindowStates oldWindowState, Qt::WindowStates currentWindowState);
173 QPlatformWindow *m_parent {
nullptr};
176 QOhosOptional<QRect> m_lastReportedGeometryFromSystem;
180template<
typename T,
const QOhosPropertyDescriptor<T> *propertyPtr>
183 if (windowOrWidget ==
nullptr)
184 qOhosReportFatalErrorAndAbort(
"%s: windowOrWidget is null", Q_FUNC_INFO);
186 if (!windowOrWidget->isWindowType() && !windowOrWidget->isWidgetType()) {
187 qOhosReportFatalErrorAndAbort(
188 "%s: Invalid object - expected either window or widget, got %s",
190 windowOrWidget->metaObject()->className());
193 setQOhosPropertyOnQObject<T, propertyPtr>(windowOrWidget, propertyValue);
196template<
typename T,
const QOhosPropertyDescriptor<T> *propertyPtr>
199 return tryGetQOhosPropertyFromQObject<T, propertyPtr>(windowOrWidget);
std::enable_if_t< qohosplugincore_h_detail::isQOhosOptional< QOhosInvokeResult< Func, T > >, QOhosInvokeResult< Func, T > > andThen(Func &&func) const
bool sendEvent(WindowSystemEvent *event) override
Combined button and popup list for selecting options.
@ ForwardToGuiApplication
QOhosView * mapQWindowToViewOrNull(QWindow *window)
std::shared_ptr< QWindowSystemEventHandler > makeApplicationStateTracker()