Mercurial > MadButterfly
comparison nodejs/testcase.js @ 756:cceac4ba259e
Support drawing at root window for X Window
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Thu, 26 Aug 2010 14:54:50 +0800 |
parents | ed59e659a202 |
children | 61c217f8cec8 |
comparison
equal
deleted
inserted
replaced
755:82836f1290b6 | 756:cceac4ba259e |
---|---|
1 var mbfly = require("mbfly"); | 1 var mbfly = require("mbfly"); |
2 var r = mbfly.Hello(" test"); | 2 var r = mbfly.Hello(" test"); |
3 var sys = require("sys"); | 3 var sys = require("sys"); |
4 /* process module is still not supported by nodejs v0.1.97 */ | |
5 /* var process = require("process"); */ | |
4 sys.puts(r); | 6 sys.puts(r); |
5 | 7 |
6 var mb_rt = new mbfly.mb_rt(":0.0", 300, 200); | 8 var display_name = ":0.0"; |
9 /* if(process.argv.length > 2) | |
10 display_name = process.argv[2]; */ | |
11 | |
12 var mb_rt = new mbfly.mb_rt(display_name, 300, 200); | |
7 var root = mb_rt.root; | 13 var root = mb_rt.root; |
8 sys.puts("root matrix: " + | 14 sys.puts("root matrix: " + |
9 [root[0], root[1], root[2], root[3], root[4], root[5]]); | 15 [root[0], root[1], root[2], root[3], root[4], root[5]]); |
10 var coord = mb_rt.coord_new(root); | 16 var coord = mb_rt.coord_new(root); |
11 sys.puts("coord matrix: " + | 17 sys.puts("coord matrix: " + |