X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0220cbc1695d01a55964f31987f2fe78cf212ca1..eea0ecad6e518555e37019880242b3f31d93dafc:/wxPython/src/gtk/mdi.cpp diff --git a/wxPython/src/gtk/mdi.cpp b/wxPython/src/gtk/mdi.cpp index d6d8f56ebb..de1f803157 100644 --- a/wxPython/src/gtk/mdi.cpp +++ b/wxPython/src/gtk/mdi.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 *); @@ -55,47 +57,28 @@ extern PyObject *SWIG_newvarlink(void); #include "helpers.h" -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; @@ -1040,21 +1023,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_wxMDIClientWindow",SwigwxMDIClientWindowTowxEvtHandler}, - { "_class_wxEvtHandler","_wxMDIClientWindow",SwigwxMDIClientWindowTowxEvtHandler}, - { "_class_wxEvtHandler","_class_wxMDIChildFrame",SwigwxMDIChildFrameTowxEvtHandler}, - { "_class_wxEvtHandler","_wxMDIChildFrame",SwigwxMDIChildFrameTowxEvtHandler}, - { "_class_wxEvtHandler","_class_wxMDIParentFrame",SwigwxMDIParentFrameTowxEvtHandler}, - { "_class_wxEvtHandler","_wxMDIParentFrame",SwigwxMDIParentFrameTowxEvtHandler}, { "_byte","_unsigned_char",0}, { "_long","_unsigned_long",0}, { "_long","_signed_long",0}, - { "_class_wxObject","_class_wxMDIClientWindow",SwigwxMDIClientWindowTowxObject}, - { "_class_wxObject","_wxMDIClientWindow",SwigwxMDIClientWindowTowxObject}, - { "_class_wxObject","_class_wxMDIChildFrame",SwigwxMDIChildFrameTowxObject}, - { "_class_wxObject","_wxMDIChildFrame",SwigwxMDIChildFrameTowxObject}, - { "_class_wxObject","_class_wxMDIParentFrame",SwigwxMDIParentFrameTowxObject}, - { "_class_wxObject","_wxMDIParentFrame",SwigwxMDIParentFrameTowxObject}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, { "_size_t","_time_t",0}, @@ -1062,9 +1033,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, { "_size_t","_uint",0}, - { "_wxTopLevelWindow","_class_wxMDIChildFrame",SwigwxMDIChildFrameTowxTopLevelWindow}, { "_wxTopLevelWindow","_wxMDIChildFrame",SwigwxMDIChildFrameTowxTopLevelWindow}, - { "_wxTopLevelWindow","_class_wxMDIParentFrame",SwigwxMDIParentFrameTowxTopLevelWindow}, { "_wxTopLevelWindow","_wxMDIParentFrame",SwigwxMDIParentFrameTowxTopLevelWindow}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, @@ -1088,26 +1057,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_signed_int","_EBool",0}, { "_signed_int","_wxWindowID",0}, { "_signed_int","_int",0}, - { "_class_wxTopLevelWindow","_class_wxMDIChildFrame",SwigwxMDIChildFrameTowxTopLevelWindow}, - { "_class_wxTopLevelWindow","_wxMDIChildFrame",SwigwxMDIChildFrameTowxTopLevelWindow}, - { "_class_wxTopLevelWindow","_class_wxMDIParentFrame",SwigwxMDIParentFrameTowxTopLevelWindow}, - { "_class_wxTopLevelWindow","_wxMDIParentFrame",SwigwxMDIParentFrameTowxTopLevelWindow}, { "_WXTYPE","_short",0}, { "_WXTYPE","_signed_short",0}, { "_WXTYPE","_unsigned_short",0}, { "_unsigned_short","_WXTYPE",0}, { "_unsigned_short","_short",0}, - { "_class_wxWindow","_class_wxMDIClientWindow",SwigwxMDIClientWindowTowxWindow}, - { "_class_wxWindow","_wxMDIClientWindow",SwigwxMDIClientWindowTowxWindow}, - { "_class_wxWindow","_class_wxMDIChildFrame",SwigwxMDIChildFrameTowxWindow}, - { "_class_wxWindow","_wxMDIChildFrame",SwigwxMDIChildFrameTowxWindow}, - { "_class_wxWindow","_class_wxMDIParentFrame",SwigwxMDIParentFrameTowxWindow}, - { "_class_wxWindow","_wxMDIParentFrame",SwigwxMDIParentFrameTowxWindow}, - { "_wxObject","_class_wxMDIClientWindow",SwigwxMDIClientWindowTowxObject}, { "_wxObject","_wxMDIClientWindow",SwigwxMDIClientWindowTowxObject}, - { "_wxObject","_class_wxMDIChildFrame",SwigwxMDIChildFrameTowxObject}, { "_wxObject","_wxMDIChildFrame",SwigwxMDIChildFrameTowxObject}, - { "_wxObject","_class_wxMDIParentFrame",SwigwxMDIParentFrameTowxObject}, { "_wxObject","_wxMDIParentFrame",SwigwxMDIParentFrameTowxObject}, { "_signed_short","_WXTYPE",0}, { "_signed_short","_short",0}, @@ -1122,9 +1078,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_short","_WXTYPE",0}, { "_short","_unsigned_short",0}, { "_short","_signed_short",0}, - { "_wxFrame","_class_wxMDIChildFrame",SwigwxMDIChildFrameTowxFrame}, { "_wxFrame","_wxMDIChildFrame",SwigwxMDIChildFrameTowxFrame}, - { "_wxFrame","_class_wxMDIParentFrame",SwigwxMDIParentFrameTowxFrame}, { "_wxFrame","_wxMDIParentFrame",SwigwxMDIParentFrameTowxFrame}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, @@ -1160,22 +1114,12 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_size_t",0}, { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, - { "_wxEvtHandler","_class_wxMDIClientWindow",SwigwxMDIClientWindowTowxEvtHandler}, { "_wxEvtHandler","_wxMDIClientWindow",SwigwxMDIClientWindowTowxEvtHandler}, - { "_wxEvtHandler","_class_wxMDIChildFrame",SwigwxMDIChildFrameTowxEvtHandler}, { "_wxEvtHandler","_wxMDIChildFrame",SwigwxMDIChildFrameTowxEvtHandler}, - { "_wxEvtHandler","_class_wxMDIParentFrame",SwigwxMDIParentFrameTowxEvtHandler}, { "_wxEvtHandler","_wxMDIParentFrame",SwigwxMDIParentFrameTowxEvtHandler}, - { "_wxWindow","_class_wxMDIClientWindow",SwigwxMDIClientWindowTowxWindow}, { "_wxWindow","_wxMDIClientWindow",SwigwxMDIClientWindowTowxWindow}, - { "_wxWindow","_class_wxMDIChildFrame",SwigwxMDIChildFrameTowxWindow}, { "_wxWindow","_wxMDIChildFrame",SwigwxMDIChildFrameTowxWindow}, - { "_wxWindow","_class_wxMDIParentFrame",SwigwxMDIParentFrameTowxWindow}, { "_wxWindow","_wxMDIParentFrame",SwigwxMDIParentFrameTowxWindow}, - { "_class_wxFrame","_class_wxMDIChildFrame",SwigwxMDIChildFrameTowxFrame}, - { "_class_wxFrame","_wxMDIChildFrame",SwigwxMDIChildFrameTowxFrame}, - { "_class_wxFrame","_class_wxMDIParentFrame",SwigwxMDIParentFrameTowxFrame}, - { "_class_wxFrame","_wxMDIParentFrame",SwigwxMDIParentFrameTowxFrame}, {0,0,0}}; static PyObject *SWIG_globals;