mirror of
https://github.com/danbulant/node-x11
synced 2026-07-05 19:20:54 +00:00
Edited README.md via GitHub
This commit is contained in:
parent
f128d32c72
commit
f3b0db0453
1 changed files with 19 additions and 0 deletions
19
README.md
19
README.md
|
|
@ -1,6 +1,25 @@
|
||||||
# About
|
# About
|
||||||
X11 protocol client for node.js
|
X11 protocol client for node.js
|
||||||
|
|
||||||
|
# example
|
||||||
|
|
||||||
|
var x = require('x11');
|
||||||
|
|
||||||
|
var s = x.createConnection().defaultScreen();
|
||||||
|
var wnd = s.createWindow(10, 10, 100, 100); // RootWindow as parent by default
|
||||||
|
wnd.selectInput(x.ExposureMask | x.KeyPressMask); // optional, all input by default
|
||||||
|
wnd
|
||||||
|
.on('expose', function(exposeevent)
|
||||||
|
{
|
||||||
|
this.drawString(10, 50, 'Hello');
|
||||||
|
})
|
||||||
|
.on('keypress', function(keyevent)
|
||||||
|
{
|
||||||
|
process.exit(0);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Protocol documentation
|
# Protocol documentation
|
||||||
|
|
||||||
- http://www.x.org/releases/X11R7.6/doc/
|
- http://www.x.org/releases/X11R7.6/doc/
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue