No description
Find a file
Andrey Sidorov 74750ca95b 1.0.1
2014-10-08 14:59:32 +11:00
autogen initial implementation of xcb xml -> js generation 2012-11-27 11:42:57 +11:00
examples Extensions, tests and exemples are now cps-style 2014-09-23 16:09:18 +02:00
lib use wid instead of window for consistency 2014-10-08 14:58:47 +11:00
test use wid instead of window for consistency 2014-10-08 14:58:47 +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 add more links to X11 implementations 2014-03-25 22:13:24 +11:00
roadmap.txt tick what's done 2012-11-27 11:38:33 +11:00
test-runner.js Remove unnecessary log 2014-03-11 18:02:46 +01:00

About

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