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