more horizontal refactoring
[swftools.git] / lib / python / primitives.h
1 /* primitives.h
2
3    Python wrapper for librfxswf- primitive objects (structs, prototypes)
4
5    Part of the swftools package.
6
7    Copyright (c) 2003 Matthias Kramm <kramm@quiss.org>
8  
9    This program is free software; you can redistribute it and/or modify
10    it under the terms of the GNU General Public License as published by
11    the Free Software Foundation; either version 2 of the License, or
12    (at your option) any later version.
13
14    This program is distributed in the hope that it will be useful,
15    but WITHOUT ANY WARRANTY; without even the implied warranty of
16    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17    GNU General Public License for more details.
18
19    You should have received a copy of the GNU General Public License
20    along with this program; if not, write to the Free Software
21    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
22
23 #ifndef __primitives_h__
24 #define __primitives_h__
25
26 #include <Python.h>
27 #undef HAVE_STAT
28
29 #include "../rfxswf.h"
30
31 /* exported to allow casting to this type */
32 extern PyTypeObject ColorClass;
33 extern PyTypeObject BBoxClass;
34 extern PyTypeObject CXFormClass;
35 extern PyTypeObject GradientClass;
36 extern PyTypeObject MatrixClass;
37 extern PyTypeObject LineStyleClass;
38 extern PyTypeObject FillStyleClass;
39
40 PyObject* f_Color(PyObject* self, PyObject* args, PyObject* kwargs);
41 PyObject* f_ColorTransform(PyObject* self, PyObject* args, PyObject* kwargs);
42 PyObject* f_Gradient(PyObject* self, PyObject* args, PyObject* kwargs);
43 PyObject* f_BBox(PyObject* self, PyObject* args, PyObject* kwargs);
44 PyObject* f_BBox2(SRECT bbox);
45 PyObject* f_Matrix(PyObject* self, PyObject* args, PyObject* kwargs);
46 PyObject* f_Matrix2(MATRIX* m);
47 PyObject* f_FillStyle2(FILLSTYLE fs);
48 PyObject* f_SolidFillstyle(PyObject* self, PyObject* args, PyObject* kwargs);
49 PyObject* f_SolidFillstyle2(RGBA color);
50 PyObject* f_LineStyle(PyObject* self, PyObject* args, PyObject* kwargs);
51 PyObject* f_LineStyle2(RGBA color, int width);
52 PyObject* f_LineStyle3(LINESTYLE ls);
53
54 RGBA color_getRGBA(PyObject*self);
55 CXFORM colortransform_getCXForm(PyObject*self);
56 GRADIENT gradient_getGradient(PyObject*self);
57 SRECT bbox_getSRECT(PyObject*self);
58 MATRIX matrix_getMatrix(PyObject*self);
59 FILLSTYLE fillstyle_getFillStyle(PyObject*self);
60 LINESTYLE linestyle_getLineStyle(PyObject*self);
61
62 extern PyMethodDef* primitive_getMethods();
63
64 #endif