No description
Find a file
2012-06-01 18:17:55 +10:00
examples cleanup before addint travis & mocha testing 2012-05-31 12:31:49 +10:00
lib/x11 global variable leak test 2012-06-01 18:17:26 +10:00
test CreateWindow test 2012-06-01 18:17:55 +10:00
.travis.yml indent fix 2012-05-31 13:39:40 +10:00
LICENSE license and package.json files 2011-09-04 22:25:32 +10:00
package.json global object pollution fixed 2012-05-31 19:20:38 +10:00
README.md Update README.md 2012-04-12 10:20:00 +10:00
roadmap.txt Edited roadmap.txt via GitHub 2011-08-31 13:45:14 +10:00

About

X11 protocol client for node.js

install

npm install x11

Windows users:

  1. install XMing or Cygwin/X
  2. get node-x11 copy (using git or from Github)

example

Core requsests usage:

var x11 = require('x11');

var Exposure = x11.eventMask.Exposure;
var PointerMotion = x11.eventMask.PointerMotion;

x11.createClient(function(display) {
    var X = display.client;
    var root = display.screen[0].root;
    var wid = X.AllocID();
    X.CreateWindow(
       wid, root,        // new window id, parent
       0, 0, 100, 100,   // x, y, w, h
       0, 0, 0, 0,       // border, depth, class, visual
       { eventMask: Exposure|PointerMotion } // other parameters
    );
    X.MapWindow(wid);      
    var gc = X.AllocID();
    X.CreateGC(gc, wid);
    X.on('event', function(ev) {
        if (ev.type == 12)
        {
            X.PolyText8(wid, gc, 50, 50, ['Hello, Node.JS!']); 
        } 
    });
    X.on('error', function(e) {
        console.log(e);
    });
});

Screenshots

tetris game XRENDER gradients

Protocol documentation

Other implementations