Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/source/scriptinterface/ScriptInterface.h
Show First 20 Lines • Show All 128 Lines • ▼ Show 20 Lines | public: | ||||
* @param argv Constructor arguments | * @param argv Constructor arguments | ||||
* @param out The new object; On error an error message gets logged and out is Null (out.isNull() == true). | * @param out The new object; On error an error message gets logged and out is Null (out.isNull() == true). | ||||
*/ | */ | ||||
void CallConstructor(JS::HandleValue ctor, JS::HandleValueArray argv, JS::MutableHandleValue out) const; | void CallConstructor(JS::HandleValue ctor, JS::HandleValueArray argv, JS::MutableHandleValue out) const; | ||||
JSObject* CreateCustomObject(const std::string & typeName) const; | JSObject* CreateCustomObject(const std::string & typeName) const; | ||||
void DefineCustomObjectType(JSClass *clasp, JSNative constructor, uint minArgs, JSPropertySpec *ps, JSFunctionSpec *fs, JSPropertySpec *static_ps, JSFunctionSpec *static_fs); | void DefineCustomObjectType(JSClass *clasp, JSNative constructor, uint minArgs, JSPropertySpec *ps, JSFunctionSpec *fs, JSPropertySpec *static_ps, JSFunctionSpec *static_fs); | ||||
JS::Value GetGlobalObject(); | JS::Value GetGlobalObject() const; | ||||
JSClass* GetGlobalClass(); | |||||
/** | /** | ||||
* Set the named property on the global object. | * Set the named property on the global object. | ||||
* If @p replace is true, an existing property will be overwritten; otherwise attempts | * If @p replace is true, an existing property will be overwritten; otherwise attempts | ||||
* to set an already-defined value will fail. | * to set an already-defined value will fail. | ||||
*/ | */ | ||||
template<typename T> | template<typename T> | ||||
bool SetGlobal(const char* name, const T& value, bool replace = false); | bool SetGlobal(const char* name, const T& value, bool replace = false); | ||||
▲ Show 20 Lines • Show All 420 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator