caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Olivier Andrieu <andrieu@ijm.jussieu.fr>
To: jonathan.roewen@gmail.com
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Initialising caml values from C
Date: Tue, 19 Apr 2005 11:37:16 +0200 (CEST)	[thread overview]
Message-ID: <20050419.113716.74731383.andrieu@ijm.jussieu.fr> (raw)
In-Reply-To: <ad8cfe7e050419015541f5f5e7@mail.gmail.com>

 Jonathan Roewen [Tue, 19 Apr 2005]:
 > I'm building an ocaml-native program (actually an OS). Anyways, I
 > initialise the ocaml runtime from C, but the problem I have is that I
 > want a couple of caml values to be initialised by calling into C-land.
 > 
 > Something like: (lfb is a linear frame buffer)
 > 
 > external get_lfb: unit -> (int32, Bigarray.int32_elt,
 > Bigarray.c_layout) Bigarray.Array2.t = "get_lfb"
 > 
 > (* the part that doesn't seem to work *)
 > 
 > (* create a cairo instance for drawing into the LFB *)
 > let cairo = Cairo.create ()
 > (* gets the LFB, makes it into a cairo image, then sets it as surface
 >    for cairo to draw into *)
 > let _ = Cairo.set_target_image cairo (of_bigarr_32 true (get_lfb
 > ()))
 > 
 > If I instead call some initialiser functions to set up the cairo
 > instances, it seems to be okay... but it'd make life a lot easier
 > if the above would work correctly. It'd especially help with other
 > parts of the code that use the above (and other functions/values).
 
I don't quite understand your problem.

Is it that the code (with Cairo) isn't working ? (and if yes,
what exactly isn't working ?)

Or you want help on how to write the get_lfb function ?

-- 
   Olivier


  reply	other threads:[~2005-04-19  9:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-19  8:55 Jonathan Roewen
2005-04-19  9:37 ` Olivier Andrieu [this message]
2005-04-19 22:09   ` [Caml-list] " Jonathan Roewen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050419.113716.74731383.andrieu@ijm.jussieu.fr \
    --to=andrieu@ijm.jussieu.fr \
    --cc=caml-list@yquem.inria.fr \
    --cc=jonathan.roewen@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).