No description
Find a file
An Ko c67043f1ed Receive xrandr & dpms exts correctly in tests
This makes tests pass that were failing with null reference errors.

`XClient.require` was passing the callback function to `requireExt`,
which called it with parameters `null, ext` on success. The callback
itself seemed to assume it will get only one parameter, which is either
the extension on an error, hence why it tried to call methods on a
`null`.
2014-11-03 15:52:34 +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 route event to parent if parent id exist 2014-10-08 20:41:45 +11:00
test fix failing test due to window -> wid rename 2014-10-08 15:08:04 +11: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 1.0.1 2014-10-08 14:59:32 +11: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 Receive xrandr & dpms exts correctly in tests 2014-11-03 15:52:34 +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