Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qohosview.h
Go to the documentation of this file.
1// Copyright (C) 2025 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QOHOSVIEW_H
5#define QOHOSVIEW_H
6
7#include <QtCore/private/qohoscommon_p.h>
8#include <QtCore/qflags.h>
9#include <QtCore/qglobal.h>
10#include <QtCore/qharmonyjsobjectref.h>
11#include <QtCore/qmimedata.h>
12#include <QtCore/qobject.h>
13#include <QtCore/qpoint.h>
14#include <QtCore/qpointer.h>
15#include <QtCore/qsharedpointer.h>
16#include <QtCore/qsize.h>
17#include <QtCore/qstring.h>
18#include <QtGui/qimage.h>
19#include <QtGui/qwindow.h>
20#include <memory>
21#include <optional>
22#include <qohosdisplayinfo.h>
23#include <qohosforeignwindow.h>
24#include <qohosplatformwindow.h>
25#include <qohosplugincore.h>
26#include <qohosruntimedevicetypeandmode.h>
27#include <qohossettings.h>
28#include <qohoswindowproperty.h>
29#include <render/qnativenode.h>
30#include <render/qohossurface.h>
31#include <render/qohoswindowproxy.h>
32#include <atomic>
33#include <functional>
34#include <vector>
35
36QT_BEGIN_NAMESPACE
37
38enum class ViewGeometryPersistencePolicy
39{
40 Disabled,
41 Enabled,
42 FollowSystemSetting,
43 Ignore,
44};
45
46class QOhosView : public QObject
47{
49
50public:
58
64
69
75
82
84 {
85 bool maxButtonShown = true;
86 bool minButtonShown = true;
87 bool closeButtonShown = true;
88 bool operator==(const WindowMinMaxCloseButtonsState &other) const;
89 bool operator!=(const WindowMinMaxCloseButtonsState &other) const;
90 };
91
97
99 QOhosPlatformWindow *window, QOhosPropertiesProvider windowPropertiesProvider);
100
101 explicit QOhosView(
102 QWindow *ownerWindow, QSharedPointer<QNativeNode> nativeNode,
103 QOhosPropertiesProvider propertiesProvider, QWindow *optLogicalParent);
104
105 void setSizeLimits(const QSize &minSize, const QSize &maxSize);
106 void setPosition(const QPoint &position);
107 void setSize(const QSize &size);
108 void setOpacity(qreal opacity);
109 void setCursor(const QCursor &cursor);
110 void setTransparentBackground(bool transparent);
111 void setFocusable(bool focusable);
112 void setWindowTransparentForInput(bool transparentForInput);
113 void setModality(Qt::WindowModality modality);
114 void setTitle(const QString &title);
115 void raise();
116 void lower();
117 void setFullScreen();
118 void recover();
119 void minimize();
120 void maximize();
121 void setWindowMask(const QOhosWindowProxy::WindowMask &windowMask);
123 void setParentOrReparent(QOhosView &parentView);
125 WId viewWindowId() const;
126 void addForeignWindowChild(QOhosForeignWindow *foreignWindow);
130 void setWindowStaysOnTop(bool staysOnTop);
131 void setFramelessWindow(bool frameless);
132 QPixmap makeSnapshot() const;
133 bool startMoving();
134 void startDrag(
135 const std::vector<QImage> &images, const QPointF &hotspot,
136 const QMimeData &mimeData, QOhosConsumer<Qt::DropAction> dropActionConsumer);
137 void restoreMainWindow();
139 Qt::WindowStates previousWindowState, Qt::WindowStates currentWindowState);
141 Qt::WindowFlags previousWindowFlags, Qt::WindowFlags currentWindowFlags);
142 void handlePaletteChange();
143 QArkUi::QQtEmbeddedWindowNode::NodeAreaInfo nodeAreaInfo() const;
144
145 void showImmediate();
146 void hide();
147 void requestActivate();
148 void forceGeometryUpdate();
149
150 QWindow *ownerWindow() const;
151 QOhosSurface *surfaceOrNull() const;
154
156 QMargins avoidAreaMargins(QOhosWindowProxy::AvoidAreaType type) const;
158 ViewType viewType() const;
160 const QOhosView *viewParentOrNull() const;
164
165 ~QOhosView();
166
169 void windowStatusChange(QOhosWindowProxy::WindowStatus windowStatus);
170 void windowVisibilityChange(bool visibility);
172 void avoidAreaChanged(QOhosWindowProxy::AvoidAreaType avoidAreaType, const QOhosWindowProxy::AvoidArea &avoidArea);
173 void windowRectChanged(QOhosWindowProxy::RectChangeOptions rectChangeOptions);
174 void windowRectChangedInGlobalDisplay(QOhosWindowProxy::RectChangeOptions rectChangeOptions);
175 void surfaceStatusChanged(const std::optional<QSize> &optSurfaceSize);
178 void nodeAreaChanged(QArkUi::QQtEmbeddedWindowNode::NodeAreaInfo areaChangeEvt);
179 void windowResizeRejected(QSize rejectedSize);
180 void windowMoveRejected(QPoint rejectedPosition);
181
182private:
183 using JsCallBatch = QtOhos::JsCallBatch;
184
185 void applyPhoneWindowChrome(JsCallBatch &jsCallBatch);
186
187 static constexpr QOhosRuntimeDeviceTypeAndMode allModes =
191
192 template <typename T, QOhosRuntimeDeviceTypeAndMode supportedModes = allModes>
193 struct SystemUpdateDataProperty
194 {
195 std::optional<T> optPendingUpdateRequest;
196 };
197
198 template<typename T>
199 using NoTabletSystemUpdateDataProperty = SystemUpdateDataProperty<T, QOhosRuntimeDeviceTypeAndMode::_2in1>;
200
201 template<typename T>
204
205 struct SystemUpdateData
206 {
207 WindowModeOnlySystemUpdateDataProperty<QSize> size;
208 WindowModeOnlySystemUpdateDataProperty<std::pair<QSize, QSize>> sizeLimits;
209 WindowModeOnlySystemUpdateDataProperty<std::pair<QPoint, std::optional<QOhosDisplayInfo::JsDisplayId>>> position;
210 SystemUpdateDataProperty<bool> visibility;
211 NoTabletSystemUpdateDataProperty<bool> backgroundTransparent;
212 SystemUpdateDataProperty<QCursor> cursor;
213 NoTabletSystemUpdateDataProperty<bool> focusable;
214 SystemUpdateDataProperty<QColor> backgroundColor;
215 SystemUpdateDataProperty<int> brightness;
216 SystemUpdateDataProperty<int> contrast;
217 SystemUpdateDataProperty<int> saturation;
218 SystemUpdateDataProperty<bool> windowTransparentForInput;
219 WindowModeOnlySystemUpdateDataProperty<Qt::WindowModality> modality;
220 WindowModeOnlySystemUpdateDataProperty<QString> title;
221 WindowModeOnlySystemUpdateDataProperty<WindowMinMaxCloseButtonsState> windowMinMaxCloseButtonsState;
222 WindowModeOnlySystemUpdateDataProperty<bool> windowStaysOnTop;
223 WindowModeOnlySystemUpdateDataProperty<bool> frameless;
224 };
225
226 static constexpr auto makeSystemUpdateDataPropertyUpdateFuncPairsTuple()
227 {
228 // The position goes first, so that the size limits and the size apply on the target screen.
229 return std::make_tuple(
230 std::make_pair(&SystemUpdateData::position, &QOhosView::updateWindowPosition),
231 std::make_pair(&SystemUpdateData::sizeLimits, &QOhosView::updateWindowSizeLimits),
232 std::make_pair(&SystemUpdateData::size, &QOhosView::updateWindowSize),
233 std::make_pair(&SystemUpdateData::backgroundTransparent, &QOhosView::updateWindowBackgroundTransparency),
234 std::make_pair(&SystemUpdateData::cursor, &QOhosView::updateWindowCursor),
235 std::make_pair(&SystemUpdateData::focusable, &QOhosView::updateWindowFocusable),
236 std::make_pair(&SystemUpdateData::backgroundColor, &QOhosView::updateWindowBackgroundColor),
237 std::make_pair(&SystemUpdateData::brightness, &QOhosView::updateWindowBrightness),
238 std::make_pair(&SystemUpdateData::contrast, &QOhosView::updateWindowContrast),
239 std::make_pair(&SystemUpdateData::saturation, &QOhosView::updateWindowSaturation),
240 std::make_pair(&SystemUpdateData::windowTransparentForInput, &QOhosView::updateWindowTransparentForInput),
241 std::make_pair(&SystemUpdateData::modality, &QOhosView::updateWindowModality),
242 std::make_pair(&SystemUpdateData::title, &QOhosView::updateWindowTitle),
243 std::make_pair(&SystemUpdateData::windowMinMaxCloseButtonsState, &QOhosView::updateWindowMinMaxCloseButtonsState),
244 std::make_pair(&SystemUpdateData::windowStaysOnTop, &QOhosView::updateWindowStaysOnTop),
245 std::make_pair(&SystemUpdateData::frameless, &QOhosView::updateWindowFrameless));
246 };
247
248 template <typename T, QOhosRuntimeDeviceTypeAndMode SupportedModes>
249 void setSystemUpdateProperty(SystemUpdateDataProperty<T, SupportedModes> SystemUpdateData::*property, const T &value);
250
251 void scheduleSystemUpdateIfNeeded();
252 void updateWindowSize(const QSize &size, JsCallBatch &jsCallBatch);
253 void updateWindowSizeLimits(const std::pair<QSize, QSize> &sizeLimits, JsCallBatch &jsCallBatch);
254 void updateWindowPosition(
255 const std::pair<QPoint, std::optional<QOhosDisplayInfo::JsDisplayId>> &position, JsCallBatch &jsCallBatch);
256 void updateWindowBackgroundTransparency(bool transparent, JsCallBatch &jsCallBatch);
257 void updateWindowCursor(const QCursor &cursor, JsCallBatch &jsCallBatch);
258 void updateWindowFocusable(bool focusable, JsCallBatch &jsCallBatch);
259 void updateWindowBackgroundColor(const QColor &color, JsCallBatch &jsCallBatch);
260 void updateWindowBrightness(int brightness, JsCallBatch &jsCallBatch);
261 void updateWindowContrast(int contast, JsCallBatch &jsCallBatch);
262 void updateWindowSaturation(int saturation, JsCallBatch &jsCallBatch);
263 void updateWindowTransparentForInput(bool transparentForInput, JsCallBatch &jsCallBatch);
264 void updateWindowModality(Qt::WindowModality modality, JsCallBatch &jsCallBatch);
265 void updateWindowTitle(const QString &title, JsCallBatch &jsCallBatch);
266 void updateWindowMinMaxCloseButtonsState(const WindowMinMaxCloseButtonsState &state, JsCallBatch &jsCallBatch);
267 void updateWindowStaysOnTop(bool staysOnTop, JsCallBatch &jsCallBatch);
268 void updateWindowFrameless(bool frameless, JsCallBatch &jsCallBatch);
269 void updateWindowShadowDisabled(JsCallBatch &jsCallBatch);
270 void updateMainWindowRestored(JsCallBatch &jsCallBatch = JsCallBatch::immediate());
271 void syncWindowStateImmediate(WindowStateSyncReason reason = WindowStateSyncReason::Normal);
272 void flushSystemPropertyUpdatesImmediate(JsCallBatch &jsCallBatch);
273 QOhosWindowProxy *windowProxyAfterPropertyUpdatesOrNull(JsCallBatch &jsCallBatch);
274 void updateWindowFullScreen(JsCallBatch &jsCallBatch);
275 void updateWindowMaximized(JsCallBatch &jsCallBatch);
276 void setOrResetWindowProxy(std::shared_ptr<QOhosWindowProxy> windowProxy, QWindow *optLogicalParent);
277 const QOhosView *ancestorViewWithWindowOrNull() const;
278 void updateNativeNodeVisibility(bool visible, JsCallBatch &jsCallBatch);
279 void hideMainWindow(JsCallBatch &jsCallBatch);
280 void setWindowCornerRadius(double radius, JsCallBatch &jsCallBatch = JsCallBatch::immediate());
281 void setPrivacyMode(bool privacyModeEnabled, JsCallBatch &jsCallBatch = JsCallBatch::immediate());
282 void setBackgroundColor(const QColor &color);
283 void setBrightness(int brightness);
284 void setContrast(int contrast);
285 void setSaturation(int saturation);
286 void setWindowKeepScreenOn(bool keepScreenOn, JsCallBatch &jsCallBatch = JsCallBatch::immediate());
287 void setFixedSizeStateEnabled(bool fixedSizeStateEnabled, JsCallBatch &jsCallBatch = JsCallBatch::immediate());
288 void setWindowDragResizable(bool dragResizable, JsCallBatch &jsCallBatch = JsCallBatch::immediate());
289 void showWindow(JsCallBatch &jsCallBatch = JsCallBatch::immediate());
290 void sendAsyncSyntheticWindowActiveEvent();
291 static bool canShiftSystemFocus(const QOhosView *fromHostView, const QOhosView *toHostView);
292
293 std::shared_ptr<QOhosWindowProxy> tryCreateWindowProxyIfNeeded(ViewType viewType, QWindow *optLogicalParent);
294
295 bool isWindowTransparencyRequested() const;
296
297 bool isFixedSizeStateEnabled() const;
298 bool isMaximizeRequestSupportedOrLogWarning() const;
299
300 QOhosPropertiesProvider m_windowPropertiesProvider;
301 QPointer<QWindow> m_ownerWindow;
302 std::shared_ptr<QOhosWindowProxy> m_ohosWindowProxy;
303 QSharedPointer<QNativeNode> m_nativeNode;
304 SystemUpdateData m_updateData;
305 bool m_updatePending;
306 std::function<QOhosWindowProxy::AvoidArea(QOhosWindowProxy::AvoidAreaType)> m_avoidAreasProvider;
307 bool m_requireHandheldDeviceSupport;
308 QtOhos::InternalWindowId m_ownerWindowId;
309 bool m_windowDestroyed = false;
310 std::optional<ViewType> m_viewType;
311 QPointer<QWindow> m_optLogicalParent;
312 QPointer<QOhosView> m_embeddedViewToActivateOnActive;
313 std::optional<WindowHideMethod> m_lastMainWindowHideMethod;
314 ViewGeometryPersistencePolicy m_geometryPersistencePolicy = ViewGeometryPersistencePolicy::Ignore;
315 std::shared_ptr<void> m_windowPropertiesProviderCallbacksHandle;
316 std::function<void()> m_optPostSurfaceDrawTask;
317 int m_pendingSelfMinimizeEchoes = 0;
318 std::atomic<bool> m_surfaceHasContent = false;
319};
320
321template <typename T, QOhosRuntimeDeviceTypeAndMode SupportedModes>
322void QOhosView::setSystemUpdateProperty(SystemUpdateDataProperty<T, SupportedModes> SystemUpdateData::*propertyMemberPtr, const T &value)
323{
324 QFlags<QOhosRuntimeDeviceTypeAndMode> supportedModes(SupportedModes);
325
326 if (m_requireHandheldDeviceSupport
327 && !supportedModes.testFlag(QOhosRuntimeDeviceTypeAndMode::HandheldDeviceWindowPcMode)
328 && !supportedModes.testFlag(QOhosRuntimeDeviceTypeAndMode::HandheldDeviceFullScreen)) {
329 return;
330 }
331
332 bool windowModeOnly =
333 !supportedModes.testFlag(QOhosRuntimeDeviceTypeAndMode::HandheldDeviceFullScreen)
334 && (supportedModes.testFlag(QOhosRuntimeDeviceTypeAndMode::_2in1)
335 || supportedModes.testFlag(QOhosRuntimeDeviceTypeAndMode::HandheldDeviceWindowPcMode));
336
337 if (windowModeOnly && !QOhosSettings::instance().isWindowPcModeEnabled()
338 && viewType() == ViewType::MainWindow) {
339 return;
340 }
341
342 auto &property = m_updateData.*propertyMemberPtr;
343 if (property.optPendingUpdateRequest != value) {
344 property.optPendingUpdateRequest = value;
345 scheduleSystemUpdateIfNeeded();
346 }
347}
348
349QT_END_NAMESPACE
350
351#endif
static const QOhosPropertyDescriptor< bool > windowKeepScreenOnProperty
static const QOhosPropertyDescriptor< QColor > surfaceBackgroundColorProperty
void setWindowTitle(const QString &title) override
Reimplement to set the window title to title.
bool mainWindowTagValueOrFalse() const
Qt::WindowStates windowStates() const
std::optional< QCursor > m_cursor
void setDisplayIdFromOhos(std::optional< QOhosDisplayInfo::JsDisplayId > displayId)
bool setMouseGrabEnabled(bool grab) override
static std::optional< T > tryGetWindowOrWidgetProperty(QObject *windowOrWidget)
void setWindowStateFromOhos(Qt::WindowStates state)
static const QOhosPropertyDescriptor< int > windowBrightnessProperty
static const QOhosPropertyDescriptor< bool > mainWindowTagProperty
static const QOhosPropertyDescriptor< QWindow * > subWindowOfTagProperty
void setGeometry(const QRect &rect) override
This function is called by Qt whenever a window is moved or resized using the QWindow API.
bool setKeyboardGrabEnabled(bool grab) override
static const QOhosPropertyDescriptor< bool > windowPrivacyModeSettingProperty
bool windowEvent(QEvent *event) override
Reimplement this method to be able to do any platform specific event handling.
QtOhos::InternalWindowId m_windowId
static const QOhosPropertyDescriptor< double > windowCornerRadiusProperty
static bool isWindowBeingClosedOrDestroyed(QWindow *window)
static std::shared_ptr< void > setSurfaceConsumer(QWindow *targetWindow, QObject *surfaceConsumerContext, std::function< void(std::optional< void * >)> surfaceConsumer)
QRect lastRequestedWindowFrameGeometry() const
QMargins safeAreaMargins() const override
The safe area margins of a window represent the area that is safe to place content within,...
static const QOhosPropertyDescriptor< int > windowSaturationProperty
void setExposedFromOhos(bool exposed)
const QPlatformScreen * geometryConversionScreen(const QRect &rect) const
static const QOhosPropertyDescriptor< int > windowContrastProperty
static QOhosPlatformWindow * fromQWindow(QWindow *window)
QOhosPropertiesProvider propertiesProvider()
static const QOhosPropertyDescriptor< bool > floatWindowTagProperty
void setVisible(bool visible) override
Reimplemented in subclasses to show the surface if visible is true, and hide it if visible is false.
static void tagWindowOrWidgetAsFloatWindow(QObject *windowOrWidgetToTag, bool showAsFloatWindow)
static const QOhosPropertyDescriptor< bool > windowDragResizableProperty
static void tagWindowOrWidgetAsSubWindowOf(QObject *windowOrWidgetToTag, QWindow *targetMainWindow)
virtual void onWindowFlagsChanged(Qt::WindowFlags previousWindowFlags, Qt::WindowFlags currentWindowFlags)
QtOhos::InternalWindowId internalWindowId() const
static void tagWindowOrWidgetAsMainWindow(QObject *windowOrWidgetToTag, bool forceMainWindow)
Qt::WindowFlags m_windowFlags
void propagateSizeHints() override
Reimplement to propagate the size hints of the QWindow.
static QOhosPlatformWindow * fromQWindowOrNull(QWindow *window)
virtual QOhosSurface * ownedSurfaceOrNull() const
static QWindow * getWindowOrWidgetAsSubWindowOfTagValue(QObject *windowOrWidget)
virtual void onWindowStateChanged(Qt::WindowStates oldWindowState, Qt::WindowStates currentWindowState)
void setParent(const QPlatformWindow *newParent) override
This function is called to enable native child window in QPA.
QOhosPlatformWindow(QWindow *window)
void setCursor(const QCursor &cursor)
std::optional< Qt::WindowStates > m_lastWindowState
bool shouldDisplayAsOhosWindow() const
static const QOhosPropertyDescriptor< int > nativeNodeRenderFitPolicyHintProperty
std::unique_ptr< QMargins > m_optFrameMargins
void setWindowGeometryFromOhos(const QRect &nativeWindowDrawGeometry)
std::optional< double > windowId() const override
QHarmonyJsObjectRef ability() const override
QMargins frameMargins() const override
void initialize() override
Called as part of QWindow::create(), after constructing the window.
void setSafeAreaMarginsFromOhos(const QMargins &margins)
QPlatformScreen * screen() const override
void setWindowFlags(Qt::WindowFlags flags) override
Requests setting the window flags of this surface to flags.
bool floatWindowTagValueOrFalse() const
void setWindowState(Qt::WindowStates state) override
Requests setting the window state of this surface to type.
void notifyInputSystemsWindowActiveStatusChanged(bool active)
static const QOhosPropertyDescriptor< bool > windowFixedSizeStateProperty
bool isExposed() const final
Returns if this window is exposed in the windowing system.
void requestActivateWindow() override
Reimplement to let Qt be able to request activation/focus for a window.
Qt::WindowStates m_windowState
DecorationPreset decorationPreset() const
QRect lastReportedWindowGeometry() const
QWindow * validSubWindowOfTagValueOrNull() const
Qt::WindowFlags windowFlags() const
static void setWindowOrWidgetProperty(QObject *windowOrWidget, T propertyValue)
bool shouldShowWindowWithoutActivating() const
QHarmonyJsObjectRef jsWindow() const override
virtual QOhosView * ownedViewOrNull() const
static bool isEmbeddedWindow(QWindow *window)
void setWindowMarginsFromOhos(const QMargins &margins)
static Qt::WindowFlags platformWindowFlagsForQWindow(QWindow *window)
QOhosPropertiesProvider(QOhosPropertiesStore &store)
std::optional< T > tryGetProperty() const
std::shared_ptr< void > addPropertyWriteCallback(QOhosConsumer< T > propertyWriteCallback)
QOhosPropertiesStore(QObject *qObject)
std::shared_ptr< void > addPropertyWriteCallback(QOhosConsumer< T > propertyWriteCallback)
std::optional< T > tryGetProperty() const
void notifyPropertyWrite(const QByteArray &propertyName)
void setExtraUsageBitsForNativeWindowBuffer(std::uint64_t usageSetBits)
::OHNativeWindow * nativeWindow() const
static constexpr ::OH_NativeBuffer_Format bufferFormat
void paintOnNativeWindowSurface(std::function< std::vector<::Region::Rect >(QImage &, ::BufferHandle *)> paintFunc, std::function< void(::BufferHandle *)> onFlushSuccessFunc)
static std::optional< QSize > tryGetBufferGeometryForWindow(::OHNativeWindow *nativeWindow)
void setNativeWindowSurface(::OHNativeWindow *nativeWindow, const std::optional< QSize > &optSurfaceSize)
static QImage::Format mapNativeBufferFormatToQImageFormatOrFail(std::int32_t format)
std::optional< QSize > surfaceResolution() const
QOhosSurface(::OHNativeWindow *nativeWindow)
EGLSurface tryGetOrCreateEGLWindowSurface(EGLDisplay display, EGLConfig config, bool swappingBuffers)
void clearNativeWindowSurface()
void windowStatusChange(QOhosWindowProxy::WindowStatus windowStatus)
void setParentOrReparent(QOhosView &parentView)
void requestActivate()
bool consumePendingSelfMinimizeEcho()
void setCursor(const QCursor &cursor)
void handleWindowFlagsChange(Qt::WindowFlags previousWindowFlags, Qt::WindowFlags currentWindowFlags)
void addForeignWindowChild(QOhosForeignWindow *foreignWindow)
void handleWindowStateChange(Qt::WindowStates previousWindowState, Qt::WindowStates currentWindowState)
void restoreMainWindow()
void setFocusable(bool focusable)
QArkUi::QQtEmbeddedWindowNode::NodeAreaInfo nodeAreaInfo() const
QOhosSurface * surfaceOrNull() const
void windowVisibilityChange(bool visibility)
QList< QRect > displayCutoutRects() const
void setTransparentBackground(bool transparent)
void setModality(Qt::WindowModality modality)
WId viewWindowId() const
bool isFullscreenImmersiveModeEnabled()
void setFramelessWindow(bool frameless)
QPixmap makeSnapshot() const
void setWindowTransparentForInput(bool transparentForInput)
void tryDetachFromEmbeddedParent()
ViewType viewType() const
QMargins avoidAreaMargins(QOhosWindowProxy::AvoidAreaType type) const
QWindow * ownerWindow() const
void handleSurfaceContentsUpdated()
void hide()
WindowStateSyncReason
Definition qohosview.h:93
void windowRectChanged(QOhosWindowProxy::RectChangeOptions rectChangeOptions)
void windowRectChangedInGlobalDisplay(QOhosWindowProxy::RectChangeOptions rectChangeOptions)
void forceGeometryUpdate()
void externalContentInteractionDetected()
void setWindowMinMaxCloseButtonState(const WindowMinMaxCloseButtonsState &state)
void setWindowMask(const QOhosWindowProxy::WindowMask &windowMask)
void setSizeLimits(const QSize &minSize, const QSize &maxSize)
std::optional< QSize > surfaceResolution() const
QHarmonyJsObjectRef abilityObjectRef() const
QOhosView(QWindow *ownerWindow, QSharedPointer< QNativeNode > nativeNode, QOhosPropertiesProvider propertiesProvider, QWindow *optLogicalParent)
void windowTouchOutside()
void nodeAreaChanged(QArkUi::QQtEmbeddedWindowNode::NodeAreaInfo areaChangeEvt)
void handlePaletteChange()
void windowResizeRejected(QSize rejectedSize)
void lower()
void windowDisplayIdChanged(QOhosDisplayInfo::JsDisplayId)
static std::unique_ptr< QOhosView > createForWindow(QOhosPlatformWindow *window, QOhosPropertiesProvider windowPropertiesProvider)
void minimize()
void setOpacity(qreal opacity)
QHarmonyJsObjectRef jsWindowObjectRef() const
void windowMoveRejected(QPoint rejectedPosition)
void setWindowStaysOnTop(bool staysOnTop)
void setFullScreen()
void maximize()
ViewGeometry viewGeometry() const
void avoidAreaChanged(QOhosWindowProxy::AvoidAreaType avoidAreaType, const QOhosWindowProxy::AvoidArea &avoidArea)
void setSize(const QSize &size)
void recover()
bool startMoving()
void setPosition(const QPoint &position)
bool isSubWindowCoveringFullScreen() const
void showImmediate()
void surfaceStatusChanged(const std::optional< QSize > &optSurfaceSize)
QRect nodeParentRelativeGeometryPixels() const
void setTitle(const QString &title)
void startDrag(const std::vector< QImage > &images, const QPointF &hotspot, const QMimeData &mimeData, QOhosConsumer< Qt::DropAction > dropActionConsumer)
const QOhosView * viewParentOrNull() const
QRect nodeScreenGeometryPixels() const
void raise()
QtOhosQpa::enums::ohos::window::AvoidAreaType AvoidAreaType
bool sendEvent(WindowSystemEvent *event) override
static JsCallBatch & immediate()
Combined button and popup list for selecting options.
QOhosView * mapQWindowToViewOrNull(QWindow *window)
std::optional< T > tryMapFromQVariant(QVariant variant)
std::shared_ptr< QWindowSystemEventHandler > makeApplicationStateTracker()
void setQOhosPropertyOnQObject(QObject *qObject, T propertyValue)
std::optional< T > tryGetQOhosPropertyFromQObject(QObject *qObject)
bool disableWindowFocusableBeforeLoadContent
Definition qohosview.h:67
std::optional< QOhosDisplayInfo::JsDisplayId > displayId
Definition qohosview.h:78
bool operator==(const WindowMinMaxCloseButtonsState &other) const
bool operator!=(const WindowMinMaxCloseButtonsState &other) const