[racket] Unknown C Struct definition

From: Roman Klochkov (kalimehtar at mail.ru)
Date: Wed Jul 3 06:43:42 EDT 2013

 It is pointer there: (c-define-type SDL_Window* (pointer "SDL_Window")) in SchemeSphere.

Read  http://docs.racket-lang.org/foreign/intro.html  


Понедельник, 1 июля 2013, 21:53 -06:00 от Cosme Enmanuel Zamudio Salazar <cosmez at gmail.com>:
>Theres a libsdl struct i want to use from racket:  SDL_Window 
>the problem is that there is nothing in the SDL include files about the struct fields, just this:
>
>typedef struct SDL_Window SDL_Window,
>
>the weird part is that i been looking at other language bindings to sdl2 and it looks like they have a way to define a pointer to an unknown structure type, for example:
>
>SchemeSphere:  https://github.com/alvatar/sphere-sdl2/blob/master/src/sdl2.scm#L480
>Python:  https://bitbucket.org/marcusva/py-sdl2/src/a62aa0c6cf3c603d98dc0d4566db1d3fe22076dd/sdl2/video.py?at=default#cl-98
>
>is there a way in Racket to do this? right now im just using a _pointer (define _SDL_Window _pointer)
>, but this looks lacking
>
>Thanks!
>
>Cosme.
>____________________
>  Racket Users list:
>   http://lists.racket-lang.org/users
>


-- 
Roman Klochkov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20130703/fca024ed/attachment-0001.html>

Posted on the users mailing list.