[giraffe-user] Question abotu Gtk programs

Phil Clayton phil.clayton at veonix.com
Fri Mar 29 19:20:03 CDT 2024


On 29/03/2024 10:03, Kyle DENG wrote:
> Can Gtk be used to write Poly/ML GUI programs? Because I saw that the 
> introduction of gtk files is compiled using C language.

GTK is a C library and, like any C library, its functions can be called 
from Poly/ML by creating bindings in SML to the C functions.  Giraffe 
Library provides such bindings to GTK's (introspectable) C functions but 
also much more on top of this to provide a coherent GTK API in SML.


> Or is it that Poly/ML GUI programs can only be written using Giraffe 
> Library?

In practice, you need Giraffe Library or something equivalent (but I am 
not aware of any alternative for GTK).  If you tried to use GTK directly 
from Poly/ML you would very likely end up creating functionality that is 
already provided by Giraffe Library, and it would take a very long time 
to write even a simple program!

Phil



More information about the giraffe-user mailing list