mGTK, SML bindings for GTK+

About

mGTK is glue code to make GTK+ (the Gimp Toolkit) accessible from SML, thereby providing a convenient interface for SML programmers to develop visual applications.

For the moment only the Moscow ML compiler is supported (MLton support is almost ready; send an email to one of the authors for details). mGTK should work on all platforms supported by both Moscow ML and GTK+. mGTK is known to run on Linux and Windows machines.

See the README file for more information.

mGTK is available under LGPL for now. But we may change the license in the future (to something less restrictive).

Download

A pre-release of the first major milestone is now available. Please note that this is a pre-release and so not much guidance is provided. Contact one of the authors if you need any help with the release.

Pre-release:

Previous releases:

Mailing list

We have a low trafic moderated mailing list for announcements of new releases of mGTK. To subscribe go to the mgtk-announce info page.

Authors

The mGTK toolkit is written by:

Contributors

We hope that some of you are interested in helping out. See the CONTRIB file for some tasks that needs to be done. Thanks to
  • Mike Thomas (for the Windows port).

Hello World in mGTK

Here is a short program showing the structure of typical mGTK programs.
     fun hello _ = print "Hello World\n"

     fun main () =
         let val _      = GtkBasis.init(CommandLine.name()::CommandLine.arguments())
	     val window = Window.new Window.TOPLEVEL
	     val button = Button.new_with_label "Hello World"
         in  Signal.connect window (Widget.delete_event_sig (fn _ => false))
           ; Signal.connect window (Widget.destroy_event_sig (fn _ => (GtkBasis.main_quit(); true)))
           ; Signal.connect button (Button.clicked_sig hello)
           ; Container.add window button
           ; Widget.show_all window
           ; GtkBasis.main() 
         end

Screenshots

It is very hard to give a useful screenshot of a library, but here is a very old screenshot that shows most of the examples included in the distribution.

mGTK is hosted by Sourceforge. Take a look at the Project homepage. SourceForge Logo

Created: April 21, 2000. Last modified: May 10, 2001.