PHP-GTK

PHP-GTK

Infobox Software
name = PHP-GTK

caption = PHP-GTK Logo
developer = Andrei Zmievski
latest_release_version = 2.0.1
latest_release_date = May 16 2008
latest_preview_version =
latest_preview_date =
operating_system = Cross-platform
genre = Language binding
license = GNU Lesser General Public License
website = http://gtk.php.net/

PHP-GTK is a set of language bindings for PHP which allow GTK+ GUI applications to be written in PHP. PHP-GTK provides an object-oriented interface to GTK+ classes and functions.

History

PHP-GTK was originally conceived by Andrei Zmievski, who is also actively involved in the development of PHP and the Zend Engine. The idea was received well by the PHP community, and more people started to get involved with the project. James Moore and Steph Fox were among the first to join in, contributing a great deal to PHP-GTK through their documentation efforts, and Frank Kromann - also from the PHP development team - supplied Windows binaries for the project.

The first version of PHP-GTK was released in March 2001. More people began to get involved, and several extensions were contributed introducing new widgets, such as Scintilla and [http://freshmeat.net/projects/libgtkhtml/ GtkHTML] . PHP-GTK 1.0 was released in October 2003 alongside several extensions — including a wrapper for libglade, which allowed the cross-platform Glade UI builder to be used in creating PHP-GTK applications.

Present

PHP-GTK was quickly adopted by the PHP community. Several applications were developed, and a small job market even emerged. Zmievski and Fox are still working hard on the project, with Fox now maintaining PHP-GTK for Windows.

Development is in full swing for the next major version of PHP-GTK. PHP-GTK 2 fully utilizes PHP 5's powerful object model support, and brings the improved portability of GTK 2.6 as well as its new set of widgets. The project also has some new extensions such as GtkSourceView, which provides a rich source editor widget, alongside some of the old favourites.

Documentation for PHP-GTK 2 is filling out rapidly. Several articles and tutorials have been written on the topic, and around half the classes have been fully documented. Scott Mattocks, an active member of the PHP-GTK documentation group, has also written a book on the subject of PHP-GTK programming. [cite book|title=Pro PHP-GTK|first=Scott|last=Mattocks|id=ISBN 1-59059-613-7]

Example

function pressed(){ echo "Hello again - The button was pressed! ";}

$window = new GtkWindow();$button = new GtkButton('Click Me');

$window->set_title('Hello World!');$window->connect_simple('destroy', array('Gtk', 'main_quit'));$button->connect_simple('clicked', 'pressed');

$window->add($button);$window->show_all();

Gtk::main();

?>

The sample PHP-GTK 2 program instantiates a GtkWindow widget with the title "Hello World!", containing a GtkButton labelled "Click Me." When the button is pressed, the message "Hello again - The button was pressed!" is displayed on the console via the callback pressed.

Deployment

Several tools have sprung up that assist the simple deployment of PHP-GTK applications. PHP compilers such as [http://www.priadoblender.com PriadoBlender] and Roadsend PHP (Currently only compatible with PHP-GTK 1) enable the compilation of applications written in PHP-GTK to a standalone binary executable. Alan Knowles' PECL package, [http://pecl.php.net/package/bcompiler bcompiler] , also allows compilation of PHP into bytecode to protect the source.

[http://www.gnope.org Gnope] is a tool providing a straightforward means of deployment under Windows. It allows transparent installation of PHP-GTK 2, and applications written using it, through Gnope's own PEAR-compatible channel.

References

External links

* [http://gtk.php.net/ Official website]
* [http://php-gtk.eu/ Community site]
* [http://www.php-gtk.com.br/ Brazilian community site] pt icon


Wikimedia Foundation. 2010.

Игры ⚽ Нужен реферат?

Look at other dictionaries:

  • Php-gtk — est une extension libre de PHP qui utilise la bibliothèque GTK+ pour créer des applications graphiques. Elle est distribuée selon les termes de la licence GNU LGPL. Sommaire 1 Histoire 2 Utilisation 3 Exemple …   Wikipédia en Français

  • PHP-GTK — est une extension libre de PHP qui utilise la bibliothèque GTK+ pour créer des applications graphiques. Elle est distribuée selon les termes de la licence GNU LGPL. Sommaire 1 Histoire 2 Utilisation 3 Exemple …   Wikipédia en Français

  • PHP-GTK — Тип Библиотека Разработчик Andrei Zmievski Операционная система Кроссплатформенный Последняя версия 2.0.1 (16 мая 2008) …   Википедия

  • PHP-GTK — Desarrollador Andrei Zmievski gtk.php.net Información general Última versión estable 2.0.1 16 de mayo de 2008 …   Wikipedia Español

  • GTK+ — Entwickler Das GTK+ Team[1] Aktuelle Version 3.2.2 (12. November 2011) …   Deutsch Wikipedia

  • GTK+ — Тип библиотека элементов интерфейса (виджетов) Автор The GTK+ …   Википедия

  • PHP/FI — PHP serverseitig interpretierte Skriptsprache Basisdaten Paradigmen: imperativ, objektorientiert Erscheinungsjahr …   Deutsch Wikipedia

  • PHP: Hypertext Preprocessor — PHP serverseitig interpretierte Skriptsprache Basisdaten Paradigmen: imperativ, objektorientiert Erscheinungsjahr …   Deutsch Wikipedia

  • PHP (Programmiersprache) — PHP serverseitig interpretierte Skriptsprache Basisdaten Paradigmen: imperativ, objektorientiert Erscheinungsjahr …   Deutsch Wikipedia

  • Php — serverseitig interpretierte Skriptsprache Basisdaten Paradigmen: imperativ, objektorientiert Erscheinungsjahr …   Deutsch Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”