From: Olivier Andrieu MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Message-ID: <17752.48908.824554.30467 at karryall.dnsalias.org> Date: Mon, 13 Nov 2006 19:53:00 +0100 To: Erik de Castro Lopo Cc: lablgtk at math.nagoya-u.ac.jp Subject: Re: lablgtk2/cairo : update surface? In-Reply-To: <20061113133011.492bbf9b.mle+ocaml at mega-nerd.com> References: <20061113104720.469ac2fd.erikd at mega-nerd.com> <20061113133011.492bbf9b.mle+ocaml@mega-nerd.com> Content-Type: text/plain; charset=us-ascii Content-Length: 923 Erik de Castro Lopo [Monday 13 November 2006] : > > Erik de Castro Lopo wrote: > > > Hi all, > > > > I'm using libcario-ocaml on Linux (Ubuntu Dapper) with a version > > number of 20051120-1ubuntu1. > > Ok, I found an example here: > > http://webcvs.cairographics.org/cairo-ocaml/test/cube.ml?view=markup > > which suggests that I should be using cairo_gtkcairo instead of cairo_lablgtk2. No, no ! gtkcairo is (was) a preliminary GTK/Cairo interface from the early versions of Cairo, before GTK+ supported it. It's most probably not packaged in your distro. You really should use Cairo_lablgtk. I've updated the cube.ml example, so now the above link will show you how it works with Cairo_lablgtk. Basically, you define a expose event callback on a drawing area, then you create a Cairo context on its window: ,---- | let get_cairo w = | Cairo_lablgtk.create w#misc#window `---- -- Olivier