ListProperties request

This commit is contained in:
Andrey Sidorov 2012-06-08 23:13:01 +10:00
parent 5b6fd461ac
commit 93c09e553e
2 changed files with 30 additions and 0 deletions

View file

@ -0,0 +1,9 @@
var x11 = require('../../lib/x11');
x11.createClient(function(display) {
var X = display.client;
var root = display.screen[0].root;
X.ListProperties(root, function(err, atoms) { console.log(atoms); });
//X.on('event', console.log);
//X.on('error', console.error);
});

View file

@ -316,6 +316,27 @@ module.exports = {
}
],
ListProperties: [
function(wid)
{
return ['CxSL', [21, 2, wid]];
},
function(buf) {
console.log(buf);
var n = buf.unpack('S')[0];
console.log(n);
var i;
var atoms = [];
for(i=0; i < n; ++i) {
atoms.push(buf.unpack('L', 24+4*i));
//console.log([n, i, atoms]);
}
return atoms;
}
],
SendEvent: [
function(destination, propagate, eventMask, eventRawData)