]> git.saurik.com Git - wxWidgets.git/blob - wxPython/contrib/glcanvas/gtk/glcanvas.cpp
Applied and merged patch 486364, which enables wxPython to be built in
[wxWidgets.git] / wxPython / contrib / glcanvas / gtk / glcanvas.cpp
1 /*
2 * FILE : contrib/glcanvas/gtk/glcanvas.cpp
3 *
4 * This file was automatically generated by :
5 * Simplified Wrapper and Interface Generator (SWIG)
6 * Version 1.1 (Build 883)
7 *
8 * Portions Copyright (c) 1995-1998
9 * The University of Utah and The Regents of the University of California.
10 * Permission is granted to distribute this file in any manner provided
11 * this notice remains intact.
12 *
13 * Do not make changes to this file--changes will be lost!
14 *
15 */
16
17
18 #define SWIGCODE
19 /* Implementation : PYTHON */
20
21 #define SWIGPYTHON
22 #include <string.h>
23 #include <stdlib.h>
24 /* Definitions for Windows/Unix exporting */
25 #if defined(__WIN32__)
26 # if defined(_MSC_VER)
27 # define SWIGEXPORT(a) __declspec(dllexport) a
28 # else
29 # if defined(__BORLANDC__)
30 # define SWIGEXPORT(a) a _export
31 # else
32 # define SWIGEXPORT(a) a
33 # endif
34 # endif
35 #else
36 # define SWIGEXPORT(a) a
37 #endif
38
39 #include "Python.h"
40
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44
45 extern void SWIG_MakePtr(char *, void *, char *);
46 extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
47 extern char *SWIG_GetPtr(char *, void **, char *);
48 extern char *SWIG_GetPtrObj(PyObject *, void **, char *);
49 extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *));
50 extern PyObject *SWIG_newvarlink(void);
51 #ifdef __cplusplus
52 }
53 #endif
54 #define SWIG_init initglcanvasc
55
56 #define SWIG_name "glcanvasc"
57
58 #include "export.h"
59 #ifdef __WXMSW__
60 #include "myglcanvas.h"
61 #else
62 #include <wx/glcanvas.h>
63 #endif
64
65
66
67 static PyObject* t_output_helper(PyObject* target, PyObject* o) {
68 PyObject* o2;
69 PyObject* o3;
70
71 if (!target) {
72 target = o;
73 } else if (target == Py_None) {
74 Py_DECREF(Py_None);
75 target = o;
76 } else {
77 if (!PyTuple_Check(target)) {
78 o2 = target;
79 target = PyTuple_New(1);
80 PyTuple_SetItem(target, 0, o2);
81 }
82 o3 = PyTuple_New(1);
83 PyTuple_SetItem(o3, 0, o);
84
85 o2 = target;
86 target = PySequence_Concat(o2, o3);
87 Py_DECREF(o2);
88 Py_DECREF(o3);
89 }
90 return target;
91 }
92 #ifdef __cplusplus
93 extern "C" {
94 #endif
95 static void *SwigwxGLContextTowxObject(void *ptr) {
96 wxGLContext *src;
97 wxObject *dest;
98 src = (wxGLContext *) ptr;
99 dest = (wxObject *) src;
100 return (void *) dest;
101 }
102
103 #define new_wxGLContext(_swigarg0,_swigarg1,_swigarg2) (new wxGLContext(_swigarg0,_swigarg1,_swigarg2))
104 static PyObject *_wrap_new_wxGLContext(PyObject *self, PyObject *args, PyObject *kwargs) {
105 PyObject * _resultobj;
106 wxGLContext * _result;
107 bool _arg0;
108 wxGLCanvas * _arg1;
109 wxPalette * _arg2 = (wxPalette *) &wxNullPalette;
110 int tempbool0;
111 PyObject * _argo1 = 0;
112 PyObject * _argo2 = 0;
113 char *_kwnames[] = { "isRGB","win","palette", NULL };
114 char _ptemp[128];
115
116 self = self;
117 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"iO|O:new_wxGLContext",_kwnames,&tempbool0,&_argo1,&_argo2))
118 return NULL;
119 _arg0 = (bool ) tempbool0;
120 if (_argo1) {
121 if (_argo1 == Py_None) { _arg1 = NULL; }
122 else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGLCanvas_p")) {
123 PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxGLContext. Expected _wxGLCanvas_p.");
124 return NULL;
125 }
126 }
127 if (_argo2) {
128 if (_argo2 == Py_None) { _arg2 = NULL; }
129 else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxPalette_p")) {
130 PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxGLContext. Expected _wxPalette_p.");
131 return NULL;
132 }
133 }
134 {
135 PyThreadState* __tstate = wxPyBeginAllowThreads();
136 _result = (wxGLContext *)new_wxGLContext(_arg0,_arg1,*_arg2);
137
138 wxPyEndAllowThreads(__tstate);
139 if (PyErr_Occurred()) return NULL;
140 } if (_result) {
141 SWIG_MakePtr(_ptemp, (char *) _result,"_wxGLContext_p");
142 _resultobj = Py_BuildValue("s",_ptemp);
143 } else {
144 Py_INCREF(Py_None);
145 _resultobj = Py_None;
146 }
147 return _resultobj;
148 }
149
150 #define delete_wxGLContext(_swigobj) (delete _swigobj)
151 static PyObject *_wrap_delete_wxGLContext(PyObject *self, PyObject *args, PyObject *kwargs) {
152 PyObject * _resultobj;
153 wxGLContext * _arg0;
154 PyObject * _argo0 = 0;
155 char *_kwnames[] = { "self", NULL };
156
157 self = self;
158 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxGLContext",_kwnames,&_argo0))
159 return NULL;
160 if (_argo0) {
161 if (_argo0 == Py_None) { _arg0 = NULL; }
162 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) {
163 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxGLContext. Expected _wxGLContext_p.");
164 return NULL;
165 }
166 }
167 {
168 PyThreadState* __tstate = wxPyBeginAllowThreads();
169 delete_wxGLContext(_arg0);
170
171 wxPyEndAllowThreads(__tstate);
172 if (PyErr_Occurred()) return NULL;
173 } Py_INCREF(Py_None);
174 _resultobj = Py_None;
175 return _resultobj;
176 }
177
178 #define wxGLContext_SetCurrent(_swigobj) (_swigobj->SetCurrent())
179 static PyObject *_wrap_wxGLContext_SetCurrent(PyObject *self, PyObject *args, PyObject *kwargs) {
180 PyObject * _resultobj;
181 wxGLContext * _arg0;
182 PyObject * _argo0 = 0;
183 char *_kwnames[] = { "self", NULL };
184
185 self = self;
186 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLContext_SetCurrent",_kwnames,&_argo0))
187 return NULL;
188 if (_argo0) {
189 if (_argo0 == Py_None) { _arg0 = NULL; }
190 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) {
191 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLContext_SetCurrent. Expected _wxGLContext_p.");
192 return NULL;
193 }
194 }
195 {
196 PyThreadState* __tstate = wxPyBeginAllowThreads();
197 wxGLContext_SetCurrent(_arg0);
198
199 wxPyEndAllowThreads(__tstate);
200 if (PyErr_Occurred()) return NULL;
201 } Py_INCREF(Py_None);
202 _resultobj = Py_None;
203 return _resultobj;
204 }
205
206 #define wxGLContext_SetColour(_swigobj,_swigarg0) (_swigobj->SetColour(_swigarg0))
207 static PyObject *_wrap_wxGLContext_SetColour(PyObject *self, PyObject *args, PyObject *kwargs) {
208 PyObject * _resultobj;
209 wxGLContext * _arg0;
210 char * _arg1;
211 PyObject * _argo0 = 0;
212 char *_kwnames[] = { "self","colour", NULL };
213
214 self = self;
215 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os:wxGLContext_SetColour",_kwnames,&_argo0,&_arg1))
216 return NULL;
217 if (_argo0) {
218 if (_argo0 == Py_None) { _arg0 = NULL; }
219 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) {
220 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLContext_SetColour. Expected _wxGLContext_p.");
221 return NULL;
222 }
223 }
224 {
225 PyThreadState* __tstate = wxPyBeginAllowThreads();
226 wxGLContext_SetColour(_arg0,_arg1);
227
228 wxPyEndAllowThreads(__tstate);
229 if (PyErr_Occurred()) return NULL;
230 } Py_INCREF(Py_None);
231 _resultobj = Py_None;
232 return _resultobj;
233 }
234
235 #define wxGLContext_SwapBuffers(_swigobj) (_swigobj->SwapBuffers())
236 static PyObject *_wrap_wxGLContext_SwapBuffers(PyObject *self, PyObject *args, PyObject *kwargs) {
237 PyObject * _resultobj;
238 wxGLContext * _arg0;
239 PyObject * _argo0 = 0;
240 char *_kwnames[] = { "self", NULL };
241
242 self = self;
243 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLContext_SwapBuffers",_kwnames,&_argo0))
244 return NULL;
245 if (_argo0) {
246 if (_argo0 == Py_None) { _arg0 = NULL; }
247 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) {
248 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLContext_SwapBuffers. Expected _wxGLContext_p.");
249 return NULL;
250 }
251 }
252 {
253 PyThreadState* __tstate = wxPyBeginAllowThreads();
254 wxGLContext_SwapBuffers(_arg0);
255
256 wxPyEndAllowThreads(__tstate);
257 if (PyErr_Occurred()) return NULL;
258 } Py_INCREF(Py_None);
259 _resultobj = Py_None;
260 return _resultobj;
261 }
262
263 #define wxGLContext_SetupPixelFormat(_swigobj) (_swigobj->SetupPixelFormat())
264 static PyObject *_wrap_wxGLContext_SetupPixelFormat(PyObject *self, PyObject *args, PyObject *kwargs) {
265 PyObject * _resultobj;
266 wxGLContext * _arg0;
267 PyObject * _argo0 = 0;
268 char *_kwnames[] = { "self", NULL };
269
270 self = self;
271 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLContext_SetupPixelFormat",_kwnames,&_argo0))
272 return NULL;
273 if (_argo0) {
274 if (_argo0 == Py_None) { _arg0 = NULL; }
275 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) {
276 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLContext_SetupPixelFormat. Expected _wxGLContext_p.");
277 return NULL;
278 }
279 }
280 {
281 PyThreadState* __tstate = wxPyBeginAllowThreads();
282 wxGLContext_SetupPixelFormat(_arg0);
283
284 wxPyEndAllowThreads(__tstate);
285 if (PyErr_Occurred()) return NULL;
286 } Py_INCREF(Py_None);
287 _resultobj = Py_None;
288 return _resultobj;
289 }
290
291 #define wxGLContext_SetupPalette(_swigobj,_swigarg0) (_swigobj->SetupPalette(_swigarg0))
292 static PyObject *_wrap_wxGLContext_SetupPalette(PyObject *self, PyObject *args, PyObject *kwargs) {
293 PyObject * _resultobj;
294 wxGLContext * _arg0;
295 wxPalette * _arg1;
296 PyObject * _argo0 = 0;
297 PyObject * _argo1 = 0;
298 char *_kwnames[] = { "self","palette", NULL };
299
300 self = self;
301 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGLContext_SetupPalette",_kwnames,&_argo0,&_argo1))
302 return NULL;
303 if (_argo0) {
304 if (_argo0 == Py_None) { _arg0 = NULL; }
305 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) {
306 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLContext_SetupPalette. Expected _wxGLContext_p.");
307 return NULL;
308 }
309 }
310 if (_argo1) {
311 if (_argo1 == Py_None) { _arg1 = NULL; }
312 else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxPalette_p")) {
313 PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGLContext_SetupPalette. Expected _wxPalette_p.");
314 return NULL;
315 }
316 }
317 {
318 PyThreadState* __tstate = wxPyBeginAllowThreads();
319 wxGLContext_SetupPalette(_arg0,*_arg1);
320
321 wxPyEndAllowThreads(__tstate);
322 if (PyErr_Occurred()) return NULL;
323 } Py_INCREF(Py_None);
324 _resultobj = Py_None;
325 return _resultobj;
326 }
327
328 #define wxGLContext_CreateDefaultPalette(_swigobj) (_swigobj->CreateDefaultPalette())
329 static PyObject *_wrap_wxGLContext_CreateDefaultPalette(PyObject *self, PyObject *args, PyObject *kwargs) {
330 PyObject * _resultobj;
331 wxPalette * _result;
332 wxGLContext * _arg0;
333 PyObject * _argo0 = 0;
334 char *_kwnames[] = { "self", NULL };
335 char _ptemp[128];
336
337 self = self;
338 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLContext_CreateDefaultPalette",_kwnames,&_argo0))
339 return NULL;
340 if (_argo0) {
341 if (_argo0 == Py_None) { _arg0 = NULL; }
342 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) {
343 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLContext_CreateDefaultPalette. Expected _wxGLContext_p.");
344 return NULL;
345 }
346 }
347 {
348 PyThreadState* __tstate = wxPyBeginAllowThreads();
349 _result = new wxPalette (wxGLContext_CreateDefaultPalette(_arg0));
350
351 wxPyEndAllowThreads(__tstate);
352 if (PyErr_Occurred()) return NULL;
353 } SWIG_MakePtr(_ptemp, (void *) _result,"_wxPalette_p");
354 _resultobj = Py_BuildValue("s",_ptemp);
355 return _resultobj;
356 }
357
358 #define wxGLContext_GetPalette(_swigobj) (_swigobj->GetPalette())
359 static PyObject *_wrap_wxGLContext_GetPalette(PyObject *self, PyObject *args, PyObject *kwargs) {
360 PyObject * _resultobj;
361 wxPalette * _result;
362 wxGLContext * _arg0;
363 PyObject * _argo0 = 0;
364 char *_kwnames[] = { "self", NULL };
365 char _ptemp[128];
366
367 self = self;
368 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLContext_GetPalette",_kwnames,&_argo0))
369 return NULL;
370 if (_argo0) {
371 if (_argo0 == Py_None) { _arg0 = NULL; }
372 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) {
373 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLContext_GetPalette. Expected _wxGLContext_p.");
374 return NULL;
375 }
376 }
377 {
378 PyThreadState* __tstate = wxPyBeginAllowThreads();
379 _result = (wxPalette *)wxGLContext_GetPalette(_arg0);
380
381 wxPyEndAllowThreads(__tstate);
382 if (PyErr_Occurred()) return NULL;
383 } if (_result) {
384 SWIG_MakePtr(_ptemp, (char *) _result,"_wxPalette_p");
385 _resultobj = Py_BuildValue("s",_ptemp);
386 } else {
387 Py_INCREF(Py_None);
388 _resultobj = Py_None;
389 }
390 return _resultobj;
391 }
392
393 #define wxGLContext_GetWindow(_swigobj) (_swigobj->GetWindow())
394 static PyObject *_wrap_wxGLContext_GetWindow(PyObject *self, PyObject *args, PyObject *kwargs) {
395 PyObject * _resultobj;
396 wxWindow * _result;
397 wxGLContext * _arg0;
398 PyObject * _argo0 = 0;
399 char *_kwnames[] = { "self", NULL };
400
401 self = self;
402 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLContext_GetWindow",_kwnames,&_argo0))
403 return NULL;
404 if (_argo0) {
405 if (_argo0 == Py_None) { _arg0 = NULL; }
406 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) {
407 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLContext_GetWindow. Expected _wxGLContext_p.");
408 return NULL;
409 }
410 }
411 {
412 PyThreadState* __tstate = wxPyBeginAllowThreads();
413 _result = (wxWindow *)wxGLContext_GetWindow(_arg0);
414
415 wxPyEndAllowThreads(__tstate);
416 if (PyErr_Occurred()) return NULL;
417 }{ _resultobj = wxPyMake_wxObject(_result); }
418 return _resultobj;
419 }
420
421 static void *SwigwxGLCanvasTowxWindow(void *ptr) {
422 wxGLCanvas *src;
423 wxWindow *dest;
424 src = (wxGLCanvas *) ptr;
425 dest = (wxWindow *) src;
426 return (void *) dest;
427 }
428
429 static void *SwigwxGLCanvasTowxEvtHandler(void *ptr) {
430 wxGLCanvas *src;
431 wxEvtHandler *dest;
432 src = (wxGLCanvas *) ptr;
433 dest = (wxEvtHandler *) src;
434 return (void *) dest;
435 }
436
437 static void *SwigwxGLCanvasTowxObject(void *ptr) {
438 wxGLCanvas *src;
439 wxObject *dest;
440 src = (wxGLCanvas *) ptr;
441 dest = (wxObject *) src;
442 return (void *) dest;
443 }
444
445 #define new_wxGLCanvas(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7) (new wxGLCanvas(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7))
446 static PyObject *_wrap_new_wxGLCanvas(PyObject *self, PyObject *args, PyObject *kwargs) {
447 PyObject * _resultobj;
448 wxGLCanvas * _result;
449 wxWindow * _arg0;
450 wxWindowID _arg1 = (wxWindowID ) -1;
451 wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition;
452 wxSize * _arg3 = (wxSize *) &wxDefaultSize;
453 long _arg4 = (long ) 0;
454 char * _arg5 = (char *) "GLCanvas";
455 int * _arg6 = (int *) NULL;
456 wxPalette * _arg7 = (wxPalette *) &wxNullPalette;
457 PyObject * _argo0 = 0;
458 wxPoint temp;
459 PyObject * _obj2 = 0;
460 wxSize temp0;
461 PyObject * _obj3 = 0;
462 int * temp1;
463 PyObject * _obj6 = 0;
464 PyObject * _argo7 = 0;
465 char *_kwnames[] = { "parent","id","pos","size","style","name","attribList","palette", NULL };
466 char _ptemp[128];
467
468 self = self;
469 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iOOlsOO:new_wxGLCanvas",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_arg5,&_obj6,&_argo7))
470 return NULL;
471 if (_argo0) {
472 if (_argo0 == Py_None) { _arg0 = NULL; }
473 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) {
474 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxGLCanvas. Expected _wxWindow_p.");
475 return NULL;
476 }
477 }
478 if (_obj2)
479 {
480 _arg2 = &temp;
481 if (! wxPoint_helper(_obj2, &_arg2))
482 return NULL;
483 }
484 if (_obj3)
485 {
486 _arg3 = &temp0;
487 if (! wxSize_helper(_obj3, &_arg3))
488 return NULL;
489 }
490 if (_obj6)
491 {
492 int i;
493 if (PySequence_Check(_obj6)) {
494 int size = PyObject_Length(_obj6);
495 temp1 = new int[size+1]; // (int*)malloc((size + 1) * sizeof(int));
496 for (i = 0; i < size; i++) {
497 temp1[i] = PyInt_AsLong(PySequence_GetItem(_obj6, i));
498 }
499 temp1[size] = 0;
500 _arg6 = temp1;
501 }
502 }
503 if (_argo7) {
504 if (_argo7 == Py_None) { _arg7 = NULL; }
505 else if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxPalette_p")) {
506 PyErr_SetString(PyExc_TypeError,"Type error in argument 8 of new_wxGLCanvas. Expected _wxPalette_p.");
507 return NULL;
508 }
509 }
510 {
511 PyThreadState* __tstate = wxPyBeginAllowThreads();
512 _result = (wxGLCanvas *)new_wxGLCanvas(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5,_arg6,*_arg7);
513
514 wxPyEndAllowThreads(__tstate);
515 if (PyErr_Occurred()) return NULL;
516 } if (_result) {
517 SWIG_MakePtr(_ptemp, (char *) _result,"_wxGLCanvas_p");
518 _resultobj = Py_BuildValue("s",_ptemp);
519 } else {
520 Py_INCREF(Py_None);
521 _resultobj = Py_None;
522 }
523 {
524 delete [] _arg6;
525 }
526 return _resultobj;
527 }
528
529 #define new_wxGLCanvasWithContext(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8) (new wxGLCanvas(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8))
530 static PyObject *_wrap_new_wxGLCanvasWithContext(PyObject *self, PyObject *args, PyObject *kwargs) {
531 PyObject * _resultobj;
532 wxGLCanvas * _result;
533 wxWindow * _arg0;
534 wxGLContext * _arg1 = (wxGLContext *) NULL;
535 wxWindowID _arg2 = (wxWindowID ) -1;
536 wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition;
537 wxSize * _arg4 = (wxSize *) &wxDefaultSize;
538 long _arg5 = (long ) 0;
539 char * _arg6 = (char *) "GLCanvas";
540 int * _arg7 = (int *) NULL;
541 wxPalette * _arg8 = (wxPalette *) &wxNullPalette;
542 PyObject * _argo0 = 0;
543 PyObject * _argo1 = 0;
544 wxPoint temp;
545 PyObject * _obj3 = 0;
546 wxSize temp0;
547 PyObject * _obj4 = 0;
548 int * temp1;
549 PyObject * _obj7 = 0;
550 PyObject * _argo8 = 0;
551 char *_kwnames[] = { "parent","shared","id","pos","size","style","name","attribList","palette", NULL };
552 char _ptemp[128];
553
554 self = self;
555 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|OiOOlsOO:new_wxGLCanvasWithContext",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_arg6,&_obj7,&_argo8))
556 return NULL;
557 if (_argo0) {
558 if (_argo0 == Py_None) { _arg0 = NULL; }
559 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) {
560 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxGLCanvasWithContext. Expected _wxWindow_p.");
561 return NULL;
562 }
563 }
564 if (_argo1) {
565 if (_argo1 == Py_None) { _arg1 = NULL; }
566 else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGLContext_p")) {
567 PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxGLCanvasWithContext. Expected _wxGLContext_p.");
568 return NULL;
569 }
570 }
571 if (_obj3)
572 {
573 _arg3 = &temp;
574 if (! wxPoint_helper(_obj3, &_arg3))
575 return NULL;
576 }
577 if (_obj4)
578 {
579 _arg4 = &temp0;
580 if (! wxSize_helper(_obj4, &_arg4))
581 return NULL;
582 }
583 if (_obj7)
584 {
585 int i;
586 if (PySequence_Check(_obj7)) {
587 int size = PyObject_Length(_obj7);
588 temp1 = new int[size+1]; // (int*)malloc((size + 1) * sizeof(int));
589 for (i = 0; i < size; i++) {
590 temp1[i] = PyInt_AsLong(PySequence_GetItem(_obj7, i));
591 }
592 temp1[size] = 0;
593 _arg7 = temp1;
594 }
595 }
596 if (_argo8) {
597 if (_argo8 == Py_None) { _arg8 = NULL; }
598 else if (SWIG_GetPtrObj(_argo8,(void **) &_arg8,"_wxPalette_p")) {
599 PyErr_SetString(PyExc_TypeError,"Type error in argument 9 of new_wxGLCanvasWithContext. Expected _wxPalette_p.");
600 return NULL;
601 }
602 }
603 {
604 PyThreadState* __tstate = wxPyBeginAllowThreads();
605 _result = (wxGLCanvas *)new_wxGLCanvasWithContext(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,*_arg8);
606
607 wxPyEndAllowThreads(__tstate);
608 if (PyErr_Occurred()) return NULL;
609 } if (_result) {
610 SWIG_MakePtr(_ptemp, (char *) _result,"_wxGLCanvas_p");
611 _resultobj = Py_BuildValue("s",_ptemp);
612 } else {
613 Py_INCREF(Py_None);
614 _resultobj = Py_None;
615 }
616 {
617 delete [] _arg7;
618 }
619 return _resultobj;
620 }
621
622 #define wxGLCanvas_SetCurrent(_swigobj) (_swigobj->SetCurrent())
623 static PyObject *_wrap_wxGLCanvas_SetCurrent(PyObject *self, PyObject *args, PyObject *kwargs) {
624 PyObject * _resultobj;
625 wxGLCanvas * _arg0;
626 PyObject * _argo0 = 0;
627 char *_kwnames[] = { "self", NULL };
628
629 self = self;
630 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLCanvas_SetCurrent",_kwnames,&_argo0))
631 return NULL;
632 if (_argo0) {
633 if (_argo0 == Py_None) { _arg0 = NULL; }
634 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLCanvas_p")) {
635 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLCanvas_SetCurrent. Expected _wxGLCanvas_p.");
636 return NULL;
637 }
638 }
639 {
640 PyThreadState* __tstate = wxPyBeginAllowThreads();
641 wxGLCanvas_SetCurrent(_arg0);
642
643 wxPyEndAllowThreads(__tstate);
644 if (PyErr_Occurred()) return NULL;
645 } Py_INCREF(Py_None);
646 _resultobj = Py_None;
647 return _resultobj;
648 }
649
650 #define wxGLCanvas_SetColour(_swigobj,_swigarg0) (_swigobj->SetColour(_swigarg0))
651 static PyObject *_wrap_wxGLCanvas_SetColour(PyObject *self, PyObject *args, PyObject *kwargs) {
652 PyObject * _resultobj;
653 wxGLCanvas * _arg0;
654 char * _arg1;
655 PyObject * _argo0 = 0;
656 char *_kwnames[] = { "self","colour", NULL };
657
658 self = self;
659 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os:wxGLCanvas_SetColour",_kwnames,&_argo0,&_arg1))
660 return NULL;
661 if (_argo0) {
662 if (_argo0 == Py_None) { _arg0 = NULL; }
663 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLCanvas_p")) {
664 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLCanvas_SetColour. Expected _wxGLCanvas_p.");
665 return NULL;
666 }
667 }
668 {
669 PyThreadState* __tstate = wxPyBeginAllowThreads();
670 wxGLCanvas_SetColour(_arg0,_arg1);
671
672 wxPyEndAllowThreads(__tstate);
673 if (PyErr_Occurred()) return NULL;
674 } Py_INCREF(Py_None);
675 _resultobj = Py_None;
676 return _resultobj;
677 }
678
679 #define wxGLCanvas_SwapBuffers(_swigobj) (_swigobj->SwapBuffers())
680 static PyObject *_wrap_wxGLCanvas_SwapBuffers(PyObject *self, PyObject *args, PyObject *kwargs) {
681 PyObject * _resultobj;
682 wxGLCanvas * _arg0;
683 PyObject * _argo0 = 0;
684 char *_kwnames[] = { "self", NULL };
685
686 self = self;
687 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLCanvas_SwapBuffers",_kwnames,&_argo0))
688 return NULL;
689 if (_argo0) {
690 if (_argo0 == Py_None) { _arg0 = NULL; }
691 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLCanvas_p")) {
692 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLCanvas_SwapBuffers. Expected _wxGLCanvas_p.");
693 return NULL;
694 }
695 }
696 {
697 PyThreadState* __tstate = wxPyBeginAllowThreads();
698 wxGLCanvas_SwapBuffers(_arg0);
699
700 wxPyEndAllowThreads(__tstate);
701 if (PyErr_Occurred()) return NULL;
702 } Py_INCREF(Py_None);
703 _resultobj = Py_None;
704 return _resultobj;
705 }
706
707 #define wxGLCanvas_GetContext(_swigobj) (_swigobj->GetContext())
708 static PyObject *_wrap_wxGLCanvas_GetContext(PyObject *self, PyObject *args, PyObject *kwargs) {
709 PyObject * _resultobj;
710 wxGLContext * _result;
711 wxGLCanvas * _arg0;
712 PyObject * _argo0 = 0;
713 char *_kwnames[] = { "self", NULL };
714 char _ptemp[128];
715
716 self = self;
717 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLCanvas_GetContext",_kwnames,&_argo0))
718 return NULL;
719 if (_argo0) {
720 if (_argo0 == Py_None) { _arg0 = NULL; }
721 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLCanvas_p")) {
722 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLCanvas_GetContext. Expected _wxGLCanvas_p.");
723 return NULL;
724 }
725 }
726 {
727 PyThreadState* __tstate = wxPyBeginAllowThreads();
728 _result = (wxGLContext *)wxGLCanvas_GetContext(_arg0);
729
730 wxPyEndAllowThreads(__tstate);
731 if (PyErr_Occurred()) return NULL;
732 } if (_result) {
733 SWIG_MakePtr(_ptemp, (char *) _result,"_wxGLContext_p");
734 _resultobj = Py_BuildValue("s",_ptemp);
735 } else {
736 Py_INCREF(Py_None);
737 _resultobj = Py_None;
738 }
739 return _resultobj;
740 }
741
742 static PyMethodDef glcanvascMethods[] = {
743 { "wxGLCanvas_GetContext", (PyCFunction) _wrap_wxGLCanvas_GetContext, METH_VARARGS | METH_KEYWORDS },
744 { "wxGLCanvas_SwapBuffers", (PyCFunction) _wrap_wxGLCanvas_SwapBuffers, METH_VARARGS | METH_KEYWORDS },
745 { "wxGLCanvas_SetColour", (PyCFunction) _wrap_wxGLCanvas_SetColour, METH_VARARGS | METH_KEYWORDS },
746 { "wxGLCanvas_SetCurrent", (PyCFunction) _wrap_wxGLCanvas_SetCurrent, METH_VARARGS | METH_KEYWORDS },
747 { "new_wxGLCanvasWithContext", (PyCFunction) _wrap_new_wxGLCanvasWithContext, METH_VARARGS | METH_KEYWORDS },
748 { "new_wxGLCanvas", (PyCFunction) _wrap_new_wxGLCanvas, METH_VARARGS | METH_KEYWORDS },
749 { "wxGLContext_GetWindow", (PyCFunction) _wrap_wxGLContext_GetWindow, METH_VARARGS | METH_KEYWORDS },
750 { "wxGLContext_GetPalette", (PyCFunction) _wrap_wxGLContext_GetPalette, METH_VARARGS | METH_KEYWORDS },
751 { "wxGLContext_CreateDefaultPalette", (PyCFunction) _wrap_wxGLContext_CreateDefaultPalette, METH_VARARGS | METH_KEYWORDS },
752 { "wxGLContext_SetupPalette", (PyCFunction) _wrap_wxGLContext_SetupPalette, METH_VARARGS | METH_KEYWORDS },
753 { "wxGLContext_SetupPixelFormat", (PyCFunction) _wrap_wxGLContext_SetupPixelFormat, METH_VARARGS | METH_KEYWORDS },
754 { "wxGLContext_SwapBuffers", (PyCFunction) _wrap_wxGLContext_SwapBuffers, METH_VARARGS | METH_KEYWORDS },
755 { "wxGLContext_SetColour", (PyCFunction) _wrap_wxGLContext_SetColour, METH_VARARGS | METH_KEYWORDS },
756 { "wxGLContext_SetCurrent", (PyCFunction) _wrap_wxGLContext_SetCurrent, METH_VARARGS | METH_KEYWORDS },
757 { "delete_wxGLContext", (PyCFunction) _wrap_delete_wxGLContext, METH_VARARGS | METH_KEYWORDS },
758 { "new_wxGLContext", (PyCFunction) _wrap_new_wxGLContext, METH_VARARGS | METH_KEYWORDS },
759 { NULL, NULL }
760 };
761 #ifdef __cplusplus
762 }
763 #endif
764 /*
765 * This table is used by the pointer type-checker
766 */
767 static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
768 { "_signed_long","_long",0},
769 { "_wxPrintQuality","_wxCoord",0},
770 { "_wxPrintQuality","_int",0},
771 { "_wxPrintQuality","_signed_int",0},
772 { "_wxPrintQuality","_unsigned_int",0},
773 { "_wxPrintQuality","_wxWindowID",0},
774 { "_wxPrintQuality","_uint",0},
775 { "_wxPrintQuality","_EBool",0},
776 { "_wxPrintQuality","_size_t",0},
777 { "_wxPrintQuality","_time_t",0},
778 { "_byte","_unsigned_char",0},
779 { "_long","_unsigned_long",0},
780 { "_long","_signed_long",0},
781 { "_size_t","_wxCoord",0},
782 { "_size_t","_wxPrintQuality",0},
783 { "_size_t","_time_t",0},
784 { "_size_t","_unsigned_int",0},
785 { "_size_t","_int",0},
786 { "_size_t","_wxWindowID",0},
787 { "_size_t","_uint",0},
788 { "_uint","_wxCoord",0},
789 { "_uint","_wxPrintQuality",0},
790 { "_uint","_time_t",0},
791 { "_uint","_size_t",0},
792 { "_uint","_unsigned_int",0},
793 { "_uint","_int",0},
794 { "_uint","_wxWindowID",0},
795 { "_wxChar","_char",0},
796 { "_char","_wxChar",0},
797 { "_struct_wxNativeFontInfo","_wxNativeFontInfo",0},
798 { "_EBool","_wxCoord",0},
799 { "_EBool","_wxPrintQuality",0},
800 { "_EBool","_signed_int",0},
801 { "_EBool","_int",0},
802 { "_EBool","_wxWindowID",0},
803 { "_unsigned_long","_long",0},
804 { "_wxNativeFontInfo","_struct_wxNativeFontInfo",0},
805 { "_signed_int","_wxCoord",0},
806 { "_signed_int","_wxPrintQuality",0},
807 { "_signed_int","_EBool",0},
808 { "_signed_int","_wxWindowID",0},
809 { "_signed_int","_int",0},
810 { "_WXTYPE","_wxDateTime_t",0},
811 { "_WXTYPE","_short",0},
812 { "_WXTYPE","_signed_short",0},
813 { "_WXTYPE","_unsigned_short",0},
814 { "_unsigned_short","_wxDateTime_t",0},
815 { "_unsigned_short","_WXTYPE",0},
816 { "_unsigned_short","_short",0},
817 { "_wxObject","_wxGLCanvas",SwigwxGLCanvasTowxObject},
818 { "_wxObject","_wxGLContext",SwigwxGLContextTowxObject},
819 { "_signed_short","_WXTYPE",0},
820 { "_signed_short","_short",0},
821 { "_unsigned_char","_byte",0},
822 { "_unsigned_int","_wxCoord",0},
823 { "_unsigned_int","_wxPrintQuality",0},
824 { "_unsigned_int","_time_t",0},
825 { "_unsigned_int","_size_t",0},
826 { "_unsigned_int","_uint",0},
827 { "_unsigned_int","_wxWindowID",0},
828 { "_unsigned_int","_int",0},
829 { "_short","_wxDateTime_t",0},
830 { "_short","_WXTYPE",0},
831 { "_short","_unsigned_short",0},
832 { "_short","_signed_short",0},
833 { "_wxWindowID","_wxCoord",0},
834 { "_wxWindowID","_wxPrintQuality",0},
835 { "_wxWindowID","_time_t",0},
836 { "_wxWindowID","_size_t",0},
837 { "_wxWindowID","_EBool",0},
838 { "_wxWindowID","_uint",0},
839 { "_wxWindowID","_int",0},
840 { "_wxWindowID","_signed_int",0},
841 { "_wxWindowID","_unsigned_int",0},
842 { "_int","_wxCoord",0},
843 { "_int","_wxPrintQuality",0},
844 { "_int","_time_t",0},
845 { "_int","_size_t",0},
846 { "_int","_EBool",0},
847 { "_int","_uint",0},
848 { "_int","_wxWindowID",0},
849 { "_int","_unsigned_int",0},
850 { "_int","_signed_int",0},
851 { "_wxDateTime_t","_unsigned_short",0},
852 { "_wxDateTime_t","_short",0},
853 { "_wxDateTime_t","_WXTYPE",0},
854 { "_time_t","_wxCoord",0},
855 { "_time_t","_wxPrintQuality",0},
856 { "_time_t","_unsigned_int",0},
857 { "_time_t","_int",0},
858 { "_time_t","_wxWindowID",0},
859 { "_time_t","_uint",0},
860 { "_time_t","_size_t",0},
861 { "_wxCoord","_int",0},
862 { "_wxCoord","_signed_int",0},
863 { "_wxCoord","_unsigned_int",0},
864 { "_wxCoord","_wxWindowID",0},
865 { "_wxCoord","_uint",0},
866 { "_wxCoord","_EBool",0},
867 { "_wxCoord","_size_t",0},
868 { "_wxCoord","_time_t",0},
869 { "_wxCoord","_wxPrintQuality",0},
870 { "_wxEvtHandler","_wxGLCanvas",SwigwxGLCanvasTowxEvtHandler},
871 { "_wxWindow","_wxGLCanvas",SwigwxGLCanvasTowxWindow},
872 {0,0,0}};
873
874 static PyObject *SWIG_globals;
875 #ifdef __cplusplus
876 extern "C"
877 #endif
878 SWIGEXPORT(void) initglcanvasc() {
879 PyObject *m, *d;
880 SWIG_globals = SWIG_newvarlink();
881 m = Py_InitModule("glcanvasc", glcanvascMethods);
882 d = PyModule_GetDict(m);
883 PyDict_SetItemString(d,"WX_GL_RGBA", PyInt_FromLong((long) WX_GL_RGBA));
884 PyDict_SetItemString(d,"WX_GL_BUFFER_SIZE", PyInt_FromLong((long) WX_GL_BUFFER_SIZE));
885 PyDict_SetItemString(d,"WX_GL_LEVEL", PyInt_FromLong((long) WX_GL_LEVEL));
886 PyDict_SetItemString(d,"WX_GL_DOUBLEBUFFER", PyInt_FromLong((long) WX_GL_DOUBLEBUFFER));
887 PyDict_SetItemString(d,"WX_GL_STEREO", PyInt_FromLong((long) WX_GL_STEREO));
888 PyDict_SetItemString(d,"WX_GL_AUX_BUFFERS", PyInt_FromLong((long) WX_GL_AUX_BUFFERS));
889 PyDict_SetItemString(d,"WX_GL_MIN_RED", PyInt_FromLong((long) WX_GL_MIN_RED));
890 PyDict_SetItemString(d,"WX_GL_MIN_GREEN", PyInt_FromLong((long) WX_GL_MIN_GREEN));
891 PyDict_SetItemString(d,"WX_GL_MIN_BLUE", PyInt_FromLong((long) WX_GL_MIN_BLUE));
892 PyDict_SetItemString(d,"WX_GL_MIN_ALPHA", PyInt_FromLong((long) WX_GL_MIN_ALPHA));
893 PyDict_SetItemString(d,"WX_GL_DEPTH_SIZE", PyInt_FromLong((long) WX_GL_DEPTH_SIZE));
894 PyDict_SetItemString(d,"WX_GL_STENCIL_SIZE", PyInt_FromLong((long) WX_GL_STENCIL_SIZE));
895 PyDict_SetItemString(d,"WX_GL_MIN_ACCUM_RED", PyInt_FromLong((long) WX_GL_MIN_ACCUM_RED));
896 PyDict_SetItemString(d,"WX_GL_MIN_ACCUM_GREEN", PyInt_FromLong((long) WX_GL_MIN_ACCUM_GREEN));
897 PyDict_SetItemString(d,"WX_GL_MIN_ACCUM_BLUE", PyInt_FromLong((long) WX_GL_MIN_ACCUM_BLUE));
898 PyDict_SetItemString(d,"WX_GL_MIN_ACCUM_ALPHA", PyInt_FromLong((long) WX_GL_MIN_ACCUM_ALPHA));
899
900
901 wxClassInfo::CleanUpClasses();
902 wxClassInfo::InitializeClasses();
903
904 {
905 int i;
906 for (i = 0; _swig_mapping[i].n1; i++)
907 SWIG_RegisterMapping(_swig_mapping[i].n1,_swig_mapping[i].n2,_swig_mapping[i].pcnv);
908 }
909 }