[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: understanding guile-gi
From: |
Chris Vine |
Subject: |
Re: understanding guile-gi |
Date: |
Mon, 17 Jan 2022 02:08:24 +0000 |
On Sun, 16 Jan 2022 13:37:02 +0000
Zelphir Kaltstahl <zelphirkaltstahl@posteo.de> wrote:
> Hello Guile Users!
>
> I would like to understand guile-gi better, hopefully at some point I will be
> able to create GTK applications using Guile. But perhaps my understanding is
> wrong, so I want to ask a few things:
>
> guile-gi – I think this stands for "Guile Gnome(?) Introspection"?
The "gi" stands for gobject-introspection.
> gi – I think this "introspection" part of the name is about inspecting sources
> and deriving code from that, to make use of Gnome libraries. Or is it for GTK?
Instrospection is available for any library with a gobject-introspection
typelib. That includes glib and GTK and most of the gnome
stack. /usr/lib[64]/girepository-1.0/ will contain the typelibs
available on your distribution. There will be many of them.
> Which things are part of GTK and which things are part of Gnome? Currently my
> picture is: GTK contains all the GUI things and Gnome the data things. For
> example: GTK might contain some date picker dialog or popup or whatever, but
> the
> datatype for date itself would be part of Gnome. "GDate". As such Gnome
> provides
> a sort of common datatypes basis, which could be used by other frameworks as
> well (and maybe is?).
No.
> So guile-gi makes use of introspection to give access to Gnome datatypes, or
> does it create bindings via FFI for an already existing C code base, which is
> the actual introspection for Gnome stuff?
I am not certain what you mean but gobject-introspection provides
bindings for C libraries written to GObject conventions which make them
available to higher level languages such as python (pygobject),
javascript (gjs) and guile scheme (guile-gi and g-golf). pygobject is
widely used; gjs is used by gnome-shell amongst others.
> And finally: Is my expectation correct, that I will be able to make GTK
> applications using Guile, if I learn to use guile-gi?
It will mainly work although I believe there are a few missing pieces
which you are unlikely to encounter. Look at some of the examples in
the guile-gi repository. Also look at g-golf.
Re: understanding guile-gi,
Chris Vine <=