No description
Find a file
Santiago Gimeno 9b8cef815b A couple of fixes in xtest extension
- Return directly in case of error retrieving the extension.
- QueryVersion should be GetVersion and fix its format.
- Add a test for GetVersion.
- Modify test-runner.js so it uses async library to add dynamically the test
  files to be used.
2012-11-26 16:51:56 +01:00
examples Get/SetSelectionOwner requests 2012-06-09 14:15:19 +10:00
lib/x11 A couple of fixes in xtest extension 2012-11-26 16:51:56 +01: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 master 2012-06-13 15:45:09 +10: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