No description
Find a file
Santiago Gimeno 7351c47bc8 Version 1.0.2
2014-12-10 12:57:28 +01:00
autogen initial implementation of xcb xml -> js generation 2012-11-27 11:42:57 +11:00
examples fix example errors 2014-10-24 17:12:56 +11:00
lib src: maskList.sort @ packValueMask must be numeric 2014-12-09 16:15:03 +01:00
test test: clean configure-request test 2014-12-09 10:34:49 +01:00
.travis.yml Set node version in travis to 0.10 2014-03-11 16:26:57 +01:00
LICENSE year bump 2012-06-13 15:14:12 +10:00
package.json Version 1.0.2 2014-12-10 12:57:28 +01:00
README.md Added Gitter badge 2014-10-08 21:36:58 +00:00
roadmap.txt tick what's done 2012-11-27 11:38:33 +11:00
test-runner.js Check for errors directly instead of with isError 2014-11-03 16:43:37 +01:00

About

![Gitter](https://badges.gitter.im/Join Chat.svg) X11 protocol client for node.js

Implements core X11 protocol, as well as Xrender, Damage, Composite, Big-Requests, Dpms, Screensaver, XFixes, Shape, XTest, XC-Misc, GLX and Apple-WM extensions.

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 requests usage:

var x11 = require('x11');

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

x11.createClient(function(err, display) {
    if (!err) {
        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);
        });
    } else {
	    console.log(err);
    }
});

Screenshots

tetris game XRENDER gradients OpenGL glxgears OpenGL teapot

In use

Protocol documentation

Other implementations

Bitdeli Badge