Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

x11

Package Overview
Dependencies
Maintainers
4
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

x11 - npm Package Compare versions

Comparing version 2.2.1 to 2.3.0

test/changeGC.js

10

lib/corereqs.js

@@ -768,9 +768,5 @@ // full list of event/error/request codes for all extensions:

var args = [56, packetLength, cid];
args.push(vals[0]); // values bitmask
var valArr = vals[1];
for (var v in valArr)
{
format += 'L'; // TODO: we know format string length in advance and += inefficient for string
args.push(valArr[v]);
}
format += vals[0]
args.push(vals[1]); // values bitmask
args = args.concat(vals[2])
return [format, args];

@@ -777,0 +773,0 @@ }

@@ -115,3 +115,29 @@ // http://www.x.org/releases/X11R7.6/doc/xextproto/shape.pdf

*/
ext.events = {
ShapeNotify: 0
}
X.eventParsers[ext.firstEvent + ext.events.ShapeNotify] = function(type, seq, extra, code, raw)
{
var event = {};
event.type = type;
event.kind = code;
event.seq = seq;
event.window = extra;
var values = raw.unpack('ssSSLC');
event.x = values[0];
event.y = values[1];
event.width = values[2];
event.height = values[3];
event.time = values[4];
event.shaped = values[5];
event.name = 'ShapeNotify';
return event;
};
});
}

@@ -15,3 +15,3 @@ {

"homepage": "https://github.com/sidorares/node-x11",
"version": "2.2.1",
"version": "2.3.0",
"maintainers": [

@@ -18,0 +18,0 @@ {

@@ -1,10 +0,12 @@

# About
[![Gitter](https://badges.gitter.im/Join\ Chat.svg)](https://gitter.im/sidorares/node-x11?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
X11 protocol client for node.js
# node-x11
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
X11 protocol client for Node.js: implements the core X11 protocol, as well as Xrender, Damage, Composite, Big-Requests, Dpms, Screensaver, XFixes, Shape, XTest, XC-Misc, GLX, and Apple-WM extensions.
`npm install x11`
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/sidorares/node-x11?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Build Status](https://secure.travis-ci.org/sidorares/node-x11.png)](http://travis-ci.org/sidorares/node-x11)
## Install
npm install x11
Windows users:

@@ -14,53 +16,49 @@ 1) install [XMing](http://www.straightrunning.com/XmingNotes/) or [Cygwin/X](http://x.cygwin.com/)

#CI build status:
## Example
[![Build Status](https://secure.travis-ci.org/sidorares/node-x11.png)](http://travis-ci.org/sidorares/node-x11)
# example
Core requests usage:
```js
var x11 = require('x11');
var x11 = require('x11');
var Exposure = x11.eventMask.Exposure;
var PointerMotion = x11.eventMask.PointerMotion;
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);
}
});
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
## Screenshots
![tetris game](https://lh6.googleusercontent.com/-RCRY9A7WwnA/Tlww0FHP7NI/AAAAAAAAAwo/nxfSxsw6xow/s400/tetris.png)
![XRENDER gradients](https://lh4.googleusercontent.com/-VS0BMYYmq6M/Tlww0Y1ij0I/AAAAAAAAAws/pVWsPZ63Yeo/s400/render-gradients.png)
![OpenGL glxgears](http://img-fotki.yandex.ru/get/4123/37511094.30/0_81712_6c2ebb11_L)
![OpenGL teapot](http://img-fotki.yandex.ru/get/4132/37511094.30/0_81713_82a5ac48_L)
![tetris game](https://lh6.googleusercontent.com/-RCRY9A7WwnA/Tlww0FHP7NI/AAAAAAAAAwo/nxfSxsw6xow/s400/tetris.png)
![XRENDER gradients](https://lh4.googleusercontent.com/-VS0BMYYmq6M/Tlww0Y1ij0I/AAAAAAAAAws/pVWsPZ63Yeo/s400/render-gradients.png)
![OpenGL glxgears](http://img-fotki.yandex.ru/get/4123/37511094.30/0_81712_6c2ebb11_L)
![OpenGL teapot](http://img-fotki.yandex.ru/get/4132/37511094.30/0_81713_82a5ac48_L)
# In use
## In use
- [ntk](https://github.com/sidorares/ntk) - higher level toolkit on top of X11

@@ -78,3 +76,3 @@ - [node-remote](https://github.com/AndrewSwerlick/node-remote) - media center controller

# X11 resources/documentation:
## X11 resources/documentation:

@@ -88,3 +86,3 @@ - [Xplain](https://github.com/magcius/xplain) - A series of articles to help explain the X Window System http://magcius.github.io/xplain/article/

# Other implementations
## Other implementations

@@ -102,8 +100,9 @@ - C: XLib - http://www.sbin.org/doc/Xlib/ http://www.tronche.com/gui/x/xlib/ http://www.x.org/docs/X11/xlib.pdf

- Guile: https://github.com/mwitmer/guile-xcb
- Emacs lisp: https://github.com/ch11ng/xelb ( autogenerated from XCB XML )
# Server side (protocol + functionality) implementations for js + DOM
## Server side (protocol + functionality) implementations for js + DOM
would be really great to make completely web based playground page, connecting node-x11 api to DOM based implementation
would be really great to make completely web based playground page, connecting node-x11 api to DOM based implementation
- https://github.com/GothAck/javascript-x-server
- https://github.com/ttaubert/x-server-js
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc