Add an I/O device to represent the Device Manager

This commit is contained in:
Christopher Willis-Ford 2017-04-28 13:40:13 -07:00
parent 9fce03b16f
commit f3c6be2881
3 changed files with 265 additions and 0 deletions
src/engine

View file

@ -5,6 +5,7 @@ const Thread = require('./thread');
// Virtual I/O devices.
const Clock = require('../io/clock');
const DeviceManager = require('../io/deviceManager');
const Keyboard = require('../io/keyboard');
const Mouse = require('../io/mouse');
@ -141,6 +142,7 @@ class Runtime extends EventEmitter {
/** @type {Object.<string, Object>} */
this.ioDevices = {
clock: new Clock(),
deviceManager: new DeviceManager(),
keyboard: new Keyboard(this),
mouse: new Mouse(this)
};