michael@0: /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- michael@0: * vim: set ts=8 sts=4 et sw=4 tw=99: michael@0: * This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: // This file contains public type declarations that are used *frequently*. If michael@0: // it doesn't occur at least 10 times in Gecko, it probably shouldn't be in michael@0: // here. michael@0: // michael@0: // It includes only: michael@0: // - forward declarations of structs and classes; michael@0: // - typedefs; michael@0: // - enums (maybe). michael@0: // It does *not* contain any struct or class definitions. michael@0: michael@0: #ifndef js_TypeDecls_h michael@0: #define js_TypeDecls_h michael@0: michael@0: #include michael@0: #include michael@0: michael@0: #include "js-config.h" michael@0: michael@0: struct JSContext; michael@0: class JSFunction; michael@0: class JSObject; michael@0: class JSScript; michael@0: class JSString; michael@0: michael@0: struct jsid; michael@0: michael@0: typedef char16_t jschar; michael@0: michael@0: namespace JS { michael@0: michael@0: class Value; michael@0: template class Handle; michael@0: template class MutableHandle; michael@0: template class Rooted; michael@0: template class PersistentRooted; michael@0: michael@0: typedef Handle HandleFunction; michael@0: typedef Handle HandleId; michael@0: typedef Handle HandleObject; michael@0: typedef Handle HandleScript; michael@0: typedef Handle HandleString; michael@0: typedef Handle HandleValue; michael@0: michael@0: typedef MutableHandle MutableHandleFunction; michael@0: typedef MutableHandle MutableHandleId; michael@0: typedef MutableHandle MutableHandleObject; michael@0: typedef MutableHandle MutableHandleScript; michael@0: typedef MutableHandle MutableHandleString; michael@0: typedef MutableHandle MutableHandleValue; michael@0: michael@0: typedef Rooted RootedObject; michael@0: typedef Rooted RootedFunction; michael@0: typedef Rooted RootedScript; michael@0: typedef Rooted RootedString; michael@0: typedef Rooted RootedId; michael@0: typedef Rooted RootedValue; michael@0: michael@0: typedef PersistentRooted PersistentRootedFunction; michael@0: typedef PersistentRooted PersistentRootedId; michael@0: typedef PersistentRooted PersistentRootedObject; michael@0: typedef PersistentRooted PersistentRootedScript; michael@0: typedef PersistentRooted PersistentRootedString; michael@0: typedef PersistentRooted PersistentRootedValue; michael@0: michael@0: } // namespace JS michael@0: michael@0: #endif /* js_TypeDecls_h */