unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Jan Nieuwenhuizen <janneke@gnu.org>
To: Mike Gran <spk121@yahoo.com>
Cc: guix-devel@gnu.org, guile-user@gnu.org
Subject: Re: [ANN] guile-gi v0.0.1 released
Date: Sat, 01 Jun 2019 11:02:21 +0200	[thread overview]
Message-ID: <874l59smoy.fsf@gnu.org> (raw)
In-Reply-To: <20181115144125.GA23468@joshua.dnsalias.com> (Mike Gran's message of "Thu, 15 Nov 2018 06:41:25 -0800")

[-- Attachment #1: Type: text/plain, Size: 852 bytes --]

Mike Gran writes:

> Hello. I am announcing guile-gi v0.0.1.

Wow, congrats!  And thanks!

> guile-gi is a library that autogenerates Guile bindings for GObject
> libraries that provide typelib files.

I've created a package description for Guix (see attached), with some
patches (also attached).

How is is that I overlooked this thread?  I spent last Thursday --
reluctantly -- adding webkitgtk bindings to guile-gnome and debugging
an initial browser test.  With Guile-GI it worked in minutes! :-)

One of the patches adds the web browser example and the last one adds an
editor example...but that segfaults in the key-press-event handler.

I've just noticed test/closures.c -- is that intended for handlers like
key-press-event; are they different from `clicked'?

Patches also on my `wip' branch: https://gitlab.com/janneke/guile-gi.git

janneke


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-guile-gi.patch --]
[-- Type: text/x-patch, Size: 3238 bytes --]

From f4602d57f74cb2690b01fb23638ce2037ccd9105 Mon Sep 17 00:00:00 2001
From: Jan Nieuwenhuizen <janneke@gnu.org>
Date: Fri, 31 May 2019 19:47:21 +0200
Subject: [PATCH] gnu: Add guile-gi.

* gnu/packages/guile-xyz.scm (guile-gi): New variable.
---
 gnu/packages/guile-xyz.scm | 42 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 365f909c2c..589e41dad2 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -53,8 +53,10 @@
   #:use-module (gnu packages gawk)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages gl)
+  #:use-module (gnu packages glib)
   #:use-module (gnu packages gnome)
   #:use-module (gnu packages gperf)
+  #:use-module (gnu packages gtk)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages hurd)
   #:use-module (gnu packages image)
@@ -76,6 +78,7 @@
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages version-control)
+  #:use-module (gnu packages webkit)
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xorg)
   #:use-module (guix packages)
@@ -2232,3 +2235,42 @@ slashes are present and accounted for, resolving @code{.} and @code{..}, etc).
 Inevitably, you have to break the string up into chunks and operate on that
 list of components.  This module takes care of that for you.")
     (license license:lgpl3+)))
+
+(define-public guile-gi
+  (let ((commit "91753258892c4a1fbf7ed43ff793a00ac0f77cf6")
+        (revision "0"))
+    (package
+      (name "guile-gi")
+      (version (string-append "0.0.1-" revision "." (string-take commit 7)))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://gitlab.com/janneke/guile-gi.git")
+                      (commit commit)))
+                (file-name (string-append name "-" version))
+                (sha256
+                 (base32
+                  "1i76jfs90p8pbx0bfrjd4sias9380pmjb9x387rx7hav4kvnsd1b"))))
+      (build-system gnu-build-system)
+      (native-inputs `(("autoconf" ,autoconf)
+                       ("automake" ,automake)
+                       ("gettext" ,gnu-gettext)
+                       ("libtool" ,libtool)
+                       ("pkg-config" ,pkg-config)
+                       ("texinfo" ,texinfo)))
+      (propagated-inputs `(("glib" ,glib)
+                           ("gobject-introspection" ,gobject-introspection)
+                           ("gssettings-desktop-schemas" ,gsettings-desktop-schemas)
+                           ("gtk+" ,gtk+)
+                           ("guile-lib" ,guile-lib)
+                           ("webkitgtk" ,webkitgtk)))
+      (inputs `(("guile" ,guile-2.2)))
+      (arguments
+       `(#:configure-flags '("--with-gnu-filesystem-hierarchy")))
+      (home-page "https://github.com/spk121/guile-gi")
+      (synopsis "GObject bindings for Guile")
+      (description
+       "Guile-GI is a library for Guile that allows using GObject-based
+libraries, such as GTK+3.  Its README comes with the disclaimer: This is
+pre-alpha code.")
+      (license license:gpl3+))))
-- 
2.21.0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0001-webkit-browser-example.patch --]
[-- Type: text/x-patch, Size: 3025 bytes --]

From f1ffa56b7ec078f0270eb6bba7a23faa11999db7 Mon Sep 17 00:00:00 2001
From: Jan Nieuwenhuizen <janneke@gnu.org>
Date: Fri, 31 May 2019 00:54:18 +0200
Subject: [PATCH 1/4] webkit browser example.

* test/browser.scm: New file.
---
 test/Makefile.am |  8 ++++++--
 test/browser.scm | 52 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 58 insertions(+), 2 deletions(-)
 create mode 100644 test/browser.scm

diff --git a/test/Makefile.am b/test/Makefile.am
index 5fae67d..e87bf99 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -46,5 +46,9 @@ AM_SCM_LOG_FLAGS = --no-auto-compile -L $(abs_top_srcdir)/src -L $(abs_top_srcdi
 EXTRA_DIST = \
   $(TESTS) \
   lib.scm \
-  automake-test-lib.scm \
-  example-1.scm
+  automake-test-lib.scm
+
+exampledir = $(datadir)/doc/guile-gi
+dist_example_DATA = \
+  example-1.scm \
+  browser.scm
diff --git a/test/browser.scm b/test/browser.scm
new file mode 100644
index 0000000..d262e53
--- /dev/null
+++ b/test/browser.scm
@@ -0,0 +1,52 @@
+;; Copyright (C) 2019  Michael L. Gran
+;; Copyright (C) 2019  Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+
+;; This program is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program.  If not, see <https:;;www.gnu.org/licenses/>.
+(use-modules (gi))
+
+(typelib-load "Gio" "2.0")
+(typelib-load "Gtk" "3.0")
+(typelib-load "GLib" "2.0")
+(typelib-load "WebKit2" "4.0")
+
+(define (print-hello widget data)
+  (display "Hello World\n"))
+
+(define (activate app user-data)
+  (let ((window (cast (ApplicationWindow-new app) <GtkApplicationWindow>))
+        (vbox (cast (VBox-new 0 0) <GtkVBox>))
+        (browser (cast (WebView-new) <WebKitWebView>))
+        (button-box (cast (ButtonBox-new 0) <GtkButtonBox>))
+        (button (Button-new-with-label "Hello World")))
+    (send window (set-title "Window"))
+    (send window (set-default-size 200 200))
+    (send window (show-all))
+    (send window (add vbox))
+    (send vbox (add browser))
+    (send vbox (add button-box))
+
+    (connect button (clicked print-hello #f))
+    (connect button (clicked (lambda x
+                               (send window (destroy)))
+                             #f))
+    (send browser (load-uri "http://gnu.org/s/mes"))
+    (send button-box (add button))
+    (send window (show-all))))
+
+(define (main)
+  (let ((app (Application-new "org.gtk.example" 0)))
+    (connect app (activate activate #f))
+    (send app (run (length (command-line)) (command-line)))))
+
+(main)
-- 
2.21.0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: 0002-build-compile-and-install-.go-files.patch --]
[-- Type: text/x-patch, Size: 2857 bytes --]

From ac0e08efce96f26d63911658dbdaecd16461f07e Mon Sep 17 00:00:00 2001
From: Jan Nieuwenhuizen <janneke@gnu.org>
Date: Fri, 31 May 2019 19:13:41 +0200
Subject: [PATCH 2/4] build: compile and install .go files.

---
 bootstrap       |  6 ++++++
 configure.ac    |  3 ++-
 src/Makefile.am | 11 +++++------
 3 files changed, 13 insertions(+), 7 deletions(-)
 create mode 100755 bootstrap

diff --git a/bootstrap b/bootstrap
new file mode 100755
index 0000000..8defb5d
--- /dev/null
+++ b/bootstrap
@@ -0,0 +1,6 @@
+#! /bin/sh
+
+# Create the build system.
+
+set -e -x
+exec autoreconf -vfi
diff --git a/configure.ac b/configure.ac
index 0cdd9e8..811a29b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -68,7 +68,7 @@ case "x$with_gnu_filesystem_hierarchy" in
        # Follow the GNU Filesystem Heirarchy Standard correctly
        # Installed .scm scheme libraries go here
        AC_MSG_CHECKING([Guile site directory])
-       guilesitedir="\$(datadir)/guile/site/$guile_effective_version"
+       guilesitedir="\${datadir}/guile/site/$guile_effective_version"
        AC_MSG_RESULT([$guilesitedir])
        AC_SUBST(guilesitedir)
 
@@ -207,4 +207,5 @@ AC_CONFIG_FILES([tools/uninstalled-env], [chmod +x tools/uninstalled-env])
 AC_CONFIG_FILES([tools/run-guile], [chmod +x tools/run-guile])
 AC_CONFIG_FILES([tools/gdb-guile], [chmod +x tools/gdb-guile])
 AC_CONFIG_FILES([tools/gdb-test], [chmod +x tools/gdb-test])
+AC_CONFIG_FILES([tools/guile-gi], [chmod +x tools/guile-gi])
 AC_OUTPUT
diff --git a/src/Makefile.am b/src/Makefile.am
index 6c96095..2040399 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -147,25 +147,26 @@ libguile_gi_la_LIBADD = \
 ################################################################
 
 pkgguilesitedir=$(guilesitedir)/gi
+pkgguileobjectdir=$(guileobjectdir)/gi
 
 dist_guilesite_DATA = \
   gi.scm
 
 dist_pkgguilesite_DATA = gi/glib-2.scm gi/gtk-3.scm gi/gio-2.scm gi/webkit2-4.scm
 
-guileobject_DATA = $(guilesite_DATA:%.scm=%.go)
+pkgguileobject_DATA = $(dist_guilesite_DATA:%.scm=%.go) $(dist_pkgguilesite_DATA:%.scm=%.go)
 
 $(pkgguileobject_DATA): libguile-gi.la
 
-GUILEC_FLAGS = -Warity-mismatch -Wformat
+GUILEC_FLAGS = -Warity-mismatch -Wformat --load-path=$(PWD)
 
 .scm.go:
 	GUILE_AUTO_COMPILE=0 \
 	LTDL_LIBRARY_PATH=$(abs_builddir)/.libs \
-	$(GUILE) compile --target="$(host)" $(GUILEC_FLAGS) \
+	$(GUILE_TOOLS) compile --target="$(host)" $(GUILEC_FLAGS) \
 	-o "$@" "$<"
 
-CLEANFILES = $(guileobject_DATA) $(BUILT_SOURCES)
+CLEANFILES = $(pkgguileobject_DATA) $(BUILT_SOURCES)
 
 ################################################################
 # FLYMAKE
@@ -175,5 +176,3 @@ check-syntax:
 	$(CC) -std=c11 $(GUILE_CFLAGS) $(GLIB_CFLAGS) $(GOBJECT_CFLAGS) \
 	 $(GOBJECT_INTROSPECTION_CFLAGS) $(FFI_CFLAGS) \
 	 -DG_LOG_DOMAIN=\"GuileGI\" $(CFLAGS) -fsyntax-only $(CHK_SOURCES)
-
-
-- 
2.21.0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #5: 0003-guix-Add-guix-package-description.patch --]
[-- Type: text/x-patch, Size: 6702 bytes --]

From e2bf3ca2db064d4b5232a9ad2049241eab158e6f Mon Sep 17 00:00:00 2001
From: Jan Nieuwenhuizen <janneke@gnu.org>
Date: Fri, 31 May 2019 19:21:52 +0200
Subject: [PATCH 3/4] guix: Add guix package description.

---
 .gitignore        |  1 +
 README            |  6 ++++
 guix.scm          | 92 +++++++++++++++++++++++++++++++++++++++++++++++
 test/Makefile.am  |  3 ++
 tools/Makefile.am |  3 +-
 tools/guile-gi.in | 27 ++++++++++++++
 6 files changed, 131 insertions(+), 1 deletion(-)
 create mode 100644 guix.scm
 create mode 100644 tools/guile-gi.in

diff --git a/.gitignore b/.gitignore
index e72434b..21eb93e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -68,6 +68,7 @@ tools/gdb-test
 tools/uninstalled-env
 tools/gdb-guile
 tools/run-guile
+tools/guile-gi
 
 # executables
 fo_gen
diff --git a/README b/README
index f3c4de6..cb31e1e 100644
--- a/README
+++ b/README
@@ -21,3 +21,9 @@ box, but, you can use this library to generate those bindings
 automatically.
 
 For the moment, the docs are at https://spk121.github.io/guile-gi/
+
+Try:
+
+    guix environment --ad-hoc -l guix.scm guile
+    guile-gi test/example-1.scm
+    guile-gi test/browser.scm
diff --git a/guix.scm b/guix.scm
new file mode 100644
index 0000000..30789de
--- /dev/null
+++ b/guix.scm
@@ -0,0 +1,92 @@
+;;; Guile-GI --- GObject bindings for Guile.
+;;; Copyright (C) 2019 Jan Nieuwenhuizen <janneke@gnu.org>
+;;;
+;;; This file is part of Guile-GI.
+;;;
+;;; Guile-GI is free software: you can redistribute it and/or modify
+;;; it under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation, either version 3 of the License, or
+;;; (at your option) any later version.
+;;;
+;;; Guile-GI is distributed in the hope that it will be useful,
+;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with Guile-GI.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+;;
+;; GNU Guix development package.  To build and play, run:
+;;
+;;   guix environment --ad-hoc -l guix.scm guile
+;;
+;; To build and install, run:
+;;
+;;   guix package -f guix.scm
+;;
+;; To build it, but not install it, run:
+;;
+;;   guix build -f guix.scm
+;;
+;; To use as the basis for a development environment, run:
+;;
+;;   guix environment -l guix.scm
+;;
+;;; Code:
+
+(use-modules (srfi srfi-1)
+             (srfi srfi-26)
+             (ice-9 popen)
+             (ice-9 match)
+             (ice-9 rdelim)
+             (guix packages)
+             (guix licenses)
+             (guix gexp)
+             (guix git-download)
+             (guix build-system gnu)
+             ((guix build utils) #:select (with-directory-excursion))
+             (gnu packages)
+             (gnu packages autotools)
+             (gnu packages gettext)
+             (gnu packages glib)
+             (gnu packages gnome)
+             (gnu packages gtk)
+             (gnu packages guile)
+             (gnu packages guile-xyz)
+             (gnu packages pkg-config)
+             (gnu packages texinfo)
+             (gnu packages webkit))
+
+(define %source-dir (dirname (current-filename)))
+
+(package
+  (name "guile-gi")
+  (version "git")
+  (source (local-file %source-dir
+                      #:recursive? #t
+                      #:select? (git-predicate %source-dir)))
+  (build-system gnu-build-system)
+  (native-inputs `(("autoconf" ,autoconf)
+                   ("automake" ,automake)
+                   ("gettext" ,gnu-gettext)
+                   ("libtool" ,libtool)
+                   ("pkg-config" ,pkg-config)
+                   ("texinfo" ,texinfo)))
+  (propagated-inputs `(("glib" ,glib)
+                       ("gobject-introspection" ,gobject-introspection)
+                       ("gssettings-desktop-schemas" ,gsettings-desktop-schemas)
+                       ("gtk+" ,gtk+)
+                       ("guile-lib" ,guile-lib)
+                       ("webkitgtk" ,webkitgtk)))
+  (inputs `(("guile" ,guile-2.2)))
+  (arguments
+   `(#:configure-flags '("--with-gnu-filesystem-hierarchy")))
+  (home-page "https://github.com/spk121/guile-gi")
+  (synopsis "GObject bindings for Guile")
+  (description
+   "Guile-GI is a library for Guile that allows using GObject-based
+libraries, such as GTK+3.  Its README comes with the disclaimer: This
+is pre-alpha code.")
+  (license gpl3+))
diff --git a/test/Makefile.am b/test/Makefile.am
index e87bf99..14ca20d 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -36,6 +36,9 @@ TESTS = \
  bytes_new_null_size.scm \
  bytes_new_null_contents.scm
 
+XFAIL_TESTS = \
+ bytes_new_null_size.scm
+
 SCM_LOG_COMPILER = \
   ${top_builddir}/libtool \
   --dlopen=${top_builddir}/src/libguile-gi.la \
diff --git a/tools/Makefile.am b/tools/Makefile.am
index aeafaf6..b93b5ba 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -14,5 +14,6 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
-EXTRA_DIST = uninstalled-env.in run-guile.in gdb-guile.in gdb-test.in
+EXTRA_DIST = uninstalled-env.in run-guile.in gdb-guile.in gdb-test.in guile-gi.in
 
+bin_SCRIPTS = guile-gi
diff --git a/tools/guile-gi.in b/tools/guile-gi.in
new file mode 100644
index 0000000..2004bef
--- /dev/null
+++ b/tools/guile-gi.in
@@ -0,0 +1,27 @@
+#! @SHELL@
+
+# Guile-GI --- GObject bindings for Guile.
+# Copyright (C) 2019 Jan Nieuwenhuizen <janneke@gnu.org>
+#
+# This file is part of Guile-GI.
+#
+# Guile-GI is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Guile-GI is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Guile-GI.  If not, see <http://www.gnu.org/licenses/>.
+
+prefix="@prefix@"
+exec_prefix="@exec_prefix@"
+datadir="@datarootdir@"
+datarootdir="@datarootdir@"
+
+LD_LIBRARY_PATH="@guileextensiondir@${GUIX_ENVIRONMENT:+:}$GUIX_ENVIRONMENT${GUIX_ENVIRONMENT:+/lib:}${LIBRARY_PATH:+:}$LIBRARY_PATH{LD_IBRARY_PATH:+:}$LD_IBRARY_PATH${GUIX_PROFILE:+/lib:}$GUIX_PROFILE"\
+        exec @GUILE@ -L "@guilesitedir@" -C "@guileobjectdir@" "$@"
-- 
2.21.0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #6: 0004-textview-editor-example.BOOM.patch --]
[-- Type: text/x-patch, Size: 3178 bytes --]

From 91753258892c4a1fbf7ed43ff793a00ac0f77cf6 Mon Sep 17 00:00:00 2001
From: Jan Nieuwenhuizen <janneke@gnu.org>
Date: Sat, 1 Jun 2019 10:22:23 +0200
Subject: [PATCH 4/4] textview editor example...BOOM.

---
 README          |  7 ++++++
 test/editor.scm | 58 +++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 65 insertions(+)
 create mode 100644 test/editor.scm

diff --git a/README b/README
index cb31e1e..0c2682b 100644
--- a/README
+++ b/README
@@ -27,3 +27,10 @@ Try:
     guix environment --ad-hoc -l guix.scm guile
     guile-gi test/example-1.scm
     guile-gi test/browser.scm
+
+Or, create and run in a development environment
+
+    guix environment -l guix.scm
+    ./bootstrap && ./configure && make
+    tools/uninstalled-env tools/guile-gi test/browser.scm
+    tools/uninstalled-env tools/guile-gi test/editor.scm
diff --git a/test/editor.scm b/test/editor.scm
new file mode 100644
index 0000000..5294943
--- /dev/null
+++ b/test/editor.scm
@@ -0,0 +1,58 @@
+;; Copyright (C) 2019  Michael L. Gran
+;; Copyright (C) 2019  Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+
+;; This program is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program.  If not, see <https:;;www.gnu.org/licenses/>.
+(use-modules (gi))
+
+(typelib-load "Gio" "2.0")
+(typelib-load "Gtk" "3.0")
+(typelib-load "GLib" "2.0")
+(typelib-load "WebKit2" "4.0")
+
+(define (print-goodbye widget data)
+  (display "Goodbye World\n"))
+
+(define (key-press widget event)
+  (display "key\n")
+  (format "key: ~s\n" event)
+  #f)
+
+(define (activate app user-data)
+  (let ((window (cast (ApplicationWindow-new app) <GtkApplicationWindow>))
+        (vbox (cast (VBox-new 0 0) <GtkVBox>))
+        (editor (cast (TextView-new) <GtkTextView>))
+        (button-box (cast (ButtonBox-new 0) <GtkButtonBox>))
+        (button (Button-new-with-label "Quit")))
+    (send window (set-title "Window"))
+    (send window (set-default-size 200 200))
+    (send window (show-all))
+    (send window (add vbox))
+    (send vbox (add editor))
+    (send vbox (add button-box))
+    (connect button (clicked print-goodbye #f))
+    (connect button (clicked (lambda x
+                               (send window (destroy)))
+                             #f))
+    ;; disable this and we are `fine'
+    (connect editor (key-press-event key-press #f)) ;; BOOM
+    (send editor (grab-focus))
+    (send button-box (add button))
+    (send window (show-all))))
+
+(define (main)
+  (let ((app (Application-new "org.gtk.example" 0)))
+    (connect app (activate activate #f))
+    (send app (run (length (command-line)) (command-line)))))
+
+(main)
-- 
2.21.0


[-- Attachment #7: Type: text/plain, Size: 152 bytes --]


-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com

  parent reply	other threads:[~2019-06-01  9:02 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-15 14:41 [ANN] guile-gi v0.0.1 released Mike Gran
2018-11-15 15:13 ` Alex Sassmannshausen
2018-11-15 15:21 ` sirgazil
2018-11-15 15:44 ` Nala Ginrut
2018-11-15 16:11 ` Vladimir Zhbanov
2018-11-15 16:35   ` Amirouche Boubekki
2018-11-20 20:55 ` Ludovic Courtès
2019-01-31 18:51 ` Amirouche Boubekki
2019-01-31 18:57   ` Nala Ginrut
2019-01-31 22:46   ` Mike Gran
2019-01-31 22:55     ` sirgazil
2019-02-01 12:34       ` Amirouche Boubekki
2019-06-01  9:02 ` Jan Nieuwenhuizen [this message]
2019-06-02 16:15   ` Ludovic Courtès
2019-06-02 18:22     ` Jan Nieuwenhuizen
2019-06-03 14:46   ` Mike Gran
2019-06-03 16:41     ` Jan Nieuwenhuizen
2019-06-04 14:45       ` Mike Gran
2019-06-04 19:47         ` Jan Nieuwenhuizen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874l59smoy.fsf@gnu.org \
    --to=janneke@gnu.org \
    --cc=guile-user@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=spk121@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).