new mmir.InputManager()
The InputManager handles input events.
On initialization, the InputManager also creates the mmir.InputEngine,
and returns it as the second argument of the init() function's callback
(or the Promise's triggered callbacks).
In addition, the InputEngine is exported as module "mmirf/inputEngine" via
RequireJS' define() function.
Example
//initialization of inputManager
require('mmirf/inputManager').init().then( function(inputManagerInstance, inputEngineInstance){
//do something
});
Requires
- module:mmir.require
- module:mmir._define
Members
-
_instance
-
Methods
-
init(){Deferred}
-
-
raise(eventName, eventData)
-
This function raises an event.
Name Type Description eventNameString The name of the event which is to be raised eventDataObject optional OPTIONAL Data belonging to the event Throws:
-
if this function is invoked while the internal event/state engine (i.e.
mmir.InputEngineis not initialized yet - Type
- Error
-