01 May 2013 - After the site upgrade, all passwords were reset and you will need to ask the site for a login reset on your first connection.

PHP-GTK 1

Version 1.0.*

Deep Dungeons

Deep Dungeons is a classic Role-Playing-Game, in 2D ! "Au menu": Heroes, monsters, dungeons, swords, gold, bugs... ;-)

Maximize application window

Warning: this tip is only for Win32 versions of PHP-GTK.

<?php if (!extension_loaded('gtk')) { dl( 'php_gtk.' . PHP_SHLIB_SUFFIX); dl("php_w32api.dll"); } // start windows api class $api = &new win32; // defines define('SW_MAXIMIZE',3); define('SW_MINIMIZE',6); //register window functions $api->registerfunction( "long GetLastError Alias GetError () From kernel32.dll"); $api->registerfunction( "long FindWindow (string &ClassName, string &WindowName) From user32.dll"); $api->registerfunction( "long ShowWindow (long hWnd, long nCmdShow)

Simulating wait loops

How to use a loop, for you might want to make an IRC client :)

I had trouble finding this out, so here it is. If you want to manage a network connection (i.e. an IRC connection) you need a while (1) {} loop.

This cannot be done in PHP-GTK, because of the gtk::main() function. So, there is the gtk::timeout_add($time, $function) that executes a function every $time milliseconds. This solves our problem.

Important

Your function must return TRUE else it will not be called again. Return FALSE to cancel the timeout.

How to empty a GtkHBox or GtkVBox

These examples show how to empty instances of classes derived from GtkContainer.

Capture GtkCList selection

You have to connect the button-release-event after all other functions have worked.

A landmark in PHP-GTK life

Andrei Zmievski, creator and lead coder of the PHP-GTK project, posted a long "letter to the community" today, which is poised to mark a turning point in the history of the project, after a long period of stagnation.

It is available on archive of the php-gtk-general mailing list, for instance on the MARC Archive.

Inhalt abgleichen