No description
Find a file
Andrey Sidorov acfa90a264 fix path
2012-11-27 11:30:48 +11:00
examples fix path 2012-11-27 11:30:48 +11:00
lib/x11 xserver accepts requests now (handshake data still from pre-saved file) 2012-11-27 11:28:28 +11:00
test A couple of fixes in xtest extension 2012-11-26 16:51:56 +01:00
.travis.yml Update .travis.yml 2012-07-24 11:41:15 +10:00
LICENSE year bump 2012-06-13 15:14:12 +10:00
package.json A couple of fixes in xtest extension 2012-11-26 16:51:56 +01:00
README.md Update README.md 2012-11-27 10:32:25 +11:00
roadmap.txt Edited roadmap.txt via GitHub 2011-08-31 13:45:14 +10:00
test-runner.js A couple of fixes in xtest extension 2012-11-26 16:51:56 +01: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)

#CI build status:

Build Status

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