No description
Find a file
Andrey Sidorov 7312baef09 Merge pull request #11 from santigimeno/master
A couple of fixes in unpackEvent
2012-08-04 15:53:39 -07:00
examples Get/SetSelectionOwner requests 2012-06-09 14:15:19 +10:00
lib/x11 Merge pull request #11 from santigimeno/master 2012-08-04 15:53:39 -07:00
test inherit errors from Error 2012-07-17 14:47:17 +10: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 version bump 2012-07-17 14:49:53 +10: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

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