Webkitgtk bindings - returning a GType value ?

Adrien <[email protected]>
Newsgroups gmane.comp.lang.ocaml.lib.gtk
Message-ID <[email protected]>
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 <assert.h>
  #include <glib.h>
  #include <string.h>
  #include <gtk/gtk.h>
  #include <webkit/webkit.h>

  #include <caml/....h>
  #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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.