0ad/source
wraitii 7c04ea0211 Make JS GUI Objects Proxy objects.
The JS-side counterparts of C++ objects are now Proxy objects, in
anticipation of SM60 changes that remove the get/set hooks entirely.
This makes semantic sense too as they are essentially phantom wrappers
around the C++ objects, with no proper JS representation.

By using different proxy handlers for different GUI object types, we can
further fix issues encountered in D2136 by defining the relevant
functions only on objects that should have them.

The main complexity with proxy handlers is that Spidermonkey assumes in
several places that they are static and data-less, so they cannot be
used directly to hold data. This diff works around that issue by storing
per-script-interface data in the CGui directly.

Further API changes in SM60 make this slightly cleaner.

Comments by: Itms
Refs #5859

Differential Revision: https://code.wildfiregames.com/D2768
This was SVN commit r24229.
2020-11-21 17:49:06 +00:00
..
collada Fix compiler warnings on VS 2015, refs #3439, refs #5069. 2018-03-10 09:58:53 +00:00
graphics Clean up header includes, add new forward declarations. 2020-11-21 11:20:29 +00:00
gui Make JS GUI Objects Proxy objects. 2020-11-21 17:49:06 +00:00
i18n Mass rename CxPrivate to CmptPrivate. 2020-11-13 16:44:15 +00:00
lib Clean up header includes, add new forward declarations. 2020-11-21 11:20:29 +00:00
lobby [SM52 2/2] Update to Spidermonkey 52 APIs. 2020-11-18 14:39:04 +00:00
maths Clean up header includes, add new forward declarations. 2020-11-21 11:20:29 +00:00
mocks More FreeBSD build fixes. 2012-01-30 06:21:11 +00:00
network Clean up header includes, add new forward declarations. 2020-11-21 11:20:29 +00:00
pch Precompiled logic update [Windows build] 2019-12-31 13:58:48 +00:00
ps Allow registering hooks that trigger on config changes. 2020-11-21 11:57:14 +00:00
renderer Allow registering hooks that trigger on config changes. 2020-11-21 11:57:14 +00:00
rlinterface Improve JS Exception handling. 2020-11-15 18:29:17 +00:00
scriptinterface Make JS GUI Objects Proxy objects. 2020-11-21 17:49:06 +00:00
simulation2 Clean up header includes, add new forward declarations. 2020-11-21 11:20:29 +00:00
soundmanager Mass rename CxPrivate to CmptPrivate. 2020-11-13 16:44:15 +00:00
third_party Fix gcc warning reported by Imarok after 204e17206b 2020-05-23 12:21:49 +00:00
tools Clean up header includes, add new forward declarations. 2020-11-21 11:20:29 +00:00
main.cpp Improve JS Exception handling. 2020-11-15 18:29:17 +00:00
test_setup.cpp Fix building without precompiled headers. 2020-11-18 11:35:36 +00:00