mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-26 13:08:15 +00:00
Rename JSInterface_GUITypes to JSInterface_GUISize, refs 8734efca94, 9be8a560a9.
Rename init to RegisterScriptClass. Differential Revision: https://code.wildfiregames.com/D2339 Tested on: clang 8.0.1., Jenkins/vs2015 This was SVN commit r23018.
This commit is contained in:
@@ -20,13 +20,8 @@
|
||||
#include "JSInterface_IGUIObject.h"
|
||||
|
||||
#include "gui/CGUI.h"
|
||||
#include "gui/CGUIColor.h"
|
||||
#include "gui/CGUISetting.h"
|
||||
#include "gui/CList.h"
|
||||
#include "gui/GUIManager.h"
|
||||
#include "gui/IGUIObject.h"
|
||||
#include "gui/IGUIScrollBar.h"
|
||||
#include "gui/scripting/JSInterface_GUITypes.h"
|
||||
#include "scriptinterface/ScriptExtraHeaders.h"
|
||||
#include "scriptinterface/ScriptInterface.h"
|
||||
|
||||
@@ -47,6 +42,11 @@ JSFunctionSpec JSI_IGUIObject::JSI_methods[] =
|
||||
JS_FS_END
|
||||
};
|
||||
|
||||
void JSI_IGUIObject::RegisterScriptClass(ScriptInterface& scriptInterface)
|
||||
{
|
||||
scriptInterface.DefineCustomObjectType(&JSI_class, nullptr, 0, nullptr, JSI_methods, nullptr, nullptr);
|
||||
}
|
||||
|
||||
bool JSI_IGUIObject::getProperty(JSContext* cx, JS::HandleObject obj, JS::HandleId id, JS::MutableHandleValue vp)
|
||||
{
|
||||
JSAutoRequest rq(cx);
|
||||
@@ -174,11 +174,6 @@ bool JSI_IGUIObject::setProperty(JSContext* cx, JS::HandleObject obj, JS::Handle
|
||||
return result.fail(JSMSG_UNDEFINED_PROP);
|
||||
}
|
||||
|
||||
void JSI_IGUIObject::init(ScriptInterface& scriptInterface)
|
||||
{
|
||||
scriptInterface.DefineCustomObjectType(&JSI_class, nullptr, 1, nullptr, JSI_methods, nullptr, nullptr);
|
||||
}
|
||||
|
||||
bool JSI_IGUIObject::toString(JSContext* cx, uint argc, JS::Value* vp)
|
||||
{
|
||||
// No JSAutoRequest needed for these calls
|
||||
|
||||
Reference in New Issue
Block a user