Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using Gtk;
- [CCode (cname = "G_MODULE_EXPORT on_button1_clicked")]
- public void on_button1_clicked (Button source) {
- entry.set_text("TEST NUMBER ONE!");
- }
- public void on_window1_destroy (Window source) {
- Gtk.main_quit ();
- }
- int main (string[] args) {
- Gtk.init (ref args);
- var builder = new Builder ();
- builder.add_from_file ("sample.ui");
- builder.connect_signals (null);
- var window = builder.get_object ("window1") as Window;
- var entry = builder.get_object ("entry1") as Entry;
- var button = builder.get_object ("button1") as Button;
- window.show_all ();
- Gtk.main ();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement