diff --git a/index.js b/index.js index e761fb6b..04ce2c00 100644 --- a/index.js +++ b/index.js @@ -1 +1,21 @@ -module.exports = require('./build/Release/robotjs.node'); +var robotjs = require('./build/Release/robotjs.node'); + +module.exports = robotjs; + +module.exports.screen = {}; + +function bitmap (width, height, byteWidth, bitsPerPixel, bytesPerPixel, image) +{ + this.width = width; + this.height = height; + this.byteWidth = byteWidth; + this.bitsPerPixel = bitsPerPixel; + this.bytesPerPixel = bytesPerPixel; + this.image = image; +} + +module.exports.screen.capture = function() +{ + b = robotjs.captureScreen(); + return new bitmap(b.width, b.height, b.byteWidth, b.bitsPerPixel, b.bytesPerPixel, b.image); +}; \ No newline at end of file