mGTK: an SML binding of Gtk+

  • Authors:
  • Ken Friis Larsen;Henning Niss

  • Affiliations:
  • Department of Innovation, IT University of Copenhagen, Denmark;Department of Innovation, IT University of Copenhagen, Denmark

  • Venue:
  • ATEC '04 Proceedings of the annual conference on USENIX Annual Technical Conference
  • Year:
  • 2004

Quantified Score

Hi-index 0.00

Visualization

Abstract

We describe mGTK, a Standard ML language binding for the Gtk+ toolkit. Gtk+ is a graphical toolkit for the X Window System, and provides an object-oriented C language API. Since Standard ML is a mostly-functional language without object types, constructing a binding to Gtk+ is not a trivial task. In mGTK, a single-inheritance class hierarchy is encoded using SML's type system. Most of the mGTK binding is machine generated, to best utilize the limited manpower of the project. The goal of the mGTK project is "just" to present a type-safe interface to Gtk+ for SML programmers. This contrasts with GUI libraries for functional languages, which concentrate on producing good user interfaces: there are several SML graphical user interface libraries available for this task. With mGTK, SML applications have access to the mature, complete and familiar Gtk+ user interface.