sidorares / ntk

node.js desktop UI toolkit
91 stars 12 forks source link

implement basic ICCCM #19

Open sidorares opened 8 years ago

sidorares commented 8 years ago

potentially as a separate library or as part of https://github.com/santigimeno/node-ewmh

http://www.x.org/docs/ICCCM/icccm.pdf https://tronche.com/gui/x/icccm/

At least handle window deletion protocol properly - https://tronche.com/gui/x/icccm/sec-4.html#s-4.2.8.1

sidorares commented 8 years ago

api:

// arguments properties when window is created
// can have properties from WM_HINTS, WM_NORMAL_HINTS, WM_PROTOCOLS, WM_TRANSIENT_FOR

app.root().createWindow({
   width: 100,
   height: 100,

   icon: myIcon, // integer or Pixmap -> WM_HINTS. icon_pixmap
   transientFor: mainWnd, // integer or Window
   maxWidth: 800   
});

//or call to setHints() to modify later
wnd.setHints({ transientFor: otherWnd, maxWidth: 900 });