Advertisement
nemolaod

TEST #1

Jan 31st, 2013
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Vala 0.65 KB | None | 0 0
  1. using Gtk;
  2.  
  3. [CCode (cname = "G_MODULE_EXPORT on_button1_clicked")]
  4. public void on_button1_clicked (Button source) {
  5.     entry.set_text("TEST NUMBER ONE!");
  6. }
  7.  
  8. public void on_window1_destroy (Window source) {
  9.     Gtk.main_quit ();
  10. }
  11.  
  12. int main (string[] args) {    
  13.     Gtk.init (ref args);
  14.  
  15.     var builder = new Builder ();
  16.     builder.add_from_file ("sample.ui");
  17.     builder.connect_signals (null);
  18.     var window = builder.get_object ("window1") as Window;
  19.     var entry = builder.get_object ("entry1") as Entry;
  20.     var button = builder.get_object ("button1") as Button;
  21.    
  22.     window.show_all ();
  23.     Gtk.main ();
  24.  
  25.     return 0;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement