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