VideoTexture: use PyObjectPlus.h instead of Python.h for compatibility with Python2.3
[blender.git] / source / gameengine / VideoTexture / FilterSource.cpp
1 /* $Id$
2 -----------------------------------------------------------------------------
3 This source file is part of VideoTexture library
4
5 Copyright (c) 2007 The Zdeno Ash Miklas
6
7 This program is free software; you can redistribute it and/or modify it under
8 the terms of the GNU Lesser General Public License as published by the Free Software
9 Foundation; either version 2 of the License, or (at your option) any later
10 version.
11
12 This program is distributed in the hope that it will be useful, but WITHOUT
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public License along with
17 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
18 Place - Suite 330, Boston, MA 02111-1307, USA, or go to
19 http://www.gnu.org/copyleft/lesser.txt.
20 -----------------------------------------------------------------------------
21 */
22
23 // implementation
24
25 #include <PyObjectPlus.h>
26 #include <structmember.h>
27
28 #include "FilterSource.h"
29
30 #include "FilterBase.h"
31 #include "PyTypeList.h"
32
33
34 // FilterRGB24
35
36 // define python type
37 PyTypeObject FilterRGB24Type =
38
39         PyObject_HEAD_INIT(NULL)
40         0,                         /*ob_size*/
41         "VideoTexture.FilterRGB24",   /*tp_name*/
42         sizeof(PyFilter),          /*tp_basicsize*/
43         0,                         /*tp_itemsize*/
44         (destructor)Filter_dealloc,/*tp_dealloc*/
45         0,                         /*tp_print*/
46         0,                         /*tp_getattr*/
47         0,                         /*tp_setattr*/
48         0,                         /*tp_compare*/
49         0,                         /*tp_repr*/
50         0,                         /*tp_as_number*/
51         0,                         /*tp_as_sequence*/
52         0,                         /*tp_as_mapping*/
53         0,                         /*tp_hash */
54         0,                         /*tp_call*/
55         0,                         /*tp_str*/
56         0,                         /*tp_getattro*/
57         0,                         /*tp_setattro*/
58         0,                         /*tp_as_buffer*/
59         Py_TPFLAGS_DEFAULT,        /*tp_flags*/
60         "Source filter RGB24 objects",       /* tp_doc */
61         0,                             /* tp_traverse */
62         0,                             /* tp_clear */
63         0,                             /* tp_richcompare */
64         0,                             /* tp_weaklistoffset */
65         0,                             /* tp_iter */
66         0,                             /* tp_iternext */
67         NULL,                /* tp_methods */
68         0,                   /* tp_members */
69         NULL,             /* tp_getset */
70         0,                         /* tp_base */
71         0,                         /* tp_dict */
72         0,                         /* tp_descr_get */
73         0,                         /* tp_descr_set */
74         0,                         /* tp_dictoffset */
75         (initproc)Filter_init<FilterRGB24>,     /* tp_init */
76         0,                         /* tp_alloc */
77         Filter_allocNew,           /* tp_new */
78 };
79
80 // FilterBGR24
81
82 // define python type
83 PyTypeObject FilterBGR24Type =
84
85         PyObject_HEAD_INIT(NULL)
86         0,                         /*ob_size*/
87         "VideoTexture.FilterBGR24",   /*tp_name*/
88         sizeof(PyFilter),          /*tp_basicsize*/
89         0,                         /*tp_itemsize*/
90         (destructor)Filter_dealloc,/*tp_dealloc*/
91         0,                         /*tp_print*/
92         0,                         /*tp_getattr*/
93         0,                         /*tp_setattr*/
94         0,                         /*tp_compare*/
95         0,                         /*tp_repr*/
96         0,                         /*tp_as_number*/
97         0,                         /*tp_as_sequence*/
98         0,                         /*tp_as_mapping*/
99         0,                         /*tp_hash */
100         0,                         /*tp_call*/
101         0,                         /*tp_str*/
102         0,                         /*tp_getattro*/
103         0,                         /*tp_setattro*/
104         0,                         /*tp_as_buffer*/
105         Py_TPFLAGS_DEFAULT,        /*tp_flags*/
106         "Source filter BGR24 objects",       /* tp_doc */
107         0,                             /* tp_traverse */
108         0,                             /* tp_clear */
109         0,                             /* tp_richcompare */
110         0,                             /* tp_weaklistoffset */
111         0,                             /* tp_iter */
112         0,                             /* tp_iternext */
113         NULL,                /* tp_methods */
114         0,                   /* tp_members */
115         NULL,             /* tp_getset */
116         0,                         /* tp_base */
117         0,                         /* tp_dict */
118         0,                         /* tp_descr_get */
119         0,                         /* tp_descr_set */
120         0,                         /* tp_dictoffset */
121         (initproc)Filter_init<FilterBGR24>,     /* tp_init */
122         0,                         /* tp_alloc */
123         Filter_allocNew,           /* tp_new */
124 };
125