Commit | Line | Data |
---|---|---|
21c4e167 H |
1 | #!/usr/bin/php -c/etc/php/php-gtk.ini |
2 | #GTK Hello world! by Harvie 2oo9 | |
3 | ||
4 | <?php | |
5 | ||
6 | if (!class_exists('gtk')) { | |
7 | die("Please load the php-gtk2 module in your php.ini\r\n"); | |
8 | } | |
9 | ||
10 | $wnd = new GtkWindow(); | |
11 | $wnd->set_title('Hello world'); | |
12 | $wnd->connect_simple('destroy', array('gtk', 'main_quit')); | |
13 | ||
14 | $lblHello = new GtkLabel("Just wanted to say\r\n'Hello world!'"); | |
15 | $wnd->add($lblHello); | |
16 | ||
17 | $wnd->show_all(); | |
18 | Gtk::main(); | |
19 | ?> |