mirror of
https://github.com/danbulant/node-x11
synced 2026-07-05 11:10:58 +00:00
ListProperties request
This commit is contained in:
parent
5b6fd461ac
commit
93c09e553e
2 changed files with 30 additions and 0 deletions
9
examples/smoketest/listproperties.js
Normal file
9
examples/smoketest/listproperties.js
Normal 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);
|
||||||
|
});
|
||||||
|
|
@ -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: [
|
SendEvent: [
|
||||||
|
|
||||||
function(destination, propagate, eventMask, eventRawData)
|
function(destination, propagate, eventMask, eventRawData)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue