UNPKG

@ross-technologies/xlib

Version:
27 lines (21 loc) 571 B
# node-xlib Xlib for Node.JS. # Example This creates a windows 100x100 pixels at 0, 0 on the screen. The window created is called "Hello, world". ```js const x11 = require("x11"); const xlib = require("@ross-technologies/xlib"); xlib.createClient((err,client) => { if(err) throw err; var X = client.display.client; var win = X.AllocID(); X.CreateWindow( win,client.display.screen[0].root, 0,0,100,100, 0,0,0,0, { eventMask: x11.eventMask.Exposure | x11.eventMask.PointerMotion } ); X.MapWindow(win); client.xlib.SetWMName(win,"Hello, world"); }); ```