From 5d021eab94fee11fee6959619e2287cd130711f1 Mon Sep 17 00:00:00 2001 From: Andrey Sidorov Date: Tue, 19 Feb 2013 17:47:22 +1100 Subject: [PATCH] createClient callback signature now (err,display) --- examples/kbdheatmap/kbdheatmap.js | 2 +- examples/opengl/test1.js | 2 +- examples/opengl/tp2.js | 2 +- examples/opengl/triangle.js | 2 +- examples/paint.js | 2 +- examples/png/test.js | 2 +- examples/screenshot.js | 2 +- examples/simple/alloccolor.js | 2 +- examples/simple/creategc.js | 2 +- examples/simple/createwindow.js | 2 +- examples/simple/embed.js | 2 +- examples/simple/events.js | 2 +- examples/simple/getprop.js | 2 +- examples/simple/gradients.js | 2 +- examples/simple/hello.js | 2 +- examples/simple/lsatoms.js | 2 +- examples/simple/lsatomsp.js | 2 +- examples/simple/render.js | 2 +- examples/simple/resizewindow.js | 2 +- examples/simple/xembed.js | 2 +- examples/smoketest/applewm.js | 2 +- examples/smoketest/atoms.js | 2 +- examples/smoketest/benchmarks/atom_benchmark_buffered.js | 2 +- examples/smoketest/benchmarks/atom_benchmark_parallel.js | 2 +- .../smoketest/benchmarks/query_pointer_benchmark_parallel.js | 2 +- examples/smoketest/benchmarks/query_pointer_benchmark_sync.js | 2 +- examples/smoketest/changeprop.js | 2 +- examples/smoketest/compositetest.js | 2 +- examples/smoketest/copyarea.js | 2 +- examples/smoketest/damagetest.js | 2 +- examples/smoketest/fixestest.js | 2 +- examples/smoketest/getkeyboardmapping.js | 2 +- examples/smoketest/listext.js | 2 +- examples/smoketest/listfonts.js | 2 +- examples/smoketest/listproperties.js | 2 +- examples/smoketest/map_unmap.js | 2 +- examples/smoketest/polyfillarc.js | 2 +- examples/smoketest/polyfillrect.js | 2 +- examples/smoketest/polyline.js | 2 +- examples/smoketest/polypoint.js | 2 +- examples/smoketest/polytext8.js | 2 +- examples/smoketest/putimage.js | 2 +- examples/smoketest/putimage1.js | 2 +- examples/smoketest/query_ext.js | 2 +- examples/smoketest/query_pointer.js | 2 +- examples/smoketest/querytree.js | 2 +- examples/smoketest/selections.js | 2 +- examples/smoketest/sendevent.js | 2 +- examples/smoketest/shapetest.js | 2 +- examples/smoketest/sstest.js | 2 +- examples/smoketest/subwindows.js | 2 +- examples/smoketest/testwnd.js | 2 +- examples/smoketest/transpwindow.js | 2 +- examples/smoketest/warppointer.js | 2 +- examples/smoketest/xcmisc.js | 2 +- examples/smoketest/xeyes.js | 2 +- examples/smoketest/xtesttest.js | 2 +- examples/vncviewer/vncgui.js | 2 +- 58 files changed, 58 insertions(+), 58 deletions(-) diff --git a/examples/kbdheatmap/kbdheatmap.js b/examples/kbdheatmap/kbdheatmap.js index a5a732b..96a58f8 100755 --- a/examples/kbdheatmap/kbdheatmap.js +++ b/examples/kbdheatmap/kbdheatmap.js @@ -23,7 +23,7 @@ for (var k in keysyms) var kk2name = {}; -x11.createClient(function(display) +x11.createClient(function(err, display) { var X = display.client; X.require('big-requests', function(BigReq) diff --git a/examples/opengl/test1.js b/examples/opengl/test1.js index 550f41c..60d37c6 100644 --- a/examples/opengl/test1.js +++ b/examples/opengl/test1.js @@ -10,7 +10,7 @@ var height = 500; var eventmask = x11.eventMask.PointerMotion; var listId = 1; -x11.createClient(function(display) { +x11.createClient(function(err, display) { var X = display.client; var root = display.screen[0].root; X.require('glx', function(GLX) { diff --git a/examples/opengl/tp2.js b/examples/opengl/tp2.js index 805732c..0864856 100644 --- a/examples/opengl/tp2.js +++ b/examples/opengl/tp2.js @@ -299,7 +299,7 @@ function init(gl, done) var x11 = require('../../lib'); var eventmask = x11.eventMask.PointerMotion|x11.eventMask.ButtonPress|x11.eventMask.ButtonRelease|x11.eventMask.StructureNotify|x11.eventMask.Exposure; -x11.createClient(function(display) { +x11.createClient(function(err, display) { var X = display.client; var root = display.screen[0].root; var width = 1000; diff --git a/examples/opengl/triangle.js b/examples/opengl/triangle.js index 0d8a178..d1c60f7 100644 --- a/examples/opengl/triangle.js +++ b/examples/opengl/triangle.js @@ -5,7 +5,7 @@ for(var i=0; i < 20000; ++i) { randomarr.push([Math.random()*30-15, Math.random()*30-15, Math.random()*30-15]); } -var xclient = x11.createClient(function(display) { +var xclient = x11.createClient(function(err, display) { var X = display.client; var root = display.screen[0].root; X.require('glx', function(GLX) { diff --git a/examples/paint.js b/examples/paint.js index 1385bde..f4900bb 100644 --- a/examples/paint.js +++ b/examples/paint.js @@ -7,7 +7,7 @@ var X, Render; var pressed = false; var gradNo = 0; -var xclient = x11.createClient(function(display) { +var xclient = x11.createClient(function(err, display) { X = display.client; var root = display.screen[0].root; X.require('render', function(rendExt) { diff --git a/examples/png/test.js b/examples/png/test.js index 59866ef..692a764 100644 --- a/examples/png/test.js +++ b/examples/png/test.js @@ -12,7 +12,7 @@ var interv = 0; var total_frames = 0; var last_frames = 0; -x11.createClient(function(display) +x11.createClient(function(err, display) { console.log('111111'); diff --git a/examples/screenshot.js b/examples/screenshot.js index 0140d0e..25dd15a 100755 --- a/examples/screenshot.js +++ b/examples/screenshot.js @@ -2,7 +2,7 @@ var x11 = require('../lib'); var wid = process.argv[2]; console.log(wid); -x11.createClient(function(display) { +x11.createClient(function(err, display) { var X = display.client; var root = display.screen[0].root; diff --git a/examples/simple/alloccolor.js b/examples/simple/alloccolor.js index 77708f6..13ba2fb 100644 --- a/examples/simple/alloccolor.js +++ b/examples/simple/alloccolor.js @@ -2,7 +2,7 @@ var x11 = require('../../lib'); var Exposure = x11.eventMask.Exposure; -x11.createClient(function(display) { +x11.createClient(function(err, display) { var repaint; var X = display.client; var root = display.screen[0].root; diff --git a/examples/simple/creategc.js b/examples/simple/creategc.js index a3c377d..0b4efd0 100644 --- a/examples/simple/creategc.js +++ b/examples/simple/creategc.js @@ -1,7 +1,7 @@ var x11 = require('../../lib'); var PointerMotion = x11.eventMask.PointerMotion; -x11.createClient(function(display) { +x11.createClient(function(err, display) { var X = display.client; var root = display.screen[0].root; var white = display.screen[0].white_pixel; diff --git a/examples/simple/createwindow.js b/examples/simple/createwindow.js index fe92351..1fde521 100644 --- a/examples/simple/createwindow.js +++ b/examples/simple/createwindow.js @@ -1,5 +1,5 @@ var x11 = require('../../lib'); -x11.createClient(function(display) { +x11.createClient(function(err, display) { console.log(display.screen[0]) var X = display.client; var wid = X.AllocID(); diff --git a/examples/simple/embed.js b/examples/simple/embed.js index 07b9805..45bde0c 100644 --- a/examples/simple/embed.js +++ b/examples/simple/embed.js @@ -1,7 +1,7 @@ var spawn = require('child_process').spawn; var x11 = require('../../lib'); -x11.createClient(function(display) { +x11.createClient(function(err, display) { var X = display.client; var wid = X.AllocID(); X.CreateWindow(wid, display.screen[0].root, 100, 100, 900, 700, 0, 0, 0, 0, {backgroundPixel: display.screen[0].black_pixel}); diff --git a/examples/simple/events.js b/examples/simple/events.js index 3445dca..d3b7e89 100644 --- a/examples/simple/events.js +++ b/examples/simple/events.js @@ -1,5 +1,5 @@ var x11 = require('../../lib'); -x11.createClient(function(display) { +x11.createClient(function(err, display) { var X = display.client; var wid = X.AllocID(); X.CreateWindow(wid, display.screen[0].root, 100, 100, 400, 300); diff --git a/examples/simple/getprop.js b/examples/simple/getprop.js index c81ba29..61d51e3 100644 --- a/examples/simple/getprop.js +++ b/examples/simple/getprop.js @@ -3,7 +3,7 @@ var x11 = require('../../lib'); var PropertyChange = x11.eventMask.PropertyChange; -x11.createClient(function(display) { +x11.createClient(function(err, display) { var X = display.client; var root = display.screen[0].root; var wid = X.AllocID(); diff --git a/examples/simple/gradients.js b/examples/simple/gradients.js index 3c3cc96..0b6d27e 100644 --- a/examples/simple/gradients.js +++ b/examples/simple/gradients.js @@ -7,7 +7,7 @@ var x11 = require('../../lib'); // and http://www.x.org/releases/X11R7.6/doc/renderproto/renderproto.txt // TODO: move to templates x11.createClient( - function(display) { + function(err, display) { var X = display.client; X.require('render', function(Render) { diff --git a/examples/simple/hello.js b/examples/simple/hello.js index 767c233..0e2c437 100644 --- a/examples/simple/hello.js +++ b/examples/simple/hello.js @@ -1,5 +1,5 @@ var x11 = require('../../lib'); -x11.createClient(function(display) { +x11.createClient(function(err, display) { console.log('succesfully connected to \"' + display.vendor + '\" server'); display.client.terminate(); }); diff --git a/examples/simple/lsatoms.js b/examples/simple/lsatoms.js index 8658f0c..9d76d45 100644 --- a/examples/simple/lsatoms.js +++ b/examples/simple/lsatoms.js @@ -1,5 +1,5 @@ var x11 = require('../../lib'); -x11.createClient(function(display) { +x11.createClient(function(err, display) { var maxstd = 0; var atomName; for (atomName in display.atoms) diff --git a/examples/simple/lsatomsp.js b/examples/simple/lsatomsp.js index 8e9141a..4865ec3 100644 --- a/examples/simple/lsatomsp.js +++ b/examples/simple/lsatomsp.js @@ -1,5 +1,5 @@ var x11 = require('../../lib'); -x11.createClient(function(display) { +x11.createClient(function(err, display) { var maxstd = 0; var atomName; for (atomName in display.client.atoms) diff --git a/examples/simple/render.js b/examples/simple/render.js index dff744b..7f56075 100644 --- a/examples/simple/render.js +++ b/examples/simple/render.js @@ -1,7 +1,7 @@ var x11 = require('../../lib'); var PointerMotion = x11.eventMask.PointerMotion; -var xclient = x11.createClient(function(display) { +var xclient = x11.createClient(function(err, display) { var X = display.client; var root = display.screen[0].root; display.client.require('render', function(Render) { diff --git a/examples/simple/resizewindow.js b/examples/simple/resizewindow.js index d67cf64..c732fe9 100644 --- a/examples/simple/resizewindow.js +++ b/examples/simple/resizewindow.js @@ -1,5 +1,5 @@ var x11 = require('../../lib'); -x11.createClient(function(display) { +x11.createClient(function(err, display) { var X = display.client; var root = display.screen[0].root; var wid = X.AllocID(); diff --git a/examples/simple/xembed.js b/examples/simple/xembed.js index 3c7d02b..d66368a 100644 --- a/examples/simple/xembed.js +++ b/examples/simple/xembed.js @@ -1,5 +1,5 @@ var x11 = require('../../lib'); -x11.createClient(function(display) { +x11.createClient(function(err, display) { var X = display.client; var wid = X.AllocID(); X.CreateWindow(wid, display.screen[0].root, 100, 100, 400, 300, 0, 0, 0, 0, {eventMask: x11.eventMask.PointerMotion}); diff --git a/examples/smoketest/applewm.js b/examples/smoketest/applewm.js index 2ec7776..ba376c5 100644 --- a/examples/smoketest/applewm.js +++ b/examples/smoketest/applewm.js @@ -1,6 +1,6 @@ var x11 = require('../../lib'); -x11.createClient(function(display) { +x11.createClient(function(err, display) { var X = display.client; var root = display.screen[0].root; X.require('apple-wm', function(AppleWM) { diff --git a/examples/smoketest/atoms.js b/examples/smoketest/atoms.js index bbaddbc..d8a77c8 100644 --- a/examples/smoketest/atoms.js +++ b/examples/smoketest/atoms.js @@ -1,5 +1,5 @@ var x11 = require('../../lib'); -x11.createClient(function(display) { +x11.createClient(function(err, display) { var X = display.client; var hello = 'Hello, node.js'; X.InternAtom(false, hello, function(err, atomId) { diff --git a/examples/smoketest/benchmarks/atom_benchmark_buffered.js b/examples/smoketest/benchmarks/atom_benchmark_buffered.js index e4d1c2d..0a9163d 100644 --- a/examples/smoketest/benchmarks/atom_benchmark_buffered.js +++ b/examples/smoketest/benchmarks/atom_benchmark_buffered.js @@ -13,7 +13,7 @@ var counter = 0; var t = +new Date(); var t0 = t; var num = 100000; -xclient.on('connect', function(display) { +xclient.on('connect', function(err, display) { console.log(display); process.exit(0); var X = this; diff --git a/examples/smoketest/benchmarks/atom_benchmark_parallel.js b/examples/smoketest/benchmarks/atom_benchmark_parallel.js index f1e868c..710ed9b 100644 --- a/examples/smoketest/benchmarks/atom_benchmark_parallel.js +++ b/examples/smoketest/benchmarks/atom_benchmark_parallel.js @@ -56,7 +56,7 @@ function benchmarkAtoms() -xclient.on('connect', function(display) { +xclient.on('connect', function(err, display) { X = this; X.t1 = +new Date(); benchmarkAtoms(); diff --git a/examples/smoketest/benchmarks/query_pointer_benchmark_parallel.js b/examples/smoketest/benchmarks/query_pointer_benchmark_parallel.js index 7c19e84..37c52af 100644 --- a/examples/smoketest/benchmarks/query_pointer_benchmark_parallel.js +++ b/examples/smoketest/benchmarks/query_pointer_benchmark_parallel.js @@ -40,7 +40,7 @@ function benchmarkQP() process.nextTick(benchmarkQP); } -X.on('connect', function(display) { +X.on('connect', function(err, display) { var screen = display.screen[0]; wid = X.AllocID(); X.CreateWindow(wid, screen.root, 10, 10, 400, 300, 1, 1, 0, { backgroundPixel: screen.white_pixel }); diff --git a/examples/smoketest/benchmarks/query_pointer_benchmark_sync.js b/examples/smoketest/benchmarks/query_pointer_benchmark_sync.js index e5e7d41..2da91ac 100644 --- a/examples/smoketest/benchmarks/query_pointer_benchmark_sync.js +++ b/examples/smoketest/benchmarks/query_pointer_benchmark_sync.js @@ -35,7 +35,7 @@ function benchmarkQP(wid) }); } -X.on('connect', function(display) { +X.on('connect', function(err, display) { var screen = display.screen[0]; var wid = X.AllocID(); X.CreateWindow(wid, screen.root, 10, 10, 400, 300, 1, 1, 0, { backgroundPixel: screen.white_pixel }); diff --git a/examples/smoketest/changeprop.js b/examples/smoketest/changeprop.js index 5d183fd..8eed7bc 100644 --- a/examples/smoketest/changeprop.js +++ b/examples/smoketest/changeprop.js @@ -1,7 +1,7 @@ var x11 = require('../../lib'); var PointerMotion = x11.eventMask.PointerMotion; -x11.createClient(function(display) { +x11.createClient(function(err, display) { var X = display.client; var root = display.screen[0].root; var wid = X.AllocID(); diff --git a/examples/smoketest/compositetest.js b/examples/smoketest/compositetest.js index 6cc3246..53ce1ec 100644 --- a/examples/smoketest/compositetest.js +++ b/examples/smoketest/compositetest.js @@ -1,6 +1,6 @@ var x11 = require('../../lib'); -x11.createClient(function(display) { +x11.createClient(function(err, display) { var X = display.client; var root = display.screen[0].root; X.require('composite', function(Composite) { diff --git a/examples/smoketest/copyarea.js b/examples/smoketest/copyarea.js index 9b20f34..89d9f54 100644 --- a/examples/smoketest/copyarea.js +++ b/examples/smoketest/copyarea.js @@ -1,7 +1,7 @@ var x11 = require('../../lib'); var Window = require('./wndwrap'); -x11.createClient(function(display) { +x11.createClient(function(err, display) { var pts = []; new Window(display.client, 0, 0, 700, 500) diff --git a/examples/smoketest/damagetest.js b/examples/smoketest/damagetest.js index a3e84a7..9aea817 100644 --- a/examples/smoketest/damagetest.js +++ b/examples/smoketest/damagetest.js @@ -1,6 +1,6 @@ var x11 = require('../../lib'); -x11.createClient(function(display) { +x11.createClient(function(err, display) { var X = display.client; var root = display.screen[0].root; X.require('damage', function(Damage) { diff --git a/examples/smoketest/fixestest.js b/examples/smoketest/fixestest.js index 8d25f27..84b0a1a 100644 --- a/examples/smoketest/fixestest.js +++ b/examples/smoketest/fixestest.js @@ -1,6 +1,6 @@ var x11 = require('../../lib'); -x11.createClient(function(display) { +x11.createClient(function(err, display) { var X = display.client; var root = display.screen[0].root; X.require('fixes', function(Fixes) { diff --git a/examples/smoketest/getkeyboardmapping.js b/examples/smoketest/getkeyboardmapping.js index d93851d..544d96e 100644 --- a/examples/smoketest/getkeyboardmapping.js +++ b/examples/smoketest/getkeyboardmapping.js @@ -6,7 +6,7 @@ for (var key in ks) ks2Name[ ks[key] ] = key; var kk2Name = {}; -x11.createClient(function(display) { +x11.createClient(function(err, display) { var X = display.client; var min = display.min_keycode; var max = display.max_keycode; diff --git a/examples/smoketest/listext.js b/examples/smoketest/listext.js index 2533273..3944d5b 100644 --- a/examples/smoketest/listext.js +++ b/examples/smoketest/listext.js @@ -1,6 +1,6 @@ var x11 = require('../../lib'); var X = x11.createClient(); -X.on('connect', function(display) { +X.on('connect', function(err, display) { X.ListExtensions(function(err, list) { list.forEach(function(ext) { console.log(ext); diff --git a/examples/smoketest/listfonts.js b/examples/smoketest/listfonts.js index 4773ccf..bef4066 100644 --- a/examples/smoketest/listfonts.js +++ b/examples/smoketest/listfonts.js @@ -1,5 +1,5 @@ var x11 = require('../../lib'); -var X = x11.createClient(function(display) { +var X = x11.createClient(function(err, display) { X.ListFonts('*', 1000, function(err, list) { list.forEach(function(ext) { console.log(ext); diff --git a/examples/smoketest/listproperties.js b/examples/smoketest/listproperties.js index 990726c..1713e3f 100644 --- a/examples/smoketest/listproperties.js +++ b/examples/smoketest/listproperties.js @@ -1,6 +1,6 @@ var x11 = require('../../lib'); -x11.createClient(function(display) { +x11.createClient(function(err, display) { var X = display.client; function quotize(i) { return '\"' + i + '\"'; } diff --git a/examples/smoketest/map_unmap.js b/examples/smoketest/map_unmap.js index 1765505..6c0225a 100644 --- a/examples/smoketest/map_unmap.js +++ b/examples/smoketest/map_unmap.js @@ -4,7 +4,7 @@ var xclient = x11.createClient(); var PointerMotion = x11.eventMask.PointerMotion; var mapped = true; -xclient.on('connect', function(display) { +xclient.on('connect', function(err, display) { var X = this; var root = display.screen[0].root; var wid = X.AllocID(); diff --git a/examples/smoketest/polyfillarc.js b/examples/smoketest/polyfillarc.js index 3098bc4..8890485 100644 --- a/examples/smoketest/polyfillarc.js +++ b/examples/smoketest/polyfillarc.js @@ -5,7 +5,7 @@ var PointerMotion = x11.eventMask.PointerMotion; var ButtonPress = x11.eventMask.ButtonPress; var ButtonRelease = x11.eventMask.ButtonRelease; -x11.createClient(function(display) { +x11.createClient(function(err, display) { var X = display.client; var root = display.screen[0].root; var white = display.screen[0].white_pixel; diff --git a/examples/smoketest/polyfillrect.js b/examples/smoketest/polyfillrect.js index 9d639ae..1791572 100644 --- a/examples/smoketest/polyfillrect.js +++ b/examples/smoketest/polyfillrect.js @@ -4,7 +4,7 @@ var xclient = x11.createClient(); var Exposure = x11.eventMask.Exposure; var PointerMotion = x11.eventMask.PointerMotion; -xclient.on('connect', function(display) { +xclient.on('connect', function(err, display) { var X = this; var root = display.screen[0].root; var white = display.screen[0].white_pixel; diff --git a/examples/smoketest/polyline.js b/examples/smoketest/polyline.js index e8b5091..4ba91ee 100644 --- a/examples/smoketest/polyline.js +++ b/examples/smoketest/polyline.js @@ -6,7 +6,7 @@ var pts = []; var prevPoint; -x11.createClient(function(display) { +x11.createClient(function(err, display) { var X = display.client; var root = display.screen[0].root; var white = display.screen[0].white_pixel; diff --git a/examples/smoketest/polypoint.js b/examples/smoketest/polypoint.js index 59713e2..72790c4 100644 --- a/examples/smoketest/polypoint.js +++ b/examples/smoketest/polypoint.js @@ -4,7 +4,7 @@ var Exposure = x11.eventMask.Exposure; var PointerMotion = x11.eventMask.PointerMotion; var pts = []; -x11.createClient(function(display) { +x11.createClient(function(err, display) { var X = display.client; var root = display.screen[0].root; var white = display.screen[0].white_pixel; diff --git a/examples/smoketest/polytext8.js b/examples/smoketest/polytext8.js index 43f5892..57dd8c7 100644 --- a/examples/smoketest/polytext8.js +++ b/examples/smoketest/polytext8.js @@ -4,7 +4,7 @@ var xclient = x11.createClient(); var Exposure = x11.eventMask.Exposure; var PointerMotion = x11.eventMask.PointerMotion; -xclient.on('connect', function(display) { +xclient.on('connect', function(err, display) { var X = this; var root = display.screen[0].root; var white = display.screen[0].white_pixel; diff --git a/examples/smoketest/putimage.js b/examples/smoketest/putimage.js index 43d9eca..5f83574 100644 --- a/examples/smoketest/putimage.js +++ b/examples/smoketest/putimage.js @@ -14,7 +14,7 @@ for (var i=0; i < bitmap.length; ++i) bitmap[i] = i % 256; } -xclient.on('connect', function(display) { +xclient.on('connect', function(err, display) { var X = this; var root = display.screen[0].root; var white = display.screen[0].white_pixel; diff --git a/examples/smoketest/putimage1.js b/examples/smoketest/putimage1.js index 6ffc419..f20b520 100644 --- a/examples/smoketest/putimage1.js +++ b/examples/smoketest/putimage1.js @@ -20,7 +20,7 @@ for (var i=0; i < bitmap.length; ++i) } -xclient.on('connect', function(display) { +xclient.on('connect', function(err, display) { var X = display.client; X.require('big-requests', function(BigReq) { diff --git a/examples/smoketest/query_ext.js b/examples/smoketest/query_ext.js index 8c11f50..3713ac0 100644 --- a/examples/smoketest/query_ext.js +++ b/examples/smoketest/query_ext.js @@ -1,7 +1,7 @@ var x11 = require('../../lib'); var X = x11.createClient(); var numExt = 0; -X.on('connect', function(display) { +X.on('connect', function(err, display) { X.ListExtensions(function(err, list) { console.log(list); list.forEach(function(ext) { diff --git a/examples/smoketest/query_pointer.js b/examples/smoketest/query_pointer.js index 265406a..718c823 100644 --- a/examples/smoketest/query_pointer.js +++ b/examples/smoketest/query_pointer.js @@ -1,5 +1,5 @@ var x11 = require('../../lib'); -x11.createClient(function(display) { +x11.createClient(function(err, display) { var X = display.client; var screen = display.screen[0]; var wid = X.AllocID(); diff --git a/examples/smoketest/querytree.js b/examples/smoketest/querytree.js index 3fb70c9..d0fba49 100644 --- a/examples/smoketest/querytree.js +++ b/examples/smoketest/querytree.js @@ -2,7 +2,7 @@ var x11 = require('../../lib'); var wid = process.argv[2]; console.log(wid); var wids = []; -x11.createClient(function(display) { +x11.createClient(function(err, display) { var X = display.client; var root = display.screen[0].root; X.QueryTree(wid ? wid : root, function(err, tree) { diff --git a/examples/smoketest/selections.js b/examples/smoketest/selections.js index 5610fd1..033169f 100644 --- a/examples/smoketest/selections.js +++ b/examples/smoketest/selections.js @@ -1,6 +1,6 @@ var x11 = require('../../lib'); -x11.createClient(function(display) { +x11.createClient(function(err, display) { var X = display.client; var id = parseInt(process.argv[2]); var root = display.screen[0].root; diff --git a/examples/smoketest/sendevent.js b/examples/smoketest/sendevent.js index ab1d68e..e23bf9d 100644 --- a/examples/smoketest/sendevent.js +++ b/examples/smoketest/sendevent.js @@ -5,7 +5,7 @@ var Exposure = x11.eventMask.Exposure; var PointerMotion = x11.eventMask.PointerMotion; var pts = []; -xclient.on('connect', function(display) { +xclient.on('connect', function(err, display) { var X = this; var root = display.screen[0].root; var white = display.screen[0].white_pixel; diff --git a/examples/smoketest/shapetest.js b/examples/smoketest/shapetest.js index 9e5d76a..4ee6070 100644 --- a/examples/smoketest/shapetest.js +++ b/examples/smoketest/shapetest.js @@ -1,6 +1,6 @@ var x11 = require('../../lib'); -x11.createClient(function(display) { +x11.createClient(function(err, display) { var X = display.client; var root = display.screen[0].root; X.require('shape', function(Shape) { diff --git a/examples/smoketest/sstest.js b/examples/smoketest/sstest.js index 0dab215..2e4688f 100644 --- a/examples/smoketest/sstest.js +++ b/examples/smoketest/sstest.js @@ -1,6 +1,6 @@ var x11 = require('../../lib'); -x11.createClient(function(display) { +x11.createClient(function(err, display) { var X = display.client; var root = display.screen[0].root; //X.ForceScreenSaver(0); diff --git a/examples/smoketest/subwindows.js b/examples/smoketest/subwindows.js index 01988a5..d872c43 100644 --- a/examples/smoketest/subwindows.js +++ b/examples/smoketest/subwindows.js @@ -1,7 +1,7 @@ var x11 = require('../../lib'); var Window = require('./wndwrap'); -x11.createClient(function(display) { +x11.createClient(function(err, display) { var pts = []; new Window(display.client, 0, 0, 600, 400, display.screen[0].white_pixel) diff --git a/examples/smoketest/testwnd.js b/examples/smoketest/testwnd.js index e53ae15..2754391 100644 --- a/examples/smoketest/testwnd.js +++ b/examples/smoketest/testwnd.js @@ -5,7 +5,7 @@ var width = 700; var height = 500; var pts = []; -x11.createClient(function(display) { +x11.createClient(function(err, display) { var mainwnd = new Window(display.client, 0, 0, width, height); mainwnd.on('mousemove', function(ev) diff --git a/examples/smoketest/transpwindow.js b/examples/smoketest/transpwindow.js index 3608586..30abafb 100644 --- a/examples/smoketest/transpwindow.js +++ b/examples/smoketest/transpwindow.js @@ -1,6 +1,6 @@ var x11 = require('../../lib'); -x11.createClient(function(display) { +x11.createClient(function(err, display) { var visual; var rgbaVisuals = Object.keys(display.screen[0].depths[32]); for (v in rgbaVisuals) diff --git a/examples/smoketest/warppointer.js b/examples/smoketest/warppointer.js index 25f9083..2df4217 100644 --- a/examples/smoketest/warppointer.js +++ b/examples/smoketest/warppointer.js @@ -1,5 +1,5 @@ var angle = 0; -var x11 = require('../../lib').createClient(function(display) { +var x11 = require('../../lib').createClient(function(err, display) { setInterval(function() { var x = 500 + 100*Math.cos(angle); var y = 500 + 100*Math.sin(angle); diff --git a/examples/smoketest/xcmisc.js b/examples/smoketest/xcmisc.js index 4bec4c9..0516265 100644 --- a/examples/smoketest/xcmisc.js +++ b/examples/smoketest/xcmisc.js @@ -1,6 +1,6 @@ var x11 = require('../../lib'); -x11.createClient(function(display) { +x11.createClient(function(err, display) { var X = display.client; var root = display.screen[0].root; X.require('xc-misc', function(Misc) { diff --git a/examples/smoketest/xeyes.js b/examples/smoketest/xeyes.js index fccba27..569342d 100644 --- a/examples/smoketest/xeyes.js +++ b/examples/smoketest/xeyes.js @@ -7,7 +7,7 @@ var ButtonRelease = x11.eventMask.ButtonRelease; //function drawEyes(w, h -x11.createClient(function(display) { +x11.createClient(function(err, display) { var X = display.client; var root = display.screen[0].root; var white = display.screen[0].white_pixel; diff --git a/examples/smoketest/xtesttest.js b/examples/smoketest/xtesttest.js index ed6bc5e..10e3874 100644 --- a/examples/smoketest/xtesttest.js +++ b/examples/smoketest/xtesttest.js @@ -1,6 +1,6 @@ var x11 = require('../../lib'); -var xclient = x11.createClient(function(display) { +var xclient = x11.createClient(function(err, display) { var X = display.client; var root = display.screen[0].root; display.client.require('xtest', function(Test) { diff --git a/examples/vncviewer/vncgui.js b/examples/vncviewer/vncgui.js index 9e2dff4..7c897b9 100644 --- a/examples/vncviewer/vncgui.js +++ b/examples/vncviewer/vncgui.js @@ -29,7 +29,7 @@ var ButtonRelease = x11.eventMask.ButtonRelease; var KeyPress = x11.eventMask.KeyPress; var KeyRelease = x11.eventMask.KeyRelease; -x11.createClient(function(display) { +x11.createClient(function(err, display) { var X = display.client; X.require('big-requests', function(BigReq) { BigReq.Enable(function(err, maxLen) {