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;
67 static void setBrightness(QObject *windowOrWidget,
int brightness);
68 static void setContrast(QObject *windowOrWidget,
int contrast);
69 static void setSaturation(QObject *windowOrWidget,
int saturation);
72 template<
typename T,
const QOhosPropertyDescriptor<T> *propertyPtr>
75 template<
typename T,
const QOhosPropertyDescriptor<T> *propertyPtr>
79 QWindow *targetWindow, QObject *surfaceConsumerContext,
80 std::function<
void(QOhosOptional<
void *>)> surfaceConsumer);
91 void setParent(
const QPlatformWindow *newParent)
override;
100 if (isForeignWindow())
103 return window()->surfaceType() == QSurface::RasterSurface;
150 Qt::WindowFlags previousWindowFlags,
151 Qt::WindowFlags currentWindowFlags);
153 Qt::WindowStates oldWindowState, Qt::WindowStates currentWindowState);
166 void sendExposeUpdate();
168 QPlatformWindow *m_parent {
nullptr};
169 QOhosOptional<QOhosDisplayInfo::JsDisplayId> m_displayId;
171 bool m_exposed =
false;
172 QRect m_lastRequestedWindowFrameGeometry;
175template<
typename T,
const QOhosPropertyDescriptor<T> *propertyPtr>
178 if (windowOrWidget ==
nullptr)
179 qOhosReportFatalErrorAndAbort(
"%s: windowOrWidget is null", Q_FUNC_INFO);
181 if (!windowOrWidget->isWindowType() && !windowOrWidget->isWidgetType()) {
182 qOhosReportFatalErrorAndAbort(
183 "%s: Invalid object - expected either window or widget, got %s",
185 windowOrWidget->metaObject()->className());
188 setQOhosPropertyOnQObject<T, propertyPtr>(windowOrWidget, propertyValue);
191template<
typename T,
const QOhosPropertyDescriptor<T> *propertyPtr>
194 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()
QT_END_NAMESPACE Q_DECLARE_METATYPE(QT_PREPEND_NAMESPACE(QtOhos::enums::kit::ShareKit::systemShare::SelectionMode))