PageRenderTime 42ms CodeModel.GetById 25ms app.highlight 12ms RepoModel.GetById 2ms app.codeStats 0ms

/tags/rel-1.3.35/Examples/GIFPlot/Chicken/full/gifplot.i

#
Swig | 26 lines | 10 code | 8 blank | 8 comment | 0 complexity | c7fa38c911d6b244ad31152fb0d8d5da MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
 1/* Oh what the heck, let's just grab the whole darn header file
 2   and see what happens. */
 3
 4%module gifplot
 5%{
 6
 7/* Note: You still need this part because the %include directive
 8   merely causes SWIG to interpret the contents of a file.  It doesn't
 9   include the right include headers for the resulting C code */
10
11#include "gifplot.h"
12
13%}
14
15/* Pixel is typedef'd to unsigned char, and SWIG will translate this
16   type into Scheme characters. We would like to translate Pixels to
17   Scheme integers instead, so: */
18
19SIMPLE_TYPEMAP(Pixel, C_unfix, C_fix, C_swig_is_fixnum, (int), 0);
20
21%{
22static Pixel int_to_Pixel (int v) { return (Pixel) v; }
23%}
24extern Pixel int_to_Pixel (int v);
25
26%include gifplot.h