7#include <QtCore/private/qohoscommon_p.h>
8#include <QtCore/qglobal.h>
9#include <QtCore/qmimedata.h>
10#include <QtCore/qobject.h>
11#include <QtCore/qpoint.h>
12#include <QtCore/qrect.h>
13#include <QtGui/qcolor.h>
14#include <QtGui/qimage.h>
15#include <QtGui/qwindow.h>
16#include <arkui/native_node.h>
17#include <arkui/native_type.h>
20#include <native_window/external_window.h>
21#include <qarkui/qqtembeddedwindownode.h>
22#include <qohosforeignwindow.h>
23#include <qohosplatformwindow.h>
24#include <qohosplugincore.h>
25#include <render/qohossurface.h>
26#include <render/qxcomponent.h>
44 explicit QNativeNode(
const CreateInfo &nativeNodeCreateInfo);
50 void setSize(
const QSizeF &size);
65 const std::vector<QImage> &images,
const QPointF &hotspot,
66 const QMimeData &mimeData, QOhosConsumer<Qt::DropAction> dropActionConsumer);
67 void setNodeAreaChangeHandler(QOhosConsumer<QArkUi::QQtEmbeddedWindowNode::AreaChangeEvent> areaChangeEventConsumer);
86 std::shared_ptr<
QArkUi::QQtEmbeddedWindowNode> embeddedWindow;
89 void handleSurfaceEvent(
91 ::OHNativeWindow *nativeWindow,
92 const QOhosOptional<QSize> &optSurfaceSize);
94 std::shared_ptr<JsStateData> m_jsStateData;
95 std::unique_ptr<QOhosSurface> m_optSurface;
96 QRectF m_nodeGeometry;
void setSizeParentFillPercentNormalized(const QSizeF &size)
void setSaturation(int saturation)
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)
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
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 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 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)
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 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 surfaceStatusChanged(const QOhosOptional< QSize > &optSurfaceSize)
void windowDisplayIdChanged(QOhosDisplayInfo::JsDisplayId)
static std::unique_ptr< QOhosView > createForWindow(QOhosPlatformWindow *window, QOhosPropertiesProvider windowPropertiesProvider)
void setOpacity(qreal opacity)
void setNativeNodeVisibility(bool visible)
void setWindowStaysOnTop(bool staysOnTop)
ViewGeometry viewGeometry() const
void avoidAreaChanged(QOhosWindowProxy::AvoidAreaType avoidAreaType, const QOhosWindowProxy::AvoidArea &avoidArea)
void setSize(const QSize &size)
void setPosition(const QPoint &position)
QOhosView(QWindow *ownerWindow, QSharedPointer< QNativeNode > nativeNode, QOhosPropertiesProvider propertiesProvider)
bool isSubWindowCoveringFullScreen() const
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
bool sendEvent(WindowSystemEvent *event) override
bool isWindowPcModeEnabled()
Combined button and popup list for selecting options.
@ ForwardToGuiApplication
QOhosView * mapQWindowToViewOrNull(QWindow *window)
std::string makeQObjectOhosPropertyName()
QOhosOptional< T > tryMapFromQVariant(QVariant variant)
const char * qObjectOhosPropertyName()
std::shared_ptr< QWindowSystemEventHandler > makeApplicationStateTracker()
QOhosOptional< void > makeEmptyQOhosOptional()
bool isHandheldDeviceType()
QOhosRuntimeDeviceTypeAndMode
@ HandheldDeviceFullScreen
@ HandheldDeviceWindowPcMode
constexpr QOhosRuntimeDeviceTypeAndMode operator|(QOhosRuntimeDeviceTypeAndMode lhs, QOhosRuntimeDeviceTypeAndMode rhs)
QOhosRuntimeDeviceTypeAndMode queryQOhosRuntimeDeviceAndMode()
void setQOhosPropertyOnQObject(QObject *qObject, T propertyValue)
QOhosOptional< T > tryGetQOhosPropertyFromQObject(QObject *qObject)
QXComponent< QXComponentType::Node > QXComponentNode
bool disableWindowFocusableBeforeLoadContent
QOhosOptional< QOhosDisplayInfo::JsDisplayId > displayId