node-x11/test/atoms.js
2011-07-18 13:16:20 +10:00

13 lines
360 B
JavaScript

var x11 = require('../lib/x11');
var xclient = x11.createClient();
xclient.on('connect', function(display) {
var X = this;
var hello = 'Hello, node.js';
X.InternAtom(false, hello, function(atomId) {
X.GetAtomName(atomId, function(str) {
console.log('Value for atom ' + atomId + ' is \"' + str + '\"');
});
});
});