#include <EmmaInstance.h>
Inheritance diagram for Emma::Instance:

Public Member Functions | |
| Instance (lua_State *L) | |
| virtual | ~Instance () |
| virtual Fusion::ResultType | setWindow (IWindow *) |
| Sets the IWindow object for the rendering window that Emma should render into. | |
| virtual Fusion::ResultType | processEvent (const Event &event) |
| Sends an event into the instance. | |
| virtual Fusion::ResultType | processEvent (const SDL_Event &event) |
| virtual Fusion::ResultType | registerStreamHandler (const Fusion::UTF8String &, const Fusion::UTF8String &, Fusion::IObject *) |
| Registers a handler for a given stream type. | |
| virtual Fusion::ResultType | unregisterStreamHandler (const Fusion::UTF8String &ext, const Fusion::UTF8String &mimetype) |
| Unregisters the previously set handler for a given stream type. | |
| virtual Fusion::ResultType | registerProtocolHandler (const Fusion::UTF8String &protocol, Fusion::IDataStreamHandlerFactory *h) |
| Registers a protocol handler for this instance For example, the mozilla plugin can register itself as the handler for the 'http' protocol so Emma uses Mozilla for downloading http assets. | |
| virtual Fusion::ResultType | unregisterProtocolHandler (const Fusion::UTF8String &protocol) |
| Unregisters the previously set protocol handler for a given protocol type. | |
| virtual Fusion::ResultType | registerErrorLogHandler (ErrorLogHandler *handler) |
| Registers a handler for errors. | |
| virtual Fusion::ResultType | unregisterErrorLogHandler (ErrorLogHandler *handler) |
| Unregisters the previously set error handler. | |
| virtual Fusion::ResultType | setRenderManager (Fusion::IObject *) |
| A module that implements the IRenderManager interface can become the renderer for Emma by setting itself as the rendermanager using this method. | |
| virtual Fusion::ResultType | setRenderManager2D (Fusion::IObject *) |
| A module that implements the IRenderManager2D interface can become the 2Drenderer for Emma by setting itself as the rendermanager using this method. | |
| virtual Fusion::ResultType | registerEventHandler (uint32_t mask, EventHandler *handler, Fusion::Value *param=NULL) |
| Registers a handler for given event type(s). | |
| virtual Fusion::ResultType | registerInternalEventHandler (uint32_t mask, EventHandler *handler) |
| Registers a handler for given event type(s) that can be overridden by the content handlers. | |
| virtual int32_t | registerEventHandler (const Fusion::Value &self, const Fusion::UTF8String &name, const Fusion::Value &handler, const Fusion::Value ¶m) |
| virtual Fusion::ResultType | unregisterEventHandler (uint32_t mask, EventHandler *handler, Fusion::Value *param=NULL) |
| Unregisters the previously set handler for given event type(s). | |
| virtual Fusion::ResultType | unregisterInternalEventHandler (uint32_t mask, EventHandler *handler) |
| Unregisters the previously set handler for given event type(s). | |
| virtual void | unregisterEventHandler (int32_t i) |
| virtual Fusion::ResultType | registerExternalCallHandler (ExternalCallHandler *handler) |
| Registers a handler for external calls (using the global call() function). | |
| virtual Fusion::ResultType | unregisterExternalCallHandler (ExternalCallHandler *handler) |
| Unregisters the previously set external call handler. | |
| virtual bool | isFilterMode () const |
| Return true is we are in filter mode (e.g., '-c' specified on command line). | |
| virtual void | saveScreenshotToFile (Fusion::UTF8String name) |
| saves a screenshot of the current scene to a file | |
| virtual IMutex * | createMutex () |
| create a Mutex | |
| virtual IGate * | createGate () |
| create a Gate | |
| virtual void | logAndExitEmmaInstanceGracefully () |
| write a crash log file and exit this instance gracefully only to be called in a non-recoverable error situation to exit emma gracefully without crashing and burning | |
| virtual bool | handleEvent (const Event &event) |
| Callback function that is implemented by the callee. | |
| virtual IRenderManager * | getRenderManager () |
| Returns the IRenderManager pointer to the currently registered node handler module. | |
| virtual IRenderManager2D * | getRenderManager2D () |
| Returns the IRenderManager2D pointer to the currently registered 2D render module. | |
| virtual IWindow * | getIWindow () |
| Returns the IWindow pointer for width, height, etc. | |
| virtual double | getCurrentTime () const |
| Returns the current Emma system time, synchronized to the audio clock. | |
| void | toggleFrameRateDisplay () |
| virtual const Fusion::UTF8String & | getRootFileName () const |
| Returns the current asset's full file path and name. | |
| virtual const Fusion::UTF8String & | getRootFileBase () const |
| Returns the current asset's full file path ( without the name ). | |
| Logger * | getLogger () |
| virtual void | setThreadOwner (bool take) |
| virtual void | requestTerminate () |
| terminates the instance. | |
| virtual void | addEventsProcessed (Fusion::IObject *obj) |
| Add the passed object to the list of objects whose eventsProcessed() methods will get called at the end of the next event processing cycle. | |
| virtual void | addInitialize (Fusion::IObject *obj) |
| Add the passed object to the list of objects whose initialize() methods will get called at the start of the next event processing cycle. | |
| virtual Fusion::ResultType | addDeferredEvent (Fusion::IObject *self, const Fusion::Id &id, const Fusion::Value &val) |
| Add an event to the queue which will be processed later to set the passed property of the passed object to the passed value. | |
| virtual Fusion::ResultType | addDeferredEvent (Fusion::IObject *self, const Fusion::Id &id, const Fusion::Vector< Fusion::Value > &vals) |
| virtual Fusion::ResultType | addDeferredEvent (const char *str) |
| virtual Fusion::UTF8String | resolveFileName (const Fusion::UTF8String &fileName, const Fusion::UTF8String &fileBase, int32_t i=0) const |
| Resolve the passed filename string using the passed filebase. | |
| virtual bool | getRoot (Fusion::Value &val) const |
| Return the "real" root of the object hierarchy. | |
| virtual bool | getSettingsValue (const Fusion::UTF8String &str, Fusion::Value &val) const |
| Return the global settings value with the passed string. | |
| void | setRootFileName (const Fusion::UTF8String &filename) |
| virtual Fusion::ResultType | run () |
| loads the root file, if needed, and runs the render loop | |
| ErrorLogHandler * | getErrorLogHandler () |
| bool | isTerminationRequested () |
| virtual Fusion::IEngine * | getIEngine () |
| Return the IEngine pointer for this instance. | |
| void | handleExternalCall (const Fusion::UTF8String &func, const Fusion::Vector< const char * > &vals) |
Static Public Member Functions | |
| static Instance * | getInstance () |
| static void | setInstance (Instance *i) |
| static IInstance * | getIInstance () |
| Return the IInstance pointer for the caller's thread This method does automatic thread-lookup to find the correct Instance object. | |
| static void | setIInstance (IInstance *i) |
| This method sets the IInstance pointer for this thread This can be used by applications that start a thread on their own and then need to access the instance pointer on that thread. | |
| static void | setAppEnvironment (const Fusion::UTF8String appName, const Fusion::UTF8String &appPath) |
| static void | setLuaEnvironment (Fusion::Args &args) |
|
|
|
|
|
|
|
|
Implements Emma::IInstance. |
|
||||||||||||||||
|
Implements Emma::IInstance. |
|
||||||||||||||||
|
Add an event to the queue which will be processed later to set the passed property of the passed object to the passed value.
Implements Emma::IInstance. |
|
|
Add the passed object to the list of objects whose eventsProcessed() methods will get called at the end of the next event processing cycle.
Implements Emma::IInstance. |
|
|
Add the passed object to the list of objects whose initialize() methods will get called at the start of the next event processing cycle.
Implements Emma::IInstance. |
|
|
create a Gate
Implements Emma::IInstance. |
|
|
create a Mutex
Implements Emma::IInstance. |
|
|
Returns the current Emma system time, synchronized to the audio clock.
Implements Emma::IInstance. |
|
|
|
|
|
Return the IEngine pointer for this instance.
Implements Emma::IInstance. |
|
|
Return the IInstance pointer for the caller's thread This method does automatic thread-lookup to find the correct Instance object.
Reimplemented from Emma::IInstance. |
|
|
|
|
|
Returns the IWindow pointer for width, height, etc.
Implements Emma::IInstance. |
|
|
|
|
|
Returns the IRenderManager pointer to the currently registered node handler module.
Implements Emma::IInstance. |
|
|
Returns the IRenderManager2D pointer to the currently registered 2D render module.
Implements Emma::IInstance. |
|
|
Return the "real" root of the object hierarchy.
Implements Emma::IInstance. |
|
|
Returns the current asset's full file path ( without the name ).
Implements Emma::IInstance. |
|
|
Returns the current asset's full file path and name.
Implements Emma::IInstance. |
|
||||||||||||
|
Return the global settings value with the passed string.
Implements Emma::IInstance. |
|
|
Callback function that is implemented by the callee.
Implements Emma::EventHandler. |
|
||||||||||||
|
|
|
|
Return true is we are in filter mode (e.g., '-c' specified on command line).
Implements Emma::IInstance. |
|
|
|
|
|
write a crash log file and exit this instance gracefully only to be called in a non-recoverable error situation to exit emma gracefully without crashing and burning
Implements Emma::IInstance. |
|
|
Implements Emma::IInstance. |
|
|
Sends an event into the instance.
Implements Emma::IInstance. |
|
|
Registers a handler for errors.
Implements Emma::IInstance. |
|
||||||||||||||||||||
|
|
|
||||||||||||||||
|
Registers a handler for given event type(s).
Implements Emma::IInstance. |
|
|
Registers a handler for external calls (using the global call() function).
Implements Emma::IInstance. |
|
||||||||||||
|
Registers a handler for given event type(s) that can be overridden by the content handlers.
Implements Emma::IInstance. |
|
||||||||||||
|
Registers a protocol handler for this instance For example, the mozilla plugin can register itself as the handler for the 'http' protocol so Emma uses Mozilla for downloading http assets.
Implements Emma::IInstance. |
|
||||||||||||||||
|
Registers a handler for a given stream type.
Implements Emma::IInstance. |
|
|
terminates the instance. When complete a TERM_COMPLETE event is sent to the main thread. Implements Emma::IInstance. |
|
||||||||||||||||
|
Resolve the passed filename string using the passed filebase. The result is the resolved string. The passed i gives the index of the path to use, if there are multiple paths. If there is no path with the passed index, the empty string is returned. See Filename Resolution for more details. Implements Emma::IInstance. |
|
|
loads the root file, if needed, and runs the render loop
Implements Emma::IInstance. |
|
|
saves a screenshot of the current scene to a file
Implements Emma::IInstance. |
|
||||||||||||
|
|
|
|
This method sets the IInstance pointer for this thread This can be used by applications that start a thread on their own and then need to access the instance pointer on that thread.
Reimplemented from Emma::IInstance. |
|
|
|
|
|
|
|
|
A module that implements the IRenderManager interface can become the renderer for Emma by setting itself as the rendermanager using this method.
Implements Emma::IInstance. |
|
|
A module that implements the IRenderManager2D interface can become the 2Drenderer for Emma by setting itself as the rendermanager using this method.
Implements Emma::IInstance. |
|
|
|
|
|
|
|
|
Sets the IWindow object for the rendering window that Emma should render into.
Implements Emma::IInstance. |
|
|
|
|
|
Unregisters the previously set error handler.
Implements Emma::IInstance. |
|
|
|
|
||||||||||||||||
|
Unregisters the previously set handler for given event type(s).
Implements Emma::IInstance. |
|
|
Unregisters the previously set external call handler.
Implements Emma::IInstance. |
|
||||||||||||
|
Unregisters the previously set handler for given event type(s).
Implements Emma::IInstance. |
|
|
Unregisters the previously set protocol handler for a given protocol type.
Implements Emma::IInstance. |
|
||||||||||||
|
Unregisters the previously set handler for a given stream type.
Implements Emma::IInstance. |
1.4.3