2 * FILE : contrib/glcanvas/msw/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 */
26 /* Definitions for Windows/Unix exporting */
27 #if defined(__WIN32__)
28 # if defined(_MSC_VER)
29 # define SWIGEXPORT(a) __declspec(dllexport) a
31 # if defined(__BORLANDC__)
32 # define SWIGEXPORT(a) a _export
34 # define SWIGEXPORT(a) a
38 # define SWIGEXPORT(a) a
44 extern void SWIG_MakePtr(char *, void *, char *);
45 extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
46 extern char *SWIG_GetPtr(char *, void **, char *);
47 extern char *SWIG_GetPtrObj(PyObject
*, void **, char *);
48 extern void SWIG_addvarlink(PyObject
*, char *, PyObject
*(*)(void), int (*)(PyObject
*));
49 extern PyObject
*SWIG_newvarlink(void);
53 #define SWIG_init initglcanvasc
55 #define SWIG_name "glcanvasc"
59 #ifdef __WXMAC__ // avoid a bug in Carbon headers
64 #include "myglcanvas.h"
66 #include <wx/glcanvas.h>
71 static PyObject
* t_output_helper(PyObject
* target
, PyObject
* o
) {
77 } else if (target
== Py_None
) {
81 if (!PyTuple_Check(target
)) {
83 target
= PyTuple_New(1);
84 PyTuple_SetItem(target
, 0, o2
);
87 PyTuple_SetItem(o3
, 0, o
);
90 target
= PySequence_Concat(o2
, o3
);
97 // Put some wx default wxChar* values into wxStrings.
98 static const wxString
wxPyGLCanvasNameStr(wxT("GLCanvas"));
99 static const wxString
wxPyEmptyString(wxT(""));
103 static void *SwigwxGLContextTowxObject(void *ptr
) {
106 src
= (wxGLContext
*) ptr
;
107 dest
= (wxObject
*) src
;
108 return (void *) dest
;
111 #define new_wxGLContext(_swigarg0,_swigarg1,_swigarg2) (new wxGLContext(_swigarg0,_swigarg1,_swigarg2))
112 static PyObject
*_wrap_new_wxGLContext(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
113 PyObject
* _resultobj
;
114 wxGLContext
* _result
;
117 wxPalette
* _arg2
= (wxPalette
*) &wxNullPalette
;
119 PyObject
* _argo1
= 0;
120 PyObject
* _argo2
= 0;
121 char *_kwnames
[] = { "isRGB","win","palette", NULL
};
125 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"iO|O:new_wxGLContext",_kwnames
,&tempbool0
,&_argo1
,&_argo2
))
127 _arg0
= (bool ) tempbool0
;
129 if (_argo1
== Py_None
) { _arg1
= NULL
; }
130 else if (SWIG_GetPtrObj(_argo1
,(void **) &_arg1
,"_wxGLCanvas_p")) {
131 PyErr_SetString(PyExc_TypeError
,"Type error in argument 2 of new_wxGLContext. Expected _wxGLCanvas_p.");
136 if (SWIG_GetPtrObj(_argo2
,(void **) &_arg2
,"_wxPalette_p")) {
137 PyErr_SetString(PyExc_TypeError
,"Type error in argument 3 of new_wxGLContext. Expected _wxPalette_p.");
142 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
143 _result
= (wxGLContext
*)new_wxGLContext(_arg0
,_arg1
,*_arg2
);
145 wxPyEndAllowThreads(__tstate
);
146 if (PyErr_Occurred()) return NULL
;
148 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxGLContext_p");
149 _resultobj
= Py_BuildValue("s",_ptemp
);
152 _resultobj
= Py_None
;
157 #define delete_wxGLContext(_swigobj) (delete _swigobj)
158 static PyObject
*_wrap_delete_wxGLContext(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
159 PyObject
* _resultobj
;
161 PyObject
* _argo0
= 0;
162 char *_kwnames
[] = { "self", NULL
};
165 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:delete_wxGLContext",_kwnames
,&_argo0
))
168 if (_argo0
== Py_None
) { _arg0
= NULL
; }
169 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxGLContext_p")) {
170 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of delete_wxGLContext. Expected _wxGLContext_p.");
175 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
176 delete_wxGLContext(_arg0
);
178 wxPyEndAllowThreads(__tstate
);
179 if (PyErr_Occurred()) return NULL
;
180 } Py_INCREF(Py_None
);
181 _resultobj
= Py_None
;
185 #define wxGLContext_SetCurrent(_swigobj) (_swigobj->SetCurrent())
186 static PyObject
*_wrap_wxGLContext_SetCurrent(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
187 PyObject
* _resultobj
;
189 PyObject
* _argo0
= 0;
190 char *_kwnames
[] = { "self", NULL
};
193 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxGLContext_SetCurrent",_kwnames
,&_argo0
))
196 if (_argo0
== Py_None
) { _arg0
= NULL
; }
197 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxGLContext_p")) {
198 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxGLContext_SetCurrent. Expected _wxGLContext_p.");
203 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
204 wxGLContext_SetCurrent(_arg0
);
206 wxPyEndAllowThreads(__tstate
);
207 if (PyErr_Occurred()) return NULL
;
208 } Py_INCREF(Py_None
);
209 _resultobj
= Py_None
;
213 #define wxGLContext_SetColour(_swigobj,_swigarg0) (_swigobj->SetColour(_swigarg0))
214 static PyObject
*_wrap_wxGLContext_SetColour(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
215 PyObject
* _resultobj
;
218 PyObject
* _argo0
= 0;
219 PyObject
* _obj1
= 0;
220 char *_kwnames
[] = { "self","colour", NULL
};
223 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO:wxGLContext_SetColour",_kwnames
,&_argo0
,&_obj1
))
226 if (_argo0
== Py_None
) { _arg0
= NULL
; }
227 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxGLContext_p")) {
228 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxGLContext_SetColour. Expected _wxGLContext_p.");
233 _arg1
= wxString_in_helper(_obj1
);
238 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
239 wxGLContext_SetColour(_arg0
,*_arg1
);
241 wxPyEndAllowThreads(__tstate
);
242 if (PyErr_Occurred()) return NULL
;
243 } Py_INCREF(Py_None
);
244 _resultobj
= Py_None
;
252 #define wxGLContext_SwapBuffers(_swigobj) (_swigobj->SwapBuffers())
253 static PyObject
*_wrap_wxGLContext_SwapBuffers(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
254 PyObject
* _resultobj
;
256 PyObject
* _argo0
= 0;
257 char *_kwnames
[] = { "self", NULL
};
260 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxGLContext_SwapBuffers",_kwnames
,&_argo0
))
263 if (_argo0
== Py_None
) { _arg0
= NULL
; }
264 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxGLContext_p")) {
265 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxGLContext_SwapBuffers. Expected _wxGLContext_p.");
270 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
271 wxGLContext_SwapBuffers(_arg0
);
273 wxPyEndAllowThreads(__tstate
);
274 if (PyErr_Occurred()) return NULL
;
275 } Py_INCREF(Py_None
);
276 _resultobj
= Py_None
;
280 #define wxGLContext_GetWindow(_swigobj) (_swigobj->GetWindow())
281 static PyObject
*_wrap_wxGLContext_GetWindow(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
282 PyObject
* _resultobj
;
285 PyObject
* _argo0
= 0;
286 char *_kwnames
[] = { "self", NULL
};
289 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxGLContext_GetWindow",_kwnames
,&_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_GetWindow. Expected _wxGLContext_p.");
299 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
300 _result
= (wxWindow
*)wxGLContext_GetWindow(_arg0
);
302 wxPyEndAllowThreads(__tstate
);
303 if (PyErr_Occurred()) return NULL
;
304 }{ _resultobj
= wxPyMake_wxObject(_result
); }
308 static void *SwigwxGLCanvasTowxWindow(void *ptr
) {
311 src
= (wxGLCanvas
*) ptr
;
312 dest
= (wxWindow
*) src
;
313 return (void *) dest
;
316 static void *SwigwxGLCanvasTowxEvtHandler(void *ptr
) {
319 src
= (wxGLCanvas
*) ptr
;
320 dest
= (wxEvtHandler
*) src
;
321 return (void *) dest
;
324 static void *SwigwxGLCanvasTowxObject(void *ptr
) {
327 src
= (wxGLCanvas
*) ptr
;
328 dest
= (wxObject
*) src
;
329 return (void *) dest
;
332 #define new_wxGLCanvas(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7) (new wxGLCanvas(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7))
333 static PyObject
*_wrap_new_wxGLCanvas(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
334 PyObject
* _resultobj
;
335 wxGLCanvas
* _result
;
337 wxWindowID _arg1
= (wxWindowID
) -1;
338 wxPoint
* _arg2
= (wxPoint
*) &wxDefaultPosition
;
339 wxSize
* _arg3
= (wxSize
*) &wxDefaultSize
;
340 long _arg4
= (long ) 0;
341 wxString
* _arg5
= (wxString
*) &wxPyGLCanvasNameStr
;
342 int * _arg6
= (int *) NULL
;
343 wxPalette
* _arg7
= (wxPalette
*) &wxNullPalette
;
344 PyObject
* _argo0
= 0;
346 PyObject
* _obj2
= 0;
348 PyObject
* _obj3
= 0;
349 PyObject
* _obj5
= 0;
351 PyObject
* _obj6
= 0;
352 PyObject
* _argo7
= 0;
353 char *_kwnames
[] = { "parent","id","pos","size","style","name","attribList","palette", NULL
};
357 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O|iOOlOOO:new_wxGLCanvas",_kwnames
,&_argo0
,&_arg1
,&_obj2
,&_obj3
,&_arg4
,&_obj5
,&_obj6
,&_argo7
))
360 if (_argo0
== Py_None
) { _arg0
= NULL
; }
361 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxWindow_p")) {
362 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of new_wxGLCanvas. Expected _wxWindow_p.");
369 if (! wxPoint_helper(_obj2
, &_arg2
))
375 if (! wxSize_helper(_obj3
, &_arg3
))
380 _arg5
= wxString_in_helper(_obj5
);
387 if (PySequence_Check(_obj6
)) {
388 int size
= PyObject_Length(_obj6
);
389 temp1
= new int[size
+1]; // (int*)malloc((size + 1) * sizeof(int));
390 for (i
= 0; i
< size
; i
++) {
391 temp1
[i
] = PyInt_AsLong(PySequence_GetItem(_obj6
, i
));
398 if (SWIG_GetPtrObj(_argo7
,(void **) &_arg7
,"_wxPalette_p")) {
399 PyErr_SetString(PyExc_TypeError
,"Type error in argument 8 of new_wxGLCanvas. Expected _wxPalette_p.");
404 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
405 _result
= (wxGLCanvas
*)new_wxGLCanvas(_arg0
,_arg1
,*_arg2
,*_arg3
,_arg4
,*_arg5
,_arg6
,*_arg7
);
407 wxPyEndAllowThreads(__tstate
);
408 if (PyErr_Occurred()) return NULL
;
410 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxGLCanvas_p");
411 _resultobj
= Py_BuildValue("s",_ptemp
);
414 _resultobj
= Py_None
;
426 #define new_wxGLCanvasWithContext(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8) (new wxGLCanvas(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8))
427 static PyObject
*_wrap_new_wxGLCanvasWithContext(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
428 PyObject
* _resultobj
;
429 wxGLCanvas
* _result
;
431 wxGLContext
* _arg1
= (wxGLContext
*) NULL
;
432 wxWindowID _arg2
= (wxWindowID
) -1;
433 wxPoint
* _arg3
= (wxPoint
*) &wxDefaultPosition
;
434 wxSize
* _arg4
= (wxSize
*) &wxDefaultSize
;
435 long _arg5
= (long ) 0;
436 wxString
* _arg6
= (wxString
*) &wxPyGLCanvasNameStr
;
437 int * _arg7
= (int *) NULL
;
438 wxPalette
* _arg8
= (wxPalette
*) &wxNullPalette
;
439 PyObject
* _argo0
= 0;
440 PyObject
* _argo1
= 0;
442 PyObject
* _obj3
= 0;
444 PyObject
* _obj4
= 0;
445 PyObject
* _obj6
= 0;
447 PyObject
* _obj7
= 0;
448 PyObject
* _argo8
= 0;
449 char *_kwnames
[] = { "parent","shared","id","pos","size","style","name","attribList","palette", NULL
};
453 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O|OiOOlOOO:new_wxGLCanvasWithContext",_kwnames
,&_argo0
,&_argo1
,&_arg2
,&_obj3
,&_obj4
,&_arg5
,&_obj6
,&_obj7
,&_argo8
))
456 if (_argo0
== Py_None
) { _arg0
= NULL
; }
457 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxWindow_p")) {
458 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of new_wxGLCanvasWithContext. Expected _wxWindow_p.");
463 if (_argo1
== Py_None
) { _arg1
= NULL
; }
464 else if (SWIG_GetPtrObj(_argo1
,(void **) &_arg1
,"_wxGLContext_p")) {
465 PyErr_SetString(PyExc_TypeError
,"Type error in argument 2 of new_wxGLCanvasWithContext. Expected _wxGLContext_p.");
472 if (! wxPoint_helper(_obj3
, &_arg3
))
478 if (! wxSize_helper(_obj4
, &_arg4
))
483 _arg6
= wxString_in_helper(_obj6
);
490 if (PySequence_Check(_obj7
)) {
491 int size
= PyObject_Length(_obj7
);
492 temp1
= new int[size
+1]; // (int*)malloc((size + 1) * sizeof(int));
493 for (i
= 0; i
< size
; i
++) {
494 temp1
[i
] = PyInt_AsLong(PySequence_GetItem(_obj7
, i
));
501 if (SWIG_GetPtrObj(_argo8
,(void **) &_arg8
,"_wxPalette_p")) {
502 PyErr_SetString(PyExc_TypeError
,"Type error in argument 9 of new_wxGLCanvasWithContext. Expected _wxPalette_p.");
507 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
508 _result
= (wxGLCanvas
*)new_wxGLCanvasWithContext(_arg0
,_arg1
,_arg2
,*_arg3
,*_arg4
,_arg5
,*_arg6
,_arg7
,*_arg8
);
510 wxPyEndAllowThreads(__tstate
);
511 if (PyErr_Occurred()) return NULL
;
513 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxGLCanvas_p");
514 _resultobj
= Py_BuildValue("s",_ptemp
);
517 _resultobj
= Py_None
;
529 #define wxGLCanvas_SetCurrent(_swigobj) (_swigobj->SetCurrent())
530 static PyObject
*_wrap_wxGLCanvas_SetCurrent(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
531 PyObject
* _resultobj
;
533 PyObject
* _argo0
= 0;
534 char *_kwnames
[] = { "self", NULL
};
537 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxGLCanvas_SetCurrent",_kwnames
,&_argo0
))
540 if (_argo0
== Py_None
) { _arg0
= NULL
; }
541 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxGLCanvas_p")) {
542 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxGLCanvas_SetCurrent. Expected _wxGLCanvas_p.");
547 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
548 wxGLCanvas_SetCurrent(_arg0
);
550 wxPyEndAllowThreads(__tstate
);
551 if (PyErr_Occurred()) return NULL
;
552 } Py_INCREF(Py_None
);
553 _resultobj
= Py_None
;
557 #define wxGLCanvas_SetColour(_swigobj,_swigarg0) (_swigobj->SetColour(_swigarg0))
558 static PyObject
*_wrap_wxGLCanvas_SetColour(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
559 PyObject
* _resultobj
;
562 PyObject
* _argo0
= 0;
563 PyObject
* _obj1
= 0;
564 char *_kwnames
[] = { "self","colour", NULL
};
567 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO:wxGLCanvas_SetColour",_kwnames
,&_argo0
,&_obj1
))
570 if (_argo0
== Py_None
) { _arg0
= NULL
; }
571 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxGLCanvas_p")) {
572 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxGLCanvas_SetColour. Expected _wxGLCanvas_p.");
577 _arg1
= wxString_in_helper(_obj1
);
582 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
583 wxGLCanvas_SetColour(_arg0
,*_arg1
);
585 wxPyEndAllowThreads(__tstate
);
586 if (PyErr_Occurred()) return NULL
;
587 } Py_INCREF(Py_None
);
588 _resultobj
= Py_None
;
596 #define wxGLCanvas_SwapBuffers(_swigobj) (_swigobj->SwapBuffers())
597 static PyObject
*_wrap_wxGLCanvas_SwapBuffers(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
598 PyObject
* _resultobj
;
600 PyObject
* _argo0
= 0;
601 char *_kwnames
[] = { "self", NULL
};
604 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxGLCanvas_SwapBuffers",_kwnames
,&_argo0
))
607 if (_argo0
== Py_None
) { _arg0
= NULL
; }
608 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxGLCanvas_p")) {
609 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxGLCanvas_SwapBuffers. Expected _wxGLCanvas_p.");
614 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
615 wxGLCanvas_SwapBuffers(_arg0
);
617 wxPyEndAllowThreads(__tstate
);
618 if (PyErr_Occurred()) return NULL
;
619 } Py_INCREF(Py_None
);
620 _resultobj
= Py_None
;
624 #define wxGLCanvas_GetContext(_swigobj) (_swigobj->GetContext())
625 static PyObject
*_wrap_wxGLCanvas_GetContext(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
626 PyObject
* _resultobj
;
627 wxGLContext
* _result
;
629 PyObject
* _argo0
= 0;
630 char *_kwnames
[] = { "self", NULL
};
634 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxGLCanvas_GetContext",_kwnames
,&_argo0
))
637 if (_argo0
== Py_None
) { _arg0
= NULL
; }
638 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxGLCanvas_p")) {
639 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxGLCanvas_GetContext. Expected _wxGLCanvas_p.");
644 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
645 _result
= (wxGLContext
*)wxGLCanvas_GetContext(_arg0
);
647 wxPyEndAllowThreads(__tstate
);
648 if (PyErr_Occurred()) return NULL
;
650 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxGLContext_p");
651 _resultobj
= Py_BuildValue("s",_ptemp
);
654 _resultobj
= Py_None
;
659 #define wxGLCanvas_SetupPixelFormat(_swigobj,_swigarg0) (_swigobj->SetupPixelFormat(_swigarg0))
660 static PyObject
*_wrap_wxGLCanvas_SetupPixelFormat(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
661 PyObject
* _resultobj
;
663 int * _arg1
= (int *) NULL
;
664 PyObject
* _argo0
= 0;
666 PyObject
* _obj1
= 0;
667 char *_kwnames
[] = { "self","attribList", NULL
};
670 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O|O:wxGLCanvas_SetupPixelFormat",_kwnames
,&_argo0
,&_obj1
))
673 if (_argo0
== Py_None
) { _arg0
= NULL
; }
674 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxGLCanvas_p")) {
675 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxGLCanvas_SetupPixelFormat. Expected _wxGLCanvas_p.");
682 if (PySequence_Check(_obj1
)) {
683 int size
= PyObject_Length(_obj1
);
684 temp
= new int[size
+1]; // (int*)malloc((size + 1) * sizeof(int));
685 for (i
= 0; i
< size
; i
++) {
686 temp
[i
] = PyInt_AsLong(PySequence_GetItem(_obj1
, i
));
693 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
694 wxGLCanvas_SetupPixelFormat(_arg0
,_arg1
);
696 wxPyEndAllowThreads(__tstate
);
697 if (PyErr_Occurred()) return NULL
;
698 } Py_INCREF(Py_None
);
699 _resultobj
= Py_None
;
706 #define wxGLCanvas_SetupPalette(_swigobj,_swigarg0) (_swigobj->SetupPalette(_swigarg0))
707 static PyObject
*_wrap_wxGLCanvas_SetupPalette(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
708 PyObject
* _resultobj
;
711 PyObject
* _argo0
= 0;
712 PyObject
* _argo1
= 0;
713 char *_kwnames
[] = { "self","palette", NULL
};
716 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO:wxGLCanvas_SetupPalette",_kwnames
,&_argo0
,&_argo1
))
719 if (_argo0
== Py_None
) { _arg0
= NULL
; }
720 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxGLCanvas_p")) {
721 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxGLCanvas_SetupPalette. Expected _wxGLCanvas_p.");
726 if (SWIG_GetPtrObj(_argo1
,(void **) &_arg1
,"_wxPalette_p")) {
727 PyErr_SetString(PyExc_TypeError
,"Type error in argument 2 of wxGLCanvas_SetupPalette. Expected _wxPalette_p.");
732 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
733 wxGLCanvas_SetupPalette(_arg0
,*_arg1
);
735 wxPyEndAllowThreads(__tstate
);
736 if (PyErr_Occurred()) return NULL
;
737 } Py_INCREF(Py_None
);
738 _resultobj
= Py_None
;
742 #define wxGLCanvas_CreateDefaultPalette(_swigobj) (_swigobj->CreateDefaultPalette())
743 static PyObject
*_wrap_wxGLCanvas_CreateDefaultPalette(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
744 PyObject
* _resultobj
;
747 PyObject
* _argo0
= 0;
748 char *_kwnames
[] = { "self", NULL
};
752 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxGLCanvas_CreateDefaultPalette",_kwnames
,&_argo0
))
755 if (_argo0
== Py_None
) { _arg0
= NULL
; }
756 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxGLCanvas_p")) {
757 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxGLCanvas_CreateDefaultPalette. Expected _wxGLCanvas_p.");
762 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
763 _result
= new wxPalette (wxGLCanvas_CreateDefaultPalette(_arg0
));
765 wxPyEndAllowThreads(__tstate
);
766 if (PyErr_Occurred()) return NULL
;
767 } SWIG_MakePtr(_ptemp
, (void *) _result
,"_wxPalette_p");
768 _resultobj
= Py_BuildValue("s",_ptemp
);
772 #define wxGLCanvas_GetPalette(_swigobj) (_swigobj->GetPalette())
773 static PyObject
*_wrap_wxGLCanvas_GetPalette(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
774 PyObject
* _resultobj
;
777 PyObject
* _argo0
= 0;
778 char *_kwnames
[] = { "self", NULL
};
782 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxGLCanvas_GetPalette",_kwnames
,&_argo0
))
785 if (_argo0
== Py_None
) { _arg0
= NULL
; }
786 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxGLCanvas_p")) {
787 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxGLCanvas_GetPalette. Expected _wxGLCanvas_p.");
792 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
793 _result
= (wxPalette
*)wxGLCanvas_GetPalette(_arg0
);
795 wxPyEndAllowThreads(__tstate
);
796 if (PyErr_Occurred()) return NULL
;
798 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxPalette_p");
799 _resultobj
= Py_BuildValue("s",_ptemp
);
802 _resultobj
= Py_None
;
807 static PyMethodDef glcanvascMethods
[] = {
808 { "wxGLCanvas_GetPalette", (PyCFunction
) _wrap_wxGLCanvas_GetPalette
, METH_VARARGS
| METH_KEYWORDS
},
809 { "wxGLCanvas_CreateDefaultPalette", (PyCFunction
) _wrap_wxGLCanvas_CreateDefaultPalette
, METH_VARARGS
| METH_KEYWORDS
},
810 { "wxGLCanvas_SetupPalette", (PyCFunction
) _wrap_wxGLCanvas_SetupPalette
, METH_VARARGS
| METH_KEYWORDS
},
811 { "wxGLCanvas_SetupPixelFormat", (PyCFunction
) _wrap_wxGLCanvas_SetupPixelFormat
, METH_VARARGS
| METH_KEYWORDS
},
812 { "wxGLCanvas_GetContext", (PyCFunction
) _wrap_wxGLCanvas_GetContext
, METH_VARARGS
| METH_KEYWORDS
},
813 { "wxGLCanvas_SwapBuffers", (PyCFunction
) _wrap_wxGLCanvas_SwapBuffers
, METH_VARARGS
| METH_KEYWORDS
},
814 { "wxGLCanvas_SetColour", (PyCFunction
) _wrap_wxGLCanvas_SetColour
, METH_VARARGS
| METH_KEYWORDS
},
815 { "wxGLCanvas_SetCurrent", (PyCFunction
) _wrap_wxGLCanvas_SetCurrent
, METH_VARARGS
| METH_KEYWORDS
},
816 { "new_wxGLCanvasWithContext", (PyCFunction
) _wrap_new_wxGLCanvasWithContext
, METH_VARARGS
| METH_KEYWORDS
},
817 { "new_wxGLCanvas", (PyCFunction
) _wrap_new_wxGLCanvas
, METH_VARARGS
| METH_KEYWORDS
},
818 { "wxGLContext_GetWindow", (PyCFunction
) _wrap_wxGLContext_GetWindow
, METH_VARARGS
| METH_KEYWORDS
},
819 { "wxGLContext_SwapBuffers", (PyCFunction
) _wrap_wxGLContext_SwapBuffers
, METH_VARARGS
| METH_KEYWORDS
},
820 { "wxGLContext_SetColour", (PyCFunction
) _wrap_wxGLContext_SetColour
, METH_VARARGS
| METH_KEYWORDS
},
821 { "wxGLContext_SetCurrent", (PyCFunction
) _wrap_wxGLContext_SetCurrent
, METH_VARARGS
| METH_KEYWORDS
},
822 { "delete_wxGLContext", (PyCFunction
) _wrap_delete_wxGLContext
, METH_VARARGS
| METH_KEYWORDS
},
823 { "new_wxGLContext", (PyCFunction
) _wrap_new_wxGLContext
, METH_VARARGS
| METH_KEYWORDS
},
830 * This table is used by the pointer type-checker
832 static struct { char *n1
; char *n2
; void *(*pcnv
)(void *); } _swig_mapping
[] = {
833 { "_signed_long","_long",0},
834 { "_wxPrintQuality","_wxCoord",0},
835 { "_wxPrintQuality","_int",0},
836 { "_wxPrintQuality","_signed_int",0},
837 { "_wxPrintQuality","_unsigned_int",0},
838 { "_wxPrintQuality","_wxWindowID",0},
839 { "_wxPrintQuality","_uint",0},
840 { "_wxPrintQuality","_EBool",0},
841 { "_wxPrintQuality","_size_t",0},
842 { "_wxPrintQuality","_time_t",0},
843 { "_byte","_unsigned_char",0},
844 { "_long","_unsigned_long",0},
845 { "_long","_signed_long",0},
846 { "_size_t","_wxCoord",0},
847 { "_size_t","_wxPrintQuality",0},
848 { "_size_t","_time_t",0},
849 { "_size_t","_unsigned_int",0},
850 { "_size_t","_int",0},
851 { "_size_t","_wxWindowID",0},
852 { "_size_t","_uint",0},
853 { "_uint","_wxCoord",0},
854 { "_uint","_wxPrintQuality",0},
855 { "_uint","_time_t",0},
856 { "_uint","_size_t",0},
857 { "_uint","_unsigned_int",0},
859 { "_uint","_wxWindowID",0},
860 { "_wxChar","_char",0},
861 { "_char","_wxChar",0},
862 { "_struct_wxNativeFontInfo","_wxNativeFontInfo",0},
863 { "_EBool","_wxCoord",0},
864 { "_EBool","_wxPrintQuality",0},
865 { "_EBool","_signed_int",0},
866 { "_EBool","_int",0},
867 { "_EBool","_wxWindowID",0},
868 { "_unsigned_long","_long",0},
869 { "_wxNativeFontInfo","_struct_wxNativeFontInfo",0},
870 { "_signed_int","_wxCoord",0},
871 { "_signed_int","_wxPrintQuality",0},
872 { "_signed_int","_EBool",0},
873 { "_signed_int","_wxWindowID",0},
874 { "_signed_int","_int",0},
875 { "_WXTYPE","_wxDateTime_t",0},
876 { "_WXTYPE","_short",0},
877 { "_WXTYPE","_signed_short",0},
878 { "_WXTYPE","_unsigned_short",0},
879 { "_unsigned_short","_wxDateTime_t",0},
880 { "_unsigned_short","_WXTYPE",0},
881 { "_unsigned_short","_short",0},
882 { "_wxObject","_wxGLCanvas",SwigwxGLCanvasTowxObject
},
883 { "_wxObject","_wxGLContext",SwigwxGLContextTowxObject
},
884 { "_signed_short","_WXTYPE",0},
885 { "_signed_short","_short",0},
886 { "_unsigned_char","_byte",0},
887 { "_unsigned_int","_wxCoord",0},
888 { "_unsigned_int","_wxPrintQuality",0},
889 { "_unsigned_int","_time_t",0},
890 { "_unsigned_int","_size_t",0},
891 { "_unsigned_int","_uint",0},
892 { "_unsigned_int","_wxWindowID",0},
893 { "_unsigned_int","_int",0},
894 { "_short","_wxDateTime_t",0},
895 { "_short","_WXTYPE",0},
896 { "_short","_unsigned_short",0},
897 { "_short","_signed_short",0},
898 { "_wxWindowID","_wxCoord",0},
899 { "_wxWindowID","_wxPrintQuality",0},
900 { "_wxWindowID","_time_t",0},
901 { "_wxWindowID","_size_t",0},
902 { "_wxWindowID","_EBool",0},
903 { "_wxWindowID","_uint",0},
904 { "_wxWindowID","_int",0},
905 { "_wxWindowID","_signed_int",0},
906 { "_wxWindowID","_unsigned_int",0},
907 { "_int","_wxCoord",0},
908 { "_int","_wxPrintQuality",0},
909 { "_int","_time_t",0},
910 { "_int","_size_t",0},
911 { "_int","_EBool",0},
913 { "_int","_wxWindowID",0},
914 { "_int","_unsigned_int",0},
915 { "_int","_signed_int",0},
916 { "_wxDateTime_t","_unsigned_short",0},
917 { "_wxDateTime_t","_short",0},
918 { "_wxDateTime_t","_WXTYPE",0},
919 { "_time_t","_wxCoord",0},
920 { "_time_t","_wxPrintQuality",0},
921 { "_time_t","_unsigned_int",0},
922 { "_time_t","_int",0},
923 { "_time_t","_wxWindowID",0},
924 { "_time_t","_uint",0},
925 { "_time_t","_size_t",0},
926 { "_wxCoord","_int",0},
927 { "_wxCoord","_signed_int",0},
928 { "_wxCoord","_unsigned_int",0},
929 { "_wxCoord","_wxWindowID",0},
930 { "_wxCoord","_uint",0},
931 { "_wxCoord","_EBool",0},
932 { "_wxCoord","_size_t",0},
933 { "_wxCoord","_time_t",0},
934 { "_wxCoord","_wxPrintQuality",0},
935 { "_wxEvtHandler","_wxGLCanvas",SwigwxGLCanvasTowxEvtHandler
},
936 { "_wxWindow","_wxGLCanvas",SwigwxGLCanvasTowxWindow
},
939 static PyObject
*SWIG_globals
;
943 SWIGEXPORT(void) initglcanvasc() {
945 SWIG_globals
= SWIG_newvarlink();
946 m
= Py_InitModule("glcanvasc", glcanvascMethods
);
947 d
= PyModule_GetDict(m
);
948 PyDict_SetItemString(d
,"WX_GL_RGBA", PyInt_FromLong((long) WX_GL_RGBA
));
949 PyDict_SetItemString(d
,"WX_GL_BUFFER_SIZE", PyInt_FromLong((long) WX_GL_BUFFER_SIZE
));
950 PyDict_SetItemString(d
,"WX_GL_LEVEL", PyInt_FromLong((long) WX_GL_LEVEL
));
951 PyDict_SetItemString(d
,"WX_GL_DOUBLEBUFFER", PyInt_FromLong((long) WX_GL_DOUBLEBUFFER
));
952 PyDict_SetItemString(d
,"WX_GL_STEREO", PyInt_FromLong((long) WX_GL_STEREO
));
953 PyDict_SetItemString(d
,"WX_GL_AUX_BUFFERS", PyInt_FromLong((long) WX_GL_AUX_BUFFERS
));
954 PyDict_SetItemString(d
,"WX_GL_MIN_RED", PyInt_FromLong((long) WX_GL_MIN_RED
));
955 PyDict_SetItemString(d
,"WX_GL_MIN_GREEN", PyInt_FromLong((long) WX_GL_MIN_GREEN
));
956 PyDict_SetItemString(d
,"WX_GL_MIN_BLUE", PyInt_FromLong((long) WX_GL_MIN_BLUE
));
957 PyDict_SetItemString(d
,"WX_GL_MIN_ALPHA", PyInt_FromLong((long) WX_GL_MIN_ALPHA
));
958 PyDict_SetItemString(d
,"WX_GL_DEPTH_SIZE", PyInt_FromLong((long) WX_GL_DEPTH_SIZE
));
959 PyDict_SetItemString(d
,"WX_GL_STENCIL_SIZE", PyInt_FromLong((long) WX_GL_STENCIL_SIZE
));
960 PyDict_SetItemString(d
,"WX_GL_MIN_ACCUM_RED", PyInt_FromLong((long) WX_GL_MIN_ACCUM_RED
));
961 PyDict_SetItemString(d
,"WX_GL_MIN_ACCUM_GREEN", PyInt_FromLong((long) WX_GL_MIN_ACCUM_GREEN
));
962 PyDict_SetItemString(d
,"WX_GL_MIN_ACCUM_BLUE", PyInt_FromLong((long) WX_GL_MIN_ACCUM_BLUE
));
963 PyDict_SetItemString(d
,"WX_GL_MIN_ACCUM_ALPHA", PyInt_FromLong((long) WX_GL_MIN_ACCUM_ALPHA
));
968 for (i
= 0; _swig_mapping
[i
].n1
; i
++)
969 SWIG_RegisterMapping(_swig_mapping
[i
].n1
,_swig_mapping
[i
].n2
,_swig_mapping
[i
].pcnv
);