Guest User

Untitled

a guest
Sep 16th, 2018
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Vala 0.64 KB | None | 0 0
  1.  
  2. public class helloworld : Granite.Application {
  3.  
  4.     construct {
  5.         program_name = "Hello world";
  6.     }
  7.    
  8.     public void helloword () {
  9.    
  10.         var w = new Granite.Widgets.LightWindow ("Hello world");
  11.         var b = new Gtk.Box (Gtk.Orientation.VERTICAL, 0);
  12.         var label = new Gtk.Label ("helloword");
  13.  
  14.         b.pack_start (label);
  15.  
  16.         w.set_size_request (100, 100);
  17.         w.set_application (this);
  18.         w.add (b);
  19.         w.show_all ();
  20.         w.resizable = false;
  21.        
  22.     }
  23.  
  24. }
  25.  
  26. public static int main (string [] args) {
  27.     Gtk.init (ref args);
  28.     return new helloword ().run (args);
  29. }
Add Comment
Please, Sign In to add comment