node-x11/test/atoms.js
2012-04-11 15:58:50 +10:00

11 lines
366 B
JavaScript

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