cairo install
$ wget https://pecl.php.net/get/Cairo-0.3.2.tgz
$ cd Cairo
$ phpize
$ make
$ make install
$ vi path/to/php.ini // add extension=cairo.so
Slide 102
Slide 102 text
php-gtk install
$ git clone https://github.com/php/php-gtk-src
$ cd php-gtk-src
$./buildconf
$ ./configure
$ make
$ make install
$ vi path/to/php.ini // add extension=php_gtk2.so
Slide 103
Slide 103 text
run demo
» demosҎԼʹ৭ʑ͋Γ·͢
$ cd demos
$ php phpgtk2-demo.php
2017-08-05 00:47:12.529 php[43302:71455160]
*** WARNING: Method userSpaceScaleFactor in class NSView is
deprecated on 10.7 and later. It should not be used in new
applications. Use convertRectToBacking: instead.
» (·͋ͳΜ͔WarnͰ·͚͢Ͳɺݟͳ͔ͬͨ͜ͱʹ͠
·͠ΐ͏
Slide 104
Slide 104 text
όόʔϯʂ
Slide 105
Slide 105 text
No content
Slide 106
Slide 106 text
No content
Slide 107
Slide 107 text
No content
Slide 108
Slide 108 text
ʮLinuxͱ͔ͰΑ͘ΈΔͭͩʂʯ
Slide 109
Slide 109 text
class ButtonBox extends GtkWindow
{
function __construct($parent = null)
{
parent::__construct();
if ($parent) $this->set_screen($parent->get_screen());
else $this->connect_simple('destroy', array('gtk', 'main_quit'));
$this->set_title(__CLASS__);
$this->set_position(Gtk::WIN_POS_CENTER);
$this->set_default_size(-1, 500);
$this->set_border_width(8);
$this->add($this->__create_box());
$this->show_all();
}
/* .... */
if (!@$GLOBALS['framework']) {
new ButtonBox();
Gtk::main();
}
Slide 110
Slide 110 text
function create_framedbox($horizontal, $title, $spacing, $layout)
{
$frame = new GtkFrame($title);
if ($horizontal) {
$box = new GtkHButtonBox();
} else {
$box = new GtkVButtonBox();
}
$box->set_border_width(5);
$box->set_layout($layout);
$box->set_spacing($spacing);
$frame->add($box);
$button = GtkButton::new_from_stock(Gtk::STOCK_OK);
$box->add($button);
Fatal error:
Allowed memory size of 134217728 bytes
exhausted
(tried to allocate
18446744073709551396 bytes
) in /tmp/phptk/tk-0.1.1/test.php on line 4
Segmentation fault: 11
PocketMine-MP
» MineCraft PocketEditionͷαʔόʔ
» https://github.com/pmmp/PocketMine-MP
» A highly customisable, open source server
software for Minecraft: Pocket Edition written
in PHP
» (ଞʹɺiTXTech/Genisysͱ͔͋Δʣ
Slide 194
Slide 194 text
UltimaPHP
» Ultima Online ͷOpensourceαʔόʔ
» https://github.com/joaoescribano/UltimaPHP
» UltimaPHP is a modern Ultima Online server
written in PHP 7.0
» ʢ͔ͭͬͨ͜ͱͳ͍ʣ