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