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 */
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"
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 // Put some wx default wxChar* values into wxStrings.
94 static const wxString
wxPyGLCanvasNameStr(wxT("GLCanvas"));
95 static const wxString
wxPyEmptyString(wxT(""));
99 static void *SwigwxGLContextTowxObject(void *ptr
) {
102 src
= (wxGLContext
*) ptr
;
103 dest
= (wxObject
*) src
;
104 return (void *) dest
;
107 #define new_wxGLContext(_swigarg0,_swigarg1,_swigarg2) (new wxGLContext(_swigarg0,_swigarg1,_swigarg2))
108 static PyObject
*_wrap_new_wxGLContext(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
109 PyObject
* _resultobj
;
110 wxGLContext
* _result
;
113 wxPalette
* _arg2
= (wxPalette
*) &wxNullPalette
;
115 PyObject
* _argo1
= 0;
116 PyObject
* _argo2
= 0;
117 char *_kwnames
[] = { "isRGB","win","palette", NULL
};
121 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"iO|O:new_wxGLContext",_kwnames
,&tempbool0
,&_argo1
,&_argo2
))
123 _arg0
= (bool ) tempbool0
;
125 if (_argo1
== Py_None
) { _arg1
= NULL
; }
126 else if (SWIG_GetPtrObj(_argo1
,(void **) &_arg1
,"_wxGLCanvas_p")) {
127 PyErr_SetString(PyExc_TypeError
,"Type error in argument 2 of new_wxGLContext. Expected _wxGLCanvas_p.");
132 if (SWIG_GetPtrObj(_argo2
,(void **) &_arg2
,"_wxPalette_p")) {
133 PyErr_SetString(PyExc_TypeError
,"Type error in argument 3 of new_wxGLContext. Expected _wxPalette_p.");
138 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
139 _result
= (wxGLContext
*)new_wxGLContext(_arg0
,_arg1
,*_arg2
);
141 wxPyEndAllowThreads(__tstate
);
142 if (PyErr_Occurred()) return NULL
;
144 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxGLContext_p");
145 _resultobj
= Py_BuildValue("s",_ptemp
);
148 _resultobj
= Py_None
;
153 #define delete_wxGLContext(_swigobj) (delete _swigobj)
154 static PyObject
*_wrap_delete_wxGLContext(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
155 PyObject
* _resultobj
;
157 PyObject
* _argo0
= 0;
158 char *_kwnames
[] = { "self", NULL
};
161 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:delete_wxGLContext",_kwnames
,&_argo0
))
164 if (_argo0
== Py_None
) { _arg0
= NULL
; }
165 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxGLContext_p")) {
166 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of delete_wxGLContext. Expected _wxGLContext_p.");
171 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
172 delete_wxGLContext(_arg0
);
174 wxPyEndAllowThreads(__tstate
);
175 if (PyErr_Occurred()) return NULL
;
176 } Py_INCREF(Py_None
);
177 _resultobj
= Py_None
;
181 #define wxGLContext_SetCurrent(_swigobj) (_swigobj->SetCurrent())
182 static PyObject
*_wrap_wxGLContext_SetCurrent(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
183 PyObject
* _resultobj
;
185 PyObject
* _argo0
= 0;
186 char *_kwnames
[] = { "self", NULL
};
189 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxGLContext_SetCurrent",_kwnames
,&_argo0
))
192 if (_argo0
== Py_None
) { _arg0
= NULL
; }
193 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxGLContext_p")) {
194 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxGLContext_SetCurrent. Expected _wxGLContext_p.");
199 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
200 wxGLContext_SetCurrent(_arg0
);
202 wxPyEndAllowThreads(__tstate
);
203 if (PyErr_Occurred()) return NULL
;
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 PyObject
* _obj1
= 0;
216 char *_kwnames
[] = { "self","colour", NULL
};
219 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO:wxGLContext_SetColour",_kwnames
,&_argo0
,&_obj1
))
222 if (_argo0
== Py_None
) { _arg0
= NULL
; }
223 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxGLContext_p")) {
224 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxGLContext_SetColour. Expected _wxGLContext_p.");
229 _arg1
= wxString_in_helper(_obj1
);
234 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
235 wxGLContext_SetColour(_arg0
,*_arg1
);
237 wxPyEndAllowThreads(__tstate
);
238 if (PyErr_Occurred()) return NULL
;
239 } Py_INCREF(Py_None
);
240 _resultobj
= Py_None
;
248 #define wxGLContext_SwapBuffers(_swigobj) (_swigobj->SwapBuffers())
249 static PyObject
*_wrap_wxGLContext_SwapBuffers(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
250 PyObject
* _resultobj
;
252 PyObject
* _argo0
= 0;
253 char *_kwnames
[] = { "self", NULL
};
256 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxGLContext_SwapBuffers",_kwnames
,&_argo0
))
259 if (_argo0
== Py_None
) { _arg0
= NULL
; }
260 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxGLContext_p")) {
261 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxGLContext_SwapBuffers. Expected _wxGLContext_p.");
266 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
267 wxGLContext_SwapBuffers(_arg0
);
269 wxPyEndAllowThreads(__tstate
);
270 if (PyErr_Occurred()) return NULL
;
271 } Py_INCREF(Py_None
);
272 _resultobj
= Py_None
;
276 #define wxGLContext_SetupPixelFormat(_swigobj) (_swigobj->SetupPixelFormat())
277 static PyObject
*_wrap_wxGLContext_SetupPixelFormat(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
278 PyObject
* _resultobj
;
280 PyObject
* _argo0
= 0;
281 char *_kwnames
[] = { "self", NULL
};
284 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxGLContext_SetupPixelFormat",_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_SetupPixelFormat. Expected _wxGLContext_p.");
294 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
295 wxGLContext_SetupPixelFormat(_arg0
);
297 wxPyEndAllowThreads(__tstate
);
298 if (PyErr_Occurred()) return NULL
;
299 } Py_INCREF(Py_None
);
300 _resultobj
= Py_None
;
304 #define wxGLContext_SetupPalette(_swigobj,_swigarg0) (_swigobj->SetupPalette(_swigarg0))
305 static PyObject
*_wrap_wxGLContext_SetupPalette(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
306 PyObject
* _resultobj
;
309 PyObject
* _argo0
= 0;
310 PyObject
* _argo1
= 0;
311 char *_kwnames
[] = { "self","palette", NULL
};
314 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO:wxGLContext_SetupPalette",_kwnames
,&_argo0
,&_argo1
))
317 if (_argo0
== Py_None
) { _arg0
= NULL
; }
318 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxGLContext_p")) {
319 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxGLContext_SetupPalette. Expected _wxGLContext_p.");
324 if (SWIG_GetPtrObj(_argo1
,(void **) &_arg1
,"_wxPalette_p")) {
325 PyErr_SetString(PyExc_TypeError
,"Type error in argument 2 of wxGLContext_SetupPalette. Expected _wxPalette_p.");
330 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
331 wxGLContext_SetupPalette(_arg0
,*_arg1
);
333 wxPyEndAllowThreads(__tstate
);
334 if (PyErr_Occurred()) return NULL
;
335 } Py_INCREF(Py_None
);
336 _resultobj
= Py_None
;
340 #define wxGLContext_CreateDefaultPalette(_swigobj) (_swigobj->CreateDefaultPalette())
341 static PyObject
*_wrap_wxGLContext_CreateDefaultPalette(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
342 PyObject
* _resultobj
;
345 PyObject
* _argo0
= 0;
346 char *_kwnames
[] = { "self", NULL
};
350 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxGLContext_CreateDefaultPalette",_kwnames
,&_argo0
))
353 if (_argo0
== Py_None
) { _arg0
= NULL
; }
354 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxGLContext_p")) {
355 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxGLContext_CreateDefaultPalette. Expected _wxGLContext_p.");
360 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
361 _result
= new wxPalette (wxGLContext_CreateDefaultPalette(_arg0
));
363 wxPyEndAllowThreads(__tstate
);
364 if (PyErr_Occurred()) return NULL
;
365 } SWIG_MakePtr(_ptemp
, (void *) _result
,"_wxPalette_p");
366 _resultobj
= Py_BuildValue("s",_ptemp
);
370 #define wxGLContext_GetPalette(_swigobj) (_swigobj->GetPalette())
371 static PyObject
*_wrap_wxGLContext_GetPalette(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
372 PyObject
* _resultobj
;
375 PyObject
* _argo0
= 0;
376 char *_kwnames
[] = { "self", NULL
};
380 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxGLContext_GetPalette",_kwnames
,&_argo0
))
383 if (_argo0
== Py_None
) { _arg0
= NULL
; }
384 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxGLContext_p")) {
385 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxGLContext_GetPalette. Expected _wxGLContext_p.");
390 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
391 _result
= (wxPalette
*)wxGLContext_GetPalette(_arg0
);
393 wxPyEndAllowThreads(__tstate
);
394 if (PyErr_Occurred()) return NULL
;
396 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxPalette_p");
397 _resultobj
= Py_BuildValue("s",_ptemp
);
400 _resultobj
= Py_None
;
405 #define wxGLContext_GetWindow(_swigobj) (_swigobj->GetWindow())
406 static PyObject
*_wrap_wxGLContext_GetWindow(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
407 PyObject
* _resultobj
;
410 PyObject
* _argo0
= 0;
411 char *_kwnames
[] = { "self", NULL
};
414 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxGLContext_GetWindow",_kwnames
,&_argo0
))
417 if (_argo0
== Py_None
) { _arg0
= NULL
; }
418 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxGLContext_p")) {
419 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxGLContext_GetWindow. Expected _wxGLContext_p.");
424 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
425 _result
= (wxWindow
*)wxGLContext_GetWindow(_arg0
);
427 wxPyEndAllowThreads(__tstate
);
428 if (PyErr_Occurred()) return NULL
;
429 }{ _resultobj
= wxPyMake_wxObject(_result
); }
433 static void *SwigwxGLCanvasTowxWindow(void *ptr
) {
436 src
= (wxGLCanvas
*) ptr
;
437 dest
= (wxWindow
*) src
;
438 return (void *) dest
;
441 static void *SwigwxGLCanvasTowxEvtHandler(void *ptr
) {
444 src
= (wxGLCanvas
*) ptr
;
445 dest
= (wxEvtHandler
*) src
;
446 return (void *) dest
;
449 static void *SwigwxGLCanvasTowxObject(void *ptr
) {
452 src
= (wxGLCanvas
*) ptr
;
453 dest
= (wxObject
*) src
;
454 return (void *) dest
;
457 #define new_wxGLCanvas(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7) (new wxGLCanvas(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7))
458 static PyObject
*_wrap_new_wxGLCanvas(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
459 PyObject
* _resultobj
;
460 wxGLCanvas
* _result
;
462 wxWindowID _arg1
= (wxWindowID
) -1;
463 wxPoint
* _arg2
= (wxPoint
*) &wxDefaultPosition
;
464 wxSize
* _arg3
= (wxSize
*) &wxDefaultSize
;
465 long _arg4
= (long ) 0;
466 wxString
* _arg5
= (wxString
*) &wxPyGLCanvasNameStr
;
467 int * _arg6
= (int *) NULL
;
468 wxPalette
* _arg7
= (wxPalette
*) &wxNullPalette
;
469 PyObject
* _argo0
= 0;
471 PyObject
* _obj2
= 0;
473 PyObject
* _obj3
= 0;
474 PyObject
* _obj5
= 0;
476 PyObject
* _obj6
= 0;
477 PyObject
* _argo7
= 0;
478 char *_kwnames
[] = { "parent","id","pos","size","style","name","attribList","palette", NULL
};
482 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O|iOOlOOO:new_wxGLCanvas",_kwnames
,&_argo0
,&_arg1
,&_obj2
,&_obj3
,&_arg4
,&_obj5
,&_obj6
,&_argo7
))
485 if (_argo0
== Py_None
) { _arg0
= NULL
; }
486 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxWindow_p")) {
487 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of new_wxGLCanvas. Expected _wxWindow_p.");
494 if (! wxPoint_helper(_obj2
, &_arg2
))
500 if (! wxSize_helper(_obj3
, &_arg3
))
505 _arg5
= wxString_in_helper(_obj5
);
512 if (PySequence_Check(_obj6
)) {
513 int size
= PyObject_Length(_obj6
);
514 temp1
= new int[size
+1]; // (int*)malloc((size + 1) * sizeof(int));
515 for (i
= 0; i
< size
; i
++) {
516 temp1
[i
] = PyInt_AsLong(PySequence_GetItem(_obj6
, i
));
523 if (SWIG_GetPtrObj(_argo7
,(void **) &_arg7
,"_wxPalette_p")) {
524 PyErr_SetString(PyExc_TypeError
,"Type error in argument 8 of new_wxGLCanvas. Expected _wxPalette_p.");
529 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
530 _result
= (wxGLCanvas
*)new_wxGLCanvas(_arg0
,_arg1
,*_arg2
,*_arg3
,_arg4
,*_arg5
,_arg6
,*_arg7
);
532 wxPyEndAllowThreads(__tstate
);
533 if (PyErr_Occurred()) return NULL
;
535 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxGLCanvas_p");
536 _resultobj
= Py_BuildValue("s",_ptemp
);
539 _resultobj
= Py_None
;
551 #define new_wxGLCanvasWithContext(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8) (new wxGLCanvas(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8))
552 static PyObject
*_wrap_new_wxGLCanvasWithContext(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
553 PyObject
* _resultobj
;
554 wxGLCanvas
* _result
;
556 wxGLContext
* _arg1
= (wxGLContext
*) NULL
;
557 wxWindowID _arg2
= (wxWindowID
) -1;
558 wxPoint
* _arg3
= (wxPoint
*) &wxDefaultPosition
;
559 wxSize
* _arg4
= (wxSize
*) &wxDefaultSize
;
560 long _arg5
= (long ) 0;
561 wxString
* _arg6
= (wxString
*) &wxPyGLCanvasNameStr
;
562 int * _arg7
= (int *) NULL
;
563 wxPalette
* _arg8
= (wxPalette
*) &wxNullPalette
;
564 PyObject
* _argo0
= 0;
565 PyObject
* _argo1
= 0;
567 PyObject
* _obj3
= 0;
569 PyObject
* _obj4
= 0;
570 PyObject
* _obj6
= 0;
572 PyObject
* _obj7
= 0;
573 PyObject
* _argo8
= 0;
574 char *_kwnames
[] = { "parent","shared","id","pos","size","style","name","attribList","palette", NULL
};
578 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O|OiOOlOOO:new_wxGLCanvasWithContext",_kwnames
,&_argo0
,&_argo1
,&_arg2
,&_obj3
,&_obj4
,&_arg5
,&_obj6
,&_obj7
,&_argo8
))
581 if (_argo0
== Py_None
) { _arg0
= NULL
; }
582 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxWindow_p")) {
583 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of new_wxGLCanvasWithContext. Expected _wxWindow_p.");
588 if (_argo1
== Py_None
) { _arg1
= NULL
; }
589 else if (SWIG_GetPtrObj(_argo1
,(void **) &_arg1
,"_wxGLContext_p")) {
590 PyErr_SetString(PyExc_TypeError
,"Type error in argument 2 of new_wxGLCanvasWithContext. Expected _wxGLContext_p.");
597 if (! wxPoint_helper(_obj3
, &_arg3
))
603 if (! wxSize_helper(_obj4
, &_arg4
))
608 _arg6
= wxString_in_helper(_obj6
);
615 if (PySequence_Check(_obj7
)) {
616 int size
= PyObject_Length(_obj7
);
617 temp1
= new int[size
+1]; // (int*)malloc((size + 1) * sizeof(int));
618 for (i
= 0; i
< size
; i
++) {
619 temp1
[i
] = PyInt_AsLong(PySequence_GetItem(_obj7
, i
));
626 if (SWIG_GetPtrObj(_argo8
,(void **) &_arg8
,"_wxPalette_p")) {
627 PyErr_SetString(PyExc_TypeError
,"Type error in argument 9 of new_wxGLCanvasWithContext. Expected _wxPalette_p.");
632 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
633 _result
= (wxGLCanvas
*)new_wxGLCanvasWithContext(_arg0
,_arg1
,_arg2
,*_arg3
,*_arg4
,_arg5
,*_arg6
,_arg7
,*_arg8
);
635 wxPyEndAllowThreads(__tstate
);
636 if (PyErr_Occurred()) return NULL
;
638 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxGLCanvas_p");
639 _resultobj
= Py_BuildValue("s",_ptemp
);
642 _resultobj
= Py_None
;
654 #define wxGLCanvas_SetCurrent(_swigobj) (_swigobj->SetCurrent())
655 static PyObject
*_wrap_wxGLCanvas_SetCurrent(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
656 PyObject
* _resultobj
;
658 PyObject
* _argo0
= 0;
659 char *_kwnames
[] = { "self", NULL
};
662 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxGLCanvas_SetCurrent",_kwnames
,&_argo0
))
665 if (_argo0
== Py_None
) { _arg0
= NULL
; }
666 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxGLCanvas_p")) {
667 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxGLCanvas_SetCurrent. Expected _wxGLCanvas_p.");
672 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
673 wxGLCanvas_SetCurrent(_arg0
);
675 wxPyEndAllowThreads(__tstate
);
676 if (PyErr_Occurred()) return NULL
;
677 } Py_INCREF(Py_None
);
678 _resultobj
= Py_None
;
682 #define wxGLCanvas_SetColour(_swigobj,_swigarg0) (_swigobj->SetColour(_swigarg0))
683 static PyObject
*_wrap_wxGLCanvas_SetColour(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
684 PyObject
* _resultobj
;
687 PyObject
* _argo0
= 0;
688 PyObject
* _obj1
= 0;
689 char *_kwnames
[] = { "self","colour", NULL
};
692 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"OO:wxGLCanvas_SetColour",_kwnames
,&_argo0
,&_obj1
))
695 if (_argo0
== Py_None
) { _arg0
= NULL
; }
696 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxGLCanvas_p")) {
697 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxGLCanvas_SetColour. Expected _wxGLCanvas_p.");
702 _arg1
= wxString_in_helper(_obj1
);
707 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
708 wxGLCanvas_SetColour(_arg0
,*_arg1
);
710 wxPyEndAllowThreads(__tstate
);
711 if (PyErr_Occurred()) return NULL
;
712 } Py_INCREF(Py_None
);
713 _resultobj
= Py_None
;
721 #define wxGLCanvas_SwapBuffers(_swigobj) (_swigobj->SwapBuffers())
722 static PyObject
*_wrap_wxGLCanvas_SwapBuffers(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
723 PyObject
* _resultobj
;
725 PyObject
* _argo0
= 0;
726 char *_kwnames
[] = { "self", NULL
};
729 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxGLCanvas_SwapBuffers",_kwnames
,&_argo0
))
732 if (_argo0
== Py_None
) { _arg0
= NULL
; }
733 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxGLCanvas_p")) {
734 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxGLCanvas_SwapBuffers. Expected _wxGLCanvas_p.");
739 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
740 wxGLCanvas_SwapBuffers(_arg0
);
742 wxPyEndAllowThreads(__tstate
);
743 if (PyErr_Occurred()) return NULL
;
744 } Py_INCREF(Py_None
);
745 _resultobj
= Py_None
;
749 #define wxGLCanvas_GetContext(_swigobj) (_swigobj->GetContext())
750 static PyObject
*_wrap_wxGLCanvas_GetContext(PyObject
*self
, PyObject
*args
, PyObject
*kwargs
) {
751 PyObject
* _resultobj
;
752 wxGLContext
* _result
;
754 PyObject
* _argo0
= 0;
755 char *_kwnames
[] = { "self", NULL
};
759 if(!PyArg_ParseTupleAndKeywords(args
,kwargs
,"O:wxGLCanvas_GetContext",_kwnames
,&_argo0
))
762 if (_argo0
== Py_None
) { _arg0
= NULL
; }
763 else if (SWIG_GetPtrObj(_argo0
,(void **) &_arg0
,"_wxGLCanvas_p")) {
764 PyErr_SetString(PyExc_TypeError
,"Type error in argument 1 of wxGLCanvas_GetContext. Expected _wxGLCanvas_p.");
769 PyThreadState
* __tstate
= wxPyBeginAllowThreads();
770 _result
= (wxGLContext
*)wxGLCanvas_GetContext(_arg0
);
772 wxPyEndAllowThreads(__tstate
);
773 if (PyErr_Occurred()) return NULL
;
775 SWIG_MakePtr(_ptemp
, (char *) _result
,"_wxGLContext_p");
776 _resultobj
= Py_BuildValue("s",_ptemp
);
779 _resultobj
= Py_None
;
784 static PyMethodDef glcanvascMethods
[] = {
785 { "wxGLCanvas_GetContext", (PyCFunction
) _wrap_wxGLCanvas_GetContext
, METH_VARARGS
| METH_KEYWORDS
},
786 { "wxGLCanvas_SwapBuffers", (PyCFunction
) _wrap_wxGLCanvas_SwapBuffers
, METH_VARARGS
| METH_KEYWORDS
},
787 { "wxGLCanvas_SetColour", (PyCFunction
) _wrap_wxGLCanvas_SetColour
, METH_VARARGS
| METH_KEYWORDS
},
788 { "wxGLCanvas_SetCurrent", (PyCFunction
) _wrap_wxGLCanvas_SetCurrent
, METH_VARARGS
| METH_KEYWORDS
},
789 { "new_wxGLCanvasWithContext", (PyCFunction
) _wrap_new_wxGLCanvasWithContext
, METH_VARARGS
| METH_KEYWORDS
},
790 { "new_wxGLCanvas", (PyCFunction
) _wrap_new_wxGLCanvas
, METH_VARARGS
| METH_KEYWORDS
},
791 { "wxGLContext_GetWindow", (PyCFunction
) _wrap_wxGLContext_GetWindow
, METH_VARARGS
| METH_KEYWORDS
},
792 { "wxGLContext_GetPalette", (PyCFunction
) _wrap_wxGLContext_GetPalette
, METH_VARARGS
| METH_KEYWORDS
},
793 { "wxGLContext_CreateDefaultPalette", (PyCFunction
) _wrap_wxGLContext_CreateDefaultPalette
, METH_VARARGS
| METH_KEYWORDS
},
794 { "wxGLContext_SetupPalette", (PyCFunction
) _wrap_wxGLContext_SetupPalette
, METH_VARARGS
| METH_KEYWORDS
},
795 { "wxGLContext_SetupPixelFormat", (PyCFunction
) _wrap_wxGLContext_SetupPixelFormat
, METH_VARARGS
| METH_KEYWORDS
},
796 { "wxGLContext_SwapBuffers", (PyCFunction
) _wrap_wxGLContext_SwapBuffers
, METH_VARARGS
| METH_KEYWORDS
},
797 { "wxGLContext_SetColour", (PyCFunction
) _wrap_wxGLContext_SetColour
, METH_VARARGS
| METH_KEYWORDS
},
798 { "wxGLContext_SetCurrent", (PyCFunction
) _wrap_wxGLContext_SetCurrent
, METH_VARARGS
| METH_KEYWORDS
},
799 { "delete_wxGLContext", (PyCFunction
) _wrap_delete_wxGLContext
, METH_VARARGS
| METH_KEYWORDS
},
800 { "new_wxGLContext", (PyCFunction
) _wrap_new_wxGLContext
, METH_VARARGS
| METH_KEYWORDS
},
807 * This table is used by the pointer type-checker
809 static struct { char *n1
; char *n2
; void *(*pcnv
)(void *); } _swig_mapping
[] = {
810 { "_signed_long","_long",0},
811 { "_wxPrintQuality","_wxCoord",0},
812 { "_wxPrintQuality","_int",0},
813 { "_wxPrintQuality","_signed_int",0},
814 { "_wxPrintQuality","_unsigned_int",0},
815 { "_wxPrintQuality","_wxWindowID",0},
816 { "_wxPrintQuality","_uint",0},
817 { "_wxPrintQuality","_EBool",0},
818 { "_wxPrintQuality","_size_t",0},
819 { "_wxPrintQuality","_time_t",0},
820 { "_byte","_unsigned_char",0},
821 { "_long","_unsigned_long",0},
822 { "_long","_signed_long",0},
823 { "_size_t","_wxCoord",0},
824 { "_size_t","_wxPrintQuality",0},
825 { "_size_t","_time_t",0},
826 { "_size_t","_unsigned_int",0},
827 { "_size_t","_int",0},
828 { "_size_t","_wxWindowID",0},
829 { "_size_t","_uint",0},
830 { "_uint","_wxCoord",0},
831 { "_uint","_wxPrintQuality",0},
832 { "_uint","_time_t",0},
833 { "_uint","_size_t",0},
834 { "_uint","_unsigned_int",0},
836 { "_uint","_wxWindowID",0},
837 { "_wxChar","_char",0},
838 { "_char","_wxChar",0},
839 { "_struct_wxNativeFontInfo","_wxNativeFontInfo",0},
840 { "_EBool","_wxCoord",0},
841 { "_EBool","_wxPrintQuality",0},
842 { "_EBool","_signed_int",0},
843 { "_EBool","_int",0},
844 { "_EBool","_wxWindowID",0},
845 { "_unsigned_long","_long",0},
846 { "_wxNativeFontInfo","_struct_wxNativeFontInfo",0},
847 { "_signed_int","_wxCoord",0},
848 { "_signed_int","_wxPrintQuality",0},
849 { "_signed_int","_EBool",0},
850 { "_signed_int","_wxWindowID",0},
851 { "_signed_int","_int",0},
852 { "_WXTYPE","_wxDateTime_t",0},
853 { "_WXTYPE","_short",0},
854 { "_WXTYPE","_signed_short",0},
855 { "_WXTYPE","_unsigned_short",0},
856 { "_unsigned_short","_wxDateTime_t",0},
857 { "_unsigned_short","_WXTYPE",0},
858 { "_unsigned_short","_short",0},
859 { "_wxObject","_wxGLCanvas",SwigwxGLCanvasTowxObject
},
860 { "_wxObject","_wxGLContext",SwigwxGLContextTowxObject
},
861 { "_signed_short","_WXTYPE",0},
862 { "_signed_short","_short",0},
863 { "_unsigned_char","_byte",0},
864 { "_unsigned_int","_wxCoord",0},
865 { "_unsigned_int","_wxPrintQuality",0},
866 { "_unsigned_int","_time_t",0},
867 { "_unsigned_int","_size_t",0},
868 { "_unsigned_int","_uint",0},
869 { "_unsigned_int","_wxWindowID",0},
870 { "_unsigned_int","_int",0},
871 { "_short","_wxDateTime_t",0},
872 { "_short","_WXTYPE",0},
873 { "_short","_unsigned_short",0},
874 { "_short","_signed_short",0},
875 { "_wxWindowID","_wxCoord",0},
876 { "_wxWindowID","_wxPrintQuality",0},
877 { "_wxWindowID","_time_t",0},
878 { "_wxWindowID","_size_t",0},
879 { "_wxWindowID","_EBool",0},
880 { "_wxWindowID","_uint",0},
881 { "_wxWindowID","_int",0},
882 { "_wxWindowID","_signed_int",0},
883 { "_wxWindowID","_unsigned_int",0},
884 { "_int","_wxCoord",0},
885 { "_int","_wxPrintQuality",0},
886 { "_int","_time_t",0},
887 { "_int","_size_t",0},
888 { "_int","_EBool",0},
890 { "_int","_wxWindowID",0},
891 { "_int","_unsigned_int",0},
892 { "_int","_signed_int",0},
893 { "_wxDateTime_t","_unsigned_short",0},
894 { "_wxDateTime_t","_short",0},
895 { "_wxDateTime_t","_WXTYPE",0},
896 { "_time_t","_wxCoord",0},
897 { "_time_t","_wxPrintQuality",0},
898 { "_time_t","_unsigned_int",0},
899 { "_time_t","_int",0},
900 { "_time_t","_wxWindowID",0},
901 { "_time_t","_uint",0},
902 { "_time_t","_size_t",0},
903 { "_wxCoord","_int",0},
904 { "_wxCoord","_signed_int",0},
905 { "_wxCoord","_unsigned_int",0},
906 { "_wxCoord","_wxWindowID",0},
907 { "_wxCoord","_uint",0},
908 { "_wxCoord","_EBool",0},
909 { "_wxCoord","_size_t",0},
910 { "_wxCoord","_time_t",0},
911 { "_wxCoord","_wxPrintQuality",0},
912 { "_wxEvtHandler","_wxGLCanvas",SwigwxGLCanvasTowxEvtHandler
},
913 { "_wxWindow","_wxGLCanvas",SwigwxGLCanvasTowxWindow
},
916 static PyObject
*SWIG_globals
;
920 SWIGEXPORT(void) initglcanvasc() {
922 SWIG_globals
= SWIG_newvarlink();
923 m
= Py_InitModule("glcanvasc", glcanvascMethods
);
924 d
= PyModule_GetDict(m
);
925 PyDict_SetItemString(d
,"WX_GL_RGBA", PyInt_FromLong((long) WX_GL_RGBA
));
926 PyDict_SetItemString(d
,"WX_GL_BUFFER_SIZE", PyInt_FromLong((long) WX_GL_BUFFER_SIZE
));
927 PyDict_SetItemString(d
,"WX_GL_LEVEL", PyInt_FromLong((long) WX_GL_LEVEL
));
928 PyDict_SetItemString(d
,"WX_GL_DOUBLEBUFFER", PyInt_FromLong((long) WX_GL_DOUBLEBUFFER
));
929 PyDict_SetItemString(d
,"WX_GL_STEREO", PyInt_FromLong((long) WX_GL_STEREO
));
930 PyDict_SetItemString(d
,"WX_GL_AUX_BUFFERS", PyInt_FromLong((long) WX_GL_AUX_BUFFERS
));
931 PyDict_SetItemString(d
,"WX_GL_MIN_RED", PyInt_FromLong((long) WX_GL_MIN_RED
));
932 PyDict_SetItemString(d
,"WX_GL_MIN_GREEN", PyInt_FromLong((long) WX_GL_MIN_GREEN
));
933 PyDict_SetItemString(d
,"WX_GL_MIN_BLUE", PyInt_FromLong((long) WX_GL_MIN_BLUE
));
934 PyDict_SetItemString(d
,"WX_GL_MIN_ALPHA", PyInt_FromLong((long) WX_GL_MIN_ALPHA
));
935 PyDict_SetItemString(d
,"WX_GL_DEPTH_SIZE", PyInt_FromLong((long) WX_GL_DEPTH_SIZE
));
936 PyDict_SetItemString(d
,"WX_GL_STENCIL_SIZE", PyInt_FromLong((long) WX_GL_STENCIL_SIZE
));
937 PyDict_SetItemString(d
,"WX_GL_MIN_ACCUM_RED", PyInt_FromLong((long) WX_GL_MIN_ACCUM_RED
));
938 PyDict_SetItemString(d
,"WX_GL_MIN_ACCUM_GREEN", PyInt_FromLong((long) WX_GL_MIN_ACCUM_GREEN
));
939 PyDict_SetItemString(d
,"WX_GL_MIN_ACCUM_BLUE", PyInt_FromLong((long) WX_GL_MIN_ACCUM_BLUE
));
940 PyDict_SetItemString(d
,"WX_GL_MIN_ACCUM_ALPHA", PyInt_FromLong((long) WX_GL_MIN_ACCUM_ALPHA
));
945 for (i
= 0; _swig_mapping
[i
].n1
; i
++)
946 SWIG_RegisterMapping(_swig_mapping
[i
].n1
,_swig_mapping
[i
].n2
,_swig_mapping
[i
].pcnv
);