1 | // Copyright (C) 2016 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 | #ifndef QV4GLOBALOBJECT_H |
4 | #define QV4GLOBALOBJECT_H |
5 | |
6 | // |
7 | // W A R N I N G |
8 | // ------------- |
9 | // |
10 | // This file is not part of the Qt API. It exists purely as an |
11 | // implementation detail. This header file may change from version to |
12 | // version without notice, or even be removed. |
13 | // |
14 | // We mean it. |
15 | // |
16 | |
17 | #include <QtQml/private/qqmlglobal_p.h> |
18 | #include "qv4functionobject_p.h" |
19 | |
20 | QT_BEGIN_NAMESPACE |
21 | |
22 | namespace QV4 { |
23 | |
24 | namespace Heap { |
25 | |
26 | struct EvalFunction : FunctionObject { |
27 | void init(QV4::ExecutionContext *scope); |
28 | }; |
29 | |
30 | } |
31 | |
32 | struct Q_QML_EXPORT EvalFunction : FunctionObject |
33 | { |
34 | V4_OBJECT2(EvalFunction, FunctionObject) |
35 | |
36 | ReturnedValue evalCall(const Value *thisObject, const Value *argv, int argc, bool directCall) const; |
37 | |
38 | static ReturnedValue virtualCall(const FunctionObject *f, const Value *thisObject, const Value *argv, int argc); |
39 | }; |
40 | |
41 | struct GlobalFunctions |
42 | { |
43 | static ReturnedValue method_parseInt(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); |
44 | static ReturnedValue method_parseFloat(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); |
45 | static ReturnedValue method_isNaN(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); |
46 | static ReturnedValue method_isFinite(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); |
47 | static ReturnedValue method_decodeURI(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); |
48 | static ReturnedValue method_decodeURIComponent(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); |
49 | static ReturnedValue method_encodeURI(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); |
50 | static ReturnedValue method_encodeURIComponent(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); |
51 | static ReturnedValue method_escape(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); |
52 | static ReturnedValue method_unescape(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); |
53 | }; |
54 | |
55 | } |
56 | |
57 | QT_END_NAMESPACE |
58 | |
59 | #endif // QMLJS_OBJECTS_H |
60 | |