Gnash
0.8.10
|
The core Gnash libraries support a flexible way of interacting with hosting applications. This is necessary for ActionScript execution, as well as for user notifications.
1. The hosting application may ignore any message without dangerous side effects.
2. A set of expected messages exist, which should be supported for proper ActionScript compatibility.
3. Users must return the exact type expected (see KnownEvent), as no implicit conversion is used. This means, for instance, that where a std::string is expected, a const char* may not be used.
4. There is the possibility to add custom messages for use in ActionScript extensions.
The rationale for the current design is that hosting applications should be able to support as many of the expected messages types as they choose using a single interface: gnash::HostInterface::call(). This should support various types of argument and various types of return, so that the different
The drawback of this flexibility is that there is no compile-time check for the correct use of the interface. Within the core libraries, this host interface is accessed only through gnash::movie_root::callInterface(), ensuring that any mistakes in the hosting application are handled safely and logged.