<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 26, 2014 at 4:05 PM, Sam Tobin-Hochstadt <span dir="ltr"><<a href="mailto:samth@cs.indiana.edu" target="_blank">samth@cs.indiana.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Instead of changing my Planet package, it would be better to provide<br>
an FFI to cairo based on the existing one that's in the library you<br>
mention. I don't think any of my package would be useful for that,<br>
though.<br></blockquote><div><br></div><div><br>Did I understand right that your cairo.ss is intended to work with some substantially earlier version of Cairo-library, and you want to keep it that way?<br><br></div><div>In any case, at least I realized that <br></div><div>(require racket/draw/unsafe/cairo-lib)<br>followed by  (define libcairo cairo-lib)<br><br>is (just ?) a more portable way of saying:<span class="im"><br><br>(define libcairo (ffi-lib "libcairo"))<br></span></div><div><span class="im">[Or in Windows: </span><span class="im">(define libcairo (ffi-lib "libcairo-2")) </span><span class="im">because it is called libcairo-2.dll]<br></span></div><div><span class="im"><br>Like this:<br>#lang racket<br>(require racket/draw/unsafe/cairo-lib)<br>(require ffi/unsafe)<br><br>cairo-lib<br>#<ffi-lib><br>> (define libcairo (ffi-lib "libcairo"))<br>. . ffi-lib: couldn't open "libcairo.dll" (The specified module could not be found.; errno=126)<br>> (define libcairo (ffi-lib "libcairo-2"))<br>> libcairo<br>#<ffi-lib><br>> (eq? cairo-lib libcairo)<br>#t<br>> <br><br>--------------------<br><br><br></span></div><div><span class="im">So I guess making my own set of bindings shouldn't be too much of racket-science...<br></span></div><div><span class="im"><br><br></span></div><div><span class="im">Best,<br><br>Antti<br><br></span></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Sam<br>
<div><div class="h5"><br>
On Fri, Sep 26, 2014 at 8:44 AM, Antti Karttunen<br>
<<a href="mailto:antti.karttunen@gmail.com">antti.karttunen@gmail.com</a>> wrote:<br>
><br>
> Another question:<br>
><br>
> Would it be a big job to edit the bindings in<br>
> <a href="http://planet.racket-lang.org/package-source/samth/cairo.plt/1/0/cairo.ss" target="_blank">http://planet.racket-lang.org/package-source/samth/cairo.plt/1/0/cairo.ss</a><br>
> so that it worked with the current<br>
><br>
> (require racket/draw/unsafe/cairo-lib)<br>
><br>
> cairo-lib<br>
> #<ffi-lib><br>
><br>
> ?<br>
><br>
> I guess it's not just question of "deprecated names for Cairo functions" as<br>
> mentioned in the ticket:<br>
> <a href="http://planet.racket-lang.org/trac/ticket/357" target="_blank">http://planet.racket-lang.org/trac/ticket/357</a><br>
><br>
> but also code like: (define libcairo (ffi-lib "libcairo"))<br>
><br>
> right in the beginning of .../samth/cairo.plt/1/0/cairo.ss<br>
> ?<br>
><br>
><br>
> Yours,<br>
><br>
> Antti Karttunen<br>
><br>
><br>
</div></div>> _________________________<br>
>   Racket Developers list:<br>
>   <a href="http://lists.racket-lang.org/dev" target="_blank">http://lists.racket-lang.org/dev</a><br>
><br>
</blockquote></div><br></div></div>