这是PHP的一个子计划,目的要使php成为一种标准的编程语言而非单纯的脚本语言。
使用PHP-GTK可以在图形界面的系统中编写图形界面的应用程序,使用php编写应用的客户端。这样服务器端、客户端都可以使用php来编写了。
使用PHP-GTK可以在图形界面的系统中编写图形界面的应用程序,使用php编写应用的客户端。这样服务器端、客户端都可以使用php来编写了。
解决方案 »
- id_dir 不起作用(server 2003 ) IIS环境下
- 获取用户输入的网站地址
- 请问如何获得统计显示出来的数值分页显示
- windows2003+iis+php,smtp发送邮件失败,请指点!
- 急,帮小妹一个忙,怎么样能通过点击一个<td>里面的按钮,改变下面一个<td>的图片呢?
- !$this->alias && $this->alias = $this->table; 这条语句是如何执行的?
- php函数优先级问题
- fckeditor插入图片时弹出图像属性窗口的大小控制?
- preg_replace()错误
- 是哪个dll提供了ocilogon()等函数?
- 有关删除文件的问题?很着急!
- php里怎样更新多条数据,用什么来实现?
http://gtk.php.net
http://www.gtk.org
http://gtk-gnutella.sourceforge.net/
http://gtk.php-coder.net
http://phpklik.dhs.org/phpgtk/
http://www.phpuk.org/gtk
if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN')
dl('php_gtk.dll');
else
dl('php_gtk.so'); /*
* Called when delete-event happens. Returns false to indicate that
* the event should proceed.
*/
function delete_event()
{
return false;
} /*
* Called when the window is being destroyed. Simply quit the main loop.
*/
function destroy()
{
Gtk::main_quit();
} /*
* Called when button is clicked. Print the message and destroy the
* window.
*/
function hello()
{
global $window;
print "Hello World!\n";
$window->destroy();
} /*
* Create a new top-level window and connect the signals to the
* appropriate functions. Note that all constructors must be
* assigned by reference.
*/
$window = &new GtkWindow();
$window->connect('destroy', 'destroy');
$window->connect('delete-event', 'delete_event');
$window->set_border_width(10); /*
* Create a button, connect its clicked signal to hello() function and
* add the button to the window.
*/
$button = &new GtkButton('Hello World!');
$button->connect('clicked', 'hello');
$window->add($button); /*
* Create a new tooltips object and use it to set a tooltip for the
* button.
*/
$tt = &new GtkTooltips();
$tt->set_delay(200);
$tt->set_tip($button, 'Prints "Hello World!"', '');
$tt->enable(); /*
* Show the window and all its child widgets.
*/
$window->show_all(); /* Run the main loop. */
Gtk::main();
?>
What is GTK+?
A History of GTK+
GTK+ was originally developed for GIMP, the GNU Image Manipulation Program. GTK+ stands for the GIMP Tool Kit. GTK+ has grown from these beginnings and is now used as a central part of Gnome, the GNU Projects desktop environment. GTK+ has also been ported to BeOS and Win32, which makes it the perfect choice to use as the basis for a PHP extension, keeping PHP as cross-platform as possible and allowing the creation of Windowed applications in PHP for Linux, BeOS and Windows. What does GTK+ do?
GTK+ is a set of libraries written in C to create graphical user interfaces. It has an object oriented architecture developed in three libraries:
GLib provides various tools for use when programming with GTK+. GDK abstracts the low-level window drawing functions. GTK provides a set of widgets for use when creating your GUI.