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:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=2nKk4zztpGb0IkiT8+xdEqBoMOeYwEkt86izAaGD824=; b=PuuU4mdOh+0S818gsbzNyHzkyO9Gioweg80LmjTl09B85lQmKOV6jtzjRC89vc1Gyt Uno8DzckVG7Em5sgGl3JJdKrNo7HHjIYrH1OxNfvZugxPeqBK4s6Dypw1XfHbN1Fapvg bcC1azxbHW9+B4PeOGslUkhyoPChJkFgY4jww= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=J+glVbr1XZzd1v2AmtlcqYwLem6Q3LTqq4ZnoCmGrlwkWcj5w9m2Pt9MdzghbD+uoL 5O84HbUEH72RCoWufKpcneVa9lGbt5PQLGLIFC/j0URODNidb5mh0+zObBn6NiDrh3s0 cLPsPVfKCynD3Voeo2YTF2IQqPnVd69O/GcPc= Message-ID: <666572260806111323uea80b2ct7d06de1f6b035502 at mail.gmail.com> Date: Wed, 11 Jun 2008 22:23:42 +0200 From: Adrien To: lablgtk at yquem.inria.fr Subject: [Lablgtk] Webkitgtk bindings - returning a GType value ? MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline Content-Type: text/plain; charset=ISO-8859-1 Content-Length: 1326 Hi, I've discovered webkit a few months ago and love it. For those who do not know what it is, basically, it's a very-fast and highly-compliant html (+js,css,svg,...) rendering engine to be embedded in another application. I recently started playing with it, trying to make some bindings for ocaml. Since I don't have much free time, I am only trying to display a webpage, without any control or capability. So far, I've written the following code : #include #include #include #include #include #include #include "lablgtkstuff.h" CAMLprim value create_webview(value unit) { WebKitWebView* web_view = WEBKIT_WEB_VIEW (webkit_web_view_new ()); return Val_GType(web_view); } The c code compiles nicely but then I'm stuck when writing the type of the corresponding ocaml function. I've taken a look at what lablgtk currently does when dealing with Val_GType. Basically the caml functions are of type 'unit -> unit' but that did not help me much. So, how should I handle such a case ? What would be the corresponding caml type for the function ? Thanks. --- Adrien Nader _______________________________________________ Lablgtk mailing list Lablgtk@yquem.inria.fr http://yquem.inria.fr/cgi-bin/mailman/listinfo/lablgtk