##// END OF EJS Templates
- removed phonon temporarily...
florianlink -
r11:27e624e0d6f1
parent child
Show More
@@ -0,0 +1,1
1 qmake -tp vc -r PythonQt.pro
@@ -1,4 +1,4
1 1 TEMPLATE = subdirs
2 2
3 3 CONFIG += ordered
4 SUBDIRS = src extensions tests examples
4 SUBDIRS = generator src extensions tests examples
@@ -1,30 +1,30
1 1 PythonQt
2 2 --------
3 3
4 4 PythonQt is a dynamic Python (http://www.python.org) binding for Qt (http://www.trolltech.com).
5 5 It offers an easy way to embed the Python scripting language into
6 6 your Qt applications. It makes heavy use of the QMetaObject system and thus requires Qt4.x.
7 7
8 8 Licensing of PythonQt
9 9 ---------------------
10 10 PythonQt is distributed under the LGPL license.
11 11
12 12 Licensing of Generator
13 13 ----------------------
14 14 The build system of PythonQt makes use of a patched version of the GPL'ed QtScript generator,
15 15 located in the "generator" directory.
16 16
17 17 See http://labs.trolltech.com/page/Projects/QtScript/Generator for details of the original project.
18 18
19 19 The PythonQt wrappers generated by the generator are distributed under the LGPL, they are not restriced by the GPL.
20 20
21 The generated wrappers are pre-generated and checked-in for Qt 4.5, so you only need to build and run the
21 The generated wrappers are pre-generated and checked-in for Qt 4.4.3, so you only need to build and run the
22 22 generator when you want to build additional wrappers or you want to upgrade/downgrade to an newer Qt version.
23 23
24 24 Documentation
25 25 -------------
26 26
27 27 More documentation is available at:
28 28
29 29 http://pythonqt.sourceforge.net/
30 30
@@ -1,62 +1,62
1 1 /*
2 2 *
3 3 * Copyright (C) 2006 MeVis Research GmbH All Rights Reserved.
4 4 *
5 5 * This library is free software; you can redistribute it and/or
6 6 * modify it under the terms of the GNU Lesser General Public
7 7 * License as published by the Free Software Foundation; either
8 8 * version 2.1 of the License, or (at your option) any later version.
9 9 *
10 10 * This library is distributed in the hope that it will be useful,
11 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 13 * Lesser General Public License for more details.
14 14 *
15 15 * Further, this software is distributed without any warranty that it is
16 16 * free of the rightful claim of any third person regarding infringement
17 17 * or the like. Any license provided herein, whether implied or
18 18 * otherwise, applies only to this software file. Patent licenses, if
19 19 * any, provided herein do not apply to combinations of this program with
20 20 * other software, or any other product whatsoever.
21 21 *
22 22 * You should have received a copy of the GNU Lesser General Public
23 23 * License along with this library; if not, write to the Free Software
24 24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 25 *
26 26 * Contact information: MeVis Research GmbH, Universitaetsallee 29,
27 27 * 28359 Bremen, Germany or:
28 28 *
29 29 * http://www.mevis.de
30 30 *
31 31 */
32 32
33 33 #include "PythonQt_QtAll.h"
34 34
35 35 void PythonQt_init_QtGui();
36 36 void PythonQt_init_QtSvg();
37 37 void PythonQt_init_QtSql();
38 38 void PythonQt_init_QtNetwork();
39 39 void PythonQt_init_QtCore();
40 40 void PythonQt_init_QtWebKit();
41 41 void PythonQt_init_QtOpenGL();
42 void PythonQt_init_QtPhonon();
43 42 void PythonQt_init_QtXml();
44 43 void PythonQt_init_QtXmlPatterns();
44 //void PythonQt_init_QtPhonon();
45 45
46 46 namespace PythonQt_QtAll
47 47 {
48 48 PYTHONQT_QTALL_EXPORT void init() {
49 49 PythonQt_init_QtCore();
50 50 PythonQt_init_QtNetwork();
51 51 PythonQt_init_QtGui();
52 52 PythonQt_init_QtXml();
53 53 PythonQt_init_QtXmlPatterns();
54 54 PythonQt_init_QtSvg();
55 55 PythonQt_init_QtSql();
56 56 PythonQt_init_QtWebKit();
57 57 PythonQt_init_QtOpenGL();
58 PythonQt_init_QtPhonon();
58 // PythonQt_init_QtPhonon();
59 59 };
60 60 };
61 61
62 62
@@ -1,32 +1,34
1 1
2 2 TARGET = PythonQt_QtAll
3 3 TEMPLATE = lib
4 4
5 5 DESTDIR = ../../lib
6 6 DLLDESTDIR = ../../lib
7 7
8 8 include ( ../../build/common.prf )
9 9 include ( ../../build/PythonQt.prf )
10 10
11 11 CONFIG += dll qt
12 12
13 13 DEFINES += PYTHONQT_QTALL_EXPORTS
14 14
15 15 HEADERS += \
16 16 PythonQt_QtAll.h
17 17
18 18 SOURCES += \
19 19 PythonQt_QtAll.cpp
20 20
21 QT += webkit gui svg sql network xml xmlpatterns phonon opengl
21 QT += webkit gui svg sql network xml xmlpatterns opengl
22 #QT += phonon
22 23
23 24 include (../../generated_cpp/com_trolltech_qt_core/com_trolltech_qt_core.pri)
24 25 include (../../generated_cpp/com_trolltech_qt_gui/com_trolltech_qt_gui.pri)
25 26 include (../../generated_cpp/com_trolltech_qt_svg/com_trolltech_qt_svg.pri)
26 27 include (../../generated_cpp/com_trolltech_qt_sql/com_trolltech_qt_sql.pri)
27 28 include (../../generated_cpp/com_trolltech_qt_network/com_trolltech_qt_network.pri)
28 29 include (../../generated_cpp/com_trolltech_qt_opengl/com_trolltech_qt_opengl.pri)
29 include (../../generated_cpp/com_trolltech_qt_phonon/com_trolltech_qt_phonon.pri)
30 30 include (../../generated_cpp/com_trolltech_qt_webkit/com_trolltech_qt_webkit.pri)
31 31 include (../../generated_cpp/com_trolltech_qt_xml/com_trolltech_qt_xml.pri)
32 32 include (../../generated_cpp/com_trolltech_qt_xmlpatterns/com_trolltech_qt_xmlpatterns.pri)
33
34 #include (../../generated_cpp/com_trolltech_qt_phonon/com_trolltech_qt_phonon.pri)
1 NO CONTENT: modified file
@@ -1,27 +1,30
1 TARGET = pythonqt_generator
2 CONFIG -= debug
3 CONFIG += release
4 DESTDIR = .
5
1 6 include(generator.pri)
2 7
8
3 9 # Input
4 10 HEADERS += \
5 11 generatorsetqtscript.h \
6 12 metaqtscriptbuilder.h \
7 13 metaqtscript.h \
8 14 classgenerator.h \
9 15 shellgenerator.h \
10 16 shellimplgenerator.h \
11 17 shellheadergenerator.h \
12 18 setupgenerator.h \
13 19 docgenerator.h
14 20
15 21 SOURCES += \
16 22 generatorsetqtscript.cpp \
17 23 metaqtscriptbuilder.cpp \
18 24 metaqtscript.cpp \
19 25 classgenerator.cpp \
20 26 shellgenerator.cpp \
21 27 shellimplgenerator.cpp \
22 28 shellheadergenerator.cpp \
23 29 setupgenerator.cpp \
24 30 docgenerator.cpp
25
26 CONFIG -= debug
27 CONFIG += release
@@ -1,67 +1,70
1 1 /****************************************************************************
2 2 **
3 3 ** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved.
4 4 **
5 5 ** This file is part of the Qt Script Generator project on Trolltech Labs.
6 6 **
7 7 ** This file may be used under the terms of the GNU General Public
8 8 ** License version 2.0 as published by the Free Software Foundation
9 9 ** and appearing in the file LICENSE.GPL included in the packaging of
10 10 ** this file. Please review the following information to ensure GNU
11 11 ** General Public Licensing requirements will be met:
12 12 ** http://www.trolltech.com/products/qt/opensource.html
13 13 **
14 14 ** If you are unsure which license is appropriate for your use, please
15 15 ** review the following information:
16 16 ** http://www.trolltech.com/products/qt/licensing.html or contact the
17 17 ** sales department at sales@trolltech.com.
18 18 **
19 19 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
20 20 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
21 21 **
22 22 ****************************************************************************/
23 23
24 24 #include "prigenerator.h"
25 25 #include "reporthandler.h"
26 26 #include "fileout.h"
27 27
28 28 void PriGenerator::addHeader(const QString &folder, const QString &header)
29 29 {
30 30 priHash[folder].headers << header;
31 31 }
32 32
33 33 void PriGenerator::addSource(const QString &folder, const QString &source)
34 34 {
35 35 priHash[folder].sources << source;
36 36 }
37 37
38 38 void PriGenerator::generate()
39 39 {
40 40 QHashIterator<QString, Pri> pri(priHash);
41 41 while (pri.hasNext()) {
42 42 pri.next();
43 43 QStringList list = pri.value().headers;
44 44 if (list.isEmpty())
45 45 continue;
46 46
47 47 FileOut file(m_out_dir + "/generated_cpp/" + pri.key());
48 48 file.stream << "HEADERS += \\\n";
49 49 qSort(list.begin(), list.end());
50 50 foreach (const QString &entry, list) {
51 51 file.stream << " $$PWD/" << entry << " \\\n";
52 52 }
53 53
54 54 file.stream << "\n";
55 55 file.stream << "SOURCES += \\\n";
56 56 list = pri.value().sources;
57 57 qSort(list.begin(), list.end());
58 58 foreach (const QString &entry, list) {
59 59 file.stream << " $$PWD/" << entry << " \\\n";
60 60 }
61 file.stream << " $$PWD/init.cpp\n";
61 QString initName = pri.key();
62 initName = initName.mid(initName.indexOf('/')+1);
63 initName = initName.left(initName.length()-4);
64 file.stream << " $$PWD/" + initName + "_init.cpp\n";
62 65
63 66 if (file.done())
64 67 ++m_num_generated_written;
65 68 ++m_num_generated;
66 69 }
67 70 }
@@ -1,1134 +1,1134
1 1 /****************************************************************************
2 2 **
3 3 ** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved.
4 4 **
5 5 ** This file is part of the Qt Script Generator project on Trolltech Labs.
6 6 **
7 7 ** This file may be used under the terms of the GNU General Public
8 8 ** License version 2.0 as published by the Free Software Foundation
9 9 ** and appearing in the file LICENSE.GPL included in the packaging of
10 10 ** this file. Please review the following information to ensure GNU
11 11 ** General Public Licensing requirements will be met:
12 12 ** http://www.trolltech.com/products/qt/opensource.html
13 13 **
14 14 ** If you are unsure which license is appropriate for your use, please
15 15 ** review the following information:
16 16 ** http://www.trolltech.com/products/qt/licensing.html or contact the
17 17 ** sales department at sales@trolltech.com.
18 18 **
19 19 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
20 20 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
21 21 **
22 22 ****************************************************************************/
23 23
24 24 #define QT_NO_STL
25 25 #include <QtCore/QtCore>
26 26 #include <QtGui/QtGui>
27 27 #include <QtNetwork/QtNetwork>
28 28 #include <QtSql/QtSql>
29 29 #include <QtSvg/QtSvg>
30 30 #include <QtXml/QtXml>
31 31
32 32 #include <QtUiTools/QtUiTools>
33 33
34 34 #ifndef QT_NO_XMLPATTERNS
35 35 # include <QtXmlPatterns/QtXmlPatterns>
36 36 #endif
37 37
38 38 #ifndef QT_NO_WEBKIT
39 39 # include <QtWebKit/QtWebKit>
40 40 #endif
41 41
42 42 #ifndef QT_NO_PHONON
43 43 # include <phonon/phonon>
44 44 #endif
45 45
46 #include "../qtbindings/qtscript_core/qtscriptconcurrent.h"
46 //#include "../qtbindings/qtscript_core/qtscriptconcurrent.h"
47 47
48 48 #ifndef QT_NO_OPENGL
49 49 #define GL_ACCUM 0x0100
50 50 #define GL_LOAD 0x0101
51 51 #define GL_RETURN 0x0102
52 52 #define GL_MULT 0x0103
53 53 #define GL_ADD 0x0104
54 54
55 55 /* AlphaFunction */
56 56 #define GL_NEVER 0x0200
57 57 #define GL_LESS 0x0201
58 58 #define GL_EQUAL 0x0202
59 59 #define GL_LEQUAL 0x0203
60 60 #define GL_GREATER 0x0204
61 61 #define GL_NOTEQUAL 0x0205
62 62 #define GL_GEQUAL 0x0206
63 63 #define GL_ALWAYS 0x0207
64 64
65 65 /* AttribMask */
66 66 #define GL_CURRENT_BIT 0x00000001
67 67 #define GL_POINT_BIT 0x00000002
68 68 #define GL_LINE_BIT 0x00000004
69 69 #define GL_POLYGON_BIT 0x00000008
70 70 #define GL_POLYGON_STIPPLE_BIT 0x00000010
71 71 #define GL_PIXEL_MODE_BIT 0x00000020
72 72 #define GL_LIGHTING_BIT 0x00000040
73 73 #define GL_FOG_BIT 0x00000080
74 74 #define GL_DEPTH_BUFFER_BIT 0x00000100
75 75 #define GL_ACCUM_BUFFER_BIT 0x00000200
76 76 #define GL_STENCIL_BUFFER_BIT 0x00000400
77 77 #define GL_VIEWPORT_BIT 0x00000800
78 78 #define GL_TRANSFORM_BIT 0x00001000
79 79 #define GL_ENABLE_BIT 0x00002000
80 80 #define GL_COLOR_BUFFER_BIT 0x00004000
81 81 #define GL_HINT_BIT 0x00008000
82 82 #define GL_EVAL_BIT 0x00010000
83 83 #define GL_LIST_BIT 0x00020000
84 84 #define GL_TEXTURE_BIT 0x00040000
85 85 #define GL_SCISSOR_BIT 0x00080000
86 86 #define GL_ALL_ATTRIB_BITS 0x000fffff
87 87
88 88 /* BeginMode */
89 89 #define GL_POINTS 0x0000
90 90 #define GL_LINES 0x0001
91 91 #define GL_LINE_LOOP 0x0002
92 92 #define GL_LINE_STRIP 0x0003
93 93 #define GL_TRIANGLES 0x0004
94 94 #define GL_TRIANGLE_STRIP 0x0005
95 95 #define GL_TRIANGLE_FAN 0x0006
96 96 #define GL_QUADS 0x0007
97 97 #define GL_QUAD_STRIP 0x0008
98 98 #define GL_POLYGON 0x0009
99 99
100 100 /* BlendingFactorDest */
101 101 #define GL_ZERO 0
102 102 #define GL_ONE 1
103 103 #define GL_SRC_COLOR 0x0300
104 104 #define GL_ONE_MINUS_SRC_COLOR 0x0301
105 105 #define GL_SRC_ALPHA 0x0302
106 106 #define GL_ONE_MINUS_SRC_ALPHA 0x0303
107 107 #define GL_DST_ALPHA 0x0304
108 108 #define GL_ONE_MINUS_DST_ALPHA 0x0305
109 109
110 110 /* BlendingFactorSrc */
111 111 /* GL_ZERO */
112 112 /* GL_ONE */
113 113 #define GL_DST_COLOR 0x0306
114 114 #define GL_ONE_MINUS_DST_COLOR 0x0307
115 115 #define GL_SRC_ALPHA_SATURATE 0x0308
116 116 /* GL_SRC_ALPHA */
117 117 /* GL_ONE_MINUS_SRC_ALPHA */
118 118 /* GL_DST_ALPHA */
119 119 /* GL_ONE_MINUS_DST_ALPHA */
120 120
121 121 /* Boolean */
122 122 #define GL_TRUE 1
123 123 #define GL_FALSE 0
124 124
125 125 /* ClearBufferMask */
126 126 /* GL_COLOR_BUFFER_BIT */
127 127 /* GL_ACCUM_BUFFER_BIT */
128 128 /* GL_STENCIL_BUFFER_BIT */
129 129 /* GL_DEPTH_BUFFER_BIT */
130 130
131 131 /* ClientArrayType */
132 132 /* GL_VERTEX_ARRAY */
133 133 /* GL_NORMAL_ARRAY */
134 134 /* GL_COLOR_ARRAY */
135 135 /* GL_INDEX_ARRAY */
136 136 /* GL_TEXTURE_COORD_ARRAY */
137 137 /* GL_EDGE_FLAG_ARRAY */
138 138
139 139 /* ClipPlaneName */
140 140 #define GL_CLIP_PLANE0 0x3000
141 141 #define GL_CLIP_PLANE1 0x3001
142 142 #define GL_CLIP_PLANE2 0x3002
143 143 #define GL_CLIP_PLANE3 0x3003
144 144 #define GL_CLIP_PLANE4 0x3004
145 145 #define GL_CLIP_PLANE5 0x3005
146 146
147 147 /* ColorMaterialFace */
148 148 /* GL_FRONT */
149 149 /* GL_BACK */
150 150 /* GL_FRONT_AND_BACK */
151 151
152 152 /* ColorMaterialParameter */
153 153 /* GL_AMBIENT */
154 154 /* GL_DIFFUSE */
155 155 /* GL_SPECULAR */
156 156 /* GL_EMISSION */
157 157 /* GL_AMBIENT_AND_DIFFUSE */
158 158
159 159 /* ColorPointerType */
160 160 /* GL_BYTE */
161 161 /* GL_UNSIGNED_BYTE */
162 162 /* GL_SHORT */
163 163 /* GL_UNSIGNED_SHORT */
164 164 /* GL_INT */
165 165 /* GL_UNSIGNED_INT */
166 166 /* GL_FLOAT */
167 167 /* GL_DOUBLE */
168 168
169 169 /* CullFaceMode */
170 170 /* GL_FRONT */
171 171 /* GL_BACK */
172 172 /* GL_FRONT_AND_BACK */
173 173
174 174 /* DataType */
175 175 #define GL_BYTE 0x1400
176 176 #define GL_UNSIGNED_BYTE 0x1401
177 177 #define GL_SHORT 0x1402
178 178 #define GL_UNSIGNED_SHORT 0x1403
179 179 #define GL_INT 0x1404
180 180 #define GL_UNSIGNED_INT 0x1405
181 181 #define GL_FLOAT 0x1406
182 182 #define GL_2_BYTES 0x1407
183 183 #define GL_3_BYTES 0x1408
184 184 #define GL_4_BYTES 0x1409
185 185 #define GL_DOUBLE 0x140A
186 186
187 187 /* DepthFunction */
188 188 /* GL_NEVER */
189 189 /* GL_LESS */
190 190 /* GL_EQUAL */
191 191 /* GL_LEQUAL */
192 192 /* GL_GREATER */
193 193 /* GL_NOTEQUAL */
194 194 /* GL_GEQUAL */
195 195 /* GL_ALWAYS */
196 196
197 197 /* DrawBufferMode */
198 198 #define GL_NONE 0
199 199 #define GL_FRONT_LEFT 0x0400
200 200 #define GL_FRONT_RIGHT 0x0401
201 201 #define GL_BACK_LEFT 0x0402
202 202 #define GL_BACK_RIGHT 0x0403
203 203 #define GL_FRONT 0x0404
204 204 #define GL_BACK 0x0405
205 205 #define GL_LEFT 0x0406
206 206 #define GL_RIGHT 0x0407
207 207 #define GL_FRONT_AND_BACK 0x0408
208 208 #define GL_AUX0 0x0409
209 209 #define GL_AUX1 0x040A
210 210 #define GL_AUX2 0x040B
211 211 #define GL_AUX3 0x040C
212 212
213 213 /* Enable */
214 214 /* GL_FOG */
215 215 /* GL_LIGHTING */
216 216 /* GL_TEXTURE_1D */
217 217 /* GL_TEXTURE_2D */
218 218 /* GL_LINE_STIPPLE */
219 219 /* GL_POLYGON_STIPPLE */
220 220 /* GL_CULL_FACE */
221 221 /* GL_ALPHA_TEST */
222 222 /* GL_BLEND */
223 223 /* GL_INDEX_LOGIC_OP */
224 224 /* GL_COLOR_LOGIC_OP */
225 225 /* GL_DITHER */
226 226 /* GL_STENCIL_TEST */
227 227 /* GL_DEPTH_TEST */
228 228 /* GL_CLIP_PLANE0 */
229 229 /* GL_CLIP_PLANE1 */
230 230 /* GL_CLIP_PLANE2 */
231 231 /* GL_CLIP_PLANE3 */
232 232 /* GL_CLIP_PLANE4 */
233 233 /* GL_CLIP_PLANE5 */
234 234 /* GL_LIGHT0 */
235 235 /* GL_LIGHT1 */
236 236 /* GL_LIGHT2 */
237 237 /* GL_LIGHT3 */
238 238 /* GL_LIGHT4 */
239 239 /* GL_LIGHT5 */
240 240 /* GL_LIGHT6 */
241 241 /* GL_LIGHT7 */
242 242 /* GL_TEXTURE_GEN_S */
243 243 /* GL_TEXTURE_GEN_T */
244 244 /* GL_TEXTURE_GEN_R */
245 245 /* GL_TEXTURE_GEN_Q */
246 246 /* GL_MAP1_VERTEX_3 */
247 247 /* GL_MAP1_VERTEX_4 */
248 248 /* GL_MAP1_COLOR_4 */
249 249 /* GL_MAP1_INDEX */
250 250 /* GL_MAP1_NORMAL */
251 251 /* GL_MAP1_TEXTURE_COORD_1 */
252 252 /* GL_MAP1_TEXTURE_COORD_2 */
253 253 /* GL_MAP1_TEXTURE_COORD_3 */
254 254 /* GL_MAP1_TEXTURE_COORD_4 */
255 255 /* GL_MAP2_VERTEX_3 */
256 256 /* GL_MAP2_VERTEX_4 */
257 257 /* GL_MAP2_COLOR_4 */
258 258 /* GL_MAP2_INDEX */
259 259 /* GL_MAP2_NORMAL */
260 260 /* GL_MAP2_TEXTURE_COORD_1 */
261 261 /* GL_MAP2_TEXTURE_COORD_2 */
262 262 /* GL_MAP2_TEXTURE_COORD_3 */
263 263 /* GL_MAP2_TEXTURE_COORD_4 */
264 264 /* GL_POINT_SMOOTH */
265 265 /* GL_LINE_SMOOTH */
266 266 /* GL_POLYGON_SMOOTH */
267 267 /* GL_SCISSOR_TEST */
268 268 /* GL_COLOR_MATERIAL */
269 269 /* GL_NORMALIZE */
270 270 /* GL_AUTO_NORMAL */
271 271 /* GL_VERTEX_ARRAY */
272 272 /* GL_NORMAL_ARRAY */
273 273 /* GL_COLOR_ARRAY */
274 274 /* GL_INDEX_ARRAY */
275 275 /* GL_TEXTURE_COORD_ARRAY */
276 276 /* GL_EDGE_FLAG_ARRAY */
277 277 /* GL_POLYGON_OFFSET_POINT */
278 278 /* GL_POLYGON_OFFSET_LINE */
279 279 /* GL_POLYGON_OFFSET_FILL */
280 280
281 281 /* ErrorCode */
282 282 #define GL_NO_ERROR 0
283 283 #define GL_INVALID_ENUM 0x0500
284 284 #define GL_INVALID_VALUE 0x0501
285 285 #define GL_INVALID_OPERATION 0x0502
286 286 #define GL_STACK_OVERFLOW 0x0503
287 287 #define GL_STACK_UNDERFLOW 0x0504
288 288 #define GL_OUT_OF_MEMORY 0x0505
289 289
290 290 /* FeedBackMode */
291 291 #define GL_2D 0x0600
292 292 #define GL_3D 0x0601
293 293 #define GL_3D_COLOR 0x0602
294 294 #define GL_3D_COLOR_TEXTURE 0x0603
295 295 #define GL_4D_COLOR_TEXTURE 0x0604
296 296
297 297 /* FeedBackToken */
298 298 #define GL_PASS_THROUGH_TOKEN 0x0700
299 299 #define GL_POINT_TOKEN 0x0701
300 300 #define GL_LINE_TOKEN 0x0702
301 301 #define GL_POLYGON_TOKEN 0x0703
302 302 #define GL_BITMAP_TOKEN 0x0704
303 303 #define GL_DRAW_PIXEL_TOKEN 0x0705
304 304 #define GL_COPY_PIXEL_TOKEN 0x0706
305 305 #define GL_LINE_RESET_TOKEN 0x0707
306 306
307 307 /* FogMode */
308 308 /* GL_LINEAR */
309 309 #define GL_EXP 0x0800
310 310 #define GL_EXP2 0x0801
311 311
312 312
313 313 /* FogParameter */
314 314 /* GL_FOG_COLOR */
315 315 /* GL_FOG_DENSITY */
316 316 /* GL_FOG_END */
317 317 /* GL_FOG_INDEX */
318 318 /* GL_FOG_MODE */
319 319 /* GL_FOG_START */
320 320
321 321 /* FrontFaceDirection */
322 322 #define GL_CW 0x0900
323 323 #define GL_CCW 0x0901
324 324
325 325 /* GetMapTarget */
326 326 #define GL_COEFF 0x0A00
327 327 #define GL_ORDER 0x0A01
328 328 #define GL_DOMAIN 0x0A02
329 329
330 330 /* GetPixelMap */
331 331 /* GL_PIXEL_MAP_I_TO_I */
332 332 /* GL_PIXEL_MAP_S_TO_S */
333 333 /* GL_PIXEL_MAP_I_TO_R */
334 334 /* GL_PIXEL_MAP_I_TO_G */
335 335 /* GL_PIXEL_MAP_I_TO_B */
336 336 /* GL_PIXEL_MAP_I_TO_A */
337 337 /* GL_PIXEL_MAP_R_TO_R */
338 338 /* GL_PIXEL_MAP_G_TO_G */
339 339 /* GL_PIXEL_MAP_B_TO_B */
340 340 /* GL_PIXEL_MAP_A_TO_A */
341 341
342 342 /* GetPointerTarget */
343 343 /* GL_VERTEX_ARRAY_POINTER */
344 344 /* GL_NORMAL_ARRAY_POINTER */
345 345 /* GL_COLOR_ARRAY_POINTER */
346 346 /* GL_INDEX_ARRAY_POINTER */
347 347 /* GL_TEXTURE_COORD_ARRAY_POINTER */
348 348 /* GL_EDGE_FLAG_ARRAY_POINTER */
349 349
350 350 /* GetTarget */
351 351 #define GL_CURRENT_COLOR 0x0B00
352 352 #define GL_CURRENT_INDEX 0x0B01
353 353 #define GL_CURRENT_NORMAL 0x0B02
354 354 #define GL_CURRENT_TEXTURE_COORDS 0x0B03
355 355 #define GL_CURRENT_RASTER_COLOR 0x0B04
356 356 #define GL_CURRENT_RASTER_INDEX 0x0B05
357 357 #define GL_CURRENT_RASTER_TEXTURE_COORDS 0x0B06
358 358 #define GL_CURRENT_RASTER_POSITION 0x0B07
359 359 #define GL_CURRENT_RASTER_POSITION_VALID 0x0B08
360 360 #define GL_CURRENT_RASTER_DISTANCE 0x0B09
361 361 #define GL_POINT_SMOOTH 0x0B10
362 362 #define GL_POINT_SIZE 0x0B11
363 363 #define GL_POINT_SIZE_RANGE 0x0B12
364 364 #define GL_POINT_SIZE_GRANULARITY 0x0B13
365 365 #define GL_LINE_SMOOTH 0x0B20
366 366 #define GL_LINE_WIDTH 0x0B21
367 367 #define GL_LINE_WIDTH_RANGE 0x0B22
368 368 #define GL_LINE_WIDTH_GRANULARITY 0x0B23
369 369 #define GL_LINE_STIPPLE 0x0B24
370 370 #define GL_LINE_STIPPLE_PATTERN 0x0B25
371 371 #define GL_LINE_STIPPLE_REPEAT 0x0B26
372 372 #define GL_LIST_MODE 0x0B30
373 373 #define GL_MAX_LIST_NESTING 0x0B31
374 374 #define GL_LIST_BASE 0x0B32
375 375 #define GL_LIST_INDEX 0x0B33
376 376 #define GL_POLYGON_MODE 0x0B40
377 377 #define GL_POLYGON_SMOOTH 0x0B41
378 378 #define GL_POLYGON_STIPPLE 0x0B42
379 379 #define GL_EDGE_FLAG 0x0B43
380 380 #define GL_CULL_FACE 0x0B44
381 381 #define GL_CULL_FACE_MODE 0x0B45
382 382 #define GL_FRONT_FACE 0x0B46
383 383 #define GL_LIGHTING 0x0B50
384 384 #define GL_LIGHT_MODEL_LOCAL_VIEWER 0x0B51
385 385 #define GL_LIGHT_MODEL_TWO_SIDE 0x0B52
386 386 #define GL_LIGHT_MODEL_AMBIENT 0x0B53
387 387 #define GL_SHADE_MODEL 0x0B54
388 388 #define GL_COLOR_MATERIAL_FACE 0x0B55
389 389 #define GL_COLOR_MATERIAL_PARAMETER 0x0B56
390 390 #define GL_COLOR_MATERIAL 0x0B57
391 391 #define GL_FOG 0x0B60
392 392 #define GL_FOG_INDEX 0x0B61
393 393 #define GL_FOG_DENSITY 0x0B62
394 394 #define GL_FOG_START 0x0B63
395 395 #define GL_FOG_END 0x0B64
396 396 #define GL_FOG_MODE 0x0B65
397 397 #define GL_FOG_COLOR 0x0B66
398 398 #define GL_DEPTH_RANGE 0x0B70
399 399 #define GL_DEPTH_TEST 0x0B71
400 400 #define GL_DEPTH_WRITEMASK 0x0B72
401 401 #define GL_DEPTH_CLEAR_VALUE 0x0B73
402 402 #define GL_DEPTH_FUNC 0x0B74
403 403 #define GL_ACCUM_CLEAR_VALUE 0x0B80
404 404 #define GL_STENCIL_TEST 0x0B90
405 405 #define GL_STENCIL_CLEAR_VALUE 0x0B91
406 406 #define GL_STENCIL_FUNC 0x0B92
407 407 #define GL_STENCIL_VALUE_MASK 0x0B93
408 408 #define GL_STENCIL_FAIL 0x0B94
409 409 #define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
410 410 #define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
411 411 #define GL_STENCIL_REF 0x0B97
412 412 #define GL_STENCIL_WRITEMASK 0x0B98
413 413 #define GL_MATRIX_MODE 0x0BA0
414 414 #define GL_NORMALIZE 0x0BA1
415 415 #define GL_VIEWPORT 0x0BA2
416 416 #define GL_MODELVIEW_STACK_DEPTH 0x0BA3
417 417 #define GL_PROJECTION_STACK_DEPTH 0x0BA4
418 418 #define GL_TEXTURE_STACK_DEPTH 0x0BA5
419 419 #define GL_MODELVIEW_MATRIX 0x0BA6
420 420 #define GL_PROJECTION_MATRIX 0x0BA7
421 421 #define GL_TEXTURE_MATRIX 0x0BA8
422 422 #define GL_ATTRIB_STACK_DEPTH 0x0BB0
423 423 #define GL_CLIENT_ATTRIB_STACK_DEPTH 0x0BB1
424 424 #define GL_ALPHA_TEST 0x0BC0
425 425 #define GL_ALPHA_TEST_FUNC 0x0BC1
426 426 #define GL_ALPHA_TEST_REF 0x0BC2
427 427 #define GL_DITHER 0x0BD0
428 428 #define GL_BLEND_DST 0x0BE0
429 429 #define GL_BLEND_SRC 0x0BE1
430 430 #define GL_BLEND 0x0BE2
431 431 #define GL_LOGIC_OP_MODE 0x0BF0
432 432 #define GL_INDEX_LOGIC_OP 0x0BF1
433 433 #define GL_COLOR_LOGIC_OP 0x0BF2
434 434 #define GL_AUX_BUFFERS 0x0C00
435 435 #define GL_DRAW_BUFFER 0x0C01
436 436 #define GL_READ_BUFFER 0x0C02
437 437 #define GL_SCISSOR_BOX 0x0C10
438 438 #define GL_SCISSOR_TEST 0x0C11
439 439 #define GL_INDEX_CLEAR_VALUE 0x0C20
440 440 #define GL_INDEX_WRITEMASK 0x0C21
441 441 #define GL_COLOR_CLEAR_VALUE 0x0C22
442 442 #define GL_COLOR_WRITEMASK 0x0C23
443 443 #define GL_INDEX_MODE 0x0C30
444 444 #define GL_RGBA_MODE 0x0C31
445 445 #define GL_DOUBLEBUFFER 0x0C32
446 446 #define GL_STEREO 0x0C33
447 447 #define GL_RENDER_MODE 0x0C40
448 448 #define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50
449 449 #define GL_POINT_SMOOTH_HINT 0x0C51
450 450 #define GL_LINE_SMOOTH_HINT 0x0C52
451 451 #define GL_POLYGON_SMOOTH_HINT 0x0C53
452 452 #define GL_FOG_HINT 0x0C54
453 453 #define GL_TEXTURE_GEN_S 0x0C60
454 454 #define GL_TEXTURE_GEN_T 0x0C61
455 455 #define GL_TEXTURE_GEN_R 0x0C62
456 456 #define GL_TEXTURE_GEN_Q 0x0C63
457 457 #define GL_PIXEL_MAP_I_TO_I 0x0C70
458 458 #define GL_PIXEL_MAP_S_TO_S 0x0C71
459 459 #define GL_PIXEL_MAP_I_TO_R 0x0C72
460 460 #define GL_PIXEL_MAP_I_TO_G 0x0C73
461 461 #define GL_PIXEL_MAP_I_TO_B 0x0C74
462 462 #define GL_PIXEL_MAP_I_TO_A 0x0C75
463 463 #define GL_PIXEL_MAP_R_TO_R 0x0C76
464 464 #define GL_PIXEL_MAP_G_TO_G 0x0C77
465 465 #define GL_PIXEL_MAP_B_TO_B 0x0C78
466 466 #define GL_PIXEL_MAP_A_TO_A 0x0C79
467 467 #define GL_PIXEL_MAP_I_TO_I_SIZE 0x0CB0
468 468 #define GL_PIXEL_MAP_S_TO_S_SIZE 0x0CB1
469 469 #define GL_PIXEL_MAP_I_TO_R_SIZE 0x0CB2
470 470 #define GL_PIXEL_MAP_I_TO_G_SIZE 0x0CB3
471 471 #define GL_PIXEL_MAP_I_TO_B_SIZE 0x0CB4
472 472 #define GL_PIXEL_MAP_I_TO_A_SIZE 0x0CB5
473 473 #define GL_PIXEL_MAP_R_TO_R_SIZE 0x0CB6
474 474 #define GL_PIXEL_MAP_G_TO_G_SIZE 0x0CB7
475 475 #define GL_PIXEL_MAP_B_TO_B_SIZE 0x0CB8
476 476 #define GL_PIXEL_MAP_A_TO_A_SIZE 0x0CB9
477 477 #define GL_UNPACK_SWAP_BYTES 0x0CF0
478 478 #define GL_UNPACK_LSB_FIRST 0x0CF1
479 479 #define GL_UNPACK_ROW_LENGTH 0x0CF2
480 480 #define GL_UNPACK_SKIP_ROWS 0x0CF3
481 481 #define GL_UNPACK_SKIP_PIXELS 0x0CF4
482 482 #define GL_UNPACK_ALIGNMENT 0x0CF5
483 483 #define GL_PACK_SWAP_BYTES 0x0D00
484 484 #define GL_PACK_LSB_FIRST 0x0D01
485 485 #define GL_PACK_ROW_LENGTH 0x0D02
486 486 #define GL_PACK_SKIP_ROWS 0x0D03
487 487 #define GL_PACK_SKIP_PIXELS 0x0D04
488 488 #define GL_PACK_ALIGNMENT 0x0D05
489 489 #define GL_MAP_COLOR 0x0D10
490 490 #define GL_MAP_STENCIL 0x0D11
491 491 #define GL_INDEX_SHIFT 0x0D12
492 492 #define GL_INDEX_OFFSET 0x0D13
493 493 #define GL_RED_SCALE 0x0D14
494 494 #define GL_RED_BIAS 0x0D15
495 495 #define GL_ZOOM_X 0x0D16
496 496 #define GL_ZOOM_Y 0x0D17
497 497 #define GL_GREEN_SCALE 0x0D18
498 498 #define GL_GREEN_BIAS 0x0D19
499 499 #define GL_BLUE_SCALE 0x0D1A
500 500 #define GL_BLUE_BIAS 0x0D1B
501 501 #define GL_ALPHA_SCALE 0x0D1C
502 502 #define GL_ALPHA_BIAS 0x0D1D
503 503 #define GL_DEPTH_SCALE 0x0D1E
504 504 #define GL_DEPTH_BIAS 0x0D1F
505 505 #define GL_MAX_EVAL_ORDER 0x0D30
506 506 #define GL_MAX_LIGHTS 0x0D31
507 507 #define GL_MAX_CLIP_PLANES 0x0D32
508 508 #define GL_MAX_TEXTURE_SIZE 0x0D33
509 509 #define GL_MAX_PIXEL_MAP_TABLE 0x0D34
510 510 #define GL_MAX_ATTRIB_STACK_DEPTH 0x0D35
511 511 #define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36
512 512 #define GL_MAX_NAME_STACK_DEPTH 0x0D37
513 513 #define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38
514 514 #define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39
515 515 #define GL_MAX_VIEWPORT_DIMS 0x0D3A
516 516 #define GL_MAX_CLIENT_ATTRIB_STACK_DEPTH 0x0D3B
517 517 #define GL_SUBPIXEL_BITS 0x0D50
518 518 #define GL_INDEX_BITS 0x0D51
519 519 #define GL_RED_BITS 0x0D52
520 520 #define GL_GREEN_BITS 0x0D53
521 521 #define GL_BLUE_BITS 0x0D54
522 522 #define GL_ALPHA_BITS 0x0D55
523 523 #define GL_DEPTH_BITS 0x0D56
524 524 #define GL_STENCIL_BITS 0x0D57
525 525 #define GL_ACCUM_RED_BITS 0x0D58
526 526 #define GL_ACCUM_GREEN_BITS 0x0D59
527 527 #define GL_ACCUM_BLUE_BITS 0x0D5A
528 528 #define GL_ACCUM_ALPHA_BITS 0x0D5B
529 529 #define GL_NAME_STACK_DEPTH 0x0D70
530 530 #define GL_AUTO_NORMAL 0x0D80
531 531 #define GL_MAP1_COLOR_4 0x0D90
532 532 #define GL_MAP1_INDEX 0x0D91
533 533 #define GL_MAP1_NORMAL 0x0D92
534 534 #define GL_MAP1_TEXTURE_COORD_1 0x0D93
535 535 #define GL_MAP1_TEXTURE_COORD_2 0x0D94
536 536 #define GL_MAP1_TEXTURE_COORD_3 0x0D95
537 537 #define GL_MAP1_TEXTURE_COORD_4 0x0D96
538 538 #define GL_MAP1_VERTEX_3 0x0D97
539 539 #define GL_MAP1_VERTEX_4 0x0D98
540 540 #define GL_MAP2_COLOR_4 0x0DB0
541 541 #define GL_MAP2_INDEX 0x0DB1
542 542 #define GL_MAP2_NORMAL 0x0DB2
543 543 #define GL_MAP2_TEXTURE_COORD_1 0x0DB3
544 544 #define GL_MAP2_TEXTURE_COORD_2 0x0DB4
545 545 #define GL_MAP2_TEXTURE_COORD_3 0x0DB5
546 546 #define GL_MAP2_TEXTURE_COORD_4 0x0DB6
547 547 #define GL_MAP2_VERTEX_3 0x0DB7
548 548 #define GL_MAP2_VERTEX_4 0x0DB8
549 549 #define GL_MAP1_GRID_DOMAIN 0x0DD0
550 550 #define GL_MAP1_GRID_SEGMENTS 0x0DD1
551 551 #define GL_MAP2_GRID_DOMAIN 0x0DD2
552 552 #define GL_MAP2_GRID_SEGMENTS 0x0DD3
553 553 #define GL_TEXTURE_1D 0x0DE0
554 554 #define GL_TEXTURE_2D 0x0DE1
555 555 #define GL_FEEDBACK_BUFFER_POINTER 0x0DF0
556 556 #define GL_FEEDBACK_BUFFER_SIZE 0x0DF1
557 557 #define GL_FEEDBACK_BUFFER_TYPE 0x0DF2
558 558 #define GL_SELECTION_BUFFER_POINTER 0x0DF3
559 559 #define GL_SELECTION_BUFFER_SIZE 0x0DF4
560 560 /* GL_TEXTURE_BINDING_1D */
561 561 /* GL_TEXTURE_BINDING_2D */
562 562 /* GL_VERTEX_ARRAY */
563 563 /* GL_NORMAL_ARRAY */
564 564 /* GL_COLOR_ARRAY */
565 565 /* GL_INDEX_ARRAY */
566 566 /* GL_TEXTURE_COORD_ARRAY */
567 567 /* GL_EDGE_FLAG_ARRAY */
568 568 /* GL_VERTEX_ARRAY_SIZE */
569 569 /* GL_VERTEX_ARRAY_TYPE */
570 570 /* GL_VERTEX_ARRAY_STRIDE */
571 571 /* GL_NORMAL_ARRAY_TYPE */
572 572 /* GL_NORMAL_ARRAY_STRIDE */
573 573 /* GL_COLOR_ARRAY_SIZE */
574 574 /* GL_COLOR_ARRAY_TYPE */
575 575 /* GL_COLOR_ARRAY_STRIDE */
576 576 /* GL_INDEX_ARRAY_TYPE */
577 577 /* GL_INDEX_ARRAY_STRIDE */
578 578 /* GL_TEXTURE_COORD_ARRAY_SIZE */
579 579 /* GL_TEXTURE_COORD_ARRAY_TYPE */
580 580 /* GL_TEXTURE_COORD_ARRAY_STRIDE */
581 581 /* GL_EDGE_FLAG_ARRAY_STRIDE */
582 582 /* GL_POLYGON_OFFSET_FACTOR */
583 583 /* GL_POLYGON_OFFSET_UNITS */
584 584
585 585 /* GetTextureParameter */
586 586 /* GL_TEXTURE_MAG_FILTER */
587 587 /* GL_TEXTURE_MIN_FILTER */
588 588 /* GL_TEXTURE_WRAP_S */
589 589 /* GL_TEXTURE_WRAP_T */
590 590 #define GL_TEXTURE_WIDTH 0x1000
591 591 #define GL_TEXTURE_HEIGHT 0x1001
592 592 #define GL_TEXTURE_INTERNAL_FORMAT 0x1003
593 593 #define GL_TEXTURE_BORDER_COLOR 0x1004
594 594 #define GL_TEXTURE_BORDER 0x1005
595 595 /* GL_TEXTURE_RED_SIZE */
596 596 /* GL_TEXTURE_GREEN_SIZE */
597 597 /* GL_TEXTURE_BLUE_SIZE */
598 598 /* GL_TEXTURE_ALPHA_SIZE */
599 599 /* GL_TEXTURE_LUMINANCE_SIZE */
600 600 /* GL_TEXTURE_INTENSITY_SIZE */
601 601 /* GL_TEXTURE_PRIORITY */
602 602 /* GL_TEXTURE_RESIDENT */
603 603
604 604 /* HintMode */
605 605 #define GL_DONT_CARE 0x1100
606 606 #define GL_FASTEST 0x1101
607 607 #define GL_NICEST 0x1102
608 608
609 609 /* HintTarget */
610 610 /* GL_PERSPECTIVE_CORRECTION_HINT */
611 611 /* GL_POINT_SMOOTH_HINT */
612 612 /* GL_LINE_SMOOTH_HINT */
613 613 /* GL_POLYGON_SMOOTH_HINT */
614 614 /* GL_FOG_HINT */
615 615 /* GL_PHONG_HINT */
616 616
617 617 /* IndexPointerType */
618 618 /* GL_SHORT */
619 619 /* GL_INT */
620 620 /* GL_FLOAT */
621 621 /* GL_DOUBLE */
622 622
623 623 /* LightModelParameter */
624 624 /* GL_LIGHT_MODEL_AMBIENT */
625 625 /* GL_LIGHT_MODEL_LOCAL_VIEWER */
626 626 /* GL_LIGHT_MODEL_TWO_SIDE */
627 627
628 628 /* LightName */
629 629 #define GL_LIGHT0 0x4000
630 630 #define GL_LIGHT1 0x4001
631 631 #define GL_LIGHT2 0x4002
632 632 #define GL_LIGHT3 0x4003
633 633 #define GL_LIGHT4 0x4004
634 634 #define GL_LIGHT5 0x4005
635 635 #define GL_LIGHT6 0x4006
636 636 #define GL_LIGHT7 0x4007
637 637
638 638 /* LightParameter */
639 639 #define GL_AMBIENT 0x1200
640 640 #define GL_DIFFUSE 0x1201
641 641 #define GL_SPECULAR 0x1202
642 642 #define GL_POSITION 0x1203
643 643 #define GL_SPOT_DIRECTION 0x1204
644 644 #define GL_SPOT_EXPONENT 0x1205
645 645 #define GL_SPOT_CUTOFF 0x1206
646 646 #define GL_CONSTANT_ATTENUATION 0x1207
647 647 #define GL_LINEAR_ATTENUATION 0x1208
648 648 #define GL_QUADRATIC_ATTENUATION 0x1209
649 649
650 650 /* InterleavedArrays */
651 651 /* GL_V2F */
652 652 /* GL_V3F */
653 653 /* GL_C4UB_V2F */
654 654 /* GL_C4UB_V3F */
655 655 /* GL_C3F_V3F */
656 656 /* GL_N3F_V3F */
657 657 /* GL_C4F_N3F_V3F */
658 658 /* GL_T2F_V3F */
659 659 /* GL_T4F_V4F */
660 660 /* GL_T2F_C4UB_V3F */
661 661 /* GL_T2F_C3F_V3F */
662 662 /* GL_T2F_N3F_V3F */
663 663 /* GL_T2F_C4F_N3F_V3F */
664 664 /* GL_T4F_C4F_N3F_V4F */
665 665
666 666 /* ListMode */
667 667 #define GL_COMPILE 0x1300
668 668 #define GL_COMPILE_AND_EXECUTE 0x1301
669 669
670 670 /* ListNameType */
671 671 /* GL_BYTE */
672 672 /* GL_UNSIGNED_BYTE */
673 673 /* GL_SHORT */
674 674 /* GL_UNSIGNED_SHORT */
675 675 /* GL_INT */
676 676 /* GL_UNSIGNED_INT */
677 677 /* GL_FLOAT */
678 678 /* GL_2_BYTES */
679 679 /* GL_3_BYTES */
680 680 /* GL_4_BYTES */
681 681
682 682 /* LogicOp */
683 683 #define GL_CLEAR 0x1500
684 684 #define GL_AND 0x1501
685 685 #define GL_AND_REVERSE 0x1502
686 686 #define GL_COPY 0x1503
687 687 #define GL_AND_INVERTED 0x1504
688 688 #define GL_NOOP 0x1505
689 689 #define GL_XOR 0x1506
690 690 #define GL_OR 0x1507
691 691 #define GL_NOR 0x1508
692 692 #define GL_EQUIV 0x1509
693 693 #define GL_INVERT 0x150A
694 694 #define GL_OR_REVERSE 0x150B
695 695 #define GL_COPY_INVERTED 0x150C
696 696 #define GL_OR_INVERTED 0x150D
697 697 #define GL_NAND 0x150E
698 698 #define GL_SET 0x150F
699 699
700 700 /* MapTarget */
701 701 /* GL_MAP1_COLOR_4 */
702 702 /* GL_MAP1_INDEX */
703 703 /* GL_MAP1_NORMAL */
704 704 /* GL_MAP1_TEXTURE_COORD_1 */
705 705 /* GL_MAP1_TEXTURE_COORD_2 */
706 706 /* GL_MAP1_TEXTURE_COORD_3 */
707 707 /* GL_MAP1_TEXTURE_COORD_4 */
708 708 /* GL_MAP1_VERTEX_3 */
709 709 /* GL_MAP1_VERTEX_4 */
710 710 /* GL_MAP2_COLOR_4 */
711 711 /* GL_MAP2_INDEX */
712 712 /* GL_MAP2_NORMAL */
713 713 /* GL_MAP2_TEXTURE_COORD_1 */
714 714 /* GL_MAP2_TEXTURE_COORD_2 */
715 715 /* GL_MAP2_TEXTURE_COORD_3 */
716 716 /* GL_MAP2_TEXTURE_COORD_4 */
717 717 /* GL_MAP2_VERTEX_3 */
718 718 /* GL_MAP2_VERTEX_4 */
719 719
720 720 /* MaterialFace */
721 721 /* GL_FRONT */
722 722 /* GL_BACK */
723 723 /* GL_FRONT_AND_BACK */
724 724
725 725 /* MaterialParameter */
726 726 #define GL_EMISSION 0x1600
727 727 #define GL_SHININESS 0x1601
728 728 #define GL_AMBIENT_AND_DIFFUSE 0x1602
729 729 #define GL_COLOR_INDEXES 0x1603
730 730 /* GL_AMBIENT */
731 731 /* GL_DIFFUSE */
732 732 /* GL_SPECULAR */
733 733
734 734 /* MatrixMode */
735 735 #define GL_MODELVIEW 0x1700
736 736 #define GL_PROJECTION 0x1701
737 737 #define GL_TEXTURE 0x1702
738 738
739 739 /* MeshMode1 */
740 740 /* GL_POINT */
741 741 /* GL_LINE */
742 742
743 743 /* MeshMode2 */
744 744 /* GL_POINT */
745 745 /* GL_LINE */
746 746 /* GL_FILL */
747 747
748 748 /* NormalPointerType */
749 749 /* GL_BYTE */
750 750 /* GL_SHORT */
751 751 /* GL_INT */
752 752 /* GL_FLOAT */
753 753 /* GL_DOUBLE */
754 754
755 755 /* PixelCopyType */
756 756 #define GL_COLOR 0x1800
757 757 #define GL_DEPTH 0x1801
758 758 #define GL_STENCIL 0x1802
759 759
760 760 /* PixelFormat */
761 761 #define GL_COLOR_INDEX 0x1900
762 762 #define GL_STENCIL_INDEX 0x1901
763 763 #define GL_DEPTH_COMPONENT 0x1902
764 764 #define GL_RED 0x1903
765 765 #define GL_GREEN 0x1904
766 766 #define GL_BLUE 0x1905
767 767 #define GL_ALPHA 0x1906
768 768 #define GL_RGB 0x1907
769 769 #define GL_RGBA 0x1908
770 770 #define GL_LUMINANCE 0x1909
771 771 #define GL_LUMINANCE_ALPHA 0x190A
772 772
773 773 /* PixelMap */
774 774 /* GL_PIXEL_MAP_I_TO_I */
775 775 /* GL_PIXEL_MAP_S_TO_S */
776 776 /* GL_PIXEL_MAP_I_TO_R */
777 777 /* GL_PIXEL_MAP_I_TO_G */
778 778 /* GL_PIXEL_MAP_I_TO_B */
779 779 /* GL_PIXEL_MAP_I_TO_A */
780 780 /* GL_PIXEL_MAP_R_TO_R */
781 781 /* GL_PIXEL_MAP_G_TO_G */
782 782 /* GL_PIXEL_MAP_B_TO_B */
783 783 /* GL_PIXEL_MAP_A_TO_A */
784 784
785 785 /* PixelStore */
786 786 /* GL_UNPACK_SWAP_BYTES */
787 787 /* GL_UNPACK_LSB_FIRST */
788 788 /* GL_UNPACK_ROW_LENGTH */
789 789 /* GL_UNPACK_SKIP_ROWS */
790 790 /* GL_UNPACK_SKIP_PIXELS */
791 791 /* GL_UNPACK_ALIGNMENT */
792 792 /* GL_PACK_SWAP_BYTES */
793 793 /* GL_PACK_LSB_FIRST */
794 794 /* GL_PACK_ROW_LENGTH */
795 795 /* GL_PACK_SKIP_ROWS */
796 796 /* GL_PACK_SKIP_PIXELS */
797 797 /* GL_PACK_ALIGNMENT */
798 798
799 799 /* PixelTransfer */
800 800 /* GL_MAP_COLOR */
801 801 /* GL_MAP_STENCIL */
802 802 /* GL_INDEX_SHIFT */
803 803 /* GL_INDEX_OFFSET */
804 804 /* GL_RED_SCALE */
805 805 /* GL_RED_BIAS */
806 806 /* GL_GREEN_SCALE */
807 807 /* GL_GREEN_BIAS */
808 808 /* GL_BLUE_SCALE */
809 809 /* GL_BLUE_BIAS */
810 810 /* GL_ALPHA_SCALE */
811 811 /* GL_ALPHA_BIAS */
812 812 /* GL_DEPTH_SCALE */
813 813 /* GL_DEPTH_BIAS */
814 814
815 815 /* PixelType */
816 816 #define GL_BITMAP 0x1A00
817 817 /* GL_BYTE */
818 818 /* GL_UNSIGNED_BYTE */
819 819 /* GL_SHORT */
820 820 /* GL_UNSIGNED_SHORT */
821 821 /* GL_INT */
822 822 /* GL_UNSIGNED_INT */
823 823 /* GL_FLOAT */
824 824
825 825 /* PolygonMode */
826 826 #define GL_POINT 0x1B00
827 827 #define GL_LINE 0x1B01
828 828 #define GL_FILL 0x1B02
829 829
830 830 /* ReadBufferMode */
831 831 /* GL_FRONT_LEFT */
832 832 /* GL_FRONT_RIGHT */
833 833 /* GL_BACK_LEFT */
834 834 /* GL_BACK_RIGHT */
835 835 /* GL_FRONT */
836 836 /* GL_BACK */
837 837 /* GL_LEFT */
838 838 /* GL_RIGHT */
839 839 /* GL_AUX0 */
840 840 /* GL_AUX1 */
841 841 /* GL_AUX2 */
842 842 /* GL_AUX3 */
843 843
844 844 /* RenderingMode */
845 845 #define GL_RENDER 0x1C00
846 846 #define GL_FEEDBACK 0x1C01
847 847 #define GL_SELECT 0x1C02
848 848
849 849 /* ShadingModel */
850 850 #define GL_FLAT 0x1D00
851 851 #define GL_SMOOTH 0x1D01
852 852
853 853
854 854 /* StencilFunction */
855 855 /* GL_NEVER */
856 856 /* GL_LESS */
857 857 /* GL_EQUAL */
858 858 /* GL_LEQUAL */
859 859 /* GL_GREATER */
860 860 /* GL_NOTEQUAL */
861 861 /* GL_GEQUAL */
862 862 /* GL_ALWAYS */
863 863
864 864 /* StencilOp */
865 865 /* GL_ZERO */
866 866 #define GL_KEEP 0x1E00
867 867 #define GL_REPLACE 0x1E01
868 868 #define GL_INCR 0x1E02
869 869 #define GL_DECR 0x1E03
870 870 /* GL_INVERT */
871 871
872 872 /* StringName */
873 873 #define GL_VENDOR 0x1F00
874 874 #define GL_RENDERER 0x1F01
875 875 #define GL_VERSION 0x1F02
876 876 #define GL_EXTENSIONS 0x1F03
877 877
878 878 /* TextureCoordName */
879 879 #define GL_S 0x2000
880 880 #define GL_T 0x2001
881 881 #define GL_R 0x2002
882 882 #define GL_Q 0x2003
883 883
884 884 /* TexCoordPointerType */
885 885 /* GL_SHORT */
886 886 /* GL_INT */
887 887 /* GL_FLOAT */
888 888 /* GL_DOUBLE */
889 889
890 890 /* TextureEnvMode */
891 891 #define GL_MODULATE 0x2100
892 892 #define GL_DECAL 0x2101
893 893 /* GL_BLEND */
894 894 /* GL_REPLACE */
895 895
896 896 /* TextureEnvParameter */
897 897 #define GL_TEXTURE_ENV_MODE 0x2200
898 898 #define GL_TEXTURE_ENV_COLOR 0x2201
899 899
900 900 /* TextureEnvTarget */
901 901 #define GL_TEXTURE_ENV 0x2300
902 902
903 903 /* TextureGenMode */
904 904 #define GL_EYE_LINEAR 0x2400
905 905 #define GL_OBJECT_LINEAR 0x2401
906 906 #define GL_SPHERE_MAP 0x2402
907 907
908 908 /* TextureGenParameter */
909 909 #define GL_TEXTURE_GEN_MODE 0x2500
910 910 #define GL_OBJECT_PLANE 0x2501
911 911 #define GL_EYE_PLANE 0x2502
912 912
913 913 /* TextureMagFilter */
914 914 #define GL_NEAREST 0x2600
915 915 #define GL_LINEAR 0x2601
916 916
917 917 /* TextureMinFilter */
918 918 /* GL_NEAREST */
919 919 /* GL_LINEAR */
920 920 #define GL_NEAREST_MIPMAP_NEAREST 0x2700
921 921 #define GL_LINEAR_MIPMAP_NEAREST 0x2701
922 922 #define GL_NEAREST_MIPMAP_LINEAR 0x2702
923 923 #define GL_LINEAR_MIPMAP_LINEAR 0x2703
924 924
925 925 /* TextureParameterName */
926 926 #define GL_TEXTURE_MAG_FILTER 0x2800
927 927 #define GL_TEXTURE_MIN_FILTER 0x2801
928 928 #define GL_TEXTURE_WRAP_S 0x2802
929 929 #define GL_TEXTURE_WRAP_T 0x2803
930 930 /* GL_TEXTURE_BORDER_COLOR */
931 931 /* GL_TEXTURE_PRIORITY */
932 932
933 933 /* TextureTarget */
934 934 /* GL_TEXTURE_1D */
935 935 /* GL_TEXTURE_2D */
936 936 /* GL_PROXY_TEXTURE_1D */
937 937 /* GL_PROXY_TEXTURE_2D */
938 938
939 939 /* TextureWrapMode */
940 940 #define GL_CLAMP 0x2900
941 941 #define GL_REPEAT 0x2901
942 942
943 943 /* VertexPointerType */
944 944 /* GL_SHORT */
945 945 /* GL_INT */
946 946 /* GL_FLOAT */
947 947 /* GL_DOUBLE */
948 948
949 949 /* ClientAttribMask */
950 950 #define GL_CLIENT_PIXEL_STORE_BIT 0x00000001
951 951 #define GL_CLIENT_VERTEX_ARRAY_BIT 0x00000002
952 952 #define GL_CLIENT_ALL_ATTRIB_BITS 0xffffffff
953 953
954 954 /* polygon_offset */
955 955 #define GL_POLYGON_OFFSET_FACTOR 0x8038
956 956 #define GL_POLYGON_OFFSET_UNITS 0x2A00
957 957 #define GL_POLYGON_OFFSET_POINT 0x2A01
958 958 #define GL_POLYGON_OFFSET_LINE 0x2A02
959 959 #define GL_POLYGON_OFFSET_FILL 0x8037
960 960
961 961 /* texture */
962 962 #define GL_ALPHA4 0x803B
963 963 #define GL_ALPHA8 0x803C
964 964 #define GL_ALPHA12 0x803D
965 965 #define GL_ALPHA16 0x803E
966 966 #define GL_LUMINANCE4 0x803F
967 967 #define GL_LUMINANCE8 0x8040
968 968 #define GL_LUMINANCE12 0x8041
969 969 #define GL_LUMINANCE16 0x8042
970 970 #define GL_LUMINANCE4_ALPHA4 0x8043
971 971 #define GL_LUMINANCE6_ALPHA2 0x8044
972 972 #define GL_LUMINANCE8_ALPHA8 0x8045
973 973 #define GL_LUMINANCE12_ALPHA4 0x8046
974 974 #define GL_LUMINANCE12_ALPHA12 0x8047
975 975 #define GL_LUMINANCE16_ALPHA16 0x8048
976 976 #define GL_INTENSITY 0x8049
977 977 #define GL_INTENSITY4 0x804A
978 978 #define GL_INTENSITY8 0x804B
979 979 #define GL_INTENSITY12 0x804C
980 980 #define GL_INTENSITY16 0x804D
981 981 #define GL_R3_G3_B2 0x2A10
982 982 #define GL_RGB4 0x804F
983 983 #define GL_RGB5 0x8050
984 984 #define GL_RGB8 0x8051
985 985 #define GL_RGB10 0x8052
986 986 #define GL_RGB12 0x8053
987 987 #define GL_RGB16 0x8054
988 988 #define GL_RGBA2 0x8055
989 989 #define GL_RGBA4 0x8056
990 990 #define GL_RGB5_A1 0x8057
991 991 #define GL_RGBA8 0x8058
992 992 #define GL_RGB10_A2 0x8059
993 993 #define GL_RGBA12 0x805A
994 994 #define GL_RGBA16 0x805B
995 995 #define GL_TEXTURE_RED_SIZE 0x805C
996 996 #define GL_TEXTURE_GREEN_SIZE 0x805D
997 997 #define GL_TEXTURE_BLUE_SIZE 0x805E
998 998 #define GL_TEXTURE_ALPHA_SIZE 0x805F
999 999 #define GL_TEXTURE_LUMINANCE_SIZE 0x8060
1000 1000 #define GL_TEXTURE_INTENSITY_SIZE 0x8061
1001 1001 #define GL_PROXY_TEXTURE_1D 0x8063
1002 1002 #define GL_PROXY_TEXTURE_2D 0x8064
1003 1003
1004 1004 /* texture_object */
1005 1005 #define GL_TEXTURE_PRIORITY 0x8066
1006 1006 #define GL_TEXTURE_RESIDENT 0x8067
1007 1007 #define GL_TEXTURE_BINDING_1D 0x8068
1008 1008 #define GL_TEXTURE_BINDING_2D 0x8069
1009 1009
1010 1010 /* vertex_array */
1011 1011 #define GL_VERTEX_ARRAY 0x8074
1012 1012 #define GL_NORMAL_ARRAY 0x8075
1013 1013 #define GL_COLOR_ARRAY 0x8076
1014 1014 #define GL_INDEX_ARRAY 0x8077
1015 1015 #define GL_TEXTURE_COORD_ARRAY 0x8078
1016 1016 #define GL_EDGE_FLAG_ARRAY 0x8079
1017 1017 #define GL_VERTEX_ARRAY_SIZE 0x807A
1018 1018 #define GL_VERTEX_ARRAY_TYPE 0x807B
1019 1019 #define GL_VERTEX_ARRAY_STRIDE 0x807C
1020 1020 #define GL_NORMAL_ARRAY_TYPE 0x807E
1021 1021 #define GL_NORMAL_ARRAY_STRIDE 0x807F
1022 1022 #define GL_COLOR_ARRAY_SIZE 0x8081
1023 1023 #define GL_COLOR_ARRAY_TYPE 0x8082
1024 1024 #define GL_COLOR_ARRAY_STRIDE 0x8083
1025 1025 #define GL_INDEX_ARRAY_TYPE 0x8085
1026 1026 #define GL_INDEX_ARRAY_STRIDE 0x8086
1027 1027 #define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088
1028 1028 #define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089
1029 1029 #define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A
1030 1030 #define GL_EDGE_FLAG_ARRAY_STRIDE 0x808C
1031 1031 #define GL_VERTEX_ARRAY_POINTER 0x808E
1032 1032 #define GL_NORMAL_ARRAY_POINTER 0x808F
1033 1033 #define GL_COLOR_ARRAY_POINTER 0x8090
1034 1034 #define GL_INDEX_ARRAY_POINTER 0x8091
1035 1035 #define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092
1036 1036 #define GL_EDGE_FLAG_ARRAY_POINTER 0x8093
1037 1037 #define GL_V2F 0x2A20
1038 1038 #define GL_V3F 0x2A21
1039 1039 #define GL_C4UB_V2F 0x2A22
1040 1040 #define GL_C4UB_V3F 0x2A23
1041 1041 #define GL_C3F_V3F 0x2A24
1042 1042 #define GL_N3F_V3F 0x2A25
1043 1043 #define GL_C4F_N3F_V3F 0x2A26
1044 1044 #define GL_T2F_V3F 0x2A27
1045 1045 #define GL_T4F_V4F 0x2A28
1046 1046 #define GL_T2F_C4UB_V3F 0x2A29
1047 1047 #define GL_T2F_C3F_V3F 0x2A2A
1048 1048 #define GL_T2F_N3F_V3F 0x2A2B
1049 1049 #define GL_T2F_C4F_N3F_V3F 0x2A2C
1050 1050 #define GL_T4F_C4F_N3F_V4F 0x2A2D
1051 1051
1052 1052 /* Extensions */
1053 1053 #define GL_EXT_vertex_array 1
1054 1054 #define GL_EXT_bgra 1
1055 1055 #define GL_EXT_paletted_texture 1
1056 1056 #define GL_WIN_swap_hint 1
1057 1057 #define GL_WIN_draw_range_elements 1
1058 1058 // #define GL_WIN_phong_shading 1
1059 1059 // #define GL_WIN_specular_fog 1
1060 1060
1061 1061 /* EXT_vertex_array */
1062 1062 #define GL_VERTEX_ARRAY_EXT 0x8074
1063 1063 #define GL_NORMAL_ARRAY_EXT 0x8075
1064 1064 #define GL_COLOR_ARRAY_EXT 0x8076
1065 1065 #define GL_INDEX_ARRAY_EXT 0x8077
1066 1066 #define GL_TEXTURE_COORD_ARRAY_EXT 0x8078
1067 1067 #define GL_EDGE_FLAG_ARRAY_EXT 0x8079
1068 1068 #define GL_VERTEX_ARRAY_SIZE_EXT 0x807A
1069 1069 #define GL_VERTEX_ARRAY_TYPE_EXT 0x807B
1070 1070 #define GL_VERTEX_ARRAY_STRIDE_EXT 0x807C
1071 1071 #define GL_VERTEX_ARRAY_COUNT_EXT 0x807D
1072 1072 #define GL_NORMAL_ARRAY_TYPE_EXT 0x807E
1073 1073 #define GL_NORMAL_ARRAY_STRIDE_EXT 0x807F
1074 1074 #define GL_NORMAL_ARRAY_COUNT_EXT 0x8080
1075 1075 #define GL_COLOR_ARRAY_SIZE_EXT 0x8081
1076 1076 #define GL_COLOR_ARRAY_TYPE_EXT 0x8082
1077 1077 #define GL_COLOR_ARRAY_STRIDE_EXT 0x8083
1078 1078 #define GL_COLOR_ARRAY_COUNT_EXT 0x8084
1079 1079 #define GL_INDEX_ARRAY_TYPE_EXT 0x8085
1080 1080 #define GL_INDEX_ARRAY_STRIDE_EXT 0x8086
1081 1081 #define GL_INDEX_ARRAY_COUNT_EXT 0x8087
1082 1082 #define GL_TEXTURE_COORD_ARRAY_SIZE_EXT 0x8088
1083 1083 #define GL_TEXTURE_COORD_ARRAY_TYPE_EXT 0x8089
1084 1084 #define GL_TEXTURE_COORD_ARRAY_STRIDE_EXT 0x808A
1085 1085 #define GL_TEXTURE_COORD_ARRAY_COUNT_EXT 0x808B
1086 1086 #define GL_EDGE_FLAG_ARRAY_STRIDE_EXT 0x808C
1087 1087 #define GL_EDGE_FLAG_ARRAY_COUNT_EXT 0x808D
1088 1088 #define GL_VERTEX_ARRAY_POINTER_EXT 0x808E
1089 1089 #define GL_NORMAL_ARRAY_POINTER_EXT 0x808F
1090 1090 #define GL_COLOR_ARRAY_POINTER_EXT 0x8090
1091 1091 #define GL_INDEX_ARRAY_POINTER_EXT 0x8091
1092 1092 #define GL_TEXTURE_COORD_ARRAY_POINTER_EXT 0x8092
1093 1093 #define GL_EDGE_FLAG_ARRAY_POINTER_EXT 0x8093
1094 1094 #define GL_DOUBLE_EXT GL_DOUBLE
1095 1095
1096 1096 /* EXT_bgra */
1097 1097 #define GL_BGR_EXT 0x80E0
1098 1098 #define GL_BGRA_EXT 0x80E1
1099 1099
1100 1100 /* EXT_paletted_texture */
1101 1101
1102 1102 /* These must match the GL_COLOR_TABLE_*_SGI enumerants */
1103 1103 #define GL_COLOR_TABLE_FORMAT_EXT 0x80D8
1104 1104 #define GL_COLOR_TABLE_WIDTH_EXT 0x80D9
1105 1105 #define GL_COLOR_TABLE_RED_SIZE_EXT 0x80DA
1106 1106 #define GL_COLOR_TABLE_GREEN_SIZE_EXT 0x80DB
1107 1107 #define GL_COLOR_TABLE_BLUE_SIZE_EXT 0x80DC
1108 1108 #define GL_COLOR_TABLE_ALPHA_SIZE_EXT 0x80DD
1109 1109 #define GL_COLOR_TABLE_LUMINANCE_SIZE_EXT 0x80DE
1110 1110 #define GL_COLOR_TABLE_INTENSITY_SIZE_EXT 0x80DF
1111 1111
1112 1112 #define GL_COLOR_INDEX1_EXT 0x80E2
1113 1113 #define GL_COLOR_INDEX2_EXT 0x80E3
1114 1114 #define GL_COLOR_INDEX4_EXT 0x80E4
1115 1115 #define GL_COLOR_INDEX8_EXT 0x80E5
1116 1116 #define GL_COLOR_INDEX12_EXT 0x80E6
1117 1117 #define GL_COLOR_INDEX16_EXT 0x80E7
1118 1118
1119 1119 /* WIN_draw_range_elements */
1120 1120 #define GL_MAX_ELEMENTS_VERTICES_WIN 0x80E8
1121 1121 #define GL_MAX_ELEMENTS_INDICES_WIN 0x80E9
1122 1122
1123 1123 /* WIN_phong_shading */
1124 1124 #define GL_PHONG_WIN 0x80EA
1125 1125 #define GL_PHONG_HINT_WIN 0x80EB
1126 1126
1127 1127 /* WIN_specular_fog */
1128 1128 #define GL_FOG_SPECULAR_TEXTURE_WIN 0x80EC
1129 1129
1130 1130 /* For compatibility with OpenGL v1.0 */
1131 1131 #define GL_LOGIC_OP GL_INDEX_LOGIC_OP
1132 1132 #define GL_TEXTURE_COMPONENTS GL_TEXTURE_INTERNAL_FORMAT
1133 1133 #include <QtOpenGL/QtOpenGL>
1134 1134 #endif // QT_NO_OPENGL
@@ -1,109 +1,111
1 1 /****************************************************************************
2 2 **
3 3 ** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved.
4 4 **
5 5 ** This file is part of the Qt Script Generator project on Trolltech Labs.
6 6 **
7 7 ** This file may be used under the terms of the GNU General Public
8 8 ** License version 2.0 as published by the Free Software Foundation
9 9 ** and appearing in the file LICENSE.GPL included in the packaging of
10 10 ** this file. Please review the following information to ensure GNU
11 11 ** General Public Licensing requirements will be met:
12 12 ** http://www.trolltech.com/products/qt/opensource.html
13 13 **
14 14 ** If you are unsure which license is appropriate for your use, please
15 15 ** review the following information:
16 16 ** http://www.trolltech.com/products/qt/licensing.html or contact the
17 17 ** sales department at sales@trolltech.com.
18 18 **
19 19 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
20 20 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
21 21 **
22 22 ****************************************************************************/
23 23
24 24 #include "setupgenerator.h"
25 25 #include "classgenerator.h"
26 26 #include "reporthandler.h"
27 27 #include "fileout.h"
28 28
29 29 //#define Q_SCRIPT_LAZY_GENERATOR
30 30
31 31 void SetupGenerator::addClass(const AbstractMetaClass *cls)
32 32 {
33 33 packHash[cls->package()].append(cls);
34 34 }
35 35
36 36 void writeQtScriptQtBindingsLicense(QTextStream &stream);
37 37
38 38 void maybeDeclareMetaType(QTextStream &stream, const QString &typeName,
39 39 QSet<QString> &registeredTypeNames);
40 40 bool hasDefaultConstructor(const AbstractMetaClass *meta_class);
41 41
42 42 void SetupGenerator::generate()
43 43 {
44 44 QHashIterator<QString, QList<const AbstractMetaClass*> > pack(packHash);
45 45 while (pack.hasNext()) {
46 46 pack.next();
47 47 QList<const AbstractMetaClass*> list = pack.value();
48 48 if (list.isEmpty())
49 49 continue;
50 50
51 QString packKey = pack.key();
51 52 QString packName = pack.key();
52 53 QStringList components = packName.split(".");
53 54 if ((components.size() > 2) && (components.at(0) == "com")
54 55 && (components.at(1) == "trolltech")) {
55 56 // kill com.trolltech in key
56 57 components.removeAt(0);
57 58 components.removeAt(0);
58 59 }
59 60 packName.replace(".", "_");
61 packKey.replace(".", "_");
60 62
61 63 QString shortPackName;
62 64 foreach (QString comp, components) {
63 65 comp[0] = comp[0].toUpper();
64 66 shortPackName += comp;
65 67 }
66 68 // add missing camel case (workaround..)
67 69 if (shortPackName == "QtWebkit") {
68 70 shortPackName = "QtWebKit";
69 71 } else if (shortPackName == "QtXmlpatterns") {
70 72 shortPackName = "QtXmlPatterns";
71 73 } else if (shortPackName == "QtOpengl") {
72 74 shortPackName = "QtOpenGL";
73 75 }
74 76
75 77
76 78 {
77 FileOut initFile(m_out_dir + "/generated_cpp/" + packName + "/init.cpp");
79 FileOut initFile(m_out_dir + "/generated_cpp/" + packName + "/" + packKey + "_init.cpp");
78 80 QTextStream &s = initFile.stream;
79 81
80 82 if (FileOut::license)
81 83 writeQtScriptQtBindingsLicense(s);
82 84
83 85 s << "#include <PythonQt.h>" << endl;
84 86
85 87 foreach (const AbstractMetaClass *cls, list) {
86 88 s << "#include \"PythonQtWrapper_" << cls->name() << ".h\"" << endl;
87 89 }
88 90 s << endl;
89 91
90 92 // declare individual class creation functions
91 93 s << "void PythonQt_init_" << shortPackName << "() {" << endl;
92 94 QStringList cppClassNames;
93 95 foreach (const AbstractMetaClass *cls, list) {
94 96 if (ClassGenerator::isBuiltIn(cls->name())) { continue; }
95 97
96 98 if (cls->isQObject()) {
97 99 s << "PythonQt::self()->registerClass(&" << cls->qualifiedCppName() << "::staticMetaObject, \"" << shortPackName <<"\", PythonQtCreateObject<PythonQtWrapper_" << cls->name() << ">);" << endl;
98 100 } else {
99 101 QString baseName = cls->baseClass()?cls->baseClass()->qualifiedCppName():"";
100 102 s << "PythonQt::self()->registerCPPClass(\""<< cls->qualifiedCppName() << "\", \"" << baseName << "\", \"" << shortPackName <<"\", PythonQtCreateObject<PythonQtWrapper_" << cls->name() << ">);" << endl;
101 103 }
102 104 }
103 105 s << endl;
104 106
105 107 s << "}";
106 108 s << endl;
107 109 }
108 110 }
109 111 }
1 NO CONTENT: file was removed, binary diff hidden
General Comments 0
You need to be logged in to leave comments. Login now