[m-users.] foreign_type confusion on how to do it across	modules...
    emacstheviking 
    objitsu at gmail.com
       
    Sun Jul 14 19:14:37 AEST 2019
    
    
  
I have used Cairo with C many years ago...I will take a look at those
bindings today then, thanks for that pointer (no pun intended).
I've been reading the code for glfw and opengl bindings too. I am sure I
will "get there".
Thanks all,
Sean.
On Sun, 14 Jul 2019 at 08:10, Julien Fischer <jfischer at opturion.com> wrote:
>
> On Sat, 13 Jul 2019, emacstheviking wrote:
>
> > In my sdl2.m module I have this code
> >     % SDL_Rect
> > :- type sdl_rect.
> > :- pragma foreign_type("C", sdl_rect, "SDL_Rect",
> [can_pass_as_mercury_type]).
> > The SDL_Rect structure is perfect enough and I don't want to define
> something like:
> >
> > :- type sdl_rect ---> sdl_rect(x::int, y::int, w::int, h::int).
>
> That's pretty much exactly what we did for rectangles in the Cairo
> binding and it seems to work fine there.
>
> Julien.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurylang.org/archives/users/attachments/20190714/4e75ae4c/attachment.html>
    
    
More information about the users
mailing list