1public class MyWindow : Gtk.ApplicationWindow { 2 internal MyWindow (MyApplication app) { 3 Object (application: app, title: "Welcome to GNOME"); 4 5 var label = new Gtk.Label ("Hello GNOME!"); 6 7 this.add (label); 8 this.set_default_size (200, 100); 9 this.show_all (); 10 } 11} 12 13public class MyApplication : Gtk.Application { 14 protected override void activate () { 15 new MyWindow (this).show (); 16 } 17 18 internal MyApplication () { 19 Object (application_id: "org.example.MyApplication"); 20 } 21} 22 23public int main (string[] args) { 24 return new MyApplication ().run (args); 25} 26