0ad/source/scriptinterface
wraitii fc60d80af1 Simplify GUI Proxy implementation & customisation.
This finishes 7c04ea0211 and 1b67a079fb.
GUI Proxy objects are now easier to specialize, code duplication is
reduced, code is made safer.
In details:
- the proxy private is always the IGUIObject* pointer
- the private data is accessed through a safer wrapper
- CreateJSObject returns an opaque type to allow easier extension &
prevent errors.
- The implementation of CreateJSObject is moved near the GUI Proxy
template instantiation, and both are wrapped in a convenient macro (this
makes it so that if you use the macro, you can't forget to overload the
method, and vice-versa).
- The common IGUIObject JS interface no longer needs to be repeated.
- All specialisations are again put in the same file, for improved
compile-time & clarity, given there are so few lines now.
- While at it, implement toSource which makes it possible to `uneval`
components (does the same as toString though).


Differential Revision: https://code.wildfiregames.com/D3826
This was SVN commit r25225.
2021-04-09 18:01:47 +00:00
..
tests Make real directory paths on the VFS predictable (retry) 2021-03-23 12:46:59 +00:00
FunctionWrapper.h Simplify GUI Proxy implementation & customisation. 2021-04-09 18:01:47 +00:00
NativeWrapperDecls.h Refactor all usage of RegisterFunction to ScriptFunction::Register 2021-03-02 20:01:14 +00:00
NativeWrapperDefns.h Replace DISCARD macro with ignore_result template. 2020-12-15 09:03:44 +00:00
ScriptContext.cpp Refactors smart pointers creation, reduces code duplication and improves exception safety. 2021-02-13 23:53:40 +00:00
ScriptContext.h Removes unused containers included in headers. 2021-03-03 23:01:08 +00:00
ScriptConversions.cpp Replaces CPos by more a consistent CVector2D, reduces geometry code duplication. 2021-03-28 21:55:13 +00:00
ScriptConversions.h [SM78 2/2] Update to Spidermonkey 78 APIs 2020-12-06 14:03:02 +00:00
ScriptEngine.h Address concerns in 5473393e30 (RL interface) 2021-01-15 16:30:05 +00:00
ScriptExceptions.cpp [SM78 2/2] Update to Spidermonkey 78 APIs 2020-12-06 14:03:02 +00:00
ScriptExceptions.h [SM52 2/2] Update to Spidermonkey 52 APIs. 2020-11-18 14:39:04 +00:00
ScriptExtraHeaders.h [SM78 2/2] Update to Spidermonkey 78 APIs 2020-12-06 14:03:02 +00:00
ScriptForward.h [SM68 2/2] Update to Spidermonkey 68 APIs 2020-11-30 09:03:20 +00:00
ScriptInterface.cpp Cleanups includes for cassert and streams. 2021-03-03 22:26:49 +00:00
ScriptInterface.h Refactor all usage of RegisterFunction to ScriptFunction::Register 2021-03-02 20:01:14 +00:00
ScriptStats.cpp [SM78 2/2] Update to Spidermonkey 78 APIs 2020-12-06 14:03:02 +00:00
ScriptStats.h Further header & precompiled cleanup, fix no-PCH builds. 2020-12-09 14:39:14 +00:00
ScriptTypes.h [SM78 1/2] Upgrade Spidermonkey build system and binaries to 78.6.0 2020-12-06 14:00:57 +00:00