Migration to Main Manual
The PHP-GTK manual will be integrated into the main PHP manual as an extension.
Create branches to phpdoc/doc-base and phpdoc/en Patch docgen.php script for PHP-GTK-specific Reflection idiosyncrasies.
- Create new docgen template set for PHP-GTK. In Progress
- gtk/chapter.tpl (GTK+ sub-extensions)
fields (aka GObject properties)
- gtk/part.tpl (sub-extension parts)
- Finalize book format
- Copy as much well-formed documentation as possible from the old manual, without muddying the new format.
- Fill in any glaringly-missing documentation
- Merge branch into phpdoc/en/trunk/
phpdoc/doc-base/branches/gtk-docgen/: A fork of the docgen scripts to accommodate PHP-GTK's Reflection idiosyncrasies.
phpdoc/en/branches/php-gtk/: Branching the main manual so that our work on the PHP-GTK book doesn't interfere with “normal operations.”
phpdoc/modules/doc-gtk/: Module for checking out PHP-GTK externals into a single working copy.
PHP-GTK does not currently have proper Reflection data, beyond regular class->method, and such, linking. This means that the docgen.php script, which relies heavily on Reflection information, does not function properly without modification.
The current solution to this issue is to utilize the .defs files present in the PHP-GTK extension sources, which themselves establish which classes exist in the extension. This is done by simply reading in all of the .defs files, then regex'ing them for of-object specifications, then running array_unique on the resulting set of class names. This produces a list of all defined classes in PHP-GTK.
PHP-GTK utilizes some constructs that are not present in other extensions; or, at least, are not standard. These need to be marked up specially for PHP-GTK.
Each widget class in PHP-GTK has a set of associated properties which are separate from both its member properties and inherited properties. These “GObject properties” are enumerated using GObject::list_properties(int gtype), where gtype is ClassName::gtype.
Each widget class in PHP-GTK has a set of signals, which are essentially callback names for certain actions. One example is the GtkButton “clicked” signal, which is emitted when a user clicks on that GtkButton widget.
These signals can simply be marked up as a variant of the method format, as they are primarily callbacks. There are a few bits of information that are important to be clearly documented for each signal:
Each signal has a signal ID associated with it.
Each signal has a name.
- Emitting Classes
The list of classes which emit that signal
The signal flags are used to specify a signal's behaviour, the overall signal description outlines how the stages of a signal emission occur.
- Return Type
Each signal handler callback accepts certain parameters, which are passed in when called. This is usually at the very least the object which emitted the signal.
- PHP-GTK (Book)
- GTK+ (Part)
- ATK (Chapter)
- GDK (Chapter)
- GTK (Chapter)
- Pango (Chapter)
- Extra (Part)
- [...] (Part)