Gtk Basic Window
主要範例
#!/usr/bin/gjs
const Gtk = imports.gi.Gtk;
Gtk.init(null, null);
var win = new Gtk.Window({
type: Gtk.WindowType.TOPLEVEL
});
win.connect('delete-event', Gtk.main_quit);
win.show_all();
Gtk.main();
API
- Gtk-3.0 / Gtk.Window
- Gtk-3.0 / Gtk.WindowType
- RooJS / Gtk.WindowType
WindowType
- Gtk.WindowType.TOPLEVEL
- Gtk.WindowType.POPUP
更多參考
- Arch Wiki / GTK+/Development / 1 Write a simple message dialog app / 1.16 JavaScript
- Github / Gnome / gjs / examples / gtk.js
- GNOME Developer Platform Demos / Tutorials, code samples and platform demos in JavaScript / Tutorial for beginners and code samples / Window
- GNOME application development overview / stable / Get started