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