2020-11-18 06:39:04 -08:00
|
|
|
/* Copyright (C) 2020 Wildfire Games.
|
2009-04-18 10:00:33 -07:00
|
|
|
* This file is part of 0 A.D.
|
|
|
|
|
*
|
|
|
|
|
* 0 A.D. is free software: you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
|
* the Free Software Foundation, either version 2 of the License, or
|
|
|
|
|
* (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* 0 A.D. is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
|
* along with 0 A.D. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
*/
|
|
|
|
|
|
2007-05-07 09:33:24 -07:00
|
|
|
#ifndef INCLUDED_JSI_IGUIOBJECT
|
|
|
|
|
#define INCLUDED_JSI_IGUIOBJECT
|
2004-07-08 08:23:47 -07:00
|
|
|
|
2018-04-27 09:48:44 -07:00
|
|
|
#include "scriptinterface/ScriptInterface.h"
|
|
|
|
|
|
2004-07-08 08:23:47 -07:00
|
|
|
namespace JSI_IGUIObject
|
|
|
|
|
{
|
|
|
|
|
extern JSClass JSI_class;
|
2020-11-18 06:39:04 -08:00
|
|
|
extern JSClassOps JSI_classops;
|
2004-07-08 08:23:47 -07:00
|
|
|
extern JSFunctionSpec JSI_methods[];
|
2019-09-30 01:19:56 -07:00
|
|
|
|
|
|
|
|
void RegisterScriptClass(ScriptInterface& scriptInterface);
|
|
|
|
|
|
2015-01-24 06:46:52 -08:00
|
|
|
bool getProperty(JSContext* cx, JS::HandleObject obj, JS::HandleId id, JS::MutableHandleValue vp);
|
Upgrade SpiderMonkey to version 45.0.2, refs #4893.
- Various build changes, in particular NSPR is not needed on Unix
anymore
- Add js/Initialization.h to source/scriptinterface/ScriptEngine.h
- Use nullptr instead of JS::NullPtr(), see
https://bugzilla.mozilla.org/show_bug.cgi?id=1164602
- Remove `JS::RuntimeOptionsRef.varObjFix`, see
https://bugzilla.mozilla.org/show_bug.cgi?id=1171177
- Remove uses of `AutoIdArray`, see
https://bugzilla.mozilla.org/show_bug.cgi?id=1191529
- `JS_InternUCStringN` has been renamed, see
https://bugzilla.mozilla.org/show_bug.cgi?id=1178581
- `JS::Evaluate` now takes scope chains explicitly, see
https://bugzilla.mozilla.org/show_bug.cgi?id=1097987
- Array functions (such as `JS_IsArrayObject`) are fallible and output
to params, see https://bugzilla.mozilla.org/show_bug.cgi?id=f3d35d8
- Remove `JSCLASS_CACHED_PROTO_WIDTH` workaround in our code, see
https://bugzilla.mozilla.org/show_bug.cgi?id=1236373
- Remove compile'n go (`setCompileAndGo`) and replace it by
`setIsRunOnce` which will become the default in the future, see
https://bugzilla.mozilla.org/show_bug.cgi?id=679939
- Mark shared memory in direct access operations
(`JS_GetUint16ArrayData` and `JS_GetUint8ArrayData`), see
https://bugzilla.mozilla.org/show_bug.cgi?id=1176214
- Use new `JS::ObjectOpResult`, see
https://bugzilla.mozilla.org/show_bug.cgi?id=1113369
Thanks to wraitii, elexis, Krinkle and historic_bruno for contributions
and comments, and to gentz, madpilot, s0600204 and Stan for testing and
indirect contributions.
Differential Revision: https://code.wildfiregames.com/D1510
This was SVN commit r22627.
2019-08-07 15:37:43 -07:00
|
|
|
bool setProperty(JSContext* cx, JS::HandleObject obj, JS::HandleId id, JS::MutableHandleValue vp, JS::ObjectOpResult& result);
|
2019-10-28 04:35:04 -07:00
|
|
|
bool deleteProperty(JSContext* cx, JS::HandleObject obj, JS::HandleId id, JS::ObjectOpResult& result);
|
2017-08-28 03:27:36 -07:00
|
|
|
bool toString(JSContext* cx, uint argc, JS::Value* vp);
|
|
|
|
|
bool focus(JSContext* cx, uint argc, JS::Value* vp);
|
|
|
|
|
bool blur(JSContext* cx, uint argc, JS::Value* vp);
|
|
|
|
|
bool getComputedSize(JSContext* cx, uint argc, JS::Value* vp);
|
2019-03-18 15:15:40 -07:00
|
|
|
bool getTextSize(JSContext* cx, uint argc, JS::Value* vp);
|
2004-07-08 08:23:47 -07:00
|
|
|
}
|
|
|
|
|
|
2018-04-27 09:48:44 -07:00
|
|
|
#endif // INCLUDED_JSI_IGUIOBJECT
|