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
qharmonyappjscontext.h
Go to the documentation of this file.
1// Copyright (C) 2026 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 QHARMONYAPPJSCONTEXT_H
5#define QHARMONYAPPJSCONTEXT_H
6
7#include <QtCore/qharmonyjscontext.h>
8
9#if defined(Q_QDOC) || defined(Q_OS_HARMONY)
10
11#include <memory>
12
13QT_BEGIN_NAMESPACE
14
15class Q_CORE_EXPORT QHarmonyAppJsContext : public QHarmonyJsContext
16{
17public:
18 static QHarmonyAppJsContext &fromEnv(napi_env env);
19 static QHarmonyAppJsContext &fromJsContext(QHarmonyJsContext &jsContext);
20
21 napi_value defaultAbility();
22 napi_value launchParam(napi_value abilityValue);
23
24 [[nodiscard]] std::shared_ptr<void> addUiAbilityDelegate(napi_value delegateValue);
25
26private:
27 QHarmonyAppJsContext();
28 ~QHarmonyAppJsContext();
29};
30
31QT_END_NAMESPACE
32
33#endif // Q_QDOC || Q_OS_HARMONY
34
35#endif // QHARMONYAPPJSCONTEXT_H
std::shared_ptr< void > tryRegisterUiAbilityDelegate(QNapi::Object delegate)