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
[Caml-list] version 7 beta typing change?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Sven Luther <sven.luther@w...>
Subject: Re: [Caml-list] Re: Tcl/Tk and RH 9
On Mon, Aug 11, 2003 at 12:02:06PM +1000, skaller wrote:
> On Mon, 2003-08-11 at 11:20, Eray Ozkural wrote:
> > With GTK, I would worry about its object model, library design, hack-ability, 
> > platform-independence.... The design of gtk seems fairly "backwards" to me. 
> Me too, though I can't claim great familiarity with it.
> > It is now going to sound "bold" to you people, but I don't understand why you 
> > can't write the ultimate portable GUI toolkit in ocaml itself. With a 
> > language as generic as ocaml it should be a no-brainer to efficiently 
> > abstract over peculiarities of windows systems.
> Yeah, that's a good question. The answer is probably: we could,
> but who is going to finance it? Building GUI toolkit is a rather
> large job (its difficult enough to *wrap* a toolkit).
> > Besides, you will find that the limitations of those C/C++ based systems will 
> > be severe. I can make an educated guess because I was designing an ocaml 
> > binding for KDE... If you decide on some kind of binding to a "high level" 
> > toolkit like gtk it's going to be some abstraction layer over black boxes 
> > with a lot of quirks, it's not going to be pretty.
> Sure, but where does one bind? To Xlib? To the X protocol directly?
> If you bind that deep, how do you handle a Windows port of the library?

What about looking at Cairo (Ex Xr/Xc) and either bind to that, or
reimplement their protocol in ocaml. Cairo is early enough in its design
that it can still be influenced enough if someone looks at it, and
points them problems related to doing ocaml bindings.

For those who don't know what cairo is, cairo can be found at :

And is a : Cross-device Rendering for Vector Graphics.

Basically it is a vector rendering framework, linked to SVG graphics,
and which should enable to have a vector rendering model (on top of the
X RENDER extension i think), but which can target various graphic
systems, including X, local image buffers and Postscript and PDF as
planned output support. I don't know about windows support, but MacOSX
support should not be all that difficult to add, and since they also
have an OpenGL rendering path, it should run on every OpenGL supported

That said, it is not a windowing toolkit, just the rendering library,
so i guess writing a proper ocaml toolkit top of it would be nice, and
it would have vector graphics like MAcOSX toolkit. Also, there is
already some work that has been done on vector graphics and ocaml, like
the (non-free) MLGraph library, and the associated publications.


Sven Luther

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: