/* Implementation : PYTHON */
#define SWIGPYTHON
+#include "Python.h"
+
#include <string.h>
#include <stdlib.h>
/* Definitions for Windows/Unix exporting */
# define SWIGEXPORT(a) a
#endif
-#include "Python.h"
-
#ifdef __cplusplus
extern "C" {
#endif
-
extern void SWIG_MakePtr(char *, void *, char *);
extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
extern char *SWIG_GetPtr(char *, void **, char *);
#define SWIG_name "glcanvasc"
-#include "export.h"
+#include "wxPython.h"
#ifdef __WXMSW__
#include "myglcanvas.h"
#else
return target;
}
-#if PYTHON_API_VERSION >= 1009
- static char* wxStringErrorMsg = "String or Unicode type required";
-#else
- static char* wxStringErrorMsg = "String type required";
-#endif
+ // Put some wx default wxChar* values into wxStrings.
+ static const wxString wxPyGLCanvasNameStr(wxT("GLCanvas"));
+ static const wxString wxPyEmptyString(wxT(""));
#ifdef __cplusplus
extern "C" {
#endif
}
}
if (_argo2) {
- if (_argo2 == Py_None) { _arg2 = NULL; }
- else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxPalette_p")) {
+ if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxPalette_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxGLContext. Expected _wxPalette_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
- _result = (wxGLContext *)new_wxGLContext(_arg0,_arg1,*_arg2);
+ _result = (wxGLContext *)new_wxGLContext(_arg0,_arg1,*_arg2);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
- delete_wxGLContext(_arg0);
+ delete_wxGLContext(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
- wxGLContext_SetCurrent(_arg0);
+ wxGLContext_SetCurrent(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
static PyObject *_wrap_wxGLContext_SetColour(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxGLContext * _arg0;
- char * _arg1;
+ wxString * _arg1;
PyObject * _argo0 = 0;
+ PyObject * _obj1 = 0;
char *_kwnames[] = { "self","colour", NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os:wxGLContext_SetColour",_kwnames,&_argo0,&_arg1))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGLContext_SetColour",_kwnames,&_argo0,&_obj1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
return NULL;
}
}
+{
+ _arg1 = wxString_in_helper(_obj1);
+ if (_arg1 == NULL)
+ return NULL;
+}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
- wxGLContext_SetColour(_arg0,_arg1);
+ wxGLContext_SetColour(_arg0,*_arg1);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} Py_INCREF(Py_None);
_resultobj = Py_None;
+{
+ if (_obj1)
+ delete _arg1;
+}
return _resultobj;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
- wxGLContext_SwapBuffers(_arg0);
+ wxGLContext_SwapBuffers(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
- _result = (wxWindow *)wxGLContext_GetWindow(_arg0);
+ _result = (wxWindow *)wxGLContext_GetWindow(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition;
wxSize * _arg3 = (wxSize *) &wxDefaultSize;
long _arg4 = (long ) 0;
- char * _arg5 = (char *) "GLCanvas";
+ wxString * _arg5 = (wxString *) &wxPyGLCanvasNameStr;
int * _arg6 = (int *) NULL;
wxPalette * _arg7 = (wxPalette *) &wxNullPalette;
PyObject * _argo0 = 0;
PyObject * _obj2 = 0;
wxSize temp0;
PyObject * _obj3 = 0;
+ PyObject * _obj5 = 0;
int * temp1;
PyObject * _obj6 = 0;
PyObject * _argo7 = 0;
char _ptemp[128];
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iOOlsOO:new_wxGLCanvas",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_arg5,&_obj6,&_argo7))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iOOlOOO:new_wxGLCanvas",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_obj5,&_obj6,&_argo7))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
_arg3 = &temp0;
if (! wxSize_helper(_obj3, &_arg3))
return NULL;
+}
+ if (_obj5)
+{
+ _arg5 = wxString_in_helper(_obj5);
+ if (_arg5 == NULL)
+ return NULL;
}
if (_obj6)
{
}
}
if (_argo7) {
- if (_argo7 == Py_None) { _arg7 = NULL; }
- else if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxPalette_p")) {
+ if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxPalette_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 8 of new_wxGLCanvas. Expected _wxPalette_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
- _result = (wxGLCanvas *)new_wxGLCanvas(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5,_arg6,*_arg7);
+ _result = (wxGLCanvas *)new_wxGLCanvas(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5,_arg6,*_arg7);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
Py_INCREF(Py_None);
_resultobj = Py_None;
}
+{
+ if (_obj5)
+ delete _arg5;
+}
{
delete [] _arg6;
}
wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition;
wxSize * _arg4 = (wxSize *) &wxDefaultSize;
long _arg5 = (long ) 0;
- char * _arg6 = (char *) "GLCanvas";
+ wxString * _arg6 = (wxString *) &wxPyGLCanvasNameStr;
int * _arg7 = (int *) NULL;
wxPalette * _arg8 = (wxPalette *) &wxNullPalette;
PyObject * _argo0 = 0;
PyObject * _obj3 = 0;
wxSize temp0;
PyObject * _obj4 = 0;
+ PyObject * _obj6 = 0;
int * temp1;
PyObject * _obj7 = 0;
PyObject * _argo8 = 0;
char _ptemp[128];
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|OiOOlsOO:new_wxGLCanvasWithContext",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_arg6,&_obj7,&_argo8))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|OiOOlOOO:new_wxGLCanvasWithContext",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_obj6,&_obj7,&_argo8))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
_arg4 = &temp0;
if (! wxSize_helper(_obj4, &_arg4))
return NULL;
+}
+ if (_obj6)
+{
+ _arg6 = wxString_in_helper(_obj6);
+ if (_arg6 == NULL)
+ return NULL;
}
if (_obj7)
{
}
}
if (_argo8) {
- if (_argo8 == Py_None) { _arg8 = NULL; }
- else if (SWIG_GetPtrObj(_argo8,(void **) &_arg8,"_wxPalette_p")) {
+ if (SWIG_GetPtrObj(_argo8,(void **) &_arg8,"_wxPalette_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 9 of new_wxGLCanvasWithContext. Expected _wxPalette_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
- _result = (wxGLCanvas *)new_wxGLCanvasWithContext(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,*_arg8);
+ _result = (wxGLCanvas *)new_wxGLCanvasWithContext(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7,*_arg8);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
Py_INCREF(Py_None);
_resultobj = Py_None;
}
+{
+ if (_obj6)
+ delete _arg6;
+}
{
delete [] _arg7;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
- wxGLCanvas_SetCurrent(_arg0);
+ wxGLCanvas_SetCurrent(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
static PyObject *_wrap_wxGLCanvas_SetColour(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxGLCanvas * _arg0;
- char * _arg1;
+ wxString * _arg1;
PyObject * _argo0 = 0;
+ PyObject * _obj1 = 0;
char *_kwnames[] = { "self","colour", NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os:wxGLCanvas_SetColour",_kwnames,&_argo0,&_arg1))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGLCanvas_SetColour",_kwnames,&_argo0,&_obj1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
return NULL;
}
}
+{
+ _arg1 = wxString_in_helper(_obj1);
+ if (_arg1 == NULL)
+ return NULL;
+}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
- wxGLCanvas_SetColour(_arg0,_arg1);
+ wxGLCanvas_SetColour(_arg0,*_arg1);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} Py_INCREF(Py_None);
_resultobj = Py_None;
+{
+ if (_obj1)
+ delete _arg1;
+}
return _resultobj;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
- wxGLCanvas_SwapBuffers(_arg0);
+ wxGLCanvas_SwapBuffers(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
- _result = (wxGLContext *)wxGLCanvas_GetContext(_arg0);
+ _result = (wxGLContext *)wxGLCanvas_GetContext(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
- wxGLCanvas_SetupPixelFormat(_arg0,_arg1);
+ wxGLCanvas_SetupPixelFormat(_arg0,_arg1);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
}
}
if (_argo1) {
- if (_argo1 == Py_None) { _arg1 = NULL; }
- else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxPalette_p")) {
+ if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxPalette_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGLCanvas_SetupPalette. Expected _wxPalette_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
- wxGLCanvas_SetupPalette(_arg0,*_arg1);
+ wxGLCanvas_SetupPalette(_arg0,*_arg1);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
- _result = new wxPalette (wxGLCanvas_CreateDefaultPalette(_arg0));
+ _result = new wxPalette (wxGLCanvas_CreateDefaultPalette(_arg0));
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
- _result = (wxPalette *)wxGLCanvas_GetPalette(_arg0);
+ _result = (wxPalette *)wxGLCanvas_GetPalette(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;