PHP-GTK

From Openmoko

(Difference between revisions)
Jump to: navigation, search
(New page: PHP-GTK is an extension for PHP, which enables you to write real applications with a GTK-interface. This works very well on the OpenMoko, and some applications have already been written. ...)
 
(-cat)
 
(11 intermediate revisions by 4 users not shown)
Line 1: Line 1:
PHP-GTK is an extension for PHP, which enables you to write real applications with a GTK-interface. This works very well on the OpenMoko, and some applications have already been written.
+
== What is it? ==
  
 +
[http://gtk.php.net PHP-GTK] is an extension for [http://php.net PHP], which enables you to write real applications with a GTK-interface in PHP. This works really well on the Openmoko, and some applications have already been written.
 +
 +
== Hello World example ==
 +
<?php
 +
  dl("php_gtk2.so");
 +
 
 +
  class MyWindow{
 +
    function __construct(){
 +
      $this->window = new GtkWindow();
 +
      $this->label = new GtkLabel("Hello world");
 +
      $this->window->add($this->label);
 +
      $this->window->show_all();
 +
    }
 +
  }
 +
 
 +
  $my_window = new MyWindow();
 +
  Gtk::main();
 +
?>
 +
 +
 +
== How to get it? ==
  
 
[http://derickrethans.nl/who.php Derick Rethans] has ported PHP and PHP-GTK for the OpenMoko, which you can read more about on [http://derickrethans.nl/index.php his blog] in [http://derickrethans.nl/php_on_openmoko.php this post].
 
[http://derickrethans.nl/who.php Derick Rethans] has ported PHP and PHP-GTK for the OpenMoko, which you can read more about on [http://derickrethans.nl/index.php his blog] in [http://derickrethans.nl/php_on_openmoko.php this post].
  
 +
There has already been set up a repository called [[Knjrepository]] by [[User:Kaspernj|Kaspernj]], which includes these packages amongst many others.
  
There has already been set up a repository called [[Knjrepository]], which includes these packages.
+
[[Category:Application Developer]]

Latest revision as of 13:27, 19 July 2009

[edit] What is it?

PHP-GTK is an extension for PHP, which enables you to write real applications with a GTK-interface in PHP. This works really well on the Openmoko, and some applications have already been written.

[edit] Hello World example

<?php
 dl("php_gtk2.so");
 
 class MyWindow{
   function __construct(){
     $this->window = new GtkWindow();
     $this->label = new GtkLabel("Hello world");
     $this->window->add($this->label);
     $this->window->show_all();
   }
 }
 
 $my_window = new MyWindow();
 Gtk::main();
?>


[edit] How to get it?

Derick Rethans has ported PHP and PHP-GTK for the OpenMoko, which you can read more about on his blog in this post.

There has already been set up a repository called Knjrepository by Kaspernj, which includes these packages amongst many others.

Personal tools

PHP-GTK is an extension for PHP, which enables you to write real applications with a GTK-interface. This works very well on the OpenMoko, and some applications have already been written.


Derick Rethans has ported PHP and PHP-GTK for the OpenMoko, which you can read more about on his blog in this post.


There has already been set up a repository called Knjrepository, which includes these packages.