Skip to content
This repository has been archived by the owner on Mar 18, 2022. It is now read-only.

kmaestro/php-ffi-gtk3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The project is moved to https://github.com/PHP-GTK/gtk

Requirement

  • php (8.1)
  • ext-FFI
  • gtk-3

Installation

composer require kmaestro/gtk

Linux

sudo apt-get install libgtk-3-dev

Example:

require __DIR__ . '/vendor/autoload.php';

use Gtk3\Gtk;
use Gtk3\Gtk\Window;
use Gtk3\Enum\WindowEnum;

$gtk = Gtk::getInstance();

$gtk->init();

$window = new Window(WindowEnum::topLevel);
$window->widget()->show();

$gtk->main();

return 0;