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
qnativenode.cpp
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#include <render/qnativenode.h>
5
6#include <EGL/eglplatform.h>
7#include <QPointer>
8#include <qohosutils.h>
9#include <QtGui/private/qguiapplication_p.h>
10#include <QtGui/qguiapplication.h>
11#include <ace/xcomponent/native_interface_xcomponent.h>
12#include <arkui/native_node.h>
13#include <arkui/native_type.h>
14#include <arkui/ui_input_event.h>
15#include <native_window/external_window.h>
16#include <qarkui/qembeddedwindownode.h>
17#include <qohosinputmethodeventhandler.h>
18#include <qohosjsmain.h>
19#include <qohospixelmapconversions.h>
20#include <qohosplatformintegration.h>
21#include <qohosplatformwindow.h>
22#include <qohosudmf.h>
23#include <qohosudmfconversions.h>
24#include <qpa/qwindowsysteminterface.h>
25#include <render/qohosarkuinativegestureshandler.h>
26#include <render/qohosdrageventutils.h>
27#include <render/qohoshovereventsgenerator.h>
28#include <render/qohosnativeaxiseventhandler.h>
29#include <render/qohosnativedrageventshandler.h>
30#include <render/qohosnativekeyeventshandler.h>
31#include <render/qohosnativemouseeventshandler.h>
32#include <render/qohosnativexcomponentinputhandler.h>
33#include <render/qohosview.h>
34#include <render/qxcomponent.h>
35#include <algorithm>
36#include <cstdint>
37#include <functional>
38#include <iterator>
39
40QT_BEGIN_NAMESPACE
41
42namespace {
43
44bool getHoveredStateFromHoverEvent(::ArkUI_UIInputEvent *uiInputEvent)
45{
46 return QArkUi::callArkUi(Q_OHOS_NAMED_FUNC(::OH_ArkUI_HoverEvent_IsHovered), uiInputEvent);
47}
48
51
52class CallbackReceiver final : public QArkUi::QXComponentCallbackReceiver
53{
54public:
56 QXComponentRender xComponent,
57 QtOhos::QThreadSafeRef<QWindow> windowRef,
58 QtOhos::QThreadSafeRef<QOhosInputMethodEventHandler> imEventHandlerRef,
59 std::function<void(SurfaceEventType, ::OHNativeWindow *, QOhosOptional<QSize>)> surfaceEventHandler);
60
61 void onSurfaceEvent(SurfaceEventType surfaceEventType, ::OHNativeWindow *nativeWindow) override;
62 void onInputEvent(InputEventType inputEventType, ::OHNativeWindow *window) override;
63 void onHoverEvent(bool isHover) override;
64
65 ~CallbackReceiver() override = default;
66private:
67 QOhosOptional<void *> m_lastWindowArgReceivedViaAnyCallback;
68 std::function<void(SurfaceEventType, ::OHNativeWindow *, QOhosOptional<QSize>)> m_surfaceEventHandler;
69 QSharedPointer<QOhosNativeXComponentInputHandler> m_xComponentInputHandler;
70};
71
72CallbackReceiver::CallbackReceiver(
73 QXComponentRender xComponent,
74 QtOhos::QThreadSafeRef<QWindow> windowRef,
75 QtOhos::QThreadSafeRef<QOhosInputMethodEventHandler> imEventHandlerRef,
76 std::function<void(SurfaceEventType, ::OHNativeWindow *, QOhosOptional<QSize>)> surfaceEventHandler)
82{
83}
84
85void CallbackReceiver::onSurfaceEvent(SurfaceEventType surfaceEventType, ::OHNativeWindow *nativeWindow)
86{
87 m_lastWindowArgReceivedViaAnyCallback = nativeWindow;
88 m_surfaceEventHandler(surfaceEventType, nativeWindow, QOhosSurface::tryGetBufferGeometryForWindow(nativeWindow));
89}
90
91void CallbackReceiver::onInputEvent(InputEventType inputEventType, ::OHNativeWindow *window)
92{
93 m_lastWindowArgReceivedViaAnyCallback = window;
94
95 switch (inputEventType) {
96 case QArkUi::QXComponentCallbackReceiver::InputEventType::Mouse:
97 m_xComponentInputHandler->handleMouseEvent(window);
98 break;
99 case QArkUi::QXComponentCallbackReceiver::InputEventType::Touch:
100 m_xComponentInputHandler->handleTouchEvent(window);
101 break;
102 case QArkUi::QXComponentCallbackReceiver::InputEventType::Keyboard:
103 m_xComponentInputHandler->handleKeyEvent();
104 break;
105 }
106}
107
108void CallbackReceiver::onHoverEvent(bool isHover)
109{
110 if (!m_lastWindowArgReceivedViaAnyCallback.hasValue()) {
111 qOhosPrintfWarning("Received hover event before without existing surface");
112 return;
113 }
114
115 m_xComponentInputHandler->handleHoverEvent(m_lastWindowArgReceivedViaAnyCallback.value(), isHover);
116}
117
120{
121 switch (renderFitPolicy) {
123 return makeQOhosOptional(::ARKUI_RENDER_FIT_TOP_LEFT);
125 return makeQOhosOptional(::ARKUI_RENDER_FIT_RESIZE_FILL);
126 }
127
129}
130
131}
132
133QNativeNode::QNativeNode(const CreateInfo &nativeNodeCreateInfo)
134 : QObject()
135{
136 auto qWindow = QPointer<QWindow>(nativeNodeCreateInfo.window);
137 auto selfRef = QtOhos::makeQThreadSafeRef(this);
138 auto windowId = QOhosPlatformWindow::fromQWindow(qWindow)->internalWindowId();
139
140 auto platformWindowFlags = QOhosPlatformWindow::platformWindowFlagsForQWindow(qWindow);
141 bool focusable = !platformWindowFlags.testFlag(Qt::WindowDoesNotAcceptFocus);
142
143 auto renderFit = nativeNodeCreateInfo.renderFitPolicyHint
144 .andThen(tryMapRenderFitPolicyToArkUi).valueOr(::ARKUI_RENDER_FIT_TOP_LEFT);
145
146 connect(
147 qGuiApp, &QGuiApplication::focusWindowChanged,
148 this, [this, qWindow](QWindow *focusedWindow) {
149 if (focusedWindow == qWindow)
150 setFocused(true);
151 });
152
153 auto qWindowRef = QtOhos::makeQThreadSafeRef(qWindow.data());
154
155 auto *ohosPlatformIntegration = QOhosPlatformIntegration::instance();
156 auto *inputMethodEventHandler = ohosPlatformIntegration->inputMethodEventHandler();
157 if (inputMethodEventHandler == nullptr)
158 qOhosReportFatalErrorAndAbort("QOhosInputMethodEventHandler is null!");
159 auto imEventHandlerRef = QtOhos::makeQThreadSafeRef(inputMethodEventHandler);
160
162 m_jsStateData = QtOhos::makeProxyWithJsThreadDeleter(std::make_shared<JsStateData>());
163
164 using ParentDescriptor = QArkUi::QEmbeddedWindowNode::ParentDescriptor;
165
166 QOhosOptional<ParentDescriptor> optParentDescriptor;
167 if (nativeNodeCreateInfo.optParent.hasValue()) {
168 auto *parentNode = nativeNodeCreateInfo.optParent.value()->m_jsStateData->embeddedWindow.get();
169 optParentDescriptor = ParentDescriptor(*parentNode);
170 }
171
172 QArkUi::QQtEmbeddedWindowNode::CreateInfo createInfo = {
173 .offset = nativeNodeCreateInfo.geometry.topLeft(),
174 .size = nativeNodeCreateInfo.geometry.size(),
175 .xComponentId = QXComponentId::createForRenderXComponent(windowId),
176 .xComponentType = ::ArkUI_XComponentType::ARKUI_XCOMPONENT_TYPE_SURFACE,
177 .focusOnTouch = false,
178 .focusable = focusable,
179 .optParent = optParentDescriptor,
180 .sizePolicy = QArkUi::QEmbeddedWindowNode::SizePolicy::Points,
181 .renderFit = renderFit,
182 .backgroundColor = nativeNodeCreateInfo.backgroundColor,
183 };
184
185 m_jsStateData->embeddedWindow = QArkUi::QQtEmbeddedWindowNode::createOrFail(createInfo);
186 m_jsStateData->embeddedWindow->setCallbackReceiver(
187 std::make_unique<CallbackReceiver>(
188 m_jsStateData->embeddedWindow->renderXComponent(),
189 qWindowRef, imEventHandlerRef,
190 [selfRef](SurfaceEventType type, ::OHNativeWindow *window, QOhosOptional<QSize> optSurfaceSize) {
191 selfRef.visitInQtThreadIfAlive(
192 [type, window, optSurfaceSize](auto &self) {
193 self.handleSurfaceEvent(type, window, optSurfaceSize);
194 });
195 }));
196
197 m_jsStateData->embeddedWindow->setTouchInterceptReceiver(
198 [selfRef, embeddedWindow = m_jsStateData->embeddedWindow.get()](const ::ArkUI_UIInputEvent *event) {
199 auto eventAction = ::OH_ArkUI_UIInputEvent_GetAction(event);
200
201 if (eventAction != ::UI_MOUSE_EVENT_ACTION_PRESS && eventAction != ::UI_TOUCH_EVENT_ACTION_DOWN)
202 return;
203
204 if (!embeddedWindow->hasNonQtManagedChildren())
205 return;
206
207 selfRef.visitInQtThreadIfAlive(
208 [](QNativeNode &node) {
209 Q_EMIT node.externalContentClickDetected();
210 });
211 });
212
213 m_jsStateData->embeddedWindow->setAxisEventsHandler(
214 makeQOhosNativeAxisEventHandler(qWindowRef, imEventHandlerRef));
215 m_jsStateData->embeddedWindow->setGesturesHandler(
216 makeQOhosArkUiNativeGesturesHandler(qWindowRef));
217 m_jsStateData->embeddedWindow->setDragEventsHandler(makeQOhosNativeDragEventsHandler(qWindowRef));
218 if (QtOhos::isNativeNodeApiKeyEventsEnabled())
219 m_jsStateData->embeddedWindow->setKeyEventsHandler(makeQOhosNativeKeyEventsHandler(qWindowRef, imEventHandlerRef));
221 auto hoverEventsGenerator = makeQOhosHoverEventsGenerator(qWindowRef, imEventHandlerRef);
222 m_jsStateData->embeddedWindow->setMouseEventsHandler(
223 makeQOhosNativeMouseEventsHandler(qWindowRef, imEventHandlerRef, hoverEventsGenerator));
224 m_jsStateData->embeddedWindow->setHoverEventsHandler(
225 [hoverEventsGenerator](::ArkUI_UIInputEvent *uiInputEvent) {
226 hoverEventsGenerator->handleQOhosHoverEvent(getHoveredStateFromHoverEvent(uiInputEvent));
227 });
228 }
229 });
230}
231
233{
234 return m_nodeGeometry;
235}
236
238{
240 [&](QtOhos::JsState &) {
241 m_jsStateData->embeddedWindow->setSizeParentFillPercentageNormalized(size);
242 });
243}
244
245void QNativeNode::setSize(const QSizeF &size)
246{
247 m_nodeGeometry.setSize(size.toSize());
249 [&](QtOhos::JsState &) {
250 m_jsStateData->embeddedWindow->setSize(size);
251 });
252}
253
254void QNativeNode::setPosition(QPoint position)
255{
256 m_nodeGeometry.setTopLeft(position);
258 [&](QtOhos::JsState &) {
259 m_jsStateData->embeddedWindow->setPosition(position);
260 });
261}
262
263void QNativeNode::setVisibility(bool visible)
264{
266 [&](QtOhos::JsState &) {
267 m_jsStateData->embeddedWindow->setNodeVisibility(visible);
268 });
269}
270
271QOhosSurface *QNativeNode::surfaceOrNull() const
272{
273 return m_optSurface.get();
274}
275
276void QNativeNode::fillToParent(const QSize &surfaceResolution)
277{
279 [&](QtOhos::JsState &) {
280 m_jsStateData->embeddedWindow->setPosition(QPointF(0, 0));
281 m_jsStateData->embeddedWindow->setSizeParentFillPercentageNormalized(QSizeF(1.0, 1.0));
282 m_jsStateData->embeddedWindow->setSurfaceResolution(
283 static_cast<std::uint32_t>(surfaceResolution.width()),
284 static_cast<std::uint32_t>(surfaceResolution.height()));
285 });
286}
287
288void QNativeNode::handleSurfaceEvent(
289 SurfaceEventType surfaceEventType,
290 ::OHNativeWindow *nativeWindow,
291 const QOhosOptional<QSize> &optSurfaceSize)
292{
293 qCDebug(QtForOhos, "Surface event: %d window: %p", surfaceEventType, nativeWindow);
294 switch (surfaceEventType) {
296 {
297 // NOTE - Its possible to receive surface changed event with null nativeWindow
298 if (nativeWindow == nullptr) {
299 m_optSurface.reset();
300 } else if (m_optSurface) {
301 m_optSurface->setNativeWindowSurface(nativeWindow);
302 } else {
303 m_optSurface = std::make_unique<QOhosSurface>(nativeWindow);
304 }
305 break;
306 }
307 case SurfaceEventType::SurfaceCreated:
308 m_optSurface = std::make_unique<QOhosSurface>(nativeWindow);
309 break;
310 case SurfaceEventType::SurfaceDestroyed:
311 m_optSurface.reset();
312 break;
313 }
314 Q_EMIT surfaceStatusChanged(optSurfaceSize);
315}
316
318{
319 return QtOhos::evalInJsThread([&](QtOhos::JsState &) {
320 return reinterpret_cast<WId>(m_jsStateData->embeddedWindow->qtWindowId());
321 });
322}
323
324void QNativeNode::setParent(std::shared_ptr<QXComponentNode> xComponent)
325{
327 m_jsStateData->embeddedWindow->setParentOrReparent(
328 QArkUi::QEmbeddedWindowNode::ParentDescriptor(xComponent));
329 });
330}
331
333{
335 m_jsStateData->embeddedWindow->setParentOrReparent(
336 QArkUi::QEmbeddedWindowNode::ParentDescriptor(*other.m_jsStateData->embeddedWindow));
337 });
338}
339
341{
343 auto &window = *m_jsStateData->embeddedWindow;
344 window.setZIndex(window.zIndex() + 1);
345 });
346}
347
349{
351 auto &window = *m_jsStateData->embeddedWindow;
352 window.setZIndex(qMax(window.zIndex() - 1, QArkUi::QEmbeddedWindowNode::minimumNodeZIndexValue));
353 });
354}
355
357{
359 auto &window = *m_jsStateData->embeddedWindow;
360 window.detachFromParentIfPresent();
361 });
362}
363
364void QNativeNode::setFocused(bool focused)
365{
367 m_jsStateData->embeddedWindow->setFocused(focused);
368 });
369}
370
371void QNativeNode::setFocusable(bool focusable)
372{
374 m_jsStateData->embeddedWindow->setFocusable(focusable);
375 });
376}
377
378void QNativeNode::setBackgroundColor(const QColor &color)
379{
381 m_jsStateData->embeddedWindow->setBackgroundColor(color);
382 });
383}
384
385void QNativeNode::setBrightness(int brightness)
386{
388 [&](QtOhos::JsState &) {
389 m_jsStateData->embeddedWindow->setBrightness(brightness);
390 });
391}
392
393void QNativeNode::setContrast(int contrast)
394{
396 [&](QtOhos::JsState &) {
397 m_jsStateData->embeddedWindow->setContrast(contrast);
398 });
399}
400
401void QNativeNode::setSaturation(int saturation)
402{
404 [&](QtOhos::JsState &) {
405 m_jsStateData->embeddedWindow->setSaturation(saturation);
406 });
407}
408
410 const std::vector<QImage> &images, const QPointF &hotspot,
411 const QMimeData &mimeData, QOhosConsumer<Qt::DropAction> dropActionConsumer)
412{
413 auto udmfDataFactory = makeUdmfDataFactoryFromQMimeData(mimeData, {});
414
416 [&](QtOhos::JsState &) {
417 qOhosPrintfDebug("%s: starting drag", Q_FUNC_INFO);
418
419 std::vector<std::shared_ptr<::OH_PixelmapNative>> pixelMaps;
420 std::transform(
421 images.begin(), images.end(), std::back_inserter(pixelMaps),
422 &createNativePixelMapFromQImage);
423
424 struct DragContext
425 {
426 QOhosConsumer<Qt::DropAction> dropActionConsumer;
427 std::shared_ptr<void> startedDragHandle;
428 };
429 auto context = std::make_shared<DragContext>();
430 context->dropActionConsumer = std::move(dropActionConsumer);
431
432 auto startedDragHandle = m_jsStateData->embeddedWindow->startDrag(
433 std::move(pixelMaps), hotspot,
434 udmfDataFactory(),
435 [context](::ArkUI_DragAndDropInfo *dragAndDropInfo) mutable {
436 auto dragStatus = QArkUi::callArkUi(
437 Q_OHOS_NAMED_FUNC(::OH_ArkUI_DragAndDropInfo_GetDragStatus),
438 dragAndDropInfo);
439 qOhosPrintfDebug("%s: drag status: %d", Q_FUNC_INFO, static_cast<int>(dragStatus));
440
441 if (dragStatus == ::ARKUI_DRAG_STATUS_ENDED && context) {
442 auto *dragEvent = QArkUi::callArkUiOrFailOnNullResult(
443 Q_OHOS_NAMED_FUNC(::OH_ArkUI_DragAndDropInfo_GetDragEvent),
444 dragAndDropInfo);
445
446 ::ArkUI_DragResult dragResult = ::ARKUI_DRAG_RESULT_FAILED;
447 QArkUi::callArkUiOrFailOnErrorResult(
448 Q_OHOS_NAMED_FUNC(::OH_ArkUI_DragEvent_GetDragResult),
449 dragEvent, &dragResult);
450
451 auto qtDropAction =
452 dragResult == ::ARKUI_DRAG_RESULT_SUCCESSFUL
453 ? mapQOhosArkUiDropOperationToQt(
454 getQOhosDragEventDropOperation(dragEvent))
455 : Qt::IgnoreAction;
456
457 qOhosPrintfDebug(
458 "%s: sending drag-end notification: %d / %d",
459 Q_FUNC_INFO, static_cast<int>(dragResult), static_cast<int>(qtDropAction));
460 QtOhos::invokeInQtThread(
461 [dropActionConsumer = std::move(context->dropActionConsumer), qtDropAction]() {
462 dropActionConsumer(qtDropAction);
463 });
464 context.reset();
465 }
466 });
467 context->startedDragHandle = startedDragHandle;
468 });
469}
470
471void QNativeNode::addForeignWindowChild(QOhosForeignWindow *foreignWindow)
472{
474 auto &child = foreignWindow->embeddedWindowNodeInJsThread();
475 auto parentDescriptor = QArkUi::QEmbeddedWindowNode::ParentDescriptor(*m_jsStateData->embeddedWindow);
476 child.setParentOrReparent(parentDescriptor);
477 });
478}
479
480void QNativeNode::setTransparentForInput(bool transparentForInput)
481{
483 m_jsStateData->embeddedWindow->setHitTestMode(
484 transparentForInput
485 ? ::ARKUI_HIT_TEST_MODE_NONE
486 : ::ARKUI_HIT_TEST_MODE_DEFAULT);
487 });
488}
489
490void QNativeNode::setNodeAreaChangeHandler(QOhosConsumer<QArkUi::QQtEmbeddedWindowNode::AreaChangeEvent> areaChangeEventConsumer)
491{
492 auto selfRef = QtOhos::makeQThreadSafeRef(this);
494 m_jsStateData->embeddedWindow->setAreaChangeReceiver(
495 QtOhos::makeCompressingAsyncConsumer(
496 std::move(areaChangeEventConsumer),
497 [selfRef](auto task) {
498 selfRef.visitInQtThreadIfAlive([task = std::move(task)](QNativeNode &) {
499 task();
500 });
501 }));
502 });
503}
504
505void QNativeNode::setNodeFocusChangeHandler(QOhosConsumer<bool> focusedChangedConsumer)
506{
507 auto selfRef = QtOhos::makeQThreadSafeRef(this);
508 auto sharedConsumer = QtOhos::moveToSharedPtr(std::move(focusedChangedConsumer));
510 m_jsStateData->embeddedWindow->setFocusedChangeReceiver(
511 [selfRef, sharedConsumer = std::move(sharedConsumer)](bool focused) {
512 selfRef.visitInQtThreadIfAlive([focused, sharedConsumer](QNativeNode &) {
513 (*sharedConsumer)(focused);
514 });
515 });
516 });
517}
518
519void QNativeNode::setNodeVisibilityChangeHandler(QOhosConsumer<bool> visibilityChangedConsumer)
520{
521 auto selfRef = QtOhos::makeQThreadSafeRef(this);
522 auto sharedConsumer = QtOhos::moveToSharedPtr(std::move(visibilityChangedConsumer));
524 m_jsStateData->embeddedWindow->setVisibilityChangeReceiver(
525 [selfRef, sharedConsumer = std::move(sharedConsumer)](bool visibile) {
526 selfRef.visitInQtThreadIfAlive([visibile, sharedConsumer](QNativeNode &) {
527 (*sharedConsumer)(visibile);
528 });
529 });
530 });
531}
532
534{
535 return QtOhos::evalInJsThread(
536 [&](QtOhos::JsState &) {
537 return m_jsStateData->embeddedWindow->nodeScreenGeometryPixels();
538 });
539}
540
542{
543 return QtOhos::evalInJsThread(
544 [&](QtOhos::JsState &) {
545 return QRect(
546 m_jsStateData->embeddedWindow->parentRelativeOffsetPixels(),
547 m_jsStateData->embeddedWindow->nodeScreenGeometryPixels().size());
548 });
549}
550
551QT_END_NAMESPACE
void setParentOrReparent(ParentDescriptor parent)
static const std::int32_t minimumNodeZIndexValue
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 startDrag(const std::vector< QImage > &images, const QPointF &hotspot, const QMimeData &mimeData, QOhosConsumer< Qt::DropAction > dropActionConsumer)
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 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 QOhosPlatformIntegration * instance()
QOhosInputMethodEventHandler * inputMethodEventHandler() const
void onHoverEvent(bool isHover) override
void onInputEvent(InputEventType inputEventType, ::OHNativeWindow *window) override
CallbackReceiver(QXComponentRender xComponent, QtOhos::QThreadSafeRef< QWindow > windowRef, QtOhos::QThreadSafeRef< QOhosInputMethodEventHandler > imEventHandlerRef, std::function< void(SurfaceEventType, ::OHNativeWindow *, QOhosOptional< QSize >)> surfaceEventHandler)
void onSurfaceEvent(SurfaceEventType surfaceEventType, ::OHNativeWindow *nativeWindow) override
QArkUi::QXComponentCallbackReceiver::InputEventType InputEventType
QOhosOptional<::ArkUI_RenderFit > tryMapRenderFitPolicyToArkUi(QOhosPlatformWindow::NativeNodeRenderFitPolicy renderFitPolicy)
bool getHoveredStateFromHoverEvent(::ArkUI_UIInputEvent *uiInputEvent)
QArkUi::QXComponentCallbackReceiver::SurfaceEventType SurfaceEventType
bool isNativeNodeApiMouseEventsEnabled()
void runInJsThreadAndWait(const std::function< void(JsState &)> &task)
QOhosOptional< void > makeEmptyQOhosOptional()
QXComponent< QXComponentType::Render > QXComponentRender
Definition qxcomponent.h:43
QXComponent< QXComponentType::Node > QXComponentNode
Definition qxcomponent.h:44