Skip to content

Commit

Permalink
add api
Browse files Browse the repository at this point in the history
  • Loading branch information
chopins committed Sep 13, 2020
1 parent 870e053 commit aa7c228
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
],
"homepage": "http://toknot.com",
"license": "BSD-3-Clause",
"version": "0.1",
"version": "0.1.1",
"authors": [
{
"name": "Szopen Xiao",
Expand Down
4 changes: 4 additions & 0 deletions src/GtkWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ public static function init(PHPGtk $gtk)
}
}

public static function getGtkApp() {
return self::$gtkApp;
}

private function __construct($widget)
{
$this->widget = $widget;
Expand Down
2 changes: 2 additions & 0 deletions tests/devtest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
// Create the main window
$mainwin = $gtk->gtk_window_new(GtkEnum::GTK_WINDOW_TOPLEVEL);

\Gtk\GtkWidget::init($gtk);

new \Gtk\WindowWidget();

$b = $gtk->gtk_builder_new_from_string('<?xml version="1.0" encoding="UTF-8"?><interface><object class="GtkEntry" id="entry1"><property name="invisible_char">*</property></object></interface>', -1);
$obj = $gtk->gtk_builder_get_object($b, 'entry1');
Expand Down

0 comments on commit aa7c228

Please sign in to comment.