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
qohossettings.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 QOHOSSETTINGS_H
5#define QOHOSSETTINGS_H
6
7#include <QtCore/QtGlobal>
8
10
11namespace QOhosSettings {
12
13double fontSizeScale();
15
16}
17
18QT_END_NAMESPACE
19
20#endif
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()
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)
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