e5fe4711cff0bbbd9caf839920e81dfe5bf56f14
[blender.git] / source / gameengine / VideoTexture / FilterSource.cpp
1 /*
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 /** \file gameengine/VideoTexture/FilterSource.cpp
24  *  \ingroup bgevideotex
25  */
26
27 // implementation
28
29 #include "PyObjectPlus.h"
30 #include <structmember.h>
31
32 #include "FilterSource.h"
33
34 #include "FilterBase.h"
35 #include "PyTypeList.h"
36
37
38 // FilterRGB24
39
40 // define python type
41 PyTypeObject FilterRGB24Type =
42
43         PyVarObject_HEAD_INIT(NULL, 0)
44         "VideoTexture.FilterRGB24",   /*tp_name*/
45         sizeof(PyFilter),          /*tp_basicsize*/
46         0,                         /*tp_itemsize*/
47         (destructor)Filter_dealloc,/*tp_dealloc*/
48         0,                         /*tp_print*/
49         0,                         /*tp_getattr*/
50         0,                         /*tp_setattr*/
51         0,                         /*tp_compare*/
52         0,                         /*tp_repr*/
53         0,                         /*tp_as_number*/
54         0,                         /*tp_as_sequence*/
55         0,                         /*tp_as_mapping*/
56         0,                         /*tp_hash */
57         0,                         /*tp_call*/
58         0,                         /*tp_str*/
59         0,                         /*tp_getattro*/
60         0,                         /*tp_setattro*/
61         0,                         /*tp_as_buffer*/
62         Py_TPFLAGS_DEFAULT,        /*tp_flags*/
63         "Source filter RGB24 objects",       /* tp_doc */
64         0,                             /* tp_traverse */
65         0,                             /* tp_clear */
66         0,                             /* tp_richcompare */
67         0,                             /* tp_weaklistoffset */
68         0,                             /* tp_iter */
69         0,                             /* tp_iternext */
70         NULL,                /* tp_methods */
71         0,                   /* tp_members */
72         NULL,             /* tp_getset */
73         0,                         /* tp_base */
74         0,                         /* tp_dict */
75         0,                         /* tp_descr_get */
76         0,                         /* tp_descr_set */
77         0,                         /* tp_dictoffset */
78         (initproc)Filter_init<FilterRGB24>,     /* tp_init */
79         0,                         /* tp_alloc */
80         Filter_allocNew,           /* tp_new */
81 };
82
83 // FilterRGBA32
84
85 // define python type
86 PyTypeObject FilterRGBA32Type =
87
88         PyVarObject_HEAD_INIT(NULL, 0)
89         "VideoTexture.FilterRGBA32",   /*tp_name*/
90         sizeof(PyFilter),          /*tp_basicsize*/
91         0,                         /*tp_itemsize*/
92         (destructor)Filter_dealloc,/*tp_dealloc*/
93         0,                         /*tp_print*/
94         0,                         /*tp_getattr*/
95         0,                         /*tp_setattr*/
96         0,                         /*tp_compare*/
97         0,                         /*tp_repr*/
98         0,                         /*tp_as_number*/
99         0,                         /*tp_as_sequence*/
100         0,                         /*tp_as_mapping*/
101         0,                         /*tp_hash */
102         0,                         /*tp_call*/
103         0,                         /*tp_str*/
104         0,                         /*tp_getattro*/
105         0,                         /*tp_setattro*/
106         0,                         /*tp_as_buffer*/
107         Py_TPFLAGS_DEFAULT,        /*tp_flags*/
108         "Source filter RGBA32 objects",       /* tp_doc */
109         0,                             /* tp_traverse */
110         0,                             /* tp_clear */
111         0,                             /* tp_richcompare */
112         0,                             /* tp_weaklistoffset */
113         0,                             /* tp_iter */
114         0,                             /* tp_iternext */
115         NULL,                /* tp_methods */
116         0,                   /* tp_members */
117         NULL,             /* tp_getset */
118         0,                         /* tp_base */
119         0,                         /* tp_dict */
120         0,                         /* tp_descr_get */
121         0,                         /* tp_descr_set */
122         0,                         /* tp_dictoffset */
123         (initproc)Filter_init<FilterRGBA32>,     /* tp_init */
124         0,                         /* tp_alloc */
125         Filter_allocNew,           /* tp_new */
126 };
127
128 // FilterBGR24
129
130 // define python type
131 PyTypeObject FilterBGR24Type =
132
133         PyVarObject_HEAD_INIT(NULL, 0)
134         "VideoTexture.FilterBGR24",   /*tp_name*/
135         sizeof(PyFilter),          /*tp_basicsize*/
136         0,                         /*tp_itemsize*/
137         (destructor)Filter_dealloc,/*tp_dealloc*/
138         0,                         /*tp_print*/
139         0,                         /*tp_getattr*/
140         0,                         /*tp_setattr*/
141         0,                         /*tp_compare*/
142         0,                         /*tp_repr*/
143         0,                         /*tp_as_number*/
144         0,                         /*tp_as_sequence*/
145         0,                         /*tp_as_mapping*/
146         0,                         /*tp_hash */
147         0,                         /*tp_call*/
148         0,                         /*tp_str*/
149         0,                         /*tp_getattro*/
150         0,                         /*tp_setattro*/
151         0,                         /*tp_as_buffer*/
152         Py_TPFLAGS_DEFAULT,        /*tp_flags*/
153         "Source filter BGR24 objects",       /* tp_doc */
154         0,                             /* tp_traverse */
155         0,                             /* tp_clear */
156         0,                             /* tp_richcompare */
157         0,                             /* tp_weaklistoffset */
158         0,                             /* tp_iter */
159         0,                             /* tp_iternext */
160         NULL,                /* tp_methods */
161         0,                   /* tp_members */
162         NULL,             /* tp_getset */
163         0,                         /* tp_base */
164         0,                         /* tp_dict */
165         0,                         /* tp_descr_get */
166         0,                         /* tp_descr_set */
167         0,                         /* tp_dictoffset */
168         (initproc)Filter_init<FilterBGR24>,     /* tp_init */
169         0,                         /* tp_alloc */
170         Filter_allocNew,           /* tp_new */
171 };
172