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 */
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"
59 #include "myglcanvas.h"
62 static PyObject
* t_output_helper(PyObject
* target
, PyObject
* o
) {
68 } else if (target
== Py_None
) {
72 if (!PyTuple_Check(target
)) {
74 target
= PyTuple_New(1);
75 PyTuple_SetItem(target
, 0, o2
);
78 PyTuple_SetItem(o3
, 0, o
);
81 target
= PySequence_Concat(o2
, o3
);
88 #if PYTHON_API_VERSION >= 1009
89 static char* wxStringErrorMsg
= "String or Unicode type required";
91 static char* wxStringErrorMsg
= "String type required";
96 static void *SwigwxGLContextTowxObject(void *ptr
) {
99 src
= (wxGLContext
*) ptr
;
100 dest
= (wxObject
*) src
;
101 return (void *) dest
;
104 #define new_wxGLContext(_swigarg0,_swigarg1,_swigarg2) (new wxGLContext(_swigarg0,_swigarg1,_swigarg2))
105 static PyObject
*_wrap_new_wxGLContext(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
106 PyObject
* _resultobj
;
107 wxGLContext
* _result
;
110 wxPalette
* _arg2
= (wxPalette
*) &wxNullPalette
;
112 PyObject
* _argo1
= 0;
113 PyObject
* _argo2
= 0;
114 char *_kwnames
[] = { "isRGB","win","palette", NULL
};
118 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"iO|O:new_wxGLContext",_kwnames
,&tempbool0
,&_argo1
,&_argo2
))
120 _arg0
= (bool ) tempbool0
;
122 if (_argo1
== Py_None
) { _arg1
= NULL
; }
123 else if (SWIG_GetPtrObj(_argo1
,(void **) &_arg1
,"_wxGLCanvas_p")) {
124 PyErr_SetString(PyExc_TypeError
,"Type error in argument 2 of new_wxGLContext. Expected _wxGLCanvas_p.");
129 if (_argo2
== Py_None
) { _arg2
= NULL
; }
130 else if (SWIG_GetPtrObj(_argo2
,(void **) &_arg2
,"_wxPalette_p")) {
131 PyErr_SetString(PyExc_TypeError
,"Type error in argument 3 of new_wxGLContext. Expected _wxPalette_p.");
136 wxPy_BEGIN_ALLOW_THREADS
;
137 _result
= (wxGLContext
*)new_wxGLContext(_arg0
,_arg1
,*_arg2
);
139 wxPy_END_ALLOW_THREADS
;
141 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxGLContext_p");
142 _resultobj
= Py_BuildValue("s",_ptemp
);
145 _resultobj
= Py_None
;
150 #define delete_wxGLContext(_swigobj) (delete _swigobj)
151 static PyObject
*_wrap_delete_wxGLContext(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
152 PyObject
* _resultobj
;
154 PyObject
* _argo0
= 0;
155 char *_kwnames
[] = { "self", NULL
};
158 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:delete_wxGLContext",_kwnames
,&_argo0
))
161 if (_argo0
== Py_None
) { _arg0
= NULL
; }
162 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxGLContext_p")) {
163 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of delete_wxGLContext. Expected _wxGLContext_p.");
168 wxPy_BEGIN_ALLOW_THREADS
;
169 delete_wxGLContext(_arg0
);
171 wxPy_END_ALLOW_THREADS
;
172 } Py_INCREF(Py_None
);
173 _resultobj
= Py_None
;
177 #define wxGLContext_SetCurrent(_swigobj) (_swigobj->SetCurrent())
178 static PyObject
*_wrap_wxGLContext_SetCurrent(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
179 PyObject
* _resultobj
;
181 PyObject
* _argo0
= 0;
182 char *_kwnames
[] = { "self", NULL
};
185 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxGLContext_SetCurrent",_kwnames
,&_argo0
))
188 if (_argo0
== Py_None
) { _arg0
= NULL
; }
189 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxGLContext_p")) {
190 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxGLContext_SetCurrent. Expected _wxGLContext_p.");
195 wxPy_BEGIN_ALLOW_THREADS
;
196 wxGLContext_SetCurrent(_arg0
);
198 wxPy_END_ALLOW_THREADS
;
199 } Py_INCREF(Py_None
);
200 _resultobj
= Py_None
;
204 #define wxGLContext_SetColour(_swigobj,_swigarg0) (_swigobj->SetColour(_swigarg0))
205 static PyObject
*_wrap_wxGLContext_SetColour(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
206 PyObject
* _resultobj
;
209 PyObject
* _argo0
= 0;
210 char *_kwnames
[] = { "self","colour", NULL
};
213 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Os:wxGLContext_SetColour",_kwnames
,&_argo0
,&_arg1
))
216 if (_argo0
== Py_None
) { _arg0
= NULL
; }
217 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxGLContext_p")) {
218 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxGLContext_SetColour. Expected _wxGLContext_p.");
223 wxPy_BEGIN_ALLOW_THREADS
;
224 wxGLContext_SetColour(_arg0
,_arg1
);
226 wxPy_END_ALLOW_THREADS
;
227 } Py_INCREF(Py_None
);
228 _resultobj
= Py_None
;
232 #define wxGLContext_SwapBuffers(_swigobj) (_swigobj->SwapBuffers())
233 static PyObject
*_wrap_wxGLContext_SwapBuffers(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
234 PyObject
* _resultobj
;
236 PyObject
* _argo0
= 0;
237 char *_kwnames
[] = { "self", NULL
};
240 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxGLContext_SwapBuffers",_kwnames
,&_argo0
))
243 if (_argo0
== Py_None
) { _arg0
= NULL
; }
244 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxGLContext_p")) {
245 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxGLContext_SwapBuffers. Expected _wxGLContext_p.");
250 wxPy_BEGIN_ALLOW_THREADS
;
251 wxGLContext_SwapBuffers(_arg0
);
253 wxPy_END_ALLOW_THREADS
;
254 } Py_INCREF(Py_None
);
255 _resultobj
= Py_None
;
259 #define wxGLContext_GetWindow(_swigobj) (_swigobj->GetWindow())
260 static PyObject
*_wrap_wxGLContext_GetWindow(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
261 PyObject
* _resultobj
;
264 PyObject
* _argo0
= 0;
265 char *_kwnames
[] = { "self", NULL
};
268 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxGLContext_GetWindow",_kwnames
,&_argo0
))
271 if (_argo0
== Py_None
) { _arg0
= NULL
; }
272 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxGLContext_p")) {
273 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxGLContext_GetWindow. Expected _wxGLContext_p.");
278 wxPy_BEGIN_ALLOW_THREADS
;
279 _result
= (wxWindow
*)wxGLContext_GetWindow(_arg0
);
281 wxPy_END_ALLOW_THREADS
;
282 }{ _resultobj
= wxPyMake_wxObject(_result
); }
286 static void *SwigwxGLCanvasTowxScrolledWindow(void *ptr
) {
288 wxScrolledWindow
*dest
;
289 src
= (wxGLCanvas
*) ptr
;
290 dest
= (wxScrolledWindow
*) src
;
291 return (void *) dest
;
294 static void *SwigwxGLCanvasTowxPanel(void *ptr
) {
297 src
= (wxGLCanvas
*) ptr
;
298 dest
= (wxPanel
*) src
;
299 return (void *) dest
;
302 static void *SwigwxGLCanvasTowxWindow(void *ptr
) {
305 src
= (wxGLCanvas
*) ptr
;
306 dest
= (wxWindow
*) src
;
307 return (void *) dest
;
310 static void *SwigwxGLCanvasTowxEvtHandler(void *ptr
) {
313 src
= (wxGLCanvas
*) ptr
;
314 dest
= (wxEvtHandler
*) src
;
315 return (void *) dest
;
318 static void *SwigwxGLCanvasTowxObject(void *ptr
) {
321 src
= (wxGLCanvas
*) ptr
;
322 dest
= (wxObject
*) src
;
323 return (void *) dest
;
326 #define new_wxGLCanvas(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7) (new wxGLCanvas(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7))
327 static PyObject
*_wrap_new_wxGLCanvas(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
328 PyObject
* _resultobj
;
329 wxGLCanvas
* _result
;
331 wxWindowID _arg1
= (wxWindowID
) -1;
332 wxPoint
* _arg2
= (wxPoint
*) &wxDefaultPosition
;
333 wxSize
* _arg3
= (wxSize
*) &wxDefaultSize
;
334 long _arg4
= (long ) 0;
335 char * _arg5
= (char *) "GLCanvas";
336 int * _arg6
= (int *) NULL
;
337 wxPalette
* _arg7
= (wxPalette
*) &wxNullPalette
;
338 PyObject
* _argo0
= 0;
340 PyObject
* _obj2
= 0;
342 PyObject
* _obj3
= 0;
344 PyObject
* _obj6
= 0;
345 PyObject
* _argo7
= 0;
346 char *_kwnames
[] = { "parent","id","pos","size","style","name","attribList","palette", NULL
};
350 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O|iOOlsOO:new_wxGLCanvas",_kwnames
,&_argo0
,&_arg1
,&_obj2
,&_obj3
,&_arg4
,&_arg5
,&_obj6
,&_argo7
))
353 if (_argo0
== Py_None
) { _arg0
= NULL
; }
354 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxWindow_p")) {
355 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of new_wxGLCanvas. Expected _wxWindow_p.");
362 if (! wxPoint_helper(_obj2
, &_arg2
))
368 if (! wxSize_helper(_obj3
, &_arg3
))
374 if (PySequence_Check(_obj6
)) {
375 int size
= PyObject_Length(_obj6
);
376 temp1
= new int[size
+1]; // (int*)malloc((size + 1) * sizeof(int));
377 for (i
= 0; i
< size
; i
++) {
378 temp1
[i
] = PyInt_AsLong(PySequence_GetItem(_obj6
, i
));
385 if (_argo7
== Py_None
) { _arg7
= NULL
; }
386 else if (SWIG_GetPtrObj(_argo7
,(void **) &_arg7
,"_wxPalette_p")) {
387 PyErr_SetString(PyExc_TypeError
,"Type error in argument 8 of new_wxGLCanvas. Expected _wxPalette_p.");
392 wxPy_BEGIN_ALLOW_THREADS
;
393 _result
= (wxGLCanvas
*)new_wxGLCanvas(_arg0
,_arg1
,*_arg2
,*_arg3
,_arg4
,_arg5
,_arg6
,*_arg7
);
395 wxPy_END_ALLOW_THREADS
;
397 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxGLCanvas_p");
398 _resultobj
= Py_BuildValue("s",_ptemp
);
401 _resultobj
= Py_None
;
409 #define new_wxGLCanvasWithContext(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8) (new wxGLCanvas(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8))
410 static PyObject
*_wrap_new_wxGLCanvasWithContext(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
411 PyObject
* _resultobj
;
412 wxGLCanvas
* _result
;
414 wxGLContext
* _arg1
= (wxGLContext
*) NULL
;
415 wxWindowID _arg2
= (wxWindowID
) -1;
416 wxPoint
* _arg3
= (wxPoint
*) &wxDefaultPosition
;
417 wxSize
* _arg4
= (wxSize
*) &wxDefaultSize
;
418 long _arg5
= (long ) 0;
419 char * _arg6
= (char *) "GLCanvas";
420 int * _arg7
= (int *) NULL
;
421 wxPalette
* _arg8
= (wxPalette
*) &wxNullPalette
;
422 PyObject
* _argo0
= 0;
423 PyObject
* _argo1
= 0;
425 PyObject
* _obj3
= 0;
427 PyObject
* _obj4
= 0;
429 PyObject
* _obj7
= 0;
430 PyObject
* _argo8
= 0;
431 char *_kwnames
[] = { "parent","shared","id","pos","size","style","name","attribList","palette", NULL
};
435 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O|OiOOlsOO:new_wxGLCanvasWithContext",_kwnames
,&_argo0
,&_argo1
,&_arg2
,&_obj3
,&_obj4
,&_arg5
,&_arg6
,&_obj7
,&_argo8
))
438 if (_argo0
== Py_None
) { _arg0
= NULL
; }
439 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxWindow_p")) {
440 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of new_wxGLCanvasWithContext. Expected _wxWindow_p.");
445 if (_argo1
== Py_None
) { _arg1
= NULL
; }
446 else if (SWIG_GetPtrObj(_argo1
,(void **) &_arg1
,"_wxGLContext_p")) {
447 PyErr_SetString(PyExc_TypeError
,"Type error in argument 2 of new_wxGLCanvasWithContext. Expected _wxGLContext_p.");
454 if (! wxPoint_helper(_obj3
, &_arg3
))
460 if (! wxSize_helper(_obj4
, &_arg4
))
466 if (PySequence_Check(_obj7
)) {
467 int size
= PyObject_Length(_obj7
);
468 temp1
= new int[size
+1]; // (int*)malloc((size + 1) * sizeof(int));
469 for (i
= 0; i
< size
; i
++) {
470 temp1
[i
] = PyInt_AsLong(PySequence_GetItem(_obj7
, i
));
477 if (_argo8
== Py_None
) { _arg8
= NULL
; }
478 else if (SWIG_GetPtrObj(_argo8
,(void **) &_arg8
,"_wxPalette_p")) {
479 PyErr_SetString(PyExc_TypeError
,"Type error in argument 9 of new_wxGLCanvasWithContext. Expected _wxPalette_p.");
484 wxPy_BEGIN_ALLOW_THREADS
;
485 _result
= (wxGLCanvas
*)new_wxGLCanvasWithContext(_arg0
,_arg1
,_arg2
,*_arg3
,*_arg4
,_arg5
,_arg6
,_arg7
,*_arg8
);
487 wxPy_END_ALLOW_THREADS
;
489 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxGLCanvas_p");
490 _resultobj
= Py_BuildValue("s",_ptemp
);
493 _resultobj
= Py_None
;
501 #define wxGLCanvas_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5))
502 static PyObject
*_wrap_wxGLCanvas_Create(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
503 PyObject
* _resultobj
;
512 PyObject
* _argo0
= 0;
513 PyObject
* _argo1
= 0;
515 PyObject
* _obj3
= 0;
517 PyObject
* _obj4
= 0;
518 PyObject
* _obj6
= 0;
519 char *_kwnames
[] = { "self","parent","id","pos","size","style","name", NULL
};
522 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OOiOOlO:wxGLCanvas_Create",_kwnames
,&_argo0
,&_argo1
,&_arg2
,&_obj3
,&_obj4
,&_arg5
,&_obj6
))
525 if (_argo0
== Py_None
) { _arg0
= NULL
; }
526 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxGLCanvas_p")) {
527 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxGLCanvas_Create. Expected _wxGLCanvas_p.");
532 if (_argo1
== Py_None
) { _arg1
= NULL
; }
533 else if (SWIG_GetPtrObj(_argo1
,(void **) &_arg1
,"_wxWindow_p")) {
534 PyErr_SetString(PyExc_TypeError
,"Type error in argument 2 of wxGLCanvas_Create. Expected _wxWindow_p.");
540 if (! wxPoint_helper(_obj3
, &_arg3
))
545 if (! wxSize_helper(_obj4
, &_arg4
))
549 #if PYTHON_API_VERSION >= 1009
550 char* tmpPtr
; int tmpSize
;
551 if (!PyString_Check(_obj6
) && !PyUnicode_Check(_obj6
)) {
552 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
555 if (PyString_AsStringAndSize(_obj6
, &tmpPtr
, &tmpSize
) == -1)
557 _arg6
= new wxString(tmpPtr
, tmpSize
);
559 if (!PyString_Check(_obj6
)) {
560 PyErr_SetString(PyExc_TypeError
, wxStringErrorMsg
);
563 _arg6
= new wxString(PyString_AS_STRING(_obj6
), PyString_GET_SIZE(_obj6
));
567 wxPy_BEGIN_ALLOW_THREADS
;
568 _result
= (bool )wxGLCanvas_Create(_arg0
,_arg1
,_arg2
,*_arg3
,*_arg4
,_arg5
,*_arg6
);
570 wxPy_END_ALLOW_THREADS
;
571 } _resultobj
= Py_BuildValue("i",_result
);
579 #define wxGLCanvas_SetCurrent(_swigobj) (_swigobj->SetCurrent())
580 static PyObject
*_wrap_wxGLCanvas_SetCurrent(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
581 PyObject
* _resultobj
;
583 PyObject
* _argo0
= 0;
584 char *_kwnames
[] = { "self", NULL
};
587 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxGLCanvas_SetCurrent",_kwnames
,&_argo0
))
590 if (_argo0
== Py_None
) { _arg0
= NULL
; }
591 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxGLCanvas_p")) {
592 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxGLCanvas_SetCurrent. Expected _wxGLCanvas_p.");
597 wxPy_BEGIN_ALLOW_THREADS
;
598 wxGLCanvas_SetCurrent(_arg0
);
600 wxPy_END_ALLOW_THREADS
;
601 } Py_INCREF(Py_None
);
602 _resultobj
= Py_None
;
606 #define wxGLCanvas_SetColour(_swigobj,_swigarg0) (_swigobj->SetColour(_swigarg0))
607 static PyObject
*_wrap_wxGLCanvas_SetColour(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
608 PyObject
* _resultobj
;
611 PyObject
* _argo0
= 0;
612 char *_kwnames
[] = { "self","colour", NULL
};
615 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"Os:wxGLCanvas_SetColour",_kwnames
,&_argo0
,&_arg1
))
618 if (_argo0
== Py_None
) { _arg0
= NULL
; }
619 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxGLCanvas_p")) {
620 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxGLCanvas_SetColour. Expected _wxGLCanvas_p.");
625 wxPy_BEGIN_ALLOW_THREADS
;
626 wxGLCanvas_SetColour(_arg0
,_arg1
);
628 wxPy_END_ALLOW_THREADS
;
629 } Py_INCREF(Py_None
);
630 _resultobj
= Py_None
;
634 #define wxGLCanvas_SwapBuffers(_swigobj) (_swigobj->SwapBuffers())
635 static PyObject
*_wrap_wxGLCanvas_SwapBuffers(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
636 PyObject
* _resultobj
;
638 PyObject
* _argo0
= 0;
639 char *_kwnames
[] = { "self", NULL
};
642 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxGLCanvas_SwapBuffers",_kwnames
,&_argo0
))
645 if (_argo0
== Py_None
) { _arg0
= NULL
; }
646 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxGLCanvas_p")) {
647 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxGLCanvas_SwapBuffers. Expected _wxGLCanvas_p.");
652 wxPy_BEGIN_ALLOW_THREADS
;
653 wxGLCanvas_SwapBuffers(_arg0
);
655 wxPy_END_ALLOW_THREADS
;
656 } Py_INCREF(Py_None
);
657 _resultobj
= Py_None
;
661 #define wxGLCanvas_GetContext(_swigobj) (_swigobj->GetContext())
662 static PyObject
*_wrap_wxGLCanvas_GetContext(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
663 PyObject
* _resultobj
;
664 wxGLContext
* _result
;
666 PyObject
* _argo0
= 0;
667 char *_kwnames
[] = { "self", NULL
};
671 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxGLCanvas_GetContext",_kwnames
,&_argo0
))
674 if (_argo0
== Py_None
) { _arg0
= NULL
; }
675 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxGLCanvas_p")) {
676 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxGLCanvas_GetContext. Expected _wxGLCanvas_p.");
681 wxPy_BEGIN_ALLOW_THREADS
;
682 _result
= (wxGLContext
*)wxGLCanvas_GetContext(_arg0
);
684 wxPy_END_ALLOW_THREADS
;
686 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxGLContext_p");
687 _resultobj
= Py_BuildValue("s",_ptemp
);
690 _resultobj
= Py_None
;
695 #define wxGLCanvas_SetupPixelFormat(_swigobj,_swigarg0) (_swigobj->SetupPixelFormat(_swigarg0))
696 static PyObject
*_wrap_wxGLCanvas_SetupPixelFormat(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
697 PyObject
* _resultobj
;
699 int * _arg1
= (int *) NULL
;
700 PyObject
* _argo0
= 0;
702 PyObject
* _obj1
= 0;
703 char *_kwnames
[] = { "self","attribList", NULL
};
706 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O|O:wxGLCanvas_SetupPixelFormat",_kwnames
,&_argo0
,&_obj1
))
709 if (_argo0
== Py_None
) { _arg0
= NULL
; }
710 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxGLCanvas_p")) {
711 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxGLCanvas_SetupPixelFormat. Expected _wxGLCanvas_p.");
718 if (PySequence_Check(_obj1
)) {
719 int size
= PyObject_Length(_obj1
);
720 temp
= new int[size
+1]; // (int*)malloc((size + 1) * sizeof(int));
721 for (i
= 0; i
< size
; i
++) {
722 temp
[i
] = PyInt_AsLong(PySequence_GetItem(_obj1
, i
));
729 wxPy_BEGIN_ALLOW_THREADS
;
730 wxGLCanvas_SetupPixelFormat(_arg0
,_arg1
);
732 wxPy_END_ALLOW_THREADS
;
733 } Py_INCREF(Py_None
);
734 _resultobj
= Py_None
;
741 #define wxGLCanvas_SetupPalette(_swigobj,_swigarg0) (_swigobj->SetupPalette(_swigarg0))
742 static PyObject
*_wrap_wxGLCanvas_SetupPalette(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
743 PyObject
* _resultobj
;
746 PyObject
* _argo0
= 0;
747 PyObject
* _argo1
= 0;
748 char *_kwnames
[] = { "self","palette", NULL
};
751 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO:wxGLCanvas_SetupPalette",_kwnames
,&_argo0
,&_argo1
))
754 if (_argo0
== Py_None
) { _arg0
= NULL
; }
755 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxGLCanvas_p")) {
756 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxGLCanvas_SetupPalette. Expected _wxGLCanvas_p.");
761 if (_argo1
== Py_None
) { _arg1
= NULL
; }
762 else if (SWIG_GetPtrObj(_argo1
,(void **) &_arg1
,"_wxPalette_p")) {
763 PyErr_SetString(PyExc_TypeError
,"Type error in argument 2 of wxGLCanvas_SetupPalette. Expected _wxPalette_p.");
768 wxPy_BEGIN_ALLOW_THREADS
;
769 wxGLCanvas_SetupPalette(_arg0
,*_arg1
);
771 wxPy_END_ALLOW_THREADS
;
772 } Py_INCREF(Py_None
);
773 _resultobj
= Py_None
;
777 #define wxGLCanvas_CreateDefaultPalette(_swigobj) (_swigobj->CreateDefaultPalette())
778 static PyObject
*_wrap_wxGLCanvas_CreateDefaultPalette(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
779 PyObject
* _resultobj
;
782 PyObject
* _argo0
= 0;
783 char *_kwnames
[] = { "self", NULL
};
787 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxGLCanvas_CreateDefaultPalette",_kwnames
,&_argo0
))
790 if (_argo0
== Py_None
) { _arg0
= NULL
; }
791 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxGLCanvas_p")) {
792 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxGLCanvas_CreateDefaultPalette. Expected _wxGLCanvas_p.");
797 wxPy_BEGIN_ALLOW_THREADS
;
798 _result
= new wxPalette (wxGLCanvas_CreateDefaultPalette(_arg0
));
800 wxPy_END_ALLOW_THREADS
;
801 } SWIG_MakePtr(_ptemp
, (void *) _result
,"_wxPalette_p");
802 _resultobj
= Py_BuildValue("s",_ptemp
);
806 #define wxGLCanvas_GetPalette(_swigobj) (_swigobj->GetPalette())
807 static PyObject
*_wrap_wxGLCanvas_GetPalette(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
808 PyObject
* _resultobj
;
811 PyObject
* _argo0
= 0;
812 char *_kwnames
[] = { "self", NULL
};
816 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxGLCanvas_GetPalette",_kwnames
,&_argo0
))
819 if (_argo0
== Py_None
) { _arg0
= NULL
; }
820 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxGLCanvas_p")) {
821 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxGLCanvas_GetPalette. Expected _wxGLCanvas_p.");
826 wxPy_BEGIN_ALLOW_THREADS
;
827 _result
= (wxPalette
*)wxGLCanvas_GetPalette(_arg0
);
829 wxPy_END_ALLOW_THREADS
;
831 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxPalette_p");
832 _resultobj
= Py_BuildValue("s",_ptemp
);
835 _resultobj
= Py_None
;
840 static PyMethodDef glcanvascMethods
[] = {
841 { "wxGLCanvas_GetPalette", (PyCFunction
) _wrap_wxGLCanvas_GetPalette
, METH_VARARGS
| METH_KEYWORDS
},
842 { "wxGLCanvas_CreateDefaultPalette", (PyCFunction
) _wrap_wxGLCanvas_CreateDefaultPalette
, METH_VARARGS
| METH_KEYWORDS
},
843 { "wxGLCanvas_SetupPalette", (PyCFunction
) _wrap_wxGLCanvas_SetupPalette
, METH_VARARGS
| METH_KEYWORDS
},
844 { "wxGLCanvas_SetupPixelFormat", (PyCFunction
) _wrap_wxGLCanvas_SetupPixelFormat
, METH_VARARGS
| METH_KEYWORDS
},
845 { "wxGLCanvas_GetContext", (PyCFunction
) _wrap_wxGLCanvas_GetContext
, METH_VARARGS
| METH_KEYWORDS
},
846 { "wxGLCanvas_SwapBuffers", (PyCFunction
) _wrap_wxGLCanvas_SwapBuffers
, METH_VARARGS
| METH_KEYWORDS
},
847 { "wxGLCanvas_SetColour", (PyCFunction
) _wrap_wxGLCanvas_SetColour
, METH_VARARGS
| METH_KEYWORDS
},
848 { "wxGLCanvas_SetCurrent", (PyCFunction
) _wrap_wxGLCanvas_SetCurrent
, METH_VARARGS
| METH_KEYWORDS
},
849 { "wxGLCanvas_Create", (PyCFunction
) _wrap_wxGLCanvas_Create
, METH_VARARGS
| METH_KEYWORDS
},
850 { "new_wxGLCanvasWithContext", (PyCFunction
) _wrap_new_wxGLCanvasWithContext
, METH_VARARGS
| METH_KEYWORDS
},
851 { "new_wxGLCanvas", (PyCFunction
) _wrap_new_wxGLCanvas
, METH_VARARGS
| METH_KEYWORDS
},
852 { "wxGLContext_GetWindow", (PyCFunction
) _wrap_wxGLContext_GetWindow
, METH_VARARGS
| METH_KEYWORDS
},
853 { "wxGLContext_SwapBuffers", (PyCFunction
) _wrap_wxGLContext_SwapBuffers
, METH_VARARGS
| METH_KEYWORDS
},
854 { "wxGLContext_SetColour", (PyCFunction
) _wrap_wxGLContext_SetColour
, METH_VARARGS
| METH_KEYWORDS
},
855 { "wxGLContext_SetCurrent", (PyCFunction
) _wrap_wxGLContext_SetCurrent
, METH_VARARGS
| METH_KEYWORDS
},
856 { "delete_wxGLContext", (PyCFunction
) _wrap_delete_wxGLContext
, METH_VARARGS
| METH_KEYWORDS
},
857 { "new_wxGLContext", (PyCFunction
) _wrap_new_wxGLContext
, METH_VARARGS
| METH_KEYWORDS
},
864 * This table is used by the pointer type-checker
866 static struct { char *n1
; char *n2
; void *(*pcnv
)(void *); } _swig_mapping
[] = {
867 { "_signed_long","_long",0},
868 { "_wxPrintQuality","_wxCoord",0},
869 { "_wxPrintQuality","_int",0},
870 { "_wxPrintQuality","_signed_int",0},
871 { "_wxPrintQuality","_unsigned_int",0},
872 { "_wxPrintQuality","_wxWindowID",0},
873 { "_wxPrintQuality","_uint",0},
874 { "_wxPrintQuality","_EBool",0},
875 { "_wxPrintQuality","_size_t",0},
876 { "_wxPrintQuality","_time_t",0},
877 { "_byte","_unsigned_char",0},
878 { "_long","_unsigned_long",0},
879 { "_long","_signed_long",0},
880 { "_size_t","_wxCoord",0},
881 { "_size_t","_wxPrintQuality",0},
882 { "_size_t","_time_t",0},
883 { "_size_t","_unsigned_int",0},
884 { "_size_t","_int",0},
885 { "_size_t","_wxWindowID",0},
886 { "_size_t","_uint",0},
887 { "_wxPanel","_wxGLCanvas",SwigwxGLCanvasTowxPanel
},
888 { "_uint","_wxCoord",0},
889 { "_uint","_wxPrintQuality",0},
890 { "_uint","_time_t",0},
891 { "_uint","_size_t",0},
892 { "_uint","_unsigned_int",0},
894 { "_uint","_wxWindowID",0},
895 { "_wxChar","_char",0},
896 { "_char","_wxChar",0},
897 { "_struct_wxNativeFontInfo","_wxNativeFontInfo",0},
898 { "_EBool","_wxCoord",0},
899 { "_EBool","_wxPrintQuality",0},
900 { "_EBool","_signed_int",0},
901 { "_EBool","_int",0},
902 { "_EBool","_wxWindowID",0},
903 { "_unsigned_long","_long",0},
904 { "_wxNativeFontInfo","_struct_wxNativeFontInfo",0},
905 { "_signed_int","_wxCoord",0},
906 { "_signed_int","_wxPrintQuality",0},
907 { "_signed_int","_EBool",0},
908 { "_signed_int","_wxWindowID",0},
909 { "_signed_int","_int",0},
910 { "_WXTYPE","_wxDateTime_t",0},
911 { "_WXTYPE","_short",0},
912 { "_WXTYPE","_signed_short",0},
913 { "_WXTYPE","_unsigned_short",0},
914 { "_unsigned_short","_wxDateTime_t",0},
915 { "_unsigned_short","_WXTYPE",0},
916 { "_unsigned_short","_short",0},
917 { "_wxObject","_wxGLCanvas",SwigwxGLCanvasTowxObject
},
918 { "_wxObject","_wxGLContext",SwigwxGLContextTowxObject
},
919 { "_signed_short","_WXTYPE",0},
920 { "_signed_short","_short",0},
921 { "_wxScrolledWindow","_wxGLCanvas",SwigwxGLCanvasTowxScrolledWindow
},
922 { "_unsigned_char","_byte",0},
923 { "_unsigned_int","_wxCoord",0},
924 { "_unsigned_int","_wxPrintQuality",0},
925 { "_unsigned_int","_time_t",0},
926 { "_unsigned_int","_size_t",0},
927 { "_unsigned_int","_uint",0},
928 { "_unsigned_int","_wxWindowID",0},
929 { "_unsigned_int","_int",0},
930 { "_short","_wxDateTime_t",0},
931 { "_short","_WXTYPE",0},
932 { "_short","_unsigned_short",0},
933 { "_short","_signed_short",0},
934 { "_wxWindowID","_wxCoord",0},
935 { "_wxWindowID","_wxPrintQuality",0},
936 { "_wxWindowID","_time_t",0},
937 { "_wxWindowID","_size_t",0},
938 { "_wxWindowID","_EBool",0},
939 { "_wxWindowID","_uint",0},
940 { "_wxWindowID","_int",0},
941 { "_wxWindowID","_signed_int",0},
942 { "_wxWindowID","_unsigned_int",0},
943 { "_int","_wxCoord",0},
944 { "_int","_wxPrintQuality",0},
945 { "_int","_time_t",0},
946 { "_int","_size_t",0},
947 { "_int","_EBool",0},
949 { "_int","_wxWindowID",0},
950 { "_int","_unsigned_int",0},
951 { "_int","_signed_int",0},
952 { "_wxDateTime_t","_unsigned_short",0},
953 { "_wxDateTime_t","_short",0},
954 { "_wxDateTime_t","_WXTYPE",0},
955 { "_time_t","_wxCoord",0},
956 { "_time_t","_wxPrintQuality",0},
957 { "_time_t","_unsigned_int",0},
958 { "_time_t","_int",0},
959 { "_time_t","_wxWindowID",0},
960 { "_time_t","_uint",0},
961 { "_time_t","_size_t",0},
962 { "_wxCoord","_int",0},
963 { "_wxCoord","_signed_int",0},
964 { "_wxCoord","_unsigned_int",0},
965 { "_wxCoord","_wxWindowID",0},
966 { "_wxCoord","_uint",0},
967 { "_wxCoord","_EBool",0},
968 { "_wxCoord","_size_t",0},
969 { "_wxCoord","_time_t",0},
970 { "_wxCoord","_wxPrintQuality",0},
971 { "_wxEvtHandler","_wxGLCanvas",SwigwxGLCanvasTowxEvtHandler
},
972 { "_wxWindow","_wxGLCanvas",SwigwxGLCanvasTowxWindow
},
975 static PyObject
*SWIG_globals
;
979 SWIGEXPORT(void) initglcanvasc() {
981 SWIG_globals
= SWIG_newvarlink();
982 m
= Py_InitModule("glcanvasc", glcanvascMethods
);
983 d
= PyModule_GetDict(m
);
986 wxClassInfo::CleanUpClasses();
987 wxClassInfo::InitializeClasses();
991 for (i
= 0; _swig_mapping
[i
].n1
; i
++)
992 SWIG_RegisterMapping(_swig_mapping
[i
].n1
,_swig_mapping
[i
].n2
,_swig_mapping
[i
].pcnv
);