PageRenderTime 35ms CodeModel.GetById 21ms app.highlight 13ms RepoModel.GetById 0ms app.codeStats 0ms

/tags/Root-branch-php-utl/SWIG/Examples/GIFPlot/Chicken/simple/simple.i

#
Swig | 34 lines | 22 code | 7 blank | 5 comment | 0 complexity | 3e262a013546a9ebb15228916b93179d MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
 1/* This example shows a very simple interface wrapping a few 
 2   primitive declarations */
 3
 4%module simple
 5%{
 6#include "gifplot.h"
 7%}
 8
 9typedef unsigned int Pixel;
10
11/* Here are a few useful functions */
12
13ColorMap    *new_ColorMap(char *filename = 0);
14void         delete_ColorMap(ColorMap *cmap);
15
16FrameBuffer *new_FrameBuffer(unsigned int width, unsigned int height);
17void         delete_FrameBuffer(FrameBuffer *frame);
18void         FrameBuffer_clear(FrameBuffer *frame, Pixel color);
19void         FrameBuffer_line(FrameBuffer *frame, int x1, int y1, int x2, int y2, Pixel color);
20void         FrameBuffer_box(FrameBuffer *frame, int x1, int y1, int x2, int y2, Pixel color);
21void         FrameBuffer_circle(FrameBuffer *frame, int x1, int y1, int radius, Pixel color);
22int          FrameBuffer_writeGIF(FrameBuffer *f, ColorMap *c, char *filename);
23
24/* And some useful constants, which we redefine (from gifplot.h) so
25   that SWIG sees them */
26#define BLACK   0
27#define WHITE   1
28#define RED     2
29#define GREEN   3
30#define BLUE    4
31#define YELLOW  5
32#define CYAN    6
33#define MAGENTA 7
34