X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b68dc582b8c6dd32ef9f0a4ec91573bd5cc0296a..2beb01db001c9c22e4865fba3ba9b46ff5fc2dda:/wxPython/contrib/glcanvas/gtk/glcanvas.cpp diff --git a/wxPython/contrib/glcanvas/gtk/glcanvas.cpp b/wxPython/contrib/glcanvas/gtk/glcanvas.cpp index bc2d6e549a..c877e9db72 100644 --- a/wxPython/contrib/glcanvas/gtk/glcanvas.cpp +++ b/wxPython/contrib/glcanvas/gtk/glcanvas.cpp @@ -56,16 +56,21 @@ extern PyObject *SWIG_newvarlink(void); #define SWIG_name "glcanvasc" #include "export.h" +#ifdef __WXMSW__ +#include "myglcanvas.h" +#else #include +#endif + static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyList_Check(target)) { o2 = target; target = PyList_New(0); @@ -82,32 +87,44 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; } -static char* wxStringErrorMsg = "string type is required for parameter"; +#if PYTHON_API_VERSION >= 1009 + static char* wxStringErrorMsg = "String or Unicode type required"; +#else + static char* wxStringErrorMsg = "string type is required for parameter"; +#endif #ifdef __cplusplus extern "C" { #endif +static void *SwigwxGLContextTowxObject(void *ptr) { + wxGLContext *src; + wxObject *dest; + src = (wxGLContext *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxGLContext(_swigarg0,_swigarg1,_swigarg2) (new wxGLContext(_swigarg0,_swigarg1,_swigarg2)) static PyObject *_wrap_new_wxGLContext(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -396,7 +413,6 @@ static PyObject *_wrap_wxGLContext_GetWindow(PyObject *self, PyObject *args, PyO wxGLContext * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLContext_GetWindow",_kwnames,&_argo0)) @@ -413,13 +429,7 @@ static PyObject *_wrap_wxGLContext_GetWindow(PyObject *self, PyObject *args, PyO _result = (wxWindow *)wxGLContext_GetWindow(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -455,6 +465,14 @@ static void *SwigwxGLCanvasTowxEvtHandler(void *ptr) { return (void *) dest; } +static void *SwigwxGLCanvasTowxObject(void *ptr) { + wxGLCanvas *src; + wxObject *dest; + src = (wxGLCanvas *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxGLCanvas(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7) (new wxGLCanvas(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7)) static PyObject *_wrap_new_wxGLCanvas(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -725,6 +743,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPyProcess","_class_wxPyProcess",0}, { "_wxPyTreeCtrl","_class_wxPyTreeCtrl",0}, { "_wxImageHandler","_class_wxImageHandler",0}, + { "_wxMutexGuiLocker","_class_wxMutexGuiLocker",0}, { "_wxLog","_class_wxLog",0}, { "_class_wxToolBarBase","_wxToolBarBase",0}, { "_wxMask","_class_wxMask",0}, @@ -740,6 +759,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxDataObject","_class_wxDataObject",0}, { "_class_wxPyFontEnumerator","_wxPyFontEnumerator",0}, { "_wxStaticBox","_class_wxStaticBox",0}, + { "_wxColourDatabase","_class_wxColourDatabase",0}, { "_wxPyDataObjectSimple","_class_wxPyDataObjectSimple",0}, { "_wxPyDropSource","_class_wxPyDropSource",0}, { "_wxChoice","_class_wxChoice",0}, @@ -762,6 +782,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxClipboard","_wxClipboard",0}, { "_class_wxGauge","_wxGauge",0}, { "_class_wxSashEvent","_wxSashEvent",0}, + { "_wxGDIObject","_class_wxGDIObject",0}, { "_wxDC","_class_wxDC",0}, { "_wxSizerItem","_class_wxSizerItem",0}, { "_class_wxBitmapDataObject","_wxBitmapDataObject",0}, @@ -771,6 +792,11 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxBMPHandler","_wxBMPHandler",0}, { "_wxPrintPreview","_class_wxPrintPreview",0}, { "_class_wxFlexGridSizer","_wxFlexGridSizer",0}, + { "_class_wxObject","_class_wxGLCanvas",SwigwxGLCanvasTowxObject}, + { "_class_wxObject","_wxGLCanvas",SwigwxGLCanvasTowxObject}, + { "_class_wxObject","_class_wxGLContext",SwigwxGLContextTowxObject}, + { "_class_wxObject","_wxGLContext",SwigwxGLContextTowxObject}, + { "_class_wxObject","_wxObject",0}, { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_wxSashLayoutWindow","_class_wxSashLayoutWindow",0}, { "_size_t","_wxCoord",0}, @@ -820,6 +846,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxStaticLine","_class_wxStaticLine",0}, { "_class_wxLayoutAlgorithm","_wxLayoutAlgorithm",0}, { "_wxBrush","_class_wxBrush",0}, + { "_wxToggleButton","_class_wxToggleButton",0}, { "_wxMiniFrame","_class_wxMiniFrame",0}, { "_class_wxNotebookEvent","_wxNotebookEvent",0}, { "_class_wxPyPrintout","_wxPyPrintout",0}, @@ -856,6 +883,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxZipFSHandler","_wxZipFSHandler",0}, { "_char","_wxChar",0}, { "_wxBitmap","_class_wxBitmap",0}, + { "_wxPenList","_class_wxPenList",0}, { "_wxPrintDialog","_class_wxPrintDialog",0}, { "_wxWindowDC","_class_wxWindowDC",0}, { "_wxTimerEvent","_class_wxTimerEvent",0}, @@ -870,6 +898,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxMessageDialog","_class_wxMessageDialog",0}, { "_class_wxValidator","_wxValidator",0}, { "_class_wxPyEvent","_wxPyEvent",0}, + { "_class_wxMutexGuiLocker","_wxMutexGuiLocker",0}, { "_wxTextEntryDialog","_class_wxTextEntryDialog",0}, { "_wxConfig","_class_wxConfig",0}, { "_class_wxIconizeEvent","_wxIconizeEvent",0}, @@ -882,6 +911,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxToolBar","_wxToolBar",0}, { "_wxDropTarget","_class_wxDropTarget",0}, { "_class_wxStaticLine","_wxStaticLine",0}, + { "_class_wxColourDatabase","_wxColourDatabase",0}, { "_wxScrollEvent","_class_wxScrollEvent",0}, { "_wxToolBarToolBase","_class_wxToolBarToolBase",0}, { "_wxCalculateLayoutEvent","_class_wxCalculateLayoutEvent",0}, @@ -910,9 +940,11 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxScrollWinEvent","_class_wxScrollWinEvent",0}, { "_wxGenericDragImage","_class_wxGenericDragImage",0}, { "_class_wxProgressDialog","_wxProgressDialog",0}, + { "_class_wxBrushList","_wxBrushList",0}, { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0}, { "_wxPyInputStream","_class_wxPyInputStream",0}, { "_wxPyApp","_class_wxPyApp",0}, + { "_class_wxPenList","_wxPenList",0}, { "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0}, { "_class_wxOutputStream","_wxOutputStream",0}, { "_wxLogTextCtrl","_class_wxLogTextCtrl",0}, @@ -975,6 +1007,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxCloseEvent","_wxCloseEvent",0}, { "_wxSashEvent","_class_wxSashEvent",0}, { "_wxBusyInfo","_class_wxBusyInfo",0}, + { "_wxFontList","_class_wxFontList",0}, { "_class_wxMenuEvent","_wxMenuEvent",0}, { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, @@ -984,6 +1017,11 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxListCtrl","_class_wxListCtrl",0}, { "_wxSingleChoiceDialog","_class_wxSingleChoiceDialog",0}, { "_wxGLCanvas","_class_wxGLCanvas",0}, + { "_wxObject","_class_wxGLCanvas",SwigwxGLCanvasTowxObject}, + { "_wxObject","_wxGLCanvas",SwigwxGLCanvasTowxObject}, + { "_wxObject","_class_wxGLContext",SwigwxGLContextTowxObject}, + { "_wxObject","_wxGLContext",SwigwxGLContextTowxObject}, + { "_wxObject","_class_wxObject",0}, { "_class_wxPoint","_wxPoint",0}, { "_class_wxPyInputStream","_wxPyInputStream",0}, { "_wxRealPoint","_class_wxRealPoint",0}, @@ -1062,6 +1100,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindowID","_int",0}, { "_wxWindowID","_signed_int",0}, { "_wxWindowID","_unsigned_int",0}, + { "_class_wxGDIObject","_wxGDIObject",0}, { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_class_wxSizerItem","_wxSizerItem",0}, { "_int","_wxCoord",0}, @@ -1139,6 +1178,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, { "_class_wxJoystickEvent","_wxJoystickEvent",0}, { "_class_wxTipProvider","_wxTipProvider",0}, + { "_class_wxToggleButton","_wxToggleButton",0}, { "_class_wxMiniFrame","_wxMiniFrame",0}, { "_wxFontDialog","_class_wxFontDialog",0}, { "_wxMemoryFSHandler","_class_wxMemoryFSHandler",0}, @@ -1157,11 +1197,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxGauge","_class_wxGauge",0}, { "_class_wxCheckListBox","_wxCheckListBox",0}, { "_class_wxBusyInfo","_wxBusyInfo",0}, + { "_class_wxFontList","_wxFontList",0}, { "_class_wxCommandEvent","_wxCommandEvent",0}, { "_class_wxClientDC","_wxClientDC",0}, { "_class_wxSizeEvent","_wxSizeEvent",0}, { "_class_wxListCtrl","_wxListCtrl",0}, { "_class_wxGLCanvas","_wxGLCanvas",0}, + { "_wxBrushList","_class_wxBrushList",0}, { "_wxCustomDataObject","_class_wxCustomDataObject",0}, { "_class_wxLogNull","_wxLogNull",0}, { "_class_wxSize","_wxSize",0}, @@ -1220,8 +1262,8 @@ SWIGEXPORT(void) initglcanvasc() { d = PyModule_GetDict(m); -// wxClassInfo::CleanUpClasses(); -// wxClassInfo::InitializeClasses(); + wxClassInfo::CleanUpClasses(); + wxClassInfo::InitializeClasses(); { int i;