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
qohoswindowproxy.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 QOHOSWINDOWPROXY_H
5#define QOHOSWINDOWPROXY_H
6
7#include <QtCore/private/qnapi_p.h>
8#include <QtCore/private/qohoscommon_p.h>
9#include <QtCore/qflags.h>
10#include <QtCore/qglobal.h>
11#include <QtCore/qobject.h>
12#include <QtCore/qpoint.h>
13#include <QtCore/qpointer.h>
14#include <QtCore/qrect.h>
15#include <QtCore/qsize.h>
16#include <QtGui/qcolor.h>
17#include <QtGui/qeventpoint.h>
18#include <QtGui/qwindow.h>
19#include <array>
20#include <functional>
21#include <cstdint>
22#include <memory>
23#include <qarkui/input.h>
24#include <qarkui/window.h>
25#include <qohosdisplayinfo.h>
26#include <qohosenums.h>
27#include <qohosplugincore.h>
28#include <qohospointerstyle.h>
29#include <qohosutils.h>
30#include <render/qohoswindowproxydatafactory.h>
31#include <render/qxcomponent.h>
32#include <set>
33
35
36class QOhosWindowProxy final
37{
38public:
47
57
66
77
84
90
95
100
108
117
123
128
133
142
150
155
157
168
173
174 static std::shared_ptr<QOhosWindowProxy> createMainWindow(const MainWindowCreateInfo &createInfo);
175 static std::shared_ptr<QOhosWindowProxy>
177 static std::shared_ptr<QOhosWindowProxy> createFloatWindow(const FloatWindowCreateInfo &createInfo);
178
179 QOhosWindowProxy(const QOhosWindowProxy &) = delete;
180 QOhosWindowProxy(QOhosWindowProxy &&) = delete;
181 QOhosWindowProxy &operator=(const QOhosWindowProxy &) = delete;
182 QOhosWindowProxy &operator=(QOhosWindowProxy &&) = delete;
183
185
186 void setSize(const QSize &size);
187 void moveWindowToGlobal(const QPoint &position, const MoveConfiguration &moveConfiguration);
188 void setWindowBackgroundColor(const QColor &color);
189 void setCustomCursor(const QImage &customCursorImage, const QPoint &hotSpot);
190 void setPointerStyleSync(const QCursor &cursor);
191 void setWindowPrivacyMode(bool privacyMode);
192 void setWindowFocusable(bool focusable);
193 void setWindowTouchable(bool touchable);
194 void setWindowLimits(const QSize &minSize, const QSize &maxSize);
195 void setWindowMask(
196 const WindowMask &windowMask, const QOhosOptional<QSize> &ohosMaskSizeOverride = {});
198 void setSubWindowModalEnabled(ModalityType ModalityType);
199 void setTitle(const QString &title);
200 void setWindowTitleButtonVisible(bool maximizeVisible, bool minimizeVisible, bool closeVisible);
201 void setWindowTopmost(bool topmost);
202 void setWindowDecorVisible(bool visible);
203 void setWindowTitleMoveEnabled(bool enabled);
204 void setWindowShadowRadius(double radius);
205 void setWindowCornerRadius(double radius);
206 void setWindowRectAutoSave(bool enabed);
207 bool isWindowRectAutoSave() const;
208 void setFollowParentMultiScreenPolicy(bool enabled);
209 void setWindowKeepScreenOn(bool keepScreenOn);
210
211 void setSupportedWindowModes(const std::set<SupportWindowMode> &supportedWindowModes);
212
213 void setSubWindowCloseHandler(std::function<void()> handler, bool handlerReturnValue);
215
216 void raiseToAppTop();
217 void showWindow(const ShowWindowOptions &options = ShowWindowOptions());
218 void recover();
219 void restore();
220 void maximize(MaximizePresentation maximizePresentation);
221 void minimize();
222 void showAbility();
223 bool tryHideAbility();
226 QPixmap snapshot() const;
227 bool startMoving();
228
229 QOhosOptional<bool> isFocused() const;
230
232 void setWindowCallbackReceiver(std::unique_ptr<WindowCallbacks> receiver);
234 QObject *contextObject, QOhosConsumer<std::vector<NonClientAreaMouseEvent>> mouseEventBatchConsumer);
236 QObject *contextObject, QOhosConsumer<std::vector<NonClientAreaTouchEvent>> touchEventBatchConsumer);
237
238 std::shared_ptr<QOhosWindowProxy> createSubWindow(const SubWindowCreateInfo &createInfo);
239
240 bool qtIsMainWindow() const;
244 std::shared_ptr<QXComponentNode> nodeXComponent() const;
245 std::string qAbilityInstanceId() const;
246
248 QOhosDisplayInfo::JsDisplayId displayId, const QPoint &queryLocation,
249 std::uint32_t queryLimit = 0);
251 const std::function<bool(QtOhos::JsState &jsState, const QArkUi::JsWindowRef &)> &predicate);
252
254 void shiftAppWindowFocus(QOhosWindowProxy &targetProxy);
255
256private:
257 static std::shared_ptr<QOhosWindowProxy> create(QtOhos::JsState &jsState, QOhosWindowProxyData data);
258
259 enum class EventHandlerFlagBits
260 {
261 allowCallWhenAbilityIsTerminating = 1 << 0,
262 allowEventHandlerRegistrationFailure = 1 << 1,
263 };
264
265 struct JsScopeData : public std::enable_shared_from_this<JsScopeData>
266 {
267 JsScopeData(
268 bool mainWindow, QNapi::Reference<QNapi::Object> jsWindow,
269 std::shared_ptr<void> optKeepAliveData,
270 std::shared_ptr<QtOhos::QAbilityPeer> qAbilityPeer);
271 ~JsScopeData();
272
273 void registerCallbackListener(
274 const std::string &eventName,
275 void (JsScopeData::*handleFunctions)(const QtOhos::CallbackInfo &),
276 QFlags<EventHandlerFlagBits> eventHandlerFlags);
277 std::shared_ptr<void> registerSubWindowCloseHandler(
278 QtOhos::JsState &jsState,
279 std::function<bool()> handler);
280 void handleWindowEventCallback(const QtOhos::CallbackInfo &cbInfo);
281 void handleWindowStatusCallback(const QtOhos::CallbackInfo &cbInfo);
282 void handleWindowVisibilityCallback(const QtOhos::CallbackInfo &cbInfo);
283 void handleWindowSizeChangeCallback(const QtOhos::CallbackInfo &cbInfo);
284 void handleWindowTouchOutsideCallback(const QtOhos::CallbackInfo &cbInfo);
285 void handleAvoidAreaChangeCallback(const QtOhos::CallbackInfo &cbInfo);
286 void handleWindowRectChangeCallback(const QtOhos::CallbackInfo &cbInfo);
287 void handleWindowDisplayIdChangeCallback(const QtOhos::CallbackInfo &cbInfo);
288 void onWindowEvent(QtOhos::JsState &jsState, const WindowEvent &windowEvent);
289 bool isWindowClosing() const;
290 void onMouseEventFromArkUi(const QArkUi::MouseEvent &event);
291 void onTouchEventFromArkUi(const QArkUi::TouchEvent &event);
292
293 bool mainWindow;
294 std::shared_ptr<WindowCallbacks> windowCallbackReceiver;
295 bool windowDestroyedFromSystem;
296 std::shared_ptr<void> optKeepAliveData;
297 std::shared_ptr<QtOhos::QAbilityPeer> qAbilityPeer;
298 std::shared_ptr<void> m_windowFrameMouseFilterHandle;
299 std::shared_ptr<void> m_windowFrameTouchFilterHandle;
300 QOhosConsumer<NonClientAreaMouseEvent> nonClientAreaMouseEventConsumer;
301 QOhosConsumer<NonClientAreaTouchEvent> nonClientAreaTouchEventConsumer;
302 std::shared_ptr<QArkUi::JsWindowRef> jsWindowRef;
303 };
304
305 struct EventHandlerDescriptor
306 {
307 const char *eventName;
308 void (JsScopeData::*eventHandler)(const QtOhos::CallbackInfo &);
309 QFlags<EventHandlerFlagBits> eventHandlerFlags;
310 };
311
312 QOhosWindowProxy(QOhosWindowProxyData data);
313
314 std::shared_ptr<void> registerSubWindowCloseHandler(
315 std::function<void()> handler,
316 bool handlerReturnValue);
317
318 static const EventHandlerDescriptor eventHandlerDescriptors[];
319
320 std::shared_ptr<JsScopeData> m_jsScopeData;
321 WindowProxyType m_windowProxyType;
322 std::shared_ptr<QXComponentNode> m_nodeXComponent;
323 std::string m_qAbilityInstanceId;
324 std::shared_ptr<void> m_subWindowCloseRegistrationHandle;
325 std::shared_ptr<void> m_qtWindowCallbacksReceiverHandle;
326 std::shared_ptr<void> m_qtNonClientAreaMouseWindowCallbackReceiverHandle;
327 std::shared_ptr<void> m_qtNonClientAreaTouchWindowCallbackReceiverHandle;
328};
329
330namespace QtOhos
331{
332
333template<>
335{
336 static constexpr const char *fullTypeName = "@ohos.window.WindowEventType";
337 static constexpr std::array<std::pair<QOhosWindowProxy::WindowEventType, const char *>, 5> enumeratorsNames = {{
340 {QOhosWindowProxy::WindowEventType::WINDOW_INACTIVE, "WINDOW_INACTIVE"},
342 {QOhosWindowProxy::WindowEventType::WINDOW_DESTROYED, "WINDOW_DESTROYED"},
343 }};
344};
345
346template<>
348{
349 static constexpr const char *fullTypeName = "@ohos.window.AvoidAreaType";
350 static constexpr std::array<std::pair<QOhosWindowProxy::AvoidAreaType, const char *>, 5> enumeratorsNames = {{
351 {QOhosWindowProxy::AvoidAreaType::TYPE_SYSTEM, "TYPE_SYSTEM"},
352 {QOhosWindowProxy::AvoidAreaType::TYPE_CUTOUT, "TYPE_CUTOUT"},
353 {QOhosWindowProxy::AvoidAreaType::TYPE_SYSTEM_GESTURE, "TYPE_SYSTEM_GESTURE"},
354 {QOhosWindowProxy::AvoidAreaType::TYPE_KEYBOARD, "TYPE_KEYBOARD"},
355 {QOhosWindowProxy::AvoidAreaType::TYPE_NAVIGATION_INDICATOR, "TYPE_NAVIGATION_INDICATOR"},
356 }};
357};
358
359template <>
361{
362 static constexpr const char *fullTypeName = "@ohos.window.RectChangeReason";
372};
373
374template<>
376{
377 static constexpr const char *fullTypeName = "@ohos.window.WindowStatusType";
378 static constexpr std::array<std::pair<QOhosWindowProxy::WindowStatusType, const char*>, 6> enumeratorsNames = {{
385 }};
386};
387
388template<>
390{
391 static constexpr const char *fullTypeName = "@ohos.window.MaximizePresentation";
392 static constexpr std::array<std::pair<QOhosWindowProxy::MaximizePresentation, const char *>, 3> enumeratorsNames = {{
393 {QOhosWindowProxy::MaximizePresentation::FOLLOW_APP_IMMERSIVE_SETTING, "FOLLOW_APP_IMMERSIVE_SETTING"},
396 }};
397};
398
399template<>
401{
402 static constexpr const char *fullTypeName = "@ohos.window.ModalityType";
403 static constexpr std::array<std::pair<QOhosWindowProxy::ModalityType, const char *>, 2> enumeratorsNames = {{
404 {QOhosWindowProxy::ModalityType::WINDOW_MODALITY, "WINDOW_MODALITY"},
405 {QOhosWindowProxy::ModalityType::APPLICATION_MODALITY, "APPLICATION_MODALITY"},
406 }};
407};
408
409}
410
412
415Q_DECLARE_METATYPE(QOhosWindowProxy::AvoidArea);
418
419#endif
void setSizeParentFillPercentNormalized(const QSizeF &size)
void setSaturation(int saturation)
QRectF geometry() const
void setTransparentForInput(bool transparentForInput)
void setPosition(QPoint position)
void setContrast(int contrast)
QRect nodeParentRelativeGeometryPixels() const
void setNodeVisibilityChangeHandler(QOhosConsumer< bool > visibilityChangedConsumer)
void detachFromParentIfPresent()
QOhosSurface * surfaceOrNull() const
void setFocused(bool focused)
void setBackgroundColor(const QColor &color)
void fillToParent(const QSize &surfaceResolution)
QRect nodeScreenGeometryPixels() const
void setNodeAreaChangeHandler(QOhosConsumer< QArkUi::QQtEmbeddedWindowNode::AreaChangeEvent > areaChangeEventConsumer)
void setVisibility(bool visible)
void externalContentClickDetected()
void setNodeFocusChangeHandler(QOhosConsumer< bool > focusedChangedConsumer)
QNativeNode(const CreateInfo &nativeNodeCreateInfo)
WId windowId() const
void addForeignWindowChild(QOhosForeignWindow *foreignWindow)
void setSize(const QSizeF &size)
void setFocusable(bool focusable)
void setBrightness(int brightness)
void setParent(std::shared_ptr< QXComponentNode > xComponent)
void setParent(QNativeNode &other)
std::enable_if_t< qohosplugincore_h_detail::isQOhosOptional< QOhosInvokeResult< Func, T > >, QOhosInvokeResult< Func, T > > andThen(Func &&func) const
static const QOhosPropertyDescriptor< bool > windowKeepScreenOnProperty
static const QOhosPropertyDescriptor< QColor > surfaceBackgroundColorProperty
void setWindowTitle(const QString &title) override
Reimplement to set the window title to title.
QOhosPlatformScreen * platformScreen() const
static void setWindowOrWidgetNativeNodeRenderFitPolicyHint(QObject *windowOrWidget, NativeNodeRenderFitPolicy renderFitPolicy)
bool mainWindowTagValueOrFalse() const
Qt::WindowStates windowStates() const
static QOhosOptional< T > tryGetWindowOrWidgetProperty(QObject *windowOrWidget)
void setDisplayIdFromOhos(QOhosOptional< QOhosDisplayInfo::JsDisplayId > displayId)
bool setMouseGrabEnabled(bool grab) override
static void setWindowKeepScreenOn(QObject *windowOrWidget, bool keepScreenOn)
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 void setSurfaceBackgroundColor(QObject *windowOrWidget, const QColor &color)
static void setSaturation(QObject *windowOrWidget, int saturation)
QOhosOptional< QOhosDisplayInfo::JsDisplayId > tryTakeLastRequestedDisplayId()
static std::shared_ptr< void > setSurfaceConsumer(QWindow *targetWindow, QObject *surfaceConsumerContext, std::function< void(QOhosOptional< void * >)> surfaceConsumer)
QOhosOptional< QCursor > m_cursor
static const QOhosPropertyDescriptor< int > windowSaturationProperty
static const QOhosPropertyDescriptor< int > windowContrastProperty
static QOhosPlatformWindow * fromQWindow(QWindow *window)
QOhosPropertiesProvider propertiesProvider()
static const QOhosPropertyDescriptor< bool > floatWindowTagProperty
bool isWindowBeingClosedOrDestroyed(QWindow *window) const
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 void tagWindowOrWidgetAsSubWindowOf(QObject *windowOrWidgetToTag, QWindow *targetMainWindow)
virtual void onWindowFlagsChanged(Qt::WindowFlags previousWindowFlags, Qt::WindowFlags currentWindowFlags)
static const QOhosPropertyDescriptor< NativeNodeRenderFitPolicy > nativeNodeRenderFitPolicyHintProperty
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 void setWindowCornerRadius(QObject *windowOrWidget, double radius)
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)
static void setBrightness(QObject *windowOrWidget, int brightness)
bool shouldDisplayAsOhosWindow() const
std::unique_ptr< QMargins > m_optFrameMargins
void setWindowGeometryFromOhos(const QRect &nativeWindowDrawGeometry)
ScreenChangeResult tryChangeScreen(QOhosPlatformScreen *screen)
QMargins frameMargins() const override
void initialize() override
Called as part of QWindow::create(), after constructing the window.
QPlatformScreen * screen() const override
static void setContrast(QObject *windowOrWidget, int contrast)
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
static void setWindowPrivacyMode(QObject *window, bool privacyModeEnabled)
QWindow * validSubWindowOfTagValueOrNull() const
Qt::WindowFlags windowFlags() const
static void setWindowOrWidgetProperty(QObject *windowOrWidget, T propertyValue)
bool shouldShowWindowWithoutActivating() const
virtual QOhosView * ownedViewOrNull() const
void setWindowMarginsFromOhos(const QMargins &margins)
static Qt::WindowFlags platformWindowFlagsForQWindow(QWindow *window)
QOhosPropertiesProvider(QOhosPropertiesStore &store)
QOhosOptional< T > tryGetProperty() const
std::shared_ptr< void > addPropertyWriteCallback(QOhosConsumer< T > propertyWriteCallback)
QOhosPropertiesStore(QObject *qObject)
std::shared_ptr< void > addPropertyWriteCallback(QOhosConsumer< T > propertyWriteCallback)
void notifyPropertyWrite(const QByteArray &propertyName)
QOhosOptional< T > tryGetProperty() const
void setExtraUsageBitsForNativeWindowBuffer(std::uint64_t usageSetBits)
EGLSurface tryGetOrCreateEGLWindowSurface(EGLDisplay display, EGLConfig config)
QOhosOptional< QSize > surfaceResolution() const
::OHNativeWindow * nativeWindow() const
void setNativeWindowSurface(::OHNativeWindow *nativeWindow)
static constexpr ::OH_NativeBuffer_Format bufferFormat
void paintOnNativeWindowSurface(std::function< std::vector<::Region::Rect >(QImage &, ::BufferHandle *)> paintFunc, std::function< void(::BufferHandle *)> onFlushSuccessFunc)
static QImage::Format mapNativeBufferFormatToQImageFormatOrFail(std::int32_t format)
static QOhosOptional< QSize > tryGetBufferGeometryForWindow(::OHNativeWindow *nativeWindow)
QOhosSurface(::OHNativeWindow *nativeWindow)
void clearNativeWindowSurface()
void windowStatusChange(QOhosWindowProxy::WindowStatus windowStatus)
void setParentOrReparent(QOhosView &parentView)
void requestActivate()
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)
QOhosSurface * surfaceOrNull() const
void windowVisibilityChange(bool visibility)
void setPositionOnScreenImmediate(const QPoint &position, QOhosDisplayInfo::JsDisplayId jsDisplayId)
void setTransparentBackground(bool transparent)
void setModality(Qt::WindowModality modality)
WId viewWindowId() const
bool isFullscreenImmersiveModeEnabled()
void setFramelessWindow(bool frameless)
QPixmap makeSnapshot() const
void setWindowShadowDisabled()
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:88
void windowRectChanged(QOhosWindowProxy::RectChangeOptions rectChangeOptions)
QOhosOptional< QSize > surfaceResolution() const
void forceGeometryUpdate()
void externalContentInteractionDetected()
void nodeAreaChanged(QArkUi::QQtEmbeddedWindowNode::AreaChangeEvent areaChangeEvt)
void setWindowMinMaxCloseButtonState(const WindowMinMaxCloseButtonsState &state)
void setWindowMask(const QOhosWindowProxy::WindowMask &windowMask)
void setSizeLimits(const QSize &minSize, const QSize &maxSize)
void windowTouchOutside()
void handlePaletteChange()
void lower()
void surfaceStatusChanged(const QOhosOptional< QSize > &optSurfaceSize)
void windowDisplayIdChanged(QOhosDisplayInfo::JsDisplayId)
static std::unique_ptr< QOhosView > createForWindow(QOhosPlatformWindow *window, QOhosPropertiesProvider windowPropertiesProvider)
void minimize()
void setOpacity(qreal opacity)
void setNativeNodeVisibility(bool visible)
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)
QOhosView(QWindow *ownerWindow, QSharedPointer< QNativeNode > nativeNode, QOhosPropertiesProvider propertiesProvider)
bool isSubWindowCoveringFullScreen() const
void showImmediate()
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()
void setWindowRectAutoSave(bool enabed)
void setWindowMask(const WindowMask &windowMask, const QOhosOptional< QSize > &ohosMaskSizeOverride={})
void setSubWindowModalEnabled(ModalityType ModalityType)
void setWindowKeepScreenOn(bool keepScreenOn)
void moveWindowToGlobal(const QPoint &position, const MoveConfiguration &moveConfiguration)
static std::shared_ptr< QOhosWindowProxy > createFloatWindow(const FloatWindowCreateInfo &createInfo)
QArkUi::WindowProperties getWindowProperties() const
void setWindowPrivacyMode(bool privacyMode)
QOhosWindowProxy(const QOhosWindowProxy &)=delete
QOhosWindowProxy(QOhosWindowProxy &&)=delete
AvoidArea getWindowAvoidArea(AvoidAreaType type) const
void setWindowCornerRadius(double radius)
QOhosWindowProxyExistingMainWindowCreateInfo ExistingMainWindowCreateInfo
void setSupportedWindowModes(const std::set< SupportWindowMode > &supportedWindowModes)
std::shared_ptr< QOhosWindowProxy > createSubWindow(const SubWindowCreateInfo &createInfo)
QPixmap snapshot() const
static std::shared_ptr< QOhosWindowProxy > createForExistingMainWindow(const ExistingMainWindowCreateInfo &createInfo)
void setWindowTouchable(bool touchable)
WindowProxyType windowProxyType() const
void setTitle(const QString &title)
void setFollowParentMultiScreenPolicy(bool enabled)
void setWindowTopmost(bool topmost)
std::shared_ptr< QXComponentNode > nodeXComponent() const
void setWindowCallbackReceiver(std::unique_ptr< WindowCallbacks > receiver)
static std::vector< QArkUi::JsWindowId > queryWindowIdsByCoordinate(QOhosDisplayInfo::JsDisplayId displayId, const QPoint &queryLocation, std::uint32_t queryLimit=0)
void setSubWindowCloseHandler(std::function< void()> handler, bool handlerReturnValue)
QOhosOptional< bool > isFocused() const
void setWindowLimits(const QSize &minSize, const QSize &maxSize)
bool isWindowRectAutoSave() const
void setWindowDecorVisible(bool visible)
void showWindow(const ShowWindowOptions &options=ShowWindowOptions())
void shiftAppWindowFocus(QOhosWindowProxy &targetProxy)
QOhosWindowProxySubWindowCreateInfo SubWindowCreateInfo
void setNonClientAreaMouseWindowCallbackReceiver(QObject *contextObject, QOhosConsumer< std::vector< NonClientAreaMouseEvent > > mouseEventBatchConsumer)
void setCustomCursor(const QImage &customCursorImage, const QPoint &hotSpot)
void setWindowTitleMoveEnabled(bool enabled)
void setWindowFocusable(bool focusable)
void setWindowBackgroundColor(const QColor &color)
void setSize(const QSize &size)
QOhosWindowProxyMainWindowCreateInfo MainWindowCreateInfo
void setWindowShadowRadius(double radius)
bool qtIsMainWindow() const
QOhosWindowProxyFloatWindowCreateInfo FloatWindowCreateInfo
void setWindowTitleButtonVisible(bool maximizeVisible, bool minimizeVisible, bool closeVisible)
void setPointerStyleSync(const QCursor &cursor)
QtOhos::enums::ohos::bundle::bundleManager::SupportWindowMode SupportWindowMode
QOhosWindowProxy & operator=(const QOhosWindowProxy &)=delete
QOhosWindowProxy & operator=(QOhosWindowProxy &&)=delete
WindowLimits getWindowLimits() const
static std::vector< QArkUi::JsWindowId > queryQtManagedWindowIdsByPredicate(const std::function< bool(QtOhos::JsState &jsState, const QArkUi::JsWindowRef &)> &predicate)
std::string qAbilityInstanceId() const
void maximize(MaximizePresentation maximizePresentation)
void setNonClientAreaTouchWindowCallbackReceiver(QObject *contextObject, QOhosConsumer< std::vector< NonClientAreaTouchEvent > > touchEventBatchConsumer)
QOhosOptional< QOhosDisplayInfo::JsDisplayId > tryGetMainWindowJsDisplayId() const
static std::shared_ptr< QOhosWindowProxy > createMainWindow(const MainWindowCreateInfo &createInfo)
bool sendEvent(WindowSystemEvent *event) override
double fontSizeScale()
bool isWindowPcModeEnabled()
Combined button and popup list for selecting options.
QOhosView * mapQWindowToViewOrNull(QWindow *window)
QOhosOptional< T > tryMapFromQVariant(QVariant variant)
std::shared_ptr< QWindowSystemEventHandler > makeApplicationStateTracker()
QT_END_NAMESPACE Q_DECLARE_METATYPE(QT_PREPEND_NAMESPACE(QOhosPlatformWindow::NativeNodeRenderFitPolicy))
QOhosOptional< void > makeEmptyQOhosOptional()
bool isHandheldDeviceType()
constexpr QOhosRuntimeDeviceTypeAndMode operator|(QOhosRuntimeDeviceTypeAndMode lhs, QOhosRuntimeDeviceTypeAndMode rhs)
QOhosRuntimeDeviceTypeAndMode queryQOhosRuntimeDeviceAndMode()
void setQOhosPropertyOnQObject(QObject *qObject, T propertyValue)
QOhosOptional< T > tryGetQOhosPropertyFromQObject(QObject *qObject)
Q_DECLARE_METATYPE(QOhosWindowProxy::RectChangeOptions)
QT_END_NAMESPACE Q_DECLARE_METATYPE(QOhosWindowProxy::WindowEvent)
Q_DECLARE_METATYPE(QOhosWindowProxy::AvoidArea)
Q_DECLARE_METATYPE(QOhosWindowProxy::WindowStatus)
Q_DECLARE_METATYPE(QOhosWindowProxy::AvoidAreaType)
QXComponent< QXComponentType::Node > QXComponentNode
Definition qxcomponent.h:44
bool disableWindowFocusableBeforeLoadContent
Definition qohosview.h:62
QOhosOptional< QOhosDisplayInfo::JsDisplayId > displayId
Definition qohosview.h:73
bool operator==(const WindowMinMaxCloseButtonsState &other) const
bool operator!=(const WindowMinMaxCloseButtonsState &other) const
QOhosOptional< QOhosDisplayInfo::JsDisplayId > displayId
QOhosConsumer< QOhosWindowProxy::AvoidAreaType, QOhosWindowProxy::AvoidArea > onAvoidAreaChange
QOhosConsumer< QOhosDisplayInfo::JsDisplayId > onWindowDisplayIdChange
QOhosConsumer< QOhosWindowProxy::RectChangeOptions > onWindowRectChange
std::function< void()> onTouchOutside
QOhosConsumer< QOhosWindowProxy::WindowStatus > onWindowStatusChange
QOhosConsumer< QOhosWindowProxy::WindowEvent > onWindowEvent
QOhosConsumer< bool > onWindowVisibilityChange
QOhosOptional< double > minWidth
QOhosOptional< double > minHeight
QOhosOptional< double > maxHeight
QOhosOptional< double > maxWidth