[gtk-web: 2/4] Add information about Guile-GI.
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-web: 2/4] Add information about Guile-GI.
- Date: Wed, 2 Dec 2020 02:04:52 +0000 (UTC)
commit 979959cad47d3a554159959a6364620dd40897b0
Author: Leo Prikler <leo prikler student tugraz at>
Date: Fri Nov 6 12:21:54 2020 +0100
Add information about Guile-GI.
_docs/language-bindings/scheme.md | 51 +++++++++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)
---
diff --git a/_docs/language-bindings/scheme.md b/_docs/language-bindings/scheme.md
index c9b5d3b4..401bf89e 100644
--- a/_docs/language-bindings/scheme.md
+++ b/_docs/language-bindings/scheme.md
@@ -9,6 +9,13 @@ This list is by no means exhaustive.
## GNU Guile
+There are currently two actively maintained projects to provide GObject language bindings for GNU Guile.
+
+Bindings | Latest version | Guile 2.2 | Guile 3.0
+--- | :---: | :---: | :---:
+<a href="http://savannah.gnu.org/projects/g-golf">G-Golf</a> | N/A | <i class="far fa-check-circle"></i> |
<i class="fas fa-minus-circle"></i>
+<a href="https://github.com/spk121/guile-gi">Guile-GI</a> | 0.3 | <i class="far fa-check-circle"></i> | <i
class="fas fa-check-circle"></i>
+
### G-Golf
#### About
@@ -48,3 +55,47 @@ G-Golf does not yet have a release, but development builds can be made from its
* Savannah Project Page: [http://savannah.gnu.org/projects/g-golf](http://savannah.gnu.org/projects/g-golf)
* G-Golf Website: [https://www.gnu.org/software/g-golf/](https://www.gnu.org/software/g-golf/)
* G-Golf Reference Manual:
[https://www.gnu.org/software/g-golf/learn.html](https://www.gnu.org/software/g-golf/learn.html)
+
+### Guile-GI
+
+#### About
+
+Guile-GI is a library for GNU Guile to generate a Scheme API from GObject Introspection information.
+It consists of a shared library containing glue code to interface with GObject and generate bindings,
+and Guile modules to export said bindings in a structured manner.
+
+#### Hello world
+
+```scheme
+(use-modules (gi))
+
+(use-typelibs (("Gio" "2.0") #:select (activate run))
+ ("Gtk" "3.0"))
+
+;; This is the callback we install to handle the `activate'
+;; signal that a <GApplication> may receive.
+(define (on-activation app)
+ ;; Create a <GtkApplicationWindow> for this
+ ;; <GtkApplication>, plus a button.
+ (let ((window (make <GtkApplicationWindow> #:application app))
+ (button (make <GtkButton> #:label "Hello World")))
+ ;; Register a lambda as the signal handler of the
+ ;; <GtkButton>'s `clicked' signal.
+ (connect button clicked (lambda (b) (close window)))
+ (add window button)
+ (show-all window)))
+
+;; Create a new <GtkApplication>
+(let ((app (make <GtkApplication> #:application-id "com.example.GtkApplication")))
+ ;; Register the procedure `on-activation' as the
+ ;; signal handler for the `activate' signal that the
+ ;; <GtkApplication> handles.
+ (connect app activate on-activation)
+ ;; Call application:run.
+ (run app '()))
+```
+
+#### See More
+
+* Github Project: [https://github.com/spk121/guile-gi](https://github.com/spk121/guile-gi)
+* Documentation: [https://spk121.github.io/guile-gi](https://spk121.github.io/guile-gi)
\ No newline at end of file
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]