]> git.saurik.com Git - wxWidgets.git/blame - wxPython/contrib/glcanvas/mac/glcanvas.cpp
Changes for wxOGL since wxFatalError has been deprecated.
[wxWidgets.git] / wxPython / contrib / glcanvas / mac / glcanvas.cpp
CommitLineData
e6056257
RD
1/*
2 * FILE : contrib/glcanvas/mac/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
42extern "C" {
43#endif
44
45extern void SWIG_MakePtr(char *, void *, char *);
46extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
47extern char *SWIG_GetPtr(char *, void **, char *);
48extern char *SWIG_GetPtrObj(PyObject *, void **, char *);
49extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *));
50extern 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
67static 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
93#if PYTHON_API_VERSION >= 1009
94 static char* wxStringErrorMsg = "String or Unicode type required";
95#else
96 static char* wxStringErrorMsg = "String type required";
97#endif
98#ifdef __cplusplus
99extern "C" {
100#endif
101static void *SwigwxGLContextTowxObject(void *ptr) {
102 wxGLContext *src;
103 wxObject *dest;
104 src = (wxGLContext *) ptr;
105 dest = (wxObject *) src;
106 return (void *) dest;
107}
108
e6056257
RD
109#define delete_wxGLContext(_swigobj) (delete _swigobj)
110static PyObject *_wrap_delete_wxGLContext(PyObject *self, PyObject *args, PyObject *kwargs) {
111 PyObject * _resultobj;
112 wxGLContext * _arg0;
113 PyObject * _argo0 = 0;
114 char *_kwnames[] = { "self", NULL };
115
116 self = self;
117 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxGLContext",_kwnames,&_argo0))
118 return NULL;
119 if (_argo0) {
120 if (_argo0 == Py_None) { _arg0 = NULL; }
121 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) {
122 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxGLContext. Expected _wxGLContext_p.");
123 return NULL;
124 }
125 }
126{
0e2ff151 127 PyThreadState* __tstate = wxPyBeginAllowThreads();
e6056257
RD
128 delete_wxGLContext(_arg0);
129
0e2ff151
RD
130 wxPyEndAllowThreads(__tstate);
131 if (PyErr_Occurred()) return NULL;
e6056257
RD
132} Py_INCREF(Py_None);
133 _resultobj = Py_None;
134 return _resultobj;
135}
136
137#define wxGLContext_SetCurrent(_swigobj) (_swigobj->SetCurrent())
138static PyObject *_wrap_wxGLContext_SetCurrent(PyObject *self, PyObject *args, PyObject *kwargs) {
139 PyObject * _resultobj;
140 wxGLContext * _arg0;
141 PyObject * _argo0 = 0;
142 char *_kwnames[] = { "self", NULL };
143
144 self = self;
145 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLContext_SetCurrent",_kwnames,&_argo0))
146 return NULL;
147 if (_argo0) {
148 if (_argo0 == Py_None) { _arg0 = NULL; }
149 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) {
150 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLContext_SetCurrent. Expected _wxGLContext_p.");
151 return NULL;
152 }
153 }
154{
0e2ff151 155 PyThreadState* __tstate = wxPyBeginAllowThreads();
e6056257
RD
156 wxGLContext_SetCurrent(_arg0);
157
0e2ff151
RD
158 wxPyEndAllowThreads(__tstate);
159 if (PyErr_Occurred()) return NULL;
e6056257
RD
160} Py_INCREF(Py_None);
161 _resultobj = Py_None;
162 return _resultobj;
163}
164
165#define wxGLContext_SetColour(_swigobj,_swigarg0) (_swigobj->SetColour(_swigarg0))
166static PyObject *_wrap_wxGLContext_SetColour(PyObject *self, PyObject *args, PyObject *kwargs) {
167 PyObject * _resultobj;
168 wxGLContext * _arg0;
169 char * _arg1;
170 PyObject * _argo0 = 0;
171 char *_kwnames[] = { "self","colour", NULL };
172
173 self = self;
174 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os:wxGLContext_SetColour",_kwnames,&_argo0,&_arg1))
175 return NULL;
176 if (_argo0) {
177 if (_argo0 == Py_None) { _arg0 = NULL; }
178 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) {
179 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLContext_SetColour. Expected _wxGLContext_p.");
180 return NULL;
181 }
182 }
183{
0e2ff151 184 PyThreadState* __tstate = wxPyBeginAllowThreads();
e6056257
RD
185 wxGLContext_SetColour(_arg0,_arg1);
186
0e2ff151
RD
187 wxPyEndAllowThreads(__tstate);
188 if (PyErr_Occurred()) return NULL;
e6056257
RD
189} Py_INCREF(Py_None);
190 _resultobj = Py_None;
191 return _resultobj;
192}
193
194#define wxGLContext_SwapBuffers(_swigobj) (_swigobj->SwapBuffers())
195static PyObject *_wrap_wxGLContext_SwapBuffers(PyObject *self, PyObject *args, PyObject *kwargs) {
196 PyObject * _resultobj;
197 wxGLContext * _arg0;
198 PyObject * _argo0 = 0;
199 char *_kwnames[] = { "self", NULL };
200
201 self = self;
202 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLContext_SwapBuffers",_kwnames,&_argo0))
203 return NULL;
204 if (_argo0) {
205 if (_argo0 == Py_None) { _arg0 = NULL; }
206 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) {
207 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLContext_SwapBuffers. Expected _wxGLContext_p.");
208 return NULL;
209 }
210 }
211{
0e2ff151 212 PyThreadState* __tstate = wxPyBeginAllowThreads();
e6056257
RD
213 wxGLContext_SwapBuffers(_arg0);
214
0e2ff151
RD
215 wxPyEndAllowThreads(__tstate);
216 if (PyErr_Occurred()) return NULL;
e6056257
RD
217} Py_INCREF(Py_None);
218 _resultobj = Py_None;
219 return _resultobj;
220}
221
222#define wxGLContext_GetWindow(_swigobj) (_swigobj->GetWindow())
223static PyObject *_wrap_wxGLContext_GetWindow(PyObject *self, PyObject *args, PyObject *kwargs) {
224 PyObject * _resultobj;
225 wxWindow * _result;
226 wxGLContext * _arg0;
227 PyObject * _argo0 = 0;
228 char *_kwnames[] = { "self", NULL };
229
230 self = self;
231 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLContext_GetWindow",_kwnames,&_argo0))
232 return NULL;
233 if (_argo0) {
234 if (_argo0 == Py_None) { _arg0 = NULL; }
235 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) {
236 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLContext_GetWindow. Expected _wxGLContext_p.");
237 return NULL;
238 }
239 }
240{
0e2ff151 241 PyThreadState* __tstate = wxPyBeginAllowThreads();
e6056257
RD
242 _result = (wxWindow *)wxGLContext_GetWindow(_arg0);
243
0e2ff151
RD
244 wxPyEndAllowThreads(__tstate);
245 if (PyErr_Occurred()) return NULL;
e6056257
RD
246}{ _resultobj = wxPyMake_wxObject(_result); }
247 return _resultobj;
248}
249
e6056257
RD
250static void *SwigwxGLCanvasTowxWindow(void *ptr) {
251 wxGLCanvas *src;
252 wxWindow *dest;
253 src = (wxGLCanvas *) ptr;
254 dest = (wxWindow *) src;
255 return (void *) dest;
256}
257
258static void *SwigwxGLCanvasTowxEvtHandler(void *ptr) {
259 wxGLCanvas *src;
260 wxEvtHandler *dest;
261 src = (wxGLCanvas *) ptr;
262 dest = (wxEvtHandler *) src;
263 return (void *) dest;
264}
265
266static void *SwigwxGLCanvasTowxObject(void *ptr) {
267 wxGLCanvas *src;
268 wxObject *dest;
269 src = (wxGLCanvas *) ptr;
270 dest = (wxObject *) src;
271 return (void *) dest;
272}
273
274#define new_wxGLCanvas(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7) (new wxGLCanvas(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7))
275static PyObject *_wrap_new_wxGLCanvas(PyObject *self, PyObject *args, PyObject *kwargs) {
276 PyObject * _resultobj;
277 wxGLCanvas * _result;
278 wxWindow * _arg0;
279 wxWindowID _arg1 = (wxWindowID ) -1;
280 wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition;
281 wxSize * _arg3 = (wxSize *) &wxDefaultSize;
282 long _arg4 = (long ) 0;
283 char * _arg5 = (char *) "GLCanvas";
284 int * _arg6 = (int *) NULL;
285 wxPalette * _arg7 = (wxPalette *) &wxNullPalette;
286 PyObject * _argo0 = 0;
287 wxPoint temp;
288 PyObject * _obj2 = 0;
289 wxSize temp0;
290 PyObject * _obj3 = 0;
291 int * temp1;
292 PyObject * _obj6 = 0;
293 PyObject * _argo7 = 0;
294 char *_kwnames[] = { "parent","id","pos","size","style","name","attribList","palette", NULL };
295 char _ptemp[128];
296
297 self = self;
298 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iOOlsOO:new_wxGLCanvas",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_arg5,&_obj6,&_argo7))
299 return NULL;
300 if (_argo0) {
301 if (_argo0 == Py_None) { _arg0 = NULL; }
302 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) {
303 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxGLCanvas. Expected _wxWindow_p.");
304 return NULL;
305 }
306 }
307 if (_obj2)
308{
309 _arg2 = &temp;
310 if (! wxPoint_helper(_obj2, &_arg2))
311 return NULL;
312}
313 if (_obj3)
314{
315 _arg3 = &temp0;
316 if (! wxSize_helper(_obj3, &_arg3))
317 return NULL;
318}
319 if (_obj6)
320{
321 int i;
322 if (PySequence_Check(_obj6)) {
323 int size = PyObject_Length(_obj6);
324 temp1 = new int[size+1]; // (int*)malloc((size + 1) * sizeof(int));
325 for (i = 0; i < size; i++) {
326 temp1[i] = PyInt_AsLong(PySequence_GetItem(_obj6, i));
327 }
328 temp1[size] = 0;
329 _arg6 = temp1;
330 }
331}
332 if (_argo7) {
333 if (_argo7 == Py_None) { _arg7 = NULL; }
334 else if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxPalette_p")) {
335 PyErr_SetString(PyExc_TypeError,"Type error in argument 8 of new_wxGLCanvas. Expected _wxPalette_p.");
336 return NULL;
337 }
338 }
339{
0e2ff151 340 PyThreadState* __tstate = wxPyBeginAllowThreads();
e6056257
RD
341 _result = (wxGLCanvas *)new_wxGLCanvas(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5,_arg6,*_arg7);
342
0e2ff151
RD
343 wxPyEndAllowThreads(__tstate);
344 if (PyErr_Occurred()) return NULL;
e6056257
RD
345} if (_result) {
346 SWIG_MakePtr(_ptemp, (char *) _result,"_wxGLCanvas_p");
347 _resultobj = Py_BuildValue("s",_ptemp);
348 } else {
349 Py_INCREF(Py_None);
350 _resultobj = Py_None;
351 }
352{
353 delete [] _arg6;
354}
355 return _resultobj;
356}
357
358#define new_wxGLCanvasWithContext(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8) (new wxGLCanvas(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8))
359static PyObject *_wrap_new_wxGLCanvasWithContext(PyObject *self, PyObject *args, PyObject *kwargs) {
360 PyObject * _resultobj;
361 wxGLCanvas * _result;
362 wxWindow * _arg0;
363 wxGLContext * _arg1 = (wxGLContext *) NULL;
364 wxWindowID _arg2 = (wxWindowID ) -1;
365 wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition;
366 wxSize * _arg4 = (wxSize *) &wxDefaultSize;
367 long _arg5 = (long ) 0;
368 char * _arg6 = (char *) "GLCanvas";
369 int * _arg7 = (int *) NULL;
370 wxPalette * _arg8 = (wxPalette *) &wxNullPalette;
371 PyObject * _argo0 = 0;
372 PyObject * _argo1 = 0;
373 wxPoint temp;
374 PyObject * _obj3 = 0;
375 wxSize temp0;
376 PyObject * _obj4 = 0;
377 int * temp1;
378 PyObject * _obj7 = 0;
379 PyObject * _argo8 = 0;
380 char *_kwnames[] = { "parent","shared","id","pos","size","style","name","attribList","palette", NULL };
381 char _ptemp[128];
382
383 self = self;
384 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|OiOOlsOO:new_wxGLCanvasWithContext",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_arg6,&_obj7,&_argo8))
385 return NULL;
386 if (_argo0) {
387 if (_argo0 == Py_None) { _arg0 = NULL; }
388 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) {
389 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxGLCanvasWithContext. Expected _wxWindow_p.");
390 return NULL;
391 }
392 }
393 if (_argo1) {
394 if (_argo1 == Py_None) { _arg1 = NULL; }
395 else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGLContext_p")) {
396 PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxGLCanvasWithContext. Expected _wxGLContext_p.");
397 return NULL;
398 }
399 }
400 if (_obj3)
401{
402 _arg3 = &temp;
403 if (! wxPoint_helper(_obj3, &_arg3))
404 return NULL;
405}
406 if (_obj4)
407{
408 _arg4 = &temp0;
409 if (! wxSize_helper(_obj4, &_arg4))
410 return NULL;
411}
412 if (_obj7)
413{
414 int i;
415 if (PySequence_Check(_obj7)) {
416 int size = PyObject_Length(_obj7);
417 temp1 = new int[size+1]; // (int*)malloc((size + 1) * sizeof(int));
418 for (i = 0; i < size; i++) {
419 temp1[i] = PyInt_AsLong(PySequence_GetItem(_obj7, i));
420 }
421 temp1[size] = 0;
422 _arg7 = temp1;
423 }
424}
425 if (_argo8) {
426 if (_argo8 == Py_None) { _arg8 = NULL; }
427 else if (SWIG_GetPtrObj(_argo8,(void **) &_arg8,"_wxPalette_p")) {
428 PyErr_SetString(PyExc_TypeError,"Type error in argument 9 of new_wxGLCanvasWithContext. Expected _wxPalette_p.");
429 return NULL;
430 }
431 }
432{
0e2ff151 433 PyThreadState* __tstate = wxPyBeginAllowThreads();
e6056257
RD
434 _result = (wxGLCanvas *)new_wxGLCanvasWithContext(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,*_arg8);
435
0e2ff151
RD
436 wxPyEndAllowThreads(__tstate);
437 if (PyErr_Occurred()) return NULL;
e6056257
RD
438} if (_result) {
439 SWIG_MakePtr(_ptemp, (char *) _result,"_wxGLCanvas_p");
440 _resultobj = Py_BuildValue("s",_ptemp);
441 } else {
442 Py_INCREF(Py_None);
443 _resultobj = Py_None;
444 }
445{
446 delete [] _arg7;
447}
448 return _resultobj;
449}
450
451#define wxGLCanvas_SetCurrent(_swigobj) (_swigobj->SetCurrent())
452static PyObject *_wrap_wxGLCanvas_SetCurrent(PyObject *self, PyObject *args, PyObject *kwargs) {
453 PyObject * _resultobj;
454 wxGLCanvas * _arg0;
455 PyObject * _argo0 = 0;
456 char *_kwnames[] = { "self", NULL };
457
458 self = self;
459 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLCanvas_SetCurrent",_kwnames,&_argo0))
460 return NULL;
461 if (_argo0) {
462 if (_argo0 == Py_None) { _arg0 = NULL; }
463 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLCanvas_p")) {
464 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLCanvas_SetCurrent. Expected _wxGLCanvas_p.");
465 return NULL;
466 }
467 }
468{
0e2ff151 469 PyThreadState* __tstate = wxPyBeginAllowThreads();
e6056257
RD
470 wxGLCanvas_SetCurrent(_arg0);
471
0e2ff151
RD
472 wxPyEndAllowThreads(__tstate);
473 if (PyErr_Occurred()) return NULL;
e6056257
RD
474} Py_INCREF(Py_None);
475 _resultobj = Py_None;
476 return _resultobj;
477}
478
479#define wxGLCanvas_SetColour(_swigobj,_swigarg0) (_swigobj->SetColour(_swigarg0))
480static PyObject *_wrap_wxGLCanvas_SetColour(PyObject *self, PyObject *args, PyObject *kwargs) {
481 PyObject * _resultobj;
482 wxGLCanvas * _arg0;
483 char * _arg1;
484 PyObject * _argo0 = 0;
485 char *_kwnames[] = { "self","colour", NULL };
486
487 self = self;
488 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os:wxGLCanvas_SetColour",_kwnames,&_argo0,&_arg1))
489 return NULL;
490 if (_argo0) {
491 if (_argo0 == Py_None) { _arg0 = NULL; }
492 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLCanvas_p")) {
493 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLCanvas_SetColour. Expected _wxGLCanvas_p.");
494 return NULL;
495 }
496 }
497{
0e2ff151 498 PyThreadState* __tstate = wxPyBeginAllowThreads();
e6056257
RD
499 wxGLCanvas_SetColour(_arg0,_arg1);
500
0e2ff151
RD
501 wxPyEndAllowThreads(__tstate);
502 if (PyErr_Occurred()) return NULL;
e6056257
RD
503} Py_INCREF(Py_None);
504 _resultobj = Py_None;
505 return _resultobj;
506}
507
508#define wxGLCanvas_SwapBuffers(_swigobj) (_swigobj->SwapBuffers())
509static PyObject *_wrap_wxGLCanvas_SwapBuffers(PyObject *self, PyObject *args, PyObject *kwargs) {
510 PyObject * _resultobj;
511 wxGLCanvas * _arg0;
512 PyObject * _argo0 = 0;
513 char *_kwnames[] = { "self", NULL };
514
515 self = self;
516 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLCanvas_SwapBuffers",_kwnames,&_argo0))
517 return NULL;
518 if (_argo0) {
519 if (_argo0 == Py_None) { _arg0 = NULL; }
520 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLCanvas_p")) {
521 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLCanvas_SwapBuffers. Expected _wxGLCanvas_p.");
522 return NULL;
523 }
524 }
525{
0e2ff151 526 PyThreadState* __tstate = wxPyBeginAllowThreads();
e6056257
RD
527 wxGLCanvas_SwapBuffers(_arg0);
528
0e2ff151
RD
529 wxPyEndAllowThreads(__tstate);
530 if (PyErr_Occurred()) return NULL;
e6056257
RD
531} Py_INCREF(Py_None);
532 _resultobj = Py_None;
533 return _resultobj;
534}
535
536#define wxGLCanvas_GetContext(_swigobj) (_swigobj->GetContext())
537static PyObject *_wrap_wxGLCanvas_GetContext(PyObject *self, PyObject *args, PyObject *kwargs) {
538 PyObject * _resultobj;
539 wxGLContext * _result;
540 wxGLCanvas * _arg0;
541 PyObject * _argo0 = 0;
542 char *_kwnames[] = { "self", NULL };
543 char _ptemp[128];
544
545 self = self;
546 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLCanvas_GetContext",_kwnames,&_argo0))
547 return NULL;
548 if (_argo0) {
549 if (_argo0 == Py_None) { _arg0 = NULL; }
550 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLCanvas_p")) {
551 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLCanvas_GetContext. Expected _wxGLCanvas_p.");
552 return NULL;
553 }
554 }
555{
0e2ff151 556 PyThreadState* __tstate = wxPyBeginAllowThreads();
e6056257
RD
557 _result = (wxGLContext *)wxGLCanvas_GetContext(_arg0);
558
0e2ff151
RD
559 wxPyEndAllowThreads(__tstate);
560 if (PyErr_Occurred()) return NULL;
e6056257
RD
561} if (_result) {
562 SWIG_MakePtr(_ptemp, (char *) _result,"_wxGLContext_p");
563 _resultobj = Py_BuildValue("s",_ptemp);
564 } else {
565 Py_INCREF(Py_None);
566 _resultobj = Py_None;
567 }
568 return _resultobj;
569}
570
571static PyMethodDef glcanvascMethods[] = {
572 { "wxGLCanvas_GetContext", (PyCFunction) _wrap_wxGLCanvas_GetContext, METH_VARARGS | METH_KEYWORDS },
573 { "wxGLCanvas_SwapBuffers", (PyCFunction) _wrap_wxGLCanvas_SwapBuffers, METH_VARARGS | METH_KEYWORDS },
574 { "wxGLCanvas_SetColour", (PyCFunction) _wrap_wxGLCanvas_SetColour, METH_VARARGS | METH_KEYWORDS },
575 { "wxGLCanvas_SetCurrent", (PyCFunction) _wrap_wxGLCanvas_SetCurrent, METH_VARARGS | METH_KEYWORDS },
576 { "new_wxGLCanvasWithContext", (PyCFunction) _wrap_new_wxGLCanvasWithContext, METH_VARARGS | METH_KEYWORDS },
577 { "new_wxGLCanvas", (PyCFunction) _wrap_new_wxGLCanvas, METH_VARARGS | METH_KEYWORDS },
578 { "wxGLContext_GetWindow", (PyCFunction) _wrap_wxGLContext_GetWindow, METH_VARARGS | METH_KEYWORDS },
579 { "wxGLContext_SwapBuffers", (PyCFunction) _wrap_wxGLContext_SwapBuffers, METH_VARARGS | METH_KEYWORDS },
580 { "wxGLContext_SetColour", (PyCFunction) _wrap_wxGLContext_SetColour, METH_VARARGS | METH_KEYWORDS },
581 { "wxGLContext_SetCurrent", (PyCFunction) _wrap_wxGLContext_SetCurrent, METH_VARARGS | METH_KEYWORDS },
582 { "delete_wxGLContext", (PyCFunction) _wrap_delete_wxGLContext, METH_VARARGS | METH_KEYWORDS },
e6056257
RD
583 { NULL, NULL }
584};
585#ifdef __cplusplus
586}
587#endif
588/*
589 * This table is used by the pointer type-checker
590 */
591static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
592 { "_signed_long","_long",0},
593 { "_wxPrintQuality","_wxCoord",0},
594 { "_wxPrintQuality","_int",0},
595 { "_wxPrintQuality","_signed_int",0},
596 { "_wxPrintQuality","_unsigned_int",0},
597 { "_wxPrintQuality","_wxWindowID",0},
598 { "_wxPrintQuality","_uint",0},
599 { "_wxPrintQuality","_EBool",0},
600 { "_wxPrintQuality","_size_t",0},
601 { "_wxPrintQuality","_time_t",0},
602 { "_byte","_unsigned_char",0},
603 { "_long","_unsigned_long",0},
604 { "_long","_signed_long",0},
605 { "_size_t","_wxCoord",0},
606 { "_size_t","_wxPrintQuality",0},
607 { "_size_t","_time_t",0},
608 { "_size_t","_unsigned_int",0},
609 { "_size_t","_int",0},
610 { "_size_t","_wxWindowID",0},
611 { "_size_t","_uint",0},
e6056257
RD
612 { "_uint","_wxCoord",0},
613 { "_uint","_wxPrintQuality",0},
614 { "_uint","_time_t",0},
615 { "_uint","_size_t",0},
616 { "_uint","_unsigned_int",0},
617 { "_uint","_int",0},
618 { "_uint","_wxWindowID",0},
619 { "_wxChar","_char",0},
620 { "_char","_wxChar",0},
621 { "_struct_wxNativeFontInfo","_wxNativeFontInfo",0},
622 { "_EBool","_wxCoord",0},
623 { "_EBool","_wxPrintQuality",0},
624 { "_EBool","_signed_int",0},
625 { "_EBool","_int",0},
626 { "_EBool","_wxWindowID",0},
627 { "_unsigned_long","_long",0},
628 { "_wxNativeFontInfo","_struct_wxNativeFontInfo",0},
629 { "_signed_int","_wxCoord",0},
630 { "_signed_int","_wxPrintQuality",0},
631 { "_signed_int","_EBool",0},
632 { "_signed_int","_wxWindowID",0},
633 { "_signed_int","_int",0},
634 { "_WXTYPE","_wxDateTime_t",0},
635 { "_WXTYPE","_short",0},
636 { "_WXTYPE","_signed_short",0},
637 { "_WXTYPE","_unsigned_short",0},
638 { "_unsigned_short","_wxDateTime_t",0},
639 { "_unsigned_short","_WXTYPE",0},
640 { "_unsigned_short","_short",0},
641 { "_wxObject","_wxGLCanvas",SwigwxGLCanvasTowxObject},
642 { "_wxObject","_wxGLContext",SwigwxGLContextTowxObject},
643 { "_signed_short","_WXTYPE",0},
644 { "_signed_short","_short",0},
e6056257
RD
645 { "_unsigned_char","_byte",0},
646 { "_unsigned_int","_wxCoord",0},
647 { "_unsigned_int","_wxPrintQuality",0},
648 { "_unsigned_int","_time_t",0},
649 { "_unsigned_int","_size_t",0},
650 { "_unsigned_int","_uint",0},
651 { "_unsigned_int","_wxWindowID",0},
652 { "_unsigned_int","_int",0},
653 { "_short","_wxDateTime_t",0},
654 { "_short","_WXTYPE",0},
655 { "_short","_unsigned_short",0},
656 { "_short","_signed_short",0},
657 { "_wxWindowID","_wxCoord",0},
658 { "_wxWindowID","_wxPrintQuality",0},
659 { "_wxWindowID","_time_t",0},
660 { "_wxWindowID","_size_t",0},
661 { "_wxWindowID","_EBool",0},
662 { "_wxWindowID","_uint",0},
663 { "_wxWindowID","_int",0},
664 { "_wxWindowID","_signed_int",0},
665 { "_wxWindowID","_unsigned_int",0},
666 { "_int","_wxCoord",0},
667 { "_int","_wxPrintQuality",0},
668 { "_int","_time_t",0},
669 { "_int","_size_t",0},
670 { "_int","_EBool",0},
671 { "_int","_uint",0},
672 { "_int","_wxWindowID",0},
673 { "_int","_unsigned_int",0},
674 { "_int","_signed_int",0},
675 { "_wxDateTime_t","_unsigned_short",0},
676 { "_wxDateTime_t","_short",0},
677 { "_wxDateTime_t","_WXTYPE",0},
678 { "_time_t","_wxCoord",0},
679 { "_time_t","_wxPrintQuality",0},
680 { "_time_t","_unsigned_int",0},
681 { "_time_t","_int",0},
682 { "_time_t","_wxWindowID",0},
683 { "_time_t","_uint",0},
684 { "_time_t","_size_t",0},
685 { "_wxCoord","_int",0},
686 { "_wxCoord","_signed_int",0},
687 { "_wxCoord","_unsigned_int",0},
688 { "_wxCoord","_wxWindowID",0},
689 { "_wxCoord","_uint",0},
690 { "_wxCoord","_EBool",0},
691 { "_wxCoord","_size_t",0},
692 { "_wxCoord","_time_t",0},
693 { "_wxCoord","_wxPrintQuality",0},
694 { "_wxEvtHandler","_wxGLCanvas",SwigwxGLCanvasTowxEvtHandler},
695 { "_wxWindow","_wxGLCanvas",SwigwxGLCanvasTowxWindow},
696{0,0,0}};
697
698static PyObject *SWIG_globals;
699#ifdef __cplusplus
700extern "C"
701#endif
702SWIGEXPORT(void) initglcanvasc() {
703 PyObject *m, *d;
704 SWIG_globals = SWIG_newvarlink();
705 m = Py_InitModule("glcanvasc", glcanvascMethods);
706 d = PyModule_GetDict(m);
80cb3dbc
RD
707 PyDict_SetItemString(d,"WX_GL_RGBA", PyInt_FromLong((long) WX_GL_RGBA));
708 PyDict_SetItemString(d,"WX_GL_BUFFER_SIZE", PyInt_FromLong((long) WX_GL_BUFFER_SIZE));
709 PyDict_SetItemString(d,"WX_GL_LEVEL", PyInt_FromLong((long) WX_GL_LEVEL));
710 PyDict_SetItemString(d,"WX_GL_DOUBLEBUFFER", PyInt_FromLong((long) WX_GL_DOUBLEBUFFER));
711 PyDict_SetItemString(d,"WX_GL_STEREO", PyInt_FromLong((long) WX_GL_STEREO));
712 PyDict_SetItemString(d,"WX_GL_AUX_BUFFERS", PyInt_FromLong((long) WX_GL_AUX_BUFFERS));
713 PyDict_SetItemString(d,"WX_GL_MIN_RED", PyInt_FromLong((long) WX_GL_MIN_RED));
714 PyDict_SetItemString(d,"WX_GL_MIN_GREEN", PyInt_FromLong((long) WX_GL_MIN_GREEN));
715 PyDict_SetItemString(d,"WX_GL_MIN_BLUE", PyInt_FromLong((long) WX_GL_MIN_BLUE));
716 PyDict_SetItemString(d,"WX_GL_MIN_ALPHA", PyInt_FromLong((long) WX_GL_MIN_ALPHA));
717 PyDict_SetItemString(d,"WX_GL_DEPTH_SIZE", PyInt_FromLong((long) WX_GL_DEPTH_SIZE));
718 PyDict_SetItemString(d,"WX_GL_STENCIL_SIZE", PyInt_FromLong((long) WX_GL_STENCIL_SIZE));
719 PyDict_SetItemString(d,"WX_GL_MIN_ACCUM_RED", PyInt_FromLong((long) WX_GL_MIN_ACCUM_RED));
720 PyDict_SetItemString(d,"WX_GL_MIN_ACCUM_GREEN", PyInt_FromLong((long) WX_GL_MIN_ACCUM_GREEN));
721 PyDict_SetItemString(d,"WX_GL_MIN_ACCUM_BLUE", PyInt_FromLong((long) WX_GL_MIN_ACCUM_BLUE));
722 PyDict_SetItemString(d,"WX_GL_MIN_ACCUM_ALPHA", PyInt_FromLong((long) WX_GL_MIN_ACCUM_ALPHA));
e6056257
RD
723
724
725 wxClassInfo::CleanUpClasses();
726 wxClassInfo::InitializeClasses();
727
728{
729 int i;
730 for (i = 0; _swig_mapping[i].n1; i++)
731 SWIG_RegisterMapping(_swig_mapping[i].n1,_swig_mapping[i].n2,_swig_mapping[i].pcnv);
732}
733}