#ifndef QJS_SDL_H #define QJS_SDL_H #include #include "quickjs.h" JSValue js_input_use(JSContext *ctx); JSValue js_camera_use(JSContext *ctx); JSValue js_sdl_audio_use(JSContext *ctx); JSValue js_sdl_use(JSContext *js); SDL_PixelFormat str2pixelformat(const char *str); SDL_PixelFormat js2pixelformat(JSContext *js, JSValue v); JSValue pixelformat2js(JSContext *js, SDL_PixelFormat format); const char *pixelformat2str(SDL_PixelFormat format); SDL_Colorspace str2colorspace(const char *str); SDL_Colorspace js2colorspace(JSContext *js, JSValue v); JSValue colorspace2js(JSContext *js, SDL_Colorspace colorspace); const char *colorspace2str(SDL_Colorspace colorspace); // SDL Scale Mode functions SDL_ScaleMode js2SDL_ScaleMode(JSContext *js, JSValue v); JSValue SDL_ScaleMode2js(JSContext *js, SDL_ScaleMode mode); // Surface type typedef struct SDL_Surface SDL_Surface; SDL_Surface *js2SDL_Surface(JSContext *js, JSValue v); JSValue SDL_Surface2js(JSContext *js, SDL_Surface *s); #endif /* QJS_SDL_H */