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