Source: manager/dialog/inputManager.js

  1. define([ 'mmirf/util/extend', 'mmirf/managerFactory', 'module'],
  2. /**
  3. * The InputManager handles input events.
  4. *
  5. * <p>
  6. * On initialization, the InputManager also creates the {@link mmir.InputEngine},
  7. * and returns it as the second argument of the {@link #init}() function's callback
  8. * (or the Promise's triggered callbacks).
  9. *
  10. * In addition, the InputEngine is exported as module <code>"mmirf/inputEngine"</code> via
  11. * RequireJS' <code>define()</code> function.
  12. *
  13. * @example
  14. * //initialization of inputManager
  15. * require('mmirf/inputManager').init().then( function(data){
  16. * var inputManagerInstance = data.manager;
  17. * var inputEngineInstance = data.engine;
  18. * //do something...
  19. * });
  20. *
  21. *
  22. * @name mmir.InputManager
  23. * @extends mmir.ManagerFactory
  24. * @static
  25. * @class
  26. * @hideconstructor
  27. *
  28. */
  29. function( extend, managerFactory, module
  30. ){
  31. var _create = function(){
  32. var _instance = managerFactory();
  33. var inst = extend(_instance, {
  34. init : function(isRegisterEngine) {
  35. return _instance._init(module.id, module.config(module), isRegisterEngine);
  36. },//END: init()
  37. _create: _create
  38. });//END: var inst = extend(...
  39. return inst;
  40. };
  41. return _create();
  42. });