X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0220cbc1695d01a55964f31987f2fe78cf212ca1..bf7057315ced794c1a64c905da442f81198219e0:/wxPython/contrib/glcanvas/gtk/glcanvas.cpp?ds=inline diff --git a/wxPython/contrib/glcanvas/gtk/glcanvas.cpp b/wxPython/contrib/glcanvas/gtk/glcanvas.cpp index a03a8a72b7..edec9393d2 100644 --- a/wxPython/contrib/glcanvas/gtk/glcanvas.cpp +++ b/wxPython/contrib/glcanvas/gtk/glcanvas.cpp @@ -27,19 +27,21 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" + extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -61,47 +63,28 @@ extern PyObject *SWIG_newvarlink(void); #endif -static PyObject* l_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyList_Check(target)) { - o2 = target; - target = PyList_New(0); - PyList_Append(target, o2); - Py_XDECREF(o2); - } - PyList_Append(target,o); - Py_XDECREF(o); - } - return target; -} 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; @@ -431,22 +414,6 @@ static PyObject *_wrap_wxGLContext_GetWindow(PyObject *self, PyObject *args, PyO return _resultobj; } -static void *SwigwxGLCanvasTowxScrolledWindow(void *ptr) { - wxGLCanvas *src; - wxScrolledWindow *dest; - src = (wxGLCanvas *) ptr; - dest = (wxScrolledWindow *) src; - return (void *) dest; -} - -static void *SwigwxGLCanvasTowxPanel(void *ptr) { - wxGLCanvas *src; - wxPanel *dest; - src = (wxGLCanvas *) ptr; - dest = (wxPanel *) src; - return (void *) dest; -} - static void *SwigwxGLCanvasTowxWindow(void *ptr) { wxGLCanvas *src; wxWindow *dest; @@ -798,15 +765,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, { "_wxPrintQuality","_time_t",0}, - { "_class_wxEvtHandler","_class_wxGLCanvas",SwigwxGLCanvasTowxEvtHandler}, - { "_class_wxEvtHandler","_wxGLCanvas",SwigwxGLCanvasTowxEvtHandler}, { "_byte","_unsigned_char",0}, { "_long","_unsigned_long",0}, { "_long","_signed_long",0}, - { "_class_wxObject","_class_wxGLCanvas",SwigwxGLCanvasTowxObject}, - { "_class_wxObject","_wxGLCanvas",SwigwxGLCanvasTowxObject}, - { "_class_wxObject","_class_wxGLContext",SwigwxGLContextTowxObject}, - { "_class_wxObject","_wxGLContext",SwigwxGLContextTowxObject}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, { "_size_t","_time_t",0}, @@ -814,8 +775,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, { "_size_t","_uint",0}, - { "_wxPanel","_class_wxGLCanvas",SwigwxGLCanvasTowxPanel}, - { "_wxPanel","_wxGLCanvas",SwigwxGLCanvasTowxPanel}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, { "_uint","_time_t",0}, @@ -833,8 +792,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_EBool","_wxWindowID",0}, { "_unsigned_long","_long",0}, { "_wxNativeFontInfo","_struct_wxNativeFontInfo",0}, - { "_class_wxPanel","_class_wxGLCanvas",SwigwxGLCanvasTowxPanel}, - { "_class_wxPanel","_wxGLCanvas",SwigwxGLCanvasTowxPanel}, { "_signed_int","_wxCoord",0}, { "_signed_int","_wxPrintQuality",0}, { "_signed_int","_EBool",0}, @@ -847,16 +804,10 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_unsigned_short","_wxDateTime_t",0}, { "_unsigned_short","_WXTYPE",0}, { "_unsigned_short","_short",0}, - { "_class_wxWindow","_class_wxGLCanvas",SwigwxGLCanvasTowxWindow}, - { "_class_wxWindow","_wxGLCanvas",SwigwxGLCanvasTowxWindow}, - { "_wxObject","_class_wxGLCanvas",SwigwxGLCanvasTowxObject}, { "_wxObject","_wxGLCanvas",SwigwxGLCanvasTowxObject}, - { "_wxObject","_class_wxGLContext",SwigwxGLContextTowxObject}, { "_wxObject","_wxGLContext",SwigwxGLContextTowxObject}, { "_signed_short","_WXTYPE",0}, { "_signed_short","_short",0}, - { "_wxScrolledWindow","_class_wxGLCanvas",SwigwxGLCanvasTowxScrolledWindow}, - { "_wxScrolledWindow","_wxGLCanvas",SwigwxGLCanvasTowxScrolledWindow}, { "_unsigned_char","_byte",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, @@ -906,11 +857,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_size_t",0}, { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, - { "_wxEvtHandler","_class_wxGLCanvas",SwigwxGLCanvasTowxEvtHandler}, { "_wxEvtHandler","_wxGLCanvas",SwigwxGLCanvasTowxEvtHandler}, - { "_class_wxScrolledWindow","_class_wxGLCanvas",SwigwxGLCanvasTowxScrolledWindow}, - { "_class_wxScrolledWindow","_wxGLCanvas",SwigwxGLCanvasTowxScrolledWindow}, - { "_wxWindow","_class_wxGLCanvas",SwigwxGLCanvasTowxWindow}, { "_wxWindow","_wxGLCanvas",SwigwxGLCanvasTowxWindow}, {0,0,0}};