Delivered-To: garrigue at math.nagoya-u.ac.jp Authentication-Results: mailhost.math.nagoya-u.ac.jp sender=lablgtk-bounces at yquem.inria.fr; domainkey=neutral (no query protocol specified; no policy for yquem.inria.fr) Delivered-To: lablgtk at yquem.inria.fr DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=JxdLveM+z1DpYOXjrxyF5LoerItic6vlHjk+yEnofGY=; b=CAOzP8OwBDYPF3G9aFnYTYroFffM2Is1zNh7RINRmRdTCBbAtdNiqWR3PP3mwNBDnc hP1IGNiirvfVCZOaTvFfxhUaBRMRK1WFiTBb9miAPGzfFsD+TiEUEAs0+hYbgyKaBq0X JC6zr8uyMaumTCCQnkPUJgShTS+AIReSIFAeM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=q4sXYiaFp1eUIfpEuP9ghbHJ+3aFMcX4bJ9cJajeNm6HURu0whlvJchZYmtdmJNBgI cMHqT4DmAy6ILYpPBfBgsgGB2ogK+aNSqs/Wvs46DOPBc1fSma3VklFqSSkkp8O2Nf88 MFT2Cvg0VQkqny/kFbcTVhnZdbU+ym7CpV5W0= MIME-Version: 1.0 Date: Sun, 4 Oct 2009 14:01:44 +0200 Message-ID: <666572260910040501n79651d01r33566967299a4572 at mail.gmail.com> Subject: [Lablgtk] [ANN] ocaml-gir 0.9 alpha - binding generator for glib2-based libs From: Adrien To: lablgtk Content-Type: text/plain; charset=ISO-8859-1 ocaml-gir is an automated binding generator for libaries based on glib2, using the parsing done by gobject-intropesction[1] (although it sucks and I may just diss it). It is almost able to write bindings for webkit-gtk, dbus-glib and other libraries. With minor editing (commenting out functions that couldn't work), I've been able to write a small working browser using webkit-gtk. THe project is hosted on forge.ocamlcore.org . A tarball is available [2] and git too [3], as well as gitweb [4] (development is done on the master branch btw). The logic of the code is basically: ocamlgir.ml parses the .gir (xml) file produced by g-ir-scanner and type.ml holds functions to translate from the xml tree to a nicer format and finally there is a .ml file for each file that has to be created (c.ml, gtk.ml, g.ml, c_tags.ml, h.ml, ...). girstring.ml is a module to change the casing of a string: FooBarBlaBla <-> FOO_BAR_BLA_BLA <-> foo_bar_bla_bla. What is currently missing is signals/callbacks, inheriting between libraries (webkit-gtk depends on libsoup) and something about callbacks I'm not sure how I could do and which is the reason I am writing this a bit before ocaml-gir is ready. For instance, a function takes a DBusGProxyCallNotify* which is defined as follows: typedef void (* DBusGProxyCallNotify) (DBusGProxy *proxy, DBusGProxyCall *call_id, void *user_data); How should I write the C conversion macro to/from value? Thanks. And just a word about gobject-introspection: I hate it. =) [1] http://live.gnome.org/GObjectIntrospection [2] http://forge.ocamlcore.org/frs/?group_id=73&release_id=180 [3] http://git.ocamlcore.org/ocaml-gir/ocaml-gir.git [4] http://git.ocamlcore.org/cgi-bin/gitweb.cgi?p=ocaml-gir/ocaml-gir.git;a=summary --- Adrien Nader _______________________________________________ Lablgtk mailing list Lablgtk@yquem.inria.fr http://yquem.inria.fr/cgi-bin/mailman/listinfo/lablgtk