From b1625af9ca4c3d2b7e4e0797c4a6f751d7b28bae Mon Sep 17 00:00:00 2001 From: sidorares Date: Mon, 25 Jul 2011 13:48:20 +1000 Subject: [PATCH] getProperty wrapper --- test/wndwrap.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/wndwrap.js b/test/wndwrap.js index 456b5ea..fd819c2 100644 --- a/test/wndwrap.js +++ b/test/wndwrap.js @@ -127,6 +127,7 @@ function Window(parent, x, y, w, h) } return this._gc; }); + } util.inherits(Window, EventEmitter); @@ -144,4 +145,12 @@ Window.prototype.handle = function(handlers) { } } +Window.prototype.getProperty = function(name, cb) { + this.xclient.InternAtom(true, nam, function(nameAtom) { + this.xclient.GetProperty(0, this.id, nameAtom, 0, 1000000000, function(prop) { + cb(prop); + }); + }); +} + module.exports = Window; \ No newline at end of file