Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Desktop GUI toolkits - current state of the art?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2010-11-23 (23:32)
From: Alain Frisch <alain.frisch@l...>
Subject: Re: [Caml-list] Desktop GUI toolkits - current state of the art?
On 11/23/2010 3:19 PM, Martin DeMello wrote:
> What are the actively developed options for writing desktop GUI apps
> in OCaml? Anything other than lablgtk2 (which, at least from a brief
> look through the examples, looks rather ugly, codewise, compared to,
> say, vala or ruby/gtk)? I'll use lablgtk2 in a pinch, but I'm curious
> as to whether anyone has been experimenting with toolkit bindings with
> an eye towards better syntax and APIs.

If you're under Windows, you might be interested in the CSML tool. It 
allows you to build quite easily your own binding to .Net libraries. The 
CSML distribution contains an example of a mini-binding to Windows 
Forms; you can also see that in screenshots:

LexiFi uses CSML to build Windows Forms application, but most of our 
GUIs are managed by a higher-level layer, not direct calls to Windows 
Forms.  As a matter of fact, we generate most of the GUIs that are 
intended to show or edit structured values, automatically from OCaml 
type definitions.

We have a few local extensions to the OCaml compiler that makes it 
easier to build nice APIs for GUI toolkits, with a functional flavor: 
implicit subtyping and generalized recursion. Hopefully, I'll be able to 
blog about these extensions and how they are used for GUI programming 
some day.