2 * FILE : contrib/glcanvas/gtk/glcanvas.cpp
4 * This file was automatically generated by :
5 * Simplified Wrapper and Interface Generator (SWIG)
6 * Version 1.1 (Build 883)
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.
13 * Do not make changes to this file--changes will be lost!
19 /* Implementation : PYTHON */
24 /* Definitions for Windows/Unix exporting */
25 #if defined(__WIN32__)
26 # if defined(_MSC_VER)
27 # define SWIGEXPORT(a) __declspec(dllexport) a
29 # if defined(__BORLANDC__)
30 # define SWIGEXPORT(a) a _export
32 # define SWIGEXPORT(a) a
36 # define SWIGEXPORT(a) a
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);
54 #define SWIG_init initglcanvasc
56 #define SWIG_name "glcanvasc"
60 #include "myglcanvas.h"
62 #include <wx/glcanvas.h>
67 static PyObject
* t_output_helper(PyObject
* target
, PyObject
* o
) {
73 } else if (target
== Py_None
) {
77 if (!PyTuple_Check(target
)) {
79 target
= PyTuple_New(1);
80 PyTuple_SetItem(target
, 0, o2
);
83 PyTuple_SetItem(o3
, 0, o
);
86 target
= PySequence_Concat(o2
, o3
);
93 #if PYTHON_API_VERSION >= 1009
94 static char* wxStringErrorMsg
= "String or Unicode type required";
96 static char* wxStringErrorMsg
= "String type required";
101 static void *SwigwxGLContextTowxObject(void *ptr
) {
104 src
= (wxGLContext
*) ptr
;
105 dest
= (wxObject
*) src
;
106 return (void *) dest
;
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
;
115 wxPalette
* _arg2
= (wxPalette
*) &wxNullPalette
;
117 PyObject
* _argo1
= 0;
118 PyObject
* _argo2
= 0;
119 char *_kwnames
[] = { "isRGB","win","palette", NULL
};
123 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"iO|O:new_wxGLContext",_kwnames
,&tempbool0
,&_argo1
,&_argo2
))
125 _arg0
= (bool ) tempbool0
;
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.");
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.");
141 wxPy_BEGIN_ALLOW_THREADS
;
142 _result
= (wxGLContext
*)new_wxGLContext(_arg0
,_arg1
,*_arg2
);
144 wxPy_END_ALLOW_THREADS
;
146 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxGLContext_p");
147 _resultobj
= Py_BuildValue("s",_ptemp
);
150 _resultobj
= Py_None
;
155 #define delete_wxGLContext(_swigobj) (delete _swigobj)
156 static PyObject
*_wrap_delete_wxGLContext(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
157 PyObject
* _resultobj
;
159 PyObject
* _argo0
= 0;
160 char *_kwnames
[] = { "self", NULL
};
163 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:delete_wxGLContext",_kwnames
,&_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.");
173 wxPy_BEGIN_ALLOW_THREADS
;
174 delete_wxGLContext(_arg0
);
176 wxPy_END_ALLOW_THREADS
;
177 } Py_INCREF(Py_None
);
178 _resultobj
= Py_None
;
182 #define wxGLContext_SetCurrent(_swigobj) (_swigobj->SetCurrent())
183 static PyObject
*_wrap_wxGLContext_SetCurrent(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
184 PyObject
* _resultobj
;
186 PyObject
* _argo0
= 0;
187 char *_kwnames
[] = { "self", NULL
};
190 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxGLContext_SetCurrent",_kwnames
,&_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.");
200 wxPy_BEGIN_ALLOW_THREADS
;
201 wxGLContext_SetCurrent(_arg0
);
203 wxPy_END_ALLOW_THREADS
;
204 } Py_INCREF(Py_None
);
205 _resultobj
= Py_None
;
209 #define wxGLContext_SetColour(_swigobj,_swigarg0) (_swigobj->SetColour(_swigarg0))
210 static PyObject
*_wrap_wxGLContext_SetColour(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
211 PyObject
* _resultobj
;
214 PyObject
* _argo0
= 0;
215 char *_kwnames
[] = { "self","colour", NULL
};
218 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Os:wxGLContext_SetColour",_kwnames
,&_argo0
,&_arg1
))
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.");
228 wxPy_BEGIN_ALLOW_THREADS
;
229 wxGLContext_SetColour(_arg0
,_arg1
);
231 wxPy_END_ALLOW_THREADS
;
232 } Py_INCREF(Py_None
);
233 _resultobj
= Py_None
;
237 #define wxGLContext_SwapBuffers(_swigobj) (_swigobj->SwapBuffers())
238 static PyObject
*_wrap_wxGLContext_SwapBuffers(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
239 PyObject
* _resultobj
;
241 PyObject
* _argo0
= 0;
242 char *_kwnames
[] = { "self", NULL
};
245 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxGLContext_SwapBuffers",_kwnames
,&_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.");
255 wxPy_BEGIN_ALLOW_THREADS
;
256 wxGLContext_SwapBuffers(_arg0
);
258 wxPy_END_ALLOW_THREADS
;
259 } Py_INCREF(Py_None
);
260 _resultobj
= Py_None
;
264 #define wxGLContext_SetupPixelFormat(_swigobj) (_swigobj->SetupPixelFormat())
265 static PyObject
*_wrap_wxGLContext_SetupPixelFormat(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
266 PyObject
* _resultobj
;
268 PyObject
* _argo0
= 0;
269 char *_kwnames
[] = { "self", NULL
};
272 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxGLContext_SetupPixelFormat",_kwnames
,&_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.");
282 wxPy_BEGIN_ALLOW_THREADS
;
283 wxGLContext_SetupPixelFormat(_arg0
);
285 wxPy_END_ALLOW_THREADS
;
286 } Py_INCREF(Py_None
);
287 _resultobj
= Py_None
;
291 #define wxGLContext_SetupPalette(_swigobj,_swigarg0) (_swigobj->SetupPalette(_swigarg0))
292 static PyObject
*_wrap_wxGLContext_SetupPalette(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
293 PyObject
* _resultobj
;
296 PyObject
* _argo0
= 0;
297 PyObject
* _argo1
= 0;
298 char *_kwnames
[] = { "self","palette", NULL
};
301 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO:wxGLContext_SetupPalette",_kwnames
,&_argo0
,&_argo1
))
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.");
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.");
318 wxPy_BEGIN_ALLOW_THREADS
;
319 wxGLContext_SetupPalette(_arg0
,*_arg1
);
321 wxPy_END_ALLOW_THREADS
;
322 } Py_INCREF(Py_None
);
323 _resultobj
= Py_None
;
327 #define wxGLContext_CreateDefaultPalette(_swigobj) (_swigobj->CreateDefaultPalette())
328 static PyObject
*_wrap_wxGLContext_CreateDefaultPalette(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
329 PyObject
* _resultobj
;
332 PyObject
* _argo0
= 0;
333 char *_kwnames
[] = { "self", NULL
};
337 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxGLContext_CreateDefaultPalette",_kwnames
,&_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.");
347 wxPy_BEGIN_ALLOW_THREADS
;
348 _result
= new wxPalette (wxGLContext_CreateDefaultPalette(_arg0
));
350 wxPy_END_ALLOW_THREADS
;
351 } SWIG_MakePtr(_ptemp
, (void *) _result
,"_wxPalette_p");
352 _resultobj
= Py_BuildValue("s",_ptemp
);
356 #define wxGLContext_GetPalette(_swigobj) (_swigobj->GetPalette())
357 static PyObject
*_wrap_wxGLContext_GetPalette(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
358 PyObject
* _resultobj
;
361 PyObject
* _argo0
= 0;
362 char *_kwnames
[] = { "self", NULL
};
366 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxGLContext_GetPalette",_kwnames
,&_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.");
376 wxPy_BEGIN_ALLOW_THREADS
;
377 _result
= (wxPalette
*)wxGLContext_GetPalette(_arg0
);
379 wxPy_END_ALLOW_THREADS
;
381 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxPalette_p");
382 _resultobj
= Py_BuildValue("s",_ptemp
);
385 _resultobj
= Py_None
;
390 #define wxGLContext_GetWindow(_swigobj) (_swigobj->GetWindow())
391 static PyObject
*_wrap_wxGLContext_GetWindow(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
392 PyObject
* _resultobj
;
395 PyObject
* _argo0
= 0;
396 char *_kwnames
[] = { "self", NULL
};
399 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxGLContext_GetWindow",_kwnames
,&_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.");
409 wxPy_BEGIN_ALLOW_THREADS
;
410 _result
= (wxWindow
*)wxGLContext_GetWindow(_arg0
);
412 wxPy_END_ALLOW_THREADS
;
413 }{ _resultobj
= wxPyMake_wxObject(_result
); }
417 static void *SwigwxGLCanvasTowxWindow(void *ptr
) {
420 src
= (wxGLCanvas
*) ptr
;
421 dest
= (wxWindow
*) src
;
422 return (void *) dest
;
425 static void *SwigwxGLCanvasTowxEvtHandler(void *ptr
) {
428 src
= (wxGLCanvas
*) ptr
;
429 dest
= (wxEvtHandler
*) src
;
430 return (void *) dest
;
433 static void *SwigwxGLCanvasTowxObject(void *ptr
) {
436 src
= (wxGLCanvas
*) ptr
;
437 dest
= (wxObject
*) src
;
438 return (void *) dest
;
441 #define new_wxGLCanvas(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7) (new wxGLCanvas(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7))
442 static PyObject
*_wrap_new_wxGLCanvas(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
443 PyObject
* _resultobj
;
444 wxGLCanvas
* _result
;
446 wxWindowID _arg1
= (wxWindowID
) -1;
447 wxPoint
* _arg2
= (wxPoint
*) &wxDefaultPosition
;
448 wxSize
* _arg3
= (wxSize
*) &wxDefaultSize
;
449 long _arg4
= (long ) 0;
450 char * _arg5
= (char *) "GLCanvas";
451 int * _arg6
= (int *) NULL
;
452 wxPalette
* _arg7
= (wxPalette
*) &wxNullPalette
;
453 PyObject
* _argo0
= 0;
455 PyObject
* _obj2
= 0;
457 PyObject
* _obj3
= 0;
459 PyObject
* _obj6
= 0;
460 PyObject
* _argo7
= 0;
461 char *_kwnames
[] = { "parent","id","pos","size","style","name","attribList","palette", NULL
};
465 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O|iOOlsOO:new_wxGLCanvas",_kwnames
,&_argo0
,&_arg1
,&_obj2
,&_obj3
,&_arg4
,&_arg5
,&_obj6
,&_argo7
))
468 if (_argo0
== Py_None
) { _arg0
= NULL
; }
469 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxWindow_p")) {
470 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of new_wxGLCanvas. Expected _wxWindow_p.");
477 if (! wxPoint_helper(_obj2
, &_arg2
))
483 if (! wxSize_helper(_obj3
, &_arg3
))
489 if (PySequence_Check(_obj6
)) {
490 int size
= PyObject_Length(_obj6
);
491 temp1
= new int[size
+1]; // (int*)malloc((size + 1) * sizeof(int));
492 for (i
= 0; i
< size
; i
++) {
493 temp1
[i
] = PyInt_AsLong(PySequence_GetItem(_obj6
, i
));
500 if (_argo7
== Py_None
) { _arg7
= NULL
; }
501 else if (SWIG_GetPtrObj(_argo7
,(void **) &_arg7
,"_wxPalette_p")) {
502 PyErr_SetString(PyExc_TypeError
,"Type error in argument 8 of new_wxGLCanvas. Expected _wxPalette_p.");
507 wxPy_BEGIN_ALLOW_THREADS
;
508 _result
= (wxGLCanvas
*)new_wxGLCanvas(_arg0
,_arg1
,*_arg2
,*_arg3
,_arg4
,_arg5
,_arg6
,*_arg7
);
510 wxPy_END_ALLOW_THREADS
;
512 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxGLCanvas_p");
513 _resultobj
= Py_BuildValue("s",_ptemp
);
516 _resultobj
= Py_None
;
524 #define new_wxGLCanvasWithContext(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8) (new wxGLCanvas(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8))
525 static PyObject
*_wrap_new_wxGLCanvasWithContext(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
526 PyObject
* _resultobj
;
527 wxGLCanvas
* _result
;
529 wxGLContext
* _arg1
= (wxGLContext
*) NULL
;
530 wxWindowID _arg2
= (wxWindowID
) -1;
531 wxPoint
* _arg3
= (wxPoint
*) &wxDefaultPosition
;
532 wxSize
* _arg4
= (wxSize
*) &wxDefaultSize
;
533 long _arg5
= (long ) 0;
534 char * _arg6
= (char *) "GLCanvas";
535 int * _arg7
= (int *) NULL
;
536 wxPalette
* _arg8
= (wxPalette
*) &wxNullPalette
;
537 PyObject
* _argo0
= 0;
538 PyObject
* _argo1
= 0;
540 PyObject
* _obj3
= 0;
542 PyObject
* _obj4
= 0;
544 PyObject
* _obj7
= 0;
545 PyObject
* _argo8
= 0;
546 char *_kwnames
[] = { "parent","shared","id","pos","size","style","name","attribList","palette", NULL
};
550 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O|OiOOlsOO:new_wxGLCanvasWithContext",_kwnames
,&_argo0
,&_argo1
,&_arg2
,&_obj3
,&_obj4
,&_arg5
,&_arg6
,&_obj7
,&_argo8
))
553 if (_argo0
== Py_None
) { _arg0
= NULL
; }
554 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxWindow_p")) {
555 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of new_wxGLCanvasWithContext. Expected _wxWindow_p.");
560 if (_argo1
== Py_None
) { _arg1
= NULL
; }
561 else if (SWIG_GetPtrObj(_argo1
,(void **) &_arg1
,"_wxGLContext_p")) {
562 PyErr_SetString(PyExc_TypeError
,"Type error in argument 2 of new_wxGLCanvasWithContext. Expected _wxGLContext_p.");
569 if (! wxPoint_helper(_obj3
, &_arg3
))
575 if (! wxSize_helper(_obj4
, &_arg4
))
581 if (PySequence_Check(_obj7
)) {
582 int size
= PyObject_Length(_obj7
);
583 temp1
= new int[size
+1]; // (int*)malloc((size + 1) * sizeof(int));
584 for (i
= 0; i
< size
; i
++) {
585 temp1
[i
] = PyInt_AsLong(PySequence_GetItem(_obj7
, i
));
592 if (_argo8
== Py_None
) { _arg8
= NULL
; }
593 else if (SWIG_GetPtrObj(_argo8
,(void **) &_arg8
,"_wxPalette_p")) {
594 PyErr_SetString(PyExc_TypeError
,"Type error in argument 9 of new_wxGLCanvasWithContext. Expected _wxPalette_p.");
599 wxPy_BEGIN_ALLOW_THREADS
;
600 _result
= (wxGLCanvas
*)new_wxGLCanvasWithContext(_arg0
,_arg1
,_arg2
,*_arg3
,*_arg4
,_arg5
,_arg6
,_arg7
,*_arg8
);
602 wxPy_END_ALLOW_THREADS
;
604 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxGLCanvas_p");
605 _resultobj
= Py_BuildValue("s",_ptemp
);
608 _resultobj
= Py_None
;
616 #define wxGLCanvas_SetCurrent(_swigobj) (_swigobj->SetCurrent())
617 static PyObject
*_wrap_wxGLCanvas_SetCurrent(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
618 PyObject
* _resultobj
;
620 PyObject
* _argo0
= 0;
621 char *_kwnames
[] = { "self", NULL
};
624 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxGLCanvas_SetCurrent",_kwnames
,&_argo0
))
627 if (_argo0
== Py_None
) { _arg0
= NULL
; }
628 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxGLCanvas_p")) {
629 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxGLCanvas_SetCurrent. Expected _wxGLCanvas_p.");
634 wxPy_BEGIN_ALLOW_THREADS
;
635 wxGLCanvas_SetCurrent(_arg0
);
637 wxPy_END_ALLOW_THREADS
;
638 } Py_INCREF(Py_None
);
639 _resultobj
= Py_None
;
643 #define wxGLCanvas_SetColour(_swigobj,_swigarg0) (_swigobj->SetColour(_swigarg0))
644 static PyObject
*_wrap_wxGLCanvas_SetColour(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
645 PyObject
* _resultobj
;
648 PyObject
* _argo0
= 0;
649 char *_kwnames
[] = { "self","colour", NULL
};
652 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Os:wxGLCanvas_SetColour",_kwnames
,&_argo0
,&_arg1
))
655 if (_argo0
== Py_None
) { _arg0
= NULL
; }
656 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxGLCanvas_p")) {
657 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxGLCanvas_SetColour. Expected _wxGLCanvas_p.");
662 wxPy_BEGIN_ALLOW_THREADS
;
663 wxGLCanvas_SetColour(_arg0
,_arg1
);
665 wxPy_END_ALLOW_THREADS
;
666 } Py_INCREF(Py_None
);
667 _resultobj
= Py_None
;
671 #define wxGLCanvas_SwapBuffers(_swigobj) (_swigobj->SwapBuffers())
672 static PyObject
*_wrap_wxGLCanvas_SwapBuffers(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
673 PyObject
* _resultobj
;
675 PyObject
* _argo0
= 0;
676 char *_kwnames
[] = { "self", NULL
};
679 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxGLCanvas_SwapBuffers",_kwnames
,&_argo0
))
682 if (_argo0
== Py_None
) { _arg0
= NULL
; }
683 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxGLCanvas_p")) {
684 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxGLCanvas_SwapBuffers. Expected _wxGLCanvas_p.");
689 wxPy_BEGIN_ALLOW_THREADS
;
690 wxGLCanvas_SwapBuffers(_arg0
);
692 wxPy_END_ALLOW_THREADS
;
693 } Py_INCREF(Py_None
);
694 _resultobj
= Py_None
;
698 #define wxGLCanvas_GetContext(_swigobj) (_swigobj->GetContext())
699 static PyObject
*_wrap_wxGLCanvas_GetContext(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
700 PyObject
* _resultobj
;
701 wxGLContext
* _result
;
703 PyObject
* _argo0
= 0;
704 char *_kwnames
[] = { "self", NULL
};
708 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxGLCanvas_GetContext",_kwnames
,&_argo0
))
711 if (_argo0
== Py_None
) { _arg0
= NULL
; }
712 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxGLCanvas_p")) {
713 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxGLCanvas_GetContext. Expected _wxGLCanvas_p.");
718 wxPy_BEGIN_ALLOW_THREADS
;
719 _result
= (wxGLContext
*)wxGLCanvas_GetContext(_arg0
);
721 wxPy_END_ALLOW_THREADS
;
723 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxGLContext_p");
724 _resultobj
= Py_BuildValue("s",_ptemp
);
727 _resultobj
= Py_None
;
732 static PyMethodDef glcanvascMethods
[] = {
733 { "wxGLCanvas_GetContext", (PyCFunction
) _wrap_wxGLCanvas_GetContext
, METH_VARARGS
| METH_KEYWORDS
},
734 { "wxGLCanvas_SwapBuffers", (PyCFunction
) _wrap_wxGLCanvas_SwapBuffers
, METH_VARARGS
| METH_KEYWORDS
},
735 { "wxGLCanvas_SetColour", (PyCFunction
) _wrap_wxGLCanvas_SetColour
, METH_VARARGS
| METH_KEYWORDS
},
736 { "wxGLCanvas_SetCurrent", (PyCFunction
) _wrap_wxGLCanvas_SetCurrent
, METH_VARARGS
| METH_KEYWORDS
},
737 { "new_wxGLCanvasWithContext", (PyCFunction
) _wrap_new_wxGLCanvasWithContext
, METH_VARARGS
| METH_KEYWORDS
},
738 { "new_wxGLCanvas", (PyCFunction
) _wrap_new_wxGLCanvas
, METH_VARARGS
| METH_KEYWORDS
},
739 { "wxGLContext_GetWindow", (PyCFunction
) _wrap_wxGLContext_GetWindow
, METH_VARARGS
| METH_KEYWORDS
},
740 { "wxGLContext_GetPalette", (PyCFunction
) _wrap_wxGLContext_GetPalette
, METH_VARARGS
| METH_KEYWORDS
},
741 { "wxGLContext_CreateDefaultPalette", (PyCFunction
) _wrap_wxGLContext_CreateDefaultPalette
, METH_VARARGS
| METH_KEYWORDS
},
742 { "wxGLContext_SetupPalette", (PyCFunction
) _wrap_wxGLContext_SetupPalette
, METH_VARARGS
| METH_KEYWORDS
},
743 { "wxGLContext_SetupPixelFormat", (PyCFunction
) _wrap_wxGLContext_SetupPixelFormat
, METH_VARARGS
| METH_KEYWORDS
},
744 { "wxGLContext_SwapBuffers", (PyCFunction
) _wrap_wxGLContext_SwapBuffers
, METH_VARARGS
| METH_KEYWORDS
},
745 { "wxGLContext_SetColour", (PyCFunction
) _wrap_wxGLContext_SetColour
, METH_VARARGS
| METH_KEYWORDS
},
746 { "wxGLContext_SetCurrent", (PyCFunction
) _wrap_wxGLContext_SetCurrent
, METH_VARARGS
| METH_KEYWORDS
},
747 { "delete_wxGLContext", (PyCFunction
) _wrap_delete_wxGLContext
, METH_VARARGS
| METH_KEYWORDS
},
748 { "new_wxGLContext", (PyCFunction
) _wrap_new_wxGLContext
, METH_VARARGS
| METH_KEYWORDS
},
755 * This table is used by the pointer type-checker
757 static struct { char *n1
; char *n2
; void *(*pcnv
)(void *); } _swig_mapping
[] = {
758 { "_signed_long","_long",0},
759 { "_wxPrintQuality","_wxCoord",0},
760 { "_wxPrintQuality","_int",0},
761 { "_wxPrintQuality","_signed_int",0},
762 { "_wxPrintQuality","_unsigned_int",0},
763 { "_wxPrintQuality","_wxWindowID",0},
764 { "_wxPrintQuality","_uint",0},
765 { "_wxPrintQuality","_EBool",0},
766 { "_wxPrintQuality","_size_t",0},
767 { "_wxPrintQuality","_time_t",0},
768 { "_byte","_unsigned_char",0},
769 { "_long","_unsigned_long",0},
770 { "_long","_signed_long",0},
771 { "_size_t","_wxCoord",0},
772 { "_size_t","_wxPrintQuality",0},
773 { "_size_t","_time_t",0},
774 { "_size_t","_unsigned_int",0},
775 { "_size_t","_int",0},
776 { "_size_t","_wxWindowID",0},
777 { "_size_t","_uint",0},
778 { "_uint","_wxCoord",0},
779 { "_uint","_wxPrintQuality",0},
780 { "_uint","_time_t",0},
781 { "_uint","_size_t",0},
782 { "_uint","_unsigned_int",0},
784 { "_uint","_wxWindowID",0},
785 { "_wxChar","_char",0},
786 { "_char","_wxChar",0},
787 { "_struct_wxNativeFontInfo","_wxNativeFontInfo",0},
788 { "_EBool","_wxCoord",0},
789 { "_EBool","_wxPrintQuality",0},
790 { "_EBool","_signed_int",0},
791 { "_EBool","_int",0},
792 { "_EBool","_wxWindowID",0},
793 { "_unsigned_long","_long",0},
794 { "_wxNativeFontInfo","_struct_wxNativeFontInfo",0},
795 { "_signed_int","_wxCoord",0},
796 { "_signed_int","_wxPrintQuality",0},
797 { "_signed_int","_EBool",0},
798 { "_signed_int","_wxWindowID",0},
799 { "_signed_int","_int",0},
800 { "_WXTYPE","_wxDateTime_t",0},
801 { "_WXTYPE","_short",0},
802 { "_WXTYPE","_signed_short",0},
803 { "_WXTYPE","_unsigned_short",0},
804 { "_unsigned_short","_wxDateTime_t",0},
805 { "_unsigned_short","_WXTYPE",0},
806 { "_unsigned_short","_short",0},
807 { "_wxObject","_wxGLCanvas",SwigwxGLCanvasTowxObject
},
808 { "_wxObject","_wxGLContext",SwigwxGLContextTowxObject
},
809 { "_signed_short","_WXTYPE",0},
810 { "_signed_short","_short",0},
811 { "_unsigned_char","_byte",0},
812 { "_unsigned_int","_wxCoord",0},
813 { "_unsigned_int","_wxPrintQuality",0},
814 { "_unsigned_int","_time_t",0},
815 { "_unsigned_int","_size_t",0},
816 { "_unsigned_int","_uint",0},
817 { "_unsigned_int","_wxWindowID",0},
818 { "_unsigned_int","_int",0},
819 { "_short","_wxDateTime_t",0},
820 { "_short","_WXTYPE",0},
821 { "_short","_unsigned_short",0},
822 { "_short","_signed_short",0},
823 { "_wxWindowID","_wxCoord",0},
824 { "_wxWindowID","_wxPrintQuality",0},
825 { "_wxWindowID","_time_t",0},
826 { "_wxWindowID","_size_t",0},
827 { "_wxWindowID","_EBool",0},
828 { "_wxWindowID","_uint",0},
829 { "_wxWindowID","_int",0},
830 { "_wxWindowID","_signed_int",0},
831 { "_wxWindowID","_unsigned_int",0},
832 { "_int","_wxCoord",0},
833 { "_int","_wxPrintQuality",0},
834 { "_int","_time_t",0},
835 { "_int","_size_t",0},
836 { "_int","_EBool",0},
838 { "_int","_wxWindowID",0},
839 { "_int","_unsigned_int",0},
840 { "_int","_signed_int",0},
841 { "_wxDateTime_t","_unsigned_short",0},
842 { "_wxDateTime_t","_short",0},
843 { "_wxDateTime_t","_WXTYPE",0},
844 { "_time_t","_wxCoord",0},
845 { "_time_t","_wxPrintQuality",0},
846 { "_time_t","_unsigned_int",0},
847 { "_time_t","_int",0},
848 { "_time_t","_wxWindowID",0},
849 { "_time_t","_uint",0},
850 { "_time_t","_size_t",0},
851 { "_wxCoord","_int",0},
852 { "_wxCoord","_signed_int",0},
853 { "_wxCoord","_unsigned_int",0},
854 { "_wxCoord","_wxWindowID",0},
855 { "_wxCoord","_uint",0},
856 { "_wxCoord","_EBool",0},
857 { "_wxCoord","_size_t",0},
858 { "_wxCoord","_time_t",0},
859 { "_wxCoord","_wxPrintQuality",0},
860 { "_wxEvtHandler","_wxGLCanvas",SwigwxGLCanvasTowxEvtHandler
},
861 { "_wxWindow","_wxGLCanvas",SwigwxGLCanvasTowxWindow
},
864 static PyObject
*SWIG_globals
;
868 SWIGEXPORT(void) initglcanvasc() {
870 SWIG_globals
= SWIG_newvarlink();
871 m
= Py_InitModule("glcanvasc", glcanvascMethods
);
872 d
= PyModule_GetDict(m
);
873 PyDict_SetItemString(d
,"WX_GL_RGBA", PyInt_FromLong((long) WX_GL_RGBA
));
874 PyDict_SetItemString(d
,"WX_GL_BUFFER_SIZE", PyInt_FromLong((long) WX_GL_BUFFER_SIZE
));
875 PyDict_SetItemString(d
,"WX_GL_LEVEL", PyInt_FromLong((long) WX_GL_LEVEL
));
876 PyDict_SetItemString(d
,"WX_GL_DOUBLEBUFFER", PyInt_FromLong((long) WX_GL_DOUBLEBUFFER
));
877 PyDict_SetItemString(d
,"WX_GL_STEREO", PyInt_FromLong((long) WX_GL_STEREO
));
878 PyDict_SetItemString(d
,"WX_GL_AUX_BUFFERS", PyInt_FromLong((long) WX_GL_AUX_BUFFERS
));
879 PyDict_SetItemString(d
,"WX_GL_MIN_RED", PyInt_FromLong((long) WX_GL_MIN_RED
));
880 PyDict_SetItemString(d
,"WX_GL_MIN_GREEN", PyInt_FromLong((long) WX_GL_MIN_GREEN
));
881 PyDict_SetItemString(d
,"WX_GL_MIN_BLUE", PyInt_FromLong((long) WX_GL_MIN_BLUE
));
882 PyDict_SetItemString(d
,"WX_GL_MIN_ALPHA", PyInt_FromLong((long) WX_GL_MIN_ALPHA
));
883 PyDict_SetItemString(d
,"WX_GL_DEPTH_SIZE", PyInt_FromLong((long) WX_GL_DEPTH_SIZE
));
884 PyDict_SetItemString(d
,"WX_GL_STENCIL_SIZE", PyInt_FromLong((long) WX_GL_STENCIL_SIZE
));
885 PyDict_SetItemString(d
,"WX_GL_MIN_ACCUM_RED", PyInt_FromLong((long) WX_GL_MIN_ACCUM_RED
));
886 PyDict_SetItemString(d
,"WX_GL_MIN_ACCUM_GREEN", PyInt_FromLong((long) WX_GL_MIN_ACCUM_GREEN
));
887 PyDict_SetItemString(d
,"WX_GL_MIN_ACCUM_BLUE", PyInt_FromLong((long) WX_GL_MIN_ACCUM_BLUE
));
888 PyDict_SetItemString(d
,"WX_GL_MIN_ACCUM_ALPHA", PyInt_FromLong((long) WX_GL_MIN_ACCUM_ALPHA
));
891 wxClassInfo::CleanUpClasses();
892 wxClassInfo::InitializeClasses();
896 for (i
= 0; _swig_mapping
[i
].n1
; i
++)
897 SWIG_RegisterMapping(_swig_mapping
[i
].n1
,_swig_mapping
[i
].n2
,_swig_mapping
[i
].pcnv
);