<?php
/*load the php_gtk module*/
dl('php_gtk.' . (strstr(PHP_OS, 'WIN') ? 'dll' : 'so')) ||
die("Can't load php_gtk module!\n");
/*create the main window*/
$window = &new GtkWindow();
/*ensure that the destruction of the main window also kills the main loop*/
$window->connect_object('destroy', array('gtk', 'main_quit'));
/*realize the underlying GdkWindow, flag the GtkWindow's visibility and map
it onto the screen, all in one simple line*/
$window->show();
/*without the main loop, there is no PHP-GTK script*/
gtk::main();
?>
|