Archive for the 'PHP-GTK' Category

PHP-GTK 2 Alpha Released

Tuesday, July 18th, 2006

The PHP-GTK team is pleased to announce the release of PHP-GTK 2.0.0alpha.

This is the first release of PHP-GTK 2. PHP-GTK 2 is a PHP extension that combines the power and flexibility of both PHP 5 and GTK+ 2 to allow developers to create stand-alone desktop GUI applications using PHP.

This is a preview release that should be used only with the understanding that the software may contain bugs and that certain minor features may need to be adjusted before the final release. We encourage widespread testing and feedback via the PHP-GTK development mailing list.

PHP-GTK 2.0.0alpha can be downloaded from the PHP-GTK website: http://gtk.php.net/download.php

Users looking for help with the new release are encouraged to read the PHP-GTK 2 manual or contact the PHP-GTK General mailing list.

PHP-GTK News #20

Thursday, July 6th, 2006

Another slow week for PHP-GTK. It appears that development efforts have fallen off as yet another week has passed while we wait for an initial alpha release. But, that doesn’t mean that nothing has happened. Here are the headlines for the week of June 28th through July 5th.

  • A few development patches
  • UTF-8 Issues with GtkScintilla Resolved
  • A few documentation updates

Read on for the details…

Development

Development patches this week:

Scintilla UTF-8 Issues Resolved:
Anant applied a patch this week that helps GtkScintilla handle text of different encodings properly. It converts text from UTF-8 to the needed encoding before applying it to the Scintilla widget.

Documentation

Documentation Updates:

PHP-GTK News #19

Wednesday, June 28th, 2006

The week of June 21st through the 28th was a rather quite week for PHP-GTK. There was actually a lot of chatter on the development mailing list but most of it didn’t lead to any news items.

Anyway, here are the headlines for this week:

  • More patches
  • A new A/R/T article is available
  • PHP-GTK 1.x installer for Mac OSX available
  • PHP-GTK 2 presentation online
  • Additions to GxLib

Read on for the details…

Development

More Patches:
GdkPixmap::add_alpha() - allows a developer to add an alpha channel to a pixmap
GdkPixmap::create_from_xpm() - creates a pixmap from an XPM file. XPMs are images similar to ascii art, where each character represents a color.
GdkPixmap::create_from_xpm_d() - creates a pixmap from XPM data in memory.

General

A/R/T article:
The third article, “Managing Layout in PHP-GTK 2″, in PHP|Architect’s A/R/T series on PHP-GTK 2 is now available. This article talks about how to manage layout in PHP-GTK 2. It goes into the relationships between parents and children and shows how to create a flexible UI that maintains its appearance no matter what the user does to the main window.

PHP-GTK 1.x App released for OSX:
Ben Smith has released an application which sets up a PHP-GTK 1.x environment on Mac OSX. It provides the base needed for PHP-GTK applications to run on OSX. He offers a package with instructions for building the environment or a php_gtk.so module for download. For more details see: http://chico.benjamindsmith.com/phpgtk_osx/

NYPHP Presentation:
Scott Mattocks (who apparently like to talk about himself in the third person) gave a presentation this week to the New York PHP user’s group about PHP-GTK 2. The talk focused on introducing the group to the capabilities of PHP-GTK 2. It covered the main topics or PHP-GTK 2 developement: parent/child relationships, events & signals, model/view architecture, and customizing the look and feel. The presentation can be found online at: http://crisscott.com/talks/introPHPGTK2.html
He will presenting again at the Long Island PHP user’s group meeting in late July and at the Boston PHP user’s group meeting in early August.

IRC

Additions to GxLib:
Marc Quinton has expanded on his GxLib package to provide more examples of its capabilities. The new package includes three more games: Snake, Reversi Color, and Tetris.

PHP|A: Managing Layout with PHP-GTK 2

Friday, June 23rd, 2006

The next article, “Managing Layout with PHP-GTK 2″, in the PHP-GTK 2 series on PHP|Architect’s A/R/T article repository is available.

One of the hardest parts about getting started with PHP-GTK is understanding how to properly layout the user interface. It can be very frustrating to finally get an application laid out just right, only to see it horribly disfigured when the user expands or shrinks the window. Part III of this series focuses on how to manage the relationships between parents and children in such a way that the application behaves well no matter what the user does to the window.

The full article can be found at PHP|Architect.

PHP-GTK News #18

Wednesday, June 21st, 2006

This week’s PHP-GTK News is again full of development patches as the push toward an alpha release continues. In addition, there is the announcement of an upcoming PHP-GTK 2 talk and a new 2D graphics package written in PHP-GTK 2.

Here’s the news in brief:

  • Gtk::timeout_add() memory leak fixed
  • TreeModel delete row crash will not be fixed
  • A slew of patches
  • A couple of documentation updates
  • A PHP-GTK 2 talk is scheduled for php|works
  • A 2D graphics package for PHP-GTK 2 is now available

Read on for details of the PHP-GTK news for June 14th through the 21st.

Development

GtkTreeModel Delete Row Crash:
The previously reported crash that occurs when trying to delete GtkTreeModel rows while in a foreach() callback, will not be fixed. This is because it is a known issue with Gtk+. During the callbacks called by some methods, such as foreach(), you may not delete rows of a model. Doing so causes a double free memory corruption.
To get around this, you can create an array of iters for the rows that are to be deleted during the foreach call and then delete them later.

Memory Leak Fixed:
The previously reported memory leak (bug #37787) which occured when Gtk::timeout_add() was used within a class, has been fixed. It is now safe to use Gtk::timeout_add() anywhere.

More Patches:
This weeks patches have pushed the development coverage up to 88%!
GtkColorSelection::get_color()
GtkColorSelection::set_color()
GtkEntryCompletion::get_text_column()
GtkEntryCompletion::set_match_func()
GtkFileFilter::list_filters()
GtkFileFilter::list_shortcut_folders()
GtkFileFilter::list_shortcut_folder_uris()
GtkSourceView::get_mime_types()
GtkSourceView::get_tags()
GtkTextTagTable::foreach()
GtkTreeSelection::selected_foreach()
GtkTreeSelection::set_select_function()
GtkTreeView::set_search_equal_func()
GtkTreeView::set_column_drag_function()

Documentation

Documentation Updates: (coverage)
GtkEntryCompletion (Pablo)
GtkMessageDialog (Scott)

General

PHP|Works:
Andrei has been selected to give a talk at PHP|Works in Toronto this September. His talk, simply titled “PHP-GTK 2″ will take place on the last day of the conference. Anyone interested in learning about PHP-GTK 2 from the creator himself, should definitely try to attend.

IRC

GxLib 2D Graphics Package:
Marc Quinton from the PHP-GTK IRC channel (#php-gtk on freenode) has created a 2d graphics package, called GxLib, for PHP-GTK 2. The package allows for transformations of lines and simple shapes. It is a very interesting example of what can be done with PHP-GTK 2.