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 #include "myglcanvas.h"
61 #include <wx/glcanvas.h>
66 static PyObject
* t_output_helper(PyObject
* target
, PyObject
* o
) {
72 } else if (target
== Py_None
) {
76 if (!PyTuple_Check(target
)) {
78 target
= PyTuple_New(1);
79 PyTuple_SetItem(target
, 0, o2
);
82 PyTuple_SetItem(o3
, 0, o
);
85 target
= PySequence_Concat(o2
, o3
);
92 // Put some wx default wxChar* values into wxStrings.
93 static const wxString
wxPyGLCanvasNameStr(wxT("GLCanvas"));
94 static const wxString
wxPyEmptyString(wxT(""));
98 static void *SwigwxGLContextTowxObject(void *ptr
) {
101 src
= (wxGLContext
*) ptr
;
102 dest
= (wxObject
*) src
;
103 return (void *) dest
;
106 #define new_wxGLContext(_swigarg0,_swigarg1,_swigarg2) (new wxGLContext(_swigarg0,_swigarg1,_swigarg2))
107 static PyObject
*_wrap_new_wxGLContext(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
108 PyObject
* _resultobj
;
109 wxGLContext
* _result
;
112 wxPalette
* _arg2
= (wxPalette
*) &wxNullPalette
;
114 PyObject
* _argo1
= 0;
115 PyObject
* _argo2
= 0;
116 char *_kwnames
[] = { "isRGB","win","palette", NULL
};
120 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"iO|O:new_wxGLContext",_kwnames
,&tempbool0
,&_argo1
,&_argo2
))
122 _arg0
= (bool ) tempbool0
;
124 if (_argo1
== Py_None
) { _arg1
= NULL
; }
125 else if (SWIG_GetPtrObj(_argo1
,(void **) &_arg1
,"_wxGLCanvas_p")) {
126 PyErr_SetString(PyExc_TypeError
,"Type error in argument 2 of new_wxGLContext. Expected _wxGLCanvas_p.");
131 if (SWIG_GetPtrObj(_argo2
,(void **) &_arg2
,"_wxPalette_p")) {
132 PyErr_SetString(PyExc_TypeError
,"Type error in argument 3 of new_wxGLContext. Expected _wxPalette_p.");
137 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
138 _result
= (wxGLContext
*)new_wxGLContext(_arg0
,_arg1
,*_arg2
);
140 wxPyEndAllowThreads(__tstate
);
141 if (PyErr_Occurred()) return NULL
;
143 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxGLContext_p");
144 _resultobj
= Py_BuildValue("s",_ptemp
);
147 _resultobj
= Py_None
;
152 #define delete_wxGLContext(_swigobj) (delete _swigobj)
153 static PyObject
*_wrap_delete_wxGLContext(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
154 PyObject
* _resultobj
;
156 PyObject
* _argo0
= 0;
157 char *_kwnames
[] = { "self", NULL
};
160 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:delete_wxGLContext",_kwnames
,&_argo0
))
163 if (_argo0
== Py_None
) { _arg0
= NULL
; }
164 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxGLContext_p")) {
165 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of delete_wxGLContext. Expected _wxGLContext_p.");
170 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
171 delete_wxGLContext(_arg0
);
173 wxPyEndAllowThreads(__tstate
);
174 if (PyErr_Occurred()) return NULL
;
175 } Py_INCREF(Py_None
);
176 _resultobj
= Py_None
;
180 #define wxGLContext_SetCurrent(_swigobj) (_swigobj->SetCurrent())
181 static PyObject
*_wrap_wxGLContext_SetCurrent(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
182 PyObject
* _resultobj
;
184 PyObject
* _argo0
= 0;
185 char *_kwnames
[] = { "self", NULL
};
188 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxGLContext_SetCurrent",_kwnames
,&_argo0
))
191 if (_argo0
== Py_None
) { _arg0
= NULL
; }
192 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxGLContext_p")) {
193 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxGLContext_SetCurrent. Expected _wxGLContext_p.");
198 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
199 wxGLContext_SetCurrent(_arg0
);
201 wxPyEndAllowThreads(__tstate
);
202 if (PyErr_Occurred()) return NULL
;
203 } Py_INCREF(Py_None
);
204 _resultobj
= Py_None
;
208 #define wxGLContext_SetColour(_swigobj,_swigarg0) (_swigobj->SetColour(_swigarg0))
209 static PyObject
*_wrap_wxGLContext_SetColour(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
210 PyObject
* _resultobj
;
213 PyObject
* _argo0
= 0;
214 PyObject
* _obj1
= 0;
215 char *_kwnames
[] = { "self","colour", NULL
};
218 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO:wxGLContext_SetColour",_kwnames
,&_argo0
,&_obj1
))
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 _arg1
= wxString_in_helper(_obj1
);
233 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
234 wxGLContext_SetColour(_arg0
,*_arg1
);
236 wxPyEndAllowThreads(__tstate
);
237 if (PyErr_Occurred()) return NULL
;
238 } Py_INCREF(Py_None
);
239 _resultobj
= Py_None
;
247 #define wxGLContext_SwapBuffers(_swigobj) (_swigobj->SwapBuffers())
248 static PyObject
*_wrap_wxGLContext_SwapBuffers(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
249 PyObject
* _resultobj
;
251 PyObject
* _argo0
= 0;
252 char *_kwnames
[] = { "self", NULL
};
255 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxGLContext_SwapBuffers",_kwnames
,&_argo0
))
258 if (_argo0
== Py_None
) { _arg0
= NULL
; }
259 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxGLContext_p")) {
260 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxGLContext_SwapBuffers. Expected _wxGLContext_p.");
265 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
266 wxGLContext_SwapBuffers(_arg0
);
268 wxPyEndAllowThreads(__tstate
);
269 if (PyErr_Occurred()) return NULL
;
270 } Py_INCREF(Py_None
);
271 _resultobj
= Py_None
;
275 #define wxGLContext_GetWindow(_swigobj) (_swigobj->GetWindow())
276 static PyObject
*_wrap_wxGLContext_GetWindow(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
277 PyObject
* _resultobj
;
280 PyObject
* _argo0
= 0;
281 char *_kwnames
[] = { "self", NULL
};
284 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxGLContext_GetWindow",_kwnames
,&_argo0
))
287 if (_argo0
== Py_None
) { _arg0
= NULL
; }
288 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxGLContext_p")) {
289 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxGLContext_GetWindow. Expected _wxGLContext_p.");
294 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
295 _result
= (wxWindow
*)wxGLContext_GetWindow(_arg0
);
297 wxPyEndAllowThreads(__tstate
);
298 if (PyErr_Occurred()) return NULL
;
299 }{ _resultobj
= wxPyMake_wxObject(_result
); }
303 static void *SwigwxGLCanvasTowxWindow(void *ptr
) {
306 src
= (wxGLCanvas
*) ptr
;
307 dest
= (wxWindow
*) src
;
308 return (void *) dest
;
311 static void *SwigwxGLCanvasTowxEvtHandler(void *ptr
) {
314 src
= (wxGLCanvas
*) ptr
;
315 dest
= (wxEvtHandler
*) src
;
316 return (void *) dest
;
319 static void *SwigwxGLCanvasTowxObject(void *ptr
) {
322 src
= (wxGLCanvas
*) ptr
;
323 dest
= (wxObject
*) src
;
324 return (void *) dest
;
327 #define new_wxGLCanvas(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7) (new wxGLCanvas(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7))
328 static PyObject
*_wrap_new_wxGLCanvas(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
329 PyObject
* _resultobj
;
330 wxGLCanvas
* _result
;
332 wxWindowID _arg1
= (wxWindowID
) -1;
333 wxPoint
* _arg2
= (wxPoint
*) &wxDefaultPosition
;
334 wxSize
* _arg3
= (wxSize
*) &wxDefaultSize
;
335 long _arg4
= (long ) 0;
336 wxString
* _arg5
= (wxString
*) &wxPyGLCanvasNameStr
;
337 int * _arg6
= (int *) NULL
;
338 wxPalette
* _arg7
= (wxPalette
*) &wxNullPalette
;
339 PyObject
* _argo0
= 0;
341 PyObject
* _obj2
= 0;
343 PyObject
* _obj3
= 0;
344 PyObject
* _obj5
= 0;
346 PyObject
* _obj6
= 0;
347 PyObject
* _argo7
= 0;
348 char *_kwnames
[] = { "parent","id","pos","size","style","name","attribList","palette", NULL
};
352 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O|iOOlOOO:new_wxGLCanvas",_kwnames
,&_argo0
,&_arg1
,&_obj2
,&_obj3
,&_arg4
,&_obj5
,&_obj6
,&_argo7
))
355 if (_argo0
== Py_None
) { _arg0
= NULL
; }
356 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxWindow_p")) {
357 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of new_wxGLCanvas. Expected _wxWindow_p.");
364 if (! wxPoint_helper(_obj2
, &_arg2
))
370 if (! wxSize_helper(_obj3
, &_arg3
))
375 _arg5
= wxString_in_helper(_obj5
);
382 if (PySequence_Check(_obj6
)) {
383 int size
= PyObject_Length(_obj6
);
384 temp1
= new int[size
+1]; // (int*)malloc((size + 1) * sizeof(int));
385 for (i
= 0; i
< size
; i
++) {
386 temp1
[i
] = PyInt_AsLong(PySequence_GetItem(_obj6
, i
));
393 if (SWIG_GetPtrObj(_argo7
,(void **) &_arg7
,"_wxPalette_p")) {
394 PyErr_SetString(PyExc_TypeError
,"Type error in argument 8 of new_wxGLCanvas. Expected _wxPalette_p.");
399 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
400 _result
= (wxGLCanvas
*)new_wxGLCanvas(_arg0
,_arg1
,*_arg2
,*_arg3
,_arg4
,*_arg5
,_arg6
,*_arg7
);
402 wxPyEndAllowThreads(__tstate
);
403 if (PyErr_Occurred()) return NULL
;
405 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxGLCanvas_p");
406 _resultobj
= Py_BuildValue("s",_ptemp
);
409 _resultobj
= Py_None
;
421 #define new_wxGLCanvasWithContext(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8) (new wxGLCanvas(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8))
422 static PyObject
*_wrap_new_wxGLCanvasWithContext(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
423 PyObject
* _resultobj
;
424 wxGLCanvas
* _result
;
426 wxGLContext
* _arg1
= (wxGLContext
*) NULL
;
427 wxWindowID _arg2
= (wxWindowID
) -1;
428 wxPoint
* _arg3
= (wxPoint
*) &wxDefaultPosition
;
429 wxSize
* _arg4
= (wxSize
*) &wxDefaultSize
;
430 long _arg5
= (long ) 0;
431 wxString
* _arg6
= (wxString
*) &wxPyGLCanvasNameStr
;
432 int * _arg7
= (int *) NULL
;
433 wxPalette
* _arg8
= (wxPalette
*) &wxNullPalette
;
434 PyObject
* _argo0
= 0;
435 PyObject
* _argo1
= 0;
437 PyObject
* _obj3
= 0;
439 PyObject
* _obj4
= 0;
440 PyObject
* _obj6
= 0;
442 PyObject
* _obj7
= 0;
443 PyObject
* _argo8
= 0;
444 char *_kwnames
[] = { "parent","shared","id","pos","size","style","name","attribList","palette", NULL
};
448 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O|OiOOlOOO:new_wxGLCanvasWithContext",_kwnames
,&_argo0
,&_argo1
,&_arg2
,&_obj3
,&_obj4
,&_arg5
,&_obj6
,&_obj7
,&_argo8
))
451 if (_argo0
== Py_None
) { _arg0
= NULL
; }
452 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxWindow_p")) {
453 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of new_wxGLCanvasWithContext. Expected _wxWindow_p.");
458 if (_argo1
== Py_None
) { _arg1
= NULL
; }
459 else if (SWIG_GetPtrObj(_argo1
,(void **) &_arg1
,"_wxGLContext_p")) {
460 PyErr_SetString(PyExc_TypeError
,"Type error in argument 2 of new_wxGLCanvasWithContext. Expected _wxGLContext_p.");
467 if (! wxPoint_helper(_obj3
, &_arg3
))
473 if (! wxSize_helper(_obj4
, &_arg4
))
478 _arg6
= wxString_in_helper(_obj6
);
485 if (PySequence_Check(_obj7
)) {
486 int size
= PyObject_Length(_obj7
);
487 temp1
= new int[size
+1]; // (int*)malloc((size + 1) * sizeof(int));
488 for (i
= 0; i
< size
; i
++) {
489 temp1
[i
] = PyInt_AsLong(PySequence_GetItem(_obj7
, i
));
496 if (SWIG_GetPtrObj(_argo8
,(void **) &_arg8
,"_wxPalette_p")) {
497 PyErr_SetString(PyExc_TypeError
,"Type error in argument 9 of new_wxGLCanvasWithContext. Expected _wxPalette_p.");
502 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
503 _result
= (wxGLCanvas
*)new_wxGLCanvasWithContext(_arg0
,_arg1
,_arg2
,*_arg3
,*_arg4
,_arg5
,*_arg6
,_arg7
,*_arg8
);
505 wxPyEndAllowThreads(__tstate
);
506 if (PyErr_Occurred()) return NULL
;
508 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxGLCanvas_p");
509 _resultobj
= Py_BuildValue("s",_ptemp
);
512 _resultobj
= Py_None
;
524 #define wxGLCanvas_SetCurrent(_swigobj) (_swigobj->SetCurrent())
525 static PyObject
*_wrap_wxGLCanvas_SetCurrent(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
526 PyObject
* _resultobj
;
528 PyObject
* _argo0
= 0;
529 char *_kwnames
[] = { "self", NULL
};
532 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxGLCanvas_SetCurrent",_kwnames
,&_argo0
))
535 if (_argo0
== Py_None
) { _arg0
= NULL
; }
536 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxGLCanvas_p")) {
537 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxGLCanvas_SetCurrent. Expected _wxGLCanvas_p.");
542 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
543 wxGLCanvas_SetCurrent(_arg0
);
545 wxPyEndAllowThreads(__tstate
);
546 if (PyErr_Occurred()) return NULL
;
547 } Py_INCREF(Py_None
);
548 _resultobj
= Py_None
;
552 #define wxGLCanvas_SetColour(_swigobj,_swigarg0) (_swigobj->SetColour(_swigarg0))
553 static PyObject
*_wrap_wxGLCanvas_SetColour(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
554 PyObject
* _resultobj
;
557 PyObject
* _argo0
= 0;
558 PyObject
* _obj1
= 0;
559 char *_kwnames
[] = { "self","colour", NULL
};
562 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO:wxGLCanvas_SetColour",_kwnames
,&_argo0
,&_obj1
))
565 if (_argo0
== Py_None
) { _arg0
= NULL
; }
566 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxGLCanvas_p")) {
567 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxGLCanvas_SetColour. Expected _wxGLCanvas_p.");
572 _arg1
= wxString_in_helper(_obj1
);
577 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
578 wxGLCanvas_SetColour(_arg0
,*_arg1
);
580 wxPyEndAllowThreads(__tstate
);
581 if (PyErr_Occurred()) return NULL
;
582 } Py_INCREF(Py_None
);
583 _resultobj
= Py_None
;
591 #define wxGLCanvas_SwapBuffers(_swigobj) (_swigobj->SwapBuffers())
592 static PyObject
*_wrap_wxGLCanvas_SwapBuffers(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
593 PyObject
* _resultobj
;
595 PyObject
* _argo0
= 0;
596 char *_kwnames
[] = { "self", NULL
};
599 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxGLCanvas_SwapBuffers",_kwnames
,&_argo0
))
602 if (_argo0
== Py_None
) { _arg0
= NULL
; }
603 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxGLCanvas_p")) {
604 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxGLCanvas_SwapBuffers. Expected _wxGLCanvas_p.");
609 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
610 wxGLCanvas_SwapBuffers(_arg0
);
612 wxPyEndAllowThreads(__tstate
);
613 if (PyErr_Occurred()) return NULL
;
614 } Py_INCREF(Py_None
);
615 _resultobj
= Py_None
;
619 #define wxGLCanvas_GetContext(_swigobj) (_swigobj->GetContext())
620 static PyObject
*_wrap_wxGLCanvas_GetContext(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
621 PyObject
* _resultobj
;
622 wxGLContext
* _result
;
624 PyObject
* _argo0
= 0;
625 char *_kwnames
[] = { "self", NULL
};
629 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxGLCanvas_GetContext",_kwnames
,&_argo0
))
632 if (_argo0
== Py_None
) { _arg0
= NULL
; }
633 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxGLCanvas_p")) {
634 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxGLCanvas_GetContext. Expected _wxGLCanvas_p.");
639 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
640 _result
= (wxGLContext
*)wxGLCanvas_GetContext(_arg0
);
642 wxPyEndAllowThreads(__tstate
);
643 if (PyErr_Occurred()) return NULL
;
645 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxGLContext_p");
646 _resultobj
= Py_BuildValue("s",_ptemp
);
649 _resultobj
= Py_None
;
654 #define wxGLCanvas_SetupPixelFormat(_swigobj,_swigarg0) (_swigobj->SetupPixelFormat(_swigarg0))
655 static PyObject
*_wrap_wxGLCanvas_SetupPixelFormat(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
656 PyObject
* _resultobj
;
658 int * _arg1
= (int *) NULL
;
659 PyObject
* _argo0
= 0;
661 PyObject
* _obj1
= 0;
662 char *_kwnames
[] = { "self","attribList", NULL
};
665 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O|O:wxGLCanvas_SetupPixelFormat",_kwnames
,&_argo0
,&_obj1
))
668 if (_argo0
== Py_None
) { _arg0
= NULL
; }
669 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxGLCanvas_p")) {
670 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxGLCanvas_SetupPixelFormat. Expected _wxGLCanvas_p.");
677 if (PySequence_Check(_obj1
)) {
678 int size
= PyObject_Length(_obj1
);
679 temp
= new int[size
+1]; // (int*)malloc((size + 1) * sizeof(int));
680 for (i
= 0; i
< size
; i
++) {
681 temp
[i
] = PyInt_AsLong(PySequence_GetItem(_obj1
, i
));
688 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
689 wxGLCanvas_SetupPixelFormat(_arg0
,_arg1
);
691 wxPyEndAllowThreads(__tstate
);
692 if (PyErr_Occurred()) return NULL
;
693 } Py_INCREF(Py_None
);
694 _resultobj
= Py_None
;
701 #define wxGLCanvas_SetupPalette(_swigobj,_swigarg0) (_swigobj->SetupPalette(_swigarg0))
702 static PyObject
*_wrap_wxGLCanvas_SetupPalette(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
703 PyObject
* _resultobj
;
706 PyObject
* _argo0
= 0;
707 PyObject
* _argo1
= 0;
708 char *_kwnames
[] = { "self","palette", NULL
};
711 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO:wxGLCanvas_SetupPalette",_kwnames
,&_argo0
,&_argo1
))
714 if (_argo0
== Py_None
) { _arg0
= NULL
; }
715 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxGLCanvas_p")) {
716 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxGLCanvas_SetupPalette. Expected _wxGLCanvas_p.");
721 if (SWIG_GetPtrObj(_argo1
,(void **) &_arg1
,"_wxPalette_p")) {
722 PyErr_SetString(PyExc_TypeError
,"Type error in argument 2 of wxGLCanvas_SetupPalette. Expected _wxPalette_p.");
727 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
728 wxGLCanvas_SetupPalette(_arg0
,*_arg1
);
730 wxPyEndAllowThreads(__tstate
);
731 if (PyErr_Occurred()) return NULL
;
732 } Py_INCREF(Py_None
);
733 _resultobj
= Py_None
;
737 #define wxGLCanvas_CreateDefaultPalette(_swigobj) (_swigobj->CreateDefaultPalette())
738 static PyObject
*_wrap_wxGLCanvas_CreateDefaultPalette(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
739 PyObject
* _resultobj
;
742 PyObject
* _argo0
= 0;
743 char *_kwnames
[] = { "self", NULL
};
747 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxGLCanvas_CreateDefaultPalette",_kwnames
,&_argo0
))
750 if (_argo0
== Py_None
) { _arg0
= NULL
; }
751 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxGLCanvas_p")) {
752 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxGLCanvas_CreateDefaultPalette. Expected _wxGLCanvas_p.");
757 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
758 _result
= new wxPalette (wxGLCanvas_CreateDefaultPalette(_arg0
));
760 wxPyEndAllowThreads(__tstate
);
761 if (PyErr_Occurred()) return NULL
;
762 } SWIG_MakePtr(_ptemp
, (void *) _result
,"_wxPalette_p");
763 _resultobj
= Py_BuildValue("s",_ptemp
);
767 #define wxGLCanvas_GetPalette(_swigobj) (_swigobj->GetPalette())
768 static PyObject
*_wrap_wxGLCanvas_GetPalette(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
769 PyObject
* _resultobj
;
772 PyObject
* _argo0
= 0;
773 char *_kwnames
[] = { "self", NULL
};
777 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxGLCanvas_GetPalette",_kwnames
,&_argo0
))
780 if (_argo0
== Py_None
) { _arg0
= NULL
; }
781 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxGLCanvas_p")) {
782 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxGLCanvas_GetPalette. Expected _wxGLCanvas_p.");
787 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
788 _result
= (wxPalette
*)wxGLCanvas_GetPalette(_arg0
);
790 wxPyEndAllowThreads(__tstate
);
791 if (PyErr_Occurred()) return NULL
;
793 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxPalette_p");
794 _resultobj
= Py_BuildValue("s",_ptemp
);
797 _resultobj
= Py_None
;
802 static PyMethodDef glcanvascMethods
[] = {
803 { "wxGLCanvas_GetPalette", (PyCFunction
) _wrap_wxGLCanvas_GetPalette
, METH_VARARGS
| METH_KEYWORDS
},
804 { "wxGLCanvas_CreateDefaultPalette", (PyCFunction
) _wrap_wxGLCanvas_CreateDefaultPalette
, METH_VARARGS
| METH_KEYWORDS
},
805 { "wxGLCanvas_SetupPalette", (PyCFunction
) _wrap_wxGLCanvas_SetupPalette
, METH_VARARGS
| METH_KEYWORDS
},
806 { "wxGLCanvas_SetupPixelFormat", (PyCFunction
) _wrap_wxGLCanvas_SetupPixelFormat
, METH_VARARGS
| METH_KEYWORDS
},
807 { "wxGLCanvas_GetContext", (PyCFunction
) _wrap_wxGLCanvas_GetContext
, METH_VARARGS
| METH_KEYWORDS
},
808 { "wxGLCanvas_SwapBuffers", (PyCFunction
) _wrap_wxGLCanvas_SwapBuffers
, METH_VARARGS
| METH_KEYWORDS
},
809 { "wxGLCanvas_SetColour", (PyCFunction
) _wrap_wxGLCanvas_SetColour
, METH_VARARGS
| METH_KEYWORDS
},
810 { "wxGLCanvas_SetCurrent", (PyCFunction
) _wrap_wxGLCanvas_SetCurrent
, METH_VARARGS
| METH_KEYWORDS
},
811 { "new_wxGLCanvasWithContext", (PyCFunction
) _wrap_new_wxGLCanvasWithContext
, METH_VARARGS
| METH_KEYWORDS
},
812 { "new_wxGLCanvas", (PyCFunction
) _wrap_new_wxGLCanvas
, METH_VARARGS
| METH_KEYWORDS
},
813 { "wxGLContext_GetWindow", (PyCFunction
) _wrap_wxGLContext_GetWindow
, METH_VARARGS
| METH_KEYWORDS
},
814 { "wxGLContext_SwapBuffers", (PyCFunction
) _wrap_wxGLContext_SwapBuffers
, METH_VARARGS
| METH_KEYWORDS
},
815 { "wxGLContext_SetColour", (PyCFunction
) _wrap_wxGLContext_SetColour
, METH_VARARGS
| METH_KEYWORDS
},
816 { "wxGLContext_SetCurrent", (PyCFunction
) _wrap_wxGLContext_SetCurrent
, METH_VARARGS
| METH_KEYWORDS
},
817 { "delete_wxGLContext", (PyCFunction
) _wrap_delete_wxGLContext
, METH_VARARGS
| METH_KEYWORDS
},
818 { "new_wxGLContext", (PyCFunction
) _wrap_new_wxGLContext
, METH_VARARGS
| METH_KEYWORDS
},
825 * This table is used by the pointer type-checker
827 static struct { char *n1
; char *n2
; void *(*pcnv
)(void *); } _swig_mapping
[] = {
828 { "_signed_long","_long",0},
829 { "_wxPrintQuality","_wxCoord",0},
830 { "_wxPrintQuality","_int",0},
831 { "_wxPrintQuality","_signed_int",0},
832 { "_wxPrintQuality","_unsigned_int",0},
833 { "_wxPrintQuality","_wxWindowID",0},
834 { "_wxPrintQuality","_uint",0},
835 { "_wxPrintQuality","_EBool",0},
836 { "_wxPrintQuality","_size_t",0},
837 { "_wxPrintQuality","_time_t",0},
838 { "_byte","_unsigned_char",0},
839 { "_long","_unsigned_long",0},
840 { "_long","_signed_long",0},
841 { "_size_t","_wxCoord",0},
842 { "_size_t","_wxPrintQuality",0},
843 { "_size_t","_time_t",0},
844 { "_size_t","_unsigned_int",0},
845 { "_size_t","_int",0},
846 { "_size_t","_wxWindowID",0},
847 { "_size_t","_uint",0},
848 { "_uint","_wxCoord",0},
849 { "_uint","_wxPrintQuality",0},
850 { "_uint","_time_t",0},
851 { "_uint","_size_t",0},
852 { "_uint","_unsigned_int",0},
854 { "_uint","_wxWindowID",0},
855 { "_wxChar","_char",0},
856 { "_char","_wxChar",0},
857 { "_struct_wxNativeFontInfo","_wxNativeFontInfo",0},
858 { "_EBool","_wxCoord",0},
859 { "_EBool","_wxPrintQuality",0},
860 { "_EBool","_signed_int",0},
861 { "_EBool","_int",0},
862 { "_EBool","_wxWindowID",0},
863 { "_unsigned_long","_long",0},
864 { "_wxNativeFontInfo","_struct_wxNativeFontInfo",0},
865 { "_signed_int","_wxCoord",0},
866 { "_signed_int","_wxPrintQuality",0},
867 { "_signed_int","_EBool",0},
868 { "_signed_int","_wxWindowID",0},
869 { "_signed_int","_int",0},
870 { "_WXTYPE","_wxDateTime_t",0},
871 { "_WXTYPE","_short",0},
872 { "_WXTYPE","_signed_short",0},
873 { "_WXTYPE","_unsigned_short",0},
874 { "_unsigned_short","_wxDateTime_t",0},
875 { "_unsigned_short","_WXTYPE",0},
876 { "_unsigned_short","_short",0},
877 { "_wxObject","_wxGLCanvas",SwigwxGLCanvasTowxObject
},
878 { "_wxObject","_wxGLContext",SwigwxGLContextTowxObject
},
879 { "_signed_short","_WXTYPE",0},
880 { "_signed_short","_short",0},
881 { "_unsigned_char","_byte",0},
882 { "_unsigned_int","_wxCoord",0},
883 { "_unsigned_int","_wxPrintQuality",0},
884 { "_unsigned_int","_time_t",0},
885 { "_unsigned_int","_size_t",0},
886 { "_unsigned_int","_uint",0},
887 { "_unsigned_int","_wxWindowID",0},
888 { "_unsigned_int","_int",0},
889 { "_short","_wxDateTime_t",0},
890 { "_short","_WXTYPE",0},
891 { "_short","_unsigned_short",0},
892 { "_short","_signed_short",0},
893 { "_wxWindowID","_wxCoord",0},
894 { "_wxWindowID","_wxPrintQuality",0},
895 { "_wxWindowID","_time_t",0},
896 { "_wxWindowID","_size_t",0},
897 { "_wxWindowID","_EBool",0},
898 { "_wxWindowID","_uint",0},
899 { "_wxWindowID","_int",0},
900 { "_wxWindowID","_signed_int",0},
901 { "_wxWindowID","_unsigned_int",0},
902 { "_int","_wxCoord",0},
903 { "_int","_wxPrintQuality",0},
904 { "_int","_time_t",0},
905 { "_int","_size_t",0},
906 { "_int","_EBool",0},
908 { "_int","_wxWindowID",0},
909 { "_int","_unsigned_int",0},
910 { "_int","_signed_int",0},
911 { "_wxDateTime_t","_unsigned_short",0},
912 { "_wxDateTime_t","_short",0},
913 { "_wxDateTime_t","_WXTYPE",0},
914 { "_time_t","_wxCoord",0},
915 { "_time_t","_wxPrintQuality",0},
916 { "_time_t","_unsigned_int",0},
917 { "_time_t","_int",0},
918 { "_time_t","_wxWindowID",0},
919 { "_time_t","_uint",0},
920 { "_time_t","_size_t",0},
921 { "_wxCoord","_int",0},
922 { "_wxCoord","_signed_int",0},
923 { "_wxCoord","_unsigned_int",0},
924 { "_wxCoord","_wxWindowID",0},
925 { "_wxCoord","_uint",0},
926 { "_wxCoord","_EBool",0},
927 { "_wxCoord","_size_t",0},
928 { "_wxCoord","_time_t",0},
929 { "_wxCoord","_wxPrintQuality",0},
930 { "_wxEvtHandler","_wxGLCanvas",SwigwxGLCanvasTowxEvtHandler
},
931 { "_wxWindow","_wxGLCanvas",SwigwxGLCanvasTowxWindow
},
934 static PyObject
*SWIG_globals
;
938 SWIGEXPORT(void) initglcanvasc() {
940 SWIG_globals
= SWIG_newvarlink();
941 m
= Py_InitModule("glcanvasc", glcanvascMethods
);
942 d
= PyModule_GetDict(m
);
943 PyDict_SetItemString(d
,"WX_GL_RGBA", PyInt_FromLong((long) WX_GL_RGBA
));
944 PyDict_SetItemString(d
,"WX_GL_BUFFER_SIZE", PyInt_FromLong((long) WX_GL_BUFFER_SIZE
));
945 PyDict_SetItemString(d
,"WX_GL_LEVEL", PyInt_FromLong((long) WX_GL_LEVEL
));
946 PyDict_SetItemString(d
,"WX_GL_DOUBLEBUFFER", PyInt_FromLong((long) WX_GL_DOUBLEBUFFER
));
947 PyDict_SetItemString(d
,"WX_GL_STEREO", PyInt_FromLong((long) WX_GL_STEREO
));
948 PyDict_SetItemString(d
,"WX_GL_AUX_BUFFERS", PyInt_FromLong((long) WX_GL_AUX_BUFFERS
));
949 PyDict_SetItemString(d
,"WX_GL_MIN_RED", PyInt_FromLong((long) WX_GL_MIN_RED
));
950 PyDict_SetItemString(d
,"WX_GL_MIN_GREEN", PyInt_FromLong((long) WX_GL_MIN_GREEN
));
951 PyDict_SetItemString(d
,"WX_GL_MIN_BLUE", PyInt_FromLong((long) WX_GL_MIN_BLUE
));
952 PyDict_SetItemString(d
,"WX_GL_MIN_ALPHA", PyInt_FromLong((long) WX_GL_MIN_ALPHA
));
953 PyDict_SetItemString(d
,"WX_GL_DEPTH_SIZE", PyInt_FromLong((long) WX_GL_DEPTH_SIZE
));
954 PyDict_SetItemString(d
,"WX_GL_STENCIL_SIZE", PyInt_FromLong((long) WX_GL_STENCIL_SIZE
));
955 PyDict_SetItemString(d
,"WX_GL_MIN_ACCUM_RED", PyInt_FromLong((long) WX_GL_MIN_ACCUM_RED
));
956 PyDict_SetItemString(d
,"WX_GL_MIN_ACCUM_GREEN", PyInt_FromLong((long) WX_GL_MIN_ACCUM_GREEN
));
957 PyDict_SetItemString(d
,"WX_GL_MIN_ACCUM_BLUE", PyInt_FromLong((long) WX_GL_MIN_ACCUM_BLUE
));
958 PyDict_SetItemString(d
,"WX_GL_MIN_ACCUM_ALPHA", PyInt_FromLong((long) WX_GL_MIN_ACCUM_ALPHA
));
961 wxClassInfo::CleanUpClasses();
962 wxClassInfo::InitializeClasses();
966 for (i
= 0; _swig_mapping
[i
].n1
; i
++)
967 SWIG_RegisterMapping(_swig_mapping
[i
].n1
,_swig_mapping
[i
].n2
,_swig_mapping
[i
].pcnv
);