fixed graphics bug
[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 #undef HAVE_STAT
27 #include <Python.h>
28
29 extern PyTypeObject ColorClass;
30 extern PyTypeObject BBoxClass;
31 extern PyTypeObject CXFormClass;
32 extern PyTypeObject GradientClass;
33 extern PyTypeObject MatrixClass;
34
35 typedef struct {
36     PyObject_HEAD
37     RGBA rgba;
38 } ColorObject;
39
40 typedef struct {
41     PyObject_HEAD
42     SRECT bbox;
43 } BBoxObject;
44
45 typedef struct {
46     PyObject_HEAD
47     MATRIX matrix;
48 } MatrixObject;
49
50 typedef struct {
51     PyObject_HEAD
52     CXFORM cxform;
53 } CXFormObject;
54
55 typedef struct {
56     PyObject_HEAD
57     GRADIENT gradient;
58 } GradientObject;
59
60 PyObject* f_Color(PyObject* self, PyObject* args, PyObject* kwargs);
61 PyObject* f_ColorTransform(PyObject* self, PyObject* args, PyObject* kwargs);
62 PyObject* f_Gradient(PyObject* self, PyObject* args, PyObject* kwargs);
63 PyObject* f_BBox(PyObject* self, PyObject* args, PyObject* kwargs);
64 PyObject* f_Matrix(PyObject* self, PyObject* args, PyObject* kwargs);
65 #endif