Bug 1691708 [wpt PR 27546] - Add perspective setter for CanvasRenderingContext2D...
[gecko.git] / js / src / NamespaceImports.h
blob5c43fab930242e1107b71d269ae59b90e9e351f2
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 * vim: set ts=8 sts=2 et sw=2 tw=80:
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 // This file imports some common JS:: names into the js namespace so we can
8 // make unqualified references to them.
10 #ifndef NamespaceImports_h
11 #define NamespaceImports_h
13 // These includes are needed these for some typedefs (e.g. HandleValue) and
14 // functions (e.g. NullValue())...
15 #include "js/CallNonGenericMethod.h"
16 #include "js/GCHashTable.h"
17 #include "js/GCVector.h"
18 #include "js/TypeDecls.h"
19 #include "js/Value.h"
21 // ... but we do forward declarations of the structs and classes not pulled in
22 // by the headers included above.
23 namespace JS {
25 using ValueVector = JS::GCVector<JS::Value>;
26 using IdVector = JS::GCVector<jsid>;
27 using ScriptVector = JS::GCVector<JSScript*>;
29 class HandleValueArray;
31 class ObjectOpResult;
32 class PropertyResult;
34 struct JS_PUBLIC_API PropertyDescriptor;
36 } // namespace JS
38 // Do the importing.
39 namespace js {
41 using JS::BooleanValue;
42 using JS::DoubleValue;
43 using JS::Float32Value;
44 using JS::Int32Value;
45 using JS::MagicValue;
46 using JS::NullValue;
47 using JS::NumberValue;
48 using JS::ObjectOrNullValue;
49 using JS::ObjectValue;
50 using JS::PrivateGCThingValue;
51 using JS::PrivateUint32Value;
52 using JS::PrivateValue;
53 using JS::StringValue;
54 using JS::UndefinedValue;
55 using JS::Value;
56 using JS::ValueType;
58 using JS::Latin1Char;
59 using JS::UniqueChars;
60 using JS::UniqueLatin1Chars;
61 using JS::UniqueTwoByteChars;
63 using JS::Ok;
64 using JS::OOM;
65 using JS::Result;
67 using JS::HandleIdVector;
68 using JS::HandleObjectVector;
69 using JS::HandleValueVector;
70 using JS::MutableHandleIdVector;
71 using JS::MutableHandleObjectVector;
72 using JS::MutableHandleValueVector;
73 using JS::RootedIdVector;
74 using JS::RootedObjectVector;
75 using JS::RootedValueVector;
77 using JS::IdVector;
78 using JS::ScriptVector;
79 using JS::ValueVector;
81 using JS::GCHashMap;
82 using JS::GCHashSet;
83 using JS::GCVector;
85 using JS::CallArgs;
86 using JS::CallNonGenericMethod;
87 using JS::IsAcceptableThis;
88 using JS::NativeImpl;
90 using JS::Rooted;
91 using JS::RootedBigInt;
92 using JS::RootedFunction;
93 using JS::RootedId;
94 using JS::RootedObject;
95 using JS::RootedScript;
96 using JS::RootedString;
97 using JS::RootedSymbol;
98 using JS::RootedValue;
100 using JS::PersistentRooted;
101 using JS::PersistentRootedBigInt;
102 using JS::PersistentRootedFunction;
103 using JS::PersistentRootedId;
104 using JS::PersistentRootedObject;
105 using JS::PersistentRootedScript;
106 using JS::PersistentRootedString;
107 using JS::PersistentRootedSymbol;
108 using JS::PersistentRootedValue;
110 using JS::Handle;
111 using JS::HandleBigInt;
112 using JS::HandleFunction;
113 using JS::HandleId;
114 using JS::HandleObject;
115 using JS::HandleScript;
116 using JS::HandleString;
117 using JS::HandleSymbol;
118 using JS::HandleValue;
120 using JS::MutableHandle;
121 using JS::MutableHandleBigInt;
122 using JS::MutableHandleFunction;
123 using JS::MutableHandleId;
124 using JS::MutableHandleObject;
125 using JS::MutableHandleScript;
126 using JS::MutableHandleString;
127 using JS::MutableHandleSymbol;
128 using JS::MutableHandleValue;
130 using JS::FalseHandleValue;
131 using JS::NullHandleValue;
132 using JS::TrueHandleValue;
133 using JS::UndefinedHandleValue;
135 using JS::HandleValueArray;
137 using JS::ObjectOpResult;
138 using JS::PropertyResult;
140 using JS::PropertyDescriptor;
142 using JS::Compartment;
143 using JS::Realm;
144 using JS::Zone;
146 using JS::BigInt;
148 } /* namespace js */
150 #endif /* NamespaceImports_h */