Oolite 1.91.0.7644-241112-7f5034b
Loading...
Searching...
No Matches
OOJSManifest.h File Reference
import <Foundation/Foundation.h>
#include <jsapi.h>
+ Include dependency graph for OOJSManifest.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void InitOOJSManifest (JSContext *context, JSObject *global)
 

Function Documentation

◆ InitOOJSManifest()

void InitOOJSManifest ( JSContext * context,
JSObject * global )

Definition at line 129 of file OOJSManifest.m.

130{
131 sManifestPrototype = JS_InitClass(context, global, NULL, &sManifestClass, OOJSUnconstructableConstruct, 0, sManifestProperties, sManifestMethods, NULL, NULL);
133
134 // Create manifest object as a property of the player.ship object.
135 sManifestObject = JS_DefineObject(context, JSPlayerShipObject(), "manifest", &sManifestClass, sManifestPrototype, OOJS_PROP_READONLY);
136 JS_SetPrivate(context, sManifestObject, NULL);
137
138 // Also define manifest object as a property of the global object.
139 // Wait, what? Why? Oh well, too late now. Deprecate for EMMSTRAN? -- Ahruman 2011-02-10
140 JS_DefineObject(context, global, "manifest", &sManifestClass, sManifestPrototype, OOJS_PROP_READONLY);
141
142}
static JSObject * sManifestPrototype
static JSFunctionSpec sManifestMethods[]
static JSObject * sManifestObject
static JSClass sManifestClass
static JSPropertySpec sManifestProperties[]
JSObject * JSPlayerShipObject(void)
void OOJSRegisterObjectConverter(JSClass *theClass, OOJSClassConverterCallback converter)
JSBool OOJSUnconstructableConstruct(JSContext *context, uintN argc, jsval *vp)
#define OOJS_PROP_READONLY
id OOJSBasicPrivateObjectConverter(JSContext *context, JSObject *object)

References JSPlayerShipObject(), OOJS_PROP_READONLY, OOJSBasicPrivateObjectConverter(), OOJSRegisterObjectConverter(), OOJSUnconstructableConstruct(), sManifestClass, sManifestMethods, sManifestObject, sManifestProperties, and sManifestPrototype.

+ Here is the call graph for this function: