
slirp_define_opaque("Gif_Image", NULL, "Gif_DeleteImage", "Gif_ImageRef");
slirp_define_opaque("Gif_Colormap", NULL, "Gif_DeleteColormap");
slirp_define_opaque("Gif_RGBA", NULL,"Gif_DeleteRGBA");
slirp_define_opaque("Gif_Stream", NULL, "Gif_DeleteStream");
slirp_map_uchar("uint8_t");
slirp_map_uint16("uint16_t");

accepts_null_args["Gif_ImageToRGBA"] = [1,2];
accepts_null_args["Gif_ImageGetDelay"] = [1];

#prototype
   % Prototyping these is better than slirp_map_macro(), to preserve case
   int Gif_ImageCount(Gif_Stream*);
   uint16_t Gif_ScreenWidth(Gif_Stream*);
   uint16_t Gif_ScreenHeight(Gif_Stream*);
#end

%#vectorize these?
%   Gif_ImageSetDelay
%   Gif_ImageGetDelay
%   Gif_AddImage
%   Gif_WriteFile
%#end

#ignore
   Gif_FullUnoptimize
   Gif_ImageFromRGBABuf		% coded by hand
   gif_reflect			% coded by hand
   Gif_Unoptimize
   Gif_SetUncompressedImage
   fail_die_malloc
   fail_die_realloc
#end

#inline_c
#include "slirp/handcoded.c"
#end

#retmap	Gif_RGBA*
   if ($1 == NULL)
	SLang_push_null();
   else
	push_gif_rgba($1);
#end
