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
qharmonyjscontext.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 QHARMONYJSCONTEXT_H
5#define QHARMONYJSCONTEXT_H
6
7#include <QtCore/qglobal.h>
8
9#if defined(Q_QDOC) || defined(Q_OS_HARMONY)
10
11#include <napi/native_api.h>
12#include <string>
13
14QT_BEGIN_NAMESPACE
15
16class Q_CORE_EXPORT QHarmonyJsContext
17{
18public:
19 static QHarmonyJsContext &fromEnv(napi_env env);
20
21 napi_env env();
22 napi_value tryImportModule(const std::string &moduleName);
23
24protected:
25 QHarmonyJsContext();
26 ~QHarmonyJsContext();
27
28private:
29 Q_DISABLE_COPY_MOVE(QHarmonyJsContext)
30};
31
32QT_END_NAMESPACE
33
34#endif // Q_QDOC || Q_OS_HARMONY
35
36#endif // QHARMONYJSCONTEXT_H