How to use node-gtk - 4 common examples

To help you get started, we’ve selected a few node-gtk examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github codejamninja / react-gtk / packages / binding / src / gtk.ts View on Github external
function getGtk(version = '3.0') {
  const Gtk = nodeGtk.require('Gtk', version);
  if (!initialized) {
    initialized = true;
    nodeGtk.startLoop();
    Gtk.init();
  }
  return Gtk;
}
github WebReflection / jsgtk / experiments / hello-gtk.js View on Github external
#!/usr/bin/env jsgtk

var
  GNode = require('node-gtk'),
  Gtk = GNode.importNS('Gtk'),
  win
;

GNode.startLoop();
Gtk.init(null);

win = new Gtk.Window({
  title: 'jsgtk',
  window_position: Gtk.WindowPosition.CENTER
});

win.connect('show', Gtk.main);
win.connect('destroy', Gtk.main_quit);

win.set_default_size(200, 80);
win.add(new Gtk.Label({label: 'Hello Gtk+'}));

win.show_all();
github codejamninja / react-gtk / packages / binding / src / gtk.ts View on Github external
function getGtk(version = '3.0') {
  const Gtk = nodeGtk.require('Gtk', version);
  if (!initialized) {
    initialized = true;
    nodeGtk.startLoop();
    Gtk.init();
  }
  return Gtk;
}
github WebReflection / jsgtk / experiments / hello-gtk.js View on Github external
#!/usr/bin/env jsgtk

var
  GNode = require('node-gtk'),
  Gtk = GNode.importNS('Gtk'),
  win
;

GNode.startLoop();
Gtk.init(null);

win = new Gtk.Window({
  title: 'jsgtk',
  window_position: Gtk.WindowPosition.CENTER
});

win.connect('show', Gtk.main);
win.connect('destroy', Gtk.main_quit);

win.set_default_size(200, 80);
win.add(new Gtk.Label({label: 'Hello Gtk+'}));

node-gtk

GNOME Gtk+ bindings for NodeJS

MIT
Latest version published 9 months ago

Package Health Score

62 / 100
Full package analysis