Skip to content

Instantly share code, notes, and snippets.

@Miuler
Created December 8, 2014 22:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Miuler/9c894fcf9efd0369bb8b to your computer and use it in GitHub Desktop.
Save Miuler/9c894fcf9efd0369bb8b to your computer and use it in GitHub Desktop.
const Gtk = imports.gi.Gtk;
const GLib = imports.gi.GLib;
// Initialize the gtk
Gtk.init(null, 0);
let mwindow = new Gtk.Window ({type : Gtk.WindowType.TOPLEVEL});
let label = new Gtk.Label ({label : "Hello World"});
// Set the window title
mwindow.title = "Hello World!";
mwindow.connect ("destroy", function(){Gtk.main_quit()});
// Add the label
mwindow.add (label);
// Show the widgets
label.show ();
mwindow.show();
Gtk.main();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment