On Wed, 07 Jun 2006 10:26:54 +0300, Luke J Crook <[EMAIL PROTECTED]> wrote:
> Yes that's exactly the problem, thanks. Trouble is I can't fix it easily
> as CFFI does not support pass-by-value.
>
You could do it the cl-sdl way, by writing a tiny C wrapper. It's a bit
annoying to have C stubs in otherwise 'clean' library, but I guess that is
currently the only way to do it.
From cl-sdl sdlttfstub.c:
#include <SDL.h>
#include <SDL_ttf.h>
SDL_Surface *render_glyph_solid (TTF_Font *font, Uint16 ch, SDL_Color *fg)
{
return TTF_RenderGlyph_Solid (font, ch, *fg);
}
SDL_Surface *render_Text_solid (TTF_Font *font, const char *text,
SDL_Color *fg) {
return TTF_RenderText_Solid (font, text, *fg);
}
SDL_Surface *render_UTF8_solid (TTF_Font *font, const char *text,
SDL_Color *fg) {
return TTF_RenderUTF8_Solid (font, text, *fg);
}
SDL_Surface *render_UNICODE_solid (TTF_Font *font, const Uint16 *text,
SDL_Color *fg) {
return TTF_RenderUNICODE_Solid (font, text, *fg);
}
For some reason cl-sdl lacks the stubs for *blended/*outline rendering
functions, so you'll just need to add those and it should work.
_______________________________________________
application-builder mailing list
[email protected]
http://www.lispniks.com/mailman/listinfo/application-builder